> ## 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.

# Export SVM Private Key

> Export the raw Ed25519 private key from a Dynamic Solana MPC wallet

## Overview

`DynamicSvmWalletClient::exportPrivateKey` returns the wallet's raw 32-byte Ed25519 secret seed, base58-encoded.

<Note>
  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.
</Note>

<Warning>
  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.
</Warning>

## Prerequisites

* [Created an SVM wallet](/java/svm/create-wallet)
* Persisted `WalletProperties` and `List<ServerKeyShare>`

## Export the Key

```java theme={"system"}
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

```java theme={"system"}
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

* [Use delegated access](/java/svm/delegated-access)
* [Import an existing private key](/java/import-private-key)
