PolicyKit Client
ThePolicyKit class is the high-level orchestrator that ties together IPFS pinning, on-chain deployment, Lit Protocol integration, and policy simulation.
Constructor
Options
IPFSBackend
LitConfig
Methods
deployPolicy(policy)
Deploy a policy to IPFS and register it on-chain.
Returns:
Promise<DeployResult>
updatePolicy(policy)
Update an existing policy. Pins the new version to IPFS and updates the on-chain reference.
Returns:
Promise<DeployResult>
removePolicy()
Remove the active policy from the caller’s account.
Promise<Hex> — The transaction hash
getPolicy(account)
Retrieve the active policy for an account.
Returns:
Promise<PolicyData | null>
simulate(policy, txParams)
Simulate a transaction against a policy locally.
Returns:
Promise<EvaluationReport>
requestAttestation(policy, txParams)
Request a Lit Protocol attestation for a transaction.
Returns:
Promise<Attestation>

