Documentation ¶
Index ¶
- type LocalRelayer
- func (r *LocalRelayer) EstimateGasLimits(ctx context.Context, walletConfig sequence.WalletConfig, ...) (sequence.Transactions, error)
- func (r *LocalRelayer) GetNonce(ctx context.Context, walletConfig sequence.WalletConfig, ...) (*big.Int, error)
- func (r *LocalRelayer) GetProvider() *ethrpc.Provider
- func (r *LocalRelayer) Relay(ctx context.Context, signedTxs *sequence.SignedTransactions) (sequence.MetaTxnID, *types.Transaction, ethtxn.WaitReceipt, error)
- func (r *LocalRelayer) Wait(ctx context.Context, metaTxnID sequence.MetaTxnID, optTimeout *time.Duration) (sequence.MetaTxnStatus, *types.Receipt, error)
- type RpcRelayer
- func (r *RpcRelayer) EstimateGasLimits(ctx context.Context, walletConfig sequence.WalletConfig, ...) (sequence.Transactions, error)
- func (r *RpcRelayer) GetNonce(ctx context.Context, walletConfig sequence.WalletConfig, ...) (*big.Int, error)
- func (r *RpcRelayer) GetProvider() *ethrpc.Provider
- func (r *RpcRelayer) Relay(ctx context.Context, signedTxs *sequence.SignedTransactions) (sequence.MetaTxnID, *types.Transaction, ethtxn.WaitReceipt, error)
- func (r *RpcRelayer) Wait(ctx context.Context, metaTxnID sequence.MetaTxnID, optTimeout *time.Duration) (sequence.MetaTxnStatus, *types.Receipt, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalRelayer ¶
LocalRelayer is a simple implementation of a relayer which will dispatch meta transactions locally. This should only be used for testing / debugging, and never seriously in a real app.
func NewLocalRelayer ¶
func NewLocalRelayer(sender *ethwallet.Wallet) (*LocalRelayer, error)
func (*LocalRelayer) EstimateGasLimits ¶
func (r *LocalRelayer) EstimateGasLimits(ctx context.Context, walletConfig sequence.WalletConfig, walletContext sequence.WalletContext, txns sequence.Transactions) (sequence.Transactions, error)
func (*LocalRelayer) GetProvider ¶
func (r *LocalRelayer) GetProvider() *ethrpc.Provider
func (*LocalRelayer) Relay ¶
func (r *LocalRelayer) Relay(ctx context.Context, signedTxs *sequence.SignedTransactions) (sequence.MetaTxnID, *types.Transaction, ethtxn.WaitReceipt, error)
type RpcRelayer ¶
func NewRpcRelayer ¶ added in v0.2.1
func NewRpcRelayer(provider *ethrpc.Provider, rpcRelayerURL string, httpClient proto.HTTPClient) (*RpcRelayer, error)
func (*RpcRelayer) EstimateGasLimits ¶
func (r *RpcRelayer) EstimateGasLimits(ctx context.Context, walletConfig sequence.WalletConfig, walletContext sequence.WalletContext, txns sequence.Transactions) (sequence.Transactions, error)
..
func (*RpcRelayer) GetNonce ¶
func (r *RpcRelayer) GetNonce(ctx context.Context, walletConfig sequence.WalletConfig, walletContext sequence.WalletContext, space *big.Int, blockNum *big.Int) (*big.Int, error)
NOTE: nonce space is 160 bits wide
func (*RpcRelayer) GetProvider ¶
func (r *RpcRelayer) GetProvider() *ethrpc.Provider
func (*RpcRelayer) Relay ¶
func (r *RpcRelayer) Relay(ctx context.Context, signedTxs *sequence.SignedTransactions) (sequence.MetaTxnID, *types.Transaction, ethtxn.WaitReceipt, error)
Relay will submit the Sequence signed meta transaction to the relayer. The method will block until the relayer responds with the native transaction hash (*types.Transaction), which means the relayer has submitted the transaction request to the network. Clients can use WaitReceipt to wait until the metaTxnID has been mined.
Directories ¶
Path | Synopsis |
---|---|
sequence-relayer v0.4.0 bd3705af98733b4e18f366d63a03999ffdc0c403 -- This file has been generated by https://github.com/webrpc/webrpc using gen/golang Do not edit by hand.
|
sequence-relayer v0.4.0 bd3705af98733b4e18f366d63a03999ffdc0c403 -- This file has been generated by https://github.com/webrpc/webrpc using gen/golang Do not edit by hand. |
Click to show internal directories.
Click to hide internal directories.