Skip to content

useExportAccount

A hook use to export the private key for an account. It returns the mutation functions to kick off the export process, as well as a component to render the account recovery details in an iframe.

Import

import { useExportAccount } from "@account-kit/react";

Usage

import { useExportAccount } from "@account-kit/react";
 
const {
  exportAccount,
  isExported,
  isExporting,
  error,
  ExportAccountComponent,
} = useExportAccount({
  params: {
    iframeContainerId: "my-iframe-container",
  },
});

Parameters

args

UseExportAccountMutationArgs Optional arguments for the mutation and export parameters

Returns

UseExportAccountResult An object containing the export state, possible error, and the export account function and component