Documentation
¶
Index ¶
- func MetaTxnStatusFromString(s string) sequence.MetaTxnStatus
- type Client
- func (r *Client) Client() proto.RelayerClient
- func (r *Client) FeeOptions(ctx context.Context, signedTxs *sequence.SignedTransactions) ([]*sequence.RelayerFeeOption, *sequence.RelayerFeeQuote, error)
- func (r *Client) GetChainID(ctx context.Context) (*big.Int, error)
- func (r *Client) GetNonce(ctx context.Context, walletConfig core.WalletConfig, ...) (*big.Int, error)
- func (r *Client) GetProvider() *ethrpc.Provider
- func (r *Client) IsDeployTransaction(signedTxs *sequence.SignedTransactions) bool
- func (r *Client) Relay(ctx context.Context, signedTxs *sequence.SignedTransactions, ...) (sequence.MetaTxnID, *types.Transaction, ethtxn.WaitReceipt, error)
- func (r *Client) Simulate(ctx context.Context, wallet common.Address, transactions sequence.Transactions) ([]*sequence.SimulateResult, error)
- func (r *Client) Wait(ctx context.Context, metaTxnID sequence.MetaTxnID, optTimeout ...time.Duration) (sequence.MetaTxnStatus, *types.Receipt, error)
- type FeeQuote
- type LocalRelayer
- func (r *LocalRelayer) Client() proto.RelayerClient
- func (r *LocalRelayer) FeeOptions(ctx context.Context, signedTxs *sequence.SignedTransactions) ([]*sequence.RelayerFeeOption, *sequence.RelayerFeeQuote, error)
- func (r *LocalRelayer) GetNonce(ctx context.Context, walletConfig core.WalletConfig, ...) (*big.Int, error)
- func (r *LocalRelayer) GetProvider() *ethrpc.Provider
- func (r *LocalRelayer) IsDeployTransaction(signedTxs *sequence.SignedTransactions) bool
- func (r *LocalRelayer) Relay(ctx context.Context, signedTxs *sequence.SignedTransactions, ...) (sequence.MetaTxnID, *types.Transaction, ethtxn.WaitReceipt, error)
- func (r *LocalRelayer) Simulate(ctx context.Context, wallet common.Address, transactions sequence.Transactions) ([]*sequence.SimulateResult, error)
- func (r *LocalRelayer) Wait(ctx context.Context, metaTxnID sequence.MetaTxnID, optTimeout ...time.Duration) (sequence.MetaTxnStatus, *types.Receipt, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MetaTxnStatusFromString ¶ added in v0.29.0
func MetaTxnStatusFromString(s string) sequence.MetaTxnStatus
Types ¶
type Client ¶ added in v0.60.8
type Client struct {
proto.RelayerClient
// contains filtered or unexported fields
}
func NewClient ¶ added in v0.60.8
func NewClient(relayerURL string, projectAccessKey string, rpcProvider *ethrpc.Provider, clientOptions ...Options) (*Client, error)
NewClient creates a new Sequence Relayer client instance for a specific chain. Please see https://sequence.build to get a `projectAccessKey`, which is your project's access key used to communicate with Sequence services.
NOTE: the `projectAccessKey` may be optional if you're using a JWT auth token passed in via the `clientOptions`.
The `relayerURL` is the URL of the relayer service to connect to, for example: https://mainnet-relayer.sequence.app for Ethereum mainnet and https://polygon-relayer.sequence.app for Polygon mainnet. See https://docs.sequence.xyz for a complete list of relayer urls.
The `rpcProvider` is an instance of ethrpc.Provider that is used to communicate with the underlying blockchain network. This is required for certain operations, such as fetching the chain ID and wallet nonces. You may pass in `nil` if you don't need those methods.
Finally, you may pass in optional `clientOptions` to configure the relayer client with jwt-based authentication, a receipts listener, and a custom HTTP client.
func (*Client) Client ¶ added in v0.60.8
func (r *Client) Client() proto.RelayerClient
func (*Client) FeeOptions ¶ added in v0.60.8
func (r *Client) FeeOptions(ctx context.Context, signedTxs *sequence.SignedTransactions) ([]*sequence.RelayerFeeOption, *sequence.RelayerFeeQuote, error)
func (*Client) GetChainID ¶ added in v0.60.8
func (*Client) GetNonce ¶ added in v0.60.8
func (r *Client) GetNonce(ctx context.Context, walletConfig core.WalletConfig, walletContext sequence.WalletContext, space *big.Int, blockNum *big.Int) (*big.Int, error)
NOTE: nonce space is 160 bits wide
func (*Client) GetProvider ¶ added in v0.60.8
func (*Client) IsDeployTransaction ¶ added in v0.60.8
func (r *Client) IsDeployTransaction(signedTxs *