signAndSendSponsoredTransaction function to explicitly send sponsored transactions.
SVM Gas Sponsorship is available exclusively for V3 MPC embedded wallets.
Overview
When you callsignAndSendSponsoredTransaction, the SDK:
- Sends the transaction to Dynamic’s backend for sponsorship
- Replaces the fee payer with Dynamic’s sponsored account
- Signs the sponsored transaction with the user’s wallet
- Broadcasts to the network with
skipPreflight: trueby default
SponsorTransactionError is thrown — there is no silent fallback.
Enabling SVM Gas Sponsorship
- Go to the Dynamic Dashboard
- Navigate to Settings > Embedded Wallets
- Ensure Solana (SOL) is enabled in your chain configurations
- Toggle on SVM Gas Sponsorship
Usage
UsesignAndSendSponsoredTransaction to explicitly send a sponsored transaction:
Non-Sponsored Transactions
signAndSendTransaction sends transactions without sponsorship. Use it when you don’t need gas sponsorship:
Send Options
You can passSendOptions to override defaults. Sponsored transactions use skipPreflight: true by default, but you can override this:
Error Handling
Sponsorship failures throw aSponsorTransactionError. This error is thrown when:
- The sponsorship API cannot sponsor the transaction
- The wallet provider does not support sponsored transactions (e.g. external wallets)
Limitations
| Limitation | Details |
|---|---|
| Wallet type | Embedded wallets only (V3 MPC) |
| Transaction size | Maximum 2KB base64-encoded |
| Already-signed | Transactions with signatures are not sponsored |
| Batching | Each transaction sponsored individually |