Documentation ¶
Index ¶
- func ParseBlockResp(rawRespReader io.Reader) (*model.Block, *model.RawBlock, error)
- func ParseBlockResultsResp(rawRespReader io.Reader) (*model.BlockResults, error)
- func ParseGenesisResp(rawRespReader io.Reader, strictParsing bool) (*genesis.Genesis, error)
- type GenesisChunkedResp
- type GenesisChunkedRespResult
- type GenesisResp
- type GenesisRespResult
- type HTTPClient
- func (client *HTTPClient) Block(height int64) (*usecase_model.Block, *usecase_model.RawBlock, error)
- func (client *HTTPClient) BlockResults(height int64) (*usecase_model.BlockResults, error)
- func (client *HTTPClient) Genesis() (*genesis.Genesis, error)
- func (client *HTTPClient) GenesisChunked() (*genesis.Genesis, error)
- func (client *HTTPClient) LatestBlockHeight() (int64, error)
- func (client *HTTPClient) SetAuthQueryKV(authKV HTTPClientAuthKV)
- func (client *HTTPClient) Status() (*map[string]interface{}, error)
- type HTTPClientAuthKV
- type RawBlockResp
- type RawBlockResults
- type RawBlockResultsConsensusParamUpdates
- type RawBlockResultsEvent
- type RawBlockResultsEventAttribute
- type RawBlockResultsResp
- type RawBlockResultsTxsResult
- type RawBlockResultsTxsResultLog
- type RawBlockResultsValidatorUpdate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseBlockResp ¶
func ParseBlockResultsResp ¶
func ParseBlockResultsResp(rawRespReader io.Reader) (*model.BlockResults, error)
RawBlockResults related parsing functions
Types ¶
type GenesisChunkedResp ¶ added in v1.5.6
type GenesisChunkedResp struct { Jsonrpc string `json:"jsonrpc"` ID int64 `json:"id"` Result GenesisChunkedRespResult `json:"result"` }
func ParseGenesisChunkedResp ¶ added in v1.5.6
func ParseGenesisChunkedResp(rawRespReader io.Reader, strictParsing bool) (*GenesisChunkedResp, error)
type GenesisChunkedRespResult ¶ added in v1.5.6
type GenesisResp ¶
type GenesisResp struct { Jsonrpc string `json:"jsonrpc"` ID int64 `json:"id"` Result GenesisRespResult `json:"result"` }
type GenesisRespResult ¶
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func NewHTTPClient(tendermintRPCUrl string, strictGenesisParsing bool) *HTTPClient
NewHTTPClient returns a new HTTPClient for tendermint request
func NewInsecureHTTPClient ¶
func NewInsecureHTTPClient(tendermintRPCUrl string, strictGenesisParsing bool) *HTTPClient
NewHTTPClient returns a new HTTPClient for tendermint request
func (*HTTPClient) Block ¶
func (client *HTTPClient) Block(height int64) (*usecase_model.Block, *usecase_model.RawBlock, error)
Block gets the block response with target height
func (*HTTPClient) BlockResults ¶
func (client *HTTPClient) BlockResults(height int64) (*usecase_model.BlockResults, error)
func (*HTTPClient) GenesisChunked ¶ added in v1.5.6
func (client *HTTPClient) GenesisChunked() (*genesis.Genesis, error)
func (*HTTPClient) LatestBlockHeight ¶
func (client *HTTPClient) LatestBlockHeight() (int64, error)
LatestBlockHeight gets the chain's latest block and return the height
func (*HTTPClient) SetAuthQueryKV ¶ added in v1.7.8
func (client *HTTPClient) SetAuthQueryKV(authKV HTTPClientAuthKV)
func (*HTTPClient) Status ¶
func (client *HTTPClient) Status() (*map[string]interface{}, error)
type HTTPClientAuthKV ¶ added in v1.7.8
type RawBlockResp ¶
type RawBlockResp struct { Jsonrpc string `json:"jsonrpc"` ID int `json:"id"` Result usecase_model.RawBlock `json:"result"` }
type RawBlockResults ¶
type RawBlockResults struct { Height string `json:"height"` TxsResults []RawBlockResultsTxsResult `json:"txs_results"` BeginBlockEvents []RawBlockResultsEvent `json:"begin_block_events"` EndBlockEvents []RawBlockResultsEvent `json:"end_block_events"` ValidatorUpdates []RawBlockResultsValidatorUpdate `json:"validator_updates"` ConsensusParamUpdates RawBlockResultsConsensusParamUpdates `json:"consensus_param_updates"` }
type RawBlockResultsConsensusParamUpdates ¶
type RawBlockResultsConsensusParamUpdates struct { Block struct { MaxBytes string `json:"max_bytes"` MaxGas string `json:"max_gas"` } `json:"block"` Evidence struct { MaxAgeNumBlocks string `json:"max_age_num_blocks"` MaxAgeDuration string `json:"max_age_duration"` MaxBytes string `json:"max_bytes"` } `json:"evidence"` Validator struct { PubKeyTypes []string `json:"pub_key_types"` } `json:"validator"` }
type RawBlockResultsEvent ¶
type RawBlockResultsEvent struct { Type string `json:"type"` Attributes []RawBlockResultsEventAttribute `json:"attributes"` }
type RawBlockResultsResp ¶
type RawBlockResultsResp struct { Jsonrpc string `json:"jsonrpc"` ID int `json:"id"` Result RawBlockResults `json:"result"` }
type RawBlockResultsTxsResultLog ¶
type RawBlockResultsTxsResultLog struct { MaybeMsgIndex *int `json:"msg_index"` Events []RawBlockResultsEvent `json:"events"` }
Click to show internal directories.
Click to hide internal directories.