Documentation ¶
Index ¶
- func RPCMarshalBlock(block *types.Block, inclTx bool, fullTx bool, config *params.ChainConfig) map[string]interface{}
- func RPCMarshalHeader(head *types.Header) map[string]interface{}
- type API
- func (p *API) ChainId() hexutil.Uint64
- func (p *API) GetBlockByHash(hash *common.Hash, fullTransactions bool) (map[string]interface{}, error)
- func (p *API) GetBlockReceipts(blockNrOrHash rpc.BlockNumberOrHash) ([]map[string]interface{}, error)
- func (p *API) GetBlockTransactionCountByHash(hash common.Hash) *hexutil.Uint
- type RPCTransaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RPCMarshalBlock ¶
func RPCMarshalBlock(block *types.Block, inclTx bool, fullTx bool, config *params.ChainConfig) map[string]interface{}
RPCMarshalBlock 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.
func RPCMarshalHeader ¶
RPCMarshalHeader converts the given header to the RPC output .
Types ¶
type API ¶
func (*API) GetBlockByHash ¶
func (*API) GetBlockReceipts ¶
func (p *API) GetBlockReceipts(blockNrOrHash rpc.BlockNumberOrHash) ([]map[string]interface{}, error)
type RPCTransaction ¶
type RPCTransaction struct { BlockHash *common.Hash `json:"blockHash"` BlockNumber *hexutil.Big `json:"blockNumber"` From common.Address `json:"from"` Gas hexutil.Uint64 `json:"gas"` GasPrice *hexutil.Big `json:"gasPrice"` GasFeeCap *hexutil.Big `json:"maxFeePerGas,omitempty"` GasTipCap *hexutil.Big `json:"maxPriorityFeePerGas,omitempty"` MaxFeePerBlobGas *hexutil.Big `json:"maxFeePerBlobGas,omitempty"` Hash common.Hash `json:"hash"` Input hexutil.Bytes `json:"input"` Nonce hexutil.Uint64 `json:"nonce"` To *common.Address `json:"to"` TransactionIndex *hexutil.Uint64 `json:"transactionIndex"` Value *hexutil.Big `json:"value"` Type hexutil.Uint64 `json:"type"` Accesses *types.AccessList `json:"accessList,omitempty"` ChainID *hexutil.Big `json:"chainId,omitempty"` BlobVersionedHashes []common.Hash `json:"blobVersionedHashes,omitempty"` V *hexutil.Big `json:"v"` R *hexutil.Big `json:"r"` S *hexutil.Big `json:"s"` YParity *hexutil.Uint64 `json:"yParity,omitempty"` }
RPCTransaction represents a transaction that will serialize to the RPC representation of a transaction
Click to show internal directories.
Click to hide internal directories.