base

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 9 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

func NewCoreModule added in v0.1.2

func NewCoreModule() core.CoreModule

func QueryBase

func QueryBase(i core.QueryClient) (string, error)

Query client for bank module.

Types

type BaseExternal added in v0.1.2

type BaseExternal struct {
	Xplac provider.XplaClient
}

func NewBaseExternal added in v0.1.2

func NewBaseExternal(xplac provider.XplaClient) (e BaseExternal)

func (BaseExternal) Block added in v0.1.2

func (e BaseExternal) Block(blockMsg ...types.BlockMsg) provider.XplaClient

Query block

func (BaseExternal) NodeInfo added in v0.1.2

func (e BaseExternal) NodeInfo() provider.XplaClient

Query node info

func (BaseExternal) Syncing added in v0.1.2

func (e BaseExternal) Syncing() provider.XplaClient

Query syncing

func (BaseExternal) ValidatorSet added in v0.1.2

func (e BaseExternal) ValidatorSet(validatorSetMsg ...types.ValidatorSetMsg) provider.XplaClient

Query validator set

Jump to

Keyboard shortcuts

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