core_types

package
v0.0.0-...-7c12c5a Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2015 License: GPL-2.0, GPL-3.0 Imports: 4 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
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Peer

type Peer struct {
	types.NodeInfo `json:"node_info"`
	IsOutbound     bool `json:"is_outbound"`
}

type Receipt

type Receipt struct {
	TxHash          []byte `json:"tx_hash"`
	CreatesContract uint8  `json:"creates_contract"`
	ContractAddr    []byte `json:"contract_addr"`
}

type Response

type Response struct {
	JSONRPC string `json:"jsonrpc"`
	ID      string `json:"id"`
	Result  Result `json:"result"`
	Error   string `json:"error"`
}

type Result

type Result interface{}

type ResultBlockchainInfo

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

type ResultBroadcastTx

type ResultBroadcastTx struct {
	Receipt Receipt `json:"receipt"`
}

type ResultCall

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

type ResultDumpConsensusState

type ResultDumpConsensusState struct {
	RoundState      string   `json:"round_state"`
	PeerRoundStates []string `json:"peer_round_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  types.EventData `json:"data"`
}

type ResultGenPrivAccount

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

type ResultGenesis

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

type ResultGetAccount

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

type ResultGetBlock

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

type ResultGetName

type ResultGetName struct {
	Entry *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       []*types.NameRegEntry `json:"names"`
}

type ResultListUnconfirmedTxs

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

type ResultListValidators

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

type ResultNetInfo

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

type ResultSignTx

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

type ResultStatus

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

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