Const
Parameters to use for generating keys and optionally signing messages
Exports a previously persisted private key from the wrapped keys service for direct use by the caller, along with the keys metadata. This method fetches the encrypted key from the wrapped keys service, then executes a Lit Action that decrypts the key inside the LIT action and removes the salt from the decrypted key.
Parameters required to export the private key
Generates a random private key inside a Lit Action, and persists the key and its metadata to the wrapped keys service. Returns the public key of the random private key, and the PKP address that it was associated with. We don't return the generated wallet address since it can be derived from the publicKey
The key will be associated with the PKP address embedded in the pkpSessionSigs
you provide. One and only one wrapped key can be associated with a given LIT PKP.
Required parameters to generate the private key
Get a previously encrypted and persisted private key and its metadata. Note that this method does not decrypt the private key; only the encrypted key and its metadata will be returned to the caller.
The encrypted private key and its associated metadata
Parameters required to fetch the encrypted private key metadata
Import a provided private key into the wrapped keys service backend.
First, the key is pre-pended with LIT_PREFIX
for security reasons, then the salted key is encrypted and stored in the backend service.
The key will be associated with the PKP address embedded in the pkpSessionSigs
you provide. One and only one wrapped key can be associated with a given LIT PKP.
The parameters required to import the private key into the wrapped keys backend service
Get list of metadata for previously encrypted and persisted private keys
Note that this method does include the ciphertext
or dataToEncryptHash
values necessary to decrypt the keys.
To get those values, call getEncryptedKey()
with the id
for the appropriate key returned by this method.
The encrypted private key and its associated metadata
Parameters required to fetch the encrypted private key metadata
Signs a message inside the Lit Action using the previously persisted wrapped key associated with the current LIT PK. This method fetches the encrypted key from the wrapped keys service, then executes a Lit Action that decrypts the key inside the LIT action and uses the decrypted key to sign the provided transaction
Parameters to use for signing the message
Signs a transaction inside the Lit Action using the previously persisted wrapped key associated with the current LIT PK.
This method fetches the encrypted key from the wrapped keys service, then executes a Lit Action that decrypts the key inside the LIT action and uses
the decrypted key to sign the provided transaction
Optionally, if you pass broadcast: true
, the LIT action will also submit the signed transaction to the associated RPC endpoint on your behalf
The signed transaction OR its transaction hash if you set broadcast: true
and the LIT action supports this functionality.
Parameters required to sign the requested transaction
Stores an encrypted private key and its metadata to the wrapped keys backend service
The encrypted private key and its associated metadata
Parameters required to fetch the encrypted private key metadata
Stores a batch of encrypted private keys and their metadata to the wrapped keys backend service
The encrypted private key and its associated metadata
Parameters required to fetch the encrypted private key metadata
Generated using TypeDoc
TODO: Document batch behaviour
Returns