Documentation ¶
Index ¶
- func AddCommands(cmd *cobra.Command)
- func BlockCommand() *cobra.Command
- func BlockRequestHandlerFn(ctx context.CoreContext) http.HandlerFunc
- func GetChainHeight(ctx context.CoreContext) (int64, error)
- func LatestBlockRequestHandlerFn(ctx context.CoreContext) http.HandlerFunc
- func LatestValidatorSetRequestHandlerFn(ctx context.CoreContext) http.HandlerFunc
- func NodeInfoRequestHandlerFn(ctx context.CoreContext) http.HandlerFunc
- func NodeSyncingRequestHandlerFn(ctx context.CoreContext) http.HandlerFunc
- func RegisterRoutes(ctx context.CoreContext, r *mux.Router)
- func ValidatorCommand() *cobra.Command
- func ValidatorSetRequestHandlerFn(ctx context.CoreContext) http.HandlerFunc
- type ResultValidatorsOutput
- type ValidatorOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCommands ¶
AddCommands adds a number of rpc-related subcommands
func BlockCommand ¶ added in v0.26.0
BlockCommand returns the verified block data for a given heights
func BlockRequestHandlerFn ¶ added in v0.26.0
func BlockRequestHandlerFn(ctx context.CoreContext) http.HandlerFunc
REST handler to get a block
func GetChainHeight ¶
func GetChainHeight(ctx context.CoreContext) (int64, error)
get the current blockchain height
func LatestBlockRequestHandlerFn ¶ added in v0.26.0
func LatestBlockRequestHandlerFn(ctx context.CoreContext) http.HandlerFunc
REST handler to get the latest block
func LatestValidatorSetRequestHandlerFn ¶ added in v0.26.0
func LatestValidatorSetRequestHandlerFn(ctx context.CoreContext) http.HandlerFunc
Latest Validator Set REST handler
func NodeInfoRequestHandlerFn ¶ added in v0.26.0
func NodeInfoRequestHandlerFn(ctx context.CoreContext) http.HandlerFunc
REST handler for node info
func NodeSyncingRequestHandlerFn ¶ added in v0.26.0
func NodeSyncingRequestHandlerFn(ctx context.CoreContext) http.HandlerFunc
REST handler for node syncing
func RegisterRoutes ¶
func RegisterRoutes(ctx context.CoreContext, r *mux.Router)
Register REST endpoints
func ValidatorCommand ¶ added in v0.26.0
ValidatorCommand returns the validator set for a given height
func ValidatorSetRequestHandlerFn ¶ added in v0.26.0
func ValidatorSetRequestHandlerFn(ctx context.CoreContext) http.HandlerFunc
Validator Set at a height REST handler
Types ¶
type ResultValidatorsOutput ¶ added in v0.26.0
type ResultValidatorsOutput struct { BlockHeight int64 `json:"block_height"` Validators []ValidatorOutput `json:"validators"` }
Validators at a certain height output in bech32 format
type ValidatorOutput ¶ added in v0.26.0
type ValidatorOutput struct { Address sdk.ValAddress `json:"address"` // in bech32 PubKey string `json:"pub_key"` // in bech32 Accum int64 `json:"accum"` VotingPower int64 `json:"voting_power"` }
Validator output in bech32 format
Click to show internal directories.
Click to hide internal directories.