Documentation ¶
Index ¶
- func LoadChains(thorKeys *thorclient.Keys, cfg []config.ChainConfiguration, ...) map[common.Chain]ChainClient
- type ChainClient
- type DummyChain
- func (DummyChain) BroadcastTx(_ stypes.TxOutItem, tx []byte) error
- func (DummyChain) CheckIsTestNet() (string, bool)
- func (DummyChain) GetAccount(addr string) (common.Account, error)
- func (DummyChain) GetAddress(poolPubKey common.PubKey) string
- func (DummyChain) GetChain() common.Chain
- func (DummyChain) GetGasFee(count uint64) common.Gas
- func (DummyChain) GetHeight() (int64, error)
- func (DummyChain) SignTx(tx stypes.TxOutItem, height int64) ([]byte, error)
- func (DummyChain) Start(globalTxsQueue chan stypes.TxIn)
- func (DummyChain) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadChains ¶
func LoadChains(thorKeys *thorclient.Keys, cfg []config.ChainConfiguration, server *tss.TssServer, thorchainBridge *thorclient.ThorchainBridge, m *metrics.Metrics, keySignPartyMgr *thorclient.KeySignPartyMgr) map[common.Chain]ChainClient
LoadChains returns chain clients from chain configuration
Types ¶
type ChainClient ¶
type ChainClient interface { SignTx(tx stypes.TxOutItem, height int64) ([]byte, error) BroadcastTx(_ stypes.TxOutItem, _ []byte) error GetHeight() (int64, error) GetAddress(poolPubKey common.PubKey) string GetAccount(poolPubKey common.PubKey) (common.Account, error) GetAccountByAddress(address string) (common.Account, error) GetChain() common.Chain Start(globalTxsQueue chan stypes.TxIn, globalErrataQueue chan stypes.ErrataBlock) GetConfig() config.ChainConfiguration Stop() }
ChainClient is the interface that wraps basic chain client methods
SignTx signs transactions BroadcastTx broadcast transactions on the chain associated with the client GetChain get chain id SignTx sign transaction GetHeight get chain height GetAddress gets address for public key pool in chain GetAccount gets account from thorclient in cain GetGasFee calculates gas fee based on number of simple transfer sents GetConfig gets the chain configuration Start Stop
type DummyChain ¶
type DummyChain struct{}
func (DummyChain) BroadcastTx ¶
func (DummyChain) BroadcastTx(_ stypes.TxOutItem, tx []byte) error
func (DummyChain) CheckIsTestNet ¶
func (DummyChain) CheckIsTestNet() (string, bool)
func (DummyChain) GetAccount ¶
func (DummyChain) GetAccount(addr string) (common.Account, error)
func (DummyChain) GetAddress ¶
func (DummyChain) GetAddress(poolPubKey common.PubKey) string
func (DummyChain) GetChain ¶
func (DummyChain) GetChain() common.Chain
func (DummyChain) GetHeight ¶
func (DummyChain) GetHeight() (int64, error)
func (DummyChain) Start ¶
func (DummyChain) Start(globalTxsQueue chan stypes.TxIn)
func (DummyChain) Stop ¶
func (DummyChain) Stop()
Click to show internal directories.
Click to hide internal directories.