Documentation ¶
Index ¶
- func BlockCommand() *cobra.Command
- func BlockRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
- func GetChainHeight(clientCtx client.Context) (int64, error)
- func LatestBlockRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
- func LatestValidatorSetRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
- func NodeInfoRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
- func NodeSyncingRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
- func RegisterRoutes(clientCtx client.Context, r *mux.Router)
- func StatusCommand() *cobra.Command
- func ValidatorCommand() *cobra.Command
- func ValidatorSetRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
- type NodeInfoResponse
- type ResultValidatorsOutput
- type SyncingResponse
- type ValidatorOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockCommand ¶
BlockCommand returns the verified block data for a given heights
func BlockRequestHandlerFn ¶
func BlockRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
REST handler to get a block
func GetChainHeight ¶
get the current blockchain height
func LatestBlockRequestHandlerFn ¶
func LatestBlockRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
REST handler to get the latest block
func LatestValidatorSetRequestHandlerFn ¶
func LatestValidatorSetRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
Latest Validator Set REST handler
func NodeInfoRequestHandlerFn ¶
func NodeInfoRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
REST handler for node info
func NodeSyncingRequestHandlerFn ¶
func NodeSyncingRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
REST handler for node syncing
func RegisterRoutes ¶ added in v0.2.0
Register REST endpoints.
func StatusCommand ¶
StatusCommand returns the command to return the status of the network.
func ValidatorCommand ¶
ValidatorCommand returns the validator set for a given height
func ValidatorSetRequestHandlerFn ¶
func ValidatorSetRequestHandlerFn(clientCtx client.Context) http.HandlerFunc
Validator Set at a height REST handler
Types ¶
type NodeInfoResponse ¶
type NodeInfoResponse struct { p2p.DefaultNodeInfo `json:"node_info"` ApplicationVersion version.Info `json:"application_version"` }
NodeInfoResponse defines a response type that contains node status and version information.
type ResultValidatorsOutput ¶
type ResultValidatorsOutput struct { BlockHeight int64 `json:"block_height"` Validators []ValidatorOutput `json:"validators"` Total uint64 `json:"total"` }
Validators at a certain height output in bech32 format
func GetValidators ¶
func GetValidators(ctx context.Context, clientCtx client.Context, height *int64, page, limit *int) (ResultValidatorsOutput, error)
GetValidators from client
func (ResultValidatorsOutput) String ¶
func (rvo ResultValidatorsOutput) String() string
type SyncingResponse ¶
type SyncingResponse struct {
Syncing bool `json:"syncing"`
}
SyncingResponse defines a response type that contains node syncing information.
type ValidatorOutput ¶
type ValidatorOutput struct { Address sdk.ConsAddress `json:"address"` PubKey cryptotypes.PubKey `json:"pub_key"` ProposerPriority int64 `json:"proposer_priority"` VotingPower int64 `json:"voting_power"` }
Validator output