@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
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Results of a completed poll after tallying.
|
|
3
|
+
* Includes winner(s), tallies, and round-by-round data for multi-round methods.
|
|
4
|
+
*
|
|
5
|
+
* This interface has no generic parameters, so we re-export from ecies-lib.
|
|
6
|
+
*/
|
|
7
|
+
export type { PollResults } from '@digitaldefiance/ecies-lib';
|
|
8
|
+
//# sourceMappingURL=poll-results.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poll-results.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/poll-results.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,YAAY,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poll-results.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/poll-results.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IPollTallier as BaseIPollTallier } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Poll tallier interface for decrypting and tallying votes.
|
|
5
|
+
* Holds private key and can decrypt results after poll closes.
|
|
6
|
+
*
|
|
7
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
8
|
+
*/
|
|
9
|
+
export type IPollTallier<TID extends PlatformID = Buffer> = BaseIPollTallier<TID>;
|
|
10
|
+
//# sourceMappingURL=poll-tallier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poll-tallier.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/poll-tallier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,YAAY,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM,IACtD,gBAAgB,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poll-tallier.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/poll-tallier.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IPoll as BaseIPoll } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Poll interface for vote aggregation and management.
|
|
5
|
+
* Holds encrypted votes and issues receipts, but cannot decrypt votes.
|
|
6
|
+
*
|
|
7
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
8
|
+
*/
|
|
9
|
+
export type IPoll<TID extends PlatformID = Buffer> = BaseIPoll<TID>;
|
|
10
|
+
//# sourceMappingURL=poll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poll.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/poll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAErE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,KAAK,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poll.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/poll.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Results from a single round of multi-round voting.
|
|
3
|
+
* Used in RCV, Two-Round, STAR, and STV methods.
|
|
4
|
+
*
|
|
5
|
+
* This interface has no generic parameters, so we re-export from ecies-lib.
|
|
6
|
+
*/
|
|
7
|
+
export type { RoundResult } from '@digitaldefiance/ecies-lib';
|
|
8
|
+
//# sourceMappingURL=round-result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"round-result.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/round-result.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,YAAY,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"round-result.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/round-result.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PlatformID } from '../../../interfaces';
|
|
2
|
+
import type { AggregatedTally } from './aggregated-tally';
|
|
3
|
+
import type { CheckpointMetadata } from './checkpoint-metadata';
|
|
4
|
+
/**
|
|
5
|
+
* State snapshot for persistent vote storage.
|
|
6
|
+
* Contains checkpoint metadata, aggregated tally, and vote log.
|
|
7
|
+
*
|
|
8
|
+
* Node.js specialization with Buffer for voteLog instead of Uint8Array.
|
|
9
|
+
*/
|
|
10
|
+
export interface StateSnapshot<TID extends PlatformID = Buffer> {
|
|
11
|
+
metadata: CheckpointMetadata;
|
|
12
|
+
tally: AggregatedTally<TID>;
|
|
13
|
+
voteLog: Buffer;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=state-snapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state-snapshot.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/state-snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,WAAW,aAAa,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM;IAC5D,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,KAAK,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state-snapshot.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/state-snapshot.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for supermajority voting.
|
|
3
|
+
* Defines the required threshold as a fraction (e.g., 2/3, 3/4).
|
|
4
|
+
*
|
|
5
|
+
* This interface has no generic parameters, so we re-export from ecies-lib.
|
|
6
|
+
*/
|
|
7
|
+
export type { SupermajorityConfig } from '@digitaldefiance/ecies-lib';
|
|
8
|
+
//# sourceMappingURL=supermajority-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supermajority-config.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/supermajority-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,YAAY,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supermajority-config.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/supermajority-config.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TallyProof as BaseTallyProof } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Tally proof for cryptographically verifiable results.
|
|
5
|
+
* Contains final tallies with proof of correct decryption.
|
|
6
|
+
*
|
|
7
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
8
|
+
*/
|
|
9
|
+
export type TallyProof<TID extends PlatformID = Buffer> = BaseTallyProof<TID>;
|
|
10
|
+
//# sourceMappingURL=tally-proof.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tally-proof.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/tally-proof.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":"tally-proof.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/tally-proof.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IVoteEncoder as BaseIVoteEncoder } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Vote encoder interface for encrypting votes.
|
|
5
|
+
* Converts vote choices into encrypted Paillier ciphertexts.
|
|
6
|
+
*
|
|
7
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
8
|
+
*/
|
|
9
|
+
export type IVoteEncoder<TID extends PlatformID = Buffer> = BaseIVoteEncoder<TID>;
|
|
10
|
+
//# sourceMappingURL=vote-encoder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vote-encoder.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/vote-encoder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,YAAY,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM,IACtD,gBAAgB,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vote-encoder.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/vote-encoder.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IVoteLoggerExtended as BaseIVoteLoggerExtended } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Extended vote logger interface - implemented in node-ecies-lib.
|
|
5
|
+
* Provides additional functionality for vote logging.
|
|
6
|
+
*
|
|
7
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
8
|
+
*/
|
|
9
|
+
export type IVoteLoggerExtended<TID extends PlatformID = Buffer> = BaseIVoteLoggerExtended<TID>;
|
|
10
|
+
//# sourceMappingURL=vote-logger-extended.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vote-logger-extended.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/vote-logger-extended.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAEjG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM,IAC7D,uBAAuB,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vote-logger-extended.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/vote-logger-extended.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IVoteLogger as BaseIVoteLogger } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Vote logger interface for persistent vote storage.
|
|
5
|
+
*
|
|
6
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
7
|
+
*/
|
|
8
|
+
export type IVoteLogger<TID extends PlatformID = Buffer> = BaseIVoteLogger<TID>;
|
|
9
|
+
//# sourceMappingURL=vote-logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vote-logger.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/vote-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;;;;GAIG;AACH,MAAM,MAAM,WAAW,CAAC,GAAG,SAAS,UAAU,GAAG,MAAM,IAAI,eAAe,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vote-logger.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/vote-logger.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constants for voting operations using Paillier homomorphic encryption.
|
|
3
|
+
* These values are critical for cryptographic operations and should be consistent
|
|
4
|
+
* across all implementations (ecies-lib, node-ecies-lib, BrightChain).
|
|
5
|
+
*
|
|
6
|
+
* This interface has no generic parameters, so we re-export from ecies-lib.
|
|
7
|
+
*/
|
|
8
|
+
export type { IVotingConsts } from '@digitaldefiance/ecies-lib';
|
|
9
|
+
//# sourceMappingURL=voting-consts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voting-consts.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/voting-consts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,YAAY,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voting-consts.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/voting-consts.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for deriving Paillier voting keys from ECDH keys.
|
|
3
|
+
*
|
|
4
|
+
* This interface has no generic parameters, so we re-export from ecies-lib.
|
|
5
|
+
*/
|
|
6
|
+
export type { IVotingKeyDerivationOptions } from '@digitaldefiance/ecies-lib';
|
|
7
|
+
//# sourceMappingURL=voting-key-derivation-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voting-key-derivation-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/voting-key-derivation-options.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,YAAY,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voting-key-derivation-options.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/voting-key-derivation-options.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voting-poll-results.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/voting-poll-results.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voting-poll-results.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/voting-poll-results.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { VoteReceipt as BaseVoteReceipt } from '@digitaldefiance/ecies-lib';
|
|
2
|
+
import type { PlatformID } from '../../../interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Cryptographically signed receipt proving a vote was cast.
|
|
5
|
+
* Can be used to verify participation without revealing vote content.
|
|
6
|
+
*
|
|
7
|
+
* Node.js specialization with Buffer as the default platform ID type.
|
|
8
|
+
*/
|
|
9
|
+
export type VoteReceipt<TID extends PlatformID = Buffer> = BaseVoteReceipt<TID>;
|
|
10
|
+
//# sourceMappingURL=voting-receipt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voting-receipt.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/voting-receipt.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":"voting-receipt.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/voting-receipt.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Voting security validator interface.
|
|
3
|
+
* Validates voting methods against security requirements.
|
|
4
|
+
*
|
|
5
|
+
* This interface has no generic parameters, so we re-export from ecies-lib.
|
|
6
|
+
*/
|
|
7
|
+
export type { IVotingSecurityValidator } from '@digitaldefiance/ecies-lib';
|
|
8
|
+
//# sourceMappingURL=voting-security-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voting-security-validator.d.ts","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/voting-security-validator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,YAAY,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voting-security-validator.js","sourceRoot":"","sources":["../../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/interfaces/voting-security-validator.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { PlatformID } from '../../interfaces';
|
|
2
|
+
import type { IVoteLogger, ICheckpointManager, StateSnapshot, CheckpointMetadata, AggregatedTally, JurisdictionConfig } from './interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Streaming vote logger with append-only disk writes
|
|
5
|
+
* Uses Buffer for Node.js-optimized I/O
|
|
6
|
+
*/
|
|
7
|
+
export declare class NodeVoteLogger<TID extends PlatformID = Buffer> implements IVoteLogger<TID> {
|
|
8
|
+
private readonly logPath;
|
|
9
|
+
private voteCount;
|
|
10
|
+
private writeStream;
|
|
11
|
+
constructor(jurisdictionId: TID, logDir: string);
|
|
12
|
+
appendVote(voterId: TID, encryptedVote: bigint[], timestamp: number): Promise<void>;
|
|
13
|
+
getVoteCount(): number;
|
|
14
|
+
replayVotes(): AsyncGenerator<{
|
|
15
|
+
voterId: TID;
|
|
16
|
+
encryptedVote: bigint[];
|
|
17
|
+
timestamp: number;
|
|
18
|
+
}>;
|
|
19
|
+
close(): Promise<void>;
|
|
20
|
+
private serializeVote;
|
|
21
|
+
private deserializeVote;
|
|
22
|
+
private toHex;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Checkpoint manager with disk-based snapshots
|
|
26
|
+
* Uses Buffer for Node.js-optimized I/O
|
|
27
|
+
*/
|
|
28
|
+
export declare class NodeCheckpointManager<TID extends PlatformID = Buffer> implements ICheckpointManager<TID> {
|
|
29
|
+
private readonly config;
|
|
30
|
+
private readonly checkpointDir;
|
|
31
|
+
private checkpointNumber;
|
|
32
|
+
constructor(config: JurisdictionConfig<TID>, checkpointDir: string);
|
|
33
|
+
saveCheckpoint(tally: AggregatedTally<TID>): Promise<void>;
|
|
34
|
+
loadLatestCheckpoint(): Promise<StateSnapshot<TID> | null>;
|
|
35
|
+
listCheckpoints(): Promise<CheckpointMetadata[]>;
|
|
36
|
+
private toKey;
|
|
37
|
+
private bigIntReplacer;
|
|
38
|
+
private bigIntReviver;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=node-persistent-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-persistent-state.d.ts","sourceRoot":"","sources":["../../../../../../packages/digitaldefiance-node-ecies-lib/src/lib/voting/node-persistent-state.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EACnB,MAAM,cAAc,CAAC;AAEtB;;;GAGG;AACH,qBAAa,cAAc,CACzB,GAAG,SAAS,UAAU,GAAG,MAAM,CAC/B,YAAW,WAAW,CAAC,GAAG,CAAC;IAC3B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,WAAW,CAAuC;gBAE9C,cAAc,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM;IAQzC,UAAU,CACd,OAAO,EAAE,GAAG,EACZ,aAAa,EAAE,MAAM,EAAE,EACvB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC;IAoBhB,YAAY,IAAI,MAAM;IAIf,WAAW,IAAI,cAAc,CAAC;QACnC,OAAO,EAAE,GAAG,CAAC;QACb,aAAa,EAAE,MAAM,EAAE,CAAC;QACxB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IAsCI,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,OAAO,CAAC,aAAa;IAkCrB,OAAO,CAAC,eAAe;IA4BvB,OAAO,CAAC,KAAK;CAGd;AAED;;;GAGG;AACH,qBAAa,qBAAqB,CAChC,GAAG,SAAS,UAAU,GAAG,MAAM,CAC/B,YAAW,kBAAkB,CAAC,GAAG,CAAC;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0B;IACjD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,gBAAgB,CAAK;gBAEjB,MAAM,EAAE,kBAAkB,CAAC,GAAG,CAAC,EAAE,aAAa,EAAE,MAAM;IAK5D,cAAc,CAAC,KAAK,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAwB1D,oBAAoB,IAAI,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAkB1D,eAAe,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAwBtD,OAAO,CAAC,KAAK;IAUb,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,aAAa;CAgBtB"}
|