Documentation ¶
Index ¶
- Constants
- Variables
- func GetKeyringKeybase(chainHomeFolder, signerName, password string) (ckeys.Keybase, ckeys.Info, error)
- func MakeCodec() *codec.Codec
- type KeySignPartyMgr
- type Keys
- type QueryKeysign
- type ThorchainBridge
- func (b *ThorchainBridge) Broadcast(stdTx authtypes.StdTx, mode types.TxMode) (common.TxID, error)
- func (b *ThorchainBridge) EnsureNodeWhitelisted() error
- func (b *ThorchainBridge) EnsureNodeWhitelistedWithTimeout() error
- func (b *ThorchainBridge) FetchNodeStatus() (stypes.NodeStatus, error)
- func (b *ThorchainBridge) GetAsgards() (stypes.Vaults, error)
- func (b *ThorchainBridge) GetBlockHeight() (int64, error)
- func (b *ThorchainBridge) GetConfig() config.ClientConfiguration
- func (b *ThorchainBridge) GetConstants() (map[string]int64, error)
- func (b *ThorchainBridge) GetErrataStdTx(txID common.TxID, chain common.Chain) (*authtypes.StdTx, error)
- func (b *ThorchainBridge) GetKeygenBlock(blockHeight int64, pk string) (types.KeygenBlock, error)
- func (b *ThorchainBridge) GetKeygenStdTx(poolPubKey common.PubKey, blame blame.Blame, inputPks common.PubKeys, ...) (*authtypes.StdTx, error)
- func (b *ThorchainBridge) GetKeysign(blockHeight int64, pk string) (types.TxOut, error)
- func (b *ThorchainBridge) GetKeysignParty(vaultPubKey common.PubKey) (common.PubKeys, error)
- func (b *ThorchainBridge) GetLastObservedInHeight(chain common.Chain) (int64, error)
- func (b *ThorchainBridge) GetLastSignedOutHeight() (int64, error)
- func (b *ThorchainBridge) GetMimir(key string) (int64, error)
- func (b *ThorchainBridge) GetNodeAccount(thorAddr string) (*types.NodeAccount, error)
- func (b *ThorchainBridge) GetObservationsStdTx(txIns stypes.ObservedTxs) (*authtypes.StdTx, error)
- func (b *ThorchainBridge) GetPubKeys() (common.PubKeys, error)
- func (b *ThorchainBridge) IsCatchingUp() (bool, error)
- func (b *ThorchainBridge) PostKeysignFailure(blame blame.Blame, height int64, memo string, coins common.Coins, ...) (common.TxID, error)
- func (b *ThorchainBridge) PostNetworkFee(height int64, chain common.Chain, transactionSize int64, ...) (common.TxID, error)
- func (b *ThorchainBridge) RagnarokInProgress() (bool, error)
- func (b *ThorchainBridge) WaitToCatchUp() error
Constants ¶
const ( AuthAccountEndpoint = "/auth/accounts" BroadcastTxsEndpoint = "/txs" KeygenEndpoint = "/thorchain/keygen" KeysignEndpoint = "/thorchain/keysign" LastBlockEndpoint = "/thorchain/lastblock" NodeAccountEndpoint = "/thorchain/nodeaccount" ValidatorsEndpoint = "/thorchain/validators" SignerMembershipEndpoint = "/thorchain/vaults/%s/signers" StatusEndpoint = "/status" AsgardVault = "/thorchain/vaults/asgard" PubKeysEndpoint = "/thorchain/vaults/pubkeys" ThorchainConstants = "/thorchain/constants" RagnarokEndpoint = "/thorchain/ragnarok" MimirEndpoint = "/thorchain/mimir" )
Endpoint urls
Variables ¶
var ErrNotFound error = fmt.Errorf("not found")
Functions ¶
Types ¶
type KeySignPartyMgr ¶
type KeySignPartyMgr struct {
// contains filtered or unexported fields
}
KeySignPartyMgr is to cache the keysign party locally
func NewKeySignPartyMgr ¶
func NewKeySignPartyMgr(bridge *ThorchainBridge) *KeySignPartyMgr
NewKeySignPartyMgr create a new instance of KeySignPartyMgr
func (*KeySignPartyMgr) GetKeySignParty ¶
GetKeySignParty is going to return a keysign party for the given pool pubkey it check internal cache first , if it is available then user the cached version when cache is not available, then it will make a call to thorchain
func (*KeySignPartyMgr) RemoveKeySignParty ¶
func (mgr *KeySignPartyMgr) RemoveKeySignParty(poolPubKey common.PubKey)
RemoveKeySignParty remove the cached keysign party that match given pool pubkey from memory
func (*KeySignPartyMgr) SaveKeySignParty ¶
func (mgr *KeySignPartyMgr) SaveKeySignParty(poolPubKey common.PubKey, keySignParty common.PubKeys)
SaveKeySignParty is going to save the keysign party to local cache
type Keys ¶
type Keys struct {
// contains filtered or unexported fields
}
Keys manages all the keys used by thorchain
func NewKeysWithKeybase ¶
NewKeysWithKeybase create a new instance of Keys
func (*Keys) GetPrivateKey ¶
GetPrivateKey return the private key
func (*Keys) GetSignerInfo ¶
GetSignerInfo return signer info
type QueryKeysign ¶
type ThorchainBridge ¶
type ThorchainBridge struct {
// contains filtered or unexported fields
}
ThorchainBridge will be used to send tx to thorchain
func NewThorchainBridge ¶
func NewThorchainBridge(cfg config.ClientConfiguration, m *metrics.Metrics, k *Keys) (*ThorchainBridge, error)
NewThorchainBridge create a new instance of ThorchainBridge
func (*ThorchainBridge) EnsureNodeWhitelisted ¶
func (b *ThorchainBridge) EnsureNodeWhitelisted() error
EnsureNodeWhitelisted will call to thorchain to check whether the observer had been whitelist or not
func (*ThorchainBridge) EnsureNodeWhitelistedWithTimeout ¶
func (b *ThorchainBridge) EnsureNodeWhitelistedWithTimeout() error
EnsureNodeWhitelistedWithTimeout check node is whitelisted with timeout retry
func (*ThorchainBridge) FetchNodeStatus ¶
func (b *ThorchainBridge) FetchNodeStatus() (stypes.NodeStatus, error)
FetchNodeStatus get current node status from thorchain
func (*ThorchainBridge) GetAsgards ¶
func (b *ThorchainBridge) GetAsgards() (stypes.Vaults, error)
GetAsgards retrieve all the asgard vaults from thorchain
func (*ThorchainBridge) GetBlockHeight ¶
func (b *ThorchainBridge) GetBlockHeight() (int64, error)
GetBlockHeight returns the current height for thorchain blocks
func (*ThorchainBridge) GetConfig ¶
func (b *ThorchainBridge) GetConfig() config.ClientConfiguration
GetConfig return the configuration
func (*ThorchainBridge) GetConstants ¶
func (b *ThorchainBridge) GetConstants() (map[string]int64, error)
GetConstants from thornode
func (*ThorchainBridge) GetErrataStdTx ¶
func (b *ThorchainBridge) GetErrataStdTx(txID common.TxID, chain common.Chain) (*authtypes.StdTx, error)
GetErrataStdTx get errata tx from params
func (*ThorchainBridge) GetKeygenBlock ¶
func (b *ThorchainBridge) GetKeygenBlock(blockHeight int64, pk string) (types.KeygenBlock, error)
GetKeygen retrieves keygen request for the given block height from thorchain
func (*ThorchainBridge) GetKeygenStdTx ¶
func (b *ThorchainBridge) GetKeygenStdTx(poolPubKey common.PubKey, blame blame.Blame, inputPks common.PubKeys, keygenType stypes.KeygenType, chains common.Chains, height int64) (*authtypes.StdTx, error)
GetKeygenStdTx get keygen tx from params
func (*ThorchainBridge) GetKeysign ¶
GetKeysign retrieves txout from this block height from thorchain
func (*ThorchainBridge) GetKeysignParty ¶
GetKeysignParty call into thorchain to get the node accounts that should be join together to sign the message
func (*ThorchainBridge) GetLastObservedInHeight ¶
func (b *ThorchainBridge) GetLastObservedInHeight(chain common.Chain) (int64, error)
GetLastObservedInHeight returns the lastobservedin value for the chain past in
func (*ThorchainBridge) GetLastSignedOutHeight ¶
func (b *ThorchainBridge) GetLastSignedOutHeight() (int64, error)
GetLastSignedOutHeight returns the lastsignedout value for thorchain
func (*ThorchainBridge) GetMimir ¶
func (b *ThorchainBridge) GetMimir(key string) (int64, error)
Mimir - get mimir settings
func (*ThorchainBridge) GetNodeAccount ¶
func (b *ThorchainBridge) GetNodeAccount(thorAddr string) (*types.NodeAccount, error)
GetNodeAccount retrieves node account for this address from thorchain
func (*ThorchainBridge) GetObservationsStdTx ¶
func (b *ThorchainBridge) GetObservationsStdTx(txIns stypes.ObservedTxs) (*authtypes.StdTx, error)
GetObservationsStdTx get observations tx from txIns
func (*ThorchainBridge) GetPubKeys ¶
func (b *ThorchainBridge) GetPubKeys() (common.PubKeys, error)
func (*ThorchainBridge) IsCatchingUp ¶
func (b *ThorchainBridge) IsCatchingUp() (bool, error)
IsCatchingUp returns bool for if thorchain is catching up to the rest of the nodes. Returns yes, if it is, false if it is caught up.
func (*ThorchainBridge) PostKeysignFailure ¶
func (b *ThorchainBridge) PostKeysignFailure(blame blame.Blame, height int64, memo string, coins common.Coins, pubkey common.PubKey) (common.TxID, error)
PostKeysignFailure generate and post a keysign fail tx to thorchan
func (*ThorchainBridge) PostNetworkFee ¶
func (b *ThorchainBridge) PostNetworkFee(height int64, chain common.Chain, transactionSize int64, transactionRate sdk.Uint) (common.TxID, error)
PostNetworkFee send network fee message to THORNode
func (*ThorchainBridge) RagnarokInProgress ¶
func (b *ThorchainBridge) RagnarokInProgress() (bool, error)
RagnarokInProgress is to query thorchain to check whether ragnarok had been triggered
func (*ThorchainBridge) WaitToCatchUp ¶
func (b *ThorchainBridge) WaitToCatchUp() error
WaitToCatchUp wait for thorchain to catch up