node

package
v0.0.0-...-037f8d0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	ChainID   string
	Rpc       rpcclient.Client
	Cdc       *codec.Codec
	TxEncoder sdk.TxEncoder
}

func NewNode

func NewNode(chainID, url string, cdc *codec.Codec) *Node

func (*Node) Broadcast

func (node *Node) Broadcast(signedTxBytes []byte) (*ctypes.ResultBroadcastTxCommit, error)

func (*Node) GetAccountWithHeight

func (node *Node) GetAccountWithHeight(cdc *codec.Codec, addr sdk.AccAddress) (exported.Account, error)

func (*Node) GetLatestHeight

func (node *Node) GetLatestHeight() (int64, error)

func (*Node) QueryValiatorList

func (node *Node) QueryValiatorList(page, limit int, status string) ([]*Validator, error)

type Validator

type Validator struct {
	Counter         int64          `json:"counter"`
	OperatorAddr    sdk.ValAddress `json:"operator_addr"`
	ConsensusAddr   cmn.HexBytes   `json:"consensus_addr"`
	ConsensusPubKey crypto.PubKey  `json:"consensus_pub_key"`
}

Jump to

Keyboard shortcuts

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