Security Considerations
The private key is encrypted using RSA-OAEP encryption before transmission, ensuring that only the holder of the RSA private key can decrypt it.
JavaScript
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Express API lets you display an iframe revealing the private key for the specific blockchain network. The Iframe shows a secure interface where users can view and copy their private key.
import MagicApiWalletSDK, { WalletType } from "@magic-sdk/server-wallets";
const magic = new MagicApiWalletSDK('PUBLISHABLE_API_KEY')
try {
await magic.wallet.exportPrivateKey({
walletType: 'ETH',
bearerToken: 'YOUR_JWT_TOKEN',
oidcProviderId: 'YOUR_OIDC_PROVIDER_ID',
});
} catch {
// Handle errors if required!
}
Was this page helpful?