Skip to main content

Function

importPrivateKey(params)
Encrypts an existing private key with Lit and stores it as wrapped key metadata.

Parameters

SessionSigsMap
required
Session signatures tying the wrapped key to the PKP.
LitClient
required
Lit client instance for executing the Lit Action and accessing storage services.
string
required
Hex-encoded private key to wrap (a 0x prefixed string for EVM keys).
string
required
Public key corresponding to the private key being wrapped.
'K256' | 'ed25519'
required
Identifies the algorithm so the service can store the key correctly.
string
required
Description stored with the wrapped key.
bigint
Optional executeJs price cap.

Returns

ImportPrivateKeyResult

Example