rpc

package
v0.45.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockCommand added in v0.18.0

func BlockCommand() *cobra.Command

BlockCommand returns the verified block data for a given heights

func BlockRequestHandlerFn added in v0.16.0

func BlockRequestHandlerFn(clientCtx client.Context) http.HandlerFunc

REST handler to get a block

func GetChainHeight

func GetChainHeight(clientCtx client.Context) (int64, error)

get the current blockchain height

func LatestBlockRequestHandlerFn added in v0.16.0

func LatestBlockRequestHandlerFn(clientCtx client.Context) http.HandlerFunc

REST handler to get the latest block

func LatestValidatorSetRequestHandlerFn added in v0.16.0

func LatestValidatorSetRequestHandlerFn(clientCtx client.Context) http.HandlerFunc

Latest Validator Set REST handler

func NodeInfoRequestHandlerFn added in v0.16.0

func NodeInfoRequestHandlerFn(clientCtx client.Context) http.HandlerFunc

REST handler for node info

func NodeSyncingRequestHandlerFn added in v0.16.0

func NodeSyncingRequestHandlerFn(clientCtx client.Context) http.HandlerFunc

REST handler for node syncing

func RegisterRoutes

func RegisterRoutes(clientCtx client.Context, r *mux.Router)

Register REST endpoints.

func StatusCommand added in v0.27.0

func StatusCommand() *cobra.Command

StatusCommand returns the command to return the status of the network.

func ValidatorCommand added in v0.18.0

func ValidatorCommand() *cobra.Command

ValidatorCommand returns the validator set for a given height

func ValidatorSetRequestHandlerFn added in v0.16.0

func ValidatorSetRequestHandlerFn(clientCtx client.Context) http.HandlerFunc

Validator Set at a height REST handler

Types

type NodeInfoResponse added in v0.45.10

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 added in v0.19.0

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 added in v0.31.0

func (rvo ResultValidatorsOutput) String() string

type SyncingResponse added in v0.45.10

type SyncingResponse struct {
	Syncing bool `json:"syncing"`
}

SyncingResponse defines a response type that contains node syncing information.

type ValidatorOutput added in v0.19.0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL