Documentation ¶
Index ¶
- func BlockRequestHandlerFn(clientCtx context.Context) http.HandlerFunc
- func GetChainHeight(clientCtx context.Context) (int64, error)
- func LatestBlockRequestHandlerFn(ctx context.Context) http.HandlerFunc
- func LatestValidatorSetRequestHandlerFn(clientCtx context.Context) http.HandlerFunc
- func NodeInfoRequestHandlerFn(ctx context.Context) http.HandlerFunc
- func NodeSyncingRequestHandlerFn(ctx context.Context) http.HandlerFunc
- func RegisterRoutes(cliCtx context.Context, r *mux.Router)
- func ValidatorSetRequestHandlerFn(clientCtx context.Context) http.HandlerFunc
- type NodeInfoResponse
- type ResultValidatorsOutput
- type SyncingResponse
- type ValidatorOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockRequestHandlerFn ¶
func BlockRequestHandlerFn(clientCtx context.Context) http.HandlerFunc
REST handler to get a block
func GetChainHeight ¶
get the current blockchain height
func LatestBlockRequestHandlerFn ¶
func LatestBlockRequestHandlerFn(ctx context.Context) http.HandlerFunc
REST handler to get the latest block
func LatestValidatorSetRequestHandlerFn ¶
func LatestValidatorSetRequestHandlerFn(clientCtx context.Context) http.HandlerFunc
Latest Validator Set REST handler
func NodeInfoRequestHandlerFn ¶
func NodeInfoRequestHandlerFn(ctx context.Context) http.HandlerFunc
func NodeSyncingRequestHandlerFn ¶
func NodeSyncingRequestHandlerFn(ctx context.Context) http.HandlerFunc
func ValidatorSetRequestHandlerFn ¶
func ValidatorSetRequestHandlerFn(clientCtx context.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"` }
type ResultValidatorsOutput ¶
type ResultValidatorsOutput struct { BlockHeight int64 `json:"block_height"` Validators []ValidatorOutput `json:"validators"` }
Validators at a certain height output in bech32 format
func GetValidators ¶
func GetValidators(clientCtx context.Context, height *int64, page, limit *int) (ResultValidatorsOutput, error)
GetValidators from client
type SyncingResponse ¶
type SyncingResponse struct {
Syncing bool `json:"syncing"`
}
type ValidatorOutput ¶
type ValidatorOutput struct { Address sdk.AccAddress `json:"address"` PubKey crypto.PubKey `json:"pub_key"` ProposerPriority int64 `json:"proposer_priority"` VotingPower int64 `json:"voting_power"` }
Validator output in bech32 format
Click to show internal directories.
Click to hide internal directories.