rpc

package
v0.32.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: Apache-2.0 Imports: 18 Imported by: 2,179

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockCommand

func BlockCommand() *cobra.Command

BlockCommand returns the verified block data for a given heights

func BlockRequestHandlerFn

func BlockRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

REST handler to get a block

func CLIVersionRequestHandler added in v0.30.0

func CLIVersionRequestHandler(w http.ResponseWriter, r *http.Request)

cli version REST handler endpoint

func GetChainHeight

func GetChainHeight(cliCtx context.CLIContext) (int64, error)

get the current blockchain height

func LatestBlockRequestHandlerFn

func LatestBlockRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

REST handler to get the latest block

func LatestValidatorSetRequestHandlerFn

func LatestValidatorSetRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

Latest Validator Set REST handler

func NodeInfoRequestHandlerFn

func NodeInfoRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

REST handler for node info

func NodeSyncingRequestHandlerFn

func NodeSyncingRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

REST handler for node syncing

func NodeVersionRequestHandler added in v0.30.0

func NodeVersionRequestHandler(cliCtx context.CLIContext) http.HandlerFunc

connected node version REST handler endpoint

func RegisterRoutes added in v0.2.0

func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router)

Register REST endpoints

func StatusCommand

func StatusCommand() *cobra.Command

StatusCommand returns the status of the network

func ValidatorCommand

func ValidatorCommand(cdc *codec.Codec) *cobra.Command

ValidatorCommand returns the validator set for a given height

func ValidatorSetRequestHandlerFn

func ValidatorSetRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

Validator Set at a height REST handler

Types

type ResultValidatorsOutput

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

Validators at a certain height output in bech32 format

func (ResultValidatorsOutput) String

func (rvo ResultValidatorsOutput) String() string

type ValidatorOutput

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

Jump to

Keyboard shortcuts

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