Skip to main content
You can securely export the private key for a WaaS wallet account. On web you specify an HTML element to host an iframe containing the private key; on React Native you mount the <ExportPrivateKey /> component, which hosts the key inside a screenshot-protected native WebView. In every case the key is rendered inside a sandboxed document and never crosses into your application’s JavaScript.

Usage

Business Account export approvals

Exporting a Business Account wallet’s key can require approvals from other members, when the wallet’s policy sets a quorum on export. The flow mirrors quorum-gated signing:
  1. The first exportWaasPrivateKey or exportWaasPrivateKeyToContainer call builds the export intent and signs it with the session key automatically. If the policy requires approvals, the call throws a SigningConsentRequiredError with reason: 'APPROVALS_REQUIRED' and a proposalId — and shows no key.
  2. Eligible Business Account members approve the proposal, exactly as for a signing proposal.
  3. Call the export again with that proposalId. The approved proposal already carries its intent, so the export completes without signing a second one.
Both functions also accept an approvalQuorum (typed ExportApprovalQuorumRequest) carrying a signed ExportIntent when your app prepares the intent itself; omitting it lets the SDK build and sign one. Personal wallets have no export quorum and ignore these parameters.

Error Handling

  • If the specified wallet account is not a WaaS WalletAccount, it will throw an NotWaasWalletAccountError error.
  • If the wallet’s Business Account policy requires approvals to export, it throws a SigningConsentRequiredError with reason: 'APPROVALS_REQUIRED'; see Business Account export approvals.
Last modified on November 27, 2026