All notable changes to the Vocdoni DaVinci SDK will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Class-level JSDoc on
VocdoniSequencerService,VocdoniCensusService, andProcessRegistryService. - Unit tests for
ElGamalprimitives (test/crypto/unit/ElGamal.test.ts). - Unit tests for
BallotBuilderRTE/TE coordinate transforms (test/crypto/unit/BallotBuilder.test.ts). electionPresetfield onProcessConfigaccepting a discriminated union of six canonical voting modes (single_choice,multiple_choice,approval,rating,ranking,quadratic). Mutually exclusive with the existingballotfield, which remains supported as the raw-mode escape hatch.resolveElectionPreset(preset, questions)exported for callers that need to compute aBallotModeoutside ofcreateProcess.electionPreset?: ElectionPresetonProcessInfo. Populated bygetProcess(processId)when the on-chain metadata records a recognized preset (stored atmetadata.meta.electionPreset). Absent for raw-ballot processes or when metadata is unavailable.parseElectionPresetFromMetadata(metadata)exported for callers that need to extract a preset from a metadata object outside ofgetProcess.
- Upgraded
@vocdoni/davinci-contractsfrom0.0.45-rc1to^0.0.49. - Declared minimum supported Node.js version as
>=18via theenginesfield. - Marked the package as side-effect free (
"sideEffects": false) to enable tree-shaking in downstream bundlers. - Tightened several
anytypes tounknowninsrc/core/types/metadata.tsandsrc/census/types.tstype guards. Consumers passing strongly-typed values are unaffected; callers relying on implicitanywidening may need an explicit cast. - Updated
SECURITY.mdsupported-versions table to1.0.x. - Updated
CONTRIBUTING.md: corrected the license reference (now correctly AGPL-3.0), refreshed the test-tooling references from Jest to Vitest, and bumped the documented Node minimum to 18. ElectionMetadata.metamap now declares a typedelectionPreset?: ElectionPresetkey, populated by the SDK when anelectionPresetis provided during process creation. The open-ended[key: string]: unknownindex signature is preserved for caller-supplied keys.- The preset is stored under
metadata.meta.electionPreset(not the top-levelmetadata.typefield, which is reserved by the sequencer).ElectionMetadataTemplate(andgetElectionMetadataTemplate()) do not set this field — the SDK populates it only when the caller passes anelectionPreset.
-
Removed the always-skipped working-census participants integration test; the underlying sequencer endpoint was never implemented.
-
BREAKING:
ElectionMetadata.typefield. The legacytype: ElectionResultsTypefield on the metadata interface is gone. Consumers parsing SDK-produced metadata should look atmeta.electionPresetinstead (or use the newparseElectionPresetFromMetadatahelper). -
BREAKING:
ElectionResultsTypeNamesenum. -
BREAKING:
ElectionResultsTypediscriminated union. -
BREAKING:
AbstainProperties,ChoiceProperties,BudgetProperties,ApprovalProperties,QuadraticPropertiesinterfaces.These types were exported but never produced meaningful values inside the SDK (
metadata.typewas always defaulted to{ name: 'single-choice-multiquestion', properties: {} }). Consumers reading metadata produced by older SDK versions will still see that legacy shape in the raw JSON'stypefield; the new schema does not expose it on the TypeScript interface, andparseElectionPresetFromMetadataignores legacy values entirely.
- Node.js minimum is now 18. Node 16 will refuse to install due to the new
enginesfield. - Type tightening. Callers that relied on passing
anytoisMerkleCensusProof,isCSPCensusProof, or to themetamap onElectionMetadatashould now passunknown(or the proper typed value). The runtime behavior is unchanged. ElectionResultsTypeand related types are removed. If you importedElectionResultsTypeNames,ElectionResultsType,AbstainProperties,ChoiceProperties,BudgetProperties,ApprovalProperties, orQuadraticProperties, the imports will now fail at compile time. These types never carried meaningful values inside the SDK (metadata.typewas always a placeholder); to know what kind of election a process is, use the newinfo.electionPresetfield ongetProcess()orparseElectionPresetFromMetadata(metadata).
- Updated SDK network handling to support multi-network sequencer info flows.
- Bound on-chain operations to the active signer chain to improve cross-network safety.
- Expanded multichain integration and unit test coverage.
- Fixed contract error event handling to avoid ethers "unknown fragment" listener failures.
- Stabilized CI integration timing for sequencer bootstrap and process lifecycle waits.
- BREAKING: Removed legacy single-network assumptions in network/process orchestration paths; integrations relying on previous implicit network resolution must migrate to the updated multi-network flow.
- Updated
@vocdoni/davinci-contractsdependency to0.0.45-rc1. - Aligned sequencer info endpoint types with the current API response.
- Simplified script examples to match the current process creation flow.
- BREAKING: Removed
costFromWeightfrom SDK ballot mode types, contract process creation, sequencer ballot input generation, crypto ballot inputs, examples, and documentation. - BREAKING: Updated packed ballot mode encoding to remove the
costFromWeightbit and shift subsequent fields accordingly.
- Added unit coverage for ballot validation rules in
BallotChecker.
- Fixed
BaseServicefetch initialization by bindingglobalThis.fetchto preserve browser context and avoidIllegal invocationerrors. - Added a clear configuration error when no global
fetchis available and nofetchImplis provided.
- Replaced the internal HTTP client implementation with native
fetchacross SDK API services. - Preserved SDK error compatibility by keeping transport errors surfaced with a
.codefield. - Increased CI full-election-cycle vote settlement wait time to reduce transient failures on slower runners.
- Removed
axiosfrom SDK runtime dependencies.
- Relaxed API query parameter typing to support typed objects (for example,
SnapshotsQueryParams) without TypeScript errors.
- Migrated SDK test commands and configuration from Jest to Vitest, including dedicated unit and integration configs.
- Updated CSP proof signing so voter index is included in the signed message (
index + processId + address + weight), and extendedcspVerifyto optionally verify with an explicit index. - Updated sequencer metadata hash validation to the 72-hex format returned by metadata endpoints.
- Forced integration tests to run sequentially under Vitest to avoid race conditions against shared infrastructure.
- Updated test setup/mocking utilities for Vitest compatibility and more reliable mock cleanup between tests.
- CSP vote payload compatibility updated to support sequencer field naming migration by normalizing legacy
index/voterIndexhandling before vote submission. - CSP proof typing was aligned with numeric index transport expectations for sequencer interoperability.
- Core process lifecycle integration tests were refactored to reduce duplication with shared lifecycle builders and reusable status-stream assertions.
- Stabilized process status transition integration tests (
end,pause,cancel,resume) by waiting on on-chain timestamp progression instead of fixed wall-clock sleeps. - Reduced teardown-related integration flakiness by improving provider cleanup behavior in integration test runtime.
- Native TypeScript CSP cryptography flow via
DavinciCSP(no external CSP WASM runtime required). DavinciSDK.getCSP()helper for lazy CSP service initialization.- Extended integration coverage for census providers, including CSP provider scenarios and validation.
- Expanded domain test suites and shared test helpers (
test/helpers/*) for more consistent integration setup.
- Updated
@vocdoni/davinci-contractsdependency to0.0.37and aligned SDK contract/process wiring with the latest contracts package. - CSP proof handling was consolidated around SDK-native types and validation in vote orchestration.
- Test command organization and docs were updated to include domain suites (
test:core,test:crypto) and clearer environment variable usage. - BREAKING: SDK configuration no longer accepts
addresses.organizationRegistry. - BREAKING:
sdk.organizationsaccessor was removed from the public SDK API. - BREAKING: Legacy sequencer crypto classes were removed in favor of
DavinciCSPandBallotInputGenerator.
- Removed deprecated/legacy sequencer crypto services:
CircomProofServiceDavinciCryptoService
- Removed
OrganizationRegistryservice and its contract integration tests. - Removed the
examples/uiapp and thedeploy-uiGitHub workflow to keep this repository focused on SDK code and script examples.
- Minor sequencer integration test stability adjustments.
- Buffer Polyfill: Fixed browser compatibility by adding proper buffer polyfill configuration
- Added
bufferpackage as a dependency - Added
@rollup/plugin-injectfor automatic Buffer injection in browser environments - Updated Rollup configuration to properly inject Buffer polyfill for browser builds
- Ensures SDK works correctly in browser environments without manual Buffer setup
- Added
- Improved Rollup build configuration for better browser compatibility
- Removed obsolete
src/js/directory containing old JavaScript implementation- Cleaned up legacy code that was no longer in use
- Reduced repository size and complexity
- Browser builds now automatically include Buffer polyfill via Rollup plugin injection
- UMD, ESM, and CommonJS builds all properly handle Buffer dependencies
- No breaking changes - existing code continues to work without modifications
- Circuit File Caching: Implemented in-memory caching for WASM, zkey, and verification key files
- Prevents re-downloading circuit files when submitting votes in parallel
- Files are downloaded once per
VoteOrchestrationServiceinstance and cached for all subsequent votes - Significantly improves performance for batch voting scenarios
- Hash Verification: Added SHA-256 hash verification for downloaded circuit files
- Verifies integrity of
circuit.wasm,proving_key.zkey, andverification_key.json - Controlled by
verifyCircuitFilesconfiguration option (enabled by default) - Enhances security by ensuring downloaded files match expected hashes from sequencer
- Verifies integrity of
- Added
verifyHash()private method inVoteOrchestrationServicefor file integrity checks
- VoteId Signing: Modified
signVote()method to pad voteId to 32 bytes (64 hex characters) before signing- Ensures consistent signature format for vote verification
- Pads with leading zeros to meet required byte length
- Imported
sha256from ethers for hash verification functionality
- Fixed Rollup configuration warning for
circomlibjsglobal variable- Added
'circomlibjs': 'circomlibjs'to UMD globals inrollup.config.js - Eliminates build warnings about missing global variable names
- Added
- Circuit file downloads reduced from N downloads to 1 download when submitting N votes in parallel
- Example: 5 parallel votes now download files once instead of 5 times
- Cache is maintained per service instance throughout its lifetime
- Cache implementation uses
Map<string, Uint8Array>for WASM and zkey files - Cache implementation uses
Map<string, any>for parsed verification key JSON - Hash verification uses ethers'
sha256function for consistency - All verification is performed after download but before caching
verifyCircuitFilesandverifyProofoptions both default totruefor maximum security
- Updated
@vocdoni/davinci-contractsdependency from version 0.0.31 to 0.0.35- v0.0.33: Added
onchainAllowAnyValidRoot: booleanfield to census data - v0.0.34: Added
contractAddress: AddressLikefield for onchain censuses
- v0.0.33: Added
- BREAKING:
OnchainCensusconstructor now requiresuriparameter (no longer optional)- URI must point to a data source like a subgraph endpoint, not explorers
- Added validation to reject empty URI strings
- Example:
new OnchainCensus(tokenAddress, "https://api.studio.thegraph.com/...")
- Added
contractAddress?: stringfield toCensusDatainterface for onchain census support - Added
onchainAllowAnyValidRoot?: booleanfield toCensusDatainterface- Automatically set to
truefor onchain censuses,falsefor others
- Automatically set to
CensusOrchestrator.getCensusData()now extracts and returnscontractAddressfromOnchainCensusobjects- Enhanced README with comprehensive
OnchainCensusdocumentation- Added token-based voting examples
- Documented subgraph integration patterns
- Provided examples for different subgraph providers (The Graph Studio, custom deployments)
- CRITICAL:
OnchainCensusnow setscensusRootto 32-byte zero value (0x0000...000)- Required when
contractAddressis set to prevent smart contract validation failures - Contract address is now properly passed through
contractAddressfield instead ofcensusRoot
- Required when
- Fixed
ProcessRegistryService.newProcess()to include both new census fields with proper defaults - Fixed
ProcessRegistryService.setProcessCensus()to include both new census fields with proper defaults - Fixed
ProcessOrchestrationService.handleCensus()to properly extract and passcontractAddress - Updated all test files to provide required URI parameter for
OnchainCensus- Fixed 17 tests in
test/census/unit/OnchainCensus.test.ts - Fixed 3 tests in
test/census/unit/CensusOrchestrator.test.ts - Added new test for URI validation
- Fixed 17 tests in
censusRootfor onchain censuses:0x0000000000000000000000000000000000000000000000000000000000000000contractAddressproperly stored and exposed via getter inOnchainCensusclassonchainAllowAnyValidRootautomatically managed based on census type- Census data flow:
OnchainCensus→CensusOrchestrator→ProcessOrchestrationService→ProcessRegistryService→ Smart Contract
Before (v0.1.0):
// URI was optional
const census = new OnchainCensus("0xTokenAddress...");After (v0.1.1):
// URI is required and should be a subgraph endpoint
const census = new OnchainCensus(
"0xTokenAddress...",
"https://api.studio.thegraph.com/query/12345/token-holders/v1.0.0"
);- BREAKING: Complete census class refactor for improved API ergonomics
- Removed
PlainCensusandWeightedCensusclasses - Added new named census classes that automatically determine their census origin:
OffchainCensus()- Static Merkle tree census for OffchainStatic originOffchainDynamicCensus()- Updatable Merkle tree census for OffchainDynamic originOnchainCensus(contractAddress, uri?)- On-chain census for Onchain originCspCensus(publicKey, cspURI)- Certificate Service Provider census for CSP origin
- New unified
MerkleCensusbase class that supports both plain and weighted participants- Single
add()method intelligently handles plain addresses (weight=1) and weighted participants - Flexible weight types: accepts string, number, or bigint values
- Single
- Removed
CensusTypeenum (redundant with named census classes) - Removed
sizeparameter from all census classes (no longer needed) - Smart maxVoters logic:
maxVotersis now optional for published MerkleCensus objects (OffchainCensus, OffchainDynamicCensus)- SDK automatically calculates
maxVotersfrom participant count when using census objects - Still required for manual census configs, OnchainCensus, CspCensus, and PublishedCensus
- SDK automatically calculates
- Removed
- Updated
PublishedCensusconstructor to acceptCensusOrigininstead of deprecatedCensusType - Updated
CspCensusconstructor to only require (publicKey, cspURI) parameters
- New
Participantinterface exported fromMerkleCensusfor type safety - Comprehensive unit tests for all new census classes:
test/census/unit/OffchainCensus.test.ts- Tests for plain and weighted OffchainCensustest/census/unit/OffchainDynamicCensus.test.ts- Tests for dynamic census functionalitytest/census/unit/OnchainCensus.test.ts- Tests for on-chain census
- Updated existing tests:
test/census/unit/PublishedCensus.test.ts- Updated for new APItest/census/unit/CspCensus.test.ts- Updated for new constructortest/census/unit/CensusOrchestrator.test.ts- Updated for new census classes
- Updated integration tests to use new census classes and maxVoters behavior:
test/core/integration/SimpleProcessCreation.test.ts- Updated all census usagetest/core/integration/VoteOrchestration.test.ts- Updated all census configs
- Removed
PlainCensusclass (replaced byOffchainCensus) - Removed
WeightedCensusclass (replaced byOffchainCensuswith weighted participants) - Removed
CensusTypeenum (replaced byCensusOriginusage) - Removed
sizeproperty from all census classes - Removed legacy census test files:
test/census/unit/PlainCensus.test.tstest/census/unit/WeightedCensus.test.ts
- Fixed
Participanttype export issue in census classes index file - Updated example script to showcase new census API and optional maxVoters feature
- Updated README.md documentation to reflect new census class names and usage patterns
- Corrected all manual census configuration examples to exclude deprecated
sizeparameter
Before (v0.0.7):
import { PlainCensus, WeightedCensus } from '@vocdoni/davinci-sdk';
// Plain census
const plainCensus = new PlainCensus();
plainCensus.add(['0x123...', '0x456...']);
// Weighted census
const weightedCensus = new WeightedCensus();
weightedCensus.add([
{ key: '0x123...', weight: 10 },
{ key: '0x456...', weight: 20 }
]);After (v0.1.0):
import { OffchainCensus } from '@vocdoni/davinci-sdk';
// Plain addresses (weight defaults to 1)
const census = new OffchainCensus();
census.add(['0x123...', '0x456...']);
// Weighted participants (same class!)
const census = new OffchainCensus();
census.add([
{ key: '0x123...', weight: 10 },
{ key: '0x456...', weight: 20 }
]);Before (v0.0.7):
const census = new PlainCensus();
census.add(['0x123...', '0x456...']);
const process = await sdk.createProcess({
census: census,
maxVoters: 100, // Always required
// ... other config
});After (v0.1.0):
const census = new OffchainCensus();
census.add(['0x123...', '0x456...']);
const process = await sdk.createProcess({
census: census,
// maxVoters is optional - auto-calculated from census!
// ... other config
});Before (v0.0.7):
const process = await sdk.createProcess({
census: {
type: CensusOrigin.OffchainStatic,
root: "0x...",
size: 100, // Had size parameter
uri: "ipfs://..."
},
// ... other config
});After (v0.1.0):
const process = await sdk.createProcess({
census: {
type: CensusOrigin.OffchainStatic,
root: "0x...",
uri: "ipfs://..." // No size parameter
},
maxVoters: 100, // Now required for manual configs
// ... other config
});Before (v0.0.7):
const census = new CspCensus(
CensusOrigin.CSP,
"0x...",
"https://csp.example.com",
1000
);After (v0.1.0):
const census = new CspCensus(
"0x...", // publicKey
"https://csp.example.com" // cspURI
);
// Use with maxVoters in process config
const process = await sdk.createProcess({
census: census,
maxVoters: 1000, // Required for CSP
// ... other config
});- Census classes now use the class name itself to determine census origin, eliminating the need to pass
CensusOriginas a constructor parameter - The
MerkleCensusbase class provides a unified implementation for both plain and weighted participants - Automatic maxVoters calculation reduces boilerplate and prevents mismatches between census size and maxVoters
- All census classes properly extend the base
Censusclass with appropriate origin types - Type exports fixed to properly handle both type and value exports
- Batch Voting Submission: Enhanced voting capabilities to support batch submission of multiple votes
- Improved vote orchestration for handling multiple votes efficiently
- Updated example script to demonstrate batch voting workflows
- CensusNotUpdatable Error: New error class for handling census update restrictions
- Added to
src/contracts/errors.tsfor better error handling when census updates are not allowed
- Added to
- BREAKING: Refactored census origin types for better clarity and alignment with smart contracts
- Changed
CensusOrigin.CensusOriginMerkleTreetoCensusOrigin.OffchainStatic - Changed
CensusOrigin.CensusOriginCSPtoCensusOrigin.CSP - Updated all census classes (
Census,PlainCensus,WeightedCensus,CspCensus,PublishedCensus) to use new origin types - Updated
ProcessRegistryServiceto reflect new census origin types in event callbacks - Modified SDK documentation and examples to use new census origin nomenclature
- Changed
- Enhanced census origin handling across the SDK
- Improved census type detection and origin assignment
- Better validation for census update operations
- Updated
@vocdoni/davinci-contractsdependency to version0.0.31- Includes latest smart contract improvements and census origin type updates
- Improved test coverage for census update scenarios
- Fixed census origin type consistency across the codebase
- Census origin refactoring ensures consistency between SDK types and smart contract enums
- New
OffchainStaticname better represents MerkleTree-based censuses stored off-chain - All census-related tests updated to use new origin types
- Examples updated to demonstrate best practices with new API
- Process MaxVoters Management: New methods to manage the maximum number of voters for a process
- Added
setProcessMaxVoters(processId, maxVoters)method to DavinciSDK for updating voter limits - Added
setProcessMaxVotersStream(processId, maxVoters)for real-time transaction status monitoring - Added
maxVotersoptional parameter toProcessConfigduring process creation (defaults to census size) - Added
maxVotersfield toProcessInforeturned bygetProcess() - Available at all architecture layers: SDK, Orchestration, and Contract services
- Added
- Added
ProcessMaxVotersChangedCallbackevent type for monitoring maxVoters changes - Added
onProcessMaxVotersChanged()event listener to ProcessRegistryService - Contract integration now supports
@vocdoni/davinci-contractsversion 0.0.29 with maxVoters parameter
- Updated
ProcessRegistryService.newProcess()to includemaxVotersparameter - Updated
ProcessOrchestrationServiceto automatically set maxVoters to census size if not specified - Process creation now validates and enforces maximum voter limits on-chain
- All process management methods follow consistent architecture pattern:
DavinciSDK→ProcessOrchestrationService→ProcessRegistryService→Smart Contract - MaxVoters updates emit
ProcessMaxVotersChangedevents on-chain for monitoring - Comprehensive test coverage added at contract, orchestration, and SDK levels
- Both stream-based and promise-based APIs available for maximum flexibility
- BREAKING:
GetProcessResponsetype updated to match actual sequencer API responsestartTimechanged fromnumbertostring(ISO date format)resultchanged fromstring[]tostring[] | null(can be null before process ends)- Renamed
voteCounttovotersCount - Renamed
voteOverwrittenCounttooverwrittenVotesCount - Removed
metadatafield (not returned by sequencer)
- BREAKING:
isAddressAbleToVote()now returnsPromise<boolean>instead of participant info object- Returns
trueif address is in census and can vote - Returns
falseonly when address is not in census (error code 40001) - Throws errors for invalid inputs (invalid process ID, invalid address format, etc.)
- Use new
getAddressWeight()method to retrieve weight separately if needed
- Returns
- Optimized MerkleTree voting to use sequencer's participant endpoint
- Vote submission now calls
getAddressWeight()instead of fetching full census proof - More efficient - only fetches required weight for vote encryption
- Custom census providers still supported for both MerkleTree and CSP
- Vote submission now calls
- Added
getAddressWeight(processId, address)method to retrieve voting weight- Returns weight as a string
- Available in both SequencerService and DavinciSDK
- Throws errors for invalid process ID or address not in census
- Added comprehensive test coverage for new methods
- Updated
isAddressAbleToVotetests to expect boolean return - Added 4 new tests for
getAddressWeightfunctionality - Updated vote orchestration tests for new census proof flow
- Updated
- Fixed sequencer integration tests to use new property names (
votersCount,overwrittenVotesCount) - Fixed vote orchestration to properly handle census weight retrieval from sequencer
- Improved error handling in
isAddressAbleToVoteto distinguish between "not in census" and other errors
VoteOrchestrationService.getCensusProof()now usesgetAddressWeight()for MerkleTree census- Census proof objects for MerkleTree voting now include minimal data (weight only)
- Full census proof still available through custom census providers if needed
- All type definitions now accurately match sequencer API responses
- BREAKING: Removed
maxVotesfield from census data structure in smart contracts- Census now only includes:
censusOrigin,censusRoot, andcensusURI(3 fields instead of 4) - Updated
ProcessRegistryService.newProcess()to remove maxVotes parameter - Updated
ProcessRegistryService.setProcessCensus()to remove maxVotes parameter - Updated
ProcessCensusUpdatedCallbacktype signature
- Census now only includes:
- BREAKING: Census proof
weightfield is now mandatory (required by Go WASM cryptographic operations)- Previously optional weight field in census proofs is now required
- Type guards now validate that weight is present and is a string
- Fixed CSP proof verification to include weight parameter
- Added
weightfield toCSPSignOutputinterface - Added
weightparameter tocspVerify()method - Updated all CSP-related tests to include weight in verification calls
- Added
- Added
isAddressAbleToVote()method to DavinciSDK- Returns participant information including voting weight for an address
- Useful for verifying voter eligibility before vote submission
- Enables displaying voting power/weight to users
- Supports building voter dashboards and analytics
- Added comprehensive test coverage for
isAddressAbleToVote()functionality- 1 test in Sequencer integration tests
- 4 tests in VoteOrchestration integration tests
- Updated README.md with documentation for new
isAddressAbleToVote()method
- Fixed
ProcessInfointerface to include censussizefield- Census size is not stored on-chain, so it's set to 0 when fetching process info
- Ensures compatibility with the
BaseProcessinterface
- Fixed all test files to work with updated census data structure
- Removed maxVotes assertions from ProcessRegistry tests
- Removed maxVotes assertions from SimpleProcessCreation tests
- Updated CensusOrchestrator tests to include missing size field
- All 23 CSP tests now passing with updated verification parameters
- Census proof weight validation now enforced at compile-time
- CSP signature verification now properly includes weight in cryptographic operations
- Process information retrieval properly handles missing census size from on-chain data
- BREAKING: Removed legacy
environmentparameter from SDK configuration - BREAKING: SDK now requires explicit
sequencerUrlparameter - Updated SDK to fetch contract addresses automatically from sequencer
/infoendpoint - Improved contract integration tests to dynamically fetch addresses from sequencer
- Organized and optimized import statements across the codebase
- Added proper validation for
censusUrlrequirement when using PlainCensus or WeightedCensus - Added helpful error messages when census URL is missing for census publication
- Documentation updates reflecting new initialization patterns in README
- Fixed async error handling in Sequencer integration tests
- Fixed census URL validation to properly check axios baseURL configuration
- Fixed test files to use environment variables instead of hardcoded URLs
- Removed entire
src/core/config/module (deprecated legacy configuration system) - Removed unused
deployedAddressesexport and related configuration code - Removed hardcoded contract addresses from codebase
- Initial public release preparation
- Complete TypeScript SDK for Vocdoni DaVinci protocol
- Support for both MerkleTree and CSP census types
- Comprehensive examples (script and UI)
- Full test coverage with unit and integration tests
- Updated build configuration for better module compatibility
- Improved error handling and type definitions
- Various bug fixes and stability improvements
-
Core SDK Features
- Complete DaVinci SDK implementation with TypeScript support
- Process creation and management capabilities
- Vote submission with homomorphic encryption
- Census creation and management (MerkleTree and CSP)
- Smart contract integration for Ethereum networks
- Support for Sepolia testnet and Ethereum mainnet
-
API Services
- Sequencer API client for vote processing
- Census API client for participant management
- Base API service with error handling and retries
- Comprehensive type definitions
-
Cryptographic Features
- Homomorphic encryption for vote privacy
- zk-SNARK proof generation and verification
- Circom circuit integration
- CSP (Census Service Provider) signature support
-
Developer Experience
- Complete TypeScript definitions
- ESM and CommonJS module support
- Browser and Node.js compatibility
- Comprehensive JSDoc documentation
- Multiple bundle formats (UMD, ES modules, CommonJS)
-
Examples and Documentation
- Script example with complete voting workflow
- React UI example with wallet integration
- Comprehensive README with usage examples
- API reference documentation
- Contributing guidelines
-
Testing Infrastructure
- Unit tests for all core functionality
- Integration tests with real network interactions
- Jest test framework setup
- Test utilities and helpers
-
Build and Development
- Rollup build configuration for multiple formats
- TypeScript compilation with strict mode
- ESLint and Prettier configuration
- Automated formatting and linting
- Git hooks for code quality
-
Quality Assurance
- Comprehensive error handling
- Input validation and sanitization
- Network timeout and retry logic
- Memory-efficient proof generation
-
Dependencies
- ethers.js v6 for Ethereum interactions
- axios for HTTP requests
- snarkjs for zk-SNARK operations
- @vocdoni/davinci-contracts for smart contract ABIs
-
Supported Networks
- Ethereum Sepolia testnet
- Ethereum mainnet
- Custom network configuration support
-
Supported Environments
- Node.js 16+
- Modern browsers (Chrome, Firefox, Safari, Edge)
- React applications
- Vue.js applications
- Vanilla JavaScript/TypeScript projects
- None at initial release
This is the first public release of the Vocdoni DaVinci SDK, providing a complete TypeScript interface for building decentralized voting applications on the Vocdoni DaVinci protocol.
Key Features:
- 🔒 Privacy-First: Homomorphic encryption ensures vote privacy
- 🛡️ Secure: Built on battle-tested cryptographic primitives
- ⚡ Easy Integration: Simple, intuitive API for developers
- 🌐 Decentralized: No central authority controls the voting process
- 📱 Cross-Platform: Works in browsers, Node.js, and mobile apps
- 🔧 TypeScript: Full type safety and excellent developer experience
Getting Started:
npm install @vocdoni/davinci-sdk ethersSee the README for complete usage examples and API documentation.
Breaking Changes: N/A (initial release)
Migration Guide: N/A (initial release)
When contributing to this project, please:
- Follow the Contributing Guidelines
- Update this CHANGELOG with your changes
- Use the format described in Keep a Changelog
- Group changes by type: Added, Changed, Deprecated, Removed, Fixed, Security