@digitaldefiance/ecies-lib 4.17.2 → 4.17.4

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.
Files changed (169) hide show
  1. package/package.json +2 -2
  2. package/src/i18n-setup.d.ts +7 -1
  3. package/src/i18n-setup.d.ts.map +1 -1
  4. package/src/i18n-setup.js +12 -0
  5. package/src/i18n-setup.js.map +1 -1
  6. package/src/index.d.ts +1 -1
  7. package/src/index.d.ts.map +1 -1
  8. package/src/index.js +2 -1
  9. package/src/index.js.map +1 -1
  10. package/src/lib/voting/index.d.ts +1 -0
  11. package/src/lib/voting/index.d.ts.map +1 -1
  12. package/src/lib/voting/index.js +2 -0
  13. package/src/lib/voting/index.js.map +1 -1
  14. package/src/lib/voting/threshold/decryption-combiner.d.ts +141 -0
  15. package/src/lib/voting/threshold/decryption-combiner.d.ts.map +1 -0
  16. package/src/lib/voting/threshold/decryption-combiner.js +343 -0
  17. package/src/lib/voting/threshold/decryption-combiner.js.map +1 -0
  18. package/src/lib/voting/threshold/enumerations/ceremony-status.d.ts +19 -0
  19. package/src/lib/voting/threshold/enumerations/ceremony-status.d.ts.map +1 -0
  20. package/src/lib/voting/threshold/enumerations/ceremony-status.js +23 -0
  21. package/src/lib/voting/threshold/enumerations/ceremony-status.js.map +1 -0
  22. package/src/lib/voting/threshold/enumerations/guardian-status.d.ts +18 -0
  23. package/src/lib/voting/threshold/enumerations/guardian-status.d.ts.map +1 -0
  24. package/src/lib/voting/threshold/enumerations/guardian-status.js +22 -0
  25. package/src/lib/voting/threshold/enumerations/guardian-status.js.map +1 -0
  26. package/src/lib/voting/threshold/enumerations/index.d.ts +8 -0
  27. package/src/lib/voting/threshold/enumerations/index.d.ts.map +1 -0
  28. package/src/lib/voting/threshold/enumerations/index.js +11 -0
  29. package/src/lib/voting/threshold/enumerations/index.js.map +1 -0
  30. package/src/lib/voting/threshold/enumerations/interval-trigger-type.d.ts +15 -0
  31. package/src/lib/voting/threshold/enumerations/interval-trigger-type.d.ts.map +1 -0
  32. package/src/lib/voting/threshold/enumerations/interval-trigger-type.js +19 -0
  33. package/src/lib/voting/threshold/enumerations/interval-trigger-type.js.map +1 -0
  34. package/src/lib/voting/threshold/enumerations/threshold-audit-event-type.d.ts +29 -0
  35. package/src/lib/voting/threshold/enumerations/threshold-audit-event-type.d.ts.map +1 -0
  36. package/src/lib/voting/threshold/enumerations/threshold-audit-event-type.js +33 -0
  37. package/src/lib/voting/threshold/enumerations/threshold-audit-event-type.js.map +1 -0
  38. package/src/lib/voting/threshold/guardian-registry.d.ts +120 -0
  39. package/src/lib/voting/threshold/guardian-registry.d.ts.map +1 -0
  40. package/src/lib/voting/threshold/guardian-registry.js +227 -0
  41. package/src/lib/voting/threshold/guardian-registry.js.map +1 -0
  42. package/src/lib/voting/threshold/index.d.ts +49 -0
  43. package/src/lib/voting/threshold/index.d.ts.map +1 -0
  44. package/src/lib/voting/threshold/index.js +69 -0
  45. package/src/lib/voting/threshold/index.js.map +1 -0
  46. package/src/lib/voting/threshold/interfaces/ceremony-coordinator.d.ts +19 -0
  47. package/src/lib/voting/threshold/interfaces/ceremony-coordinator.d.ts.map +1 -0
  48. package/src/lib/voting/threshold/interfaces/ceremony-coordinator.js +3 -0
  49. package/src/lib/voting/threshold/interfaces/ceremony-coordinator.js.map +1 -0
  50. package/src/lib/voting/threshold/interfaces/ceremony.d.ts +33 -0
  51. package/src/lib/voting/threshold/interfaces/ceremony.d.ts.map +1 -0
  52. package/src/lib/voting/threshold/interfaces/ceremony.js +3 -0
  53. package/src/lib/voting/threshold/interfaces/ceremony.js.map +1 -0
  54. package/src/lib/voting/threshold/interfaces/combined-decryption.d.ts +20 -0
  55. package/src/lib/voting/threshold/interfaces/combined-decryption.d.ts.map +1 -0
  56. package/src/lib/voting/threshold/interfaces/combined-decryption.js +3 -0
  57. package/src/lib/voting/threshold/interfaces/combined-decryption.js.map +1 -0
  58. package/src/lib/voting/threshold/interfaces/combined-zk-proof.d.ts +16 -0
  59. package/src/lib/voting/threshold/interfaces/combined-zk-proof.d.ts.map +1 -0
  60. package/src/lib/voting/threshold/interfaces/combined-zk-proof.js +3 -0
  61. package/src/lib/voting/threshold/interfaces/combined-zk-proof.js.map +1 -0
  62. package/src/lib/voting/threshold/interfaces/decryption-combiner.d.ts +14 -0
  63. package/src/lib/voting/threshold/interfaces/decryption-combiner.d.ts.map +1 -0
  64. package/src/lib/voting/threshold/interfaces/decryption-combiner.js +3 -0
  65. package/src/lib/voting/threshold/interfaces/decryption-combiner.js.map +1 -0
  66. package/src/lib/voting/threshold/interfaces/guardian-registry.d.ts +28 -0
  67. package/src/lib/voting/threshold/interfaces/guardian-registry.d.ts.map +1 -0
  68. package/src/lib/voting/threshold/interfaces/guardian-registry.js +3 -0
  69. package/src/lib/voting/threshold/interfaces/guardian-registry.js.map +1 -0
  70. package/src/lib/voting/threshold/interfaces/guardian-status-change-event.d.ts +16 -0
  71. package/src/lib/voting/threshold/interfaces/guardian-status-change-event.d.ts.map +1 -0
  72. package/src/lib/voting/threshold/interfaces/guardian-status-change-event.js +3 -0
  73. package/src/lib/voting/threshold/interfaces/guardian-status-change-event.js.map +1 -0
  74. package/src/lib/voting/threshold/interfaces/guardian.d.ts +25 -0
  75. package/src/lib/voting/threshold/interfaces/guardian.d.ts.map +1 -0
  76. package/src/lib/voting/threshold/interfaces/guardian.js +3 -0
  77. package/src/lib/voting/threshold/interfaces/guardian.js.map +1 -0
  78. package/src/lib/voting/threshold/interfaces/index.d.ts +32 -0
  79. package/src/lib/voting/threshold/interfaces/index.d.ts.map +1 -0
  80. package/src/lib/voting/threshold/interfaces/index.js +6 -0
  81. package/src/lib/voting/threshold/interfaces/index.js.map +1 -0
  82. package/src/lib/voting/threshold/interfaces/interval-config.d.ts +17 -0
  83. package/src/lib/voting/threshold/interfaces/interval-config.d.ts.map +1 -0
  84. package/src/lib/voting/threshold/interfaces/interval-config.js +3 -0
  85. package/src/lib/voting/threshold/interfaces/interval-config.js.map +1 -0
  86. package/src/lib/voting/threshold/interfaces/interval-scheduler.d.ts +23 -0
  87. package/src/lib/voting/threshold/interfaces/interval-scheduler.d.ts.map +1 -0
  88. package/src/lib/voting/threshold/interfaces/interval-scheduler.js +3 -0
  89. package/src/lib/voting/threshold/interfaces/interval-scheduler.js.map +1 -0
  90. package/src/lib/voting/threshold/interfaces/interval-tally.d.ts +30 -0
  91. package/src/lib/voting/threshold/interfaces/interval-tally.d.ts.map +1 -0
  92. package/src/lib/voting/threshold/interfaces/interval-tally.js +3 -0
  93. package/src/lib/voting/threshold/interfaces/interval-tally.js.map +1 -0
  94. package/src/lib/voting/threshold/interfaces/interval-trigger-event.d.ts +20 -0
  95. package/src/lib/voting/threshold/interfaces/interval-trigger-event.d.ts.map +1 -0
  96. package/src/lib/voting/threshold/interfaces/interval-trigger-event.js +3 -0
  97. package/src/lib/voting/threshold/interfaces/interval-trigger-event.js.map +1 -0
  98. package/src/lib/voting/threshold/interfaces/key-share.d.ts +15 -0
  99. package/src/lib/voting/threshold/interfaces/key-share.d.ts.map +1 -0
  100. package/src/lib/voting/threshold/interfaces/key-share.js +3 -0
  101. package/src/lib/voting/threshold/interfaces/key-share.js.map +1 -0
  102. package/src/lib/voting/threshold/interfaces/partial-decryption-service.d.ts +17 -0
  103. package/src/lib/voting/threshold/interfaces/partial-decryption-service.d.ts.map +1 -0
  104. package/src/lib/voting/threshold/interfaces/partial-decryption-service.js +3 -0
  105. package/src/lib/voting/threshold/interfaces/partial-decryption-service.js.map +1 -0
  106. package/src/lib/voting/threshold/interfaces/partial-decryption.d.ts +20 -0
  107. package/src/lib/voting/threshold/interfaces/partial-decryption.d.ts.map +1 -0
  108. package/src/lib/voting/threshold/interfaces/partial-decryption.js +3 -0
  109. package/src/lib/voting/threshold/interfaces/partial-decryption.js.map +1 -0
  110. package/src/lib/voting/threshold/interfaces/public-tally-feed.d.ts +19 -0
  111. package/src/lib/voting/threshold/interfaces/public-tally-feed.d.ts.map +1 -0
  112. package/src/lib/voting/threshold/interfaces/public-tally-feed.js +3 -0
  113. package/src/lib/voting/threshold/interfaces/public-tally-feed.js.map +1 -0
  114. package/src/lib/voting/threshold/interfaces/tally-subscription.d.ts +16 -0
  115. package/src/lib/voting/threshold/interfaces/tally-subscription.d.ts.map +1 -0
  116. package/src/lib/voting/threshold/interfaces/tally-subscription.js +3 -0
  117. package/src/lib/voting/threshold/interfaces/tally-subscription.js.map +1 -0
  118. package/src/lib/voting/threshold/interfaces/tally-verifier.d.ts +12 -0
  119. package/src/lib/voting/threshold/interfaces/tally-verifier.d.ts.map +1 -0
  120. package/src/lib/voting/threshold/interfaces/tally-verifier.js +3 -0
  121. package/src/lib/voting/threshold/interfaces/tally-verifier.js.map +1 -0
  122. package/src/lib/voting/threshold/interfaces/threshold-aggregator.d.ts +15 -0
  123. package/src/lib/voting/threshold/interfaces/threshold-aggregator.d.ts.map +1 -0
  124. package/src/lib/voting/threshold/interfaces/threshold-aggregator.js +3 -0
  125. package/src/lib/voting/threshold/interfaces/threshold-aggregator.js.map +1 -0
  126. package/src/lib/voting/threshold/interfaces/threshold-audit-entry.d.ts +28 -0
  127. package/src/lib/voting/threshold/interfaces/threshold-audit-entry.d.ts.map +1 -0
  128. package/src/lib/voting/threshold/interfaces/threshold-audit-entry.js +3 -0
  129. package/src/lib/voting/threshold/interfaces/threshold-audit-entry.js.map +1 -0
  130. package/src/lib/voting/threshold/interfaces/threshold-key-config.d.ts +12 -0
  131. package/src/lib/voting/threshold/interfaces/threshold-key-config.d.ts.map +1 -0
  132. package/src/lib/voting/threshold/interfaces/threshold-key-config.js +3 -0
  133. package/src/lib/voting/threshold/interfaces/threshold-key-config.js.map +1 -0
  134. package/src/lib/voting/threshold/interfaces/threshold-key-generator.d.ts +12 -0
  135. package/src/lib/voting/threshold/interfaces/threshold-key-generator.d.ts.map +1 -0
  136. package/src/lib/voting/threshold/interfaces/threshold-key-generator.js +3 -0
  137. package/src/lib/voting/threshold/interfaces/threshold-key-generator.js.map +1 -0
  138. package/src/lib/voting/threshold/interfaces/threshold-key-pair.d.ts +30 -0
  139. package/src/lib/voting/threshold/interfaces/threshold-key-pair.d.ts.map +1 -0
  140. package/src/lib/voting/threshold/interfaces/threshold-key-pair.js +3 -0
  141. package/src/lib/voting/threshold/interfaces/threshold-key-pair.js.map +1 -0
  142. package/src/lib/voting/threshold/interfaces/threshold-poll-config.d.ts +19 -0
  143. package/src/lib/voting/threshold/interfaces/threshold-poll-config.d.ts.map +1 -0
  144. package/src/lib/voting/threshold/interfaces/threshold-poll-config.js +3 -0
  145. package/src/lib/voting/threshold/interfaces/threshold-poll-config.js.map +1 -0
  146. package/src/lib/voting/threshold/interfaces/threshold-poll-factory.d.ts +16 -0
  147. package/src/lib/voting/threshold/interfaces/threshold-poll-factory.d.ts.map +1 -0
  148. package/src/lib/voting/threshold/interfaces/threshold-poll-factory.js +3 -0
  149. package/src/lib/voting/threshold/interfaces/threshold-poll-factory.js.map +1 -0
  150. package/src/lib/voting/threshold/interfaces/threshold-poll.d.ts +25 -0
  151. package/src/lib/voting/threshold/interfaces/threshold-poll.d.ts.map +1 -0
  152. package/src/lib/voting/threshold/interfaces/threshold-poll.js +3 -0
  153. package/src/lib/voting/threshold/interfaces/threshold-poll.js.map +1 -0
  154. package/src/lib/voting/threshold/interfaces/verification-result.d.ts +17 -0
  155. package/src/lib/voting/threshold/interfaces/verification-result.d.ts.map +1 -0
  156. package/src/lib/voting/threshold/interfaces/verification-result.js +3 -0
  157. package/src/lib/voting/threshold/interfaces/verification-result.js.map +1 -0
  158. package/src/lib/voting/threshold/interfaces/zk-proof.d.ts +15 -0
  159. package/src/lib/voting/threshold/interfaces/zk-proof.d.ts.map +1 -0
  160. package/src/lib/voting/threshold/interfaces/zk-proof.js +3 -0
  161. package/src/lib/voting/threshold/interfaces/zk-proof.js.map +1 -0
  162. package/src/lib/voting/threshold/partial-decryption-service.d.ts +130 -0
  163. package/src/lib/voting/threshold/partial-decryption-service.d.ts.map +1 -0
  164. package/src/lib/voting/threshold/partial-decryption-service.js +288 -0
  165. package/src/lib/voting/threshold/partial-decryption-service.js.map +1 -0
  166. package/src/lib/voting/threshold/threshold-key-generator.d.ts +114 -0
  167. package/src/lib/voting/threshold/threshold-key-generator.d.ts.map +1 -0
  168. package/src/lib/voting/threshold/threshold-key-generator.js +275 -0
  169. package/src/lib/voting/threshold/threshold-key-generator.js.map +1 -0
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=interval-trigger-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interval-trigger-event.js","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/interval-trigger-event.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * A single key share held by a Guardian.
3
+ *
4
+ * Key shares are generated using Shamir's Secret Sharing and distributed
5
+ * to Guardians. Any k shares can reconstruct decryption capability.
6
+ */
7
+ export interface KeyShare {
8
+ /** Share index (1 to n) */
9
+ readonly index: number;
10
+ /** The secret share value */
11
+ readonly share: bigint;
12
+ /** Verification key for this share (used for ZK proof verification) */
13
+ readonly verificationKey: Uint8Array;
14
+ }
15
+ //# sourceMappingURL=key-share.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"key-share.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/key-share.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,2BAA2B;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,6BAA6B;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,QAAQ,CAAC,eAAe,EAAE,UAAU,CAAC;CACtC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=key-share.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"key-share.js","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/key-share.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ import type { PublicKey } from 'paillier-bigint';
2
+ import type { KeyShare } from './key-share';
3
+ import type { PartialDecryption } from './partial-decryption';
4
+ /**
5
+ * Interface for computing and verifying partial decryptions.
6
+ */
7
+ export interface IPartialDecryptionService {
8
+ /** Compute partial decryption for an encrypted tally */
9
+ computePartial(encryptedTally: bigint[], keyShare: KeyShare, ceremonyNonce: Uint8Array): PartialDecryption;
10
+ /** Verify a partial decryption's ZK proof */
11
+ verifyPartial(partial: PartialDecryption, encryptedTally: bigint[], verificationKey: Uint8Array, publicKey: PublicKey): boolean;
12
+ /** Serialize partial decryption for transmission */
13
+ serialize(partial: PartialDecryption): Uint8Array;
14
+ /** Deserialize partial decryption */
15
+ deserialize(data: Uint8Array): PartialDecryption;
16
+ }
17
+ //# sourceMappingURL=partial-decryption-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"partial-decryption-service.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/partial-decryption-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,wDAAwD;IACxD,cAAc,CACZ,cAAc,EAAE,MAAM,EAAE,EACxB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,UAAU,GACxB,iBAAiB,CAAC;IAErB,6CAA6C;IAC7C,aAAa,CACX,OAAO,EAAE,iBAAiB,EAC1B,cAAc,EAAE,MAAM,EAAE,EACxB,eAAe,EAAE,UAAU,EAC3B,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC;IAEX,oDAAoD;IACpD,SAAS,CAAC,OAAO,EAAE,iBAAiB,GAAG,UAAU,CAAC;IAElD,qCAAqC;IACrC,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,iBAAiB,CAAC;CAClD"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=partial-decryption-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"partial-decryption-service.js","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/partial-decryption-service.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ import type { ZKProof } from './zk-proof';
2
+ /**
3
+ * A partial decryption computed by a Guardian.
4
+ *
5
+ * Multiple partial decryptions (at least k) are combined using
6
+ * Lagrange interpolation to produce the final plaintext.
7
+ */
8
+ export interface PartialDecryption {
9
+ /** Guardian's share index */
10
+ readonly guardianIndex: number;
11
+ /** The partial decryption value */
12
+ readonly value: bigint;
13
+ /** Zero-knowledge proof of correct computation */
14
+ readonly proof: ZKProof;
15
+ /** Ceremony-specific nonce (replay protection) */
16
+ readonly ceremonyNonce: Uint8Array;
17
+ /** Timestamp of computation */
18
+ readonly timestamp: number;
19
+ }
20
+ //# sourceMappingURL=partial-decryption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"partial-decryption.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/partial-decryption.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,6BAA6B;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,mCAAmC;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,kDAAkD;IAClD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,QAAQ,CAAC,aAAa,EAAE,UAAU,CAAC;IACnC,+BAA+B;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=partial-decryption.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"partial-decryption.js","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/partial-decryption.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ import type { PlatformID } from '../../../../interfaces/platform-id';
2
+ import type { IntervalTally } from './interval-tally';
3
+ import type { TallySubscription } from './tally-subscription';
4
+ /**
5
+ * Interface for the public tally feed.
6
+ */
7
+ export interface IPublicTallyFeed<TID extends PlatformID = Uint8Array> {
8
+ /** Publish a new interval tally */
9
+ publish(tally: IntervalTally<TID>): void;
10
+ /** Subscribe to tally updates for a poll */
11
+ subscribe(pollId: TID, onTally: (tally: IntervalTally<TID>) => void): TallySubscription<TID>;
12
+ /** Get current tally for a poll */
13
+ getCurrentTally(pollId: TID): IntervalTally<TID> | undefined;
14
+ /** Get all historical tallies for a poll */
15
+ getHistory(pollId: TID): readonly IntervalTally<TID>[];
16
+ /** Get tally for specific interval */
17
+ getTallyAtInterval(pollId: TID, intervalNumber: number): IntervalTally<TID> | undefined;
18
+ }
19
+ //# sourceMappingURL=public-tally-feed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-tally-feed.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/public-tally-feed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,GAAG,SAAS,UAAU,GAAG,UAAU;IACnE,mCAAmC;IACnC,OAAO,CAAC,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAEzC,4CAA4C;IAC5C,SAAS,CACP,MAAM,EAAE,GAAG,EACX,OAAO,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC,KAAK,IAAI,GAC3C,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAE1B,mCAAmC;IACnC,eAAe,CAAC,MAAM,EAAE,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IAE7D,4CAA4C;IAC5C,UAAU,CAAC,MAAM,EAAE,GAAG,GAAG,SAAS,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC;IAEvD,sCAAsC;IACtC,kBAAkB,CAChB,MAAM,EAAE,GAAG,EACX,cAAc,EAAE,MAAM,GACrB,aAAa,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;CACnC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=public-tally-feed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-tally-feed.js","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/public-tally-feed.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ import type { PlatformID } from '../../../../interfaces/platform-id';
2
+ import type { IntervalTally } from './interval-tally';
3
+ /**
4
+ * A subscription to the public tally feed.
5
+ */
6
+ export interface TallySubscription<TID extends PlatformID = Uint8Array> {
7
+ /** Subscription ID */
8
+ readonly id: string;
9
+ /** Poll ID being subscribed to */
10
+ readonly pollId: TID;
11
+ /** Callback for new tallies */
12
+ readonly onTally: (tally: IntervalTally<TID>) => void;
13
+ /** Unsubscribe function */
14
+ unsubscribe(): void;
15
+ }
16
+ //# sourceMappingURL=tally-subscription.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tally-subscription.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/tally-subscription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,GAAG,SAAS,UAAU,GAAG,UAAU;IACpE,sBAAsB;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC;IACrB,+BAA+B;IAC/B,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;IACtD,2BAA2B;IAC3B,WAAW,IAAI,IAAI,CAAC;CACrB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=tally-subscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tally-subscription.js","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/tally-subscription.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import type { PublicKey } from 'paillier-bigint';
2
+ import type { PlatformID } from '../../../../interfaces/platform-id';
3
+ import type { IntervalTally } from './interval-tally';
4
+ import type { VerificationResult } from './verification-result';
5
+ /**
6
+ * Interface for third-party tally verification.
7
+ */
8
+ export interface ITallyVerifier<TID extends PlatformID = Uint8Array> {
9
+ /** Verify a published interval tally */
10
+ verify(tally: IntervalTally<TID>, encryptedTally: bigint[], verificationKeys: readonly Uint8Array[], publicKey: PublicKey, registeredGuardians: readonly number[]): VerificationResult;
11
+ }
12
+ //# sourceMappingURL=tally-verifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tally-verifier.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/tally-verifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,cAAc,CAAC,GAAG,SAAS,UAAU,GAAG,UAAU;IACjE,wCAAwC;IACxC,MAAM,CACJ,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC,EACzB,cAAc,EAAE,MAAM,EAAE,EACxB,gBAAgB,EAAE,SAAS,UAAU,EAAE,EACvC,SAAS,EAAE,SAAS,EACpB,mBAAmB,EAAE,SAAS,MAAM,EAAE,GACrC,kBAAkB,CAAC;CACvB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=tally-verifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tally-verifier.js","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/tally-verifier.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import type { PlatformID } from '../../../../interfaces/platform-id';
2
+ import type { ICeremonyCoordinator } from './ceremony-coordinator';
3
+ import type { IntervalTally } from './interval-tally';
4
+ /**
5
+ * Interface for hierarchical aggregators with threshold decryption.
6
+ */
7
+ export interface IThresholdAggregator<TID extends PlatformID = Uint8Array> {
8
+ /** Perform interval decryption at this aggregation level */
9
+ performIntervalDecryption(ceremonyCoordinator: ICeremonyCoordinator<TID>, intervalNumber: number): Promise<IntervalTally<TID>>;
10
+ /** Get encrypted aggregate tally */
11
+ getEncryptedTally(): bigint[];
12
+ /** Propagate interval result to parent aggregator */
13
+ propagateToParent(tally: IntervalTally<TID>): void;
14
+ }
15
+ //# sourceMappingURL=threshold-aggregator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threshold-aggregator.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/threshold-aggregator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,oBAAoB,CAAC,GAAG,SAAS,UAAU,GAAG,UAAU;IACvE,4DAA4D;IAC5D,yBAAyB,CACvB,mBAAmB,EAAE,oBAAoB,CAAC,GAAG,CAAC,EAC9C,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;IAE/B,oCAAoC;IACpC,iBAAiB,IAAI,MAAM,EAAE,CAAC;IAE9B,qDAAqD;IACrD,iBAAiB,CAAC,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;CACpD"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=threshold-aggregator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threshold-aggregator.js","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/threshold-aggregator.ts"],"names":[],"mappings":""}
@@ -0,0 +1,28 @@
1
+ import type { PlatformID } from '../../../../interfaces/platform-id';
2
+ import type { ThresholdAuditEventType } from '../enumerations/threshold-audit-event-type';
3
+ /**
4
+ * Audit log entry for threshold operations.
5
+ */
6
+ export interface ThresholdAuditEntry<TID extends PlatformID = Uint8Array> {
7
+ /** Event type */
8
+ readonly eventType: ThresholdAuditEventType;
9
+ /** Timestamp of the event */
10
+ readonly timestamp: number;
11
+ /** Associated poll ID (if applicable) */
12
+ readonly pollId?: TID;
13
+ /** Associated ceremony ID (if applicable) */
14
+ readonly ceremonyId?: string;
15
+ /** Associated Guardian ID (if applicable) */
16
+ readonly guardianId?: TID;
17
+ /** Guardian share index (if applicable) */
18
+ readonly guardianIndex?: number;
19
+ /** Additional metadata */
20
+ readonly metadata: Record<string, string | number | boolean>;
21
+ /** Hash of the previous entry (for chain integrity) */
22
+ readonly previousHash: Uint8Array;
23
+ /** Hash of this entry */
24
+ readonly entryHash: Uint8Array;
25
+ /** Signature of this entry */
26
+ readonly signature: Uint8Array;
27
+ }
28
+ //# sourceMappingURL=threshold-audit-entry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threshold-audit-entry.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/threshold-audit-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAE1F;;GAEG;AACH,MAAM,WAAW,mBAAmB,CAAC,GAAG,SAAS,UAAU,GAAG,UAAU;IACtE,iBAAiB;IACjB,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAC;IAC5C,6BAA6B;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,yCAAyC;IACzC,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC;IACtB,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,CAAC,EAAE,GAAG,CAAC;IAC1B,2CAA2C;IAC3C,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,0BAA0B;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;IAC7D,uDAAuD;IACvD,QAAQ,CAAC,YAAY,EAAE,UAAU,CAAC;IAClC,yBAAyB;IACzB,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;IAC/B,8BAA8B;IAC9B,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;CAChC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=threshold-audit-entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threshold-audit-entry.js","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/threshold-audit-entry.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Configuration for threshold key generation.
3
+ */
4
+ export interface ThresholdKeyConfig {
5
+ /** Total number of key shares (n) */
6
+ readonly totalShares: number;
7
+ /** Minimum shares required for decryption (k) */
8
+ readonly threshold: number;
9
+ /** Paillier key bit length (default: 2048) */
10
+ readonly keyBitLength?: number;
11
+ }
12
+ //# sourceMappingURL=threshold-key-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threshold-key-config.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/threshold-key-config.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,qCAAqC;IACrC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,iDAAiD;IACjD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,8CAA8C;IAC9C,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=threshold-key-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threshold-key-config.js","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/threshold-key-config.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import type { ThresholdKeyConfig } from './threshold-key-config';
2
+ import type { ThresholdKeyPair } from './threshold-key-pair';
3
+ /**
4
+ * Interface for threshold key generation.
5
+ */
6
+ export interface IThresholdKeyGenerator {
7
+ /** Generate a new threshold key pair */
8
+ generate(config: ThresholdKeyConfig): Promise<ThresholdKeyPair>;
9
+ /** Validate a threshold configuration */
10
+ validateConfig(config: ThresholdKeyConfig): void;
11
+ }
12
+ //# sourceMappingURL=threshold-key-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threshold-key-generator.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/threshold-key-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,wCAAwC;IACxC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAEhE,yCAAyC;IACzC,cAAc,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;CAClD"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=threshold-key-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threshold-key-generator.js","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/threshold-key-generator.ts"],"names":[],"mappings":""}
@@ -0,0 +1,30 @@
1
+ import type { PublicKey } from 'paillier-bigint';
2
+ import type { KeyShare } from './key-share';
3
+ import type { ThresholdKeyConfig } from './threshold-key-config';
4
+ /**
5
+ * A complete threshold key pair with all shares.
6
+ *
7
+ * Generated by ThresholdKeyGenerator and contains the public key
8
+ * for encryption plus all key shares for distribution to Guardians.
9
+ */
10
+ export interface ThresholdKeyPair {
11
+ /** Standard Paillier public key for encryption */
12
+ readonly publicKey: PublicKey;
13
+ /** Verification keys for each share (for ZK proof verification) */
14
+ readonly verificationKeys: readonly Uint8Array[];
15
+ /** The n key shares to distribute to Guardians */
16
+ readonly keyShares: readonly KeyShare[];
17
+ /** Threshold configuration */
18
+ readonly config: ThresholdKeyConfig;
19
+ /**
20
+ * Precomputed decryption constant: θ = L(g^(4·Δ·λ) mod n²) mod n
21
+ *
22
+ * Used by the DecryptionCombiner to convert the combined partial
23
+ * decryptions into the final plaintext: m = L(combined) · θ⁻¹ mod n.
24
+ *
25
+ * This value is public and safe to distribute — it reveals no information
26
+ * about the private key λ.
27
+ */
28
+ readonly theta: bigint;
29
+ }
30
+ //# sourceMappingURL=threshold-key-pair.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threshold-key-pair.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/threshold-key-pair.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,mEAAmE;IACnE,QAAQ,CAAC,gBAAgB,EAAE,SAAS,UAAU,EAAE,CAAC;IACjD,kDAAkD;IAClD,QAAQ,CAAC,SAAS,EAAE,SAAS,QAAQ,EAAE,CAAC;IACxC,8BAA8B;IAC9B,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=threshold-key-pair.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threshold-key-pair.js","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/threshold-key-pair.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ import type { PlatformID } from '../../../../interfaces/platform-id';
2
+ import type { IGuardianRegistry } from './guardian-registry';
3
+ import type { IntervalConfig } from './interval-config';
4
+ import type { ThresholdKeyConfig } from './threshold-key-config';
5
+ import type { ThresholdKeyPair } from './threshold-key-pair';
6
+ /**
7
+ * Configuration for creating a threshold-enabled poll.
8
+ */
9
+ export interface ThresholdPollConfig<TID extends PlatformID = Uint8Array> {
10
+ /** Threshold key configuration */
11
+ readonly thresholdConfig: ThresholdKeyConfig;
12
+ /** Interval configuration */
13
+ readonly intervalConfig: IntervalConfig;
14
+ /** Guardian registry to use */
15
+ readonly guardianRegistry: IGuardianRegistry<TID>;
16
+ /** Pre-generated threshold key pair (optional) */
17
+ readonly keyPair?: ThresholdKeyPair;
18
+ }
19
+ //# sourceMappingURL=threshold-poll-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threshold-poll-config.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/threshold-poll-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,mBAAmB,CAAC,GAAG,SAAS,UAAU,GAAG,UAAU;IACtE,kCAAkC;IAClC,QAAQ,CAAC,eAAe,EAAE,kBAAkB,CAAC;IAC7C,6BAA6B;IAC7B,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC,+BAA+B;IAC/B,QAAQ,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAClD,kDAAkD;IAClD,QAAQ,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC;CACrC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=threshold-poll-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threshold-poll-config.js","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/threshold-poll-config.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ import type { IMember } from '../../../../interfaces';
2
+ import type { PlatformID } from '../../../../interfaces/platform-id';
3
+ import type { VotingMethod } from '../../enumerations';
4
+ import type { IPoll } from '../../interfaces/poll';
5
+ import type { IThresholdPoll } from './threshold-poll';
6
+ import type { ThresholdPollConfig } from './threshold-poll-config';
7
+ /**
8
+ * Interface for creating threshold-enabled polls.
9
+ */
10
+ export interface IThresholdPollFactory<TID extends PlatformID = Uint8Array> {
11
+ /** Create a threshold-enabled poll */
12
+ createThresholdPoll(choices: string[], method: VotingMethod, authority: IMember<TID>, thresholdConfig: ThresholdPollConfig<TID>): IThresholdPoll<TID>;
13
+ /** Create a standard poll (backward compatible) */
14
+ createStandardPoll(choices: string[], method: VotingMethod, authority: IMember<TID>): IPoll<TID>;
15
+ }
16
+ //# sourceMappingURL=threshold-poll-factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threshold-poll-factory.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/threshold-poll-factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,qBAAqB,CAAC,GAAG,SAAS,UAAU,GAAG,UAAU;IACxE,sCAAsC;IACtC,mBAAmB,CACjB,OAAO,EAAE,MAAM,EAAE,EACjB,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,EACvB,eAAe,EAAE,mBAAmB,CAAC,GAAG,CAAC,GACxC,cAAc,CAAC,GAAG,CAAC,CAAC;IAEvB,mDAAmD;IACnD,kBAAkB,CAChB,OAAO,EAAE,MAAM,EAAE,EACjB,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,GACtB,KAAK,CAAC,GAAG,CAAC,CAAC;CACf"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=threshold-poll-factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threshold-poll-factory.js","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/threshold-poll-factory.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ import type { PlatformID } from '../../../../interfaces/platform-id';
2
+ import type { IPoll } from '../../interfaces/poll';
3
+ import type { ICeremonyCoordinator } from './ceremony-coordinator';
4
+ import type { IntervalConfig } from './interval-config';
5
+ import type { IIntervalScheduler } from './interval-scheduler';
6
+ import type { IPublicTallyFeed } from './public-tally-feed';
7
+ import type { ThresholdKeyConfig } from './threshold-key-config';
8
+ /**
9
+ * Extended poll interface with threshold decryption support.
10
+ */
11
+ export interface IThresholdPoll<TID extends PlatformID = Uint8Array> extends IPoll<TID> {
12
+ /** Threshold configuration */
13
+ readonly thresholdConfig: ThresholdKeyConfig;
14
+ /** Interval configuration */
15
+ readonly intervalConfig: IntervalConfig;
16
+ /** Get the interval scheduler */
17
+ readonly intervalScheduler: IIntervalScheduler<TID>;
18
+ /** Get the ceremony coordinator */
19
+ readonly ceremonyCoordinator: ICeremonyCoordinator<TID>;
20
+ /** Get the public tally feed */
21
+ readonly tallyFeed: IPublicTallyFeed<TID>;
22
+ /** Whether threshold decryption is enabled */
23
+ readonly isThresholdEnabled: true;
24
+ }
25
+ //# sourceMappingURL=threshold-poll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threshold-poll.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/threshold-poll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,cAAc,CAC7B,GAAG,SAAS,UAAU,GAAG,UAAU,CACnC,SAAQ,KAAK,CAAC,GAAG,CAAC;IAClB,8BAA8B;IAC9B,QAAQ,CAAC,eAAe,EAAE,kBAAkB,CAAC;IAE7C,6BAA6B;IAC7B,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAExC,iCAAiC;IACjC,QAAQ,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAEpD,mCAAmC;IACnC,QAAQ,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,GAAG,CAAC,CAAC;IAExD,gCAAgC;IAChC,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAE1C,8CAA8C;IAC9C,QAAQ,CAAC,kBAAkB,EAAE,IAAI,CAAC;CACnC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=threshold-poll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threshold-poll.js","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/threshold-poll.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Result of verifying a published tally.
3
+ */
4
+ export interface VerificationResult {
5
+ /** Whether verification passed */
6
+ readonly valid: boolean;
7
+ /** Specific checks performed */
8
+ readonly checks: {
9
+ readonly proofValid: boolean;
10
+ readonly guardiansAuthorized: boolean;
11
+ readonly tallyMatchesEncrypted: boolean;
12
+ readonly timestampValid: boolean;
13
+ };
14
+ /** Error details if verification failed */
15
+ readonly error?: string;
16
+ }
17
+ //# sourceMappingURL=verification-result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification-result.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/verification-result.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,kCAAkC;IAClC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,gCAAgC;IAChC,QAAQ,CAAC,MAAM,EAAE;QACf,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;QAC7B,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;QACtC,QAAQ,CAAC,qBAAqB,EAAE,OAAO,CAAC;QACxC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;KAClC,CAAC;IACF,2CAA2C;IAC3C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=verification-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification-result.js","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/verification-result.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Zero-knowledge proof for partial decryption correctness.
3
+ *
4
+ * Proves that a partial decryption was computed correctly using
5
+ * the Guardian's actual key share without revealing the share.
6
+ */
7
+ export interface ZKProof {
8
+ /** Proof commitment */
9
+ readonly commitment: bigint;
10
+ /** Proof challenge */
11
+ readonly challenge: bigint;
12
+ /** Proof response */
13
+ readonly response: bigint;
14
+ }
15
+ //# sourceMappingURL=zk-proof.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zk-proof.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/zk-proof.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACtB,uBAAuB;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,sBAAsB;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,qBAAqB;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=zk-proof.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zk-proof.js","sourceRoot":"","sources":["../../../../../../../../packages/digitaldefiance-ecies-lib/src/lib/voting/threshold/interfaces/zk-proof.ts"],"names":[],"mappings":""}