Documentation
¶
Index ¶
- type Key
- func (k *Key) Address() types.Address
- func (k *Key) MockReset(t *testing.T)
- func (k *Key) SignMessage(ctx context.Context, data []byte) (*types.Signature, error)
- func (k *Key) SignTransaction(ctx context.Context, tx *types.Transaction) error
- func (k *Key) VerifyMessage(ctx context.Context, data []byte, sig types.Signature) bool
- type RPC
- func (r *RPC) Accounts(ctx context.Context) ([]types.Address, error)
- func (r *RPC) BlockByHash(ctx context.Context, hash types.Hash, full bool) (*types.Block, error)
- func (r *RPC) BlockByNumber(ctx context.Context, number types.BlockNumber, full bool) (*types.Block, error)
- func (r *RPC) BlockNumber(ctx context.Context) (*big.Int, error)
- func (r *RPC) Call(ctx context.Context, call *types.Call, block types.BlockNumber) ([]byte, *types.Call, error)
- func (r *RPC) ChainID(ctx context.Context) (uint64, error)
- func (r *RPC) ClientVersion(ctx context.Context) (string, error)
- func (r *RPC) EstimateGas(ctx context.Context, call *types.Call, block types.BlockNumber) (uint64, *types.Call, error)
- func (r *RPC) GasPrice(ctx context.Context) (*big.Int, error)
- func (r *RPC) GetBalance(ctx context.Context, address types.Address, block types.BlockNumber) (*big.Int, error)
- func (r *RPC) GetBlockFilterChanges(ctx context.Context, id *big.Int) ([]types.Hash, error)
- func (r *RPC) GetBlockReceipts(ctx context.Context, block types.BlockNumber) ([]*types.TransactionReceipt, error)
- func (r *RPC) GetBlockTransactionCountByHash(ctx context.Context, hash types.Hash) (uint64, error)
- func (r *RPC) GetBlockTransactionCountByNumber(ctx context.Context, number types.BlockNumber) (uint64, error)
- func (r *RPC) GetCode(ctx context.Context, account types.Address, block types.BlockNumber) ([]byte, error)
- func (r *RPC) GetFilterChanges(ctx context.Context, id *big.Int) ([]types.Log, error)
- func (r *RPC) GetFilterLogs(ctx context.Context, id *big.Int) ([]types.Log, error)
- func (r *RPC) GetLogs(ctx context.Context, query *types.FilterLogsQuery) ([]types.Log, error)
- func (r *RPC) GetStorageAt(ctx context.Context, account types.Address, key types.Hash, ...) (*types.Hash, error)
- func (r *RPC) GetTransactionByBlockHashAndIndex(ctx context.Context, hash types.Hash, index uint64) (*types.OnChainTransaction, error)
- func (r *RPC) GetTransactionByBlockNumberAndIndex(ctx context.Context, number types.BlockNumber, index uint64) (*types.OnChainTransaction, error)
- func (r *RPC) GetTransactionByHash(ctx context.Context, hash types.Hash) (*types.OnChainTransaction, error)
- func (r *RPC) GetTransactionCount(ctx context.Context, account types.Address, block types.BlockNumber) (uint64, error)
- func (r *RPC) GetTransactionReceipt(ctx context.Context, hash types.Hash) (*types.TransactionReceipt, error)
- func (r *RPC) GetUncleByBlockHashAndIndex(ctx context.Context, hash types.Hash, index uint64) (*types.Block, error)
- func (r *RPC) GetUncleByBlockNumberAndIndex(ctx context.Context, number types.BlockNumber, index uint64) (*types.Block, error)
- func (r *RPC) GetUncleCountByBlockHash(ctx context.Context, hash types.Hash) (uint64, error)
- func (r *RPC) GetUncleCountByBlockNumber(ctx context.Context, number types.BlockNumber) (uint64, error)
- func (r *RPC) Listening(ctx context.Context) (bool, error)
- func (r *RPC) MaxPriorityFeePerGas(ctx context.Context) (*big.Int, error)
- func (r *RPC) MockReset(t *testing.T)
- func (r *RPC) NetworkID(ctx context.Context) (uint64, error)
- func (r *RPC) NewBlockFilter(ctx context.Context) (*big.Int, error)
- func (r *RPC) NewFilter(ctx context.Context, query *types.FilterLogsQuery) (*big.Int, error)
- func (r *RPC) NewPendingTransactionFilter(ctx context.Context) (*big.Int, error)
- func (r *RPC) PeerCount(ctx context.Context) (uint64, error)
- func (r *RPC) ProtocolVersion(ctx context.Context) (uint64, error)
- func (r *RPC) SendRawTransaction(ctx context.Context, data []byte) (*types.Hash, error)
- func (r *RPC) SendTransaction(ctx context.Context, tx *types.Transaction) (*types.Hash, *types.Transaction, error)
- func (r *RPC) Sign(ctx context.Context, account types.Address, data []byte) (*types.Signature, error)
- func (r *RPC) SignTransaction(ctx context.Context, tx *types.Transaction) ([]byte, *types.Transaction, error)
- func (r *RPC) SubscribeLogs(ctx context.Context, query *types.FilterLogsQuery) (<-chan types.Log, error)
- func (r *RPC) SubscribeNewHeads(ctx context.Context) (<-chan types.Block, error)
- func (r *RPC) SubscribeNewPendingTransactions(ctx context.Context) (<-chan types.Hash, error)
- func (r *RPC) Syncing(ctx context.Context) (*types.SyncStatus, error)
- func (r *RPC) UninstallFilter(ctx context.Context, id *big.Int) (bool, error)
- type Recoverer
- func (r *Recoverer) MockReset(t *testing.T)
- func (r *Recoverer) RecoverHash(hash types.Hash, sig types.Signature) (*types.Address, error)
- func (r *Recoverer) RecoverMessage(data []byte, sig types.Signature) (*types.Address, error)
- func (r *Recoverer) RecoverTransaction(tx *types.Transaction) (*types.Address, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key struct {
sync.RWMutex
AddressFn func() types.Address
SignMessageFn func(ctx context.Context, data []byte) (*types.Signature, error)
SignTransactionFn func(ctx context.Context, tx *types.Transaction) error
VerifyMessageFn func(ctx context.Context, data []byte, sig types.Signature) bool
}
func (*Key) SignMessage ¶
func (*Key) SignTransaction ¶
type RPC ¶
type RPC struct {
sync.RWMutex
ClientVersionFn func(ctx context.Context) (string, error)
ListeningFn func(ctx context.Context) (bool, error)
PeerCountFn func(ctx context.Context) (uint64, error)
ProtocolVersionFn func(ctx context.Context) (uint64, error)
SyncingFn func(ctx context.Context) (*types.SyncStatus, error)
NetworkIDFn func(ctx context.Context) (uint64, error)
ChainIDFn func(ctx context.Context) (uint64, error)
GasPriceFn func(ctx context.Context) (*big.Int, error)
AccountsFn func(ctx context.Context) ([]types.Address, error)
BlockNumberFn func(ctx context.Context) (*big.Int, error)
GetBalanceFn func(ctx context.Context, address types.Address, block types.BlockNumber) (*big.Int, error)
GetStorageAtFn func(ctx context.Context, account types.Address, key types.Hash, block types.BlockNumber) (*types.Hash, error)
GetTransactionCountFn func(ctx context.Context, account types.Address, block types.BlockNumber) (uint64, error)
GetBlockTransactionCountByHashFn func(ctx context.Context, hash types.Hash) (uint64, error)
GetBlockTransactionCountByNumberFn func(ctx context.Context, number types.BlockNumber) (uint64, error)
GetUncleCountByBlockHashFn func(ctx context.Context, hash types.Hash) (uint64, error)
GetUncleCountByBlockNumberFn func(ctx context.Context, number types.BlockNumber) (uint64, error)
GetCodeFn func(ctx context.Context, account types.Address, block types.BlockNumber) ([]byte, error)
SignFn func(ctx context.Context, account types.Address, data []byte) (*types.Signature, error)
SignTransactionFn func(ctx context.Context, tx *types.Transaction) ([]byte, *types.Transaction, error)
SendTransactionFn func(ctx context.Context, tx *types.Transaction) (*types.Hash, *types.Transaction, error)
SendRawTransactionFn func(ctx context.Context, data []byte) (*types.Hash, error)
CallFn func(ctx context.Context, call *types.Call, block types.BlockNumber) ([]byte, *types.Call, error)
EstimateGasFn func(ctx context.Context, call *types.Call, block types.BlockNumber) (uint64, *types.Call, error)
BlockByHashFn func(ctx context.Context, hash types.Hash, full bool) (*types.Block, error)
BlockByNumberFn func(ctx context.Context, number types.BlockNumber, full bool) (*types.Block, error)
GetTransactionByHashFn func(ctx context.Context, hash types.Hash) (*types.OnChainTransaction, error)
GetTransactionByBlockHashAndIndexFn func(ctx context.Context, hash types.Hash, index uint64) (*types.OnChainTransaction, error)
GetTransactionByBlockNumberAndIndexFn func(ctx context.Context, number types.BlockNumber, index uint64) (*types.OnChainTransaction, error)
GetTransactionReceiptFn func(ctx context.Context, hash types.Hash) (*types.TransactionReceipt, error)
GetBlockReceiptsFn func(ctx context.Context, block types.BlockNumber) ([]*types.TransactionReceipt, error)
GetUncleByBlockHashAndIndexFn func(ctx context.Context, hash types.Hash, index uint64) (*types.Block, error)
GetUncleByBlockNumberAndIndexFn func(ctx context.Context, number types.BlockNumber, index uint64) (*types.Block, error)
NewFilterFn func(ctx context.Context, query *types.FilterLogsQuery) (*big.Int, error)
NewBlockFilterFn func(ctx context.Context) (*big.Int, error)
NewPendingTransactionFilterFn func(ctx context.Context) (*big.Int, error)
UninstallFilterFn func(ctx context.Context, id *big.Int) (bool, error)
GetFilterChangesFn func(ctx context.Context, id *big.Int) ([]types.Log, error)
GetBlockFilterChangesFn func(ctx context.Context, id *big.Int) ([]types.Hash, error)
GetFilterLogsFn func(ctx context.Context, id *big.Int) ([]types.Log, error)
GetLogsFn func(ctx context.Context, query *types.FilterLogsQuery) ([]types.Log, error)
MaxPriorityFeePerGasFn func(ctx context.Context) (*big.Int, error)
SubscribeLogsFn func(ctx context.Context, query *types.FilterLogsQuery) (<-chan types.Log, error)
SubscribeNewHeadsFn func(ctx context.Context) (<-chan types.Block, error)
SubscribeNewPendingTransactionsFn func(ctx context.Context) (<-chan types.Hash, error)
}
func (*RPC) BlockByHash ¶
func (*RPC) BlockByNumber ¶
func (*RPC) EstimateGas ¶
func (*RPC) GetBalance ¶
func (*RPC) GetBlockFilterChanges ¶
func (*RPC) GetBlockReceipts ¶
func (r *RPC) GetBlockReceipts(ctx context.Context, block types.BlockNumber) ([]*types.TransactionReceipt, error)
func (*RPC) GetBlockTransactionCountByHash ¶
func (*RPC) GetBlockTransactionCountByNumber ¶
func (*RPC) GetFilterChanges ¶
func (*RPC) GetFilterLogs ¶
func (*RPC) GetStorageAt ¶
func (*RPC) GetTransactionByBlockHashAndIndex ¶
func (*RPC) GetTransactionByBlockNumberAndIndex ¶
func (r *RPC) GetTransactionByBlockNumberAndIndex(ctx context.Context, number types.BlockNumber, index uint64) (*types.OnChainTransaction, error)
func (*RPC) GetTransactionByHash ¶
func (*RPC) GetTransactionCount ¶
func (*RPC) GetTransactionReceipt ¶
func (*RPC) GetUncleByBlockHashAndIndex ¶
func (*RPC) GetUncleByBlockNumberAndIndex ¶
func (*RPC) GetUncleCountByBlockHash ¶
func (*RPC) GetUncleCountByBlockNumber ¶
func (*RPC) MaxPriorityFeePerGas ¶
func (*RPC) NewPendingTransactionFilter ¶
func (*RPC) SendRawTransaction ¶
func (*RPC) SendTransaction ¶
func (r *RPC) SendTransaction(ctx context.Context, tx *types.Transaction) (*types.Hash, *types.Transaction, error)
func (*RPC) SignTransaction ¶
func (r *RPC) SignTransaction(ctx context.Context, tx *types.Transaction) ([]byte, *types.Transaction, error)
func (*RPC) SubscribeLogs ¶
func (*RPC) SubscribeNewHeads ¶
func (*RPC) SubscribeNewPendingTransactions ¶
type Recoverer ¶
type Recoverer struct {
sync.RWMutex
RecoverHashFn func(hash types.Hash, sig types.Signature) (*types.Address, error)
RecoverMessageFn func(data []byte, sig types.Signature) (*types.Address, error)
RecoverTransactionFn func(tx *types.Transaction) (*types.Address, error)
}
func NewRecoverer ¶
func (*Recoverer) RecoverHash ¶
func (*Recoverer) RecoverMessage ¶
func (*Recoverer) RecoverTransaction ¶
Click to show internal directories.
Click to hide internal directories.