types

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResultTypeGetStorage         = byte(0x01)
	ResultTypeCall               = byte(0x02)
	ResultTypeListAccounts       = byte(0x03)
	ResultTypeDumpStorage        = byte(0x04)
	ResultTypeBlockchainInfo     = byte(0x05)
	ResultTypeGetBlock           = byte(0x06)
	ResultTypeStatus             = byte(0x07)
	ResultTypeNetInfo            = byte(0x08)
	ResultTypeListValidators     = byte(0x09)
	ResultTypeDumpConsensusState = byte(0x0A)
	ResultTypeListNames          = byte(0x0B)
	ResultTypeGenPrivAccount     = byte(0x0C)
	ResultTypeGetAccount         = byte(0x0D)
	ResultTypeBroadcastTx        = byte(0x0E)
	ResultTypeListUnconfirmedTxs = byte(0x0F)
	ResultTypeGetName            = byte(0x10)
	ResultTypeGenesis            = byte(0x11)
	ResultTypeSignTx             = byte(0x12)
	ResultTypeEvent              = byte(0x13) // so websockets can respond to rpc functions
	ResultTypeSubscribe          = byte(0x14)
	ResultTypeUnsubscribe        = byte(0x15)
	ResultTypePeerConsensusState = byte(0x16)
	ResultTypeChainId            = byte(0x17)
)

Variables

This section is empty.

Functions

func ConcreteTypes

func ConcreteTypes() []wire.ConcreteType

func UnwrapResultDumpStorage

func UnwrapResultDumpStorage(result *ResultDumpStorage) *types.Storage

UnwrapResultDumpStorage does a deep copy to remove /rpc/tendermint/core/types and expose /core/types instead. This is largely an artefact to be removed once go-wire and go-rpc are deprecated. This is not an efficient code, especially given Storage can be big.

Types

type BurrowResult added in v0.16.2

type BurrowResult interface {
	rpctypes.Result
}

type ResultBlockchainInfo

type ResultBlockchainInfo struct {
	LastHeight int                           `json:"last_height"`
	BlockMetas []*tendermint_types.BlockMeta `json:"block_metas"`
}

type ResultBroadcastTx

type ResultBroadcastTx struct {
	Code abcitypes.CodeType `json:"code"`
	Data []byte             `json:"data"`
	Log  string             `json:"log"`
}

type ResultCall

type ResultCall struct {
	Return  []byte `json:"return"`
	GasUsed int64  `json:"gas_used"`
}

type ResultChainId

type ResultChainId struct {
	ChainName   string `json:"chain_name"`
	ChainId     string `json:"chain_id"`
	GenesisHash []byte `json:"genesis_hash"`
}

type ResultDumpConsensusState

type ResultDumpConsensusState struct {
	ConsensusState      *consensus_types.ConsensusState `json:"consensus_state"`
	PeerConsensusStates []*ResultPeerConsensusState     `json:"peer_consensus_states"`
}

type ResultDumpStorage

type ResultDumpStorage struct {
	StorageRoot  []byte        `json:"storage_root"`
	StorageItems []StorageItem `json:"storage_items"`
}

type ResultEvent

type ResultEvent struct {
	Event string        `json:"event"`
	Data  txs.EventData `json:"data"`
}

type ResultGenPrivAccount

type ResultGenPrivAccount struct {
	PrivAccount *acm.PrivAccount `json:"priv_account"`
}

type ResultGenesis

type ResultGenesis struct {
	Genesis *genesis.GenesisDoc `json:"genesis"`
}

type ResultGetAccount

type ResultGetAccount struct {
	Account *acm.Account `json:"account"`
}

type ResultGetBlock

type ResultGetBlock struct {
	BlockMeta *tendermint_types.BlockMeta `json:"block_meta"`
	Block     *tendermint_types.Block     `json:"block"`
}

type ResultGetName

type ResultGetName struct {
	Entry *core_types.NameRegEntry `json:"entry"`
}

type ResultGetStorage

type ResultGetStorage struct {
	Key   []byte `json:"key"`
	Value []byte `json:"value"`
}

type ResultListAccounts

type ResultListAccounts struct {
	BlockHeight int            `json:"block_height"`
	Accounts    []*acm.Account `json:"accounts"`
}

type ResultListNames

type ResultListNames struct {
	BlockHeight int                        `json:"block_height"`
	Names       []*core_types.NameRegEntry `json:"names"`
}

type ResultListUnconfirmedTxs

type ResultListUnconfirmedTxs struct {
	N   int      `json:"n_txs"`
	Txs []txs.Tx `json:"txs"`
}

type ResultListValidators

type ResultListValidators struct {
	BlockHeight         int                         `json:"block_height"`
	BondedValidators    []consensus_types.Validator `json:"bonded_validators"`
	UnbondingValidators []consensus_types.Validator `json:"unbonding_validators"`
}

type ResultNetInfo

type ResultNetInfo struct {
	Listening bool                    `json:"listening"`
	Listeners []string                `json:"listeners"`
	Peers     []*consensus_types.Peer `json:"peers"`
}

type ResultPeerConsensusState

type ResultPeerConsensusState struct {
	PeerKey            string `json:"peer_key"`
	PeerConsensusState string `json:"peer_consensus_state"`
}

type ResultSignTx

type ResultSignTx struct {
	Tx txs.Tx `json:"tx"`
}

type ResultStatus

type ResultStatus struct {
	NodeInfo          *p2p.NodeInfo `json:"node_info"`
	GenesisHash       []byte        `json:"genesis_hash"`
	PubKey            crypto.PubKey `json:"pub_key"`
	LatestBlockHash   []byte        `json:"latest_block_hash"`
	LatestBlockHeight int           `json:"latest_block_height"`
	LatestBlockTime   int64         `json:"latest_block_time"` // nano
}

type ResultSubscribe

type ResultSubscribe struct {
	Event          string `json:"event"`
	SubscriptionId string `json:"subscription_id"`
}

type ResultUnsubscribe

type ResultUnsubscribe struct {
	SubscriptionId string `json:"subscription_id"`
}

type StorageItem

type StorageItem struct {
	Key   []byte `json:"key"`
	Value []byte `json:"value"`
}

Jump to

Keyboard shortcuts

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