Root package
Use the root package for the supported voting workflow. Advanced cryptographic
and transcript primitives also have public subpath entrypoints such as
threshold-elgamal/proofs, threshold-elgamal/threshold,
threshold-elgamal/dkg, threshold-elgamal/vss, threshold-elgamal/elgamal,
threshold-elgamal/protocol, and threshold-elgamal/core.
What lives here
Section titled “What lives here”- manifest helpers
- roster hashing and session derivation
- transport and authentication helpers
- public builders for the standard ceremony payloads
- full public-board verification
- full ceremony verification
Common starting points
Section titled “Common starting points”- manifest and session setup:
createElectionManifest,hashRosterEntries,hashElectionManifest,deriveSessionId - browser-side key material:
generateAuthKeyPair,exportAuthPublicKey,generateTransportKeyPair,exportTransportPublicKey - encrypted share transport:
encryptEnvelope,decryptEnvelope - public board verification:
tryVerifyElectionCeremony,verifyElectionCeremony - published payload construction:
createManifestPublicationPayload,createRegistrationPayload,createManifestAcceptancePayload,createBallotSubmissionPayload,createBallotClosePayload,createDecryptionSharePayload,createTallyPublicationPayload - advanced reveal primitives:
prepareAggregateForDecryptionandcombineDecryptionSharesfromthreshold-elgamal/threshold, pluscreateDLEQProoffromthreshold-elgamal/proofs
Typical import style
Section titled “Typical import style”import { createElectionManifest, createManifestPublicationPayload, createRegistrationPayload, createManifestAcceptancePayload, createBallotClosePayload, createDecryptionSharePayload, verifyElectionCeremony,} from "threshold-elgamal";Use the root package when
Section titled “Use the root package when”- you want the
ristretto255voting workflow - you want the minimal manifest and derived majority-threshold rules
- you want the workflow-facing builders and verifiers without importing the lower-level proof, threshold, DKG, or VSS modules directly
Use the submodules when
Section titled “Use the submodules when”- you need direct proof helpers such as
createDLEQProof(...)orcreateSchnorrProof(...) - you need direct threshold helpers such as
prepareAggregateForDecryption(...)orcombineDecryptionShares(...) - you need DKG transcript replay or trustee verification-key derivation
- you need generic protocol signing, transcript hashing, ballot-proof verification, or protocol payload types
- you need Feldman or Pedersen commitment/share helpers
- you need low-level additive ElGamal, explicit error classes, or core arithmetic/constants
Related workflows
Section titled “Related workflows”- Get started for the public surface rules and setup
- Runtime and compatibility for browser, Node, Web Crypto, and
bigintrequirements - Browser and worker usage for browser-native setup and transport envelopes
- Honest-majority voting flow for the full ceremony path
- Published payload examples for exact JSON shapes
- Verifying a public board for the verifier entry points and failure handling
Generated reference coverage
Section titled “Generated reference coverage”- exact signatures, types, and return shapes for the exported surface
- contract-level detail for the full ceremony types
- module-level separation between the workflow root package and the advanced public submodules