Exports a key for the wallet identified by walletMetadata. This is the base-class operation that exportPrivateKey() builds on; most callers should use exportPrivateKey() directly.
When you pass externalServerKeyShares (the caller-supplied path), walletMetadata.externalServerKeySharesBackupInfo must also be present — exportKey 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.