Get started
sealed-lattice provides development verification helpers for a mobile-first post-quantum threshold homomorphic voting prototype.
The selected direction is direct BGV-encrypted ballots, public ciphertext aggregation, mandatory mobile evaluator replay, target finality, and target-bound threshold decryption.
The package is under active implementation and has not been independently audited. Use it for development, integration experiments, and verification tooling, not production elections.
Install
Section titled “Install”npm install sealed-latticepnpm add sealed-latticeValidate a poll
Section titled “Validate a poll”import { deriveThresholdProfile, validatePollSpec } from "sealed-lattice";
const pollValidation = validatePollSpec({ pollId: "board-election-2026", question: "Which proposal should be adopted?", options: ["Proposal A", "Proposal B"], topOptionCount: 1,});
if (!pollValidation.ok) { throw new Error( pollValidation.errors[0]?.message ?? "Invalid poll specification.", );}
const thresholdProfile = deriveThresholdProfile({ rosterSize: 10,});pollValidation.normalized contains the validated poll with defaults applied. thresholdProfile contains the derived threshold, quorum, corruption-bound, and warning fields for the frozen roster size.
Import verification helpers
Section titled “Import verification helpers”import { deriveThresholdProfile, validatePollSpec, verifyBoardConsistency, verifyTargetFinality, verifyTranscriptCoreFixture,} from "sealed-lattice";These helpers are useful for current development verification and package integration. Complete direct encrypted ballot voting entry points are not public yet.
What you can use today
Section titled “What you can use today”- poll specification validation and canonical hash derivation
- threshold and frozen roster profile derivation
- lifecycle label, lifecycle transition, and action capability checks
- board consistency, cast receipt, close record, target finality, roster manifest, recovery epoch, and first-valid ordering checks
- transcript-core fixture verification through the bundled Rust/WASM kernel
- package-boundary and public API smoke coverage
What is not available yet
Section titled “What is not available yet”- production ballot generation or casting APIs
- public direct ballot proof construction APIs
- public encrypted ballot aggregation APIs
- public mobile evaluator replay APIs
- production target-bound decryption or result release
- production-readiness, audit, certification, or supported-phone claims
Reserved complete-protocol entry points fail closed with OperationUnavailable until the matching direct-path layer exists.
Next reads
Section titled “Next reads”- API reference for the public function and type surface
- Security and non-goals for current safety boundaries
- Development workflow for local build and verification commands