Prerequisites
Node.js
Version 20.19.4 or higher
Corepack
Version 20.19.4 or higher
Pinata Account
For IPFS storage of your Policy code
Starter Kit
Clone the Vincent Starter Kit repository for quick setup
Setup
1
Clone the Starter Kit
2
Ensure Corepack is Updated
3
Run Bootstrap
- Pinata JWT: Get from Pinata after creating an account
- Test wallet private key: Fund with test tokens from the Lit Faucet
4
Verify Setup
Create Your Policy
1
Copy the Template
2
Update Package Configuration
1. Edit 2. Edit 4. Update
packages/my-policy/package.json
:packages/my-policy/project.json
:Replace all occurrences of policy-counter
with my-policy
:"name": "my-policy"
"sourceRoot": "packages/my-policy/src"
"cwd": "packages/my-policy"
(all instances)"input": "packages/my-policy/src/generated"
"outputPath": "packages/my-policy/dist"
"main": "packages/my-policy/src/index.ts"
"tsConfig": "packages/my-policy/tsconfig.lib.json"
- All asset paths
packages/my-policy/jest.config.js
:nx.json
in repository root:Add your package to the release projects:3
Define Your Policy Logic
Edit
packages/my-policy/src/lib/vincent-policy.ts
:4
Configure User Interface
Edit
packages/my-policy/src/inputUiSchema.json
to define how users configure your Policy:5
Build and Test
6
Deploy to IPFS
7
Publish Your Policy
When you’re prepared, you can publish the Policy to
npm
. This will make it publishable
in the Vincent Registry.8
Register in Vincent Registry
See the Publishing Guide for details on registering your Policy in the Vincent Registry.
Quick Commands
pnpm nx build my-policy
- Build your Policy packagepnpm test-e2e
- Run end-to-end tests with the Vincent systempnpm nx action:deploy my-policy
- Deploy to IPFS via Pinatapnpm clean
- Remove build artifacts