github.com/cosmos/cosmos-sdk@v0.50.10/client/cometbft.go (about) 1 package client 2 3 import ( 4 "context" 5 6 rpcclient "github.com/cometbft/cometbft/rpc/client" 7 coretypes "github.com/cometbft/cometbft/rpc/core/types" 8 ) 9 10 // CometRPC defines the interface of a CometBFT RPC client needed for 11 // queries and transaction handling. 12 type CometRPC interface { 13 rpcclient.ABCIClient 14 15 Validators(ctx context.Context, height *int64, page, perPage *int) (*coretypes.ResultValidators, error) 16 Status(context.Context) (*coretypes.ResultStatus, error) 17 Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) 18 BlockByHash(ctx context.Context, hash []byte) (*coretypes.ResultBlock, error) 19 BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) 20 BlockchainInfo(ctx context.Context, minHeight, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) 21 Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error) 22 Tx(ctx context.Context, hash []byte, prove bool) (*coretypes.ResultTx, error) 23 TxSearch( 24 ctx context.Context, 25 query string, 26 prove bool, 27 page, perPage *int, 28 orderBy string, 29 ) (*coretypes.ResultTxSearch, error) 30 BlockSearch( 31 ctx context.Context, 32 query string, 33 page, perPage *int, 34 orderBy string, 35 ) (*coretypes.ResultBlockSearch, error) 36 }