Versions in this module Expand all Collapse all v1 v1.0.6 Apr 12, 2022 Changes in this version + func DoCall(ctx context.Context, b Backend, args CallArgs, ...) (*core.ExecutionResult, error) + func DoEstimateGas(ctx context.Context, b Backend, args CallArgs, ...) (hexutil.Uint64, error) + func GetAPIs(apiBackend Backend) []rpc.API + func RPCMarshalBlock(block *types.Block, inclTx bool, fullTx bool) (map[string]interface{}, error) + func RPCMarshalHeader(head *types.Header) map[string]interface + func SubmitTransaction(ctx context.Context, b Backend, tx *types.Transaction) (common.Hash, error) + type AccountResult struct + AccountProof []string + Address common.Address + Balance *hexutil.Big + CodeHash common.Hash + Nonce hexutil.Uint64 + StorageHash common.Hash + StorageProof []StorageResult + type AddrLocker struct + func (l *AddrLocker) LockAddr(address common.Address) + func (l *AddrLocker) UnlockAddr(address common.Address) + type Backend interface + AccountManager func() *accounts.Manager + BlockByHash func(ctx context.Context, hash common.Hash) (*types.Block, error) + BlockByNumber func(ctx context.Context, number rpc.BlockNumber) (*types.Block, error) + BlockByNumberOrHash func(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*types.Block, error) + BloomStatus func() (uint64, uint64) + ChainConfig func() *params.ChainConfig + ChainDb func() ethdb.Database + CurrentBlock func() *types.Block + CurrentHeader func() *types.Header + Downloader func() *downloader.Downloader + Engine func() consensus.Engine + ExtRPCEnabled func() bool + GetEVM func(ctx context.Context, msg core.Message, state *state.StateDB, ...) (*vm.EVM, func() error, error) + GetLogs func(ctx context.Context, blockHash common.Hash) ([][]*types.Log, error) + GetPoolNonce func(ctx context.Context, addr common.Address) (uint64, error) + GetPoolTransaction func(txHash common.Hash) *types.Transaction + GetPoolTransactions func() (types.Transactions, error) + GetReceipts func(ctx context.Context, hash common.Hash) (types.Receipts, error) + GetTd func(ctx context.Context, hash common.Hash) *big.Int + GetTransaction func(ctx context.Context, txHash common.Hash) (*types.Transaction, common.Hash, uint64, uint64, error) + HeaderByHash func(ctx context.Context, hash common.Hash) (*types.Header, error) + HeaderByNumber func(ctx context.Context, number rpc.BlockNumber) (*types.Header, error) + HeaderByNumberOrHash func(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*types.Header, error) + RPCGasCap func() uint64 + RPCTxFeeCap func() float64 + SendTx func(ctx context.Context, signedTx *types.Transaction) error + ServiceFilter func(ctx context.Context, session *bloombits.MatcherSession) + SetHead func(number uint64) + StateAndHeaderByNumber func(ctx context.Context, number rpc.BlockNumber) (*state.StateDB, *types.Header, error) + StateAndHeaderByNumberOrHash func(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*state.StateDB, *types.Header, error) + Stats func() (pending int, queued int) + SubscribeChainEvent func(ch chan<- core.ChainEvent) event.Subscription + SubscribeChainHeadEvent func(ch chan<- core.ChainHeadEvent) event.Subscription + SubscribeChainSideEvent func(ch chan<- core.ChainSideEvent) event.Subscription + SubscribeLogsEvent func(ch chan<- []*types.Log) event.Subscription + SubscribeNewTxsEvent func(chan<- core.NewTxsEvent) event.Subscription + SubscribePendingLogsEvent func(ch chan<- []*types.Log) event.Subscription + SubscribeRemovedLogsEvent func(ch chan<- core.RemovedLogsEvent) event.Subscription + SuggestPrice func(ctx context.Context) (*big.Int, error) + TxPoolContent func() (map[common.Address]types.Transactions, map[common.Address]types.Transactions) + UnprotectedAllowed func() bool + type CallArgs struct + AccessList *types.AccessList + Data *hexutil.Bytes + From *common.Address + Gas *hexutil.Uint64 + GasPrice *hexutil.Big + To *common.Address + Value *hexutil.Big + func (args *CallArgs) ToMessage(globalGasCap uint64) types.Message + type ExecutionResult struct + Failed bool + Gas uint64 + ReturnValue string + StructLogs []StructLogRes + type PrivateAccountAPI struct + func NewPrivateAccountAPI(b Backend, nonceLock *AddrLocker) *PrivateAccountAPI + func (s *PrivateAccountAPI) DeriveAccount(url string, path string, pin *bool) (accounts.Account, error) + func (s *PrivateAccountAPI) EcRecover(ctx context.Context, data, sig hexutil.Bytes) (common.Address, error) + func (s *PrivateAccountAPI) ImportRawKey(privkey string, password string) (common.Address, error) + func (s *PrivateAccountAPI) InitializeWallet(ctx context.Context, url string) (string, error) + func (s *PrivateAccountAPI) ListAccounts() []common.Address + func (s *PrivateAccountAPI) ListWallets() []rawWallet + func (s *PrivateAccountAPI) LockAccount(addr common.Address) bool + func (s *PrivateAccountAPI) NewAccount(password string) (common.Address, error) + func (s *PrivateAccountAPI) OpenWallet(url string, passphrase *string) error + func (s *PrivateAccountAPI) SendTransaction(ctx context.Context, args SendTxArgs, passwd string) (common.Hash, error) + func (s *PrivateAccountAPI) Sign(ctx context.Context, data hexutil.Bytes, addr common.Address, passwd string) (hexutil.Bytes, error) + func (s *PrivateAccountAPI) SignAndSendTransaction(ctx context.Context, args SendTxArgs, passwd string) (common.Hash, error) + func (s *PrivateAccountAPI) SignTransaction(ctx context.Context, args SendTxArgs, passwd string) (*SignTransactionResult, error) + func (s *PrivateAccountAPI) UnlockAccount(ctx context.Context, addr common.Address, password string, duration *uint64) (bool, error) + func (s *PrivateAccountAPI) Unpair(ctx context.Context, url string, pin string) error + type PrivateDebugAPI struct + func NewPrivateDebugAPI(b Backend) *PrivateDebugAPI + func (api *PrivateDebugAPI) ChaindbCompact() error + func (api *PrivateDebugAPI) ChaindbProperty(property string) (string, error) + func (api *PrivateDebugAPI) SetHead(number hexutil.Uint64) + type PublicAccountAPI struct + func NewPublicAccountAPI(am *accounts.Manager) *PublicAccountAPI + func (s *PublicAccountAPI) Accounts() []common.Address + type PublicBlockChainAPI struct + func NewPublicBlockChainAPI(b Backend) *PublicBlockChainAPI + func (s *PublicBlockChainAPI) BlockNumber() hexutil.Uint64 + func (s *PublicBlockChainAPI) Call(ctx context.Context, args CallArgs, blockNrOrHash rpc.BlockNumberOrHash, ...) (hexutil.Bytes, error) + func (s *PublicBlockChainAPI) ChainId() *hexutil.Big + func (s *PublicBlockChainAPI) EstimateGas(ctx context.Context, args CallArgs, blockNrOrHash *rpc.BlockNumberOrHash) (hexutil.Uint64, error) + func (s *PublicBlockChainAPI) GetBalance(ctx context.Context, address common.Address, ...) (*hexutil.Big, error) + func (s *PublicBlockChainAPI) GetBlockByHash(ctx context.Context, hash common.Hash, fullTx bool) (map[string]interface{}, error) + func (s *PublicBlockChainAPI) GetBlockByNumber(ctx context.Context, number rpc.BlockNumber, fullTx bool) (map[string]interface{}, error) + func (s *PublicBlockChainAPI) GetCode(ctx context.Context, address common.Address, ...) (hexutil.Bytes, error) + func (s *PublicBlockChainAPI) GetHeaderByHash(ctx context.Context, hash common.Hash) map[string]interface{} + func (s *PublicBlockChainAPI) GetHeaderByNumber(ctx context.Context, number rpc.BlockNumber) (map[string]interface{}, error) + func (s *PublicBlockChainAPI) GetProof(ctx context.Context, address common.Address, storageKeys []string, ...) (*AccountResult, error) + func (s *PublicBlockChainAPI) GetStorageAt(ctx context.Context, address common.Address, key string, ...) (hexutil.Bytes, error) + func (s *PublicBlockChainAPI) GetUncleByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) (map[string]interface{}, error) + func (s *PublicBlockChainAPI) GetUncleByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) (map[string]interface{}, error) + func (s *PublicBlockChainAPI) GetUncleCountByBlockHash(ctx context.Context, blockHash common.Hash) *hexutil.Uint + func (s *PublicBlockChainAPI) GetUncleCountByBlockNumber(ctx context.Context, blockNr rpc.BlockNumber) *hexutil.Uint + type PublicDebugAPI struct + func NewPublicDebugAPI(b Backend) *PublicDebugAPI + func (api *PublicDebugAPI) GetBlockRlp(ctx context.Context, number uint64) (string, error) + func (api *PublicDebugAPI) PrintBlock(ctx context.Context, number uint64) (string, error) + func (api *PublicDebugAPI) SeedHash(ctx context.Context, number uint64) (string, error) + func (api *PublicDebugAPI) TestSignCliqueBlock(ctx context.Context, address common.Address, number uint64) (common.Address, error) + type PublicEthereumAPI struct + func NewPublicEthereumAPI(b Backend) *PublicEthereumAPI + func (s *PublicEthereumAPI) GasPrice(ctx context.Context) (*hexutil.Big, error) + func (s *PublicEthereumAPI) Syncing() (interface{}, error) + type PublicNetAPI struct + func NewPublicNetAPI(net *p2p.Server, networkVersion uint64) *PublicNetAPI + func (s *PublicNetAPI) Listening() bool + func (s *PublicNetAPI) PeerCount() hexutil.Uint + func (s *PublicNetAPI) Version() string + type PublicTransactionPoolAPI struct + func NewPublicTransactionPoolAPI(b Backend, nonceLock *AddrLocker) *PublicTransactionPoolAPI + func (s *PublicTransactionPoolAPI) FillTransaction(ctx context.Context, args SendTxArgs) (*SignTransactionResult, error) + func (s *PublicTransactionPoolAPI) GetBlockTransactionCountByHash(ctx context.Context, blockHash common.Hash) *hexutil.Uint + func (s *PublicTransactionPoolAPI) GetBlockTransactionCountByNumber(ctx context.Context, blockNr rpc.BlockNumber) *hexutil.Uint + func (s *PublicTransactionPoolAPI) GetRawTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) hexutil.Bytes + func (s *PublicTransactionPoolAPI) GetRawTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) hexutil.Bytes + func (s *PublicTransactionPoolAPI) GetRawTransactionByHash(ctx context.Context, hash common.Hash) (hexutil.Bytes, error) + func (s *PublicTransactionPoolAPI) GetTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) *RPCTransaction + func (s *PublicTransactionPoolAPI) GetTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) *RPCTransaction + func (s *PublicTransactionPoolAPI) GetTransactionByHash(ctx context.Context, hash common.Hash) (*RPCTransaction, error) + func (s *PublicTransactionPoolAPI) GetTransactionCount(ctx context.Context, address common.Address, ...) (*hexutil.Uint64, error) + func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, hash common.Hash) (map[string]interface{}, error) + func (s *PublicTransactionPoolAPI) PendingTransactions() ([]*RPCTransaction, error) + func (s *PublicTransactionPoolAPI) Resend(ctx context.Context, sendArgs SendTxArgs, gasPrice *hexutil.Big, ...) (common.Hash, error) + func (s *PublicTransactionPoolAPI) SendRawTransaction(ctx context.Context, input hexutil.Bytes) (common.Hash, error) + func (s *PublicTransactionPoolAPI) SendTransaction(ctx context.Context, args SendTxArgs) (common.Hash, error) + func (s *PublicTransactionPoolAPI) Sign(addr common.Address, data hexutil.Bytes) (hexutil.Bytes, error) + func (s *PublicTransactionPoolAPI) SignTransaction(ctx context.Context, args SendTxArgs) (*SignTransactionResult, error) + type PublicTxPoolAPI struct + func NewPublicTxPoolAPI(b Backend) *PublicTxPoolAPI + func (s *PublicTxPoolAPI) Content() map[string]map[string]map[string]*RPCTransaction + func (s *PublicTxPoolAPI) Inspect() map[string]map[string]map[string]string + func (s *PublicTxPoolAPI) Status() map[string]hexutil.Uint + type RPCTransaction struct + Accesses *types.AccessList + BlockHash *common.Hash + BlockNumber *hexutil.Big + ChainID *hexutil.Big + From common.Address + Gas hexutil.Uint64 + GasPrice *hexutil.Big + Hash common.Hash + Input hexutil.Bytes + Nonce hexutil.Uint64 + R *hexutil.Big + S *hexutil.Big + To *common.Address + TransactionIndex *hexutil.Uint64 + Type hexutil.Uint64 + V *hexutil.Big + Value *hexutil.Big + type SendTxArgs struct + AccessList *types.AccessList + ChainID *hexutil.Big + Data *hexutil.Bytes + From common.Address + Gas *hexutil.Uint64 + GasPrice *hexutil.Big + Input *hexutil.Bytes + Nonce *hexutil.Uint64 + To *common.Address + Value *hexutil.Big + type SignTransactionResult struct + Raw hexutil.Bytes + Tx *types.Transaction + type StorageResult struct + Key string + Proof []string + Value *hexutil.Big + type StructLogRes struct + Depth int + Error error + Gas uint64 + GasCost uint64 + Memory *[]string + Op string + Pc uint64 + Stack *[]string + Storage *map[string]string + func FormatLogs(logs []vm.StructLog) []StructLogRes