cosmos-sdk: github.com/cosmos/cosmos-sdk/client/rpc Index | Files

package rpc

import "github.com/cosmos/cosmos-sdk/client/rpc"

Index

Package Files

block.go routes.go status.go validators.go

func BlockCommand Uses

func BlockCommand() *cobra.Command

BlockCommand returns the verified block data for a given heights

func BlockRequestHandlerFn Uses

func BlockRequestHandlerFn(clientCtx client.Context) http.HandlerFunc

REST handler to get a block

func GetChainHeight Uses

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

get the current blockchain height

func LatestBlockRequestHandlerFn Uses

func LatestBlockRequestHandlerFn(clientCtx client.Context) http.HandlerFunc

REST handler to get the latest block

func LatestValidatorSetRequestHandlerFn Uses

func LatestValidatorSetRequestHandlerFn(clientCtx client.Context) http.HandlerFunc

Latest Validator Set REST handler

func NodeInfoRequestHandlerFn Uses

func NodeInfoRequestHandlerFn(clientCtx client.Context) http.HandlerFunc

REST handler for node info

func NodeSyncingRequestHandlerFn Uses

func NodeSyncingRequestHandlerFn(clientCtx client.Context) http.HandlerFunc

REST handler for node syncing

func RegisterRoutes Uses

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

Register REST endpoints.

func StatusCommand Uses

func StatusCommand() *cobra.Command

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

func ValidatorCommand Uses

func ValidatorCommand() *cobra.Command

ValidatorCommand returns the validator set for a given height

func ValidatorSetRequestHandlerFn Uses

func ValidatorSetRequestHandlerFn(clientCtx client.Context) http.HandlerFunc

Validator Set at a height REST handler

type NodeInfoResponse Uses

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 Uses

type ResultValidatorsOutput struct {
    BlockHeight int64             `json:"block_height"`
    Validators  []ValidatorOutput `json:"validators"`
}

Validators at a certain height output in bech32 format

func GetValidators Uses

func GetValidators(clientCtx client.Context, height *int64, page, limit *int) (ResultValidatorsOutput, error)

GetValidators from client

func (ResultValidatorsOutput) String Uses

func (rvo ResultValidatorsOutput) String() string

type SyncingResponse Uses

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

SyncingResponse defines a response type that contains node syncing information.

type ValidatorOutput Uses

type ValidatorOutput struct {
    Address          sdk.ConsAddress `json:"address"`
    PubKey           string          `json:"pub_key"`
    ProposerPriority int64           `json:"proposer_priority"`
    VotingPower      int64           `json:"voting_power"`
}

Validator output in bech32 format

Package rpc imports 19 packages (graph) and is imported by 28 packages. Updated 2020-11-19. Refresh now. Tools for package owners.