This guide walks you through creating Solana (SVM) wallets using Dynamic’s Node SDK. You’ll learn how to set up different threshold signature schemes and understand the security implications for Solana blockchain operations.
After creating a Solana wallet, you’ll receive important information that should be stored securely:
Copy
Ask AI
const wallet = await svmClient.createWalletAccount({ thresholdSignatureScheme: ThresholdSignatureScheme.TWO_OF_TWO,});// Store these securely in your databaseconst walletData = { accountAddress: wallet.accountAddress, walletId: wallet.walletId, thresholdScheme: ThresholdSignatureScheme.TWO_OF_TWO, chainName: 'solana', createdAt: new Date().toISOString(),};// Never store externalServerKeyShares in plain text// They should be encrypted and stored securely
You can verify your wallet was created correctly by checking the Solana network:
Copy
Ask AI
import { Connection, PublicKey } from '@solana/web3.js';const connection = new Connection('https://api.mainnet-beta.solana.com', 'confirmed');const publicKey = new PublicKey(wallet.accountAddress);// Check if the account existsconst accountInfo = await connection.getAccountInfo(publicKey);if (accountInfo) { console.log('Solana wallet verified on network');} else { console.log('Wallet created but not yet on network (normal for new wallets)');}