Skip to content


The exportWallet method is used to export the user's private key or seed phrase.

If the user is authenticated with an Email, this will return a seed phrase If the user is authenticated with a Passkey, this will return a private key


This method throws if there is no authenticated user.


import { signer } from "./signer";

await signer.exportWallet({
  iframeContainerId: "my-export-wallet-container",
import { AlchemySigner } from "@alchemy/aa-alchemy";

export const signer = new AlchemySigner({
  client: {
    // This is created in your dashboard under ``
    // NOTE: it is not recommended to expose your API key on the client, instead proxy requests to your backend and set the `rpcUrl`
    // here to point to your backend.
    connection: { apiKey: "alcht_<KEY>" },
    iframeConfig: {
      // you will need to render a container with this id in your DOM
      iframeContainerId: "turnkey-iframe-container",


Promise<boolean> -- returns a boolean indicating the success of the export


params: ExportWalletParams

  • iframeContainerId: string -- the id of the container to render the export wallet iframe in
  • iframeElementId?: string -- the id given to the iframe element that will be injected into the DOM