Documentation ¶
Index ¶
- type ABCIQueryResponse
- type BlockResults
- type CometRPCClient
- func (r CometRPCClient) ABCIInfo(ctx context.Context) (*coretypes.ResultABCIInfo, error)
- func (r CometRPCClient) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error)
- func (r CometRPCClient) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, ...) (*coretypes.ResultABCIQuery, error)
- func (r CometRPCClient) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error)
- func (r CometRPCClient) BlockByHash(ctx context.Context, hash []byte) (*coretypes.ResultBlock, error)
- func (r CometRPCClient) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error)
- func (r CometRPCClient) BlockSearch(ctx context.Context, query string, page, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error)
- func (r CometRPCClient) BlockchainInfo(ctx context.Context, minHeight, maxHeight int64) (*coretypes.ResultBlockchainInfo, error)
- func (r CometRPCClient) BroadcastTxAsync(ctx context.Context, tx tmtypes.Tx) (*coretypes.ResultBroadcastTx, error)
- func (r CometRPCClient) BroadcastTxCommit(ctx context.Context, tx tmtypes.Tx) (*coretypes.ResultBroadcastTxCommit, error)
- func (r CometRPCClient) BroadcastTxSync(ctx context.Context, tx tmtypes.Tx) (*coretypes.ResultBroadcastTx, error)
- func (r CometRPCClient) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error)
- func (r CometRPCClient) DoBroadcastTxAsync(ctx context.Context, tx tmtypes.Tx) (*ResultBroadcastTx, error)
- func (r CometRPCClient) DoBroadcastTxSync(ctx context.Context, tx tmtypes.Tx) (*ResultBroadcastTx, error)
- func (r CometRPCClient) GetABCIQuery(ctx context.Context, queryPath string, data bytes.HexBytes) (*ABCIQueryResponse, error)
- func (r CometRPCClient) GetABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, ...) (*coretypes.ResultABCIQuery, error)
- func (r CometRPCClient) GetBlockResults(ctx context.Context, height uint64) (*BlockResults, error)
- func (r CometRPCClient) GetBlockSearch(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error)
- func (r CometRPCClient) GetBlockTime(ctx context.Context, height uint64) (time.Time, error)
- func (r CometRPCClient) GetCommit(ctx context.Context, height uint64) (*coretypes.ResultCommit, error)
- func (r CometRPCClient) GetStatus(ctx context.Context) (*Status, error)
- func (r CometRPCClient) GetTx(ctx context.Context, hash []byte, prove bool) (*coretypes.ResultTx, error)
- func (r CometRPCClient) GetTxSearch(ctx context.Context, query string, prove bool, page *int, perPage *int, ...) (*ResultTxSearch, error)
- func (r CometRPCClient) GetValidators(ctx context.Context, height *int64, page *int, perPage *int) (*ResultValidators, error)
- func (r CometRPCClient) Status(ctx context.Context) (*coretypes.ResultStatus, error)
- func (r CometRPCClient) Tx(ctx context.Context, hash []byte, prove bool) (*coretypes.ResultTx, error)
- func (r CometRPCClient) TxSearch(ctx context.Context, query string, prove bool, page, perPage *int, ...) (*coretypes.ResultTxSearch, error)
- func (r CometRPCClient) Validators(ctx context.Context, height *int64, page, perPage *int) (*coretypes.ResultValidators, error)
- type ConsensusClient
- type ResultBroadcastTx
- type ResultTxSearch
- type ResultValidators
- type Status
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ABCIQueryResponse ¶
type ABCIQueryResponse struct { Code uint32 `json:"code,omitempty"` Value []byte `json:"value,omitempty"` }
func (ABCIQueryResponse) ValueCleaned ¶
func (q ABCIQueryResponse) ValueCleaned() string
The response value contains the data link escape control character which must be removed before parsing.
type BlockResults ¶
type BlockResults struct { FinalizeBlockEvents []abci.Event `json:"finalize_block_events"` TxsResults []*abci.ExecTxResult `json:"txs_results"` }
type CometRPCClient ¶
type CometRPCClient struct {
// contains filtered or unexported fields
}
CometRPCClient wraps our slimmed down CometBFT client and converts the returned types to the upstream CometBFT types. This is useful so that it can be used in any function calls that expect the upstream types.
func NewCometRPCClient ¶
func NewCometRPCClient(c *client.Client) CometRPCClient
func (CometRPCClient) ABCIInfo ¶
func (r CometRPCClient) ABCIInfo(ctx context.Context) (*coretypes.ResultABCIInfo, error)
func (CometRPCClient) ABCIQuery ¶
func (r CometRPCClient) ABCIQuery( ctx context.Context, path string, data bytes.HexBytes, ) (*coretypes.ResultABCIQuery, error)
func (CometRPCClient) ABCIQueryWithOptions ¶
func (r CometRPCClient) ABCIQueryWithOptions( ctx context.Context, path string, data bytes.HexBytes, opts rpcclient.ABCIQueryOptions, ) (*coretypes.ResultABCIQuery, error)
func (CometRPCClient) Block ¶
func (r CometRPCClient) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error)
func (CometRPCClient) BlockByHash ¶
func (r CometRPCClient) BlockByHash(ctx context.Context, hash []byte) (*coretypes.ResultBlock, error)
func (CometRPCClient) BlockResults ¶
func (r CometRPCClient) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error)
func (CometRPCClient) BlockSearch ¶
func (r CometRPCClient) BlockSearch( ctx context.Context, query string, page, perPage *int, orderBy string, ) (*coretypes.ResultBlockSearch, error)
func (CometRPCClient) BlockchainInfo ¶
func (r CometRPCClient) BlockchainInfo( ctx context.Context, minHeight, maxHeight int64, ) (*coretypes.ResultBlockchainInfo, error)
func (CometRPCClient) BroadcastTxAsync ¶
func (r CometRPCClient) BroadcastTxAsync(ctx context.Context, tx tmtypes.Tx) (*coretypes.ResultBroadcastTx, error)
func (CometRPCClient) BroadcastTxCommit ¶
func (r CometRPCClient) BroadcastTxCommit(ctx context.Context, tx tmtypes.Tx) (*coretypes.ResultBroadcastTxCommit, error)
func (CometRPCClient) BroadcastTxSync ¶
func (r CometRPCClient) BroadcastTxSync(ctx context.Context, tx tmtypes.Tx) (*coretypes.ResultBroadcastTx, error)
func (CometRPCClient) Commit ¶
func (r CometRPCClient) Commit(ctx context.Context, height *int64) (*coretypes.ResultCommit, error)
func (CometRPCClient) DoBroadcastTxAsync ¶
func (r CometRPCClient) DoBroadcastTxAsync(ctx context.Context, tx tmtypes.Tx) (*ResultBroadcastTx, error)
DoBroadcastTxAsync implements ConsensusClient.
func (CometRPCClient) DoBroadcastTxSync ¶
func (r CometRPCClient) DoBroadcastTxSync(ctx context.Context, tx tmtypes.Tx) (*ResultBroadcastTx, error)
DoBroadcastTxSync implements ConsensusClient.
func (CometRPCClient) GetABCIQuery ¶
func (r CometRPCClient) GetABCIQuery(ctx context.Context, queryPath string, data bytes.HexBytes) (*ABCIQueryResponse, error)
GetABCIQuery implements ConsensusClient.
func (CometRPCClient) GetABCIQueryWithOptions ¶
func (r CometRPCClient) GetABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts rpcclient.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)
GetABCIQueryWithOptions implements ConsensusClient.
func (CometRPCClient) GetBlockResults ¶
func (r CometRPCClient) GetBlockResults(ctx context.Context, height uint64) (*BlockResults, error)
GetBlockResults implements ConsensusClient.
func (CometRPCClient) GetBlockSearch ¶
func (r CometRPCClient) GetBlockSearch(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error)
GetBlockSearch implements ConsensusClient.
func (CometRPCClient) GetBlockTime ¶
GetBlock implements ConsensusClient.
func (CometRPCClient) GetCommit ¶
func (r CometRPCClient) GetCommit(ctx context.Context, height uint64) (*coretypes.ResultCommit, error)
GetCommit implements ConsensusClient.
func (CometRPCClient) GetStatus ¶
func (r CometRPCClient) GetStatus(ctx context.Context) (*Status, error)
GetStatus implements ConsensusClient.
func (CometRPCClient) GetTx ¶
func (r CometRPCClient) GetTx(ctx context.Context, hash []byte, prove bool) (*coretypes.ResultTx, error)
GetTx implements ConsensusClient.
func (CometRPCClient) GetTxSearch ¶
func (r CometRPCClient) GetTxSearch(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*ResultTxSearch, error)
GetTxSearch implements ConsensusClient.
func (CometRPCClient) GetValidators ¶
func (r CometRPCClient) GetValidators(ctx context.Context, height *int64, page *int, perPage *int) (*ResultValidators, error)
GetValidators implements ConsensusClient.
func (CometRPCClient) Status ¶
func (r CometRPCClient) Status(ctx context.Context) (*coretypes.ResultStatus, error)
func (CometRPCClient) TxSearch ¶
func (r CometRPCClient) TxSearch( ctx context.Context, query string, prove bool, page, perPage *int, orderBy string, ) (*coretypes.ResultTxSearch, error)
func (CometRPCClient) Validators ¶
func (r CometRPCClient) Validators( ctx context.Context, height *int64, page, perPage *int, ) (*coretypes.ResultValidators, error)
type ConsensusClient ¶
type ConsensusClient interface { GetBlockTime(ctx context.Context, height uint64) (time.Time, error) GetStatus(ctx context.Context) (*Status, error) GetBlockResults(ctx context.Context, height uint64) (*BlockResults, error) GetABCIQuery(ctx context.Context, queryPath string, data bytes.HexBytes) (*ABCIQueryResponse, error) GetValidators( ctx context.Context, height *int64, page, perPage *int, ) (*ResultValidators, error) GetTxSearch( ctx context.Context, query string, prove bool, page, perPage *int, orderBy string, ) (*ResultTxSearch, error) DoBroadcastTxSync(ctx context.Context, tx tmtypes.Tx) (*ResultBroadcastTx, error) DoBroadcastTxAsync(ctx context.Context, tx tmtypes.Tx) (*ResultBroadcastTx, error) GetTx(ctx context.Context, hash []byte, prove bool) (*coretypes.ResultTx, error) GetBlockSearch( ctx context.Context, query string, page, perPage *int, orderBy string, ) (*coretypes.ResultBlockSearch, error) GetCommit(ctx context.Context, height uint64) (*coretypes.ResultCommit, error) GetABCIQueryWithOptions( ctx context.Context, path string, data bytes.HexBytes, opts rpcclient.ABCIQueryOptions, ) (*coretypes.ResultABCIQuery, error) }
TODO(reece): get off cometbft types into internal relayer.
type ResultBroadcastTx ¶
type ResultTxSearch ¶
coretypes.ResultTxSearch