vocdoni-sdk
Installation
SKILL.md
Vocdoni SDK
The @vocdoni/sdk TypeScript/JavaScript library is the official client for the Vocdoni voting protocol. It lets an application:
- Bootstrap a signing account on the Vocdoni chain (vochain).
- Build a census of eligible voters (plain list, weighted, CSP-gated, or token-holder via Census3).
- Create a voting process ("election") with a wide range of variants and configurations.
- Cast votes and read results.
This skill is the entry point. Read the section that matches the task; load the reference file from references/ for the full API; lift a recipe from recipes/ when you need a complete working flow.
How to use this skill
- Identify which area of the SDK the task touches. The "Common task → reference" table below maps user intents to files.
- Read only the references you need. Each reference is a self-contained map of one area's classes, types, and methods, with terse rationale and short examples. Most tasks need 1–3 references.
- Start from a recipe when the task fits one. The
recipes/directory has complete, runnable TypeScript files for the canonical flows. Copy the relevant one, then adapt — don't reinvent the boilerplate. - Stay within the documented API. The SDK has many subtle shape requirements (which census type goes with which election type, which fields are required for which variant, default values). The reference files spell these out. Guessing leads to runtime errors.