Skip to main content
Add Vincent Policy support to your Ability by creating policy objects with parameter mappings.
Supporting a Policy doesn’t make it required - App Users choose which Policies to enable.

Policy Configuration

function
required
Creates a policy object that maps your Ability’s parameters to the Policy’s requirements. This allows the Policy to access and validate the necessary parameters from your Ability.

How It Works

1

Import Policy

Import bundledVincentPolicy from the Policy package (e.g., @lit-protocol/vincent-policy-spending-limit)
2

Create Mapping

Use createVincentAbilityPolicy with:
  • abilityParamsSchema: Your Ability’s parameter schema
  • bundledVincentPolicy: The imported Policy
  • abilityParameterMappings: Maps your param names to Policy param names
3

Register Policy

Add to supportedPolicies using supportedPoliciesForAbility([SpendingLimitPolicy])
The SDK handles Policy execution and evaluation automatically.

Next Steps

Precheck Function

Validate parameters before execution

Execute Function

Implement your Ability’s core logic