Versions in this module Expand all Collapse all v1 v1.1.1 Oct 29, 2019 Changes in this version + func GetAPIs(apiBackend Backend) []rpc.API + type AddrLocker struct + func (l *AddrLocker) LockAddr(address types.Address) + func (l *AddrLocker) UnlockAddr(address types.Address) + type Backend interface + AccountManager func() *accounts.Manager + BlockByNumber func(ctx context.Context, blockNr rpc.BlockNumber) (*block.Block, error) + ChainConfig func() *params.ChainConfig + ChainDb func() database.IDatabase + CurrentBlock func() *block.Block + CurrentBlockNum func() uint64 + Downloader func() *downloader.Downloader + EventMux func() *event.TypeMux + GetBlock func(ctx context.Context, blockHash types.Hash) (*block.Block, error) + GetBlockCertificate func(ctx context.Context, blockNr rpc.BlockNumber) apos.BlockCertificate + GetPoolNonce func(ctx context.Context, addr types.Address) (uint64, error) + GetPoolTransaction func(txHash types.Hash) *transaction.Transaction + GetPoolTransactions func() (transaction.Transactions, error) + GetReceipts func(ctx context.Context, blockHash types.Hash) (transaction.Receipts, error) + HeaderByNumber func(ctx context.Context, blockNr rpc.BlockNumber) (*block.Header, error) + ProtocolVersion func() int + SendTx func(ctx context.Context, signedTx *transaction.Transaction) error + SetHead func(number uint64) + StatInfoByNumber func(ctx context.Context, blockNr rpc.BlockNumber) (*blockchain.BlockStat, error) + StateAndHeaderByNumber func(ctx context.Context, blockNr rpc.BlockNumber) (*state.StateDB, *block.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 + SubscribeTxPreEvent func(chan<- core.TxPreEvent) event.Subscription + TxPoolContent func() (map[types.Address]transaction.Transactions, ...) + type Certificate struct + Round uint64 + Signer string + Step uint64 + Votes int + type ConsensusDataHex struct + Id string + Para *types.BytesForJson + 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 types.BytesForJson) (types.Address, error) + func (s *PrivateAccountAPI) ImportRawKey(privkey string, password string) (types.Address, error) + func (s *PrivateAccountAPI) ListAccounts() []types.Address + func (s *PrivateAccountAPI) ListWallets() []rawWallet + func (s *PrivateAccountAPI) LockAccount(addr types.Address) bool + func (s *PrivateAccountAPI) NewAccount(password string) (types.Address, error) + func (s *PrivateAccountAPI) OpenWallet(url string, passphrase *string) error + func (s *PrivateAccountAPI) SendTransaction(ctx context.Context, args SendTxArgs, passwd string) (types.Hash, error) + func (s *PrivateAccountAPI) Sign(ctx context.Context, data types.BytesForJson, addr types.Address, ...) (types.BytesForJson, error) + func (s *PrivateAccountAPI) UnlockAccount(addr types.Address, password string, duration *uint64) (bool, error) + type PublicAccountAPI struct + func NewPublicAccountAPI(am *accounts.Manager) *PublicAccountAPI + func (s *PublicAccountAPI) Accounts() []types.Address + type PublicBchainAPI struct + func NewPublicBchainAPI(b Backend) *PublicBchainAPI + func (s *PublicBchainAPI) ProtocolVersion() types.UintForJson + func (s *PublicBchainAPI) Syncing() (interface{}, error) + type PublicBlockChainAPI struct + func NewPublicBlockChainAPI(b Backend) *PublicBlockChainAPI + func (s *PublicBlockChainAPI) ActionCall(ctx context.Context, actionArg SendTxAction, blockNr rpc.BlockNumber) ([]types.BytesForJson, error) + func (s *PublicBlockChainAPI) BlockNumber() *big.Int + func (s *PublicBlockChainAPI) GetBlockByHash(ctx context.Context, blockHash types.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) GetBlockCertificateByNumber(ctx context.Context, blockNr rpc.BlockNumber) ([]Certificate, error) + func (s *PublicBlockChainAPI) GetCode(ctx context.Context, address types.Address, blockNr rpc.BlockNumber) (types.BytesForJson, error) + func (s *PublicBlockChainAPI) GetStatInfoByNumber(ctx context.Context, blockNr rpc.BlockNumber) (map[string]interface{}, error) + func (s *PublicBlockChainAPI) GetStorageAt(ctx context.Context, address types.Address, key string, ...) (types.BytesForJson, error) + type PublicTransactionPoolAPI struct + func NewPublicTransactionPoolAPI(b Backend, nonceLock *AddrLocker) *PublicTransactionPoolAPI + func (s *PublicTransactionPoolAPI) GetAccountNonce(ctx context.Context, address types.Address, blockNr rpc.BlockNumber) (*types.Uint64ForJson, error) + func (s *PublicTransactionPoolAPI) GetBlockTransactionCountByHash(ctx context.Context, blockHash types.Hash) *types.UintForJson + func (s *PublicTransactionPoolAPI) GetBlockTransactionCountByNumber(ctx context.Context, blockNr rpc.BlockNumber) *types.UintForJson + func (s *PublicTransactionPoolAPI) GetCoinBaseLogByBlockNumber(ctx context.Context, blockNr rpc.BlockNumber) (map[string]interface{}, error) + func (s *PublicTransactionPoolAPI) GetRawTransactionByBlockHashAndIndex(ctx context.Context, blockHash types.Hash, index types.UintForJson) types.BytesForJson + func (s *PublicTransactionPoolAPI) GetRawTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index types.UintForJson) types.BytesForJson + func (s *PublicTransactionPoolAPI) GetRawTransactionByHash(ctx context.Context, hash types.Hash) (types.BytesForJson, error) + func (s *PublicTransactionPoolAPI) GetTransactionByAddress(ctx context.Context, address types.Address, nonce types.Uint64ForJson) *RPCTransaction + func (s *PublicTransactionPoolAPI) GetTransactionByBlockHashAndIndex(ctx context.Context, blockHash types.Hash, index types.UintForJson) *RPCTransaction + func (s *PublicTransactionPoolAPI) GetTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index types.UintForJson) *RPCTransaction + func (s *PublicTransactionPoolAPI) GetTransactionByHash(ctx context.Context, hash types.Hash) *RPCTransaction + func (s *PublicTransactionPoolAPI) GetTransactionReceipt(hash types.Hash) (map[string]interface{}, error) + func (s *PublicTransactionPoolAPI) PendingTransactions() ([]*RPCTransaction, error) + func (s *PublicTransactionPoolAPI) Resend(ctx context.Context, sendArgs SendTxArgs) (types.Hash, error) + func (s *PublicTransactionPoolAPI) SendRawTransaction(ctx context.Context, encodedTx types.BytesForJson) (types.Hash, error) + func (s *PublicTransactionPoolAPI) SendTransaction(ctx context.Context, args SendTxArgs) (types.Hash, error) + func (s *PublicTransactionPoolAPI) Sign(addr types.Address, data types.BytesForJson) (types.BytesForJson, 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]types.UintForJson + type RPCTransaction struct + Actions []*SendTxAction + BlockHash types.Hash + BlockNumber *types.BigInt + From types.Address + Hash types.Hash + Nonce types.Uint64ForJson + R *types.BigInt + S *types.BigInt + TransactionIndex types.UintForJson + V *types.BigInt + type SendTxAction struct + Address *types.Address + Params *types.BytesForJson + type SendTxArgs struct + Actions []SendTxAction + From types.Address + Nonce *types.Uint64ForJson + type SignTransactionResult struct + Raw types.BytesForJson + Tx *transaction.Transaction