Documentation
¶
Index ¶
- func ExecAuthRPC[R any](ctx context.Context, w *services.Services, cfg *AuthExecCfg, method string, ...) (*R, error)
- func RPCMarshalHeader(head *types.Header) map[string]interface{}
- func SafeGenericToString[R any](r *R) string
- func SendRawTx(ctx context.Context, w *services.Services, input hexutil.Bytes) (gethcommon.Hash, error)
- func UnauthenticatedTenRPCCall[R any](ctx context.Context, w *services.Services, cfg *cache.Cfg, method string, ...) (*R, error)
- type AccountResult
- type AuthExecCfg
- type BlockChainAPI
- func (api *BlockChainAPI) BlockNumber() hexutil.Uint64
- func (api *BlockChainAPI) Call(ctx context.Context, args gethapi.TransactionArgs, ...) (hexutil.Bytes, error)
- func (api *BlockChainAPI) ChainId() *hexutil.Big
- func (api *BlockChainAPI) CreateAccessList(ctx context.Context, args gethapi.TransactionArgs, ...) (*accessListResult, error)
- func (api *BlockChainAPI) EstimateGas(ctx context.Context, args gethapi.TransactionArgs, ...) (hexutil.Uint64, error)
- func (api *BlockChainAPI) GetBalance(ctx context.Context, address gethcommon.Address, ...) (*hexutil.Big, error)
- func (api *BlockChainAPI) GetBlockByHash(ctx context.Context, hash gethcommon.Hash, fullTx bool) (map[string]interface{}, error)
- func (api *BlockChainAPI) GetBlockByNumber(ctx context.Context, number rpc.BlockNumber, fullTx bool) (map[string]interface{}, error)
- func (api *BlockChainAPI) GetBlockReceipts(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) ([]map[string]interface{}, error)
- func (api *BlockChainAPI) GetCode(ctx context.Context, address gethcommon.Address, ...) (hexutil.Bytes, error)
- func (api *BlockChainAPI) GetHeaderByHash(ctx context.Context, hash gethcommon.Hash) map[string]interface{}
- func (api *BlockChainAPI) GetHeaderByNumber(ctx context.Context, number rpc.BlockNumber) (map[string]interface{}, error)
- func (api *BlockChainAPI) GetProof(ctx context.Context, address gethcommon.Address, storageKeys []string, ...) (*AccountResult, error)
- func (api *BlockChainAPI) GetStorageAt(ctx context.Context, address gethcommon.Address, params string, ...) (hexutil.Bytes, error)
- type BlockOverrides
- type CircularBuffer
- type ConfigResponseJson
- type CrossChainProof
- type DebugAPI
- func (api *DebugAPI) ChaindbCompact() error
- func (api *DebugAPI) ChaindbProperty(property string) (string, error)
- func (api *DebugAPI) EventLogRelevancy(ctx context.Context, crit common.FilterCriteria) ([]*common.DebugLogVisibility, error)
- func (api *DebugAPI) GetRawBlock(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (hexutil.Bytes, error)
- func (api *DebugAPI) GetRawHeader(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (hexutil.Bytes, error)
- func (api *DebugAPI) GetRawReceipts(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) ([]hexutil.Bytes, error)
- func (api *DebugAPI) GetRawTransaction(ctx context.Context, hash gethcommon.Hash) (hexutil.Bytes, error)
- func (api *DebugAPI) PrintBlock(ctx context.Context, number uint64) (string, error)
- func (api *DebugAPI) SetHead(number hexutil.Uint64)
- type EthereumAPI
- func (api *EthereumAPI) FeeHistory(ctx context.Context, blockCount math.HexOrDecimal64, lastBlock rpc.BlockNumber, ...) (*FeeHistoryResult, error)
- func (api *EthereumAPI) GasPrice(ctx context.Context) (*hexutil.Big, error)
- func (api *EthereumAPI) MaxPriorityFeePerGas(ctx context.Context) (*hexutil.Big, error)
- func (api *EthereumAPI) Syncing() (interface{}, error)
- type FeeHistoryResult
- type FilterAPI
- func (api *FilterAPI) GetFilterChanges(id rpc.ID) (interface{}, error)
- func (api *FilterAPI) GetFilterLogs(ctx context.Context, id rpc.ID) ([]*types.Log, error)
- func (api *FilterAPI) GetLogs(ctx context.Context, crit common.FilterCriteria) ([]*types.Log, error)
- func (api *FilterAPI) Logs(ctx context.Context, crit common.FilterCriteria) (*rpc.Subscription, error)
- func (api *FilterAPI) NewBlockFilter() rpc.ID
- func (api *FilterAPI) NewFilter(crit common.FilterCriteria) (rpc.ID, error)
- func (api *FilterAPI) NewHeads(ctx context.Context) (*rpc.Subscription, error)
- func (api *FilterAPI) NewPendingTransactionFilter(_ *bool) rpc.ID
- func (api *FilterAPI) NewPendingTransactions(ctx context.Context, fullTx *bool) (*rpc.Subscription, error)
- func (api *FilterAPI) UninstallFilter(id rpc.ID) bool
- type LogKey
- type NetAPI
- type OverrideAccount
- type SessionKeyAPI
- type SignTransactionResult
- type StateOverride
- type StorageResult
- type TenAPI
- type TransactionAPI
- func (s *TransactionAPI) FillTransaction(ctx context.Context, args gethapi.TransactionArgs) (*SignTransactionResult, error)
- func (s *TransactionAPI) GetBlockTransactionCountByHash(ctx context.Context, blockHash common.Hash) *hexutil.Uint
- func (s *TransactionAPI) GetBlockTransactionCountByNumber(ctx context.Context, blockNr gethrpc.BlockNumber) *hexutil.Uint
- func (s *TransactionAPI) GetRawTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) hexutil.Bytes
- func (s *TransactionAPI) GetRawTransactionByBlockNumberAndIndex(ctx context.Context, blockNr gethrpc.BlockNumber, index hexutil.Uint) hexutil.Bytes
- func (s *TransactionAPI) GetRawTransactionByHash(ctx context.Context, hash common.Hash) (hexutil.Bytes, error)
- func (s *TransactionAPI) GetTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) *rpc.RpcTransaction
- func (s *TransactionAPI) GetTransactionByBlockNumberAndIndex(ctx context.Context, blockNr gethrpc.BlockNumber, index hexutil.Uint) *rpc.RpcTransaction
- func (s *TransactionAPI) GetTransactionByHash(ctx context.Context, hash common.Hash) (*rpc.RpcTransaction, error)
- func (s *TransactionAPI) GetTransactionCount(ctx context.Context, address common.Address, ...) (*hexutil.Uint64, error)
- func (s *TransactionAPI) GetTransactionReceipt(ctx context.Context, hash common.Hash) (map[string]interface{}, error)
- func (s *TransactionAPI) PendingTransactions() ([]*rpc.RpcTransaction, error)
- func (s *TransactionAPI) Resend(ctx context.Context, sendArgs gethapi.TransactionArgs, gasPrice *hexutil.Big, ...) (common.Hash, error)
- func (s *TransactionAPI) SendRawTransaction(ctx context.Context, input hexutil.Bytes) (common.Hash, error)
- func (s *TransactionAPI) SendTransaction(ctx context.Context, args gethapi.TransactionArgs) (common.Hash, error)
- type TxPoolAPI
- type Web3API
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecAuthRPC ¶
func RPCMarshalHeader ¶ added in v0.26.0
RPCMarshalHeader converts the given header to the RPC output . duplicated from go-ethereum
func SafeGenericToString ¶ added in v0.28.0
Types ¶
type AccountResult ¶
type AccountResult struct { Address gethcommon.Address `json:"address"` AccountProof []string `json:"accountProof"` Balance *hexutil.Big `json:"balance"` CodeHash gethcommon.Hash `json:"codeHash"` Nonce hexutil.Uint64 `json:"nonce"` StorageHash gethcommon.Hash `json:"storageHash"` StorageProof []StorageResult `json:"storageProof"` }
Result structs for GetProof
type AuthExecCfg ¶ added in v1.0.0
type AuthExecCfg struct {
// contains filtered or unexported fields
}
type BlockChainAPI ¶
type BlockChainAPI struct {
// contains filtered or unexported fields
}
func NewBlockChainAPI ¶
func NewBlockChainAPI(we *services.Services) *BlockChainAPI
func (*BlockChainAPI) BlockNumber ¶
func (api *BlockChainAPI) BlockNumber() hexutil.Uint64
func (*BlockChainAPI) Call ¶
func (api *BlockChainAPI) Call(ctx context.Context, args gethapi.TransactionArgs, blockNrOrHash rpc.BlockNumberOrHash, overrides *StateOverride, blockOverrides *BlockOverrides) (hexutil.Bytes, error)
func (*BlockChainAPI) ChainId ¶
func (api *BlockChainAPI) ChainId() *hexutil.Big
func (*BlockChainAPI) CreateAccessList ¶
func (api *BlockChainAPI) CreateAccessList(ctx context.Context, args gethapi.TransactionArgs, blockNrOrHash *rpc.BlockNumberOrHash) (*accessListResult, error)
func (*BlockChainAPI) EstimateGas ¶
func (api *BlockChainAPI) EstimateGas(ctx context.Context, args gethapi.TransactionArgs, blockNrOrHash *rpc.BlockNumberOrHash, overrides *StateOverride) (hexutil.Uint64, error)
func (*BlockChainAPI) GetBalance ¶
func (api *BlockChainAPI) GetBalance(ctx context.Context, address gethcommon.Address, blockNrOrHash rpc.BlockNumberOrHash) (*hexutil.Big, error)
func (*BlockChainAPI) GetBlockByHash ¶
func (api *BlockChainAPI) GetBlockByHash(ctx context.Context, hash gethcommon.Hash, fullTx bool) (map[string]interface{}, error)
func (*BlockChainAPI) GetBlockByNumber ¶
func (api *BlockChainAPI) GetBlockByNumber(ctx context.Context, number rpc.BlockNumber, fullTx bool) (map[string]interface{}, error)
func (*BlockChainAPI) GetBlockReceipts ¶
func (api *BlockChainAPI) GetBlockReceipts(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) ([]map[string]interface{}, error)
func (*BlockChainAPI) GetCode ¶
func (api *BlockChainAPI) GetCode(ctx context.Context, address gethcommon.Address, blockNrOrHash rpc.BlockNumberOrHash) (hexutil.Bytes, error)
func (*BlockChainAPI) GetHeaderByHash ¶
func (api *BlockChainAPI) GetHeaderByHash(ctx context.Context, hash gethcommon.Hash) map[string]interface{}
func (*BlockChainAPI) GetHeaderByNumber ¶
func (api *BlockChainAPI) GetHeaderByNumber(ctx context.Context, number rpc.BlockNumber) (map[string]interface{}, error)
func (*BlockChainAPI) GetProof ¶
func (api *BlockChainAPI) GetProof(ctx context.Context, address gethcommon.Address, storageKeys []string, blockNrOrHash rpc.BlockNumberOrHash) (*AccountResult, error)
func (*BlockChainAPI) GetStorageAt ¶
func (api *BlockChainAPI) GetStorageAt(ctx context.Context, address gethcommon.Address, params string, _ rpc.BlockNumberOrHash) (hexutil.Bytes, error)
GetStorageAt - This method signature matches eth_getStorageAt, but we use the address field to specify the custom query method, the hex-encoded position field to specify the parameters json, and nil for the block number.
type BlockOverrides ¶
type CircularBuffer ¶
type CircularBuffer struct {
// contains filtered or unexported fields
}
CircularBuffer is a data structure that uses a single, fixed-size buffer as if it was connected end-to-end.
func NewCircularBuffer ¶
func NewCircularBuffer(size int) *CircularBuffer
NewCircularBuffer initializes a new CircularBuffer of the given size.
func (*CircularBuffer) Contains ¶
func (cb *CircularBuffer) Contains(key LogKey) bool
Contains checks if the given LogKey exists in the buffer
func (*CircularBuffer) Push ¶
func (cb *CircularBuffer) Push(key LogKey)
Push adds a new LogKey to the end of the buffer. If the buffer is full, it overwrites the oldest data with the new LogKey.
type ConfigResponseJson ¶ added in v0.27.0
type ConfigResponseJson struct { NetworkConfigAddress string `json:"NetworkConfig"` EnclaveRegistryAddress string `json:"EnclaveRegistry"` DataAvailabilityRegistryAddress string `json:"DataAvailabilityRegistry"` CrossChainAddress string `json:"CrossChain"` L1MessageBusAddress string `json:"L1MessageBus"` L2MessageBusAddress string `json:"L2MessageBus"` TransactionPostProcessorAddress string `json:"TransactionsPostProcessor"` L1Bridge string `json:"L1Bridge"` L2Bridge string `json:"L2Bridge"` L1CrossChainMessenger string `json:"L1CrossChainMessenger"` L2CrossChainMessenger string `json:"L2CrossChainMessenger"` SystemContractsUpgrader string `json:"SystemContractsUpgrader"` L1StartHash string `json:"L1StartHash"` PublicSystemContracts map[string]string `json:"PublicSystemContracts"` AdditionalContracts interface{} `json:"AdditionalContracts"` }
type CrossChainProof ¶ added in v1.0.0
type CrossChainProof struct { Proof []byte Root gethcommon.Hash }
type DebugAPI ¶
type DebugAPI struct {
// contains filtered or unexported fields
}
func NewDebugAPI ¶
func (*DebugAPI) ChaindbCompact ¶
func (*DebugAPI) ChaindbProperty ¶
func (*DebugAPI) EventLogRelevancy ¶
func (api *DebugAPI) EventLogRelevancy(ctx context.Context, crit common.FilterCriteria) ([]*common.DebugLogVisibility, error)
EventLogRelevancy - specific to TEN the FilterCriteria must have a single contract address and only the topics on the position 0 ( event signatures) the caller must be the contract deployer Intended for debug purposes for the owner of a contract. It doesn't reveal any user information.
func (*DebugAPI) GetRawBlock ¶
func (*DebugAPI) GetRawHeader ¶
func (*DebugAPI) GetRawReceipts ¶
func (*DebugAPI) GetRawTransaction ¶
func (*DebugAPI) PrintBlock ¶
type EthereumAPI ¶
type EthereumAPI struct {
// contains filtered or unexported fields
}
func NewEthereumAPI ¶
func NewEthereumAPI(we *services.Services, ) *EthereumAPI
func (*EthereumAPI) FeeHistory ¶
func (api *EthereumAPI) FeeHistory(ctx context.Context, blockCount math.HexOrDecimal64, lastBlock rpc.BlockNumber, rewardPercentiles []float64) (*FeeHistoryResult, error)
func (*EthereumAPI) MaxPriorityFeePerGas ¶
func (*EthereumAPI) Syncing ¶
func (api *EthereumAPI) Syncing() (interface{}, error)
type FeeHistoryResult ¶
type FilterAPI ¶
type FilterAPI struct {
// contains filtered or unexported fields
}
func NewFilterAPI ¶
func (*FilterAPI) GetFilterChanges ¶
func (*FilterAPI) GetFilterLogs ¶
func (*FilterAPI) Logs ¶
func (api *FilterAPI) Logs(ctx context.Context, crit common.FilterCriteria) (*rpc.Subscription, error)
func (*FilterAPI) NewBlockFilter ¶
func (*FilterAPI) NewPendingTransactionFilter ¶
func (*FilterAPI) NewPendingTransactions ¶
type LogKey ¶
type LogKey struct { BlockHash common.Hash // Not necessary, but can be helpful in edge case of block reorg. TxHash common.Hash Index uint }
LogKey uniquely represents a log (consists of BlockHash, TxHash, and Index)
type NetAPI ¶ added in v0.24.2
type NetAPI struct {
// contains filtered or unexported fields
}
type OverrideAccount ¶
type OverrideAccount struct { Nonce *hexutil.Uint64 `json:"nonce"` Code *hexutil.Bytes `json:"code"` Balance **hexutil.Big `json:"balance"` State *map[gethcommon.Hash]gethcommon.Hash `json:"state"` StateDiff *map[gethcommon.Hash]gethcommon.Hash `json:"stateDiff"` }
type SessionKeyAPI ¶ added in v1.0.0
type SessionKeyAPI struct {
// contains filtered or unexported fields
}
func NewSessionKeyAPI ¶ added in v1.0.0
func NewSessionKeyAPI(we *services.Services) *SessionKeyAPI
func (*SessionKeyAPI) Activate ¶ added in v1.0.0
func (api *SessionKeyAPI) Activate(ctx context.Context) (bool, error)
func (*SessionKeyAPI) Create ¶ added in v1.0.0
func (api *SessionKeyAPI) Create(ctx context.Context) (string, error)
Create - returns hex-encoded checksum address of the newly created SK
func (*SessionKeyAPI) Deactivate ¶ added in v1.0.0
func (api *SessionKeyAPI) Deactivate(ctx context.Context) (bool, error)
type SignTransactionResult ¶
type SignTransactionResult struct { Raw hexutil.Bytes `json:"raw"` Tx *types.Transaction `json:"tx"` }
type StateOverride ¶
type StateOverride map[gethcommon.Address]OverrideAccount
type StorageResult ¶
type TenAPI ¶ added in v1.0.0
type TenAPI struct {
// contains filtered or unexported fields
}
func (*TenAPI) GetCrossChainProof ¶ added in v1.0.0
func (api *TenAPI) GetCrossChainProof(ctx context.Context, messageType string, crossChainMessage gethcommon.Hash) (*CrossChainProof, error)
type TransactionAPI ¶
type TransactionAPI struct {
// contains filtered or unexported fields
}
func NewTransactionAPI ¶
func NewTransactionAPI(we *services.Services) *TransactionAPI
func (*TransactionAPI) FillTransaction ¶
func (s *TransactionAPI) FillTransaction(ctx context.Context, args gethapi.TransactionArgs) (*SignTransactionResult, error)
func (*TransactionAPI) GetBlockTransactionCountByHash ¶
func (*TransactionAPI) GetBlockTransactionCountByNumber ¶
func (s *TransactionAPI) GetBlockTransactionCountByNumber(ctx context.Context, blockNr gethrpc.BlockNumber) *hexutil.Uint
func (*TransactionAPI) GetRawTransactionByBlockHashAndIndex ¶
func (*TransactionAPI) GetRawTransactionByBlockNumberAndIndex ¶
func (s *TransactionAPI) GetRawTransactionByBlockNumberAndIndex(ctx context.Context, blockNr gethrpc.BlockNumber, index hexutil.Uint) hexutil.Bytes
func (*TransactionAPI) GetRawTransactionByHash ¶
func (*TransactionAPI) GetTransactionByBlockHashAndIndex ¶
func (s *TransactionAPI) GetTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) *rpc.RpcTransaction
func (*TransactionAPI) GetTransactionByBlockNumberAndIndex ¶
func (s *TransactionAPI) GetTransactionByBlockNumberAndIndex(ctx context.Context, blockNr gethrpc.BlockNumber, index hexutil.Uint) *rpc.RpcTransaction
func (*TransactionAPI) GetTransactionByHash ¶
func (s *TransactionAPI) GetTransactionByHash(ctx context.Context, hash common.Hash) (*rpc.RpcTransaction, error)
func (*TransactionAPI) GetTransactionCount ¶
func (s *TransactionAPI) GetTransactionCount(ctx context.Context, address common.Address, blockNrOrHash gethrpc.BlockNumberOrHash) (*hexutil.Uint64, error)
func (*TransactionAPI) GetTransactionReceipt ¶
func (*TransactionAPI) PendingTransactions ¶
func (s *TransactionAPI) PendingTransactions() ([]*rpc.RpcTransaction, error)
func (*TransactionAPI) SendRawTransaction ¶
func (*TransactionAPI) SendTransaction ¶
func (s *TransactionAPI) SendTransaction(ctx context.Context, args gethapi.TransactionArgs) (common.Hash, error)
type TxPoolAPI ¶
type TxPoolAPI struct {
// contains filtered or unexported fields
}