Documentation ¶
Index ¶
- func RegisterAmino()
- type Backend
- type BalanceRecordsWithBlockHeight
- type ITX
- type Node
- type Peer
- type PeerStateInfo
- type QuickRPCBlock
- type RPCBalanceRecord
- type RPCBlock
- type RPCBlockBalanceRecords
- type RPCBlockUTXO
- type RPCKey
- type RPCOutput
- type RPCTx
- type RPCTxBalanceRecords
- type ReceiptsWithBlockHeight
- type ResultBlock
- type ResultBlockHeader
- type ResultConsensusState
- type ResultDumpConsensusState
- type ResultNetInfo
- type ResultStatus
- type ResultValidators
- type SendSpecTxArgs
- type SendTxArgs
- type SignTransactionResult
- type SyncInfo
- type TxRecordReq
- type Txs
- type ValidatorInfo
- type WholeBlock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAmino ¶
func RegisterAmino()
Types ¶
type BalanceRecordsWithBlockHeight ¶
type BalanceRecordsWithBlockHeight struct { BlockHeight uint64 `json:"height"` BlockBalanceRecords *types.BlockBalanceRecords `json:"block_balance_records"` }
func NewBalanceRecordsWithBlockMsg ¶
func NewBalanceRecordsWithBlockMsg(blockHeight uint64, bbr *types.BlockBalanceRecords) *BalanceRecordsWithBlockHeight
type Peer ¶
type Peer struct { p2p.NodeInfo `json:"node_info"` IsOutbound bool `json:"is_outbound"` ConnectionStatus p2p.ConnectionStatus `json:"connection_status"` }
type PeerStateInfo ¶
type PeerStateInfo struct { NodeAddress string `json:"node_address"` PeerState json.RawMessage `json:"peer_state"` }
type QuickRPCBlock ¶ added in v0.1.1
type RPCBalanceRecord ¶
type RPCBalanceRecord struct { From common.Address `json:"from"` To common.Address `json:"to"` FromAddressType hexutil.Uint `json:"from_address_type"` ToAddressType hexutil.Uint `json:"to_address_type"` Type string `json:"type"` TokenID common.Address `json:"token_id"` Amount *hexutil.Big `json:"amount"` }
type RPCBlock ¶
type RPCBlock struct { Height *hexutil.Big `json:"number"` Hash *common.Hash `json:"hash"` Coinbase *common.Address `json:"miner"` Time *hexutil.Big `json:"timestamp"` ParentHash common.Hash `json:"parentHash"` DataHash common.Hash `json:"transactionsRoot"` StateHash common.Hash `json:"stateRoot"` ReceiptHash common.Hash `json:"receiptsRoot"` GasLimit hexutil.Uint64 `json:"gasLimit"` GasUsed hexutil.Uint64 `json:"gasUsed"` Bloom types.Bloom `json:"logsBloom"` Txs Txs `json:"transactions"` TokenOutputSeqs map[string]int64 `json:"token_output_seqs"` }
func NewRPCBlock ¶
NewRPCBlock converts the given block to the RPC output which depends on fullTx. If inclTx is true transactions are returned. When fullTx is true the returned block contains full transaction details, otherwise it will only contain transaction hashes.
type RPCBlockBalanceRecords ¶
type RPCBlockBalanceRecords struct { BlockTime hexutil.Uint64 `json:"block_time"` BlockHash common.Hash `json:"block_hash"` TxRecords []*RPCTxBalanceRecords `json:"tx_records"` }
func NewRPCBlockBalanceRecord ¶
func NewRPCBlockBalanceRecord(bbr *types.BlockBalanceRecords) *RPCBlockBalanceRecords
type RPCBlockUTXO ¶ added in v0.1.2
type RPCBlockUTXO struct { Height hexutil.Uint64 `json:"number"` Hash *common.Hash `json:"hash"` Time hexutil.Uint64 `json:"timestamp"` ParentHash common.Hash `json:"parentHash"` Txs Txs `json:"transactions"` TokenOutputSeqs map[string]int64 `json:"token_output_seqs"` }
func NewRPCBlockUTXO ¶
func NewRPCBlockUTXO(b *types.Block, inclTx bool, fullTx bool, tokenOutputSeqs map[string]int64) *RPCBlockUTXO
NewRPCBlockUTXO converts the given block to the RPC output which depends on fullTx. If inclTx is true transactions are returned. When fullTx is true the returned block contains full transaction details, otherwise it will only contain transaction hashes. only return utxo txs.
type RPCTx ¶
type RPCTx struct { TxType string `json:"txType"` TxHash common.Hash `json:"txHash"` SignHash *common.Hash `json:"signHash,omitempty"` From *common.Address `json:"from,omitempty"` Tx types.Tx `json:"tx"` TxEntry *types.TxEntry `json:"txEntry,omitempty"` }
func NewRPCTx ¶
NewRPCTx returns a tx that will serialize to the RPC representation, with the given location metadata set (if available).
func (RPCTx) MarshalJSON ¶
func (*RPCTx) UnmarshalJSON ¶
type RPCTxBalanceRecords ¶
type RPCTxBalanceRecords struct { Hash common.Hash `json:"hash"` Type string `json:"type"` Records []RPCBalanceRecord `json:"records"` Payloads []*hexutil.Bytes `json:"payloads"` Nonce hexutil.Uint64 `json:"nonce"` GasLimit hexutil.Uint64 `json:"gas_limit"` GasPrice *hexutil.Big `json:"gas_price"` From common.Address `json:"from"` To common.Address `json:"to"` TokenId common.Address `json:"token_id"` }
type ReceiptsWithBlockHeight ¶
type ReceiptsWithBlockHeight struct { BlockHeight uint64 `json:"height"` Receipts types.Receipts `json:"receipts"` }
func NewReceiptsWithBlockHeight ¶
func NewReceiptsWithBlockHeight(blockHeight uint64, receipts types.Receipts) *ReceiptsWithBlockHeight
type ResultBlock ¶
type ResultBlock struct { BlockMeta *types.BlockMeta `json:"block_meta"` Block *types.Block `json:"block"` }
Single block (with meta)
func (ResultBlock) MarshalJSON ¶
func (r ResultBlock) MarshalJSON() ([]byte, error)
func (*ResultBlock) UnmarshalJSON ¶
func (r *ResultBlock) UnmarshalJSON(input []byte) error
type ResultBlockHeader ¶
func (ResultBlockHeader) MarshalJSON ¶
func (b ResultBlockHeader) MarshalJSON() ([]byte, error)
type ResultConsensusState ¶
type ResultConsensusState struct {
RoundState json.RawMessage `json:"round_state"`
}
UNSTABLE
type ResultDumpConsensusState ¶
type ResultDumpConsensusState struct { RoundState json.RawMessage `json:"round_state"` Peers []PeerStateInfo `json:"peers"` }
type ResultNetInfo ¶
type ResultNetInfo struct { Listening bool `json:"listening"` Listeners []string `json:"listeners"` NPeers int `json:"n_peers"` Peers []Peer `json:"peers"` DHTPeers []Node `json:"dht_peers"` }
Info about peer connections
func (ResultNetInfo) MarshalJSON ¶
func (r ResultNetInfo) MarshalJSON() ([]byte, error)
type ResultStatus ¶
type ResultStatus struct { NodeInfo p2p.NodeInfo `json:"node_info"` SyncInfo SyncInfo `json:"sync_info"` ValidatorInfo ValidatorInfo `json:"validator_info"` }
Node Status
func (ResultStatus) MarshalJSON ¶
func (s ResultStatus) MarshalJSON() ([]byte, error)
func (*ResultStatus) TxIndexEnabled ¶
func (s *ResultStatus) TxIndexEnabled() bool
Is TxIndexing enabled
type ResultValidators ¶
type ResultValidators struct { BlockHeight uint64 `json:"block_height"` LastHeightChanged uint64 `json:"last_changed_height"` Validators []*types.Validator `json:"validators"` }
func (ResultValidators) MarshalJSON ¶
func (r ResultValidators) MarshalJSON() ([]byte, error)
func (*ResultValidators) UnmarshalJSON ¶
func (r *ResultValidators) UnmarshalJSON(input []byte) error
type SendSpecTxArgs ¶
type SendSpecTxArgs struct { Args json.RawMessage `json:"args"` TxType string `json:"type"` Signers []common.Address `json:"signers"` }
func (SendSpecTxArgs) ToTransaction ¶
func (args SendSpecTxArgs) ToTransaction() (types.Tx, error)
type SendTxArgs ¶
type SendTxArgs struct { From common.Address `json:"from"` TokenAddress common.Address `json:"tokenAddress"` To *common.Address `json:"to"` Gas *hexutil.Uint64 `json:"gas"` GasPrice *hexutil.Big `json:"gasPrice"` Value *hexutil.Big `json:"value"` Nonce *hexutil.Uint64 `json:"nonce"` // We accept "data" and "input" for backwards-compatibility reasons. "input" is the // newer name and should be preferred by clients. Data *hexutil.Bytes `json:"data"` Input *hexutil.Bytes `json:"input"` }
SendTxArgs represents the arguments to sumbit a new transaction into the transaction pool.
func (*SendTxArgs) SetDefaults ¶
func (args *SendTxArgs) SetDefaults(ctx context.Context, b Backend) error
setDefaults is a helper function that fills in default values for unspecified tx fields.
func (*SendTxArgs) ToTransaction ¶
func (args *SendTxArgs) ToTransaction() types.Tx
type SignTransactionResult ¶
SignTransactionResult represents a RLP encoded signed transaction.
type SyncInfo ¶
type SyncInfo struct { LatestBlockHash cmn.HexBytes `json:"latest_block_hash"` LatestAppHash cmn.HexBytes `json:"latest_app_hash"` LatestBlockHeight uint64 `json:"latest_block_height"` LatestBlockTime time.Time `json:"latest_block_time"` CatchingUp bool `json:"catching_up"` }
Info about the node's syncing state
type TxRecordReq ¶
type ValidatorInfo ¶
type ValidatorInfo struct { Address cmn.HexBytes `json:"address"` PubKey crypto.PubKey `json:"pub_key"` VotingPower int64 `json:"voting_power"` }
Info about the node's validator
type WholeBlock ¶
func NewWholeBlock ¶
func NewWholeBlock(block *types.Block, receipts types.Receipts) *WholeBlock