@maci-protocol/sdk 0.0.0-ci.a1bedc5 → 0.0.0-ci.a51dc13
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/LICENSE +1 -2
- package/build/package.json +12 -4
- package/build/ts/browser/index.d.ts +1 -1
- package/build/ts/browser/index.d.ts.map +1 -1
- package/build/ts/browser/index.js +5 -1
- package/build/ts/browser/index.js.map +1 -1
- package/build/ts/browser/joinPoll.d.ts +4 -2
- package/build/ts/browser/joinPoll.d.ts.map +1 -1
- package/build/ts/browser/joinPoll.js +21 -17
- package/build/ts/browser/joinPoll.js.map +1 -1
- package/build/ts/browser/utils.d.ts +1 -1
- package/build/ts/browser/utils.d.ts.map +1 -1
- package/build/ts/browser/utils.js +3 -3
- package/build/ts/browser/utils.js.map +1 -1
- package/build/ts/deploy/index.d.ts +2 -2
- package/build/ts/deploy/index.d.ts.map +1 -1
- package/build/ts/deploy/index.js +3 -3
- package/build/ts/deploy/index.js.map +1 -1
- package/build/ts/deploy/maci.js +1 -1
- package/build/ts/deploy/maci.js.map +1 -1
- package/build/ts/deploy/poll.d.ts +1 -1
- package/build/ts/deploy/poll.d.ts.map +1 -1
- package/build/ts/deploy/poll.js +7 -7
- package/build/ts/deploy/poll.js.map +1 -1
- package/build/ts/deploy/types.d.ts +7 -6
- package/build/ts/deploy/types.d.ts.map +1 -1
- package/build/ts/deploy/utils.js +1 -1
- package/build/ts/deploy/utils.js.map +1 -1
- package/build/ts/deploy/verifyingKeysRegistry.d.ts +7 -0
- package/build/ts/deploy/verifyingKeysRegistry.d.ts.map +1 -0
- package/build/ts/deploy/verifyingKeysRegistry.js +14 -0
- package/build/ts/deploy/verifyingKeysRegistry.js.map +1 -0
- package/build/ts/index.d.ts +1 -1
- package/build/ts/index.d.ts.map +1 -1
- package/build/ts/index.js +11 -7
- package/build/ts/index.js.map +1 -1
- package/build/ts/maci/state.d.ts +1 -1
- package/build/ts/maci/state.js +8 -8
- package/build/ts/maci/state.js.map +1 -1
- package/build/ts/maci/types.d.ts +1 -1
- package/build/ts/maciKeys/__tests__/keypair.test.js +3 -3
- package/build/ts/maciKeys/__tests__/keypair.test.js.map +1 -1
- package/build/ts/maciKeys/__tests__/publicKeys.test.js +5 -5
- package/build/ts/maciKeys/__tests__/publicKeys.test.js.map +1 -1
- package/build/ts/maciKeys/publicKeys.js +2 -2
- package/build/ts/maciKeys/publicKeys.js.map +1 -1
- package/build/ts/poll/poll.js +7 -7
- package/build/ts/poll/poll.js.map +1 -1
- package/build/ts/poll/types.d.ts +3 -3
- package/build/ts/poll/types.d.ts.map +1 -1
- package/build/ts/proof/__tests__/download.test.js +5 -2
- package/build/ts/proof/__tests__/download.test.js.map +1 -1
- package/build/ts/proof/download.d.ts +3 -3
- package/build/ts/proof/download.d.ts.map +1 -1
- package/build/ts/proof/download.js +5 -7
- package/build/ts/proof/download.js.map +1 -1
- package/build/ts/proof/generate.d.ts +2 -2
- package/build/ts/proof/generate.d.ts.map +1 -1
- package/build/ts/proof/generate.js +5 -5
- package/build/ts/proof/generate.js.map +1 -1
- package/build/ts/proof/prove.js +10 -10
- package/build/ts/proof/prove.js.map +1 -1
- package/build/ts/proof/types.d.ts +30 -4
- package/build/ts/proof/types.d.ts.map +1 -1
- package/build/ts/proof/utils.d.ts +10 -0
- package/build/ts/proof/utils.d.ts.map +1 -0
- package/build/ts/proof/utils.js +24 -0
- package/build/ts/proof/utils.js.map +1 -0
- package/build/ts/relayer/messages.js +1 -1
- package/build/ts/tally/commitments.d.ts.map +1 -1
- package/build/ts/tally/commitments.js +8 -7
- package/build/ts/tally/commitments.js.map +1 -1
- package/build/ts/tally/index.d.ts +2 -1
- package/build/ts/tally/index.d.ts.map +1 -1
- package/build/ts/tally/index.js +4 -1
- package/build/ts/tally/index.js.map +1 -1
- package/build/ts/tally/results.d.ts +14 -0
- package/build/ts/tally/results.d.ts.map +1 -0
- package/build/ts/tally/results.js +44 -0
- package/build/ts/tally/results.js.map +1 -0
- package/build/ts/tally/types.d.ts +40 -13
- package/build/ts/tally/types.d.ts.map +1 -1
- package/build/ts/tally/utils.d.ts +3 -3
- package/build/ts/tally/utils.d.ts.map +1 -1
- package/build/ts/tally/utils.js +9 -9
- package/build/ts/tally/utils.js.map +1 -1
- package/build/ts/tally/verification.d.ts +1 -1
- package/build/ts/tally/verification.d.ts.map +1 -1
- package/build/ts/tally/verification.js +10 -10
- package/build/ts/tally/verification.js.map +1 -1
- package/build/ts/trees/index.d.ts +2 -2
- package/build/ts/trees/index.d.ts.map +1 -1
- package/build/ts/trees/index.js +2 -1
- package/build/ts/trees/index.js.map +1 -1
- package/build/ts/trees/stateTree.d.ts +15 -1
- package/build/ts/trees/stateTree.d.ts.map +1 -1
- package/build/ts/trees/stateTree.js +61 -13
- package/build/ts/trees/stateTree.js.map +1 -1
- package/build/ts/trees/types.d.ts +10 -1
- package/build/ts/trees/types.d.ts.map +1 -1
- package/build/ts/user/index.d.ts +2 -2
- package/build/ts/user/index.d.ts.map +1 -1
- package/build/ts/user/index.js +5 -1
- package/build/ts/user/index.js.map +1 -1
- package/build/ts/user/joinPoll.js +9 -9
- package/build/ts/user/joinPoll.js.map +1 -1
- package/build/ts/user/signup.js +3 -3
- package/build/ts/user/signup.js.map +1 -1
- package/build/ts/user/types.d.ts +50 -2
- package/build/ts/user/types.d.ts.map +1 -1
- package/build/ts/user/utils.d.ts +23 -11
- package/build/ts/user/utils.d.ts.map +1 -1
- package/build/ts/user/utils.js +72 -43
- package/build/ts/user/utils.js.map +1 -1
- package/build/ts/utils/params.d.ts +1 -1
- package/build/ts/utils/params.d.ts.map +1 -1
- package/build/ts/utils/params.js +3 -3
- package/build/ts/utils/params.js.map +1 -1
- package/build/ts/utils/proofs.d.ts +2 -2
- package/build/ts/utils/proofs.d.ts.map +1 -1
- package/build/ts/utils/proofs.js +4 -4
- package/build/ts/utils/proofs.js.map +1 -1
- package/build/ts/utils/types.d.ts +2 -2
- package/build/ts/utils/types.d.ts.map +1 -1
- package/build/ts/verifyingKeys/checkVerifyingKeys.d.ts +1 -1
- package/build/ts/verifyingKeys/checkVerifyingKeys.d.ts.map +1 -1
- package/build/ts/verifyingKeys/checkVerifyingKeys.js +14 -15
- package/build/ts/verifyingKeys/checkVerifyingKeys.js.map +1 -1
- package/build/ts/verifyingKeys/index.d.ts +2 -2
- package/build/ts/verifyingKeys/index.d.ts.map +1 -1
- package/build/ts/verifyingKeys/index.js +5 -5
- package/build/ts/verifyingKeys/index.js.map +1 -1
- package/build/ts/verifyingKeys/setVerifyingKeys.d.ts +1 -1
- package/build/ts/verifyingKeys/setVerifyingKeys.d.ts.map +1 -1
- package/build/ts/verifyingKeys/setVerifyingKeys.js +39 -40
- package/build/ts/verifyingKeys/setVerifyingKeys.js.map +1 -1
- package/build/ts/verifyingKeys/types.d.ts +37 -37
- package/build/ts/verifyingKeys/types.d.ts.map +1 -1
- package/build/ts/verifyingKeys/utils.d.ts +10 -10
- package/build/ts/verifyingKeys/utils.d.ts.map +1 -1
- package/build/ts/verifyingKeys/utils.js +73 -60
- package/build/ts/verifyingKeys/utils.js.map +1 -1
- package/build/ts/vote/generate.d.ts.map +1 -1
- package/build/ts/vote/generate.js +3 -3
- package/build/ts/vote/generate.js.map +1 -1
- package/build/ts/vote/index.d.ts +1 -1
- package/build/ts/vote/index.d.ts.map +1 -1
- package/build/ts/vote/index.js +2 -2
- package/build/ts/vote/index.js.map +1 -1
- package/build/ts/vote/invalidate.js +1 -1
- package/build/ts/vote/invalidate.js.map +1 -1
- package/build/ts/vote/publish.js +12 -12
- package/build/ts/vote/publish.js.map +1 -1
- package/build/ts/vote/utils.d.ts +1 -1
- package/build/ts/vote/utils.d.ts.map +1 -1
- package/build/ts/vote/utils.js +3 -3
- package/build/ts/vote/utils.js.map +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +18 -10
- package/build/ts/deploy/vkRegistry.d.ts +0 -7
- package/build/ts/deploy/vkRegistry.d.ts.map +0 -1
- package/build/ts/deploy/vkRegistry.js +0 -14
- package/build/ts/deploy/vkRegistry.js.map +0 -1
- package/build/ts/proof/constants.d.ts +0 -17
- package/build/ts/proof/constants.d.ts.map +0 -1
- package/build/ts/proof/constants.js +0 -20
- package/build/ts/proof/constants.js.map +0 -1
package/build/ts/user/utils.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getPollJoiningCircuitEvents = exports.getPollJoiningCircuitInputsFromStateFile = exports.joiningCircuitInputs = exports.getStateIndex = exports.parseSignupEvents = exports.hasUserJoinedPoll = exports.getJoinedUserData = exports.parsePollJoinEvents = void 0;
|
|
6
|
+
exports.getPollJoiningCircuitEvents = exports.generateMaciStateTreeWithEndKey = exports.generateMaciStateTree = exports.getPollJoiningCircuitInputsFromStateFile = exports.joiningCircuitInputs = exports.getStateIndex = exports.parseSignupEvents = exports.hasUserJoinedPoll = exports.getJoinedUserData = exports.parsePollJoinEvents = void 0;
|
|
7
7
|
const typechain_types_1 = require("@maci-protocol/contracts/typechain-types");
|
|
8
8
|
const core_1 = require("@maci-protocol/core");
|
|
9
9
|
const crypto_1 = require("@maci-protocol/crypto");
|
|
@@ -78,7 +78,7 @@ const parseSignupEvents = async ({ maciContract, startBlock, currentBlock, publi
|
|
|
78
78
|
for (let block = startBlock; block <= currentBlock; block += constants_1.BLOCKS_STEP) {
|
|
79
79
|
const toBlock = Math.min(block + constants_1.BLOCKS_STEP - 1, currentBlock);
|
|
80
80
|
// eslint-disable-next-line no-await-in-loop
|
|
81
|
-
const newEvents = await maciContract.queryFilter(maciContract.filters.SignUp(undefined, undefined, publicKey.
|
|
81
|
+
const newEvents = await maciContract.queryFilter(maciContract.filters.SignUp(undefined, undefined, publicKey.raw[0], publicKey.raw[1]), block, toBlock);
|
|
82
82
|
if (newEvents.length > 0) {
|
|
83
83
|
const [event] = newEvents;
|
|
84
84
|
return {
|
|
@@ -93,14 +93,14 @@ const parseSignupEvents = async ({ maciContract, startBlock, currentBlock, publi
|
|
|
93
93
|
exports.parseSignupEvents = parseSignupEvents;
|
|
94
94
|
/**
|
|
95
95
|
* Get state index from maci state leaves or from sign up leaves
|
|
96
|
-
* @param
|
|
97
|
-
* @param
|
|
96
|
+
* @param publicKeys Public keys from maci state or sign up tree
|
|
97
|
+
* @param userMaciPublicKey Public key of the maci user
|
|
98
98
|
* @param stateIndex State index from the command
|
|
99
99
|
* @returns State index
|
|
100
100
|
*/
|
|
101
|
-
const getStateIndex = (
|
|
101
|
+
const getStateIndex = (publicKeys, userMaciPublicKey, stateIndex) => {
|
|
102
102
|
if (!stateIndex) {
|
|
103
|
-
const index =
|
|
103
|
+
const index = publicKeys.findIndex((key) => key.equals(userMaciPublicKey));
|
|
104
104
|
if (index > 0) {
|
|
105
105
|
return BigInt(index);
|
|
106
106
|
}
|
|
@@ -113,18 +113,15 @@ exports.getStateIndex = getStateIndex;
|
|
|
113
113
|
* Create circuit input for pollJoining
|
|
114
114
|
* @param signUpData Sign up tree and state leaves
|
|
115
115
|
* @param stateTreeDepth Maci state tree depth
|
|
116
|
-
* @param
|
|
117
|
-
* @param
|
|
118
|
-
* @param pollPrivKey Poll's private key for the poll joining
|
|
116
|
+
* @param maciPrivateKey User's private key for signing up
|
|
117
|
+
* @param pollPrivateKey Poll's private key for the poll joining
|
|
119
118
|
* @param pollPublicKey Poll's public key for the poll joining
|
|
120
119
|
* @param pollId Poll's id
|
|
121
120
|
* @returns stringified circuit inputs
|
|
122
121
|
*/
|
|
123
|
-
const joiningCircuitInputs = (
|
|
124
|
-
// Get the state leaf on the index position
|
|
125
|
-
const { signUpTree: stateTree } = signUpData;
|
|
122
|
+
const joiningCircuitInputs = (inclusionProof, stateTreeDepth, maciPrivateKey, pollPublicKey, pollId) => {
|
|
126
123
|
// calculate the path elements for the state tree given the original state tree
|
|
127
|
-
const { siblings, index } =
|
|
124
|
+
const { siblings, index, root: stateRoot } = inclusionProof;
|
|
128
125
|
const siblingsLength = siblings.length;
|
|
129
126
|
// The index must be converted to a list of indices, 1 for each tree level.
|
|
130
127
|
// The circuit tree depth is this.stateTreeDepth, so the number of siblings must be this.stateTreeDepth,
|
|
@@ -140,15 +137,13 @@ const joiningCircuitInputs = (signUpData, stateTreeDepth, maciPrivKey, stateLeaf
|
|
|
140
137
|
}
|
|
141
138
|
const siblingsArray = siblings.map((sibling) => [sibling]);
|
|
142
139
|
// Create nullifier from private key
|
|
143
|
-
const inputNullifier = BigInt(
|
|
140
|
+
const inputNullifier = BigInt(maciPrivateKey.asCircuitInputs());
|
|
144
141
|
const nullifier = (0, crypto_1.poseidon)([inputNullifier, pollId]);
|
|
145
|
-
// Get pll state tree's root
|
|
146
|
-
const stateRoot = stateTree.root;
|
|
147
142
|
// Set actualStateTreeDepth as number of initial siblings length
|
|
148
143
|
const actualStateTreeDepth = BigInt(siblingsLength);
|
|
149
144
|
// Calculate public input hash from nullifier, credits and current root
|
|
150
145
|
const circuitInputs = {
|
|
151
|
-
privateKey:
|
|
146
|
+
privateKey: maciPrivateKey.asCircuitInputs(),
|
|
152
147
|
pollPublicKey: pollPublicKey.asCircuitInputs(),
|
|
153
148
|
siblings: siblingsArray,
|
|
154
149
|
indices,
|
|
@@ -165,47 +160,38 @@ exports.joiningCircuitInputs = joiningCircuitInputs;
|
|
|
165
160
|
* @param stateFile - The path to the state file
|
|
166
161
|
* @returns The poll joining circuit inputs
|
|
167
162
|
*/
|
|
168
|
-
const getPollJoiningCircuitInputsFromStateFile = async ({ stateFile, pollId, stateIndex,
|
|
163
|
+
const getPollJoiningCircuitInputsFromStateFile = async ({ stateFile, pollId, stateIndex, userMaciPrivateKey, }) => {
|
|
169
164
|
const file = await fs_1.default.promises.readFile(stateFile);
|
|
170
165
|
const content = JSON.parse(file.toString());
|
|
171
166
|
const maciState = core_1.MaciState.fromJSON(content);
|
|
172
167
|
const poll = maciState.polls.get(pollId);
|
|
173
|
-
const { publicKey:
|
|
174
|
-
const loadedStateIndex = (0, exports.getStateIndex)(maciState.
|
|
168
|
+
const { publicKey: userPublicKey } = new domainobjs_1.Keypair(userMaciPrivateKey);
|
|
169
|
+
const loadedStateIndex = (0, exports.getStateIndex)(maciState.publicKeys, userPublicKey, stateIndex);
|
|
175
170
|
// check < 1 cause index zero is a blank state leaf
|
|
176
171
|
if (loadedStateIndex < 1) {
|
|
177
172
|
throw new Error("Invalid state index");
|
|
178
173
|
}
|
|
179
|
-
poll.updatePoll(BigInt(maciState.
|
|
174
|
+
poll.updatePoll(BigInt(maciState.publicKeys.length));
|
|
180
175
|
const circuitInputs = poll.joiningCircuitInputs({
|
|
181
|
-
maciPrivateKey:
|
|
176
|
+
maciPrivateKey: userMaciPrivateKey,
|
|
182
177
|
stateLeafIndex: stateIndex,
|
|
183
|
-
pollPublicKey:
|
|
178
|
+
pollPublicKey: userPublicKey,
|
|
184
179
|
});
|
|
185
180
|
return circuitInputs;
|
|
186
181
|
};
|
|
187
182
|
exports.getPollJoiningCircuitInputsFromStateFile = getPollJoiningCircuitInputsFromStateFile;
|
|
188
183
|
/**
|
|
189
|
-
*
|
|
190
|
-
* @param
|
|
191
|
-
* @
|
|
192
|
-
* @param signer - The signer
|
|
193
|
-
* @returns The poll joining circuit events
|
|
184
|
+
* Generate MACI's state tree from the MACI contract
|
|
185
|
+
* @param {IGenerateMaciStateTreeArgs} args - The arguments for the generate maci state tree command
|
|
186
|
+
* @returns The MACI's state tree
|
|
194
187
|
*/
|
|
195
|
-
const
|
|
188
|
+
const generateMaciStateTree = async ({ maciContract, signer, startBlock, endBlock, blocksPerBatch, }) => {
|
|
196
189
|
// build an off-chain representation of the MACI contract using data in the contract storage
|
|
197
|
-
const
|
|
198
|
-
maciContract
|
|
199
|
-
|
|
200
|
-
.then((events) => events[0]?.blockNumber ?? 0),
|
|
201
|
-
maciContract
|
|
202
|
-
.queryFilter(maciContract.filters.DeployPoll(), startBlock ?? 0)
|
|
203
|
-
.then((events) => events[0]?.blockNumber ?? 0),
|
|
204
|
-
maciContract.stateTreeDepth(),
|
|
205
|
-
]);
|
|
206
|
-
const defaultStartBlock = Math.min(defaultStartBlockPoll, defaultStartBlockSignup);
|
|
190
|
+
const defaultStartBlock = await maciContract
|
|
191
|
+
.queryFilter(maciContract.filters.SignUp(), startBlock ?? 0)
|
|
192
|
+
.then((events) => events[0]?.blockNumber ?? 0);
|
|
207
193
|
const fromBlock = startBlock ? Number(startBlock) : defaultStartBlock;
|
|
208
|
-
|
|
194
|
+
return (0, stateTree_1.generateSignUpTree)({
|
|
209
195
|
provider: signer.provider,
|
|
210
196
|
address: await maciContract.getAddress(),
|
|
211
197
|
blocksPerRequest: blocksPerBatch || 50,
|
|
@@ -213,12 +199,55 @@ const getPollJoiningCircuitEvents = async ({ maciContract, stateIndex, pollId, u
|
|
|
213
199
|
endBlock,
|
|
214
200
|
sleepAmount: 0,
|
|
215
201
|
});
|
|
216
|
-
|
|
217
|
-
|
|
202
|
+
};
|
|
203
|
+
exports.generateMaciStateTree = generateMaciStateTree;
|
|
204
|
+
/**
|
|
205
|
+
* Generate MACI's state tree from the MACI contract with a given end key
|
|
206
|
+
* @param {IGenerateMaciStateTreeWithEndKeyArgs} args - The arguments for the generate maci state tree command
|
|
207
|
+
* @returns The MACI's state tree
|
|
208
|
+
*/
|
|
209
|
+
const generateMaciStateTreeWithEndKey = async ({ maciContract, signer, startBlock, endBlock, blocksPerBatch, userPublicKey, }) => {
|
|
210
|
+
// build an off-chain representation of the MACI contract using data in the contract storage
|
|
211
|
+
const defaultStartBlock = await maciContract
|
|
212
|
+
.queryFilter(maciContract.filters.SignUp(), startBlock ?? 0)
|
|
213
|
+
.then((events) => events[0]?.blockNumber ?? 0);
|
|
214
|
+
const fromBlock = startBlock ? Number(startBlock) : defaultStartBlock;
|
|
215
|
+
return (0, stateTree_1.generateSignUpTreeWithEndKey)({
|
|
216
|
+
provider: signer.provider,
|
|
217
|
+
address: await maciContract.getAddress(),
|
|
218
|
+
blocksPerRequest: blocksPerBatch || 50,
|
|
219
|
+
fromBlock,
|
|
220
|
+
endBlock,
|
|
221
|
+
userPublicKey,
|
|
222
|
+
});
|
|
223
|
+
};
|
|
224
|
+
exports.generateMaciStateTreeWithEndKey = generateMaciStateTreeWithEndKey;
|
|
225
|
+
/**
|
|
226
|
+
* Get the poll joining circuit events from a state file
|
|
227
|
+
* @param maciContract - The MACI contract
|
|
228
|
+
* @param startBlock - The start block
|
|
229
|
+
* @param signer - The signer
|
|
230
|
+
* @returns The poll joining circuit events
|
|
231
|
+
*/
|
|
232
|
+
const getPollJoiningCircuitEvents = async ({ maciContract, stateIndex, pollId, userMaciPrivateKey, signer, startBlock, endBlock, blocksPerBatch, }) => {
|
|
233
|
+
const stateTreeDepth = await maciContract.stateTreeDepth();
|
|
234
|
+
const signUpData = await (0, exports.generateMaciStateTree)({
|
|
235
|
+
maciContract,
|
|
236
|
+
signer,
|
|
237
|
+
startBlock,
|
|
238
|
+
endBlock,
|
|
239
|
+
blocksPerBatch,
|
|
240
|
+
});
|
|
241
|
+
const { publicKey: userPublicKey } = new domainobjs_1.Keypair(userMaciPrivateKey);
|
|
242
|
+
const loadedStateIndex = (0, exports.getStateIndex)(signUpData.publicKeys, userPublicKey, stateIndex);
|
|
218
243
|
if (loadedStateIndex < 1) {
|
|
219
244
|
throw new Error("Invalid state index");
|
|
220
245
|
}
|
|
221
|
-
|
|
246
|
+
// Get the state leaf on the index position
|
|
247
|
+
const { signUpTree: stateTree } = signUpData;
|
|
248
|
+
// calculate the path elements for the state tree given the original state tree
|
|
249
|
+
const inclusionProof = stateTree.generateProof(Number(loadedStateIndex));
|
|
250
|
+
return (0, exports.joiningCircuitInputs)(inclusionProof, stateTreeDepth, userMaciPrivateKey, userPublicKey, pollId);
|
|
222
251
|
};
|
|
223
252
|
exports.getPollJoiningCircuitEvents = getPollJoiningCircuitEvents;
|
|
224
253
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../ts/user/utils.ts"],"names":[],"mappings":";;;;;;AAAA,8EAAsH;AACtH,8CAAgE;AAChE,kDAAmE;AACnE,0DAA2E;AAE3E,4CAAoB;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../ts/user/utils.ts"],"names":[],"mappings":";;;;;;AAAA,8EAAsH;AACtH,8CAAgE;AAChE,kDAAmE;AACnE,0DAA2E;AAE3E,4CAAoB;AAgBpB,kDAAsF;AACtF,kDAAiD;AAEjD;;GAEG;AACI,MAAM,mBAAmB,GAAG,KAAK,EAAE,EACxC,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,aAAa,GACY,EAGxB,EAAE;IACH,KAAK,IAAI,KAAK,GAAG,UAAU,EAAE,KAAK,IAAI,YAAY,EAAE,KAAK,IAAI,uBAAW,EAAE,CAAC;QACzE,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,uBAAW,GAAG,CAAC,EAAE,YAAY,CAAC,CAAC;QAChE,MAAM,SAAS,GAAG,aAAa,CAAC,OAAO,EAAE,CAAC;QAC1C,4CAA4C;QAC5C,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,WAAW,CAC9C,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,EAC5F,KAAK,EACL,OAAO,CACR,CAAC;QAEF,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACzB,MAAM,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;YAE1B,OAAO;gBACL,cAAc,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;gBACxC,YAAY,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAA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CAAC;IAEzF,IAAI,gBAAiB,GAAG,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;IAED,2CAA2C;IAC3C,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC;IAE7C,+EAA+E;IAC/E,MAAM,cAAc,GAAG,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEzE,OAAO,IAAA,4BAAoB,EACzB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,MAAM,CACsB,CAAC;AACjC,CAAC,CAAC;AAxCW,QAAA,2BAA2B,+BAwCtC"}
|
|
@@ -3,5 +3,5 @@ import type { ICircuitParams } from "./types";
|
|
|
3
3
|
* Validate the circuit parameters
|
|
4
4
|
* @param params - The circuit parameters
|
|
5
5
|
*/
|
|
6
|
-
export declare const validateParams: ({ stateTreeDepth,
|
|
6
|
+
export declare const validateParams: ({ stateTreeDepth, tallyProcessingStateTreeDepth, voteOptionTreeDepth, messageBatchSize, }: ICircuitParams) => boolean;
|
|
7
7
|
//# sourceMappingURL=params.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../../../ts/utils/params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI
|
|
1
|
+
{"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../../../ts/utils/params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,2FAK5B,cAAc,KAAG,OAWnB,CAAC"}
|
package/build/ts/utils/params.js
CHANGED
|
@@ -5,12 +5,12 @@ exports.validateParams = void 0;
|
|
|
5
5
|
* Validate the circuit parameters
|
|
6
6
|
* @param params - The circuit parameters
|
|
7
7
|
*/
|
|
8
|
-
const validateParams = ({ stateTreeDepth,
|
|
8
|
+
const validateParams = ({ stateTreeDepth, tallyProcessingStateTreeDepth, voteOptionTreeDepth, messageBatchSize, }) => {
|
|
9
9
|
// validate args
|
|
10
|
-
if (stateTreeDepth < 1 ||
|
|
10
|
+
if (stateTreeDepth < 1 || tallyProcessingStateTreeDepth < 1 || voteOptionTreeDepth < 1 || messageBatchSize < 1) {
|
|
11
11
|
throw new Error("Invalid depth or batch size parameters");
|
|
12
12
|
}
|
|
13
|
-
if (stateTreeDepth <
|
|
13
|
+
if (stateTreeDepth < tallyProcessingStateTreeDepth) {
|
|
14
14
|
throw new Error("Invalid state tree depth or intermediate state tree depth");
|
|
15
15
|
}
|
|
16
16
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"params.js","sourceRoot":"","sources":["../../../ts/utils/params.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACI,MAAM,cAAc,GAAG,CAAC,EAC7B,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"params.js","sourceRoot":"","sources":["../../../ts/utils/params.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACI,MAAM,cAAc,GAAG,CAAC,EAC7B,cAAc,EACd,6BAA6B,EAC7B,mBAAmB,EACnB,gBAAgB,GACD,EAAW,EAAE;IAC5B,gBAAgB;IAChB,IAAI,cAAc,GAAG,CAAC,IAAI,6BAA6B,GAAG,CAAC,IAAI,mBAAmB,GAAG,CAAC,IAAI,gBAAgB,GAAG,CAAC,EAAE,CAAC;QAC/G,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC5D,CAAC;IAED,IAAI,cAAc,GAAG,6BAA6B,EAAE,CAAC;QACnD,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;IAC/E,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAhBW,QAAA,cAAc,kBAgBzB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TCircuitInputs } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* Generate and verify poll proof
|
|
4
4
|
* @param inputs - the inputs to the circuit
|
|
@@ -9,5 +9,5 @@ import type { CircuitInputs } from "./types";
|
|
|
9
9
|
* @param wasmPath - the path to the wasm witness
|
|
10
10
|
* @returns proof - an array of strings
|
|
11
11
|
*/
|
|
12
|
-
export declare const generateAndVerifyProof: (inputs:
|
|
12
|
+
export declare const generateAndVerifyProof: (inputs: TCircuitInputs, zkeyPath: string, useWasm: boolean | undefined, rapidsnarkExePath: string | undefined, witnessExePath: string | undefined, wasmPath: string | undefined) => Promise<string[]>;
|
|
13
13
|
//# sourceMappingURL=proofs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proofs.d.ts","sourceRoot":"","sources":["../../../ts/utils/proofs.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"proofs.d.ts","sourceRoot":"","sources":["../../../ts/utils/proofs.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,GACjC,QAAQ,cAAc,EACtB,UAAU,MAAM,EAChB,SAAS,OAAO,GAAG,SAAS,EAC5B,mBAAmB,MAAM,GAAG,SAAS,EACrC,gBAAgB,MAAM,GAAG,SAAS,EAClC,UAAU,MAAM,GAAG,SAAS,KAC3B,OAAO,CAAC,MAAM,EAAE,CA4BlB,CAAC"}
|
package/build/ts/utils/proofs.js
CHANGED
|
@@ -14,16 +14,16 @@ const contracts_1 = require("@maci-protocol/contracts");
|
|
|
14
14
|
*/
|
|
15
15
|
const generateAndVerifyProof = async (inputs, zkeyPath, useWasm, rapidsnarkExePath, witnessExePath, wasmPath) => {
|
|
16
16
|
let r;
|
|
17
|
-
const
|
|
17
|
+
const verifyingKey = await (0, contracts_1.extractVerifyingKey)(zkeyPath);
|
|
18
18
|
if (useWasm === true || useWasm === undefined) {
|
|
19
|
-
r = await (0, contracts_1.
|
|
19
|
+
r = await (0, contracts_1.generateProofSnarkjs)({
|
|
20
20
|
inputs,
|
|
21
21
|
zkeyPath,
|
|
22
22
|
wasmPath,
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
else {
|
|
26
|
-
r = await (0, contracts_1.
|
|
26
|
+
r = await (0, contracts_1.generateProofRapidSnark)({
|
|
27
27
|
inputs,
|
|
28
28
|
zkeyPath,
|
|
29
29
|
rapidsnarkExePath,
|
|
@@ -31,7 +31,7 @@ const generateAndVerifyProof = async (inputs, zkeyPath, useWasm, rapidsnarkExePa
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
// verify it
|
|
34
|
-
const isValid = await (0, contracts_1.verifyProof)(r.publicSignals, r.proof,
|
|
34
|
+
const isValid = await (0, contracts_1.verifyProof)(r.publicSignals, r.proof, verifyingKey);
|
|
35
35
|
if (!isValid) {
|
|
36
36
|
throw new Error("Generated an invalid proof");
|
|
37
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proofs.js","sourceRoot":"","sources":["../../../ts/utils/proofs.ts"],"names":[],"mappings":";;;AAAA,wDAOkC;AAIlC;;;;;;;;;GASG;AACI,MAAM,sBAAsB,GAAG,KAAK,EACzC,
|
|
1
|
+
{"version":3,"file":"proofs.js","sourceRoot":"","sources":["../../../ts/utils/proofs.ts"],"names":[],"mappings":";;;AAAA,wDAOkC;AAIlC;;;;;;;;;GASG;AACI,MAAM,sBAAsB,GAAG,KAAK,EACzC,MAAsB,EACtB,QAAgB,EAChB,OAA4B,EAC5B,iBAAqC,EACrC,cAAkC,EAClC,QAA4B,EACT,EAAE;IACrB,IAAI,CAAkB,CAAC;IAEvB,MAAM,YAAY,GAAG,MAAM,IAAA,+BAAmB,EAAC,QAAQ,CAAC,CAAC;IAEzD,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC9C,CAAC,GAAG,MAAM,IAAA,gCAAoB,EAAC;YAC7B,MAAM;YACN,QAAQ;YACR,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,CAAC,GAAG,MAAM,IAAA,mCAAuB,EAAC;YAChC,MAAM;YACN,QAAQ;YACR,iBAAiB;YACjB,cAAc;SACf,CAAC,CAAC;IACL,CAAC;IAED,YAAY;IACZ,MAAM,OAAO,GAAG,MAAM,IAAA,uBAAW,EAAC,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;IAE1E,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAChD,CAAC;IAED,OAAO,IAAA,0CAA8B,EAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACjD,CAAC,CAAC;AAnCW,QAAA,sBAAsB,0BAmCjC"}
|
|
@@ -2,7 +2,7 @@ import type { BigNumberish, Signer } from "ethers";
|
|
|
2
2
|
/**
|
|
3
3
|
* A circuit inputs for the circom circuit
|
|
4
4
|
*/
|
|
5
|
-
export type
|
|
5
|
+
export type TCircuitInputs = Record<string, string | bigint | bigint[] | bigint[][] | string[] | bigint[][][]>;
|
|
6
6
|
/**
|
|
7
7
|
* Circuit parameters
|
|
8
8
|
*/
|
|
@@ -14,7 +14,7 @@ export interface ICircuitParams {
|
|
|
14
14
|
/**
|
|
15
15
|
* The intermediate state tree depth (ballot tree)
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
tallyProcessingStateTreeDepth: number;
|
|
18
18
|
/**
|
|
19
19
|
* The vote option tree depth
|
|
20
20
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../ts/utils/types.ts"],"names":[],"mappings":"AAAA,OA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E,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -6,5 +6,5 @@ import type { ICheckVerifyingKeysArgs } from "./types";
|
|
|
6
6
|
* @param CheckVerifyingKeysArgs - The arguments for the checkVerifyingKeys command
|
|
7
7
|
* @returns Whether the verifying keys match or not
|
|
8
8
|
*/
|
|
9
|
-
export declare const checkVerifyingKeys: ({ stateTreeDepth,
|
|
9
|
+
export declare const checkVerifyingKeys: ({ stateTreeDepth, tallyProcessingStateTreeDepth, voteOptionTreeDepth, messageBatchSize, processMessagesZkeyPath, tallyVotesZkeyPath, pollJoiningZkeyPath, pollJoinedZkeyPath, verifyingKeysRegistry, signer, mode, }: ICheckVerifyingKeysArgs) => Promise<boolean>;
|
|
10
10
|
//# sourceMappingURL=checkVerifyingKeys.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkVerifyingKeys.d.ts","sourceRoot":"","sources":["../../../ts/verifyingKeys/checkVerifyingKeys.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAMvD;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAU,
|
|
1
|
+
{"version":3,"file":"checkVerifyingKeys.d.ts","sourceRoot":"","sources":["../../../ts/verifyingKeys/checkVerifyingKeys.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAMvD;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAU,sNAYtC,uBAAuB,KAAG,OAAO,CAAC,OAAO,CAiE3C,CAAC"}
|
|
@@ -15,13 +15,13 @@ const utils_2 = require("./utils");
|
|
|
15
15
|
* @param CheckVerifyingKeysArgs - The arguments for the checkVerifyingKeys command
|
|
16
16
|
* @returns Whether the verifying keys match or not
|
|
17
17
|
*/
|
|
18
|
-
const checkVerifyingKeys = async ({ stateTreeDepth,
|
|
19
|
-
if (!
|
|
20
|
-
throw new Error("Please provide a
|
|
18
|
+
const checkVerifyingKeys = async ({ stateTreeDepth, tallyProcessingStateTreeDepth, voteOptionTreeDepth, messageBatchSize, processMessagesZkeyPath, tallyVotesZkeyPath, pollJoiningZkeyPath, pollJoinedZkeyPath, verifyingKeysRegistry, signer, mode = contracts_1.EMode.QV, }) => {
|
|
19
|
+
if (!verifyingKeysRegistry) {
|
|
20
|
+
throw new Error("Please provide a VerifyingKeysRegistry contract address");
|
|
21
21
|
}
|
|
22
|
-
const
|
|
23
|
-
if (!
|
|
24
|
-
throw new Error("The
|
|
22
|
+
const isVerifyingKeyExists = await (0, utils_1.contractExists)(signer.provider, verifyingKeysRegistry);
|
|
23
|
+
if (!isVerifyingKeyExists) {
|
|
24
|
+
throw new Error("The VerifyingKeysRegistry contract does not exist");
|
|
25
25
|
}
|
|
26
26
|
// we need to ensure that the zkey files exist
|
|
27
27
|
const isProcessMessagesZkeyPathExists = fs_1.default.existsSync(processMessagesZkeyPath);
|
|
@@ -33,32 +33,31 @@ const checkVerifyingKeys = async ({ stateTreeDepth, intStateTreeDepth, voteOptio
|
|
|
33
33
|
throw new Error("The provided Tally votes zkey does not exist");
|
|
34
34
|
}
|
|
35
35
|
// extract the verification keys from the zkey files
|
|
36
|
-
const {
|
|
36
|
+
const { pollJoiningVerifyingKey, pollJoinedVerifyingKey, processVerifyingKey, tallyVerifyingKey } = await (0, utils_2.extractAllVerifyingKeys)({
|
|
37
37
|
processMessagesZkeyPath,
|
|
38
38
|
tallyVotesZkeyPath,
|
|
39
39
|
pollJoiningZkeyPath,
|
|
40
40
|
pollJoinedZkeyPath,
|
|
41
41
|
});
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
vkRegistryAddress: vkRegistry,
|
|
42
|
+
const { pollJoiningVerifyingKeyOnChain, pollJoinedVerifyingKeyOnChain, processVerifyingKeyOnChain, tallyVerifyingKeyOnChain, } = await (0, utils_2.getAllOnChainVerifyingKeys)({
|
|
43
|
+
verifyingKeysRegistryAddress: verifyingKeysRegistry,
|
|
45
44
|
signer,
|
|
46
45
|
stateTreeDepth,
|
|
47
46
|
voteOptionTreeDepth,
|
|
48
47
|
messageBatchSize,
|
|
49
|
-
|
|
48
|
+
tallyProcessingStateTreeDepth,
|
|
50
49
|
mode,
|
|
51
50
|
});
|
|
52
|
-
if (!(0, utils_2.
|
|
51
|
+
if (!(0, utils_2.compareVerifyingKeys)(pollJoiningVerifyingKeyOnChain, pollJoiningVerifyingKey)) {
|
|
53
52
|
throw new Error("Poll verifying keys do not match");
|
|
54
53
|
}
|
|
55
|
-
if (!(0, utils_2.
|
|
54
|
+
if (!(0, utils_2.compareVerifyingKeys)(pollJoinedVerifyingKeyOnChain, pollJoinedVerifyingKey)) {
|
|
56
55
|
throw new Error("Poll verifying keys do not match");
|
|
57
56
|
}
|
|
58
|
-
if (!(0, utils_2.
|
|
57
|
+
if (!(0, utils_2.compareVerifyingKeys)(processVerifyingKeyOnChain, processVerifyingKey)) {
|
|
59
58
|
throw new Error("Process verifying keys do not match");
|
|
60
59
|
}
|
|
61
|
-
if (!(0, utils_2.
|
|
60
|
+
if (!(0, utils_2.compareVerifyingKeys)(tallyVerifyingKeyOnChain, tallyVerifyingKey)) {
|
|
62
61
|
throw new Error("Tally verifying keys do not match");
|
|
63
62
|
}
|
|
64
63
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkVerifyingKeys.js","sourceRoot":"","sources":["../../../ts/verifyingKeys/checkVerifyingKeys.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAiD;AAEjD,4CAAoB;AAIpB,oCAA0C;AAE1C,
|
|
1
|
+
{"version":3,"file":"checkVerifyingKeys.js","sourceRoot":"","sources":["../../../ts/verifyingKeys/checkVerifyingKeys.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAiD;AAEjD,4CAAoB;AAIpB,oCAA0C;AAE1C,mCAAo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4BAA4B,EAAE,qBAAqB;QACnD,MAAM;QACN,cAAc;QACd,mBAAmB;QACnB,gBAAgB;QAChB,6BAA6B;QAC7B,IAAI;KACL,CAAC,CAAC;IAEH,IAAI,CAAC,IAAA,4BAAoB,EAAC,8BAA8B,EAAE,uBAAuB,CAAC,EAAE,CAAC;QACnF,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACtD,CAAC;IAED,IAAI,CAAC,IAAA,4BAAoB,EAAC,6BAA6B,EAAE,sBAAsB,CAAC,EAAE,CAAC;QACjF,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACtD,CAAC;IAED,IAAI,CAAC,IAAA,4BAAoB,EAAC,0BAA0B,EAAE,mBAAmB,CAAC,EAAE,CAAC;QAC3E,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACzD,CAAC;IAED,IAAI,CAAC,IAAA,4BAAoB,EAAC,wBAAwB,EAAE,iBAAiB,CAAC,EAAE,CAAC;QACvE,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACvD,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AA7EW,QAAA,kBAAkB,sBA6E7B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { checkVerifyingKeys } from "./checkVerifyingKeys";
|
|
2
2
|
export { setVerifyingKeys } from "./setVerifyingKeys";
|
|
3
|
-
export {
|
|
4
|
-
export type {
|
|
3
|
+
export { getAllOnChainVerifyingKeys, compareVerifyingKeys, extractAllVerifyingKeys, extractVerifyingKeyToFile, } from "./utils";
|
|
4
|
+
export type { IGetAllVerifyingKeysArgs, IMaciVerifyingKeysOnchain, IExtractAllVerifyingKeysArgs, IMaciVerifyingKeys, ISetVerifyingKeysArgs, ICheckVerifyingKeysArgs, } from "./types";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../ts/verifyingKeys/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../ts/verifyingKeys/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,wBAAwB,EACxB,yBAAyB,EACzB,4BAA4B,EAC5B,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,SAAS,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.extractVerifyingKeyToFile = exports.extractAllVerifyingKeys = exports.compareVerifyingKeys = exports.getAllOnChainVerifyingKeys = exports.setVerifyingKeys = exports.checkVerifyingKeys = void 0;
|
|
4
4
|
var checkVerifyingKeys_1 = require("./checkVerifyingKeys");
|
|
5
5
|
Object.defineProperty(exports, "checkVerifyingKeys", { enumerable: true, get: function () { return checkVerifyingKeys_1.checkVerifyingKeys; } });
|
|
6
6
|
var setVerifyingKeys_1 = require("./setVerifyingKeys");
|
|
7
7
|
Object.defineProperty(exports, "setVerifyingKeys", { enumerable: true, get: function () { return setVerifyingKeys_1.setVerifyingKeys; } });
|
|
8
8
|
var utils_1 = require("./utils");
|
|
9
|
-
Object.defineProperty(exports, "
|
|
10
|
-
Object.defineProperty(exports, "
|
|
11
|
-
Object.defineProperty(exports, "
|
|
12
|
-
Object.defineProperty(exports, "
|
|
9
|
+
Object.defineProperty(exports, "getAllOnChainVerifyingKeys", { enumerable: true, get: function () { return utils_1.getAllOnChainVerifyingKeys; } });
|
|
10
|
+
Object.defineProperty(exports, "compareVerifyingKeys", { enumerable: true, get: function () { return utils_1.compareVerifyingKeys; } });
|
|
11
|
+
Object.defineProperty(exports, "extractAllVerifyingKeys", { enumerable: true, get: function () { return utils_1.extractAllVerifyingKeys; } });
|
|
12
|
+
Object.defineProperty(exports, "extractVerifyingKeyToFile", { enumerable: true, get: function () { return utils_1.extractVerifyingKeyToFile; } });
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../ts/verifyingKeys/index.ts"],"names":[],"mappings":";;;AAAA,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../ts/verifyingKeys/index.ts"],"names":[],"mappings":";;;AAAA,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,iCAKiB;AAJf,mHAAA,0BAA0B,OAAA;AAC1B,6GAAA,oBAAoB,OAAA;AACpB,gHAAA,uBAAuB,OAAA;AACvB,kHAAA,yBAAyB,OAAA"}
|
|
@@ -3,5 +3,5 @@ import type { ISetVerifyingKeysArgs } from "./types";
|
|
|
3
3
|
* Set the verifying keys on the contract
|
|
4
4
|
* @param args - The arguments for the setVerifyingKeys function
|
|
5
5
|
*/
|
|
6
|
-
export declare const setVerifyingKeys: ({
|
|
6
|
+
export declare const setVerifyingKeys: ({ pollJoiningVerifyingKey, pollJoinedVerifyingKey, processMessagesVerifyingKey, tallyVotesVerifyingKey, stateTreeDepth, pollStateTreeDepth, tallyProcessingStateTreeDepth, voteOptionTreeDepth, messageBatchSize, verifyingKeysRegistryAddress, signer, mode, }: ISetVerifyingKeysArgs) => Promise<void>;
|
|
7
7
|
//# sourceMappingURL=setVerifyingKeys.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setVerifyingKeys.d.ts","sourceRoot":"","sources":["../../../ts/verifyingKeys/setVerifyingKeys.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"setVerifyingKeys.d.ts","sourceRoot":"","sources":["../../../ts/verifyingKeys/setVerifyingKeys.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAMrD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAU,iQAapC,qBAAqB,KAAG,OAAO,CAAC,IAAI,CA2GtC,CAAC"}
|