Skip to main content
POST
Export wallet

SDK methods

Learn more about exporting wallets using our SDKs here.
This endpoint exports a wallet’s private key using Hybrid Public Key Encryption (HPKE). The following HPKE configuration is supported:
  • KEM (Key Encapsulation Mechanism): DHKEM_P256_HKDF_SHA256
  • KDF (Key Derivation Function): HKDF_SHA256
  • AEAD (Authenticated Encryption with Associated Data): CHACHA20_POLY1305
  • Mode: BASE

Authorizations

Authorization
string
header
required

Basic Auth header with your app ID as the username and your app secret as the password.

Headers

privy-app-id
string
required

ID of your Privy app.

privy-authorization-signature
string

Request authorization signature. If multiple signatures are required, they should be comma separated.

privy-request-expiry
string

Request expiry. Value is a Unix timestamp in milliseconds representing the deadline by which the request must be processed.

Path Parameters

wallet_id
string
required

ID of the wallet.

Body

application/json

Request body for exporting a wallet private key.

encryption_type
enum<string>
required

The encryption type of the wallet to import. Currently only supports HPKE.

Available options:
HPKE
recipient_public_key
string
required

The base64-encoded encryption public key to encrypt the wallet private key with.

export_seed_phrase
boolean

Response

200 - application/json

The exported private key.

Response body containing the encrypted wallet private key.

encryption_type
enum<string>
required

The encryption type of the wallet to import. Currently only supports HPKE.

Available options:
HPKE
ciphertext
string
required

The encrypted private key.

encapsulated_key
string
required

The base64-encoded encapsulated key that was generated during encryption, for use during decryption.