Versions in this module Expand all Collapse all v1 v1.0.1 Jun 12, 2023 Changes in this version + func AccessList(ctx context.Context, b Backend, blockNrOrHash rpc.BlockNumberOrHash, ...) (acl types.AccessList, gasUsed uint64, vmErr error, err error) + func DoCall(ctx context.Context, b Backend, args CallArgs, ...) (*evmcore.ExecutionResult, error) + func DoEstimateGas(ctx context.Context, b Backend, args CallArgs, ...) (hexutil.Uint64, error) + func GetAPIs(apiBackend Backend) []rpc.API + func RPCMarshalBlock(block *evmcore.EvmBlock, bloom types.Bloom, inclTx bool, fullTx bool) (map[string]interface{}, error) + func RPCMarshalDelegation(it sfcapi.SfcDelegationAndID) map[string]interface + func RPCMarshalEvent(event inter.EventPayloadI, inclTx bool, fullTx bool) (map[string]interface{}, error) + func RPCMarshalEventHeader(header inter.EventI) map[string]interface + func RPCMarshalHeader(head *evmcore.EvmHeader, bloom types.Bloom) map[string]interface + func RPCMarshalStaker(it sfcapi.SfcStakerAndID) 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) (*evmcore.EvmBlock, error) + BlockByNumber func(ctx context.Context, number rpc.BlockNumber) (*evmcore.EvmBlock, error) + CalcLogsBloom func() bool + ChainConfig func() *params.ChainConfig + ChainDb func() ethdb.Database + CurrentBlock func() *evmcore.EvmBlock + CurrentEpoch func(ctx context.Context) idx.Epoch + ExtRPCEnabled func() bool + GetDelegation func(ctx context.Context, id sfcapi.DelegationID) (*sfcapi.SfcDelegation, error) + GetDelegationClaimedRewards func(ctx context.Context, id sfcapi.DelegationID) (*big.Int, error) + GetDelegationsByAddress func(ctx context.Context, addr common.Address) ([]sfcapi.SfcDelegationAndID, error) + GetDelegationsOf func(ctx context.Context, stakerID idx.ValidatorID) ([]sfcapi.SfcDelegationAndID, error) + GetDowntime func(ctx context.Context, stakerID idx.ValidatorID) (idx.Block, inter.Timestamp, error) + GetEVM func(ctx context.Context, msg evmcore.Message, state *state.StateDB, ...) (*vm.EVM, func() error, error) + GetEvent func(ctx context.Context, shortEventID string) (*inter.Event, error) + GetEventPayload func(ctx context.Context, shortEventID string) (*inter.EventPayload, error) + GetHeads func(ctx context.Context, epoch rpc.BlockNumber) (hash.Events, error) + GetOriginatedFee func(ctx context.Context, stakerID idx.ValidatorID) (*big.Int, error) + GetPoolNonce func(ctx context.Context, addr common.Address) (uint64, error) + GetPoolTransaction func(txHash common.Hash) *types.Transaction + GetPoolTransactions func() (types.Transactions, error) + GetReceiptsByNumber func(ctx context.Context, number rpc.BlockNumber) (types.Receipts, error) + GetRewardWeights func(ctx context.Context, stakerID idx.ValidatorID) (*big.Int, *big.Int, error) + GetStaker func(ctx context.Context, stakerID idx.ValidatorID) (*sfcapi.SfcStaker, error) + GetStakerClaimedRewards func(ctx context.Context, stakerID idx.ValidatorID) (*big.Int, error) + GetStakerDelegationsClaimedRewards func(ctx context.Context, stakerID idx.ValidatorID) (*big.Int, error) + GetStakerID func(ctx context.Context, addr common.Address) (idx.ValidatorID, error) + GetStakerPoI func(ctx context.Context, stakerID idx.ValidatorID) (*big.Int, error) + GetStakers func(ctx context.Context) ([]sfcapi.SfcStakerAndID, error) + GetTd func(hash common.Hash) *big.Int + GetTransaction func(ctx context.Context, txHash common.Hash) (*types.Transaction, uint64, uint64, error) + GetUptime func(ctx context.Context, stakerID idx.ValidatorID) (*big.Int, error) + GetValidators func(ctx context.Context) *pos.Validators + HeaderByHash func(ctx context.Context, hash common.Hash) (*evmcore.EvmHeader, error) + HeaderByNumber func(ctx context.Context, number rpc.BlockNumber) (*evmcore.EvmHeader, error) + MaxGasLimit func() uint64 + MinGasPrice func() *big.Int + Progress func() PeerProgress + RPCGasCap func() uint64 + RPCTxFeeCap func() float64 + SealedEpochTiming func(ctx context.Context) (start inter.Timestamp, end inter.Timestamp) + SendTx func(ctx context.Context, signedTx *types.Transaction) error + StateAndHeaderByNumberOrHash func(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*state.StateDB, *evmcore.EvmHeader, error) + Stats func() (pending int, queued int) + SubscribeNewTxsNotify func(chan<- evmcore.NewTxsNotify) notify.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 OverrideAccount struct + Balance **hexutil.Big + Code *hexutil.Bytes + Nonce *hexutil.Uint64 + State *map[common.Hash]common.Hash + StateDiff *map[common.Hash]common.Hash + type PeerProgress struct + CurrentBlock idx.Block + CurrentBlockHash hash.Event + CurrentBlockTime inter.Timestamp + CurrentEpoch idx.Epoch + HighestBlock idx.Block + HighestEpoch idx.Epoch + 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) error + type PublicAbftAPI struct + func NewPublicAbftAPI(b Backend) *PublicAbftAPI + func (s *PublicAbftAPI) GetDowntime(ctx context.Context, validatorID hexutil.Uint) (map[string]interface{}, error) + func (s *PublicAbftAPI) GetEpochUptime(ctx context.Context, validatorID hexutil.Uint) (hexutil.Uint64, error) + func (s *PublicAbftAPI) GetOriginatedEpochFee(ctx context.Context, validatorID hexutil.Uint) (*hexutil.Big, error) + type PublicAccountAPI struct + func NewPublicAccountAPI(am *accounts.Manager) *PublicAccountAPI + func (s *PublicAccountAPI) Accounts() []common.Address + type PublicBlockChainAPI struct + func NewPublicBlockChainAPI(b Backend) *PublicBlockChainAPI + func (api *PublicBlockChainAPI) ChainId() (*hexutil.Big, error) + func (s *PublicBlockChainAPI) BlockNumber() hexutil.Uint64 + func (s *PublicBlockChainAPI) Call(ctx context.Context, args CallArgs, blockNrOrHash rpc.BlockNumberOrHash, ...) (hexutil.Bytes, error) + func (s *PublicBlockChainAPI) CreateAccessList(ctx context.Context, args SendTxArgs, blockNrOrHash *rpc.BlockNumberOrHash) (*accessListResult, error) + func (s *PublicBlockChainAPI) CurrentEpoch(ctx context.Context) hexutil.Uint64 + 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) GetEpochStats(ctx context.Context, requestedEpoch rpc.BlockNumber) (map[string]interface{}, 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 PublicDAGChainAPI struct + func NewPublicDAGChainAPI(b Backend) *PublicDAGChainAPI + func (s *PublicDAGChainAPI) GetEvent(ctx context.Context, shortEventID string) (map[string]interface{}, error) + func (s *PublicDAGChainAPI) GetEventPayload(ctx context.Context, shortEventID string, inclTx bool) (map[string]interface{}, error) + func (s *PublicDAGChainAPI) GetHeads(ctx context.Context, epoch rpc.BlockNumber) ([]hexutil.Bytes, error) + type PublicDebugAPI struct + func NewPublicDebugAPI(b Backend) *PublicDebugAPI + func (api *PublicDebugAPI) BlocksTransactionTimes(ctx context.Context, untilBlock rpc.BlockNumber, maxBlocks hexutil.Uint64) (map[hexutil.Uint64]hexutil.Uint, error) + 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 PublicSfcAPI struct + func NewPublicSfcAPI(b Backend) *PublicSfcAPI + func (s *PublicSfcAPI) GetDelegation(ctx context.Context, addr common.Address, stakerID hexutil.Uint, ...) (map[string]interface{}, error) + func (s *PublicSfcAPI) GetDelegationClaimedRewards(ctx context.Context, addr common.Address, stakerID hexutil.Uint) (*hexutil.Big, error) + func (s *PublicSfcAPI) GetDelegationsByAddress(ctx context.Context, addr common.Address, verbosity hexutil.Uint64) ([]interface{}, error) + func (s *PublicSfcAPI) GetDelegationsOf(ctx context.Context, stakerID hexutil.Uint64, verbosity hexutil.Uint64) ([]interface{}, error) + func (s *PublicSfcAPI) GetDowntime(ctx context.Context, stakerID hexutil.Uint) (map[string]interface{}, error) + func (s *PublicSfcAPI) GetOriginationScore(ctx context.Context, stakerID hexutil.Uint) (*hexutil.Big, error) + func (s *PublicSfcAPI) GetRewardWeights(ctx context.Context, stakerID hexutil.Uint) (map[string]interface{}, error) + func (s *PublicSfcAPI) GetStaker(ctx context.Context, stakerID hexutil.Uint, verbosity hexutil.Uint64) (map[string]interface{}, error) + func (s *PublicSfcAPI) GetStakerByAddress(ctx context.Context, address common.Address, verbosity hexutil.Uint64) (map[string]interface{}, error) + func (s *PublicSfcAPI) GetStakerClaimedRewards(ctx context.Context, stakerID hexutil.Uint64) (*hexutil.Big, error) + func (s *PublicSfcAPI) GetStakerDelegationsClaimedRewards(ctx context.Context, stakerID hexutil.Uint64) (*hexutil.Big, error) + func (s *PublicSfcAPI) GetStakerPoI(ctx context.Context, stakerID hexutil.Uint) (*hexutil.Big, error) + func (s *PublicSfcAPI) GetStakers(ctx context.Context, verbosity hexutil.Uint64) ([]interface{}, error) + func (s *PublicSfcAPI) GetValidationScore(ctx context.Context, stakerID hexutil.Uint) (*hexutil.Big, error) + 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, 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() 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 RawWallet struct + Accounts []accounts.Account + Failure string + Status string + URL string + 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 StateOverride map[common.Address]OverrideAccount + func (diff *StateOverride) Apply(state *state.StateDB) error + 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