Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainHeightListener ¶
type ChainHeightListener struct { Logger zerolog.Logger HeightChanged chan (int64) // contains filtered or unexported fields }
ChainHeightListener is used to cache the chain height of the current node which is being updated each time the node sends an event of EventNewBlockHeader. It starts a goroutine to subscribe to blockchain new block event and update the cached height.
func NewChainHeightListener ¶
func NewChainHeightListener( ctx context.Context, rpcClient tmrpcclient.Client, logger zerolog.Logger, ) (*ChainHeightListener, error)
NewChainHeight returns a new ChainHeight struct that starts a new goroutine subscribed to EventNewBlockHeader.
func (*ChainHeightListener) GetHeight ¶
func (chainHeight *ChainHeightListener) GetHeight() (int64, error)
GetHeight returns the last chain height available.
type Client ¶
Client provides basic capabilities to connect to a Cosmos SDK based chain and execute transactions and queries. The object should be extended by another struct to provide chain specific transactions and queries. Example: https://github.com/umee-network/umee/blob/main/client Accounts are generated using the list of mnemonics. Each string must be a sequence of words, eg: `["w11 w12 w13", "w21 w22 w23"]`. Keyring names for created accounts will be: val1, val2....