@maci-protocol/website 0.0.0-ci.26f28d6
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/.eslintrc.js +157 -0
- package/CHANGELOG.md +566 -0
- package/LICENSE +22 -0
- package/README.md +58 -0
- package/babel.config.js +3 -0
- package/blog/2021-10-12-maci-v1.md +100 -0
- package/blog/2022-09-22-maci-v1-technical-introduction.md +180 -0
- package/blog/2023-01-18-maci-v1.1.1.md +121 -0
- package/blog/2024-01-18-roadmap.md +106 -0
- package/blog/2024-02-28-maci-v1.2.0.md +121 -0
- package/blog/2024-04-10-roadmap-q2.md +96 -0
- package/blog/2024-05-08-ethdam.md +169 -0
- package/blog/2024-05-22-the-origins-of-maci.md +38 -0
- package/blog/2024-05-28-upcoming-grants.md +85 -0
- package/blog/2024-06-17-understanding-maci.md +63 -0
- package/blog/2024-06-21-deciphering-maci.md +48 -0
- package/blog/2024-06-28-revolusioning-public-goods-funding.md +32 -0
- package/blog/2024-07-23-q2-review.md +72 -0
- package/blog/2024-07-30-roadmap-q3.md +61 -0
- package/blog/2024-08-10-maci-v2.md +102 -0
- package/blog/2024-08-29-anonymous-poll-joining.md +47 -0
- package/blog/2024-10-29-q3-review.md +63 -0
- package/blog/2024-11-20-maci-platform.md +93 -0
- package/blog/2024-12-01-maci-getting-started.md +294 -0
- package/blog/2025-03-21-roadmap-2025.md +112 -0
- package/blog/assets/MACI_Bob_SignUp_1.png +0 -0
- package/blog/assets/MACI_Bob_SignUp_2.png +0 -0
- package/blog/assets/MACI_Complex_Message.png +0 -0
- package/blog/assets/MACI_Contracts.png +0 -0
- package/blog/assets/MACI_Sign_Up.png +0 -0
- package/blog/assets/MACI_Simple_Message.png +0 -0
- package/blog/assets/MACI_Verifier_1.png +0 -0
- package/blog/authors.yml +5 -0
- package/docusaurus.config.ts +213 -0
- package/package.json +65 -0
- package/src/components/ActionCard/index.tsx +30 -0
- package/src/components/ActionCard/styles.module.css +96 -0
- package/src/components/HomepageFeatures/index.tsx +91 -0
- package/src/components/HomepageFeatures/styles.module.css +17 -0
- package/src/components/ProjectCard/index.tsx +74 -0
- package/src/components/ProjectCard/styles.module.css +77 -0
- package/src/components/ProjectList/index.tsx +218 -0
- package/src/components/ProjectList/styles.module.css +180 -0
- package/src/content/projects.json +294 -0
- package/src/css/card.module.css +130 -0
- package/src/css/custom.css +91 -0
- package/src/icons/IconDiscord.tsx +16 -0
- package/src/icons/IconGithub.tsx +16 -0
- package/src/icons/IconWebsite.tsx +16 -0
- package/src/pages/blogs.tsx +58 -0
- package/src/pages/index.module.css +152 -0
- package/src/pages/index.tsx +66 -0
- package/src/pages/projects.tsx +44 -0
- package/src/pages/roadmap.md +150 -0
- package/src/pages/typedoc.tsx +11 -0
- package/src/plugins/blog-plugin/index.ts +86 -0
- package/src/react-app-env.d.ts +1 -0
- package/src/scripts/setupSolidityDocs.ts +67 -0
- package/src/scripts/setupTypedoc.ts +112 -0
- package/src/scripts/utils.ts +115 -0
- package/src/utils/getProjectsByFilter.ts +40 -0
- package/static/.nojekyll +0 -0
- package/static/audit_reports/20210922_Hashcloak_audit_report.pdf +0 -0
- package/static/audit_reports/202220930_Hashcloak_audit_report.pdf +0 -0
- package/static/audit_reports/20240223_PSE_Audit_audit_report.pdf +0 -0
- package/static/audit_reports/20240731_PSE_Audit_audit_report.pdf +0 -0
- package/static/fonts/DM_Sans.woff2 +0 -0
- package/static/fonts/Share_Tech_Mono.woff2 +0 -0
- package/static/img/box.png +0 -0
- package/static/img/box_dark.png +0 -0
- package/static/img/chain.png +0 -0
- package/static/img/chain_dark.png +0 -0
- package/static/img/chart.png +0 -0
- package/static/img/chart_dark.png +0 -0
- package/static/img/circuits/MACI-Circuits.excalidraw +39652 -0
- package/static/img/circuits/calculateTotal.svg +21 -0
- package/static/img/circuits/ecdh.svg +21 -0
- package/static/img/circuits/messageToCommand.svg +21 -0
- package/static/img/circuits/messageValidator.svg +21 -0
- package/static/img/circuits/poseidonHasher13.svg +21 -0
- package/static/img/circuits/privToPubkey.svg +21 -0
- package/static/img/circuits/processMessages.svg +21 -0
- package/static/img/circuits/processMessagesInputHasher.svg +21 -0
- package/static/img/circuits/processMessages_2_0.svg +21 -0
- package/static/img/circuits/processOne.svg +21 -0
- package/static/img/circuits/processTopup.svg +21 -0
- package/static/img/circuits/processingAfterPollEnds.svg +21 -0
- package/static/img/circuits/quinBatchLeavesExists.svg +21 -0
- package/static/img/circuits/quinCheckRoot.svg +21 -0
- package/static/img/circuits/quinGeneratePathIndices.svg +21 -0
- package/static/img/circuits/quinSelector.svg +21 -0
- package/static/img/circuits/resultsCommitmentVerifier.svg +21 -0
- package/static/img/circuits/splicer.svg +21 -0
- package/static/img/circuits/tallyInputHasher.svg +21 -0
- package/static/img/circuits/tallyVotes.svg +21 -0
- package/static/img/circuits/unpackElement.svg +21 -0
- package/static/img/circuits/verifySignature.svg +21 -0
- package/static/img/completingAPoll.svg +4 -0
- package/static/img/contracts.svg +16 -0
- package/static/img/coordinatorComponents.svg +21 -0
- package/static/img/favicon.ico +0 -0
- package/static/img/generateProofs.svg +4 -0
- package/static/img/hero.svg +9 -0
- package/static/img/maci-card.png +0 -0
- package/static/img/maci-rpgf-design.jpg +0 -0
- package/static/img/messageProcessingLocal.svg +21 -0
- package/static/img/offlineProcessing.svg +21 -0
- package/static/img/pse-logo-round.png +0 -0
- package/static/img/tallyCommitments.svg +4 -0
- package/static/img/voteTallyingLocal.svg +21 -0
- package/tsconfig.json +34 -0
- package/versioned_docs/version-v0.x/circuits.md +22 -0
- package/versioned_docs/version-v0.x/contract.md +186 -0
- package/versioned_docs/version-v0.x/faq.md +67 -0
- package/versioned_docs/version-v0.x/introduction.md +119 -0
- package/versioned_docs/version-v0.x/quadratic-vote-tallying-circuit.md +138 -0
- package/versioned_docs/version-v0.x/state-root-transition-circuit.md +230 -0
- package/versioned_docs/version-v1.2/audit.md +160 -0
- package/versioned_docs/version-v1.2/ci-pipeline.md +38 -0
- package/versioned_docs/version-v1.2/circuits.md +508 -0
- package/versioned_docs/version-v1.2/cli.md +689 -0
- package/versioned_docs/version-v1.2/contracts.md +445 -0
- package/versioned_docs/version-v1.2/contributing/code-of-conduct.md +91 -0
- package/versioned_docs/version-v1.2/contributing/contributing.md +129 -0
- package/versioned_docs/version-v1.2/coordinator-processing.md +46 -0
- package/versioned_docs/version-v1.2/deployment.md +122 -0
- package/versioned_docs/version-v1.2/installation.md +175 -0
- package/versioned_docs/version-v1.2/integrating.md +200 -0
- package/versioned_docs/version-v1.2/introduction.md +94 -0
- package/versioned_docs/version-v1.2/key-change.md +182 -0
- package/versioned_docs/version-v1.2/overview.md +47 -0
- package/versioned_docs/version-v1.2/poll-types.md +68 -0
- package/versioned_docs/version-v1.2/primitives.md +216 -0
- package/versioned_docs/version-v1.2/project-ideas.md +14 -0
- package/versioned_docs/version-v1.2/purpose.md +62 -0
- package/versioned_docs/version-v1.2/solidity-docs/MACI.md +345 -0
- package/versioned_docs/version-v1.2/solidity-docs/MessageProcessor.md +266 -0
- package/versioned_docs/version-v1.2/solidity-docs/MessageProcessorFactory.md +26 -0
- package/versioned_docs/version-v1.2/solidity-docs/Poll.md +381 -0
- package/versioned_docs/version-v1.2/solidity-docs/PollFactory.md +50 -0
- package/versioned_docs/version-v1.2/solidity-docs/SignUpToken.md +27 -0
- package/versioned_docs/version-v1.2/solidity-docs/Subsidy.md +218 -0
- package/versioned_docs/version-v1.2/solidity-docs/SubsidyFactory.md +27 -0
- package/versioned_docs/version-v1.2/solidity-docs/Tally.md +311 -0
- package/versioned_docs/version-v1.2/solidity-docs/TallyFactory.md +27 -0
- package/versioned_docs/version-v1.2/solidity-docs/TallyNonQv.md +296 -0
- package/versioned_docs/version-v1.2/solidity-docs/TallyNonQvFactory.md +27 -0
- package/versioned_docs/version-v1.2/solidity-docs/TopupCredit.md +61 -0
- package/versioned_docs/version-v1.2/solidity-docs/VkRegistry.md +457 -0
- package/versioned_docs/version-v1.2/solidity-docs/benchmarks/HasherBenchmarks.md +44 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/Hasher.md +125 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/IVerifier.md +11 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/MockVerifier.md +17 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/Pairing.md +85 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT3.md +9 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT4.md +9 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT5.md +9 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/PoseidonT6.md +9 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/SnarkCommon.md +16 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/SnarkConstants.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/crypto/Verifier.md +61 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/EASGatekeeper.md +121 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/FreeForAllSignUpGatekeeper.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/SignUpGatekeeper.md +26 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/SignUpTokenGatekeeper.md +93 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperBase.md +79 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperMultiple.md +48 -0
- package/versioned_docs/version-v1.2/solidity-docs/gatekeepers/hatsGatekeepers/HatsGatekeeperSingle.md +42 -0
- package/versioned_docs/version-v1.2/solidity-docs/index.md +4 -0
- package/versioned_docs/version-v1.2/solidity-docs/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/initialVoiceCreditProxy/InitialVoiceCreditProxy.md +26 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IEAS.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IHats.md +103 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IMPFactory.md +26 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IMessageProcessor.md +31 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IPoll.md +217 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IPollFactory.md +29 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/ITallyFactory.md +28 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/ITallySubsidyFactory.md +27 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IVerifier.md +25 -0
- package/versioned_docs/version-v1.2/solidity-docs/interfaces/IVkRegistry.md +70 -0
- package/versioned_docs/version-v1.2/solidity-docs/mocks/MockHatsProtocol.md +133 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueue.md +464 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueBinary.md +60 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueBinary0.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueBinaryMaci.md +34 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinary.md +75 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinary0.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinaryBlankSl.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/AccQueueQuinaryMaci.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/trees/EmptyBallotRoots.md +13 -0
- package/versioned_docs/version-v1.2/solidity-docs/utilities/CommonUtilities.md +25 -0
- package/versioned_docs/version-v1.2/solidity-docs/utilities/DomainObjs.md +40 -0
- package/versioned_docs/version-v1.2/solidity-docs/utilities/Params.md +36 -0
- package/versioned_docs/version-v1.2/solidity-docs/utilities/Utilities.md +79 -0
- package/versioned_docs/version-v1.2/spec.md +944 -0
- package/versioned_docs/version-v1.2/testing-in-detail.md +209 -0
- package/versioned_docs/version-v1.2/testing.md +472 -0
- package/versioned_docs/version-v1.2/topup.md +43 -0
- package/versioned_docs/version-v1.2/troubleshooting.md +51 -0
- package/versioned_docs/version-v1.2/trusted-setup.md +76 -0
- package/versioned_docs/version-v1.2/typedoc/cli/.nojekyll +1 -0
- package/versioned_docs/version-v1.2/typedoc/cli/index.md +15 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/AirdropArgs.md +89 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/DeployArgs.md +154 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/DeployPollArgs.md +154 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/DeployedContracts.md +130 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/GenLocalStateArgs.md +168 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/GenProofsArgs.md +388 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/IGenKeypairArgs.md +37 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/IRegisteredUserArgs.md +63 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/MergeMessagesArgs.md +76 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/MergeSignupsArgs.md +76 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/PollContracts.md +53 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/ProveOnChainArgs.md +128 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/PublishArgs.md +154 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/SignupArgs.md +89 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/SubsidyData.md +73 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/TallyData.md +166 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/TopupArgs.md +89 -0
- package/versioned_docs/version-v1.2/typedoc/cli/interfaces/VerifyArgs.md +128 -0
- package/versioned_docs/version-v1.2/typedoc/cli/modules.md +556 -0
- package/versioned_docs/version-v1.2/typedoc/core/.nojekyll +1 -0
- package/versioned_docs/version-v1.2/typedoc/core/classes/MaciState.md +295 -0
- package/versioned_docs/version-v1.2/typedoc/core/classes/Poll.md +1098 -0
- package/versioned_docs/version-v1.2/typedoc/core/index.md +110 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/BatchSizes.md +50 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/IJsonMaciState.md +77 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/IProcessMessagesCircuitInputs.md +242 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/ISubsidyCircuitInputs.md +198 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/ITallyCircuitInputs.md +231 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/MaxValues.md +37 -0
- package/versioned_docs/version-v1.2/typedoc/core/interfaces/TreeDepths.md +63 -0
- package/versioned_docs/version-v1.2/typedoc/core/modules.md +289 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/.nojekyll +1 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/classes/AccQueue.md +770 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/classes/G1Point.md +115 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/classes/G2Point.md +140 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/classes/IncrementalQuinTree.md +470 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/index.md +44 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/Keypair.md +33 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/PoseidonFuncs.md +115 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/Queue.md +33 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/interfaces/Signature.md +37 -0
- package/versioned_docs/version-v1.2/typedoc/crypto/modules.md +913 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/.nojekyll +1 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/Ballot.md +274 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/Keypair.md +181 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/Message.md +244 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/PCommand.md +409 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/PrivKey.md +206 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/PubKey.md +289 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/StateLeaf.md +340 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/TCommand.md +200 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/classes/VerifyingKey.md +240 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/index.md +81 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/ICommand.md +104 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IG1ContractParams.md +31 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IG2ContractParams.md +31 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonBallot.md +42 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonCommand.md +32 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonKeyPair.md +31 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonPCommand.md +111 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonStateLeaf.md +42 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IJsonTCommand.md +67 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IMessageContractParams.md +31 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IStateLeaf.md +39 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IStateLeafContractParams.md +42 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IVkContractParams.md +64 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/IVkObjectParams.md +108 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/Proof.md +46 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/interfaces/VoteOptionTreeLeaf.md +24 -0
- package/versioned_docs/version-v1.2/typedoc/domainobjs/modules.md +110 -0
- package/versioned_docs/version-v1.2/typedoc/index.md +4 -0
- package/versioned_docs/version-v1.2/versioning.md +94 -0
- package/versioned_docs/version-v1.2/workflow.md +142 -0
- package/versioned_docs/version-v2.x/case-studies.md +35 -0
- package/versioned_docs/version-v2.x/contributing/_category_.json +4 -0
- package/versioned_docs/version-v2.x/contributing/code-of-conduct.md +92 -0
- package/versioned_docs/version-v2.x/contributing/contributing.md +149 -0
- package/versioned_docs/version-v2.x/contributing/project-ideas.md +78 -0
- package/versioned_docs/version-v2.x/core-concepts/_category_.json +4 -0
- package/versioned_docs/version-v2.x/core-concepts/ballot.md +19 -0
- package/versioned_docs/version-v2.x/core-concepts/coordinator-processing.md +46 -0
- package/versioned_docs/version-v2.x/core-concepts/hashing-and-encryption.md +45 -0
- package/versioned_docs/version-v2.x/core-concepts/key-change.md +179 -0
- package/versioned_docs/version-v2.x/core-concepts/maci-keys.md +84 -0
- package/versioned_docs/version-v2.x/core-concepts/maci-messages.md +44 -0
- package/versioned_docs/version-v2.x/core-concepts/merkle-trees.md +23 -0
- package/versioned_docs/version-v2.x/core-concepts/poll-types.md +106 -0
- package/versioned_docs/version-v2.x/core-concepts/spec.md +883 -0
- package/versioned_docs/version-v2.x/core-concepts/state-leaf.md +42 -0
- package/versioned_docs/version-v2.x/core-concepts/workflow.md +142 -0
- package/versioned_docs/version-v2.x/getting-started.md +313 -0
- package/versioned_docs/version-v2.x/guides/_category_.json +4 -0
- package/versioned_docs/version-v2.x/guides/compile-circuits.md +163 -0
- package/versioned_docs/version-v2.x/guides/frontend.md +99 -0
- package/versioned_docs/version-v2.x/guides/integrating.md +73 -0
- package/versioned_docs/version-v2.x/guides/maciWrapper.md +173 -0
- package/versioned_docs/version-v2.x/guides/subgraph.md +79 -0
- package/versioned_docs/version-v2.x/guides/testing/_category_.json +4 -0
- package/versioned_docs/version-v2.x/guides/testing/testing-in-detail.md +203 -0
- package/versioned_docs/version-v2.x/guides/testing/testing.md +163 -0
- package/versioned_docs/version-v2.x/guides/troubleshooting.md +161 -0
- package/versioned_docs/version-v2.x/introduction.md +146 -0
- package/versioned_docs/version-v2.x/processes/_category_.json +4 -0
- package/versioned_docs/version-v2.x/processes/ci-pipeline.md +38 -0
- package/versioned_docs/version-v2.x/processes/versioning.md +94 -0
- package/versioned_docs/version-v2.x/resources.md +33 -0
- package/versioned_docs/version-v2.x/security/_category_.json +4 -0
- package/versioned_docs/version-v2.x/security/audit.md +167 -0
- package/versioned_docs/version-v2.x/security/trusted-setup.md +166 -0
- package/versioned_docs/version-v2.x/supported-networks/_category_.json +4 -0
- package/versioned_docs/version-v2.x/supported-networks/deployed-contracts.md +1108 -0
- package/versioned_docs/version-v2.x/supported-networks/supported-networks.md +47 -0
- package/versioned_docs/version-v2.x/technical-references/_category_.json +4 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/AccQueue.md +21 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/Gatekeepers.md +40 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/MACI.md +152 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/MessageProcessor.md +13 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/Params.md +32 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/Poll.md +104 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/PollFactory.md +43 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/Tally.md +45 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/VkRegistry.md +57 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/VoiceCreditProxy.md +18 -0
- package/versioned_docs/version-v2.x/technical-references/smart-contracts/_category_.json +8 -0
- package/versioned_docs/version-v2.x/technical-references/technical-references.md +47 -0
- package/versioned_docs/version-v2.x/technical-references/typescript-code/_category_.json +4 -0
- package/versioned_docs/version-v2.x/technical-references/typescript-code/cli.md +699 -0
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/_category_.json +4 -0
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/processMessages.md +107 -0
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/setup.md +101 -0
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/tallyVotes.md +79 -0
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/utilities.md +131 -0
- package/versioned_docs/version-v2.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +37 -0
- package/versioned_docs/version-v2.x/use-cases/_category_.json +4 -0
- package/versioned_docs/version-v2.x/use-cases/governance.md +18 -0
- package/versioned_docs/version-v2.x/use-cases/polling.md +10 -0
- package/versioned_docs/version-v2.x/use-cases/public-goods.md +65 -0
- package/versioned_docs/version-v3.x/case-studies.md +35 -0
- package/versioned_docs/version-v3.x/contributing/_category_.json +4 -0
- package/versioned_docs/version-v3.x/contributing/code-of-conduct.md +92 -0
- package/versioned_docs/version-v3.x/contributing/contributing.md +149 -0
- package/versioned_docs/version-v3.x/contributing/project-ideas.md +78 -0
- package/versioned_docs/version-v3.x/core-concepts/_category_.json +4 -0
- package/versioned_docs/version-v3.x/core-concepts/ballot.md +19 -0
- package/versioned_docs/version-v3.x/core-concepts/coordinator-processing.md +46 -0
- package/versioned_docs/version-v3.x/core-concepts/hashing-and-encryption.md +45 -0
- package/versioned_docs/version-v3.x/core-concepts/key-change.md +179 -0
- package/versioned_docs/version-v3.x/core-concepts/maci-keys.md +84 -0
- package/versioned_docs/version-v3.x/core-concepts/maci-messages.md +44 -0
- package/versioned_docs/version-v3.x/core-concepts/merkle-trees.md +16 -0
- package/versioned_docs/version-v3.x/core-concepts/poll-types.md +58 -0
- package/versioned_docs/version-v3.x/core-concepts/polls.md +81 -0
- package/versioned_docs/version-v3.x/core-concepts/spec.md +883 -0
- package/versioned_docs/version-v3.x/core-concepts/state-leaf.md +42 -0
- package/versioned_docs/version-v3.x/core-concepts/workflow.md +143 -0
- package/versioned_docs/version-v3.x/guides/_category_.json +4 -0
- package/versioned_docs/version-v3.x/guides/compile-circuits.md +175 -0
- package/versioned_docs/version-v3.x/guides/integrating.md +137 -0
- package/versioned_docs/version-v3.x/guides/subgraph.md +79 -0
- package/versioned_docs/version-v3.x/guides/testing/_category_.json +4 -0
- package/versioned_docs/version-v3.x/guides/testing/testing-in-detail.md +191 -0
- package/versioned_docs/version-v3.x/guides/testing/testing-introduction.md +158 -0
- package/versioned_docs/version-v3.x/guides/troubleshooting.md +161 -0
- package/versioned_docs/version-v3.x/introduction.md +153 -0
- package/versioned_docs/version-v3.x/processes/_category_.json +4 -0
- package/versioned_docs/version-v3.x/processes/ci-pipeline.md +38 -0
- package/versioned_docs/version-v3.x/processes/versioning.md +94 -0
- package/versioned_docs/version-v3.x/quick-start.md +318 -0
- package/versioned_docs/version-v3.x/resources.md +33 -0
- package/versioned_docs/version-v3.x/security/_category_.json +4 -0
- package/versioned_docs/version-v3.x/security/audit.md +167 -0
- package/versioned_docs/version-v3.x/security/trusted-setup.md +172 -0
- package/versioned_docs/version-v3.x/supported-networks/_category_.json +4 -0
- package/versioned_docs/version-v3.x/supported-networks/deployed-contracts.md +112 -0
- package/versioned_docs/version-v3.x/supported-networks/supported-networks.md +53 -0
- package/versioned_docs/version-v3.x/technical-references/_category_.json +4 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/MACI.md +160 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/MessageProcessor.md +13 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/Params.md +33 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/Policies.md +39 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/Poll.md +170 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/PollFactory.md +33 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/Tally.md +43 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/VkRegistry.md +62 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/VoiceCreditProxy.md +18 -0
- package/versioned_docs/version-v3.x/technical-references/smart-contracts/_category_.json +8 -0
- package/versioned_docs/version-v3.x/technical-references/technical-references.md +48 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/_category_.json +4 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/joinPoll.md +53 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/processMessages.md +106 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/setup.md +96 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/tallyVotes.md +79 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/utilities.md +131 -0
- package/versioned_docs/version-v3.x/technical-references/zk-snark-circuits/zk-snark-circuits.md +42 -0
- package/versioned_docs/version-v3.x/use-cases/_category_.json +4 -0
- package/versioned_docs/version-v3.x/use-cases/governance.md +18 -0
- package/versioned_docs/version-v3.x/use-cases/polling.md +10 -0
- package/versioned_docs/version-v3.x/use-cases/public-goods.md +65 -0
- package/versioned_sidebars/version-v0.x-sidebars.json +8 -0
- package/versioned_sidebars/version-v1.2-sidebars.json +8 -0
- package/versioned_sidebars/version-v2.x-sidebars.json +8 -0
- package/versioned_sidebars/version-v3.x-sidebars.json +8 -0
- package/versions.json +1 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: G1Point
|
|
3
|
+
sidebar_label: G1Point
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**`Notice`**
|
|
7
|
+
|
|
8
|
+
A class representing a point on the first group (G1)
|
|
9
|
+
of the Jubjub curve
|
|
10
|
+
|
|
11
|
+
## Table of contents
|
|
12
|
+
|
|
13
|
+
### Constructors
|
|
14
|
+
|
|
15
|
+
- [constructor](G1Point.md#constructor)
|
|
16
|
+
|
|
17
|
+
### Properties
|
|
18
|
+
|
|
19
|
+
- [x](G1Point.md#x)
|
|
20
|
+
- [y](G1Point.md#y)
|
|
21
|
+
|
|
22
|
+
### Methods
|
|
23
|
+
|
|
24
|
+
- [asContractParam](G1Point.md#ascontractparam)
|
|
25
|
+
- [equals](G1Point.md#equals)
|
|
26
|
+
|
|
27
|
+
## Constructors
|
|
28
|
+
|
|
29
|
+
### constructor
|
|
30
|
+
|
|
31
|
+
• **new G1Point**(`x`, `y`): [`G1Point`](G1Point.md)
|
|
32
|
+
|
|
33
|
+
Create a new instance of G1Point
|
|
34
|
+
|
|
35
|
+
#### Parameters
|
|
36
|
+
|
|
37
|
+
| Name | Type | Description |
|
|
38
|
+
| :--- | :------- | :--------------- |
|
|
39
|
+
| `x` | `bigint` | the x coordinate |
|
|
40
|
+
| `y` | `bigint` | the y coordinate |
|
|
41
|
+
|
|
42
|
+
#### Returns
|
|
43
|
+
|
|
44
|
+
[`G1Point`](G1Point.md)
|
|
45
|
+
|
|
46
|
+
#### Defined in
|
|
47
|
+
|
|
48
|
+
[crypto/ts/babyjub.ts:22](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/babyjub.ts#L22)
|
|
49
|
+
|
|
50
|
+
## Properties
|
|
51
|
+
|
|
52
|
+
### x
|
|
53
|
+
|
|
54
|
+
• **x**: `bigint`
|
|
55
|
+
|
|
56
|
+
#### Defined in
|
|
57
|
+
|
|
58
|
+
[crypto/ts/babyjub.ts:13](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/babyjub.ts#L13)
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
### y
|
|
63
|
+
|
|
64
|
+
• **y**: `bigint`
|
|
65
|
+
|
|
66
|
+
#### Defined in
|
|
67
|
+
|
|
68
|
+
[crypto/ts/babyjub.ts:15](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/babyjub.ts#L15)
|
|
69
|
+
|
|
70
|
+
## Methods
|
|
71
|
+
|
|
72
|
+
### asContractParam
|
|
73
|
+
|
|
74
|
+
▸ **asContractParam**(): `Object`
|
|
75
|
+
|
|
76
|
+
Return the point as a contract param in the form of an object
|
|
77
|
+
|
|
78
|
+
#### Returns
|
|
79
|
+
|
|
80
|
+
`Object`
|
|
81
|
+
|
|
82
|
+
the point as a contract param
|
|
83
|
+
|
|
84
|
+
| Name | Type |
|
|
85
|
+
| :--- | :------- |
|
|
86
|
+
| `x` | `string` |
|
|
87
|
+
| `y` | `string` |
|
|
88
|
+
|
|
89
|
+
#### Defined in
|
|
90
|
+
|
|
91
|
+
[crypto/ts/babyjub.ts:42](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/babyjub.ts#L42)
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
### equals
|
|
96
|
+
|
|
97
|
+
▸ **equals**(`pt`): `boolean`
|
|
98
|
+
|
|
99
|
+
Check whether two points are equal
|
|
100
|
+
|
|
101
|
+
#### Parameters
|
|
102
|
+
|
|
103
|
+
| Name | Type | Description |
|
|
104
|
+
| :--- | :---------------------- | :------------------------ |
|
|
105
|
+
| `pt` | [`G1Point`](G1Point.md) | the point to compare with |
|
|
106
|
+
|
|
107
|
+
#### Returns
|
|
108
|
+
|
|
109
|
+
`boolean`
|
|
110
|
+
|
|
111
|
+
whether they are equal or not
|
|
112
|
+
|
|
113
|
+
#### Defined in
|
|
114
|
+
|
|
115
|
+
[crypto/ts/babyjub.ts:34](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/babyjub.ts#L34)
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: G2Point
|
|
3
|
+
sidebar_label: G2Point
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**`Notice`**
|
|
7
|
+
|
|
8
|
+
A class representing a point on the second group (G2)
|
|
9
|
+
of the Jubjub curve. This is usually an extension field of the
|
|
10
|
+
base field of the curve.
|
|
11
|
+
|
|
12
|
+
## Table of contents
|
|
13
|
+
|
|
14
|
+
### Constructors
|
|
15
|
+
|
|
16
|
+
- [constructor](G2Point.md#constructor)
|
|
17
|
+
|
|
18
|
+
### Properties
|
|
19
|
+
|
|
20
|
+
- [x](G2Point.md#x)
|
|
21
|
+
- [y](G2Point.md#y)
|
|
22
|
+
|
|
23
|
+
### Methods
|
|
24
|
+
|
|
25
|
+
- [asContractParam](G2Point.md#ascontractparam)
|
|
26
|
+
- [checkPointsRange](G2Point.md#checkpointsrange)
|
|
27
|
+
- [equals](G2Point.md#equals)
|
|
28
|
+
|
|
29
|
+
## Constructors
|
|
30
|
+
|
|
31
|
+
### constructor
|
|
32
|
+
|
|
33
|
+
• **new G2Point**(`x`, `y`): [`G2Point`](G2Point.md)
|
|
34
|
+
|
|
35
|
+
Create a new instance of G2Point
|
|
36
|
+
|
|
37
|
+
#### Parameters
|
|
38
|
+
|
|
39
|
+
| Name | Type | Description |
|
|
40
|
+
| :--- | :--------- | :--------------- |
|
|
41
|
+
| `x` | `bigint`[] | the x coordinate |
|
|
42
|
+
| `y` | `bigint`[] | the y coordinate |
|
|
43
|
+
|
|
44
|
+
#### Returns
|
|
45
|
+
|
|
46
|
+
[`G2Point`](G2Point.md)
|
|
47
|
+
|
|
48
|
+
#### Defined in
|
|
49
|
+
|
|
50
|
+
[crypto/ts/babyjub.ts:65](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/babyjub.ts#L65)
|
|
51
|
+
|
|
52
|
+
## Properties
|
|
53
|
+
|
|
54
|
+
### x
|
|
55
|
+
|
|
56
|
+
• **x**: `bigint`[]
|
|
57
|
+
|
|
58
|
+
#### Defined in
|
|
59
|
+
|
|
60
|
+
[crypto/ts/babyjub.ts:56](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/babyjub.ts#L56)
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### y
|
|
65
|
+
|
|
66
|
+
• **y**: `bigint`[]
|
|
67
|
+
|
|
68
|
+
#### Defined in
|
|
69
|
+
|
|
70
|
+
[crypto/ts/babyjub.ts:58](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/babyjub.ts#L58)
|
|
71
|
+
|
|
72
|
+
## Methods
|
|
73
|
+
|
|
74
|
+
### asContractParam
|
|
75
|
+
|
|
76
|
+
▸ **asContractParam**(): `Object`
|
|
77
|
+
|
|
78
|
+
Return the point as a contract param in the form of an object
|
|
79
|
+
|
|
80
|
+
#### Returns
|
|
81
|
+
|
|
82
|
+
`Object`
|
|
83
|
+
|
|
84
|
+
the point as a contract param
|
|
85
|
+
|
|
86
|
+
| Name | Type |
|
|
87
|
+
| :--- | :--------- |
|
|
88
|
+
| `x` | `string`[] |
|
|
89
|
+
| `y` | `string`[] |
|
|
90
|
+
|
|
91
|
+
#### Defined in
|
|
92
|
+
|
|
93
|
+
[crypto/ts/babyjub.ts:86](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/babyjub.ts#L86)
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
### checkPointsRange
|
|
98
|
+
|
|
99
|
+
▸ **checkPointsRange**(`x`, `type`): `void`
|
|
100
|
+
|
|
101
|
+
Check whether the points are in range
|
|
102
|
+
|
|
103
|
+
#### Parameters
|
|
104
|
+
|
|
105
|
+
| Name | Type | Description |
|
|
106
|
+
| :----- | :------------- | :------------------------- |
|
|
107
|
+
| `x` | `bigint`[] | the x coordinate |
|
|
108
|
+
| `type` | `"x"` \| `"y"` | the type of the coordinate |
|
|
109
|
+
|
|
110
|
+
#### Returns
|
|
111
|
+
|
|
112
|
+
`void`
|
|
113
|
+
|
|
114
|
+
#### Defined in
|
|
115
|
+
|
|
116
|
+
[crypto/ts/babyjub.ts:98](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/babyjub.ts#L98)
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
### equals
|
|
121
|
+
|
|
122
|
+
▸ **equals**(`pt`): `boolean`
|
|
123
|
+
|
|
124
|
+
Check whether two points are equal
|
|
125
|
+
|
|
126
|
+
#### Parameters
|
|
127
|
+
|
|
128
|
+
| Name | Type | Description |
|
|
129
|
+
| :--- | :---------------------- | :------------------------ |
|
|
130
|
+
| `pt` | [`G2Point`](G2Point.md) | the point to compare with |
|
|
131
|
+
|
|
132
|
+
#### Returns
|
|
133
|
+
|
|
134
|
+
`boolean`
|
|
135
|
+
|
|
136
|
+
whether they are equal or not
|
|
137
|
+
|
|
138
|
+
#### Defined in
|
|
139
|
+
|
|
140
|
+
[crypto/ts/babyjub.ts:78](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/babyjub.ts#L78)
|
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: IncrementalQuinTree
|
|
3
|
+
sidebar_label: IncrementalQuinTree
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
An implementation of an incremental Merkle tree
|
|
7
|
+
|
|
8
|
+
**`Dev`**
|
|
9
|
+
|
|
10
|
+
adapted from https://github.com/weijiekoh/optimisedmt
|
|
11
|
+
|
|
12
|
+
## Table of contents
|
|
13
|
+
|
|
14
|
+
### Constructors
|
|
15
|
+
|
|
16
|
+
- [constructor](IncrementalQuinTree.md#constructor)
|
|
17
|
+
|
|
18
|
+
### Properties
|
|
19
|
+
|
|
20
|
+
- [arity](IncrementalQuinTree.md#arity)
|
|
21
|
+
- [capacity](IncrementalQuinTree.md#capacity)
|
|
22
|
+
- [depth](IncrementalQuinTree.md#depth)
|
|
23
|
+
- [hashFunc](IncrementalQuinTree.md#hashfunc)
|
|
24
|
+
- [nextIndex](IncrementalQuinTree.md#nextindex)
|
|
25
|
+
- [nodes](IncrementalQuinTree.md#nodes)
|
|
26
|
+
- [numNodes](IncrementalQuinTree.md#numnodes)
|
|
27
|
+
- [root](IncrementalQuinTree.md#root)
|
|
28
|
+
- [zeroValue](IncrementalQuinTree.md#zerovalue)
|
|
29
|
+
- [zeros](IncrementalQuinTree.md#zeros)
|
|
30
|
+
|
|
31
|
+
### Methods
|
|
32
|
+
|
|
33
|
+
- [calcChildIndices](IncrementalQuinTree.md#calcchildindices)
|
|
34
|
+
- [calcInitialVals](IncrementalQuinTree.md#calcinitialvals)
|
|
35
|
+
- [calcLeafIndices](IncrementalQuinTree.md#calcleafindices)
|
|
36
|
+
- [calcParentIndices](IncrementalQuinTree.md#calcparentindices)
|
|
37
|
+
- [copy](IncrementalQuinTree.md#copy)
|
|
38
|
+
- [genProof](IncrementalQuinTree.md#genproof)
|
|
39
|
+
- [genSubrootProof](IncrementalQuinTree.md#gensubrootproof)
|
|
40
|
+
- [getNode](IncrementalQuinTree.md#getnode)
|
|
41
|
+
- [insert](IncrementalQuinTree.md#insert)
|
|
42
|
+
- [setNode](IncrementalQuinTree.md#setnode)
|
|
43
|
+
- [update](IncrementalQuinTree.md#update)
|
|
44
|
+
- [verifyProof](IncrementalQuinTree.md#verifyproof)
|
|
45
|
+
|
|
46
|
+
## Constructors
|
|
47
|
+
|
|
48
|
+
### constructor
|
|
49
|
+
|
|
50
|
+
• **new IncrementalQuinTree**(`depth`, `zeroValue`, `arity`, `hashFunc`): [`IncrementalQuinTree`](IncrementalQuinTree.md)
|
|
51
|
+
|
|
52
|
+
Create a new instance of the MaciQuinTree
|
|
53
|
+
|
|
54
|
+
#### Parameters
|
|
55
|
+
|
|
56
|
+
| Name | Type | Description |
|
|
57
|
+
| :---------- | :--------------------------------- | :---------------------------- |
|
|
58
|
+
| `depth` | `number` | The depth of the tree |
|
|
59
|
+
| `zeroValue` | `bigint` | The zero value of the tree |
|
|
60
|
+
| `arity` | `number` | The arity of the tree |
|
|
61
|
+
| `hashFunc` | (`leaves`: `bigint`[]) => `bigint` | The hash function of the tree |
|
|
62
|
+
|
|
63
|
+
#### Returns
|
|
64
|
+
|
|
65
|
+
[`IncrementalQuinTree`](IncrementalQuinTree.md)
|
|
66
|
+
|
|
67
|
+
#### Defined in
|
|
68
|
+
|
|
69
|
+
[crypto/ts/quinTree.ts:42](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L42)
|
|
70
|
+
|
|
71
|
+
## Properties
|
|
72
|
+
|
|
73
|
+
### arity
|
|
74
|
+
|
|
75
|
+
• **arity**: `number`
|
|
76
|
+
|
|
77
|
+
#### Defined in
|
|
78
|
+
|
|
79
|
+
[crypto/ts/quinTree.ts:15](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L15)
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### capacity
|
|
84
|
+
|
|
85
|
+
• **capacity**: `number`
|
|
86
|
+
|
|
87
|
+
#### Defined in
|
|
88
|
+
|
|
89
|
+
[crypto/ts/quinTree.ts:33](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L33)
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
### depth
|
|
94
|
+
|
|
95
|
+
• **depth**: `number`
|
|
96
|
+
|
|
97
|
+
#### Defined in
|
|
98
|
+
|
|
99
|
+
[crypto/ts/quinTree.ts:9](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L9)
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### hashFunc
|
|
104
|
+
|
|
105
|
+
• **hashFunc**: (`leaves`: `bigint`[]) => `bigint`
|
|
106
|
+
|
|
107
|
+
#### Type declaration
|
|
108
|
+
|
|
109
|
+
▸ (`leaves`): `bigint`
|
|
110
|
+
|
|
111
|
+
##### Parameters
|
|
112
|
+
|
|
113
|
+
| Name | Type |
|
|
114
|
+
| :------- | :--------- |
|
|
115
|
+
| `leaves` | `bigint`[] |
|
|
116
|
+
|
|
117
|
+
##### Returns
|
|
118
|
+
|
|
119
|
+
`bigint`
|
|
120
|
+
|
|
121
|
+
#### Defined in
|
|
122
|
+
|
|
123
|
+
[crypto/ts/quinTree.ts:18](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L18)
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
### nextIndex
|
|
128
|
+
|
|
129
|
+
• **nextIndex**: `number` = `0`
|
|
130
|
+
|
|
131
|
+
#### Defined in
|
|
132
|
+
|
|
133
|
+
[crypto/ts/quinTree.ts:21](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L21)
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
### nodes
|
|
138
|
+
|
|
139
|
+
• **nodes**: `Node`
|
|
140
|
+
|
|
141
|
+
#### Defined in
|
|
142
|
+
|
|
143
|
+
[crypto/ts/quinTree.ts:29](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L29)
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
### numNodes
|
|
148
|
+
|
|
149
|
+
• **numNodes**: `number`
|
|
150
|
+
|
|
151
|
+
#### Defined in
|
|
152
|
+
|
|
153
|
+
[crypto/ts/quinTree.ts:31](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L31)
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
### root
|
|
158
|
+
|
|
159
|
+
• **root**: `bigint`
|
|
160
|
+
|
|
161
|
+
#### Defined in
|
|
162
|
+
|
|
163
|
+
[crypto/ts/quinTree.ts:27](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L27)
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
### zeroValue
|
|
168
|
+
|
|
169
|
+
• **zeroValue**: `bigint`
|
|
170
|
+
|
|
171
|
+
#### Defined in
|
|
172
|
+
|
|
173
|
+
[crypto/ts/quinTree.ts:12](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L12)
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
### zeros
|
|
178
|
+
|
|
179
|
+
• **zeros**: `bigint`[] = `[]`
|
|
180
|
+
|
|
181
|
+
#### Defined in
|
|
182
|
+
|
|
183
|
+
[crypto/ts/quinTree.ts:25](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L25)
|
|
184
|
+
|
|
185
|
+
## Methods
|
|
186
|
+
|
|
187
|
+
### calcChildIndices
|
|
188
|
+
|
|
189
|
+
▸ **calcChildIndices**(`index`): `number`[]
|
|
190
|
+
|
|
191
|
+
Calculate the indices of the children of a node
|
|
192
|
+
|
|
193
|
+
#### Parameters
|
|
194
|
+
|
|
195
|
+
| Name | Type | Description |
|
|
196
|
+
| :------ | :------- | :-------------------- |
|
|
197
|
+
| `index` | `number` | The index of the node |
|
|
198
|
+
|
|
199
|
+
#### Returns
|
|
200
|
+
|
|
201
|
+
`number`[]
|
|
202
|
+
|
|
203
|
+
The indices of the children
|
|
204
|
+
|
|
205
|
+
#### Defined in
|
|
206
|
+
|
|
207
|
+
[crypto/ts/quinTree.ts:272](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L272)
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
### calcInitialVals
|
|
212
|
+
|
|
213
|
+
▸ **calcInitialVals**(`arity`, `depth`, `zeroValue`, `hashFunc`): `Object`
|
|
214
|
+
|
|
215
|
+
Calculate the zeroes and the root of a tree
|
|
216
|
+
|
|
217
|
+
#### Parameters
|
|
218
|
+
|
|
219
|
+
| Name | Type | Description |
|
|
220
|
+
| :---------- | :--------------------------------- | :---------------------------- |
|
|
221
|
+
| `arity` | `number` | The arity of the tree |
|
|
222
|
+
| `depth` | `number` | The depth of the tree |
|
|
223
|
+
| `zeroValue` | `bigint` | The zero value of the tree |
|
|
224
|
+
| `hashFunc` | (`leaves`: `bigint`[]) => `bigint` | The hash function of the tree |
|
|
225
|
+
|
|
226
|
+
#### Returns
|
|
227
|
+
|
|
228
|
+
`Object`
|
|
229
|
+
|
|
230
|
+
The zeros and the root
|
|
231
|
+
|
|
232
|
+
| Name | Type |
|
|
233
|
+
| :------ | :--------- |
|
|
234
|
+
| `root` | `bigint` |
|
|
235
|
+
| `zeros` | `bigint`[] |
|
|
236
|
+
|
|
237
|
+
#### Defined in
|
|
238
|
+
|
|
239
|
+
[crypto/ts/quinTree.ts:358](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L358)
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
### calcLeafIndices
|
|
244
|
+
|
|
245
|
+
▸ **calcLeafIndices**(`index`): `number`[]
|
|
246
|
+
|
|
247
|
+
Calculate the indices of the leaves in the path to the root
|
|
248
|
+
|
|
249
|
+
#### Parameters
|
|
250
|
+
|
|
251
|
+
| Name | Type | Description |
|
|
252
|
+
| :------ | :------- | :-------------------- |
|
|
253
|
+
| `index` | `number` | The index of the leaf |
|
|
254
|
+
|
|
255
|
+
#### Returns
|
|
256
|
+
|
|
257
|
+
`number`[]
|
|
258
|
+
|
|
259
|
+
The indices of the leaves in the path to the root
|
|
260
|
+
|
|
261
|
+
#### Defined in
|
|
262
|
+
|
|
263
|
+
[crypto/ts/quinTree.ts:105](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L105)
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
### calcParentIndices
|
|
268
|
+
|
|
269
|
+
▸ **calcParentIndices**(`index`): `number`[]
|
|
270
|
+
|
|
271
|
+
Calculate the indices of the parent
|
|
272
|
+
|
|
273
|
+
#### Parameters
|
|
274
|
+
|
|
275
|
+
| Name | Type | Description |
|
|
276
|
+
| :------ | :------- | :-------------------- |
|
|
277
|
+
| `index` | `number` | The index of the leaf |
|
|
278
|
+
|
|
279
|
+
#### Returns
|
|
280
|
+
|
|
281
|
+
`number`[]
|
|
282
|
+
|
|
283
|
+
The indices of the parent
|
|
284
|
+
|
|
285
|
+
#### Defined in
|
|
286
|
+
|
|
287
|
+
[crypto/ts/quinTree.ts:248](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L248)
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
### copy
|
|
292
|
+
|
|
293
|
+
▸ **copy**(): [`IncrementalQuinTree`](IncrementalQuinTree.md)
|
|
294
|
+
|
|
295
|
+
Copy the tree to a new instance
|
|
296
|
+
|
|
297
|
+
#### Returns
|
|
298
|
+
|
|
299
|
+
[`IncrementalQuinTree`](IncrementalQuinTree.md)
|
|
300
|
+
|
|
301
|
+
The new instance
|
|
302
|
+
|
|
303
|
+
#### Defined in
|
|
304
|
+
|
|
305
|
+
[crypto/ts/quinTree.ts:338](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L338)
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
### genProof
|
|
310
|
+
|
|
311
|
+
▸ **genProof**(`index`): `IMerkleProof`
|
|
312
|
+
|
|
313
|
+
Generate a proof for a given leaf index
|
|
314
|
+
|
|
315
|
+
#### Parameters
|
|
316
|
+
|
|
317
|
+
| Name | Type | Description |
|
|
318
|
+
| :------ | :------- | :-------------------------------------------- |
|
|
319
|
+
| `index` | `number` | The index of the leaf to generate a proof for |
|
|
320
|
+
|
|
321
|
+
#### Returns
|
|
322
|
+
|
|
323
|
+
`IMerkleProof`
|
|
324
|
+
|
|
325
|
+
The proof
|
|
326
|
+
|
|
327
|
+
#### Defined in
|
|
328
|
+
|
|
329
|
+
[crypto/ts/quinTree.ts:122](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L122)
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
### genSubrootProof
|
|
334
|
+
|
|
335
|
+
▸ **genSubrootProof**(`startIndex`, `endIndex`): `IMerkleProof`
|
|
336
|
+
|
|
337
|
+
Generates a Merkle proof from a subroot to the root.
|
|
338
|
+
|
|
339
|
+
#### Parameters
|
|
340
|
+
|
|
341
|
+
| Name | Type | Description |
|
|
342
|
+
| :----------- | :------- | :-------------------------- |
|
|
343
|
+
| `startIndex` | `number` | The index of the first leaf |
|
|
344
|
+
| `endIndex` | `number` | The index of the last leaf |
|
|
345
|
+
|
|
346
|
+
#### Returns
|
|
347
|
+
|
|
348
|
+
`IMerkleProof`
|
|
349
|
+
|
|
350
|
+
The Merkle proof
|
|
351
|
+
|
|
352
|
+
#### Defined in
|
|
353
|
+
|
|
354
|
+
[crypto/ts/quinTree.ts:168](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L168)
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
### getNode
|
|
359
|
+
|
|
360
|
+
▸ **getNode**(`index`): `bigint`
|
|
361
|
+
|
|
362
|
+
Get a node at a given index
|
|
363
|
+
|
|
364
|
+
#### Parameters
|
|
365
|
+
|
|
366
|
+
| Name | Type | Description |
|
|
367
|
+
| :------ | :------- | :-------------------- |
|
|
368
|
+
| `index` | `number` | The index of the node |
|
|
369
|
+
|
|
370
|
+
#### Returns
|
|
371
|
+
|
|
372
|
+
`bigint`
|
|
373
|
+
|
|
374
|
+
The node
|
|
375
|
+
|
|
376
|
+
#### Defined in
|
|
377
|
+
|
|
378
|
+
[crypto/ts/quinTree.ts:299](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L299)
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
### insert
|
|
383
|
+
|
|
384
|
+
▸ **insert**(`value`): `void`
|
|
385
|
+
|
|
386
|
+
Insert a leaf at the next available index
|
|
387
|
+
|
|
388
|
+
#### Parameters
|
|
389
|
+
|
|
390
|
+
| Name | Type | Description |
|
|
391
|
+
| :------ | :------- | :------------------ |
|
|
392
|
+
| `value` | `bigint` | The value to insert |
|
|
393
|
+
|
|
394
|
+
#### Returns
|
|
395
|
+
|
|
396
|
+
`void`
|
|
397
|
+
|
|
398
|
+
#### Defined in
|
|
399
|
+
|
|
400
|
+
[crypto/ts/quinTree.ts:68](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L68)
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
### setNode
|
|
405
|
+
|
|
406
|
+
▸ **setNode**(`index`, `value`): `void`
|
|
407
|
+
|
|
408
|
+
Set a node (not the root)
|
|
409
|
+
|
|
410
|
+
#### Parameters
|
|
411
|
+
|
|
412
|
+
| Name | Type | Description |
|
|
413
|
+
| :------ | :------- | :-------------------- |
|
|
414
|
+
| `index` | `number` | the index of the node |
|
|
415
|
+
| `value` | `bigint` | the value of the node |
|
|
416
|
+
|
|
417
|
+
#### Returns
|
|
418
|
+
|
|
419
|
+
`void`
|
|
420
|
+
|
|
421
|
+
#### Defined in
|
|
422
|
+
|
|
423
|
+
[crypto/ts/quinTree.ts:327](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L327)
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
### update
|
|
428
|
+
|
|
429
|
+
▸ **update**(`index`, `value`): `void`
|
|
430
|
+
|
|
431
|
+
Update a leaf at a given index
|
|
432
|
+
|
|
433
|
+
#### Parameters
|
|
434
|
+
|
|
435
|
+
| Name | Type | Description |
|
|
436
|
+
| :------ | :------- | :-------------------------------- |
|
|
437
|
+
| `index` | `number` | The index of the leaf to update |
|
|
438
|
+
| `value` | `bigint` | The value to update the leaf with |
|
|
439
|
+
|
|
440
|
+
#### Returns
|
|
441
|
+
|
|
442
|
+
`void`
|
|
443
|
+
|
|
444
|
+
#### Defined in
|
|
445
|
+
|
|
446
|
+
[crypto/ts/quinTree.ts:79](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L79)
|
|
447
|
+
|
|
448
|
+
---
|
|
449
|
+
|
|
450
|
+
### verifyProof
|
|
451
|
+
|
|
452
|
+
▸ **verifyProof**(`proof`): `boolean`
|
|
453
|
+
|
|
454
|
+
Verify a proof
|
|
455
|
+
|
|
456
|
+
#### Parameters
|
|
457
|
+
|
|
458
|
+
| Name | Type | Description |
|
|
459
|
+
| :------ | :------------- | :------------------ |
|
|
460
|
+
| `proof` | `IMerkleProof` | The proof to verify |
|
|
461
|
+
|
|
462
|
+
#### Returns
|
|
463
|
+
|
|
464
|
+
`boolean`
|
|
465
|
+
|
|
466
|
+
Whether the proof is valid
|
|
467
|
+
|
|
468
|
+
#### Defined in
|
|
469
|
+
|
|
470
|
+
[crypto/ts/quinTree.ts:221](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/crypto/ts/quinTree.ts#L221)
|