base

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: MIT Imports: 3 Imported by: 0

README

Cosmos/Tendermint base

Usage

(Query) Node info
// Query node info
res, err = xplac.NodeInfo().Query()
(Query) Syncing
// Query syncing
res, err = xplac.Syncing().Query()
(Query) Blocks
// Query latest block info
res, err = xplac.Block().Query()

// Query block info by height
blockMsg := types.BlockMsg{
    Height: "1",
}
res, err = xplac.Block(blockMsg).Query()
(Query) Validator set
// Query latest validator set
res, err = xplac.ValidatorSet().Query()

// QUery validator set by height
validatorSetMsg := types.ValidatorSetMsg{
    Height: "1",
}
res, err = xplac.ValidatorSet(validatorSetMsg).Query()

Documentation

Index

Constants

View Source
const (
	Base                            = "base"
	BaseNodeInfoMsgType             = "base-node-info"
	BaseSyncingMsgType              = "base-syncing"
	BaseLatestBlockMsgtype          = "base-latest-block"
	BaseBlockByHeightMsgType        = "base-block-by-height"
	BaseLatestValidatorSetMsgType   = "base-latest-validator-set"
	BaseValidatorSetByHeightMsgType = "base-validator-set-by-height"
)

Variables

This section is empty.

Functions

func MakeBaseBlockByHeightMsg

func MakeBaseBlockByHeightMsg(blockMsg types.BlockMsg) (tmservice.GetBlockByHeightRequest, error)

(Query) make msg - get block by height

func MakeBaseLatestBlockMsg

func MakeBaseLatestBlockMsg() (tmservice.GetLatestBlockRequest, error)

(Query) make msg - latest block

func MakeBaseNodeInfoMsg

func MakeBaseNodeInfoMsg() (tmservice.GetNodeInfoRequest, error)

(Query) make msg - node info

func MakeBaseSyncingMsg

func MakeBaseSyncingMsg() (tmservice.GetSyncingRequest, error)

(Query) make msg - syncing

func MakeLatestValidatorSetMsg

func MakeLatestValidatorSetMsg() (tmservice.GetLatestValidatorSetRequest, error)

(Query) make msg - latest validator set

func MakeValidatorSetByHeightMsg

func MakeValidatorSetByHeightMsg(validatorSetMsg types.ValidatorSetMsg) (tmservice.GetValidatorSetByHeightRequest, error)

(Query) make msg - latest validator set

Types

This section is empty.

Jump to

Keyboard shortcuts

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