This function opens a modal with the ImportComponent for importing a private key.
Supports importing private keys using an encrypted bundle.
Address formats (v1AddressFormat[]) and curve (v1Curve) must be specified based on the type of private key the user will import.
Supports customizing the duration of the success page shown after a successful import.
Allows specifying the stamper to use for the import (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet) for granular authentication control.
Ensures the imported private key is added to the user’s wallet list and the provider state is refreshed.
array of address formats (v1AddressFormat[]) that the private key supports (Eg: “ADDRESS_FORMAT_ETHEREUM” for Ethereum, “ADDRESS_FORMAT_SOLANA” for Solana).
params.clearClipboardOnPaste
boolean
whether to clear the clipboard after pasting the import bundle (default: true).
params.curve
v1Curve
required
curve type (v1Curve) for the private key (Eg: “CURVE_SECP256K1” for Ethereum, “CURVE_ED25519” for Solana).
params.keyName
string
name for the imported private key, if not provided, an input box will be shown for the name.
params.organizationId
string
The organization ID to target (defaults to the session’s organization ID or the parent organization ID).
params.stampWith
StamperType
parameter to specify the stamper to use for the import (Passkey, ApiKey, or Wallet).
params.successPageDuration
number
duration (in ms) for the success page after import (default: 0, no success page).
params.userId
string
The user ID to target (defaults to the session’s user ID).
Response
A successful response returns the following fields: