Skip to main content
The precheck function runs locally to validate that execution won’t fail when the execute function is called. Since executing uses the Lit network (which costs time and money), precheck should validate everything possible to prevent failures.
The Vincent Ability SDK runs Policy prechecks first. Your precheck only runs if all Policies return allow.

Function Parameters

The precheck function receives two parameters:
object
required
Object containing the ability parameters
object
required
Context object provided by the SDK with helpers and metadata

Response Schemas

Success Response

ZodSchema
required
A Zod schema that defines the structure of successful precheck results. Include details that help the executor understand why the precheck passed, such as current balances and estimated costs.

Failure Response

ZodSchema
required
A Zod schema that defines the structure of failed precheck results. Include details that help the executor understand why the precheck failed, such as error reasons and relevant values.
If any unhandled error occurs during precheck, the Vincent Ability SDK automatically returns a fail result with the error message.

Example Implementation

Next Steps

Execute Function

Implement your Ability’s main execution logic

Supporting Policies

Learn how to integrate Vincent Policies with your Ability