rpc

package
v3.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const TimeoutFlag = "timeout"

Variables

This section is empty.

Functions

func GetBlockByHash

func GetBlockByHash(clientCtx client.Context, hashHexString string) (*cmt.Block, error)

func GetBlockByHeight

func GetBlockByHeight(clientCtx client.Context, height *int64) (*cmt.Block, error)

GetBlockByHeight get block by height

func GetChainHeight

func GetChainHeight(clientCtx client.Context) (int64, error)

GetChainHeight returns the current blockchain height.

func QueryBlocks

func QueryBlocks(clientCtx client.Context, page, limit int, query, orderBy string) (*sdk.SearchBlocksResult, error)
Examples:
	  tm.event = 'NewBlock'               # new blocks
	  tm.event = 'CompleteProposal'       # node got a complete proposal
	  tm.event = 'Tx' AND tx.hash = 'XYZ' # single transaction
	  tm.event = 'Tx' AND tx.height = 5   # all txs of the fifth block
	  tx.height = 5                       # all txs of the fifth block

For more information, see the /subscribe CometBFT RPC endpoint documentation

func QueryEventForTxCmd

func QueryEventForTxCmd() *cobra.Command

QueryEventForTxCmd is an alias for WaitTxCmd, kept for backwards compatibility.

func WaitTxCmd

func WaitTxCmd() *cobra.Command

WaitTxCmd returns a CLI command that waits for a transaction with the given hash to be included in a block.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL