Readonly
litDisables a tool for a given PKP.
The token ID of the PKP.
The IPFS CID of the tool to be disabled.
A promise that resolves to the transaction receipt.
If the tool policy registry contract is not initialized.
Disables a policy for a specific tool and delegatee.
The PKP token ID.
The IPFS CID of the tool.
The address of the delegatee.
A promise that resolves to the transaction receipt.
If the tool policy registry contract is not initialized.
Enables a tool for a given PKP.
The token ID of the PKP.
The IPFS CID of the tool to be enabled.
A promise that resolves to the transaction receipt.
If the tool policy registry contract is not initialized.
Enables a policy for a specific tool and delegatee.
The PKP token ID.
The IPFS CID of the tool.
The address of the delegatee.
A promise that resolves to the transaction receipt.
If the tool policy registry contract is not initialized.
Retrieves all policy parameters for a tool and delegatee.
The PKP token ID.
The IPFS CID of the tool.
The address of the delegatee.
A promise that resolves to an array of all policy parameter names and values.
If the tool policy registry contract is not initialized.
Gets all tools that are permitted for a specific delegatee.
The PKP token ID.
The address of the delegatee.
A promise that resolves to an array of ToolInfoWithDelegateePolicy objects permitted for the delegatee.
If the tool policy registry contract is not initialized.
Get a registered tool by its IPFS CID for a given PKP.
The token ID of the PKP.
The IPFS CID of the tool to be retrieved.
A promise that resolves to the tool information.
If the tool policy registry contract is not initialized.
Get all registered tools and categorize them based on whether they have policies
Object containing
Retrieves the policy for a specific tool and delegatee.
The token ID of the PKP.
The IPFS CID of the tool.
The address of the delegatee.
An object containing the policy IPFS CID and enabled status for the tool.
If the tool policy registry contract is not initialized.
Retrieves a specific policy parameter for a tool and delegatee.
The PKP token ID.
The IPFS CID of the tool.
The address of the delegatee.
The name of the policy parameter.
A promise that resolves to the policy parameter value.
If the tool policy registry contract is not initialized.
Retrieves multiple policy parameters for a tool and delegatee.
The PKP token ID.
The IPFS CID of the tool.
The address of the delegatee.
An array of policy parameter names.
A promise that resolves to an array of tuples containing policy parameter names and values.
If the tool policy registry contract is not initialized.
Checks if an address is a delegatee for the PKP.
The address to check.
A promise that resolves to a boolean indicating whether the address is a delegatee.
If the tool policy registry contract is not initialized.
Checks if a tool is permitted for a specific delegatee.
The PKP token ID.
The IPFS CID of the tool.
The address of the delegatee.
A promise that resolves to an object containing isPermitted and isEnabled.
If the tool policy registry contract is not initialized.
Checks if a tool is registered for a given PKP.
The token ID of the PKP.
The IPFS CID of the tool to be checked.
A promise that resolves to an object containing:
If the tool policy registry contract is not initialized.
Permits a tool for a specific delegatee.
The PKP token ID.
The IPFS CID of the tool.
The address of the delegatee.
A promise that resolves to the transaction receipt.
If the tool policy registry contract is not initialized.
Allows a tool to be used with the PKP.
The IPFS CID of the tool.
Optional
enableOptional
signingA promise that resolves to the transaction receipt.
If the Admin instance is not properly initialized.
Removes a delegatee for the PKP.
The PKP token ID.
The address of the delegatee to remove.
A promise that resolves to the transaction receipt.
If the tool policy registry contract is not initialized.
Removes a tool from the list of a PKP's permitted tools.
The IPFS CID of the tool.
A promise that resolves to the transaction receipt.
If the Admin instance is not properly initialized.
Removes a policy for a specific tool and delegatee.
The PKP token ID.
The IPFS CID of the tool.
The address of the delegatee.
A promise that resolves to the transaction receipt.
If the tool policy registry contract is not initialized.
Removes multiple policy parameters for a tool and delegatee.
The PKP token ID.
The IPFS CID of the tool.
The address of the delegatee.
An array of policy parameter names to remove.
A promise that resolves to the transaction receipt.
If the tool policy registry contract is not initialized.
Sets or updates a policy for a specific tool and delegatee.
The token ID of the PKP.
The IPFS CID of the tool.
The address of the delegatee.
The IPFS CID of the policy to be set.
Whether to enable the policy after setting it.
A promise that resolves to the transaction receipt.
If the tool policy registry contract is not initialized.
Sets multiple policy parameters for a tool and delegatee.
The PKP token ID.
The IPFS CID of the tool.
The address of the delegatee.
An array of policy parameter names.
An array of policy parameter values.
A promise that resolves to the transaction receipt.
If the tool policy registry contract is not initialized.
Transfers ownership of the PKP to a new owner.
The address of the new owner.
A promise that resolves to the transaction receipt.
If the Admin instance is not properly initialized.
Unpermits a tool for a specific delegatee.
The PKP token ID.
The IPFS CID of the tool.
The address of the delegatee.
A promise that resolves to the transaction receipt.
If the tool policy registry contract is not initialized.
Static
createCreates an instance of the Admin
class.
Initializes the Lit node client, contracts, and PKP.
Configuration for the Admin role.
Configuration for the agent, including the Lit network and debug mode.
A promise that resolves to an instance of the Admin
class.
If the Lit network is not provided or the private key is missing.
The
Admin
class is responsible for the ownership of the PKP (Programmable Key Pair), the registration and management of tools, policies, and delegatees.