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AAS,mBAAoB,CAAE,YAAY,EAAM,IAAK,WAAc,OAAO,WAAW,gBAAkB,IAC9H,OAAO,eAAe,QAAS,SAAU,CAAE,YAAY,EAAM,IAAK,WAAc,OAAO,WAAW,MAAQ,IAC1G,OAAO,eAAe,QAAS,mBAAoB,CAAE,YAAY,EAAM,IAAK,WAAc,OAAO,WAAW,gBAAkB,IAC9H,OAAO,eAAe,QAAS,aAAc,CAAE,YAAY,EAAM,IAAK,WAAc,OAAO,WAAW,UAAY,IAClH,OAAO,eAAe,QAAS,SAAU,CAAE,YAAY,EAAM,IAAK,WAAc,OAAO,WAAW,MAAQ","file":"/npm/maci-cli@2.5.0/build/ts/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/maci-cli@2.5.0/build/ts/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","#!/usr/bin/env node\n\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n    if (mod && mod.__esModule) return mod;\n    var result = {};\n    if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n    __setModuleDefault(result, mod);\n    return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.verify = exports.timeTravel = exports.isRegisteredUser = exports.signup = exports.setVerifyingKeys = exports.proveOnChain = exports.publishBatch = exports.publish = exports.mergeSignups = exports.mergeMessages = exports.genProofs = exports.genMaciPubKey = exports.genKeyPair = exports.genLocalState = exports.fundWallet = exports.deployVkRegistryContract = exports.getPoll = exports.deployPoll = exports.deploy = exports.checkVerifyingKeys = void 0;\nconst extra_typings_1 = require(\"@commander-js/extra-typings\");\nconst fs_1 = __importDefault(require(\"fs\"));\nconst path_1 = __importDefault(require(\"path\"));\nrequire(\"./cliInit\");\nconst commands_1 = require(\"./commands\");\nconst utils_1 = require(\"./utils\");\n// set the description version and name of the cli tool\nconst { description, version, name } = JSON.parse(fs_1.default.readFileSync(path_1.default.resolve(__dirname, \"..\", \"package.json\"), \"utf8\"));\nconst program = new extra_typings_1.Command();\nprogram.name(name).description(description).version(version);\nconst getSigner = async () => Promise.resolve().then(() => __importStar(require(\"maci-contracts\"))).then((m) => m.getDefaultSigner());\n// add the commands\nprogram\n    .command(\"create\")\n    .description(\"deploy the contracts\")\n    .option(\"-i, --initialVoiceCredits <initialVoiceCredits>\", \"the initial voice credits\", parseInt)\n    .option(\"-p, --initialVoiceCreditsProxyAddress <initialVoiceCreditsProxyAddress>\", \"the initial voice credits proxy contract address\")\n    .option(\"-ph3, --poseidonT3Address <poseidonT3Address>\", \"PoseidonT3 contract address\")\n    .option(\"-ph4, --poseidonT4Address <poseidonT4Address>\", \"PoseidonT4 contract address\")\n    .option(\"-ph5, --poseidonT5Address <poseidonT5Address>\", \"PoseidonT5 contract address\")\n    .option(\"-ph6, --poseidonT6Address <poseidonT6Address>\", \"PoseidonT6 contract address\")\n    .option(\"-g, --signupGatekeeperAddress <signupGatekeeperAddress>\", \"the signup gatekeeper contract address\")\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .option(\"-r, --rpc-provider <provider>\", \"the rpc provider URL\")\n    .requiredOption(\"-s, --stateTreeDepth <stateTreeDepth>\", \"the state tree depth\", parseInt)\n    .action(async (cmdOptions) => {\n    try {\n        const signer = await getSigner();\n        await (0, commands_1.deploy)({\n            stateTreeDepth: cmdOptions.stateTreeDepth,\n            initialVoiceCredits: cmdOptions.initialVoiceCredits,\n            initialVoiceCreditsProxyAddress: cmdOptions.initialVoiceCreditsProxyAddress,\n            signupGatekeeperAddress: cmdOptions.signupGatekeeperAddress,\n            poseidonT3Address: cmdOptions.poseidonT3Address,\n            poseidonT4Address: cmdOptions.poseidonT4Address,\n            poseidonT5Address: cmdOptions.poseidonT5Address,\n            poseidonT6Address: cmdOptions.poseidonT6Address,\n            quiet: cmdOptions.quiet,\n            signer,\n        });\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nprogram\n    .command(\"checkVerifyingKeys\")\n    .description(\"check that the verifying keys in the contract match the local ones\")\n    .option(\"-uq, --use-quadratic-voting <useQuadraticVoting>\", \"whether to use quadratic voting\", (value) => value === \"true\", true)\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .option(\"-r, --rpc-provider <provider>\", \"the rpc provider URL\")\n    .option(\"-vk, --vk-contract <vkContract>\", \"the VkRegistry contract address\")\n    .requiredOption(\"-s, --state-tree-depth <stateTreeDepth>\", \"the state tree depth\", parseInt)\n    .requiredOption(\"-i, --int-state-tree-depth <intStateTreeDepth>\", \"the intermediate state tree depth\", parseInt)\n    .requiredOption(\"-m, --msg-tree-depth <messageTreeDepth>\", \"the message tree depth\", parseInt)\n    .requiredOption(\"-v, --vote-option-tree-depth <voteOptionTreeDepth>\", \"the vote option tree depth\", parseInt)\n    .requiredOption(\"-b, --msg-batch-depth <messageBatchDepth>\", \"the message batch depth\", parseInt)\n    .requiredOption(\"-p, --process-messages-zkey <processMessagesZkeyPath>\", \"the process messages zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)\")\n    .requiredOption(\"-t, --tally-votes-zkey <tallyVotesZkeyPath>\", \"the tally votes zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)\")\n    .action(async (cmdOptions) => {\n    try {\n        const signer = await getSigner();\n        await (0, commands_1.checkVerifyingKeys)({\n            stateTreeDepth: cmdOptions.stateTreeDepth,\n            intStateTreeDepth: cmdOptions.intStateTreeDepth,\n            messageTreeDepth: cmdOptions.msgTreeDepth,\n            voteOptionTreeDepth: cmdOptions.voteOptionTreeDepth,\n            messageBatchDepth: cmdOptions.msgBatchDepth,\n            processMessagesZkeyPath: cmdOptions.processMessagesZkey,\n            tallyVotesZkeyPath: cmdOptions.tallyVotesZkey,\n            vkRegistry: cmdOptions.vkContract,\n            quiet: cmdOptions.quiet,\n            useQuadraticVoting: cmdOptions.useQuadraticVoting,\n            signer,\n        });\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nprogram\n    .command(\"genMaciPubKey\")\n    .description(\"generate a new MACI public key\")\n    .requiredOption(\"-sk, --privkey <privkey>\", \"the private key\")\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .option(\"-r, --rpc-provider <provider>\", \"the rpc provider URL\")\n    .action((cmdObj) => {\n    (0, commands_1.genMaciPubKey)(cmdObj.privkey, cmdObj.quiet);\n});\nprogram\n    .command(\"genMaciKeyPair\")\n    .description(\"generate a new MACI key pair\")\n    .option(\"-sp, --seed <seed>\", \"seed value for keypair\", (value) => (value ? BigInt(value) : undefined), undefined)\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .option(\"-r, --rpc-provider <provider>\", \"the rpc provider URL\")\n    .action((cmdObj) => {\n    (0, commands_1.genKeyPair)({ seed: cmdObj.seed, quiet: cmdObj.quiet });\n});\nprogram\n    .command(\"deployVkRegistry\")\n    .description(\"deploy a new verification key registry contract\")\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .option(\"-r, --rpc-provider <provider>\", \"the rpc provider URL\")\n    .action(async (cmdObj) => {\n    try {\n        const signer = await getSigner();\n        await (0, commands_1.deployVkRegistryContract)({ quiet: cmdObj.quiet, signer });\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nprogram\n    .command(\"show\")\n    .description(\"show the deployed contract addresses\")\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .option(\"-r, --rpc-provider <provider>\", \"the rpc provider URL\")\n    .action((cmdObj) => {\n    try {\n        (0, commands_1.showContracts)(cmdObj.quiet);\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nprogram\n    .command(\"deployPoll\")\n    .description(\"deploy a new poll\")\n    .option(\"-vk, --vkRegistryAddress <vkRegistryAddress>\", \"the vk registry contract address\")\n    .requiredOption(\"-t, --duration <pollDuration>\", \"the poll duration\", parseInt)\n    .requiredOption(\"-i, --int-state-tree-depth <intStateTreeDepth>\", \"the int state tree depth\", parseInt)\n    .requiredOption(\"-b, --msg-batch-depth <messageTreeSubDepth>\", \"the message tree sub depth\", parseInt)\n    .requiredOption(\"-m, --msg-tree-depth <messageTreeDepth>\", \"the message tree depth\", parseInt)\n    .requiredOption(\"-v, --vote-option-tree-depth <voteOptionTreeDepth>\", \"the vote option tree depth\", parseInt)\n    .requiredOption(\"-pk, --pubkey <coordinatorPubkey>\", \"the coordinator public key\")\n    .option(\"-uq, --use-quadratic-voting <useQuadraticVoting>\", \"whether to use quadratic voting\", (value) => value === \"true\", true)\n    .option(\"-x, --maci-address <maciAddress>\", \"the MACI contract address\")\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .option(\"-r, --rpc-provider <provider>\", \"the rpc provider URL\")\n    .action(async (cmdObj) => {\n    try {\n        const signer = await getSigner();\n        await (0, commands_1.deployPoll)({\n            pollDuration: cmdObj.duration,\n            intStateTreeDepth: cmdObj.intStateTreeDepth,\n            messageTreeSubDepth: cmdObj.msgBatchDepth,\n            messageTreeDepth: cmdObj.msgTreeDepth,\n            voteOptionTreeDepth: cmdObj.voteOptionTreeDepth,\n            coordinatorPubkey: cmdObj.pubkey,\n            maciAddress: cmdObj.maciAddress,\n            vkRegistryAddress: cmdObj.vkRegistryAddress,\n            quiet: cmdObj.quiet,\n            useQuadraticVoting: cmdObj.useQuadraticVoting,\n            signer,\n        });\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nprogram\n    .command(\"setVerifyingKeys\")\n    .description(\"set the verifying keys\")\n    .requiredOption(\"-s, --state-tree-depth <stateTreeDepth>\", \"the state tree depth\", parseInt)\n    .requiredOption(\"-i, --int-state-tree-depth <intStateTreeDepth>\", \"the intermediate state tree depth\", parseInt)\n    .requiredOption(\"-m, --msg-tree-depth <messageTreeDepth>\", \"the message tree depth\", parseInt)\n    .requiredOption(\"-v, --vote-option-tree-depth <voteOptionTreeDepth>\", \"the vote option tree depth\", parseInt)\n    .requiredOption(\"-b, --msg-batch-depth <messageBatchDepth>\", \"the message batch depth\", parseInt)\n    .option(\"-pqv, --process-messages-zkey-qv <processMessagesZkeyPathQv>\", \"the process messages qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)\")\n    .option(\"-tqv, --tally-votes-zkey-qv <tallyVotesZkeyPathQv>\", \"the tally votes qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)\")\n    .option(\"-pnqv, --process-messages-zkey-non-qv <processMessagesZkeyPathNonQv>\", \"the process messages non-qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)\")\n    .option(\"-tnqv, --tally-votes-zkey-non-qv <tallyVotesZkeyPathNonQv>\", \"the tally votes non-qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)\")\n    .option(\"-uq, --use-quadratic-voting <useQuadraticVoting>\", \"whether to use quadratic voting\", (value) => value === \"true\", true)\n    .option(\"-k, --vk-registry <vkRegistry>\", \"the vk registry contract address\")\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .option(\"-r, --rpc-provider <provider>\", \"the rpc provider URL\")\n    .action(async (cmdObj) => {\n    try {\n        const signer = await getSigner();\n        await (0, commands_1.setVerifyingKeys)({\n            stateTreeDepth: cmdObj.stateTreeDepth,\n            intStateTreeDepth: cmdObj.intStateTreeDepth,\n            messageTreeDepth: cmdObj.msgTreeDepth,\n            voteOptionTreeDepth: cmdObj.voteOptionTreeDepth,\n            messageBatchDepth: cmdObj.msgBatchDepth,\n            processMessagesZkeyPathQv: cmdObj.processMessagesZkeyQv,\n            tallyVotesZkeyPathQv: cmdObj.tallyVotesZkeyQv,\n            processMessagesZkeyPathNonQv: cmdObj.processMessagesZkeyNonQv,\n            tallyVotesZkeyPathNonQv: cmdObj.tallyVotesZkeyNonQv,\n            vkRegistry: cmdObj.vkRegistry,\n            quiet: cmdObj.quiet,\n            useQuadraticVoting: cmdObj.useQuadraticVoting,\n            signer,\n        });\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nprogram\n    .command(\"publish\")\n    .description(\"publish a new message to a MACI Poll contract\")\n    .requiredOption(\"-p, --pubkey <pubkey>\", \"the MACI public key which should replace the user's public key in the state tree\")\n    .option(\"-x, --maci-address <maciAddress>\", \"the MACI contract address\")\n    .option(\"-sk, --privkey <privkey>\", \"your serialized MACI private key\")\n    .requiredOption(\"-i, --state-index <stateIndex>\", \"the user's state index\", BigInt)\n    .requiredOption(\"-v, --vote-option-index <voteOptionIndex>\", \"the vote option index\", BigInt)\n    .requiredOption(\"-n, --nonce <nonce>\", \"the message nonce\", BigInt)\n    .option(\"-s, --salt <salt>\", \"the message salt\", BigInt)\n    .requiredOption(\"-o, --poll-id <pollId>\", \"the poll id\", BigInt)\n    .requiredOption(\"-w, --new-vote-weight <newVoteWeight>\", \"the new vote weight\", BigInt)\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .option(\"-r, --rpc-provider <provider>\", \"the rpc provider URL\")\n    .action(async (cmdObj) => {\n    try {\n        const signer = await getSigner();\n        const network = await signer.provider?.getNetwork();\n        const maciAddress = cmdObj.maciAddress || (await (0, utils_1.readContractAddress)(\"MACI\", network?.name));\n        const privateKey = cmdObj.privkey || (await (0, utils_1.promptSensitiveValue)(\"Insert your MACI private key\"));\n        await (0, commands_1.publish)({\n            pubkey: cmdObj.pubkey,\n            stateIndex: cmdObj.stateIndex,\n            voteOptionIndex: cmdObj.voteOptionIndex,\n            nonce: cmdObj.nonce,\n            pollId: cmdObj.pollId,\n            newVoteWeight: cmdObj.newVoteWeight,\n            maciAddress,\n            salt: cmdObj.salt,\n            privateKey,\n            quiet: cmdObj.quiet,\n            signer,\n        });\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nprogram\n    .command(\"mergeMessages\")\n    .description(\"merge the message accumulator queue\")\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .option(\"-r, --rpc-provider <provider>\", \"the rpc provider URL\")\n    .option(\"-x, --maci-address <maciAddress>\", \"the MACI contract address\")\n    .requiredOption(\"-o, --poll-id <pollId>\", \"the poll id\", BigInt)\n    .option(\"-n, --num-queue-ops <numQueueOps>\", \"the number of queue operations\", parseInt)\n    .action(async (cmdObj) => {\n    try {\n        const signer = await getSigner();\n        await (0, commands_1.mergeMessages)({\n            pollId: cmdObj.pollId,\n            maciAddress: cmdObj.maciAddress,\n            numQueueOps: cmdObj.numQueueOps?.toString(),\n            quiet: cmdObj.quiet,\n            signer,\n        });\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nprogram\n    .command(\"mergeSignups\")\n    .description(\"merge the signups accumulator queue\")\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .option(\"-r, --rpc-provider <provider>\", \"the rpc provider URL\")\n    .option(\"-x, --maci-address <maciAddress>\", \"the MACI contract address\")\n    .requiredOption(\"-o, --poll-id <pollId>\", \"the poll id\", BigInt)\n    .option(\"-n, --num-queue-ops <numQueueOps>\", \"the number of queue operations\", parseInt)\n    .action(async (cmdObj) => {\n    try {\n        const signer = await getSigner();\n        await (0, commands_1.mergeSignups)({\n            pollId: cmdObj.pollId,\n            maciAddress: cmdObj.maciAddress,\n            numQueueOps: cmdObj.numQueueOps?.toString(),\n            quiet: cmdObj.quiet,\n            signer,\n        });\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nprogram\n    .command(\"timeTravel\")\n    .description(\"fast-forward the time (only works for local hardhat testing\")\n    .requiredOption(\"-s, --seconds <seconds>\", \"the number of seconds to fast-forward\", parseInt)\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .option(\"-r, --rpc-provider <provider>\", \"the rpc provider URL\")\n    .action(async (cmdObj) => {\n    try {\n        const signer = await getSigner();\n        await (0, commands_1.timeTravel)({ seconds: cmdObj.seconds, quiet: cmdObj.quiet, signer });\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nprogram\n    .command(\"extractVkToFile\")\n    .description(\"extract vkey to json file\")\n    .requiredOption(\"-pqv, --process-messages-zkey-qv <processMessagesZkeyPathQv>\", \"the process messages qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)\")\n    .requiredOption(\"-tqv, --tally-votes-zkey-qv <tallyVotesZkeyPathQv>\", \"the tally votes qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)\")\n    .requiredOption(\"-pnqv, --process-messages-zkey-non-qv <processMessagesZkeyPathNonQv>\", \"the process messages non-qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)\")\n    .requiredOption(\"-tnqv, --tally-votes-zkey-non-qv <tallyVotesZkeyPathNonQv>\", \"the tally votes non-qv zkey path (see different options for zkey files to use specific circuits https://maci.pse.dev/docs/trusted-setup, https://maci.pse.dev/docs/testing/#pre-compiled-artifacts-for-testing)\")\n    .requiredOption(\"-o, --output-file <outputFile>\", \"the output file path of extracted vkeys\")\n    .action(async (cmdObj) => {\n    try {\n        await (0, commands_1.extractVkToFile)({\n            processMessagesZkeyPathQv: cmdObj.processMessagesZkeyQv,\n            tallyVotesZkeyPathQv: cmdObj.tallyVotesZkeyQv,\n            processMessagesZkeyPathNonQv: cmdObj.processMessagesZkeyNonQv,\n            tallyVotesZkeyPathNonQv: cmdObj.tallyVotesZkeyNonQv,\n            outputFilePath: cmdObj.outputFile,\n        });\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nprogram\n    .command(\"signup\")\n    .description(\"Sign up to a MACI contract\")\n    .requiredOption(\"-p, --pubkey <maciPubKey>\", \"the MACI public key\")\n    .option(\"-x, --maci-address <maciAddress>\", \"the MACI contract address\")\n    .option(\"-s, --sg-data <sgData>\", \"the signup gateway data\")\n    .option(\"-i, --ivcp-data <ivcpData>\", \"the initial voice credit proxy data\")\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .option(\"-r, --rpc-provider <provider>\", \"the rpc provider URL\")\n    .action(async (cmdObj) => {\n    try {\n        const signer = await getSigner();\n        const network = await signer.provider?.getNetwork();\n        const maciAddress = cmdObj.maciAddress || (await (0, utils_1.readContractAddress)(\"MACI\", network?.name));\n        await (0, commands_1.signup)({\n            maciPubKey: cmdObj.pubkey,\n            maciAddress,\n            sgDataArg: cmdObj.sgData,\n            ivcpDataArg: cmdObj.ivcpData,\n            quiet: cmdObj.quiet,\n            signer,\n        });\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nprogram\n    .command(\"isRegisteredUser\")\n    .description(\"Checks if user is registered with public key\")\n    .requiredOption(\"-p, --pubkey <maciPubKey>\", \"the MACI public key\")\n    .option(\"-x, --maci-address <maciAddress>\", \"the MACI contract address\")\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .action(async (cmdObj) => {\n    try {\n        const signer = await getSigner();\n        const network = await signer.provider?.getNetwork();\n        const maciAddress = cmdObj.maciAddress || (await (0, utils_1.readContractAddress)(\"MACI\", network?.name));\n        await (0, commands_1.isRegisteredUser)({\n            maciPubKey: cmdObj.pubkey,\n            maciAddress,\n            signer,\n            quiet: cmdObj.quiet,\n        });\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nprogram\n    .command(\"getPoll\")\n    .description(\"Get deployed poll from MACI contract\")\n    .option(\"-p, --poll <poll>\", \"the poll id\")\n    .option(\"-x, --maci-address <maciAddress>\", \"the MACI contract address\")\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .action(async (cmdObj) => {\n    try {\n        const signer = await getSigner();\n        const network = await signer.provider?.getNetwork();\n        const maciAddress = cmdObj.maciAddress || (await (0, utils_1.readContractAddress)(\"MACI\", network?.name));\n        await (0, commands_1.getPoll)({\n            pollId: cmdObj.poll,\n            maciAddress,\n            signer,\n            quiet: cmdObj.quiet,\n        });\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nprogram\n    .command(\"fundWallet\")\n    .description(\"Fund a wallet with Ether\")\n    .requiredOption(\"-a, --amount <amount>\", \"the amount of Ether\", parseInt)\n    .requiredOption(\"-w, --address <address>\", \"the address to fund\")\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .option(\"-r, --rpc-provider <provider>\", \"the rpc provider URL\")\n    .action(async (cmdObj) => {\n    try {\n        const signer = await getSigner();\n        await (0, commands_1.fundWallet)({ amount: cmdObj.amount, address: cmdObj.address, quiet: cmdObj.quiet, signer });\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nprogram\n    .command(\"verify\")\n    .description(\"verify the results of a poll\")\n    .requiredOption(\"-o, --poll-id <pollId>\", \"the poll id\", BigInt)\n    .requiredOption(\"-t, --tally-file <tallyFile>\", \"the tally file with results, per vote option spent credits, spent voice credits total\")\n    .option(\"-x, --maci-address <maciAddress>\", \"the MACI contract address\")\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .option(\"-r, --rpc-provider <provider>\", \"the rpc provider URL\")\n    .action(async (cmdObj) => {\n    try {\n        const signer = await getSigner();\n        const network = await signer.provider?.getNetwork();\n        // read the tally file\n        const isTallyFileExists = fs_1.default.existsSync(cmdObj.tallyFile);\n        if (!cmdObj.tallyFile || !isTallyFileExists) {\n            (0, utils_1.logError)(`Unable to open ${cmdObj.tallyFile}`);\n        }\n        const tallyData = JSON.parse(await fs_1.default.promises.readFile(cmdObj.tallyFile, { encoding: \"utf8\" }));\n        const maciAddress = tallyData.maci || cmdObj.maciAddress || (await (0, utils_1.readContractAddress)(\"MACI\", network?.name));\n        await (0, commands_1.verify)({\n            tallyData,\n            pollId: cmdObj.pollId,\n            maciAddress,\n            quiet: cmdObj.quiet,\n            signer,\n        });\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nprogram\n    .command(\"genProofs\")\n    .description(\"generate the proofs for a poll\")\n    .option(\"-sk, --privkey <privkey>\", \"your serialized MACI private key\")\n    .option(\"-x, --maci-address <maciAddress>\", \"the MACI contract address\")\n    .requiredOption(\"-o, --poll-id <pollId>\", \"the poll id\", BigInt)\n    .requiredOption(\"-t, --tally-file <tallyFile>\", \"the tally file with results, per vote option spent credits, spent voice credits total\")\n    .option(\"-r, --rapidsnark <rapidsnark>\", \"the path to the rapidsnark binary\")\n    .option(\"-wp, --process-witnessgen <processWitnessgen>\", \"the path to the process witness generation binary\")\n    .option(\"-pd, --process-witnessdat <processWitnessdat>\", \"the path to the process witness dat file\")\n    .option(\"-wt, --tally-witnessgen <tallyWitnessgen>\", \"the path to the tally witness generation binary\")\n    .option(\"-td, --tally-witnessdat <tallyWitnessdat>\", \"the path to the tally witness dat file\")\n    .requiredOption(\"-zp, --process-zkey <processZkey>\", \"the path to the process zkey\")\n    .requiredOption(\"-zt, --tally-zkey <tallyZkey>\", \"the path to the tally zkey\")\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .option(\"-p, --rpc-provider <provider>\", \"the rpc provider URL\")\n    .requiredOption(\"-f, --output <outputDir>\", \"the output directory for proofs\")\n    .option(\"-tx, --transaction-hash <transactionHash>\", \"transaction hash of MACI contract creation\")\n    .option(\"-w, --wasm\", \"whether to use the wasm binaries\")\n    .option(\"-pw, --process-wasm <processWasm>\", \"the path to the process witness generation wasm binary\")\n    .option(\"-tw, --tally-wasm <tallyWasm>\", \"the path to the tally witness generation wasm binary\")\n    .option(\"-st, --state-file <stateFile>\", \"the path to the state file containing the serialized maci state\")\n    .option(\"-sb, --start-block <startBlock>\", \"the block number to start looking for events from\", parseInt)\n    .option(\"-eb, --end-block <endBlock>\", \"the block number to end looking for events from\", parseInt)\n    .option(\"-bb, --blocks-per-batch <blockPerBatch>\", \"the number of blocks to process per batch\", parseInt)\n    .option(\"-uq, --use-quadratic-voting <useQuadraticVoting>\", \"whether to use quadratic voting\", (value) => value === \"true\", true)\n    .action(async (cmdObj) => {\n    try {\n        const signer = await getSigner();\n        await (0, commands_1.genProofs)({\n            outputDir: cmdObj.output,\n            tallyFile: cmdObj.tallyFile,\n            tallyZkey: cmdObj.tallyZkey,\n            processZkey: cmdObj.processZkey,\n            pollId: cmdObj.pollId,\n            rapidsnark: cmdObj.rapidsnark,\n            processWitgen: cmdObj.processWitnessgen,\n            processDatFile: cmdObj.processWitnessdat,\n            tallyWitgen: cmdObj.tallyWitnessgen,\n            tallyDatFile: cmdObj.tallyWitnessdat,\n            coordinatorPrivKey: cmdObj.privkey,\n            maciAddress: cmdObj.maciAddress,\n            transactionHash: cmdObj.transactionHash,\n            processWasm: cmdObj.processWasm,\n            tallyWasm: cmdObj.tallyWasm,\n            useWasm: cmdObj.wasm,\n            stateFile: cmdObj.stateFile,\n            startBlock: cmdObj.startBlock,\n            endBlock: cmdObj.endBlock,\n            blocksPerBatch: cmdObj.blocksPerBatch,\n            useQuadraticVoting: cmdObj.useQuadraticVoting,\n            quiet: cmdObj.quiet,\n            signer,\n        });\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nprogram\n    .command(\"genLocalState\")\n    .description(\"generate a local MACI state from the smart contracts events\")\n    .requiredOption(\"-o, --output <outputPath>\", \"the path where to write the state\")\n    .requiredOption(\"-p, --poll-id <pollId>\", \"the id of the poll\", BigInt)\n    .option(\"-x, --maci-address <maciAddress>\", \"the MACI contract address\")\n    .option(\"-sk, --privkey <privkey>\", \"your serialized MACI private key\")\n    .option(\"-eb, --end-block <endBlock>\", \"the end block number\", parseInt)\n    .option(\"-sb, --start-block <startBlock>\", \"the start block number\", parseInt)\n    .option(\"-bb, --blocks-per-batch <blockPerBatch>\", \"the blocks per batch\", parseInt)\n    .option(\"-tx, --transaction-hash <transactionHash>\", \"the transaction hash\")\n    .option(\"-s, --sleep <sleep>\", \"the sleep time between batches\", parseInt)\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .option(\"-r, --rpc-provider <provider>\", \"the rpc provider URL\")\n    .action(async (cmdObj) => {\n    try {\n        const signer = await getSigner();\n        await (0, commands_1.genLocalState)({\n            outputPath: cmdObj.output.toString(),\n            pollId: cmdObj.pollId,\n            maciAddress: cmdObj.maciAddress,\n            coordinatorPrivateKey: cmdObj.privkey,\n            ethereumProvider: cmdObj.rpcProvider,\n            endBlock: cmdObj.endBlock,\n            startBlock: cmdObj.startBlock,\n            blockPerBatch: cmdObj.blocksPerBatch,\n            transactionHash: cmdObj.transactionHash,\n            sleep: cmdObj.sleep,\n            quiet: cmdObj.quiet,\n            signer,\n        });\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nprogram\n    .command(\"proveOnChain\")\n    .description(\"prove the results of a poll on chain\")\n    .requiredOption(\"-o, --poll-id <pollId>\", \"the poll id\", BigInt)\n    .option(\"-t, --tally-file <tallyFile>\", \"the tally file with results, per vote option spent credits, spent voice credits total\")\n    .option(\"-q, --quiet <quiet>\", \"whether to print values to the console\", (value) => value === \"true\", false)\n    .option(\"-r, --rpc-provider <provider>\", \"the rpc provider URL\")\n    .option(\"-x, --maci-address <maciAddress>\", \"the MACI contract address\")\n    .requiredOption(\"-f, --proof-dir <proofDir>\", \"the proof output directory from the genProofs subcommand\")\n    .action(async (cmdObj) => {\n    try {\n        const signer = await getSigner();\n        await (0, commands_1.proveOnChain)({\n            pollId: cmdObj.pollId,\n            tallyFile: cmdObj.tallyFile,\n            proofDir: cmdObj.proofDir,\n            maciAddress: cmdObj.maciAddress,\n            quiet: cmdObj.quiet,\n            signer,\n        });\n    }\n    catch (error) {\n        program.error(error.message, { exitCode: 1 });\n    }\n});\nif (require.main === module) {\n    program.parseAsync(process.argv);\n}\n// export everything so we can use in other packages\nvar commands_2 = require(\"./commands\");\nObject.defineProperty(exports, \"checkVerifyingKeys\", { enumerable: true, get: function () { return commands_2.checkVerifyingKeys; } });\nObject.defineProperty(exports, \"deploy\", { enumerable: true, get: function () { return commands_2.deploy; } });\nObject.defineProperty(exports, \"deployPoll\", { enumerable: true, get: function () { return commands_2.deployPoll; } });\nObject.defineProperty(exports, \"getPoll\", { enumerable: true, get: function () { return commands_2.getPoll; } });\nObject.defineProperty(exports, \"deployVkRegistryContract\", { enumerable: true, get: function () { return commands_2.deployVkRegistryContract; } });\nObject.defineProperty(exports, \"fundWallet\", { enumerable: true, get: function () { return commands_2.fundWallet; } });\nObject.defineProperty(exports, \"genLocalState\", { enumerable: true, get: function () { return commands_2.genLocalState; } });\nObject.defineProperty(exports, \"genKeyPair\", { enumerable: true, get: function () { return commands_2.genKeyPair; } });\nObject.defineProperty(exports, \"genMaciPubKey\", { enumerable: true, get: function () { return commands_2.genMaciPubKey; } });\nObject.defineProperty(exports, \"genProofs\", { enumerable: true, get: function () { return commands_2.genProofs; } });\nObject.defineProperty(exports, \"mergeMessages\", { enumerable: true, get: function () { return commands_2.mergeMessages; } });\nObject.defineProperty(exports, \"mergeSignups\", { enumerable: true, get: function () { return commands_2.mergeSignups; } });\nObject.defineProperty(exports, \"publish\", { enumerable: true, get: function () { return commands_2.publish; } });\nObject.defineProperty(exports, \"publishBatch\", { enumerable: true, get: function () { return commands_2.publishBatch; } });\nObject.defineProperty(exports, \"proveOnChain\", { enumerable: true, get: function () { return commands_2.proveOnChain; } });\nObject.defineProperty(exports, \"setVerifyingKeys\", { enumerable: true, get: function () { return commands_2.setVerifyingKeys; } });\nObject.defineProperty(exports, \"signup\", { enumerable: true, get: function () { return commands_2.signup; } });\nObject.defineProperty(exports, \"isRegisteredUser\", { enumerable: true, get: function () { return commands_2.isRegisteredUser; } });\nObject.defineProperty(exports, \"timeTravel\", { enumerable: true, get: function () { return commands_2.timeTravel; } });\nObject.defineProperty(exports, \"verify\", { enumerable: true, get: function () { return commands_2.verify; } });\n"]}