vincent-demo-ability-two
v0.0.1
Published
A Vincent ability that sends native tokens to a user.
Readme
@your-org/ability-template
A template Vincent Ability package. Abilities are serverless functions that execute in the Lit Protocol network and can interact with blockchains, APIs, and other services.
Quick Start
- Edit
src/lib/schemas.ts- Define your ability's input parameters and return values using Zod schemas - Edit
src/lib/vincent-ability.ts- Implement your ability logic inprecheck()andexecute()functions - Build:
pnpm nx run ability-template:build - Deploy to IPFS:
pnpm nx run ability-template:action:deploy
Key Files
src/lib/schemas.ts- Zod schemas for parameters and resultssrc/lib/vincent-ability.ts- Main ability definition and logicsrc/lib/lit-action.ts- Wrapper code (do not modify)src/generated/- Auto-generated bundled code (do not edit)
Commands
| Command | Description |
| --------------- | ------------------------------------------ |
| action:build | Bundle the Lit Action code |
| action:deploy | Build and deploy to IPFS via Pinata |
| build | Compile TypeScript (includes action:build) |
Working with Policies
To add policy support, import and configure policies in src/lib/vincent-ability.ts. See the template file for commented examples.
Publishing
- Update package name in
package.jsonandsrc/lib/vincent-ability.ts - Deploy to IPFS:
pnpm nx run ability-template:action:deploy - Publish to npm:
pnpm publish --access public
Resources
- Vincent Documentation
- Root README - Setup and monorepo documentation
- @lit-protocol/vincent-scaffold-sdk - Helper utilities for blockchain transactions
