Export flow
At a high level:- The customer authenticates with a registered credential.
- The client generates or selects a key for encrypted delivery.
- Grid returns a challenge for the export action.
- The client builds a retry stamp over the export payload.
- Grid returns encrypted wallet credentials.
- The client verifies, decrypts, and handles the credentials according to your product’s security requirements.
Export endpoint flow
Exporting a wallet returns the wallet’s mnemonic seed in an encrypted credentials envelope sealed to the client’s public key. The customer verifies and decrypts that envelope on their device and can then import the wallet into any compatible self-custody client. Grid never sees the plaintext seed leaving the system. Export uses the same signed-retry pattern as credential and session revocation — the initialPOST returns a payloadToSign, and the stamped retry returns the encrypted seed.
Generate a fresh P-256 client key pair specifically for the export. Send its clientPublicKey on both export requests, then decrypt encryptedWalletCredentials with the matching private key after the signed retry succeeds.
Client builds the retry stamp
Build an API-key stamp over
payloadToSign with an active session API keypair on the account. Keep the export private key on the client; Grid will use the matching clientPublicKey from step 1 to seal the wallet credentials.Verify and decrypt on the client
encryptedWalletCredentials is a JSON string envelope. Parse the string, verify dataSignature against the data bytes using enclaveQuorumPublic, then hex-decode data to get the HPKE payload (encappedPublic, ciphertext, and organizationId). Decrypt the ciphertext with the export private key that matches the clientPublicKey you sent on both export requests.In sandbox, dataSignature and enclaveQuorumPublic are empty strings. Skip attestation verification in sandbox and decrypt the envelope payload directly.The plaintext is a BIP-39 mnemonic (the wallet’s master seed).