Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Dynamic’s Node SDK provides comprehensive support for Solana (SVM) blockchain operations, including wallet creation, transaction signing, message signing, and key management. The SDK implements Multi-Party Computation (MPC) for enhanced security.

Key Features

  • MPC Wallet Creation: Create secure Solana wallets with threshold signature schemes
  • Transaction Signing: Sign Solana transactions without exposing private keys
  • Message Signing: Sign messages for authentication and data integrity
  • Key Import/Export: Import existing private keys and export wallet data
  • Multiple Security Models: Choose between different threshold signature schemes

Available Threshold Signature Schemes

  • TWO_OF_TWO: Maximum security - requires both server and Dynamic infrastructure
  • TWO_OF_THREE: Balanced security and availability - requires 2 out of 3 shares

Quick Start

import { DynamicSvmWalletClient } from '@dynamic-labs-wallet/node-svm';
import { ThresholdSignatureScheme } from '@dynamic-labs-wallet/node';

const client = new DynamicSvmWalletClient({
  environmentId: process.env.DYNAMIC_ENVIRONMENT_ID!,
});

await client.authenticateApiToken(process.env.DYNAMIC_AUTH_TOKEN!);

// Create a new wallet
const wallet = await client.createWalletAccount({
  thresholdSignatureScheme: ThresholdSignatureScheme.TWO_OF_TWO,
  backUpToClientShareService: true,
});

console.log('Wallet created:', wallet.accountAddress);

Core Functions

Wallet Management

Signing Operations

Key Management

Backup and Recovery

Guides

Prerequisites

Before using the SVM SDK, ensure you have:
  1. Dynamic Project Setup: Set up your Dynamic project
  2. Environment Configuration: Configure your environment ID and auth token
  3. Solana Chain Enabled: Enable Solana chains in your Dynamic dashboard
  4. Dependencies Installed: Install required packages

Installation

bun add @dynamic-labs-wallet/node-svm @solana/web3.js @dynamic-labs-wallet/node

Environment Variables

DYNAMIC_AUTH_TOKEN=your_auth_token_here
DYNAMIC_ENVIRONMENT_ID=your_environment_id_here

Security Considerations

  • MPC Architecture: Private keys are never stored in plain text
  • Threshold Signing: Multiple parties must collaborate to sign transactions
  • Key Share Backup: Use backUpToClientShareService: true for secure storage
  • Password Protection: Implement strong passwords for additional security layers

Network Support

The SDK supports all Solana networks:
  • Mainnet: Production Solana network
  • Devnet: Development and testing network
  • Testnet: Testing network with test tokens

Error Handling

Always implement proper error handling:
try {
  const result = await svmClient.someFunction(params);
  console.log('Operation successful:', result);
} catch (error) {
  console.error('Operation failed:', error instanceof Error ? error.message : String(error));
}

Next Steps