Backend Wallets

Export private key (E2E encrypted).

Changed on

Export private key with E2E encryption via backend wallet.

Exports the account's private key encrypted using RSA-4096 OAEP SHA-256. The client must provide their ephemeral RSA-4096 public key (base64 SPKI DER format). The response contains the encrypted private key that can be decrypted with the client's private key.

post/v2/accounts/backend/{id}/export

Request

  • Base URL: https://api.openfort.io
  • URL: https://api.openfort.io/v2/accounts/backend/{id}/export
  • Auth: HTTP bearer

Path parameters

idstring required

The account ID (starts with acc_).

Request body

encryptionKeystring required

Client's ephemeral RSA-4096 public key for end-to-end encryption (base64 SPKI DER format). The backend wallet will encrypt the private key using RSA-OAEP SHA-256.

Example request

{
  "encryptionKey": "MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA..."
}

Response

Successful response.

object'exportedKey' required

The type of object.

encryptedPrivateKeystring required

The private key encrypted with RSA-OAEP SHA-256 using your ephemeral public key (base64-encoded). Decrypt using your ephemeral RSA private key.

Example response

{
  "encryptedPrivateKey": "base64_encrypted_data..."
}

Changes