sendSponsoredTransaction bundles signing, relaying, and waiting into one call. When you need more control — pre-signing an intent to send later, relaying without blocking, or driving your own progress UI — split those steps with the functions below.
The full flow is: sign → relay (get a requestId) → poll status until the relay reports a transaction hash.
signSponsoredTransaction
Signs an EIP-712 intent for a batch of calls without sending it. Returns a serializable payload you can hand tosendSponsoredTransaction or relaySponsoredTransaction later.
Parameters
Returns
Promise<SignedSponsoredTransaction>:
Custom validity window
relaySponsoredTransaction
Relays an intent to the sponsorship backend and returns arequestId without waiting for on-chain inclusion. Accepts either unsigned calls (it signs them for you) or a pre-signed signedTransaction.
requestId — not a transaction hash — is the stable identifier for a sponsored transaction, because the relay may retry the on-chain submission. Use it to track status below.
Parameters
Same assignSponsoredTransaction (unsigned form), or { signedTransaction }.
Returns
Promise<{ requestId: string }>.
Tracking status
getEVMSponsoredTransactionStatus
Fetches the current relay state for arequestId. Use it as the building block for custom polling — for example, a progress indicator.
Promise<SponsoredTransactionStatusResult>:
The
status lifecycle:
waitForSponsoredTransaction
For the common “wait until done” case,waitForSponsoredTransaction polls getEVMSponsoredTransactionStatus every 2 seconds and resolves as soon as the relay reports a transaction hash. It throws a SponsorTransactionError on a terminal failure or after a 60-second timeout.
Promise<{ transactionHash: Hex }>.
generateSponsoredTransactionNonce
Generates a random bitmap nonce for signing an EIP-712 intent, validated against the on-chainisNonceUsed check on the delegation contract. signSponsoredTransaction calls this internally when no nonce is provided. Call it directly to get a nonce ahead of time. See Reusing a nonce.
Parameters
Returns
Promise<bigint>.
Reusing a nonce
By default,signSponsoredTransaction generates and validates a fresh single-use bitmap nonce for you via generateSponsoredTransactionNonce. Pass your own nonce to reuse one across intents, so at most one can ever land on-chain (cancel-replace), or to safely retry a signing request idempotently:
nonce works the same way on relaySponsoredTransaction and sendSponsoredTransaction.
Related functions
- sendSponsoredTransaction — sign, relay, and wait in one call
- EVM Gas Sponsorship overview — setup and the common path
- Managing EIP-7702 delegation — control the one-time delegation step
- EVM Server-Controlled Sponsorship — sign on the client, validate and relay from your backend