Function Signature
Description
Exports the private key for the SVM wallet identified by the supplied walletMetadata. Returns a base58-encoded Solana keypair string.
When you pass externalServerKeyShares (the caller-supplied path), walletMetadata.externalServerKeySharesBackupInfo must also be present — exportPrivateKey throws if shares are supplied but backup metadata is missing. The full walletMetadata returned from createWalletAccount / importPrivateKey already includes it; identity-only metadata from fetchWalletMetadata will be rejected.
Parameters
Required Parameters
walletMetadata (WalletMetadata) - Non-sensitive wallet metadata persisted from createWalletAccount() / importPrivateKey().
Optional Parameters
password (string) - Required if the wallet was created with backUpToDynamic: true.
externalServerKeyShares (ServerKeyShare[]) - Caller-supplied plaintext shares.
Returns
Promise<string> - Base58-encoded Solana keypair
Example