Exports
Functions
execute(config)
Execute a bridge transaction from a quote.ExecuteConfig
Returns:
ExecutionResult
Throws:
QuoteExpiredErrorif quote has expired (5 minute max age)InvalidQuoteErrorif quote is malformedTransactionFailedErrorif transaction fails on-chainUserRejectedErrorif user rejects transactionNetworkErrorif network request fails
Execution Flow
The execute function processes a quote through these stages:Example: Basic Execution
Example: With Progress Callbacks
Example: With Event Emitter
validateQuote(quote)
Validate a quote before execution.QuoteExpiredErrorif quote has expiredInvalidQuoteErrorif quote is malformed
- Quote is not null/undefined
- Quote has a valid ID
- Quote has at least one execution step
- Quote has fromAmount and toAmount
- Quote has not expired (expiresAt timestamp)
- Quote age does not exceed 5 minutes
Error Types
QuoteExpiredError
Thrown when a quote has exceeded its validity period.
Example:
InvalidQuoteError
Thrown when a quote is malformed or missing required data.
Reasons:
null_quote- Quote is null or undefinedmissing_id- Quote has no IDno_steps- Quote has no execution stepsmissing_amounts- Quote is missing amount information
Types
TransactionSigner
Compatible with viem WalletClient and ethers Signer.TransactionRequest
ExecutionStatus
StepStatus
StepStatusPayload
Payload passed toonStepChange callback.
TransactionStatusPayload
Payload passed toonStatusChange callback.
