Versions in this module Expand all Collapse all v3 v3.3.5 May 9, 2020 Changes in this version + func DoCall(ctx context.Context, b Backend, args CallArgs, blockNr rpc.BlockNumber, ...) ([]byte, uint64, bool, error) + func DoEstimateGas(ctx context.Context, b Backend, args CallArgs, blockNr rpc.BlockNumber) (hexutil.Uint64, error) + func GetAPIs(apiBackend Backend) []rpc.API + func RPCMarshalBlock(b *types.Block, inclTx bool, fullTx bool) (map[string]interface{}, error) + 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 + type Backend interface + AccountManager func() *accounts.Manager + BlockByNumber func(ctx context.Context, blockNr rpc.BlockNumber) (*types.Block, error) + ChainConfig func() *params.ChainConfig + ChainDb func() common.Database + CurrentBlock func() *types.Block + Downloader func() *downloader.Downloader + GenesisAlloc func() core.GenesisAlloc + GetBlock func(ctx context.Context, blockHash common.Hash) (*types.Block, error) + GetEVM func(ctx context.Context, msg core.Message, state *state.StateDB, ...) (*vm.EVM, error) + GetPoolNonce func(ctx context.Context, addr common.Address) (uint64, error) + GetPoolTransaction func(txHash common.Hash) *types.Transaction + GetPoolTransactions func() types.Transactions + GetReceipts func(ctx context.Context, blockHash common.Hash) (types.Receipts, error) + GetTd func(blockHash common.Hash) *big.Int + HeaderByNumber func(ctx context.Context, blockNr rpc.BlockNumber) (*types.Header, error) + InitialSupply func() *big.Int + ProtocolVersion func() int + SendTx func(ctx context.Context, signedTx *types.Transaction) error + SetHead func(number uint64) + StateAndHeaderByNumber func(ctx context.Context, blockNr rpc.BlockNumber) (*state.StateDB, *types.Header, error) + Stats func() (pending int, queued int) + SubscribeChainEvent func(ch chan<- core.ChainEvent, name string) + SubscribeChainHeadEvent func(ch chan<- core.ChainHeadEvent, name string) + SubscribeChainSideEvent func(ch chan<- core.ChainSideEvent, name string) + SubscribeNewTxsEvent func(chan<- core.NewTxsEvent, string) + SuggestPrice func(ctx context.Context) (*big.Int, error) + TxPoolContent func(context.Context) (map[common.Address]types.Transactions, map[common.Address]types.Transactions) + UnsubscribeChainEvent func(ch chan<- core.ChainEvent) + UnsubscribeChainHeadEvent func(ch chan<- core.ChainHeadEvent) + UnsubscribeChainSideEvent func(ch chan<- core.ChainSideEvent) + UnsubscribeNewTxsEvent func(chan<- core.NewTxsEvent) + type CallArgs struct + Data *hexutil.Bytes + From *common.Address + Gas *hexutil.Uint64 + GasPrice *hexutil.Big + To *common.Address + Value *hexutil.Big + 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) 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(addr common.Address, password string, duration *uint64) (bool, 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, blockNr rpc.BlockNumber) (hexutil.Bytes, error) + func (s *PublicBlockChainAPI) EstimateGas(ctx context.Context, args CallArgs) (hexutil.Uint64, error) + func (s *PublicBlockChainAPI) GenesisAlloc(ctx context.Context) (core.GenesisAlloc, error) + func (s *PublicBlockChainAPI) GetBalance(ctx context.Context, address common.Address, blockNr rpc.BlockNumber) (*hexutil.Big, error) + func (s *PublicBlockChainAPI) GetBlockByHash(ctx context.Context, blockHash common.Hash, fullTx bool) (map[string]interface{}, error) + func (s *PublicBlockChainAPI) GetBlockByNumber(ctx context.Context, blockNr rpc.BlockNumber, fullTx bool) (map[string]interface{}, error) + func (s *PublicBlockChainAPI) GetCode(ctx context.Context, address common.Address, blockNr rpc.BlockNumber) (hexutil.Bytes, 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 + func (s *PublicBlockChainAPI) TotalSupply(ctx context.Context, blockNr rpc.BlockNumber) (*hexutil.Big, error) + 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) + type PublicEthereumAPI struct + func NewPublicEthereumAPI(b Backend) *PublicEthereumAPI + func (s *PublicEthereumAPI) GasPrice(ctx context.Context) (*hexutil.Big, error) + func (s *PublicEthereumAPI) ProtocolVersion() hexutil.Uint + 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) 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 + func (s *PublicTransactionPoolAPI) GetTransactionCount(ctx context.Context, address common.Address, blockNr rpc.BlockNumber) (*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, encodedTx 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(ctx context.Context) map[string]map[string]map[string]*RPCTransaction + func (s *PublicTxPoolAPI) Inspect(ctx context.Context) map[string]map[string]map[string]string + func (s *PublicTxPoolAPI) Status() map[string]hexutil.Uint + type RPCTransaction struct + BlockHash common.Hash + BlockNumber *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.Uint + V *hexutil.Big + Value *hexutil.Big + type SendTxArgs struct + 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 Other modules containing this package github.com/beyonderyue/gochain