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::exportPrivateKey returns the wallet’s raw 32-byte Ed25519 secret seed, base58-encoded.
Solana’s Keypair format is 64 bytes (secret_seed || public_key). The SDK returns just the 32-byte secret seed — append the base58-decoded walletProperties.accountAddress() to build a full 64-byte keypair.
Once exported, the raw private key bypasses MPC — any holder can sign without your server’s involvement. Treat it as a one-way operation. Only use it for migration or disaster recovery, and rotate / abandon the wallet afterward.

Prerequisites

Export the Key

import xyz.dynamic.waas.svm.DynamicSvmWalletClient;

String secretSeedB58 = client.exportPrivateKey(
    walletProperties,
    externalServerKeyShares
).join();

// base58-encoded 32-byte secret seed
System.out.println("Secret seed: " + secretSeedB58);

Building a 64-byte Keypair

import software.sava.core.encoding.Base58;

byte[] seed   = Base58.decode(secretSeedB58);                              // 32 bytes
byte[] pubkey = Base58.decode(walletProperties.accountAddress());          // 32 bytes

byte[] keypair64 = new byte[64];
System.arraycopy(seed,   0, keypair64,  0, 32);
System.arraycopy(pubkey, 0, keypair64, 32, 32);

// keypair64 is the standard Solana Keypair byte layout — load it into
// solana-js / solana-py / sava as you would any external keypair.

Best Practices

  • One-way operation — don’t continue using the wallet through MPC after exporting; rotate to a fresh wallet.
  • Never log the seed — redact it from all logs and error messages.
  • Zero memory after use — null the byte[] arrays after forwarding them to their destination.
  • Transport over TLS only — never send the seed over an unencrypted channel.

Next Steps