Skip to main content

Function

generatePrivateKey(params)
Generates a new wrapped key inside a Lit Action, stores the encrypted payload, and returns the wrapped-key identifier together with the generated public key.

Parameters

SessionSigsMap
required
Session signatures produced for the PKP that should own the wrapped key.
LitClient
required
The Lit client instance used to execute the Lit Action and resolve the target network cluster.
'evm' | 'solana'
required
Determines which Lit Action to run and which key type to generate.
string
required
Free-form description stored alongside the encrypted key metadata.
bigint
Optional cap on the price you are willing to pay for the underlying executeJs request.

Returns

GeneratePrivateKeyResult

Example