Skip to main content

Overview

The Node SDK supports two approaches to SVM gas sponsorship:
  1. Dynamic sponsorship — pass sponsor: true to signTransaction(). Dynamic replaces the fee payer with a sponsor wallet. No funded wallet required on your end.
  2. Custom fee payer (delegated access) — your server holds a funded Solana wallet and signs as the fee payer alongside the user’s delegated wallet.

Dynamic sponsorship (simplest)

Pass sponsor: true to signTransaction() on DynamicSvmWalletClient. Dynamic’s API replaces the fee payer before signing.
Gas sponsorship must be enabled for your environment in the Dynamic dashboard.
For more control, call sponsorTransaction() directly to inspect or modify the sponsored transaction before signing.

Custom fee payer with delegated access

Use delegated access to sponsor gas fees for user-initiated Solana transactions. Your server signs transactions on behalf of users while paying the transaction fees.
Your server wallet acts as the fee payer for transactions while the user’s delegated wallet signs the transaction instructions.

Prerequisites

  • A funded Solana wallet for paying gas fees
  • Dynamic server API key
  • Environment variables configured
  • @dynamic-labs-wallet/node-svm package installed

Delegated Access: Sponsor gas for user wallets

Use delegated credentials to sign transactions on behalf of users while your server pays the gas fees.

1) Create a delegated client and set up fee payer

2) Prepare delegation credentials from webhook

When a user delegates access, you receive encrypted credentials via webhook. Decrypt and prepare them:

3) Sign transaction with delegated wallet and fee payer

SPL Token Transfers with Gas Sponsorship

Signature Verification

When using both delegated signing and fee payer signatures, verify all required signatures are present:

Error Handling

Last modified on June 23, 2026