@peeramid-labs/sdk 3.5.0 → 3.6.0

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 (272) hide show
  1. package/README.md +5 -4
  2. package/cli/abis/IErrors.js +16 -0
  3. package/cli/abis/IErrors.js.map +1 -1
  4. package/cli/abis/IPoseidon2.js +26 -0
  5. package/cli/abis/IPoseidon2.js.map +1 -0
  6. package/cli/abis/IPoseidon5.js +26 -0
  7. package/cli/abis/IPoseidon5.js.map +1 -0
  8. package/cli/abis/IPoseidon6.js +26 -0
  9. package/cli/abis/IPoseidon6.js.map +1 -0
  10. package/cli/abis/IRankifyInstance.js +13 -1
  11. package/cli/abis/IRankifyInstance.js.map +1 -1
  12. package/cli/abis/MAODistribution.js +5 -0
  13. package/cli/abis/MAODistribution.js.map +1 -1
  14. package/cli/abis/ProposalsIntegrity15Groth16Verifier.js +1120 -0
  15. package/cli/abis/ProposalsIntegrity15Groth16Verifier.js.map +1 -0
  16. package/cli/abis/RankifyDiamondInstance.js +323 -14
  17. package/cli/abis/RankifyDiamondInstance.js.map +1 -1
  18. package/cli/abis/RankifyInstanceEventMock.js +1 -1
  19. package/cli/abis/RankifyInstanceEventMock.js.map +1 -1
  20. package/cli/abis/RankifyInstanceGameMastersFacet.js +132 -13
  21. package/cli/abis/RankifyInstanceGameMastersFacet.js.map +1 -1
  22. package/cli/abis/RankifyInstanceInit.js +20 -0
  23. package/cli/abis/RankifyInstanceInit.js.map +1 -1
  24. package/cli/abis/RankifyInstanceMainFacet.js +125 -1
  25. package/cli/abis/RankifyInstanceMainFacet.js.map +1 -1
  26. package/cli/abis/RankifyInstanceRequirementsFacet.js +25 -0
  27. package/cli/abis/RankifyInstanceRequirementsFacet.js.map +1 -1
  28. package/cli/abis/index.js +18 -2
  29. package/cli/abis/index.js.map +1 -1
  30. package/cli/cli/commands/distributions/add.js +2 -2
  31. package/cli/cli/commands/distributions/add.js.map +1 -1
  32. package/cli/cli/commands/eds/index.js +14 -0
  33. package/cli/cli/commands/eds/index.js.map +1 -1
  34. package/cli/cli/commands/fellowship/create.js +0 -1
  35. package/cli/cli/commands/fellowship/create.js.map +1 -1
  36. package/cli/cli/index.js +2 -0
  37. package/cli/cli/index.js.map +1 -1
  38. package/cli/eds/Distributor.js +4 -5
  39. package/cli/eds/Distributor.js.map +1 -1
  40. package/cli/rankify/InstanceBase.js +103 -42
  41. package/cli/rankify/InstanceBase.js.map +1 -1
  42. package/cli/rankify/MAODistributor.js +17 -0
  43. package/cli/rankify/MAODistributor.js.map +1 -1
  44. package/cli/types.js +22 -1
  45. package/cli/types.js.map +1 -1
  46. package/cli/utils/ApiError.js +2 -1
  47. package/cli/utils/ApiError.js.map +1 -1
  48. package/cli/utils/artifacts.js +18 -0
  49. package/cli/utils/artifacts.js.map +1 -1
  50. package/cli/utils/log.js +26 -0
  51. package/cli/utils/log.js.map +1 -0
  52. package/cli/utils/permutations.js +32 -0
  53. package/cli/utils/permutations.js.map +1 -0
  54. package/docs/classes/GameMaster.md +377 -79
  55. package/docs/classes/InstanceBase.md +125 -14
  56. package/docs/classes/InstancePlayer.md +310 -36
  57. package/docs/docs/classes/GameMaster.md +377 -79
  58. package/docs/docs/classes/InstanceBase.md +125 -14
  59. package/docs/docs/classes/InstancePlayer.md +310 -36
  60. package/docs/docs/index.md +59 -13
  61. package/docs/docs/interfaces/GameMetadata.md +91 -0
  62. package/docs/docs/interfaces/GmProposalParams.md +41 -0
  63. package/docs/docs/interfaces/Submission.md +52 -0
  64. package/docs/index.md +59 -13
  65. package/docs/interfaces/GameMetadata.md +91 -0
  66. package/docs/interfaces/GmProposalParams.md +41 -0
  67. package/docs/interfaces/Submission.md +52 -0
  68. package/lib.commonjs/abis/IErrors.d.ts +12 -0
  69. package/lib.commonjs/abis/IErrors.d.ts.map +1 -1
  70. package/lib.commonjs/abis/IErrors.js +16 -0
  71. package/lib.commonjs/abis/IErrors.js.map +1 -1
  72. package/lib.commonjs/abis/IPoseidon2.d.ts +17 -0
  73. package/lib.commonjs/abis/IPoseidon2.d.ts.map +1 -0
  74. package/lib.commonjs/abis/IPoseidon2.js +26 -0
  75. package/lib.commonjs/abis/IPoseidon2.js.map +1 -0
  76. package/lib.commonjs/abis/IPoseidon5.d.ts +17 -0
  77. package/lib.commonjs/abis/IPoseidon5.d.ts.map +1 -0
  78. package/lib.commonjs/abis/IPoseidon5.js +26 -0
  79. package/lib.commonjs/abis/IPoseidon5.js.map +1 -0
  80. package/lib.commonjs/abis/IPoseidon6.d.ts +17 -0
  81. package/lib.commonjs/abis/IPoseidon6.d.ts.map +1 -0
  82. package/lib.commonjs/abis/IPoseidon6.js +26 -0
  83. package/lib.commonjs/abis/IPoseidon6.js.map +1 -0
  84. package/lib.commonjs/abis/IRankifyInstance.d.ts +11 -1
  85. package/lib.commonjs/abis/IRankifyInstance.d.ts.map +1 -1
  86. package/lib.commonjs/abis/IRankifyInstance.js +13 -1
  87. package/lib.commonjs/abis/IRankifyInstance.js.map +1 -1
  88. package/lib.commonjs/abis/MAODistribution.d.ts +4 -0
  89. package/lib.commonjs/abis/MAODistribution.d.ts.map +1 -1
  90. package/lib.commonjs/abis/MAODistribution.js +5 -0
  91. package/lib.commonjs/abis/MAODistribution.js.map +1 -1
  92. package/lib.commonjs/abis/ProposalsIntegrity15Groth16Verifier.d.ts +859 -0
  93. package/lib.commonjs/abis/ProposalsIntegrity15Groth16Verifier.d.ts.map +1 -0
  94. package/lib.commonjs/abis/ProposalsIntegrity15Groth16Verifier.js +1120 -0
  95. package/lib.commonjs/abis/ProposalsIntegrity15Groth16Verifier.js.map +1 -0
  96. package/lib.commonjs/abis/RankifyDiamondInstance.d.ts +254 -14
  97. package/lib.commonjs/abis/RankifyDiamondInstance.d.ts.map +1 -1
  98. package/lib.commonjs/abis/RankifyDiamondInstance.js +323 -14
  99. package/lib.commonjs/abis/RankifyDiamondInstance.js.map +1 -1
  100. package/lib.commonjs/abis/RankifyInstanceEventMock.d.ts +1 -1
  101. package/lib.commonjs/abis/RankifyInstanceEventMock.js +1 -1
  102. package/lib.commonjs/abis/RankifyInstanceEventMock.js.map +1 -1
  103. package/lib.commonjs/abis/RankifyInstanceGameMastersFacet.d.ts +107 -13
  104. package/lib.commonjs/abis/RankifyInstanceGameMastersFacet.d.ts.map +1 -1
  105. package/lib.commonjs/abis/RankifyInstanceGameMastersFacet.js +132 -13
  106. package/lib.commonjs/abis/RankifyInstanceGameMastersFacet.js.map +1 -1
  107. package/lib.commonjs/abis/RankifyInstanceInit.d.ts +16 -0
  108. package/lib.commonjs/abis/RankifyInstanceInit.d.ts.map +1 -1
  109. package/lib.commonjs/abis/RankifyInstanceInit.js +20 -0
  110. package/lib.commonjs/abis/RankifyInstanceInit.js.map +1 -1
  111. package/lib.commonjs/abis/RankifyInstanceMainFacet.d.ts +97 -1
  112. package/lib.commonjs/abis/RankifyInstanceMainFacet.d.ts.map +1 -1
  113. package/lib.commonjs/abis/RankifyInstanceMainFacet.js +125 -1
  114. package/lib.commonjs/abis/RankifyInstanceMainFacet.js.map +1 -1
  115. package/lib.commonjs/abis/RankifyInstanceRequirementsFacet.d.ts +20 -0
  116. package/lib.commonjs/abis/RankifyInstanceRequirementsFacet.d.ts.map +1 -1
  117. package/lib.commonjs/abis/RankifyInstanceRequirementsFacet.js +25 -0
  118. package/lib.commonjs/abis/RankifyInstanceRequirementsFacet.js.map +1 -1
  119. package/lib.commonjs/abis/index.d.ts +1526 -128
  120. package/lib.commonjs/abis/index.d.ts.map +1 -1
  121. package/lib.commonjs/abis/index.js +18 -2
  122. package/lib.commonjs/abis/index.js.map +1 -1
  123. package/lib.commonjs/eds/Distributor.d.ts.map +1 -1
  124. package/lib.commonjs/eds/Distributor.js +4 -5
  125. package/lib.commonjs/eds/Distributor.js.map +1 -1
  126. package/lib.commonjs/index.d.ts +1 -2
  127. package/lib.commonjs/index.d.ts.map +1 -1
  128. package/lib.commonjs/index.js +1 -4
  129. package/lib.commonjs/index.js.map +1 -1
  130. package/lib.commonjs/rankify/GameMaster.d.ts +289 -43
  131. package/lib.commonjs/rankify/GameMaster.d.ts.map +1 -1
  132. package/lib.commonjs/rankify/GameMaster.js +794 -122
  133. package/lib.commonjs/rankify/GameMaster.js.map +1 -1
  134. package/lib.commonjs/rankify/InstanceBase.d.ts +1400 -3434
  135. package/lib.commonjs/rankify/InstanceBase.d.ts.map +1 -1
  136. package/lib.commonjs/rankify/InstanceBase.js +103 -42
  137. package/lib.commonjs/rankify/InstanceBase.js.map +1 -1
  138. package/lib.commonjs/rankify/MAODistributor.d.ts.map +1 -1
  139. package/lib.commonjs/rankify/MAODistributor.js +17 -0
  140. package/lib.commonjs/rankify/MAODistributor.js.map +1 -1
  141. package/lib.commonjs/rankify/Player.d.ts +80 -2
  142. package/lib.commonjs/rankify/Player.d.ts.map +1 -1
  143. package/lib.commonjs/rankify/Player.js +138 -4
  144. package/lib.commonjs/rankify/Player.js.map +1 -1
  145. package/lib.commonjs/types/contracts.d.ts +18 -0
  146. package/lib.commonjs/types/contracts.d.ts.map +1 -1
  147. package/lib.commonjs/types.d.ts +68 -6
  148. package/lib.commonjs/types.d.ts.map +1 -1
  149. package/lib.commonjs/types.js +22 -1
  150. package/lib.commonjs/types.js.map +1 -1
  151. package/lib.commonjs/utils/ApiError.d.ts.map +1 -1
  152. package/lib.commonjs/utils/ApiError.js +2 -1
  153. package/lib.commonjs/utils/ApiError.js.map +1 -1
  154. package/lib.commonjs/utils/artifacts.d.ts +3 -1
  155. package/lib.commonjs/utils/artifacts.d.ts.map +1 -1
  156. package/lib.commonjs/utils/artifacts.js +18 -0
  157. package/lib.commonjs/utils/artifacts.js.map +1 -1
  158. package/lib.commonjs/utils/getEnv.d.ts +9 -0
  159. package/lib.commonjs/utils/getEnv.d.ts.map +1 -0
  160. package/lib.commonjs/utils/getEnv.js +18 -0
  161. package/lib.commonjs/utils/getEnv.js.map +1 -0
  162. package/lib.commonjs/utils/log.d.ts +2 -0
  163. package/lib.commonjs/utils/log.d.ts.map +1 -0
  164. package/lib.commonjs/utils/log.js +26 -0
  165. package/lib.commonjs/utils/log.js.map +1 -0
  166. package/lib.commonjs/utils/permutations.d.ts +21 -0
  167. package/lib.commonjs/utils/permutations.d.ts.map +1 -0
  168. package/lib.commonjs/utils/permutations.js +32 -0
  169. package/lib.commonjs/utils/permutations.js.map +1 -0
  170. package/lib.esm/abis/IErrors.d.ts +12 -0
  171. package/lib.esm/abis/IErrors.d.ts.map +1 -1
  172. package/lib.esm/abis/IErrors.js +16 -0
  173. package/lib.esm/abis/IErrors.js.map +1 -1
  174. package/lib.esm/abis/IPoseidon2.d.ts +17 -0
  175. package/lib.esm/abis/IPoseidon2.d.ts.map +1 -0
  176. package/lib.esm/abis/IPoseidon2.js +23 -0
  177. package/lib.esm/abis/IPoseidon2.js.map +1 -0
  178. package/lib.esm/abis/IPoseidon5.d.ts +17 -0
  179. package/lib.esm/abis/IPoseidon5.d.ts.map +1 -0
  180. package/lib.esm/abis/IPoseidon5.js +23 -0
  181. package/lib.esm/abis/IPoseidon5.js.map +1 -0
  182. package/lib.esm/abis/IPoseidon6.d.ts +17 -0
  183. package/lib.esm/abis/IPoseidon6.d.ts.map +1 -0
  184. package/lib.esm/abis/IPoseidon6.js +23 -0
  185. package/lib.esm/abis/IPoseidon6.js.map +1 -0
  186. package/lib.esm/abis/IRankifyInstance.d.ts +11 -1
  187. package/lib.esm/abis/IRankifyInstance.d.ts.map +1 -1
  188. package/lib.esm/abis/IRankifyInstance.js +13 -1
  189. package/lib.esm/abis/IRankifyInstance.js.map +1 -1
  190. package/lib.esm/abis/MAODistribution.d.ts +4 -0
  191. package/lib.esm/abis/MAODistribution.d.ts.map +1 -1
  192. package/lib.esm/abis/MAODistribution.js +5 -0
  193. package/lib.esm/abis/MAODistribution.js.map +1 -1
  194. package/lib.esm/abis/ProposalsIntegrity15Groth16Verifier.d.ts +859 -0
  195. package/lib.esm/abis/ProposalsIntegrity15Groth16Verifier.d.ts.map +1 -0
  196. package/lib.esm/abis/ProposalsIntegrity15Groth16Verifier.js +1117 -0
  197. package/lib.esm/abis/ProposalsIntegrity15Groth16Verifier.js.map +1 -0
  198. package/lib.esm/abis/RankifyDiamondInstance.d.ts +254 -14
  199. package/lib.esm/abis/RankifyDiamondInstance.d.ts.map +1 -1
  200. package/lib.esm/abis/RankifyDiamondInstance.js +323 -14
  201. package/lib.esm/abis/RankifyDiamondInstance.js.map +1 -1
  202. package/lib.esm/abis/RankifyInstanceEventMock.d.ts +1 -1
  203. package/lib.esm/abis/RankifyInstanceEventMock.js +1 -1
  204. package/lib.esm/abis/RankifyInstanceEventMock.js.map +1 -1
  205. package/lib.esm/abis/RankifyInstanceGameMastersFacet.d.ts +107 -13
  206. package/lib.esm/abis/RankifyInstanceGameMastersFacet.d.ts.map +1 -1
  207. package/lib.esm/abis/RankifyInstanceGameMastersFacet.js +132 -13
  208. package/lib.esm/abis/RankifyInstanceGameMastersFacet.js.map +1 -1
  209. package/lib.esm/abis/RankifyInstanceInit.d.ts +16 -0
  210. package/lib.esm/abis/RankifyInstanceInit.d.ts.map +1 -1
  211. package/lib.esm/abis/RankifyInstanceInit.js +20 -0
  212. package/lib.esm/abis/RankifyInstanceInit.js.map +1 -1
  213. package/lib.esm/abis/RankifyInstanceMainFacet.d.ts +97 -1
  214. package/lib.esm/abis/RankifyInstanceMainFacet.d.ts.map +1 -1
  215. package/lib.esm/abis/RankifyInstanceMainFacet.js +125 -1
  216. package/lib.esm/abis/RankifyInstanceMainFacet.js.map +1 -1
  217. package/lib.esm/abis/RankifyInstanceRequirementsFacet.d.ts +20 -0
  218. package/lib.esm/abis/RankifyInstanceRequirementsFacet.d.ts.map +1 -1
  219. package/lib.esm/abis/RankifyInstanceRequirementsFacet.js +25 -0
  220. package/lib.esm/abis/RankifyInstanceRequirementsFacet.js.map +1 -1
  221. package/lib.esm/abis/index.d.ts +1526 -128
  222. package/lib.esm/abis/index.d.ts.map +1 -1
  223. package/lib.esm/abis/index.js +12 -0
  224. package/lib.esm/abis/index.js.map +1 -1
  225. package/lib.esm/eds/Distributor.d.ts.map +1 -1
  226. package/lib.esm/eds/Distributor.js +4 -5
  227. package/lib.esm/eds/Distributor.js.map +1 -1
  228. package/lib.esm/index.d.ts +1 -2
  229. package/lib.esm/index.d.ts.map +1 -1
  230. package/lib.esm/index.js +0 -2
  231. package/lib.esm/index.js.map +1 -1
  232. package/lib.esm/rankify/GameMaster.d.ts +289 -43
  233. package/lib.esm/rankify/GameMaster.d.ts.map +1 -1
  234. package/lib.esm/rankify/GameMaster.js +795 -123
  235. package/lib.esm/rankify/GameMaster.js.map +1 -1
  236. package/lib.esm/rankify/InstanceBase.d.ts +1400 -3434
  237. package/lib.esm/rankify/InstanceBase.d.ts.map +1 -1
  238. package/lib.esm/rankify/InstanceBase.js +89 -27
  239. package/lib.esm/rankify/InstanceBase.js.map +1 -1
  240. package/lib.esm/rankify/MAODistributor.d.ts.map +1 -1
  241. package/lib.esm/rankify/MAODistributor.js +18 -1
  242. package/lib.esm/rankify/MAODistributor.js.map +1 -1
  243. package/lib.esm/rankify/Player.d.ts +80 -2
  244. package/lib.esm/rankify/Player.d.ts.map +1 -1
  245. package/lib.esm/rankify/Player.js +138 -4
  246. package/lib.esm/rankify/Player.js.map +1 -1
  247. package/lib.esm/types/contracts.d.ts +18 -0
  248. package/lib.esm/types/contracts.d.ts.map +1 -1
  249. package/lib.esm/types.d.ts +68 -6
  250. package/lib.esm/types.d.ts.map +1 -1
  251. package/lib.esm/types.js +21 -0
  252. package/lib.esm/types.js.map +1 -1
  253. package/lib.esm/utils/ApiError.d.ts.map +1 -1
  254. package/lib.esm/utils/ApiError.js +2 -1
  255. package/lib.esm/utils/ApiError.js.map +1 -1
  256. package/lib.esm/utils/artifacts.d.ts +3 -1
  257. package/lib.esm/utils/artifacts.d.ts.map +1 -1
  258. package/lib.esm/utils/artifacts.js +18 -0
  259. package/lib.esm/utils/artifacts.js.map +1 -1
  260. package/lib.esm/utils/getEnv.d.ts +9 -0
  261. package/lib.esm/utils/getEnv.d.ts.map +1 -0
  262. package/lib.esm/utils/getEnv.js +15 -0
  263. package/lib.esm/utils/getEnv.js.map +1 -0
  264. package/lib.esm/utils/log.d.ts +2 -0
  265. package/lib.esm/utils/log.d.ts.map +1 -0
  266. package/lib.esm/utils/log.js +20 -0
  267. package/lib.esm/utils/log.js.map +1 -0
  268. package/lib.esm/utils/permutations.d.ts +21 -0
  269. package/lib.esm/utils/permutations.d.ts.map +1 -0
  270. package/lib.esm/utils/permutations.js +27 -0
  271. package/lib.esm/utils/permutations.js.map +1 -0
  272. package/package.json +16 -9
@@ -13,21 +13,26 @@ Extends InstanceBase to provide game master specific functionality
13
13
 
14
14
  - [walletClient](GameMaster.md#walletclient)
15
15
  - [publicClient](GameMaster.md#publicclient)
16
- - [encryptionCallback](GameMaster.md#encryptioncallback)
17
- - [decryptionCallback](GameMaster.md#decryptioncallback)
18
- - [randomnessCallback](GameMaster.md#randomnesscallback)
19
- - [turnSaltCallback](GameMaster.md#turnsaltcallback)
20
16
  - [chainId](GameMaster.md#chainid)
21
17
 
22
18
  ### Methods
23
19
 
20
+ - [decryptProposal](GameMaster.md#decryptproposal)
24
21
  - [decryptProposals](GameMaster.md#decryptproposals)
25
- - [shuffle](GameMaster.md#shuffle)
22
+ - [getPermutation](GameMaster.md#getpermutation)
23
+ - [generateDeterministicPermutation](GameMaster.md#generatedeterministicpermutation)
24
+ - [permuteArray](GameMaster.md#permutearray)
25
+ - [reversePermutation](GameMaster.md#reversepermutation)
26
26
  - [getTurnSalt](GameMaster.md#getturnsalt)
27
27
  - [getTurnPlayersSalt](GameMaster.md#getturnplayerssalt)
28
+ - [getProposalsVotedUpon](GameMaster.md#getproposalsvotedupon)
28
29
  - [findPlayerOngoingProposalIndex](GameMaster.md#findplayerongoingproposalindex)
30
+ - [validateJoinGame](GameMaster.md#validatejoingame)
31
+ - [signJoiningGame](GameMaster.md#signjoininggame)
29
32
  - [submitVote](GameMaster.md#submitvote)
30
- - [proposerHidden](GameMaster.md#proposerhidden)
33
+ - [proposalValues](GameMaster.md#proposalvalues)
34
+ - [encryptProposal](GameMaster.md#encryptproposal)
35
+ - [attestProposal](GameMaster.md#attestproposal)
31
36
  - [submitProposal](GameMaster.md#submitproposal)
32
37
  - [decryptTurnVotes](GameMaster.md#decryptturnvotes)
33
38
  - [decryptVotes](GameMaster.md#decryptvotes)
@@ -35,6 +40,12 @@ Extends InstanceBase to provide game master specific functionality
35
40
  - [currentTurn](GameMaster.md#currentturn)
36
41
  - [getPlayers](GameMaster.md#getplayers)
37
42
  - [endTurn](GameMaster.md#endturn)
43
+ - [gameKey](GameMaster.md#gamekey)
44
+ - [attestVote](GameMaster.md#attestvote)
45
+ - [signVote](GameMaster.md#signvote)
46
+ - [generateEndTurnIntegrity](GameMaster.md#generateendturnintegrity)
47
+ - [getProposalsIntegrity](GameMaster.md#getproposalsintegrity)
48
+ - [createInputs](GameMaster.md#createinputs)
38
49
 
39
50
  ## Constructors
40
51
 
@@ -52,10 +63,6 @@ Creates a new GameMaster instance
52
63
  | › `walletClient` | `Object` |
53
64
  | › `publicClient` | `Object` |
54
65
  | › `chainId` | `number` |
55
- | › `encryptionCallback` | (`data`: `string`) => `Promise`\<`string`\> |
56
- | › `decryptionCallback` | (`data`: `string`) => `Promise`\<`string`\> |
57
- | › `randomnessCallback` | () => `Promise`\<`number`\> |
58
- | › `turnSaltCallback` | (`__namedParameters`: \{ `gameId`: `bigint` ; `turn`: `bigint` }) => `Promise`\<\`0x$\{string}\`\> |
59
66
 
60
67
  #### Returns
61
68
 
@@ -75,117 +82,145 @@ ___
75
82
 
76
83
  ___
77
84
 
78
- ### encryptionCallback
85
+ ### chainId
86
+
87
+ • **chainId**: `number`
88
+
89
+ ## Methods
79
90
 
80
- **encryptionCallback**: (`data`: `string`) => `Promise`\<`string`\>
91
+ ### decryptProposal
81
92
 
82
- #### Type declaration
93
+ **decryptProposal**(`«destructured»`): `Promise`\<`string`\>
83
94
 
84
- (`data`): `Promise`\<`string`\>
95
+ Decrypts a proposal for a specific game turn
85
96
 
86
- ##### Parameters
97
+ #### Parameters
87
98
 
88
99
  | Name | Type |
89
100
  | :------ | :------ |
90
- | `data` | `string` |
101
+ | `«destructured»` | `Object` |
102
+ | › `proposal` | `string` |
103
+ | › `turn` | `bigint` |
104
+ | › `instanceAddress` | \`0x$\{string}\` |
105
+ | › `proposer` | \`0x$\{string}\` |
106
+ | › `gameId` | `bigint` |
107
+ | › `instance?` | [`InstanceBase`](InstanceBase.md) |
91
108
 
92
- ##### Returns
109
+ #### Returns
93
110
 
94
111
  `Promise`\<`string`\>
95
112
 
96
- ___
113
+ The decrypted proposal
97
114
 
98
- ### decryptionCallback
115
+ ___
99
116
 
100
- **decryptionCallback**: (`data`: `string`) => `Promise`\<`string`\>
117
+ ### decryptProposals
101
118
 
102
- #### Type declaration
119
+ **decryptProposals**(`«destructured»`): `Promise`\<\{ `proposer`: \`0x$\{string}\` = log.args.proposer; `proposal`: `string` }[]\>
103
120
 
104
- (`data`): `Promise`\<`string`\>
121
+ Decrypts proposals for a specific game turn
105
122
 
106
- ##### Parameters
123
+ #### Parameters
107
124
 
108
125
  | Name | Type |
109
126
  | :------ | :------ |
110
- | `data` | `string` |
127
+ | `«destructured»` | `Object` |
128
+ | › `instanceAddress` | \`0x$\{string}\` |
129
+ | › `gameId` | `bigint` |
130
+ | › `turn` | `bigint` |
131
+ | › `proposer?` | \`0x$\{string}\` |
111
132
 
112
- ##### Returns
133
+ #### Returns
113
134
 
114
- `Promise`\<`string`\>
135
+ `Promise`\<\{ `proposer`: \`0x$\{string}\` = log.args.proposer; `proposal`: `string` }[]\>
136
+
137
+ Array of decrypted proposals with proposer addresses
115
138
 
116
139
  ___
117
140
 
118
- ### randomnessCallback
141
+ ### getPermutation
119
142
 
120
- **randomnessCallback**: () => `Promise`\<`number`\>
143
+ **getPermutation**(`«destructured»`): `Promise`\<\{ `permutation`: `number`[] ; `turnSalt`: `bigint` }\>
121
144
 
122
- #### Type declaration
145
+ Generates a deterministic permutation for a specific game turn
123
146
 
124
- (): `Promise`\<`number`\>
147
+ #### Parameters
125
148
 
126
- ##### Returns
149
+ | Name | Type |
150
+ | :------ | :------ |
151
+ | `«destructured»` | `Object` |
152
+ | › `gameId` | `bigint` |
153
+ | › `turn` | `bigint` |
154
+ | › `size` | `number` |
155
+ | › `verifierAddress` | \`0x$\{string}\` |
127
156
 
128
- `Promise`\<`number`\>
157
+ #### Returns
158
+
159
+ `Promise`\<\{ `permutation`: `number`[] ; `turnSalt`: `bigint` }\>
160
+
161
+ The generated permutation, secret, and commitment
129
162
 
130
163
  ___
131
164
 
132
- ### turnSaltCallback
165
+ ### generateDeterministicPermutation
133
166
 
134
- **turnSaltCallback**: (`__namedParameters`: \{ `gameId`: `bigint` ; `turn`: `bigint` }) => `Promise`\<\`0x$\{string}\`\>
167
+ **generateDeterministicPermutation**(`«destructured»`): `Promise`\<\{ `permutation`: `number`[] ; `secret`: `bigint` ; `commitment`: `bigint` }\>
135
168
 
136
- #### Type declaration
169
+ Generates a deterministic permutation for a specific game turn
137
170
 
138
- (`«destructured»`): `Promise`\<\`0x$\{string}\`\>
171
+ #### Parameters
139
172
 
140
- ##### Parameters
173
+ | Name | Type | Default value |
174
+ | :------ | :------ | :------ |
175
+ | `«destructured»` | `Object` | `undefined` |
176
+ | › `gameId` | `bigint` | `undefined` |
177
+ | › `turn` | `bigint` | `undefined` |
178
+ | › `size?` | `number` | `15` |
179
+ | › `verifierAddress` | \`0x$\{string}\` | `undefined` |
141
180
 
142
- | Name | Type |
143
- | :------ | :------ |
144
- | `«destructured»` | `Object` |
145
- | › `gameId` | `bigint` |
146
- | › `turn` | `bigint` |
181
+ #### Returns
147
182
 
148
- ##### Returns
183
+ `Promise`\<\{ `permutation`: `number`[] ; `secret`: `bigint` ; `commitment`: `bigint` }\>
149
184
 
150
- `Promise`\<\`0x$\{string}\`\>
185
+ The generated permutation, secret, and commitment
151
186
 
152
187
  ___
153
188
 
154
- ### chainId
155
-
156
- • **chainId**: `number`
189
+ ### permuteArray
157
190
 
158
- ## Methods
191
+ **permuteArray**\<`T`\>(`«destructured»`): `Promise`\<`T`[]\>
159
192
 
160
- ### decryptProposals
193
+ Permutes an array based on a deterministic permutation
161
194
 
162
- **decryptProposals**(`«destructured»`): `Promise`\<\{ `proposer`: `undefined` \| \`0x$\{string}\` = log.args.proposer; `proposal`: `string` }[]\>
195
+ #### Type parameters
163
196
 
164
- Decrypts proposals for a specific game turn
197
+ | Name |
198
+ | :------ |
199
+ | `T` |
165
200
 
166
201
  #### Parameters
167
202
 
168
203
  | Name | Type |
169
204
  | :------ | :------ |
170
205
  | `«destructured»` | `Object` |
171
- | › `instanceAddress` | \`0x$\{string}\` |
206
+ | › `array` | `T`[] |
172
207
  | › `gameId` | `bigint` |
173
208
  | › `turn` | `bigint` |
174
- | › `proposer?` | \`0x$\{string}\` |
209
+ | › `verifierAddress` | \`0x$\{string}\` |
175
210
 
176
211
  #### Returns
177
212
 
178
- `Promise`\<\{ `proposer`: `undefined` \| \`0x$\{string}\` = log.args.proposer; `proposal`: `string` }[]\>
213
+ `Promise`\<`T`[]\>
179
214
 
180
- Array of decrypted proposals with proposer addresses
215
+ The permuted array
181
216
 
182
217
  ___
183
218
 
184
- ### shuffle
219
+ ### reversePermutation
185
220
 
186
- ▸ **shuffle**\<`T`\>(`array`): `Promise`\<`T`[]\>
221
+ ▸ **reversePermutation**\<`T`\>(`«destructured»`): `Promise`\<`T`[]\>
187
222
 
188
- Shuffles an array using cryptographically secure randomness
223
+ Reverses a permutation of an array
189
224
 
190
225
  #### Type parameters
191
226
 
@@ -195,21 +230,25 @@ Shuffles an array using cryptographically secure randomness
195
230
 
196
231
  #### Parameters
197
232
 
198
- | Name | Type | Description |
199
- | :------ | :------ | :------ |
200
- | `array` | `T`[] | Array to shuffle |
233
+ | Name | Type |
234
+ | :------ | :------ |
235
+ | `«destructured»` | `Object` |
236
+ | › `permutedArray` | `T`[] |
237
+ | › `gameId` | `bigint` |
238
+ | › `turn` | `bigint` |
239
+ | › `verifierAddress` | \`0x$\{string}\` |
201
240
 
202
241
  #### Returns
203
242
 
204
243
  `Promise`\<`T`[]\>
205
244
 
206
- Shuffled array
245
+ The original array
207
246
 
208
247
  ___
209
248
 
210
249
  ### getTurnSalt
211
250
 
212
- ▸ **getTurnSalt**(`«destructured»`): `Promise`\<\`0x$\{string}\`\>
251
+ ▸ **getTurnSalt**(`«destructured»`): `Promise`\<`bigint`\>
213
252
 
214
253
  Generates a salt for a specific game turn
215
254
 
@@ -220,10 +259,11 @@ Generates a salt for a specific game turn
220
259
  | `«destructured»` | `Object` |
221
260
  | › `gameId` | `bigint` |
222
261
  | › `turn` | `bigint` |
262
+ | › `verifierAddress` | \`0x$\{string}\` |
223
263
 
224
264
  #### Returns
225
265
 
226
- `Promise`\<\`0x$\{string}\`\>
266
+ `Promise`\<`bigint`\>
227
267
 
228
268
  Generated salt as Hex
229
269
 
@@ -242,7 +282,9 @@ Generates a salt for a specific player in a game turn
242
282
  | `«destructured»` | `Object` |
243
283
  | › `gameId` | `bigint` |
244
284
  | › `turn` | `bigint` |
245
- | › `proposer` | \`0x$\{string}\` |
285
+ | › `player` | \`0x$\{string}\` |
286
+ | › `verifierAddress` | \`0x$\{string}\` |
287
+ | › `size` | `number` |
246
288
 
247
289
  #### Returns
248
290
 
@@ -252,6 +294,25 @@ Generated salt as Hex
252
294
 
253
295
  ___
254
296
 
297
+ ### getProposalsVotedUpon
298
+
299
+ ▸ **getProposalsVotedUpon**(`«destructured»`): `Promise`\<\{ `proposer`: \`0x$\{string}\` ; `proposal`: `string` }[]\>
300
+
301
+ #### Parameters
302
+
303
+ | Name | Type |
304
+ | :------ | :------ |
305
+ | `«destructured»` | `Object` |
306
+ | › `instanceAddress` | \`0x$\{string}\` |
307
+ | › `gameId` | `bigint` |
308
+ | › `turn` | `bigint` |
309
+
310
+ #### Returns
311
+
312
+ `Promise`\<\{ `proposer`: \`0x$\{string}\` ; `proposal`: `string` }[]\>
313
+
314
+ ___
315
+
255
316
  ### findPlayerOngoingProposalIndex
256
317
 
257
318
  ▸ **findPlayerOngoingProposalIndex**(`«destructured»`): `Promise`\<`number`\>
@@ -266,6 +327,7 @@ Finds the index of a player's ongoing proposal
266
327
  | › `instanceAddress` | \`0x$\{string}\` |
267
328
  | › `gameId` | `bigint` |
268
329
  | › `player` | \`0x$\{string}\` |
330
+ | › `turn?` | `bigint` |
269
331
 
270
332
  #### Returns
271
333
 
@@ -275,6 +337,46 @@ Index of the player's proposal, -1 if not found
275
337
 
276
338
  ___
277
339
 
340
+ ### validateJoinGame
341
+
342
+ ▸ **validateJoinGame**(`props`): `Promise`\<\{ `result`: `boolean` ; `errorMessage`: `string` }\>
343
+
344
+ #### Parameters
345
+
346
+ | Name | Type |
347
+ | :------ | :------ |
348
+ | `props` | `Object` |
349
+ | `props.gameId` | `bigint` |
350
+ | `props.participant` | \`0x$\{string}\` |
351
+ | `props.instanceAddress` | \`0x$\{string}\` |
352
+
353
+ #### Returns
354
+
355
+ `Promise`\<\{ `result`: `boolean` ; `errorMessage`: `string` }\>
356
+
357
+ ___
358
+
359
+ ### signJoiningGame
360
+
361
+ ▸ **signJoiningGame**(`props`, `timeToJoin?`): `Promise`\<\{ `signature`: \`0x$\{string}\` ; `gmCommitment`: \`0x$\{string}\` ; `deadline`: `bigint` }\>
362
+
363
+ Signs a joining game event
364
+
365
+ #### Parameters
366
+
367
+ | Name | Type |
368
+ | :------ | :------ |
369
+ | `props` | `JoinGameProps` |
370
+ | `timeToJoin` | `number` |
371
+
372
+ #### Returns
373
+
374
+ `Promise`\<\{ `signature`: \`0x$\{string}\` ; `gmCommitment`: \`0x$\{string}\` ; `deadline`: `bigint` }\>
375
+
376
+ Signature and gmCommitment
377
+
378
+ ___
379
+
278
380
  ### submitVote
279
381
 
280
382
  ▸ **submitVote**(`«destructured»`): `Promise`\<\`0x$\{string}\`\>
@@ -290,6 +392,9 @@ Submits a vote for proposals
290
392
  | › `gameId` | `bigint` |
291
393
  | › `vote` | `bigint`[] |
292
394
  | › `voter` | \`0x$\{string}\` |
395
+ | › `voterSignature` | \`0x$\{string}\` |
396
+ | › `ballotHash` | \`0x$\{string}\` |
397
+ | › `ballotId` | `string` |
293
398
 
294
399
  #### Returns
295
400
 
@@ -299,26 +404,74 @@ Transaction hash
299
404
 
300
405
  ___
301
406
 
302
- ### proposerHidden
407
+ ### proposalValues
303
408
 
304
- ▸ **proposerHidden**(`«destructured»`): `Promise`\<\`0x$\{string}\`\>
409
+ ▸ **proposalValues**(`«destructured»`): `Promise`\<\{ `proposalValue`: `bigint` ; `randomnessValue`: `bigint` ; `proposal`: `string` }\>
305
410
 
306
- Gets the hidden proposer hash for a specific game turn
411
+ #### Parameters
412
+
413
+ | Name | Type |
414
+ | :------ | :------ |
415
+ | `«destructured»` | `Object` |
416
+ | › `instanceAddress` | \`0x$\{string}\` |
417
+ | › `gameId` | `bigint` |
418
+ | › `proposal` | `string` |
419
+ | › `proposer` | \`0x$\{string}\` |
420
+ | › `turn` | `bigint` |
421
+
422
+ #### Returns
423
+
424
+ `Promise`\<\{ `proposalValue`: `bigint` ; `randomnessValue`: `bigint` ; `proposal`: `string` }\>
425
+
426
+ ___
427
+
428
+ ### encryptProposal
429
+
430
+ ▸ **encryptProposal**(`«destructured»`): `Promise`\<\{ `encryptedProposal`: `string` ; `sharedKey`: \`0x$\{string}\` }\>
431
+
432
+ Encrypts a proposal
433
+
434
+ #### Parameters
435
+
436
+ | Name | Type |
437
+ | :------ | :------ |
438
+ | `«destructured»` | `Object` |
439
+ | › `proposal` | `string` |
440
+ | › `turn` | `bigint` |
441
+ | › `instanceAddress` | \`0x$\{string}\` |
442
+ | › `gameId` | `bigint` |
443
+ | › `proposerPubKey` | \`0x$\{string}\` |
444
+
445
+ #### Returns
446
+
447
+ `Promise`\<\{ `encryptedProposal`: `string` ; `sharedKey`: \`0x$\{string}\` }\>
448
+
449
+ Encrypted proposal and shared key
450
+
451
+ ___
452
+
453
+ ### attestProposal
454
+
455
+ ▸ **attestProposal**(`«destructured»`): `Promise`\<\{ `submissionParams`: [`GmProposalParams`](../interfaces/GmProposalParams.md) = params; `proposal`: `string` ; `proposerAddress`: \`0x$\{string}\` ; `proposalValue`: `bigint` ; `randomnessValue`: `bigint` }\>
456
+
457
+ Attests a proposal
307
458
 
308
459
  #### Parameters
309
460
 
310
461
  | Name | Type |
311
462
  | :------ | :------ |
312
463
  | `«destructured»` | `Object` |
464
+ | › `instanceAddress` | \`0x$\{string}\` |
313
465
  | › `gameId` | `bigint` |
466
+ | › `proposal` | `string` |
467
+ | › `proposerPubKey` | \`0x$\{string}\` |
314
468
  | › `turn` | `bigint` |
315
- | › `proposer` | \`0x$\{string}\` |
316
469
 
317
470
  #### Returns
318
471
 
319
- `Promise`\<\`0x$\{string}\`\>
472
+ `Promise`\<\{ `submissionParams`: [`GmProposalParams`](../interfaces/GmProposalParams.md) = params; `proposal`: `string` ; `proposerAddress`: \`0x$\{string}\` ; `proposalValue`: `bigint` ; `randomnessValue`: `bigint` }\>
320
473
 
321
- Hidden proposer hash
474
+ The attested proposal
322
475
 
323
476
  ___
324
477
 
@@ -334,10 +487,8 @@ Submits a proposal to the game
334
487
  | :------ | :------ |
335
488
  | `«destructured»` | `Object` |
336
489
  | › `instanceAddress` | \`0x$\{string}\` |
337
- | › `gameId` | `bigint` |
338
- | › `commitmentHash` | \`0x$\{string}\` |
339
- | › `proposal` | `string` |
340
- | › `proposer` | \`0x$\{string}\` |
490
+ | › `submissionParams` | [`GmProposalParams`](../interfaces/GmProposalParams.md) |
491
+ | › `proposerSignature` | \`0x$\{string}\` |
341
492
 
342
493
  #### Returns
343
494
 
@@ -349,7 +500,7 @@ ___
349
500
 
350
501
  ### decryptTurnVotes
351
502
 
352
- ▸ **decryptTurnVotes**(`«destructured»`): `Promise`\<\{ `player`: \`0x$\{string}\` = event.args.player; `votes`: `bigint`[] }[]\>
503
+ ▸ **decryptTurnVotes**(`«destructured»`): `Promise`\<\{ `player`: \`0x$\{string}\` = event.args.player; `votes`: `bigint`[] = decryptedVotes }[]\>
353
504
 
354
505
  Decrypts votes for a specific game turn
355
506
 
@@ -364,7 +515,7 @@ Decrypts votes for a specific game turn
364
515
 
365
516
  #### Returns
366
517
 
367
- `Promise`\<\{ `player`: \`0x$\{string}\` = event.args.player; `votes`: `bigint`[] }[]\>
518
+ `Promise`\<\{ `player`: \`0x$\{string}\` = event.args.player; `votes`: `bigint`[] = decryptedVotes }[]\>
368
519
 
369
520
  Array of decrypted votes with player addresses
370
521
 
@@ -372,7 +523,7 @@ ___
372
523
 
373
524
  ### decryptVotes
374
525
 
375
- ▸ **decryptVotes**(`gameId`): `Promise`\<``-1`` \| \{ `player`: \`0x$\{string}\` = event.args.player; `votes`: `bigint`[] }[]\>
526
+ ▸ **decryptVotes**(`gameId`): `Promise`\<``-1`` \| \{ `player`: \`0x$\{string}\` = event.args.player; `votes`: `bigint`[] = decryptedVotes }[]\>
376
527
 
377
528
  Decrypts all votes for the current game turn
378
529
 
@@ -386,7 +537,7 @@ Decrypts all votes for the current game turn
386
537
 
387
538
  #### Returns
388
539
 
389
- `Promise`\<``-1`` \| \{ `player`: \`0x$\{string}\` = event.args.player; `votes`: `bigint`[] }[]\>
540
+ `Promise`\<``-1`` \| \{ `player`: \`0x$\{string}\` = event.args.player; `votes`: `bigint`[] = decryptedVotes }[]\>
390
541
 
391
542
  Array of decrypted votes with player addresses
392
543
 
@@ -477,3 +628,150 @@ Ends the current turn and processes votes
477
628
  `Promise`\<\`0x$\{string}\`\>
478
629
 
479
630
  Transaction hash
631
+
632
+ ___
633
+
634
+ ### gameKey
635
+
636
+ ▸ **gameKey**(`«destructured»`): `Promise`\<\`0x$\{string}\`\>
637
+
638
+ #### Parameters
639
+
640
+ | Name | Type |
641
+ | :------ | :------ |
642
+ | `«destructured»` | `Object` |
643
+ | › `gameId` | `bigint` |
644
+ | › `contractAddress` | \`0x$\{string}\` |
645
+
646
+ #### Returns
647
+
648
+ `Promise`\<\`0x$\{string}\`\>
649
+
650
+ ___
651
+
652
+ ### attestVote
653
+
654
+ ▸ **attestVote**(`params`): `Promise`\<`VoteAttestation`\>
655
+
656
+ Creates and signs a vote for testing purposes
657
+
658
+ #### Parameters
659
+
660
+ | Name | Type | Description |
661
+ | :------ | :------ | :------ |
662
+ | `params` | `Object` | Parameters including voter, game info, and vote configuration |
663
+ | `params.gameId` | `bigint` | - |
664
+ | `params.turn` | `bigint` | - |
665
+ | `params.vote` | `bigint`[] | - |
666
+ | `params.verifierAddress` | \`0x$\{string}\` | - |
667
+ | `params.voter` | \`0x$\{string}\` | - |
668
+
669
+ #### Returns
670
+
671
+ `Promise`\<`VoteAttestation`\>
672
+
673
+ A complete mock vote with signatures
674
+
675
+ ___
676
+
677
+ ### signVote
678
+
679
+ ▸ **signVote**(`params`): `Promise`\<\`0x$\{string}\`\>
680
+
681
+ Signs a vote
682
+
683
+ #### Parameters
684
+
685
+ | Name | Type | Description |
686
+ | :------ | :------ | :------ |
687
+ | `params` | `Object` | Parameters including voter, game info, and vote configuration |
688
+ | `params.verifierAddress` | \`0x$\{string}\` | - |
689
+ | `params.voter` | \`0x$\{string}\` | - |
690
+ | `params.gameId` | `bigint` | - |
691
+ | `params.sealedBallotId` | `string` | - |
692
+ | `params.ballotHash` | `string` | - |
693
+ | `params.name` | `string` | - |
694
+ | `params.version` | `string` | - |
695
+
696
+ #### Returns
697
+
698
+ `Promise`\<\`0x$\{string}\`\>
699
+
700
+ The signed vote
701
+
702
+ ___
703
+
704
+ ### generateEndTurnIntegrity
705
+
706
+ ▸ **generateEndTurnIntegrity**(`params`): `Promise`\<\{ `commitment`: `bigint` = inputs.permutationCommitment; `nullifier`: `bigint` ; `permutation`: `number`[] ; `permutedProposals`: `string`[] ; `a`: readonly [`bigint`, `bigint`] ; `b`: readonly [readonly [`bigint`, `bigint`], readonly [`bigint`, `bigint`]] ; `c`: readonly [`bigint`, `bigint`] }\>
707
+
708
+ Generates integrity data for the end of a game turn
709
+
710
+ #### Parameters
711
+
712
+ | Name | Type | Default value | Description |
713
+ | :------ | :------ | :------ | :------ |
714
+ | `params` | `Object` | `undefined` | Parameters including game info, turn, and proposal data |
715
+ | `params.gameId` | `bigint` | `undefined` | - |
716
+ | `params.turn` | `bigint` | `undefined` | - |
717
+ | `params.verifierAddress` | \`0x$\{string}\` | `undefined` | - |
718
+ | `params.size?` | `number` | `15` | - |
719
+ | `params.proposals` | \{ `proposal`: `string` ; `proposer`: \`0x$\{string}\` }[] | `undefined` | - |
720
+
721
+ #### Returns
722
+
723
+ `Promise`\<\{ `commitment`: `bigint` = inputs.permutationCommitment; `nullifier`: `bigint` ; `permutation`: `number`[] ; `permutedProposals`: `string`[] ; `a`: readonly [`bigint`, `bigint`] ; `b`: readonly [readonly [`bigint`, `bigint`], readonly [`bigint`, `bigint`]] ; `c`: readonly [`bigint`, `bigint`] }\>
724
+
725
+ Integrity data including permutation, secret, and proof
726
+
727
+ ___
728
+
729
+ ### getProposalsIntegrity
730
+
731
+ ▸ **getProposalsIntegrity**(`params`): `Promise`\<`ProposalsIntegrity`\>
732
+
733
+ Gets proposal integrity data for testing
734
+
735
+ #### Parameters
736
+
737
+ | Name | Type | Description |
738
+ | :------ | :------ | :------ |
739
+ | `params` | `Object` | Parameters including game info and proposal data |
740
+ | `params.size` | `number` | - |
741
+ | `params.gameId` | `bigint` | - |
742
+ | `params.turn` | `bigint` | - |
743
+ | `params.verifierAddress` | \`0x$\{string}\` | - |
744
+ | `params.idlers?` | `number`[] | - |
745
+ | `params.proposals` | \{ `proposal`: `string` ; `proposer`: \`0x$\{string}\` }[] | - |
746
+
747
+ #### Returns
748
+
749
+ `Promise`\<`ProposalsIntegrity`\>
750
+
751
+ Proposal integrity information including permutations and proofs
752
+
753
+ ___
754
+
755
+ ### createInputs
756
+
757
+ ▸ **createInputs**(`params`): `Promise`\<`PrivateProposalsIntegrity15Groth16`\>
758
+
759
+ Creates inputs for the proposal integrity circuit
760
+
761
+ #### Parameters
762
+
763
+ | Name | Type | Description |
764
+ | :------ | :------ | :------ |
765
+ | `params` | `Object` | Parameters including number of active proposals, proposals, commitment random numbers, game ID, turn, and verifier address |
766
+ | `params.numActive` | `number` | - |
767
+ | `params.proposals` | `bigint`[] | - |
768
+ | `params.commitmentRandomnesses` | `bigint`[] | - |
769
+ | `params.gameId` | `bigint` | - |
770
+ | `params.turn` | `bigint` | - |
771
+ | `params.verifierAddress` | \`0x$\{string}\` | - |
772
+
773
+ #### Returns
774
+
775
+ `Promise`\<`PrivateProposalsIntegrity15Groth16`\>
776
+
777
+ The inputs for the proposal integrity circuit