Documentation ¶
Index ¶
- type AccessList
- type AccessListEntry
- type AccountProof
- type Address
- type Addresses
- type BadBlock
- type Block
- type BlockNumberOrTag
- type BlockTag
- type Byte
- type Bytes
- type Bytes256
- type Bytes32
- type Bytes65
- type Bytes8
- type Filter
- type FilterResults
- type FilterTopic
- type FilterTopics
- type GenericTransaction
- type GoOpenRPCHandler
- type GoOpenRPCService
- type Hash32
- type Log
- type ReceiptInfo
- type RpcHandler
- func (h *RpcHandler) DebugGetBadBlocks(ctx context.Context) (Blocks []BadBlock, err error)
- func (h *RpcHandler) DebugGetRawBlock(ctx context.Context, Block BlockNumberOrTag) (BlockRlp Bytes, err error)
- func (h *RpcHandler) DebugGetRawHeader(ctx context.Context, Block BlockNumberOrTag) (HeaderRlp Bytes, err error)
- func (h *RpcHandler) DebugGetRawReceipts(ctx context.Context, Block BlockNumberOrTag) (Receipts []Bytes, err error)
- func (h *RpcHandler) DebugGetRawTransaction(ctx context.Context, TransactionHash Hash32) (Eip2718BinaryEncodedTransaction Bytes, err error)
- func (h *RpcHandler) EthAccounts(ctx context.Context) (Accounts []Address, err error)
- func (h *RpcHandler) EthBlockNumber(ctx context.Context) (BlockNumber Uint, err error)
- func (h *RpcHandler) EthCall(ctx context.Context, Transaction GenericTransaction, Block *BlockNumberOrTag) (ReturnData Bytes, err error)
- func (h *RpcHandler) EthChainId(ctx context.Context) (ChainId Uint, err error)
- func (h *RpcHandler) EthCoinbase(ctx context.Context) (CoinbaseAddress Address, err error)
- func (h *RpcHandler) EthCreateAccessList(ctx context.Context, Transaction GenericTransaction, Block *BlockNumberOrTag) (GasUsed struct{ ... }, err error)
- func (h *RpcHandler) EthEstimateGas(ctx context.Context, Transaction GenericTransaction, Block *BlockNumberOrTag) (GasUsed Uint, err error)
- func (h *RpcHandler) EthFeeHistory(ctx context.Context, BlockCount Uint, NewestBlock BlockNumberOrTag, ...) (FeeHistoryResult struct{ ... }, err error)
- func (h *RpcHandler) EthGasPrice(ctx context.Context) (GasPrice Uint, err error)
- func (h *RpcHandler) EthGetBalance(ctx context.Context, Address Address, Block *BlockNumberOrTag) (Balance Uint, err error)
- func (h *RpcHandler) EthGetBlockByHash(ctx context.Context, BlockHash Hash32, HydratedTransactions bool) (BlockInformation Block, err error)
- func (h *RpcHandler) EthGetBlockByNumber(ctx context.Context, Block BlockNumberOrTag, HydratedTransactions bool) (BlockInformation Block, err error)
- func (h *RpcHandler) EthGetBlockTransactionCountByHash(ctx context.Context, BlockHash *Hash32) (TransactionCount Uint, err error)
- func (h *RpcHandler) EthGetBlockTransactionCountByNumber(ctx context.Context, Block *BlockNumberOrTag) (TransactionCount Uint, err error)
- func (h *RpcHandler) EthGetCode(ctx context.Context, Address Address, Block *BlockNumberOrTag) (Bytecode Bytes, err error)
- func (h *RpcHandler) EthGetFilterChanges(ctx context.Context, FilterIdentifier *Uint) (LogObjects FilterResults, err error)
- func (h *RpcHandler) EthGetFilterLogs(ctx context.Context, FilterIdentifier *Uint) (LogObjects FilterResults, err error)
- func (h *RpcHandler) EthGetLogs(ctx context.Context, Filter *Filter) (LogObjects FilterResults, err error)
- func (h *RpcHandler) EthGetProof(ctx context.Context, Address Address, StorageKeys []Hash32, ...) (Account AccountProof, err error)
- func (h *RpcHandler) EthGetStorageAt(ctx context.Context, Address Address, StorageSlot Uint256, ...) (Value Bytes, err error)
- func (h *RpcHandler) EthGetTransactionByBlockHashAndIndex(ctx context.Context, BlockHash Hash32, TransactionIndex Uint) (TransactionInformation TransactionInfo, err error)
- func (h *RpcHandler) EthGetTransactionByBlockNumberAndIndex(ctx context.Context, Block BlockNumberOrTag, TransactionIndex Uint) (TransactionInformation TransactionInfo, err error)
- func (h *RpcHandler) EthGetTransactionByHash(ctx context.Context, TransactionHash Hash32) (TransactionInformation TransactionInfo, err error)
- func (h *RpcHandler) EthGetTransactionCount(ctx context.Context, Address Address, Block *BlockNumberOrTag) (TransactionCount Uint, err error)
- func (h *RpcHandler) EthGetTransactionReceipt(ctx context.Context, TransactionHash *Hash32) (ReceiptInformation ReceiptInfo, err error)
- func (h *RpcHandler) EthGetUncleCountByBlockHash(ctx context.Context, BlockHash *Hash32) (UncleCount Uint, err error)
- func (h *RpcHandler) EthGetUncleCountByBlockNumber(ctx context.Context, Block *BlockNumberOrTag) (UncleCount Uint, err error)
- func (h *RpcHandler) EthGetWork(ctx context.Context) (CurrentWork []Bytes32, err error)
- func (h *RpcHandler) EthHashrate(ctx context.Context) (MiningStatus Uint, err error)
- func (h *RpcHandler) EthMaxPriorityFeePerGas(ctx context.Context) (MaxPriorityFeePerGas Uint, err error)
- func (h *RpcHandler) EthMining(ctx context.Context) (MiningStatus bool, err error)
- func (h *RpcHandler) EthNewBlockFilter(ctx context.Context) (FilterIdentifier Uint, err error)
- func (h *RpcHandler) EthNewFilter(ctx context.Context, Filter *Filter) (FilterIdentifier Uint, err error)
- func (h *RpcHandler) EthNewPendingTransactionFilter(ctx context.Context) (FilterIdentifier Uint, err error)
- func (h *RpcHandler) EthSendRawTransaction(ctx context.Context, Transaction Bytes) (TransactionHash Hash32, err error)
- func (h *RpcHandler) EthSendTransaction(ctx context.Context, Transaction GenericTransaction) (TransactionHash Hash32, err error)
- func (h *RpcHandler) EthSign(ctx context.Context, Address Address, Message Bytes) (Signature Bytes65, err error)
- func (h *RpcHandler) EthSignTransaction(ctx context.Context, Transaction GenericTransaction) (EncodedTransaction Bytes, err error)
- func (h *RpcHandler) EthSubmitHashrate(ctx context.Context, Hashrate Bytes32, Id Bytes32) (Success bool, err error)
- func (h *RpcHandler) EthSubmitWork(ctx context.Context, Nonce Bytes8, Hash Bytes32, Digest Bytes32) (Success bool, err error)
- func (h *RpcHandler) EthSyncing(ctx context.Context) (SyncingStatus SyncingStatus, err error)
- func (h *RpcHandler) EthUninstallFilter(ctx context.Context, FilterIdentifier *Uint) (Success bool, err error)
- type StorageProof
- type SyncingStatus
- type Transaction1559Signed
- type Transaction1559Unsigned
- type Transaction2930Signed
- type Transaction2930Unsigned
- type TransactionInfo
- type TransactionLegacySigned
- type TransactionLegacyUnsigned
- type TransactionSigned
- type TransactionUnsigned
- type Uint
- type Uint256
- type Uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessList ¶
type AccessList []AccessListEntry
type AccessListEntry ¶
type AccountProof ¶
type Block ¶
type Block struct { BaseFeePerGas Uint `json:"baseFeePerGas"` Difficulty Bytes `json:"difficulty"` ExtraData Bytes `json:"extraData"` GasLimit Uint `json:"gasLimit"` GasUsed Uint `json:"gasUsed"` LogsBloom Bytes256 `json:"logsBloom"` Miner Address `json:"miner"` MixHash Hash32 `json:"mixHash"` Nonce Bytes8 `json:"nonce"` Number Uint `json:"number"` ParentHash Hash32 `json:"parentHash"` ReceiptsRoot Hash32 `json:"receiptsRoot"` Sha3Uncles Hash32 `json:"sha3Uncles"` Size Uint `json:"size"` StateRoot Hash32 `json:"stateRoot"` Timestamp Uint `json:"timestamp"` TotalDifficulty Uint `json:"totalDifficulty"` Transactions struct { Option0 []Hash32 Option1 []TransactionSigned } `json:"transactions"` TransactionsRoot Hash32 `json:"transactionsRoot"` Uncles []Hash32 `json:"uncles"` }
type BlockNumberOrTag ¶
type Filter ¶
type Filter struct { Address struct { Option0 Address Option1 Addresses } `json:"address"` FromBlock Uint `json:"fromBlock"` ToBlock Uint `json:"toBlock"` Topics FilterTopics `json:"topics"` }
type FilterResults ¶
type FilterTopic ¶
type FilterTopics ¶
type FilterTopics []FilterTopic
type GenericTransaction ¶
type GenericTransaction struct { AccessList AccessList `json:"accessList"` ChainId Uint `json:"chainId"` From Address `json:"from"` Gas Uint `json:"gas"` GasPrice Uint `json:"gasPrice"` Input Bytes `json:"input"` MaxFeePerGas Uint `json:"maxFeePerGas"` MaxPriorityFeePerGas Uint `json:"maxPriorityFeePerGas"` Nonce Uint `json:"nonce"` To Address `json:"to"` Type Byte `json:"type"` Value Uint `json:"value"` }
type GoOpenRPCHandler ¶
type GoOpenRPCHandler struct {
Srv GoOpenRPCService
}
func (*GoOpenRPCHandler) RouteRPC ¶
func (h *GoOpenRPCHandler) RouteRPC(r jmux.Router)
type GoOpenRPCService ¶
type GoOpenRPCService interface { // Returns an RLP-encoded header. DebugGetRawHeader(ctx context.Context, Block BlockNumberOrTag, ) (HeaderRlp Bytes, err error) // Returns an RLP-encoded block. DebugGetRawBlock(ctx context.Context, Block BlockNumberOrTag, ) (BlockRlp Bytes, err error) // Returns an array of EIP-2718 binary-encoded transactions. DebugGetRawTransaction(ctx context.Context, TransactionHash Hash32, ) (Eip2718BinaryEncodedTransaction Bytes, err error) // Returns an array of EIP-2718 binary-encoded receipts. DebugGetRawReceipts(ctx context.Context, Block BlockNumberOrTag, ) (Receipts []Bytes, err error) // Returns an array of recent bad blocks that the client has seen on the network. DebugGetBadBlocks(ctx context.Context, ) (Blocks []BadBlock, err error) // Returns information about a block by hash. EthGetBlockByHash(ctx context.Context, BlockHash Hash32, HydratedTransactions bool, ) (BlockInformation Block, err error) // Returns information about a block by number. EthGetBlockByNumber(ctx context.Context, Block BlockNumberOrTag, HydratedTransactions bool, ) (BlockInformation Block, err error) // Returns the number of transactions in a block from a block matching the given block hash. EthGetBlockTransactionCountByHash(ctx context.Context, BlockHash *Hash32, ) (TransactionCount Uint, err error) // Returns the number of transactions in a block matching the given block number. EthGetBlockTransactionCountByNumber(ctx context.Context, Block *BlockNumberOrTag, ) (TransactionCount Uint, err error) // Returns the number of uncles in a block from a block matching the given block hash. EthGetUncleCountByBlockHash(ctx context.Context, BlockHash *Hash32, ) (UncleCount Uint, err error) // Returns the number of transactions in a block matching the given block number. EthGetUncleCountByBlockNumber(ctx context.Context, Block *BlockNumberOrTag, ) (UncleCount Uint, err error) // Returns the chain ID of the current network. EthChainId(ctx context.Context, ) (ChainId Uint, err error) // Returns an object with data about the sync status or false. EthSyncing(ctx context.Context, ) (SyncingStatus SyncingStatus, err error) // Returns the client coinbase address. EthCoinbase(ctx context.Context, ) (CoinbaseAddress Address, err error) // Returns a list of addresses owned by client. EthAccounts(ctx context.Context, ) (Accounts []Address, err error) // Returns the number of most recent block. EthBlockNumber(ctx context.Context, ) (BlockNumber Uint, err error) // Executes a new message call immediately without creating a transaction on the block chain. EthCall(ctx context.Context, Transaction GenericTransaction, Block *BlockNumberOrTag, ) (ReturnData Bytes, err error) // Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. EthEstimateGas(ctx context.Context, Transaction GenericTransaction, Block *BlockNumberOrTag, ) (GasUsed Uint, err error) // Generates an access list for a transaction. EthCreateAccessList(ctx context.Context, Transaction GenericTransaction, Block *BlockNumberOrTag, ) (GasUsed struct { AccessList AccessList `json:"accessList"` Error string `json:"error"` GasUsed Uint `json:"gasUsed"` }, err error) // Returns the current price per gas in wei. EthGasPrice(ctx context.Context, ) (GasPrice Uint, err error) // Returns the current maxPriorityFeePerGas per gas in wei. EthMaxPriorityFeePerGas(ctx context.Context, ) (MaxPriorityFeePerGas Uint, err error) // Transaction fee history EthFeeHistory(ctx context.Context, BlockCount Uint, NewestBlock BlockNumberOrTag, RewardPercentiles []float64, ) (FeeHistoryResult struct { BaseFeePerGas []Uint `json:"baseFeePerGas"` OldestBlock Uint `json:"oldestBlock"` Reward [][]Uint `json:"reward"` }, err error) // Creates a filter object, based on filter options, to notify when the state changes (logs). EthNewFilter(ctx context.Context, Filter *Filter, ) (FilterIdentifier Uint, err error) // Creates a filter in the node, to notify when a new block arrives. EthNewBlockFilter(ctx context.Context, ) (FilterIdentifier Uint, err error) // Creates a filter in the node, to notify when new pending transactions arrive. EthNewPendingTransactionFilter(ctx context.Context, ) (FilterIdentifier Uint, err error) // Uninstalls a filter with given id. EthUninstallFilter(ctx context.Context, FilterIdentifier *Uint, ) (Success bool, err error) // Polling method for a filter, which returns an array of logs which occurred since last poll. EthGetFilterChanges(ctx context.Context, FilterIdentifier *Uint, ) (LogObjects FilterResults, err error) // Returns an array of all logs matching filter with given id. EthGetFilterLogs(ctx context.Context, FilterIdentifier *Uint, ) (LogObjects FilterResults, err error) // Returns an array of all logs matching filter with given id. EthGetLogs(ctx context.Context, Filter *Filter, ) (LogObjects FilterResults, err error) // Returns whether the client is actively mining new blocks. EthMining(ctx context.Context, ) (MiningStatus bool, err error) // Returns the number of hashes per second that the node is mining with. EthHashrate(ctx context.Context, ) (MiningStatus Uint, err error) // Returns the hash of the current block, the seedHash, and the boundary condition to be met (“target”). EthGetWork(ctx context.Context, ) (CurrentWork []Bytes32, err error) // Used for submitting a proof-of-work solution. EthSubmitWork(ctx context.Context, Nonce Bytes8, Hash Bytes32, Digest Bytes32, ) (Success bool, err error) // Used for submitting mining hashrate. EthSubmitHashrate(ctx context.Context, Hashrate Bytes32, Id Bytes32, ) (Success bool, err error) // Returns an EIP-191 signature over the provided data. EthSign(ctx context.Context, Address Address, Message Bytes, ) (Signature Bytes65, err error) // Returns an RLP encoded transaction signed by the specified account. EthSignTransaction(ctx context.Context, Transaction GenericTransaction, ) (EncodedTransaction Bytes, err error) // Returns the balance of the account of given address. EthGetBalance(ctx context.Context, Address Address, Block *BlockNumberOrTag, ) (Balance Uint, err error) // Returns the value from a storage position at a given address. EthGetStorageAt(ctx context.Context, Address Address, StorageSlot Uint256, Block *BlockNumberOrTag, ) (Value Bytes, err error) // Returns the number of transactions sent from an address. EthGetTransactionCount(ctx context.Context, Address Address, Block *BlockNumberOrTag, ) (TransactionCount Uint, err error) // Returns code at a given address. EthGetCode(ctx context.Context, Address Address, Block *BlockNumberOrTag, ) (Bytecode Bytes, err error) // Returns the merkle proof for a given account and optionally some storage keys. EthGetProof(ctx context.Context, Address Address, StorageKeys []Hash32, Block BlockNumberOrTag, ) (Account AccountProof, err error) // Signs and submits a transaction. EthSendTransaction(ctx context.Context, Transaction GenericTransaction, ) (TransactionHash Hash32, err error) // Submits a raw transaction. EthSendRawTransaction(ctx context.Context, Transaction Bytes, ) (TransactionHash Hash32, err error) // Returns the information about a transaction requested by transaction hash. EthGetTransactionByHash(ctx context.Context, TransactionHash Hash32, ) (TransactionInformation TransactionInfo, err error) // Returns information about a transaction by block hash and transaction index position. EthGetTransactionByBlockHashAndIndex(ctx context.Context, BlockHash Hash32, TransactionIndex Uint, ) (TransactionInformation TransactionInfo, err error) // Returns information about a transaction by block number and transaction index position. EthGetTransactionByBlockNumberAndIndex(ctx context.Context, Block BlockNumberOrTag, TransactionIndex Uint, ) (TransactionInformation TransactionInfo, err error) // Returns the receipt of a transaction by transaction hash. EthGetTransactionReceipt(ctx context.Context, TransactionHash *Hash32, ) (ReceiptInformation ReceiptInfo, err error) }
type Log ¶
type Log struct { Address Address `json:"address"` BlockHash Hash32 `json:"blockHash"` BlockNumber Uint `json:"blockNumber"` Data Bytes `json:"data"` LogIndex Uint `json:"logIndex"` Removed bool `json:"removed"` Topics []Bytes32 `json:"topics"` TransactionHash Hash32 `json:"transactionHash"` TransactionIndex Uint `json:"transactionIndex"` }
type ReceiptInfo ¶
type ReceiptInfo struct { BlockHash Hash32 `json:"blockHash"` BlockNumber Uint `json:"blockNumber"` ContractAddress struct { Option0 Address Option1 struct{} } `json:"contractAddress"` CumulativeGasUsed Uint `json:"cumulativeGasUsed"` EffectiveGasPrice Uint `json:"effectiveGasPrice"` From Address `json:"from"` GasUsed Uint `json:"gasUsed"` Logs []Log `json:"logs"` LogsBloom Bytes256 `json:"logsBloom"` Root Bytes32 `json:"root"` Status Uint `json:"status"` To Address `json:"to"` TransactionHash Hash32 `json:"transactionHash"` TransactionIndex Uint `json:"transactionIndex"` }
type RpcHandler ¶
type RpcHandler struct { // Returns an RLP-encoded header. FnDebugGetRawHeader func(ctx context.Context, Block BlockNumberOrTag, ) (HeaderRlp Bytes, err error) // Returns an RLP-encoded block. FnDebugGetRawBlock func(ctx context.Context, Block BlockNumberOrTag, ) (BlockRlp Bytes, err error) // Returns an array of EIP-2718 binary-encoded transactions. FnDebugGetRawTransaction func(ctx context.Context, TransactionHash Hash32, ) (Eip2718BinaryEncodedTransaction Bytes, err error) // Returns an array of EIP-2718 binary-encoded receipts. FnDebugGetRawReceipts func(ctx context.Context, Block BlockNumberOrTag, ) (Receipts []Bytes, err error) // Returns an array of recent bad blocks that the client has seen on the network. FnDebugGetBadBlocks func(ctx context.Context, ) (Blocks []BadBlock, err error) // Returns information about a block by hash. FnEthGetBlockByHash func(ctx context.Context, BlockHash Hash32, HydratedTransactions bool, ) (BlockInformation Block, err error) // Returns information about a block by number. FnEthGetBlockByNumber func(ctx context.Context, Block BlockNumberOrTag, HydratedTransactions bool, ) (BlockInformation Block, err error) // Returns the number of transactions in a block from a block matching the given block hash. FnEthGetBlockTransactionCountByHash func(ctx context.Context, BlockHash *Hash32, ) (TransactionCount Uint, err error) // Returns the number of transactions in a block matching the given block number. FnEthGetBlockTransactionCountByNumber func(ctx context.Context, Block *BlockNumberOrTag, ) (TransactionCount Uint, err error) // Returns the number of uncles in a block from a block matching the given block hash. FnEthGetUncleCountByBlockHash func(ctx context.Context, BlockHash *Hash32, ) (UncleCount Uint, err error) // Returns the number of transactions in a block matching the given block number. FnEthGetUncleCountByBlockNumber func(ctx context.Context, Block *BlockNumberOrTag, ) (UncleCount Uint, err error) // Returns the chain ID of the current network. FnEthChainId func(ctx context.Context, ) (ChainId Uint, err error) // Returns an object with data about the sync status or false. FnEthSyncing func(ctx context.Context, ) (SyncingStatus SyncingStatus, err error) // Returns the client coinbase address. FnEthCoinbase func(ctx context.Context, ) (CoinbaseAddress Address, err error) // Returns a list of addresses owned by client. FnEthAccounts func(ctx context.Context, ) (Accounts []Address, err error) // Returns the number of most recent block. FnEthBlockNumber func(ctx context.Context, ) (BlockNumber Uint, err error) // Executes a new message call immediately without creating a transaction on the block chain. FnEthCall func(ctx context.Context, Transaction GenericTransaction, Block *BlockNumberOrTag, ) (ReturnData Bytes, err error) // Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. FnEthEstimateGas func(ctx context.Context, Transaction GenericTransaction, Block *BlockNumberOrTag, ) (GasUsed Uint, err error) // Generates an access list for a transaction. FnEthCreateAccessList func(ctx context.Context, Transaction GenericTransaction, Block *BlockNumberOrTag, ) (GasUsed struct { AccessList AccessList `json:"accessList"` Error string `json:"error"` GasUsed Uint `json:"gasUsed"` }, err error) // Returns the current price per gas in wei. FnEthGasPrice func(ctx context.Context, ) (GasPrice Uint, err error) // Returns the current maxPriorityFeePerGas per gas in wei. FnEthMaxPriorityFeePerGas func(ctx context.Context, ) (MaxPriorityFeePerGas Uint, err error) // Transaction fee history FnEthFeeHistory func(ctx context.Context, BlockCount Uint, NewestBlock BlockNumberOrTag, RewardPercentiles []float64, ) (FeeHistoryResult struct { BaseFeePerGas []Uint `json:"baseFeePerGas"` OldestBlock Uint `json:"oldestBlock"` Reward [][]Uint `json:"reward"` }, err error) // Creates a filter object, based on filter options, to notify when the state changes (logs). FnEthNewFilter func(ctx context.Context, Filter *Filter, ) (FilterIdentifier Uint, err error) // Creates a filter in the node, to notify when a new block arrives. FnEthNewBlockFilter func(ctx context.Context, ) (FilterIdentifier Uint, err error) // Creates a filter in the node, to notify when new pending transactions arrive. FnEthNewPendingTransactionFilter func(ctx context.Context, ) (FilterIdentifier Uint, err error) // Uninstalls a filter with given id. FnEthUninstallFilter func(ctx context.Context, FilterIdentifier *Uint, ) (Success bool, err error) // Polling method for a filter, which returns an array of logs which occurred since last poll. FnEthGetFilterChanges func(ctx context.Context, FilterIdentifier *Uint, ) (LogObjects FilterResults, err error) // Returns an array of all logs matching filter with given id. FnEthGetFilterLogs func(ctx context.Context, FilterIdentifier *Uint, ) (LogObjects FilterResults, err error) // Returns an array of all logs matching filter with given id. FnEthGetLogs func(ctx context.Context, Filter *Filter, ) (LogObjects FilterResults, err error) // Returns whether the client is actively mining new blocks. FnEthMining func(ctx context.Context, ) (MiningStatus bool, err error) // Returns the number of hashes per second that the node is mining with. FnEthHashrate func(ctx context.Context, ) (MiningStatus Uint, err error) // Returns the hash of the current block, the seedHash, and the boundary condition to be met (“target”). FnEthGetWork func(ctx context.Context, ) (CurrentWork []Bytes32, err error) // Used for submitting a proof-of-work solution. FnEthSubmitWork func(ctx context.Context, Nonce Bytes8, Hash Bytes32, Digest Bytes32, ) (Success bool, err error) // Used for submitting mining hashrate. FnEthSubmitHashrate func(ctx context.Context, Hashrate Bytes32, Id Bytes32, ) (Success bool, err error) // Returns an EIP-191 signature over the provided data. FnEthSign func(ctx context.Context, Address Address, Message Bytes, ) (Signature Bytes65, err error) // Returns an RLP encoded transaction signed by the specified account. FnEthSignTransaction func(ctx context.Context, Transaction GenericTransaction, ) (EncodedTransaction Bytes, err error) // Returns the balance of the account of given address. FnEthGetBalance func(ctx context.Context, Address Address, Block *BlockNumberOrTag, ) (Balance Uint, err error) // Returns the value from a storage position at a given address. FnEthGetStorageAt func(ctx context.Context, Address Address, StorageSlot Uint256, Block *BlockNumberOrTag, ) (Value Bytes, err error) // Returns the number of transactions sent from an address. FnEthGetTransactionCount func(ctx context.Context, Address Address, Block *BlockNumberOrTag, ) (TransactionCount Uint, err error) // Returns code at a given address. FnEthGetCode func(ctx context.Context, Address Address, Block *BlockNumberOrTag, ) (Bytecode Bytes, err error) // Returns the merkle proof for a given account and optionally some storage keys. FnEthGetProof func(ctx context.Context, Address Address, StorageKeys []Hash32, Block BlockNumberOrTag, ) (Account AccountProof, err error) // Signs and submits a transaction. FnEthSendTransaction func(ctx context.Context, Transaction GenericTransaction, ) (TransactionHash Hash32, err error) // Submits a raw transaction. FnEthSendRawTransaction func(ctx context.Context, Transaction Bytes, ) (TransactionHash Hash32, err error) // Returns the information about a transaction requested by transaction hash. FnEthGetTransactionByHash func(ctx context.Context, TransactionHash Hash32, ) (TransactionInformation TransactionInfo, err error) // Returns information about a transaction by block hash and transaction index position. FnEthGetTransactionByBlockHashAndIndex func(ctx context.Context, BlockHash Hash32, TransactionIndex Uint, ) (TransactionInformation TransactionInfo, err error) // Returns information about a transaction by block number and transaction index position. FnEthGetTransactionByBlockNumberAndIndex func(ctx context.Context, Block BlockNumberOrTag, TransactionIndex Uint, ) (TransactionInformation TransactionInfo, err error) // Returns the receipt of a transaction by transaction hash. FnEthGetTransactionReceipt func(ctx context.Context, TransactionHash *Hash32, ) (ReceiptInformation ReceiptInfo, err error) }
func (*RpcHandler) DebugGetBadBlocks ¶
func (h *RpcHandler) DebugGetBadBlocks(ctx context.Context, ) (Blocks []BadBlock, err error)
Returns an array of recent bad blocks that the client has seen on the network.
func (*RpcHandler) DebugGetRawBlock ¶
func (h *RpcHandler) DebugGetRawBlock(ctx context.Context, Block BlockNumberOrTag, ) (BlockRlp Bytes, err error)
Returns an RLP-encoded block.
func (*RpcHandler) DebugGetRawHeader ¶
func (h *RpcHandler) DebugGetRawHeader(ctx context.Context, Block BlockNumberOrTag, ) (HeaderRlp Bytes, err error)
Returns an RLP-encoded header.
func (*RpcHandler) DebugGetRawReceipts ¶
func (h *RpcHandler) DebugGetRawReceipts(ctx context.Context, Block BlockNumberOrTag, ) (Receipts []Bytes, err error)
Returns an array of EIP-2718 binary-encoded receipts.
func (*RpcHandler) DebugGetRawTransaction ¶
func (h *RpcHandler) DebugGetRawTransaction(ctx context.Context, TransactionHash Hash32, ) (Eip2718BinaryEncodedTransaction Bytes, err error)
Returns an array of EIP-2718 binary-encoded transactions.
func (*RpcHandler) EthAccounts ¶
func (h *RpcHandler) EthAccounts(ctx context.Context, ) (Accounts []Address, err error)
Returns a list of addresses owned by client.
func (*RpcHandler) EthBlockNumber ¶
func (h *RpcHandler) EthBlockNumber(ctx context.Context, ) (BlockNumber Uint, err error)
Returns the number of most recent block.
func (*RpcHandler) EthCall ¶
func (h *RpcHandler) EthCall(ctx context.Context, Transaction GenericTransaction, Block *BlockNumberOrTag, ) (ReturnData Bytes, err error)
Executes a new message call immediately without creating a transaction on the block chain.
func (*RpcHandler) EthChainId ¶
func (h *RpcHandler) EthChainId(ctx context.Context, ) (ChainId Uint, err error)
Returns the chain ID of the current network.
func (*RpcHandler) EthCoinbase ¶
func (h *RpcHandler) EthCoinbase(ctx context.Context, ) (CoinbaseAddress Address, err error)
Returns the client coinbase address.
func (*RpcHandler) EthCreateAccessList ¶
func (h *RpcHandler) EthCreateAccessList(ctx context.Context, Transaction GenericTransaction, Block *BlockNumberOrTag, ) (GasUsed struct { AccessList AccessList `json:"accessList"` Error string `json:"error"` GasUsed Uint `json:"gasUsed"` }, err error)
Generates an access list for a transaction.
func (*RpcHandler) EthEstimateGas ¶
func (h *RpcHandler) EthEstimateGas(ctx context.Context, Transaction GenericTransaction, Block *BlockNumberOrTag, ) (GasUsed Uint, err error)
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
func (*RpcHandler) EthFeeHistory ¶
func (h *RpcHandler) EthFeeHistory(ctx context.Context, BlockCount Uint, NewestBlock BlockNumberOrTag, RewardPercentiles []float64, ) (FeeHistoryResult struct { BaseFeePerGas []Uint `json:"baseFeePerGas"` OldestBlock Uint `json:"oldestBlock"` Reward [][]Uint `json:"reward"` }, err error)
Transaction fee history
func (*RpcHandler) EthGasPrice ¶
func (h *RpcHandler) EthGasPrice(ctx context.Context, ) (GasPrice Uint, err error)
Returns the current price per gas in wei.
func (*RpcHandler) EthGetBalance ¶
func (h *RpcHandler) EthGetBalance(ctx context.Context, Address Address, Block *BlockNumberOrTag, ) (Balance Uint, err error)
Returns the balance of the account of given address.
func (*RpcHandler) EthGetBlockByHash ¶
func (h *RpcHandler) EthGetBlockByHash(ctx context.Context, BlockHash Hash32, HydratedTransactions bool, ) (BlockInformation Block, err error)
Returns information about a block by hash.
func (*RpcHandler) EthGetBlockByNumber ¶
func (h *RpcHandler) EthGetBlockByNumber(ctx context.Context, Block BlockNumberOrTag, HydratedTransactions bool, ) (BlockInformation Block, err error)
Returns information about a block by number.
func (*RpcHandler) EthGetBlockTransactionCountByHash ¶
func (h *RpcHandler) EthGetBlockTransactionCountByHash(ctx context.Context, BlockHash *Hash32, ) (TransactionCount Uint, err error)
Returns the number of transactions in a block from a block matching the given block hash.
func (*RpcHandler) EthGetBlockTransactionCountByNumber ¶
func (h *RpcHandler) EthGetBlockTransactionCountByNumber(ctx context.Context, Block *BlockNumberOrTag, ) (TransactionCount Uint, err error)
Returns the number of transactions in a block matching the given block number.
func (*RpcHandler) EthGetCode ¶
func (h *RpcHandler) EthGetCode(ctx context.Context, Address Address, Block *BlockNumberOrTag, ) (Bytecode Bytes, err error)
Returns code at a given address.
func (*RpcHandler) EthGetFilterChanges ¶
func (h *RpcHandler) EthGetFilterChanges(ctx context.Context, FilterIdentifier *Uint, ) (LogObjects FilterResults, err error)
Polling method for a filter, which returns an array of logs which occurred since last poll.
func (*RpcHandler) EthGetFilterLogs ¶
func (h *RpcHandler) EthGetFilterLogs(ctx context.Context, FilterIdentifier *Uint, ) (LogObjects FilterResults, err error)
Returns an array of all logs matching filter with given id.
func (*RpcHandler) EthGetLogs ¶
func (h *RpcHandler) EthGetLogs(ctx context.Context, Filter *Filter, ) (LogObjects FilterResults, err error)
Returns an array of all logs matching filter with given id.
func (*RpcHandler) EthGetProof ¶
func (h *RpcHandler) EthGetProof(ctx context.Context, Address Address, StorageKeys []Hash32, Block BlockNumberOrTag, ) (Account AccountProof, err error)
Returns the merkle proof for a given account and optionally some storage keys.
func (*RpcHandler) EthGetStorageAt ¶
func (h *RpcHandler) EthGetStorageAt(ctx context.Context, Address Address, StorageSlot Uint256, Block *BlockNumberOrTag, ) (Value Bytes, err error)
Returns the value from a storage position at a given address.
func (*RpcHandler) EthGetTransactionByBlockHashAndIndex ¶
func (h *RpcHandler) EthGetTransactionByBlockHashAndIndex(ctx context.Context, BlockHash Hash32, TransactionIndex Uint, ) (TransactionInformation TransactionInfo, err error)
Returns information about a transaction by block hash and transaction index position.
func (*RpcHandler) EthGetTransactionByBlockNumberAndIndex ¶
func (h *RpcHandler) EthGetTransactionByBlockNumberAndIndex(ctx context.Context, Block BlockNumberOrTag, TransactionIndex Uint, ) (TransactionInformation TransactionInfo, err error)
Returns information about a transaction by block number and transaction index position.
func (*RpcHandler) EthGetTransactionByHash ¶
func (h *RpcHandler) EthGetTransactionByHash(ctx context.Context, TransactionHash Hash32, ) (TransactionInformation TransactionInfo, err error)
Returns the information about a transaction requested by transaction hash.
func (*RpcHandler) EthGetTransactionCount ¶
func (h *RpcHandler) EthGetTransactionCount(ctx context.Context, Address Address, Block *BlockNumberOrTag, ) (TransactionCount Uint, err error)
Returns the number of transactions sent from an address.
func (*RpcHandler) EthGetTransactionReceipt ¶
func (h *RpcHandler) EthGetTransactionReceipt(ctx context.Context, TransactionHash *Hash32, ) (ReceiptInformation ReceiptInfo, err error)
Returns the receipt of a transaction by transaction hash.
func (*RpcHandler) EthGetUncleCountByBlockHash ¶
func (h *RpcHandler) EthGetUncleCountByBlockHash(ctx context.Context, BlockHash *Hash32, ) (UncleCount Uint, err error)
Returns the number of uncles in a block from a block matching the given block hash.
func (*RpcHandler) EthGetUncleCountByBlockNumber ¶
func (h *RpcHandler) EthGetUncleCountByBlockNumber(ctx context.Context, Block *BlockNumberOrTag, ) (UncleCount Uint, err error)
Returns the number of transactions in a block matching the given block number.
func (*RpcHandler) EthGetWork ¶
func (h *RpcHandler) EthGetWork(ctx context.Context, ) (CurrentWork []Bytes32, err error)
Returns the hash of the current block, the seedHash, and the boundary condition to be met (“target”).
func (*RpcHandler) EthHashrate ¶
func (h *RpcHandler) EthHashrate(ctx context.Context, ) (MiningStatus Uint, err error)
Returns the number of hashes per second that the node is mining with.
func (*RpcHandler) EthMaxPriorityFeePerGas ¶
func (h *RpcHandler) EthMaxPriorityFeePerGas(ctx context.Context, ) (MaxPriorityFeePerGas Uint, err error)
Returns the current maxPriorityFeePerGas per gas in wei.
func (*RpcHandler) EthMining ¶
func (h *RpcHandler) EthMining(ctx context.Context, ) (MiningStatus bool, err error)
Returns whether the client is actively mining new blocks.
func (*RpcHandler) EthNewBlockFilter ¶
func (h *RpcHandler) EthNewBlockFilter(ctx context.Context, ) (FilterIdentifier Uint, err error)
Creates a filter in the node, to notify when a new block arrives.
func (*RpcHandler) EthNewFilter ¶
func (h *RpcHandler) EthNewFilter(ctx context.Context, Filter *Filter, ) (FilterIdentifier Uint, err error)
Creates a filter object, based on filter options, to notify when the state changes (logs).
func (*RpcHandler) EthNewPendingTransactionFilter ¶
func (h *RpcHandler) EthNewPendingTransactionFilter(ctx context.Context, ) (FilterIdentifier Uint, err error)
Creates a filter in the node, to notify when new pending transactions arrive.
func (*RpcHandler) EthSendRawTransaction ¶
func (h *RpcHandler) EthSendRawTransaction(ctx context.Context, Transaction Bytes, ) (TransactionHash Hash32, err error)
Submits a raw transaction.
func (*RpcHandler) EthSendTransaction ¶
func (h *RpcHandler) EthSendTransaction(ctx context.Context, Transaction GenericTransaction, ) (TransactionHash Hash32, err error)
Signs and submits a transaction.
func (*RpcHandler) EthSign ¶
func (h *RpcHandler) EthSign(ctx context.Context, Address Address, Message Bytes, ) (Signature Bytes65, err error)
Returns an EIP-191 signature over the provided data.
func (*RpcHandler) EthSignTransaction ¶
func (h *RpcHandler) EthSignTransaction(ctx context.Context, Transaction GenericTransaction, ) (EncodedTransaction Bytes, err error)
Returns an RLP encoded transaction signed by the specified account.
func (*RpcHandler) EthSubmitHashrate ¶
func (h *RpcHandler) EthSubmitHashrate(ctx context.Context, Hashrate Bytes32, Id Bytes32, ) (Success bool, err error)
Used for submitting mining hashrate.
func (*RpcHandler) EthSubmitWork ¶
func (h *RpcHandler) EthSubmitWork(ctx context.Context, Nonce Bytes8, Hash Bytes32, Digest Bytes32, ) (Success bool, err error)
Used for submitting a proof-of-work solution.
func (*RpcHandler) EthSyncing ¶
func (h *RpcHandler) EthSyncing(ctx context.Context, ) (SyncingStatus SyncingStatus, err error)
Returns an object with data about the sync status or false.
func (*RpcHandler) EthUninstallFilter ¶
func (h *RpcHandler) EthUninstallFilter(ctx context.Context, FilterIdentifier *Uint, ) (Success bool, err error)
Uninstalls a filter with given id.
type StorageProof ¶
type SyncingStatus ¶
type Transaction1559Signed ¶
type Transaction1559Signed struct { Field0 Transaction1559Unsigned Field1 struct { R Uint `json:"r"` S Uint `json:"s"` YParity Uint `json:"yParity"` } }
type Transaction1559Unsigned ¶
type Transaction1559Unsigned struct { AccessList AccessList `json:"accessList"` ChainId Uint `json:"chainId"` Gas Uint `json:"gas"` Input Bytes `json:"input"` MaxFeePerGas Uint `json:"maxFeePerGas"` MaxPriorityFeePerGas Uint `json:"maxPriorityFeePerGas"` Nonce Uint `json:"nonce"` To Address `json:"to"` Type Byte `json:"type"` Value Uint `json:"value"` }
type Transaction2930Signed ¶
type Transaction2930Signed struct { Field0 Transaction2930Unsigned Field1 struct { R Uint `json:"r"` S Uint `json:"s"` YParity Uint `json:"yParity"` } }
type Transaction2930Unsigned ¶
type TransactionInfo ¶
type TransactionLegacySigned ¶
type TransactionLegacySigned struct { Field0 TransactionLegacyUnsigned Field1 struct { R Uint `json:"r"` S Uint `json:"s"` V Uint `json:"v"` } }
type TransactionSigned ¶
type TransactionSigned struct { Option0 Transaction1559Signed Option1 Transaction2930Signed Option2 TransactionLegacySigned }
type TransactionUnsigned ¶
type TransactionUnsigned struct { Option0 Transaction1559Unsigned Option1 Transaction2930Unsigned Option2 TransactionLegacyUnsigned }