Functions
createLitClient({ network }
)
Parameters
import { nagaDev } from "@lit-protocol/networks";
const litClient = await createLitClient({ network: nagaDev });
Returns
chain.raw.pkpSign
Signs arbitrary bytes with a PKP using the specified signing scheme on the chosen chain.Parameters
Show properties
Show properties
Show allowed values
Show allowed values
Show behaviour
Show behaviour
Show auto‑hash mapping (ECDSA)
Show auto‑hash mapping (ECDSA)
Show auto‑hash mapping (FROST)
Show auto‑hash mapping (FROST)
toSign
is signed as‑is.Returns
Show properties
Show properties
executeJs
Execute a Lit Action (JS) on the network.Parameters
Show properties
Show properties
Returns
Show properties
Show properties
encrypt
Encrypt data with access control conditions using BLS.Parameters
Show properties
Show properties
Show properties
Show properties
Returns
decrypt
Decrypt data previously encrypted with access control conditions.Parameters
Show properties
Show properties
Returns
mintWithEoa
Mint a PKP using an EOA.Parameters
Show properties
Show properties
Returns
mintWithAuth
Mint a PKP using an authentication method.Parameters
Show properties
Show properties
Returns
mintWithCustomAuth
Mint a PKP using custom authentication (Lit Action validator or IPFS CID).Parameters
Show properties
Show properties
Returns
authService.mintWithAuth
Mint a PKP via the Auth Service. Parameters and returns mirrormintWithAuth
.
Parameters
Returns
getPKPPermissionsManager
Create a PKP permissions manager instance.Parameters
Hide properties
Hide properties
Returns
Hide properties
Hide properties
Show params
Show params
Show example
Show example
await manager.addPermittedAuthMethod({ authMethodType: 1, authMethodId: "0x...", userPubkey: "0x...", scopes: ["sign-anything"] });
Show params
Show params
Show example
Show example
await manager.removePermittedAction({ ipfsId: "Qm..." });
Show params
Show params
Show example
Show example
await manager.removePermittedAddress({ address: "0xUser..." });
Show params
Show params
Show example
Show example
const ok = await manager.isPermittedAction({ ipfsId: "Qm..." });
Show params
Show params
Show example
Show example
const ok = await manager.isPermittedAddress({ address: "0xUser..." });
Show operations (array of)
Show operations (array of)
Show example
Show example
await manager.batchUpdatePermissions([
{ type: 'addAddress', address: '0xUser...', scopes: ['sign-anything'] },
{ type: 'addAction', ipfsId: 'Qm...', scopes: ['sign-anything'] },
]);
getPaymentManager
Get a Payment Manager for Ledger contract operations.Parameters
Show properties
Show properties
Returns
Hide properties
Hide properties
Show params
Show params
Show example
Show example
await paymentManager.deposit({ amountInEth: "0.1" });
Show params
Show params
Show example
Show example
const bal = await paymentManager.getBalance({ userAddress: "0x..." });
console.log(bal.totalBalance, bal.availableBalance);
Show params
Show params
Show example
Show example
await paymentManager.requestWithdraw({ amountInEth: "0.05" });
Show params
Show params
Show example
Show example
await paymentManager.withdraw({ amountInEth: "0.05" });
Show params
Show params
Show example
Show example
const info = await paymentManager.getWithdrawRequest({ userAddress: "0x..." });
Show example
Show example
const delay = await paymentManager.getWithdrawDelay();
Show params
Show params
Show example
Show example
const { canExecute, timeRemaining } = await paymentManager.canExecuteWithdraw({ userAddress: "0x..." });
Show params
Show params
Show example
Show example
await paymentManager.delegatePayments({ userAddress: "0xUser..." });
Show params
Show params
Show example
Show example
await paymentManager.undelegatePayments({ userAddress: "0xUser..." });
Show params
Show params
Show example
Show example
await paymentManager.delegatePaymentsBatch({ userAddresses: ["0xA...","0xB..."] });
Show params
Show params
Show example
Show example
await paymentManager.undelegatePaymentsBatch({ userAddresses: ["0xA...","0xB..."] });
Show params
Show params
Show example
Show example
const payers = await paymentManager.getPayers({ userAddress: "0xUser..." });
Show params
Show params
Show example
Show example
const users = await paymentManager.getUsers({ payerAddress: "0xPayer..." });
Show params
Show params
Show example
Show example
const r = await paymentManager.getRestriction({ payerAddress: "0xPayer..." });
Show params
Show params
Show example
Show example
const res = await paymentManager.getPayersAndRestrictions({ userAddresses: ["0xA...","0xB..."] });
viewPKPPermissions
View current permissions context for a PKP.Parameters
Returns
viewPKPsByAddress
List PKPs owned by an address.Parameters
Returns
getPkpViemAccount
Create a Viem-compatible account backed by a PKP.Parameters
Returns
Show properties
Show properties
Returns
Show properties
Show properties