Skip to content

Key Export

Allow users to export their wallet’s private key for backup or migration. Openfort’s SDK provides:

  • Secure export flows for embedded wallets
  • Warnings and best practices for key management
  • Options to restrict export based on user status

Key export empowers users with control over their assets, while maintaining security and clarity in the export process.

To export the private key of the embedded wallet, you can use the useWallets hook. This hook provides access to the user's linked wallets and allows exporting the private key securely.

import { useWallets } from "@openfort/react"
 
function SampleComponent() {
  const {
    exportPrivateKey, 
  } = useWallets()
  // ...
}