rpc

package
v1.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeStatus

type NodeStatus struct {
	NodeInfo p2p.DefaultNodeInfo `json:"node_info"`
	SyncInfo tmrpctypes.SyncInfo `json:"sync_info"`
}

type RpcClient

type RpcClient interface {
	BroadcastTx(broadcastType string, tx tmtypes.Tx) (types.BroadcastTxResult, error)
	GetNodeStatus() (NodeStatus, error)
	GetTx(hash string) (Tx, error)
	GetBlock(height int64) (*tmrpctypes.ResultBlock, error)
	Subscribe(ctx context.Context, subscriber, query string) (out <-chan tmrpctypes.ResultEvent, err error)
	UnSubscribe(ctx context.Context, subscriber, query string) error
	UnSubscribeAll(ctx context.Context, subscriber string) error
	Start() error
}

func NewClient

func NewClient(nodeUrl string) RpcClient

type Tx

type Tx struct {
	Hash     string                 `json:"hash"`
	Height   int64                  `json:"height"`
	Index    uint32                 `json:"index"`
	TxResult abci.ResponseDeliverTx `json:"tx_result"`
	StdTx    auth.StdTx             `json:"std_tx"`
	Proof    types.TxProof          `json:"proof,omitempty"`
}

Jump to

Keyboard shortcuts

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