Skip to main content

Documentation Index

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

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

Overview

DynamicSvmWalletClient::create_wallet_account runs an Ed25519 MPC keygen ceremony and returns the wallet metadata (with base58 address) and the server key shares the customer must persist in their vault.

Prerequisites

Step 1: Choose Your Security Model

Same as EVM — see Create EVM Wallet. Solana wallets use the same ThresholdSignatureScheme enum.

Step 2: Choose Your Backup Mode

The back_up_to_dynamic flag works identically across EVM and SVM — see Create EVM Wallet — Choose Your Backup Mode for the full breakdown.
password is required when back_up_to_dynamic: true. The SDK rejects the call with Error::InvalidArgument if you pass None. The password locally AES-256-GCM-encrypts the share that gets uploaded to Dynamic’s backup store — needed later if you ever recover via run_recover_key_shares.
You always vault the returned Vec<ServerKeyShare> in your own infrastructure for day-to-day signing — the flag only decides whether Dynamic also keeps an encrypted disaster-recovery copy. With back_up_to_dynamic: false, no copy lives on Dynamic and password becomes optional; losing your vault in that mode means losing the wallet.

Step 3: Create the Wallet

use dynamic_waas_sdk::{
    DynamicWalletClient, DynamicWalletClientOpts, ServerKeyShare,
    ThresholdSignatureScheme, WalletProperties,
};
use dynamic_waas_sdk_svm::DynamicSvmWalletClient;

pub async fn create_svm_wallet(
    client: &DynamicWalletClient,
    threshold_signature_scheme: ThresholdSignatureScheme,
    password: String, // required when back_up_to_dynamic = true
) -> dynamic_waas_sdk::Result<(WalletProperties, Vec<ServerKeyShare>)> {
    let svm = DynamicSvmWalletClient::new(client);

    svm.create_wallet_account(
        threshold_signature_scheme,
        Some(password),
        /* back_up_to_dynamic */ true,
    )
    .await
}

// Usage
let (wallet_properties, external_server_key_shares) = create_svm_wallet(
    &client,
    ThresholdSignatureScheme::TwoOfTwo,
    "your-secure-password".to_string(),
).await?;

println!("Solana address: {}", wallet_properties.account_address);
wallet_properties.account_address is the base58-encoded Ed25519 public key — the standard Solana address format.

Step 4: Persist State

create_wallet_account() returns two pieces of state — each belongs in a different storage tier:
// WalletProperties — non-sensitive identity + backup-pointer info. Cache it.
redis.set(
    format!("wallet:{}", wallet_properties.account_address),
    serde_json::to_string(&wallet_properties)?,
).await?;

// Vec<ServerKeyShare> — sensitive MPC key material. Vault it.
vault.write(
    format!("wallet:{}/shares", wallet_properties.account_address),
    serde_json::to_vec(&external_server_key_shares)?,
).await?;
See Storage Best Practices for the full pattern.

Next Steps