@digitaldefiance/node-ecies-lib 4.8.2 → 4.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +195 -13
- package/package.json +10 -5
- package/src/constants.d.ts.map +1 -1
- package/src/constants.js +31 -25
- package/src/constants.js.map +1 -1
- package/src/interfaces/index.d.ts +1 -2
- package/src/interfaces/index.d.ts.map +1 -1
- package/src/interfaces/index.js +6 -3
- package/src/interfaces/index.js.map +1 -1
- package/src/interfaces/member.d.ts +30 -12
- package/src/interfaces/member.d.ts.map +1 -1
- package/src/interfaces/platform-buffer.d.ts +9 -0
- package/src/interfaces/platform-buffer.d.ts.map +1 -0
- package/src/interfaces/platform-buffer.js +3 -0
- package/src/interfaces/platform-buffer.js.map +1 -0
- package/src/interfaces/platform-id.d.ts +2 -2
- package/src/interfaces/platform-id.d.ts.map +1 -1
- package/src/lib/id-providers/buffer-provider.d.ts +54 -0
- package/src/lib/id-providers/buffer-provider.d.ts.map +1 -0
- package/src/lib/id-providers/buffer-provider.js +93 -0
- package/src/lib/id-providers/buffer-provider.js.map +1 -0
- package/src/lib/index.d.ts +1 -0
- package/src/lib/index.d.ts.map +1 -1
- package/src/lib/index.js +1 -0
- package/src/lib/index.js.map +1 -1
- package/src/lib/voting/audit.d.ts +39 -48
- package/src/lib/voting/audit.d.ts.map +1 -1
- package/src/lib/voting/audit.js +103 -111
- package/src/lib/voting/audit.js.map +1 -1
- package/src/lib/voting/bulletin-board.d.ts +47 -81
- package/src/lib/voting/bulletin-board.d.ts.map +1 -1
- package/src/lib/voting/bulletin-board.js +95 -231
- package/src/lib/voting/bulletin-board.js.map +1 -1
- package/src/lib/voting/encoder.d.ts +7 -16
- package/src/lib/voting/encoder.d.ts.map +1 -1
- package/src/lib/voting/encoder.js +11 -107
- package/src/lib/voting/encoder.js.map +1 -1
- package/src/lib/voting/enumerations/index.d.ts +6 -0
- package/src/lib/voting/enumerations/index.d.ts.map +1 -0
- package/src/lib/voting/enumerations/index.js +14 -0
- package/src/lib/voting/enumerations/index.js.map +1 -0
- package/src/lib/voting/event-logger.d.ts +13 -74
- package/src/lib/voting/event-logger.d.ts.map +1 -1
- package/src/lib/voting/event-logger.js +19 -140
- package/src/lib/voting/event-logger.js.map +1 -1
- package/src/lib/voting/examples.d.ts +112 -0
- package/src/lib/voting/examples.d.ts.map +1 -0
- package/src/lib/voting/examples.js +386 -0
- package/src/lib/voting/examples.js.map +1 -0
- package/src/lib/voting/factory.d.ts +38 -9
- package/src/lib/voting/factory.d.ts.map +1 -1
- package/src/lib/voting/factory.js +42 -8
- package/src/lib/voting/factory.js.map +1 -1
- package/src/lib/voting/hierarchical-aggregator.d.ts +44 -0
- package/src/lib/voting/hierarchical-aggregator.d.ts.map +1 -0
- package/src/lib/voting/hierarchical-aggregator.js +56 -0
- package/src/lib/voting/hierarchical-aggregator.js.map +1 -0
- package/src/lib/voting/index.d.ts +43 -7
- package/src/lib/voting/index.d.ts.map +1 -1
- package/src/lib/voting/index.js +53 -10
- package/src/lib/voting/index.js.map +1 -1
- package/src/lib/voting/interfaces/aggregated-tally.d.ts +10 -0
- package/src/lib/voting/interfaces/aggregated-tally.d.ts.map +1 -0
- package/src/lib/voting/interfaces/aggregated-tally.js +3 -0
- package/src/lib/voting/interfaces/aggregated-tally.js.map +1 -0
- package/src/lib/voting/interfaces/audit-entry.d.ts +10 -0
- package/src/lib/voting/interfaces/audit-entry.d.ts.map +1 -0
- package/src/lib/voting/interfaces/audit-entry.js +3 -0
- package/src/lib/voting/interfaces/audit-entry.js.map +1 -0
- package/src/lib/voting/interfaces/audit-log.d.ts +10 -0
- package/src/lib/voting/interfaces/audit-log.d.ts.map +1 -0
- package/src/lib/voting/interfaces/audit-log.js +3 -0
- package/src/lib/voting/interfaces/audit-log.js.map +1 -0
- package/src/lib/voting/interfaces/bulletin-board-entry.d.ts +10 -0
- package/src/lib/voting/interfaces/bulletin-board-entry.d.ts.map +1 -0
- package/src/lib/voting/interfaces/bulletin-board-entry.js +3 -0
- package/src/lib/voting/interfaces/bulletin-board-entry.js.map +1 -0
- package/src/lib/voting/interfaces/bulletin-board.d.ts +10 -0
- package/src/lib/voting/interfaces/bulletin-board.d.ts.map +1 -0
- package/src/lib/voting/interfaces/bulletin-board.js +3 -0
- package/src/lib/voting/interfaces/bulletin-board.js.map +1 -0
- package/src/lib/voting/interfaces/checkpoint-manager-extended.d.ts +10 -0
- package/src/lib/voting/interfaces/checkpoint-manager-extended.d.ts.map +1 -0
- package/src/lib/voting/interfaces/checkpoint-manager-extended.js +3 -0
- package/src/lib/voting/interfaces/checkpoint-manager-extended.js.map +1 -0
- package/src/lib/voting/interfaces/checkpoint-manager.d.ts +9 -0
- package/src/lib/voting/interfaces/checkpoint-manager.d.ts.map +1 -0
- package/src/lib/voting/interfaces/checkpoint-manager.js +3 -0
- package/src/lib/voting/interfaces/checkpoint-manager.js.map +1 -0
- package/src/lib/voting/interfaces/checkpoint-metadata.d.ts +8 -0
- package/src/lib/voting/interfaces/checkpoint-metadata.d.ts.map +1 -0
- package/src/lib/voting/interfaces/checkpoint-metadata.js +3 -0
- package/src/lib/voting/interfaces/checkpoint-metadata.js.map +1 -0
- package/src/lib/voting/interfaces/ecies-service-with-voting.d.ts +8 -0
- package/src/lib/voting/interfaces/ecies-service-with-voting.d.ts.map +1 -0
- package/src/lib/voting/interfaces/ecies-service-with-voting.js +3 -0
- package/src/lib/voting/interfaces/ecies-service-with-voting.js.map +1 -0
- package/src/lib/voting/interfaces/encrypted-vote.d.ts +10 -0
- package/src/lib/voting/interfaces/encrypted-vote.d.ts.map +1 -0
- package/src/lib/voting/interfaces/encrypted-vote.js +3 -0
- package/src/lib/voting/interfaces/encrypted-vote.js.map +1 -0
- package/src/lib/voting/interfaces/event-log-entry.d.ts +10 -0
- package/src/lib/voting/interfaces/event-log-entry.d.ts.map +1 -0
- package/src/lib/voting/interfaces/event-log-entry.js +3 -0
- package/src/lib/voting/interfaces/event-log-entry.js.map +1 -0
- package/src/lib/voting/interfaces/event-logger.d.ts +10 -0
- package/src/lib/voting/interfaces/event-logger.d.ts.map +1 -0
- package/src/lib/voting/interfaces/event-logger.js +3 -0
- package/src/lib/voting/interfaces/event-logger.js.map +1 -0
- package/src/lib/voting/interfaces/index.d.ts +37 -0
- package/src/lib/voting/interfaces/index.d.ts.map +1 -0
- package/src/lib/voting/interfaces/index.js +9 -0
- package/src/lib/voting/interfaces/index.js.map +1 -0
- package/src/lib/voting/interfaces/jurisdiction-config.d.ts +10 -0
- package/src/lib/voting/interfaces/jurisdiction-config.d.ts.map +1 -0
- package/src/lib/voting/interfaces/jurisdiction-config.js +3 -0
- package/src/lib/voting/interfaces/jurisdiction-config.js.map +1 -0
- package/src/lib/voting/interfaces/plaintext-vote.d.ts +10 -0
- package/src/lib/voting/interfaces/plaintext-vote.d.ts.map +1 -0
- package/src/lib/voting/interfaces/plaintext-vote.js +3 -0
- package/src/lib/voting/interfaces/plaintext-vote.js.map +1 -0
- package/src/lib/voting/interfaces/poll-configuration.d.ts +8 -0
- package/src/lib/voting/interfaces/poll-configuration.d.ts.map +1 -0
- package/src/lib/voting/interfaces/poll-configuration.js +3 -0
- package/src/lib/voting/interfaces/poll-configuration.js.map +1 -0
- package/src/lib/voting/interfaces/poll-results.d.ts +8 -0
- package/src/lib/voting/interfaces/poll-results.d.ts.map +1 -0
- package/src/lib/voting/interfaces/poll-results.js +3 -0
- package/src/lib/voting/interfaces/poll-results.js.map +1 -0
- package/src/lib/voting/interfaces/poll-tallier.d.ts +10 -0
- package/src/lib/voting/interfaces/poll-tallier.d.ts.map +1 -0
- package/src/lib/voting/interfaces/poll-tallier.js +3 -0
- package/src/lib/voting/interfaces/poll-tallier.js.map +1 -0
- package/src/lib/voting/interfaces/poll.d.ts +10 -0
- package/src/lib/voting/interfaces/poll.d.ts.map +1 -0
- package/src/lib/voting/interfaces/poll.js +3 -0
- package/src/lib/voting/interfaces/poll.js.map +1 -0
- package/src/lib/voting/interfaces/round-result.d.ts +8 -0
- package/src/lib/voting/interfaces/round-result.d.ts.map +1 -0
- package/src/lib/voting/interfaces/round-result.js +3 -0
- package/src/lib/voting/interfaces/round-result.js.map +1 -0
- package/src/lib/voting/interfaces/state-snapshot.d.ts +15 -0
- package/src/lib/voting/interfaces/state-snapshot.d.ts.map +1 -0
- package/src/lib/voting/interfaces/state-snapshot.js +3 -0
- package/src/lib/voting/interfaces/state-snapshot.js.map +1 -0
- package/src/lib/voting/interfaces/supermajority-config.d.ts +8 -0
- package/src/lib/voting/interfaces/supermajority-config.d.ts.map +1 -0
- package/src/lib/voting/interfaces/supermajority-config.js +3 -0
- package/src/lib/voting/interfaces/supermajority-config.js.map +1 -0
- package/src/lib/voting/interfaces/tally-proof.d.ts +10 -0
- package/src/lib/voting/interfaces/tally-proof.d.ts.map +1 -0
- package/src/lib/voting/interfaces/tally-proof.js +3 -0
- package/src/lib/voting/interfaces/tally-proof.js.map +1 -0
- package/src/lib/voting/interfaces/vote-encoder.d.ts +10 -0
- package/src/lib/voting/interfaces/vote-encoder.d.ts.map +1 -0
- package/src/lib/voting/interfaces/vote-encoder.js +3 -0
- package/src/lib/voting/interfaces/vote-encoder.js.map +1 -0
- package/src/lib/voting/interfaces/vote-logger-extended.d.ts +10 -0
- package/src/lib/voting/interfaces/vote-logger-extended.d.ts.map +1 -0
- package/src/lib/voting/interfaces/vote-logger-extended.js +3 -0
- package/src/lib/voting/interfaces/vote-logger-extended.js.map +1 -0
- package/src/lib/voting/interfaces/vote-logger.d.ts +9 -0
- package/src/lib/voting/interfaces/vote-logger.d.ts.map +1 -0
- package/src/lib/voting/interfaces/vote-logger.js +3 -0
- package/src/lib/voting/interfaces/vote-logger.js.map +1 -0
- package/src/lib/voting/interfaces/voting-consts.d.ts +9 -0
- package/src/lib/voting/interfaces/voting-consts.d.ts.map +1 -0
- package/src/lib/voting/interfaces/voting-consts.js +3 -0
- package/src/lib/voting/interfaces/voting-consts.js.map +1 -0
- package/src/lib/voting/interfaces/voting-key-derivation-options.d.ts +7 -0
- package/src/lib/voting/interfaces/voting-key-derivation-options.d.ts.map +1 -0
- package/src/lib/voting/interfaces/voting-key-derivation-options.js +3 -0
- package/src/lib/voting/interfaces/voting-key-derivation-options.js.map +1 -0
- package/src/lib/voting/interfaces/voting-poll-results.d.ts +7 -0
- package/src/lib/voting/interfaces/voting-poll-results.d.ts.map +1 -0
- package/src/lib/voting/interfaces/voting-poll-results.js +3 -0
- package/src/lib/voting/interfaces/voting-poll-results.js.map +1 -0
- package/src/lib/voting/interfaces/voting-receipt.d.ts +10 -0
- package/src/lib/voting/interfaces/voting-receipt.d.ts.map +1 -0
- package/src/lib/voting/interfaces/voting-receipt.js +3 -0
- package/src/lib/voting/interfaces/voting-receipt.js.map +1 -0
- package/src/lib/voting/interfaces/voting-security-validator.d.ts +8 -0
- package/src/lib/voting/interfaces/voting-security-validator.d.ts.map +1 -0
- package/src/lib/voting/interfaces/voting-security-validator.js +3 -0
- package/src/lib/voting/interfaces/voting-security-validator.js.map +1 -0
- package/src/lib/voting/node-persistent-state.d.ts +40 -0
- package/src/lib/voting/node-persistent-state.d.ts.map +1 -0
- package/src/lib/voting/node-persistent-state.js +222 -0
- package/src/lib/voting/node-persistent-state.js.map +1 -0
- package/src/lib/voting/persistent-state.d.ts +44 -0
- package/src/lib/voting/persistent-state.d.ts.map +1 -0
- package/src/lib/voting/persistent-state.js +106 -0
- package/src/lib/voting/persistent-state.js.map +1 -0
- package/src/lib/voting/poll-core.d.ts +14 -29
- package/src/lib/voting/poll-core.d.ts.map +1 -1
- package/src/lib/voting/poll-core.js +13 -176
- package/src/lib/voting/poll-core.js.map +1 -1
- package/src/lib/voting/poll.js +3 -3
- package/src/lib/voting/poll.js.map +1 -1
- package/src/lib/voting/security.d.ts +9 -15
- package/src/lib/voting/security.d.ts.map +1 -1
- package/src/lib/voting/security.js +12 -44
- package/src/lib/voting/security.js.map +1 -1
- package/src/lib/voting/tallier.d.ts +11 -20
- package/src/lib/voting/tallier.d.ts.map +1 -1
- package/src/lib/voting/tallier.js +17 -366
- package/src/lib/voting/tallier.js.map +1 -1
- package/src/lib/voting/test-voter-pool.d.ts +16 -0
- package/src/lib/voting/test-voter-pool.d.ts.map +1 -0
- package/src/lib/voting/test-voter-pool.js +69 -0
- package/src/lib/voting/test-voter-pool.js.map +1 -0
- package/src/lib/voting/us-election-example.d.ts +2 -0
- package/src/lib/voting/us-election-example.d.ts.map +1 -0
- package/src/lib/voting/us-election-example.js +170 -0
- package/src/lib/voting/us-election-example.js.map +1 -0
- package/src/member.d.ts +4 -1
- package/src/member.d.ts.map +1 -1
- package/src/member.js +40 -16
- package/src/member.js.map +1 -1
- package/src/secure-buffer.d.ts +1 -2
- package/src/secure-buffer.d.ts.map +1 -1
- package/src/secure-buffer.js +3 -9
- package/src/secure-buffer.js.map +1 -1
- package/src/services/ecies/crypto-core.d.ts.map +1 -1
- package/src/services/ecies/crypto-core.js +24 -0
- package/src/services/ecies/crypto-core.js.map +1 -1
- package/src/services/ecies/multi-recipient.d.ts +9 -1
- package/src/services/ecies/multi-recipient.d.ts.map +1 -1
- package/src/services/ecies/multi-recipient.js +153 -21
- package/src/services/ecies/multi-recipient.js.map +1 -1
- package/src/services/ecies/service.d.ts +56 -15
- package/src/services/ecies/service.d.ts.map +1 -1
- package/src/services/ecies/service.js +196 -39
- package/src/services/ecies/service.js.map +1 -1
- package/src/services/ecies/single-recipient.d.ts.map +1 -1
- package/src/services/ecies/single-recipient.js +4 -2
- package/src/services/ecies/single-recipient.js.map +1 -1
- package/src/services/encryption-stream.d.ts +1 -1
- package/src/services/encryption-stream.d.ts.map +1 -1
- package/src/services/encryption-stream.js +4 -8
- package/src/services/encryption-stream.js.map +1 -1
- package/src/services/multi-recipient-processor.d.ts +5 -2
- package/src/services/multi-recipient-processor.d.ts.map +1 -1
- package/src/services/multi-recipient-processor.js +29 -14
- package/src/services/multi-recipient-processor.js.map +1 -1
- package/src/test-mocks/mock-backend-member.d.ts +22 -3
- package/src/test-mocks/mock-backend-member.d.ts.map +1 -1
- package/src/test-mocks/mock-backend-member.js +71 -0
- package/src/test-mocks/mock-backend-member.js.map +1 -1
- package/src/lib/voting/types.d.ts +0 -67
- package/src/lib/voting/types.d.ts.map +0 -1
- package/src/lib/voting/types.js +0 -29
- package/src/lib/voting/types.js.map +0 -1
|
@@ -1,14 +1,50 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Secure Voting System - Node.js Optimized
|
|
3
|
+
*
|
|
4
|
+
* Node.js-compatible voting system built on ecies-lib with:
|
|
5
|
+
* - True Ranked Choice Voting (IRV)
|
|
6
|
+
* - Weighted voting
|
|
7
|
+
* - Borda count
|
|
8
|
+
* - Approval voting
|
|
9
|
+
* - Plurality voting
|
|
10
|
+
* - Proper role separation (Poll vs Tallier)
|
|
11
|
+
* - Homomorphic encryption for privacy
|
|
12
|
+
* - U.S. scale hierarchical aggregation
|
|
13
|
+
* - Disk persistence for Node.js environments
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import { PollFactory, VoteEncoder, PollTallier } from '@digitaldefiance/node-ecies-lib/voting';
|
|
18
|
+
*
|
|
19
|
+
* // Authority creates poll
|
|
20
|
+
* const poll = PollFactory.createRankedChoice(
|
|
21
|
+
* ['Alice', 'Bob', 'Charlie'],
|
|
22
|
+
* authority
|
|
23
|
+
* );
|
|
24
|
+
*
|
|
25
|
+
* // Voters cast votes
|
|
26
|
+
* const encoder = new VoteEncoder(authority.votingPublicKey);
|
|
27
|
+
* const vote = encoder.encodeRankedChoice([1, 0, 2], 3);
|
|
28
|
+
* const receipt = poll.vote(voter, vote);
|
|
29
|
+
*
|
|
30
|
+
* // Close and tally
|
|
31
|
+
* poll.close();
|
|
32
|
+
* const tallier = new PollTallier(authority, privateKey, publicKey);
|
|
33
|
+
* const results = tallier.tally(poll);
|
|
34
|
+
* ```
|
|
3
35
|
*/
|
|
4
36
|
export { Poll } from './poll-core';
|
|
5
|
-
export { VotingPoll, type ECKeyPairBuffer, type VotingPollResults, } from './poll';
|
|
6
|
-
export { VoteEncoder } from './encoder';
|
|
7
37
|
export { PollTallier } from './tallier';
|
|
38
|
+
export { VoteEncoder } from './encoder';
|
|
8
39
|
export { PollFactory } from './factory';
|
|
9
|
-
export { VotingSecurityValidator, VOTING_SECURITY
|
|
10
|
-
export { ImmutableAuditLog
|
|
11
|
-
export { PublicBulletinBoard
|
|
12
|
-
export { PollEventLogger
|
|
13
|
-
export {
|
|
40
|
+
export { VotingSecurityValidator, VOTING_SECURITY } from './security';
|
|
41
|
+
export { ImmutableAuditLog } from './audit';
|
|
42
|
+
export { PublicBulletinBoard } from './bulletin-board';
|
|
43
|
+
export { PollEventLogger } from './event-logger';
|
|
44
|
+
export { PrecinctAggregator, CountyAggregator, StateAggregator, NationalAggregator, } from './hierarchical-aggregator';
|
|
45
|
+
export { BatchVoteProcessor } from './persistent-state';
|
|
46
|
+
export * from './enumerations';
|
|
47
|
+
export type * from './interfaces';
|
|
48
|
+
export { NodeVoteLogger, NodeCheckpointManager } from './persistent-state';
|
|
49
|
+
export { VotingPoll, type ECKeyPairBuffer } from './poll';
|
|
14
50
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAGH,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxD,cAAc,gBAAgB,CAAC;AAG/B,mBAAmB,cAAc,CAAC;AAGlC,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAG3E,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC"}
|
package/src/lib/voting/index.js
CHANGED
|
@@ -1,31 +1,74 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
3
|
* Secure Voting System - Node.js Optimized
|
|
4
|
+
*
|
|
5
|
+
* Node.js-compatible voting system built on ecies-lib with:
|
|
6
|
+
* - True Ranked Choice Voting (IRV)
|
|
7
|
+
* - Weighted voting
|
|
8
|
+
* - Borda count
|
|
9
|
+
* - Approval voting
|
|
10
|
+
* - Plurality voting
|
|
11
|
+
* - Proper role separation (Poll vs Tallier)
|
|
12
|
+
* - Homomorphic encryption for privacy
|
|
13
|
+
* - U.S. scale hierarchical aggregation
|
|
14
|
+
* - Disk persistence for Node.js environments
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* import { PollFactory, VoteEncoder, PollTallier } from '@digitaldefiance/node-ecies-lib/voting';
|
|
19
|
+
*
|
|
20
|
+
* // Authority creates poll
|
|
21
|
+
* const poll = PollFactory.createRankedChoice(
|
|
22
|
+
* ['Alice', 'Bob', 'Charlie'],
|
|
23
|
+
* authority
|
|
24
|
+
* );
|
|
25
|
+
*
|
|
26
|
+
* // Voters cast votes
|
|
27
|
+
* const encoder = new VoteEncoder(authority.votingPublicKey);
|
|
28
|
+
* const vote = encoder.encodeRankedChoice([1, 0, 2], 3);
|
|
29
|
+
* const receipt = poll.vote(voter, vote);
|
|
30
|
+
*
|
|
31
|
+
* // Close and tally
|
|
32
|
+
* poll.close();
|
|
33
|
+
* const tallier = new PollTallier(authority, privateKey, publicKey);
|
|
34
|
+
* const results = tallier.tally(poll);
|
|
35
|
+
* ```
|
|
4
36
|
*/
|
|
5
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
38
|
+
exports.VotingPoll = exports.NodeCheckpointManager = exports.NodeVoteLogger = exports.BatchVoteProcessor = exports.NationalAggregator = exports.StateAggregator = exports.CountyAggregator = exports.PrecinctAggregator = exports.PollEventLogger = exports.PublicBulletinBoard = exports.ImmutableAuditLog = exports.VOTING_SECURITY = exports.VotingSecurityValidator = exports.PollFactory = exports.VoteEncoder = exports.PollTallier = exports.Poll = void 0;
|
|
39
|
+
const tslib_1 = require("tslib");
|
|
40
|
+
// Export implementation classes (matching ecies-lib structure)
|
|
7
41
|
var poll_core_1 = require("./poll-core");
|
|
8
42
|
Object.defineProperty(exports, "Poll", { enumerable: true, get: function () { return poll_core_1.Poll; } });
|
|
9
|
-
var poll_1 = require("./poll");
|
|
10
|
-
Object.defineProperty(exports, "VotingPoll", { enumerable: true, get: function () { return poll_1.VotingPoll; } });
|
|
11
|
-
var encoder_1 = require("./encoder");
|
|
12
|
-
Object.defineProperty(exports, "VoteEncoder", { enumerable: true, get: function () { return encoder_1.VoteEncoder; } });
|
|
13
43
|
var tallier_1 = require("./tallier");
|
|
14
44
|
Object.defineProperty(exports, "PollTallier", { enumerable: true, get: function () { return tallier_1.PollTallier; } });
|
|
45
|
+
var encoder_1 = require("./encoder");
|
|
46
|
+
Object.defineProperty(exports, "VoteEncoder", { enumerable: true, get: function () { return encoder_1.VoteEncoder; } });
|
|
15
47
|
var factory_1 = require("./factory");
|
|
16
48
|
Object.defineProperty(exports, "PollFactory", { enumerable: true, get: function () { return factory_1.PollFactory; } });
|
|
17
49
|
var security_1 = require("./security");
|
|
18
50
|
Object.defineProperty(exports, "VotingSecurityValidator", { enumerable: true, get: function () { return security_1.VotingSecurityValidator; } });
|
|
19
51
|
Object.defineProperty(exports, "VOTING_SECURITY", { enumerable: true, get: function () { return security_1.VOTING_SECURITY; } });
|
|
20
|
-
Object.defineProperty(exports, "SecurityLevel", { enumerable: true, get: function () { return security_1.SecurityLevel; } });
|
|
21
52
|
var audit_1 = require("./audit");
|
|
22
53
|
Object.defineProperty(exports, "ImmutableAuditLog", { enumerable: true, get: function () { return audit_1.ImmutableAuditLog; } });
|
|
23
|
-
Object.defineProperty(exports, "AuditEventType", { enumerable: true, get: function () { return audit_1.AuditEventType; } });
|
|
24
54
|
var bulletin_board_1 = require("./bulletin-board");
|
|
25
55
|
Object.defineProperty(exports, "PublicBulletinBoard", { enumerable: true, get: function () { return bulletin_board_1.PublicBulletinBoard; } });
|
|
26
56
|
var event_logger_1 = require("./event-logger");
|
|
27
57
|
Object.defineProperty(exports, "PollEventLogger", { enumerable: true, get: function () { return event_logger_1.PollEventLogger; } });
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
Object.defineProperty(exports, "
|
|
58
|
+
var hierarchical_aggregator_1 = require("./hierarchical-aggregator");
|
|
59
|
+
Object.defineProperty(exports, "PrecinctAggregator", { enumerable: true, get: function () { return hierarchical_aggregator_1.PrecinctAggregator; } });
|
|
60
|
+
Object.defineProperty(exports, "CountyAggregator", { enumerable: true, get: function () { return hierarchical_aggregator_1.CountyAggregator; } });
|
|
61
|
+
Object.defineProperty(exports, "StateAggregator", { enumerable: true, get: function () { return hierarchical_aggregator_1.StateAggregator; } });
|
|
62
|
+
Object.defineProperty(exports, "NationalAggregator", { enumerable: true, get: function () { return hierarchical_aggregator_1.NationalAggregator; } });
|
|
63
|
+
var persistent_state_1 = require("./persistent-state");
|
|
64
|
+
Object.defineProperty(exports, "BatchVoteProcessor", { enumerable: true, get: function () { return persistent_state_1.BatchVoteProcessor; } });
|
|
65
|
+
// Re-export enumerations (from ecies-lib via our enumerations/index.ts)
|
|
66
|
+
tslib_1.__exportStar(require("./enumerations"), exports);
|
|
67
|
+
// Export Node.js-specific implementations
|
|
68
|
+
var persistent_state_2 = require("./persistent-state");
|
|
69
|
+
Object.defineProperty(exports, "NodeVoteLogger", { enumerable: true, get: function () { return persistent_state_2.NodeVoteLogger; } });
|
|
70
|
+
Object.defineProperty(exports, "NodeCheckpointManager", { enumerable: true, get: function () { return persistent_state_2.NodeCheckpointManager; } });
|
|
71
|
+
// Export legacy Node.js-specific wrapper (for backward compatibility)
|
|
72
|
+
var poll_1 = require("./poll");
|
|
73
|
+
Object.defineProperty(exports, "VotingPoll", { enumerable: true, get: function () { return poll_1.VotingPoll; } });
|
|
31
74
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/index.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;;;;AAEH,+DAA+D;AAC/D,yCAAmC;AAA1B,iGAAA,IAAI,OAAA;AACb,qCAAwC;AAA/B,sGAAA,WAAW,OAAA;AACpB,qCAAwC;AAA/B,sGAAA,WAAW,OAAA;AACpB,qCAAwC;AAA/B,sGAAA,WAAW,OAAA;AACpB,uCAAsE;AAA7D,mHAAA,uBAAuB,OAAA;AAAE,2GAAA,eAAe,OAAA;AACjD,iCAA4C;AAAnC,0GAAA,iBAAiB,OAAA;AAC1B,mDAAuD;AAA9C,qHAAA,mBAAmB,OAAA;AAC5B,+CAAiD;AAAxC,+GAAA,eAAe,OAAA;AACxB,qEAKmC;AAJjC,6HAAA,kBAAkB,OAAA;AAClB,2HAAA,gBAAgB,OAAA;AAChB,0HAAA,eAAe,OAAA;AACf,6HAAA,kBAAkB,OAAA;AAEpB,uDAAwD;AAA/C,sHAAA,kBAAkB,OAAA;AAE3B,wEAAwE;AACxE,yDAA+B;AAK/B,0CAA0C;AAC1C,uDAA2E;AAAlE,kHAAA,cAAc,OAAA;AAAE,yHAAA,qBAAqB,OAAA;AAE9C,sEAAsE;AACtE,+BAA0D;AAAjD,kGAAA,UAAU,OAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AggregatedTally as BaseAggregatedTally } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Aggregated tally for hierarchical vote aggregation.
|
|
5
|
+
* Represents encrypted vote totals at a specific jurisdictional level.
|
|
6
|
+
*
|
|
7
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
8
|
+
*/
|
|
9
|
+
export type AggregatedTally<TID extends PlatformID = Buffer> = BaseAggregatedTally<TID>;
|
|
10
|
+
//# sourceMappingURL=aggregated-tally.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregated-tally.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/aggregated-tally.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,IAAI,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEzF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,eAAe,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM,IACzD,mBAAmB,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregated-tally.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/aggregated-tally.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AuditEntry as BaseAuditEntry } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Audit entry for immutable audit log.
|
|
5
|
+
* Contains event data with cryptographic chain integrity.
|
|
6
|
+
*
|
|
7
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
8
|
+
*/
|
|
9
|
+
export type AuditEntry<TID extends PlatformID = Buffer> = BaseAuditEntry<TID>;
|
|
10
|
+
//# sourceMappingURL=audit-entry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-entry.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/audit-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,UAAU,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-entry.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/audit-entry.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AuditLog as BaseAuditLog } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Audit log interface for immutable audit trail.
|
|
5
|
+
* Provides methods to query and verify audit entries.
|
|
6
|
+
*
|
|
7
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
8
|
+
*/
|
|
9
|
+
export type AuditLog<TID extends PlatformID = Buffer> = BaseAuditLog<TID>;
|
|
10
|
+
//# sourceMappingURL=audit-log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-log.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/audit-log.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-log.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/audit-log.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BulletinBoardEntry as BaseBulletinBoardEntry } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Bulletin board entry for published votes.
|
|
5
|
+
* Contains encrypted vote with cryptographic proof and Merkle tree integration.
|
|
6
|
+
*
|
|
7
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
8
|
+
*/
|
|
9
|
+
export type BulletinBoardEntry<TID extends PlatformID = Buffer> = BaseBulletinBoardEntry<TID>;
|
|
10
|
+
//# sourceMappingURL=bulletin-board-entry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulletin-board-entry.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/bulletin-board-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAE/F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM,IAC5D,sBAAsB,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulletin-board-entry.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/bulletin-board-entry.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BulletinBoard as BaseBulletinBoard } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Bulletin board interface for public vote publication.
|
|
5
|
+
* Provides transparent, verifiable record of all votes and tallies.
|
|
6
|
+
*
|
|
7
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
8
|
+
*/
|
|
9
|
+
export type BulletinBoard<TID extends PlatformID = Buffer> = BaseBulletinBoard<TID>;
|
|
10
|
+
//# sourceMappingURL=bulletin-board.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulletin-board.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/bulletin-board.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAErF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,aAAa,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM,IACvD,iBAAiB,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulletin-board.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/bulletin-board.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ICheckpointManagerExtended as BaseICheckpointManagerExtended } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Extended checkpoint manager interface - implemented in node-ecies-lib.
|
|
5
|
+
* Provides additional functionality for checkpoint management.
|
|
6
|
+
*
|
|
7
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
8
|
+
*/
|
|
9
|
+
export type ICheckpointManagerExtended<TID extends PlatformID = Buffer> = BaseICheckpointManagerExtended<TID>;
|
|
10
|
+
//# sourceMappingURL=checkpoint-manager-extended.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkpoint-manager-extended.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/checkpoint-manager-extended.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,IAAI,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AAE/G,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM,IACpE,8BAA8B,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkpoint-manager-extended.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/checkpoint-manager-extended.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ICheckpointManager as BaseICheckpointManager } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Checkpoint manager interface for persistent state management.
|
|
5
|
+
*
|
|
6
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
7
|
+
*/
|
|
8
|
+
export type ICheckpointManager<TID extends PlatformID = Buffer> = BaseICheckpointManager<TID>;
|
|
9
|
+
//# sourceMappingURL=checkpoint-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkpoint-manager.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/checkpoint-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAE/F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM,IAC5D,sBAAsB,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkpoint-manager.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/checkpoint-manager.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checkpoint metadata for persistent state snapshots.
|
|
3
|
+
* Contains information about a checkpoint without the actual vote data.
|
|
4
|
+
*
|
|
5
|
+
* This interface has no generic parameters, so we re-export from ecies-lib.
|
|
6
|
+
*/
|
|
7
|
+
export type { CheckpointMetadata } from '@digitaldefiance/ecies-lib';
|
|
8
|
+
//# sourceMappingURL=checkpoint-metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkpoint-metadata.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/checkpoint-metadata.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkpoint-metadata.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/checkpoint-metadata.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integrated ECIES service with voting support.
|
|
3
|
+
* Provides access to voting key derivation and serialization.
|
|
4
|
+
*
|
|
5
|
+
* This interface has no generic parameters, so we re-export from ecies-lib.
|
|
6
|
+
*/
|
|
7
|
+
export type { IECIESServiceWithVoting } from '@digitaldefiance/ecies-lib';
|
|
8
|
+
//# sourceMappingURL=ecies-service-with-voting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecies-service-with-voting.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/ecies-service-with-voting.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,YAAY,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecies-service-with-voting.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/ecies-service-with-voting.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { EncryptedVote as BaseEncryptedVote } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Encrypted vote data using Paillier homomorphic encryption.
|
|
5
|
+
* Structure varies by voting method.
|
|
6
|
+
*
|
|
7
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
8
|
+
*/
|
|
9
|
+
export type EncryptedVote<TID extends PlatformID = Buffer> = BaseEncryptedVote<TID>;
|
|
10
|
+
//# sourceMappingURL=encrypted-vote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encrypted-vote.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/encrypted-vote.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAErF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,aAAa,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM,IACvD,iBAAiB,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encrypted-vote.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/encrypted-vote.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { EventLogEntry as BaseEventLogEntry } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Event log entry for poll event tracking.
|
|
5
|
+
* Records poll lifecycle events with microsecond precision.
|
|
6
|
+
*
|
|
7
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
8
|
+
*/
|
|
9
|
+
export type EventLogEntry<TID extends PlatformID = Buffer> = BaseEventLogEntry<TID>;
|
|
10
|
+
//# sourceMappingURL=event-log-entry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-log-entry.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/event-log-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAErF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,aAAa,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM,IACvD,iBAAiB,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-log-entry.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/event-log-entry.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { EventLogger as BaseEventLogger } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Event logger interface for tracking poll lifecycle events.
|
|
5
|
+
* Provides methods to log and query events with sequence integrity.
|
|
6
|
+
*
|
|
7
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
8
|
+
*/
|
|
9
|
+
export type EventLogger<TID extends PlatformID = Buffer> = BaseEventLogger<TID>;
|
|
10
|
+
//# sourceMappingURL=event-logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-logger.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/event-logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAEjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,WAAW,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM,IAAI,eAAe,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-logger.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/event-logger.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Voting system interfaces for node-ecies-lib
|
|
3
|
+
*
|
|
4
|
+
* Buffer-adapted interfaces from ecies-lib for Node.js environment.
|
|
5
|
+
* All interfaces use PlatformID which includes Buffer support.
|
|
6
|
+
*/
|
|
7
|
+
export type { EncryptedVote } from './encrypted-vote';
|
|
8
|
+
export type { PlaintextVote } from './plaintext-vote';
|
|
9
|
+
export type { PollResults } from './poll-results';
|
|
10
|
+
export type { VoteReceipt } from './voting-receipt';
|
|
11
|
+
export type { RoundResult } from './round-result';
|
|
12
|
+
export type { AuditEntry } from './audit-entry';
|
|
13
|
+
export type { AuditLog } from './audit-log';
|
|
14
|
+
export type { EventLogEntry } from './event-log-entry';
|
|
15
|
+
export type { EventLogger } from './event-logger';
|
|
16
|
+
export type { PollConfiguration } from './poll-configuration';
|
|
17
|
+
export type { IPoll } from './poll';
|
|
18
|
+
export type { IPollTallier } from './poll-tallier';
|
|
19
|
+
export type { SupermajorityConfig } from './supermajority-config';
|
|
20
|
+
export type { AggregatedTally } from './aggregated-tally';
|
|
21
|
+
export type { JurisdictionConfig } from './jurisdiction-config';
|
|
22
|
+
export type { StateSnapshot } from './state-snapshot';
|
|
23
|
+
export type { CheckpointMetadata } from './checkpoint-metadata';
|
|
24
|
+
export type { ICheckpointManager } from './checkpoint-manager';
|
|
25
|
+
export type { ICheckpointManagerExtended } from './checkpoint-manager-extended';
|
|
26
|
+
export type { IVoteLogger } from './vote-logger';
|
|
27
|
+
export type { IVoteLoggerExtended } from './vote-logger-extended';
|
|
28
|
+
export type { BulletinBoard } from './bulletin-board';
|
|
29
|
+
export type { BulletinBoardEntry } from './bulletin-board-entry';
|
|
30
|
+
export type { TallyProof } from './tally-proof';
|
|
31
|
+
export type { IVoteEncoder } from './vote-encoder';
|
|
32
|
+
export type { IVotingSecurityValidator } from './voting-security-validator';
|
|
33
|
+
export type { IVotingConsts } from './voting-consts';
|
|
34
|
+
export type { IVotingKeyDerivationOptions } from './voting-key-derivation-options';
|
|
35
|
+
export type { VotingPollResults } from './voting-poll-results';
|
|
36
|
+
export type { IECIESServiceWithVoting } from './ecies-service-with-voting';
|
|
37
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,YAAY,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,YAAY,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,YAAY,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAGlE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAGhE,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,YAAY,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAChF,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,YAAY,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAGlE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,YAAY,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAG5E,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,YAAY,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAGnF,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG/D,YAAY,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Voting system interfaces for node-ecies-lib
|
|
4
|
+
*
|
|
5
|
+
* Buffer-adapted interfaces from ecies-lib for Node.js environment.
|
|
6
|
+
* All interfaces use PlatformID which includes Buffer support.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { JurisdictionConfig as BaseJurisdictionConfig } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Jurisdiction configuration for hierarchical aggregation.
|
|
5
|
+
* Defines a jurisdiction's identity and position in the hierarchy.
|
|
6
|
+
*
|
|
7
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
8
|
+
*/
|
|
9
|
+
export type JurisdictionConfig<TID extends PlatformID = Buffer> = BaseJurisdictionConfig<TID>;
|
|
10
|
+
//# sourceMappingURL=jurisdiction-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jurisdiction-config.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/jurisdiction-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,IAAI,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAE/F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM,IAC5D,sBAAsB,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jurisdiction-config.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/jurisdiction-config.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PlaintextVote as BasePlaintextVote } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Plaintext vote data for insecure voting methods.
|
|
5
|
+
* WARNING: Only use for Quadratic, Consensus, or ConsentBased methods.
|
|
6
|
+
*
|
|
7
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
8
|
+
*/
|
|
9
|
+
export type PlaintextVote<TID extends PlatformID = Buffer> = BasePlaintextVote<TID>;
|
|
10
|
+
//# sourceMappingURL=plaintext-vote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plaintext-vote.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/plaintext-vote.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAErF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,aAAa,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM,IACvD,iBAAiB,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plaintext-vote.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/plaintext-vote.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Poll configuration interface.
|
|
3
|
+
* Defines voting method, choices, and optional parameters.
|
|
4
|
+
*
|
|
5
|
+
* This interface has no generic parameters, so we re-export from ecies-lib.
|
|
6
|
+
*/
|
|
7
|
+
export type { PollConfiguration } from '@digitaldefiance/ecies-lib';
|
|
8
|
+
//# sourceMappingURL=poll-configuration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poll-configuration.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/poll-configuration.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poll-configuration.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/poll-configuration.ts"],"names":[],"mappings":""}
|