@maci-protocol/website 0.0.0-ci.2653bc0
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/relayer-diagram.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/coordinator-service.md +16 -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/offchain-voting.md +14 -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 +149 -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/coordinator-service/_category_.json +8 -0
- package/versioned_docs/version-v3.x/technical-references/coordinator-service/index.md +10 -0
- package/versioned_docs/version-v3.x/technical-references/coordinator-service/installation.md +43 -0
- package/versioned_docs/version-v3.x/technical-references/offchain-relayer/_category_.json +8 -0
- package/versioned_docs/version-v3.x/technical-references/offchain-relayer/index.md +51 -0
- package/versioned_docs/version-v3.x/technical-references/offchain-relayer/installation.md +109 -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 @@
|
|
|
1
|
+
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Ballot
|
|
3
|
+
sidebar_label: Ballot
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
A Ballot represents a User's votes in a Poll, as well as their next valid
|
|
7
|
+
nonce.
|
|
8
|
+
|
|
9
|
+
## Table of contents
|
|
10
|
+
|
|
11
|
+
### Constructors
|
|
12
|
+
|
|
13
|
+
- [constructor](Ballot.md#constructor)
|
|
14
|
+
|
|
15
|
+
### Properties
|
|
16
|
+
|
|
17
|
+
- [nonce](Ballot.md#nonce)
|
|
18
|
+
- [voteOptionTreeDepth](Ballot.md#voteoptiontreedepth)
|
|
19
|
+
- [votes](Ballot.md#votes)
|
|
20
|
+
|
|
21
|
+
### Methods
|
|
22
|
+
|
|
23
|
+
- [asArray](Ballot.md#asarray)
|
|
24
|
+
- [asCircuitInputs](Ballot.md#ascircuitinputs)
|
|
25
|
+
- [copy](Ballot.md#copy)
|
|
26
|
+
- [equals](Ballot.md#equals)
|
|
27
|
+
- [hash](Ballot.md#hash)
|
|
28
|
+
- [toJSON](Ballot.md#tojson)
|
|
29
|
+
- [fromJSON](Ballot.md#fromjson)
|
|
30
|
+
- [genBlankBallot](Ballot.md#genblankballot)
|
|
31
|
+
- [genRandomBallot](Ballot.md#genrandomballot)
|
|
32
|
+
|
|
33
|
+
## Constructors
|
|
34
|
+
|
|
35
|
+
### constructor
|
|
36
|
+
|
|
37
|
+
• **new Ballot**(`_numVoteOptions`, `_voteOptionTreeDepth`): [`Ballot`](Ballot.md)
|
|
38
|
+
|
|
39
|
+
Create a new Ballot instance
|
|
40
|
+
|
|
41
|
+
#### Parameters
|
|
42
|
+
|
|
43
|
+
| Name | Type | Description |
|
|
44
|
+
| :--------------------- | :------- | :---------------------------------------------------- |
|
|
45
|
+
| `_numVoteOptions` | `number` | How many vote options are available in the poll |
|
|
46
|
+
| `_voteOptionTreeDepth` | `number` | The depth of the merkle tree holding the vote options |
|
|
47
|
+
|
|
48
|
+
#### Returns
|
|
49
|
+
|
|
50
|
+
[`Ballot`](Ballot.md)
|
|
51
|
+
|
|
52
|
+
#### Defined in
|
|
53
|
+
|
|
54
|
+
[ballot.ts:23](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/ballot.ts#L23)
|
|
55
|
+
|
|
56
|
+
## Properties
|
|
57
|
+
|
|
58
|
+
### nonce
|
|
59
|
+
|
|
60
|
+
• **nonce**: `bigint`
|
|
61
|
+
|
|
62
|
+
#### Defined in
|
|
63
|
+
|
|
64
|
+
[ballot.ts:14](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/ballot.ts#L14)
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
### voteOptionTreeDepth
|
|
69
|
+
|
|
70
|
+
• **voteOptionTreeDepth**: `number`
|
|
71
|
+
|
|
72
|
+
#### Defined in
|
|
73
|
+
|
|
74
|
+
[ballot.ts:16](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/ballot.ts#L16)
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
### votes
|
|
79
|
+
|
|
80
|
+
• **votes**: `bigint`[] = `[]`
|
|
81
|
+
|
|
82
|
+
#### Defined in
|
|
83
|
+
|
|
84
|
+
[ballot.ts:12](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/ballot.ts#L12)
|
|
85
|
+
|
|
86
|
+
## Methods
|
|
87
|
+
|
|
88
|
+
### asArray
|
|
89
|
+
|
|
90
|
+
▸ **asArray**(): `bigint`[]
|
|
91
|
+
|
|
92
|
+
Convert in a an array of bigints
|
|
93
|
+
|
|
94
|
+
#### Returns
|
|
95
|
+
|
|
96
|
+
`bigint`[]
|
|
97
|
+
|
|
98
|
+
the ballot as a bigint array
|
|
99
|
+
|
|
100
|
+
**`Notice`**
|
|
101
|
+
|
|
102
|
+
this is the nonce and the root of the vote option tree
|
|
103
|
+
|
|
104
|
+
#### Defined in
|
|
105
|
+
|
|
106
|
+
[ballot.ts:52](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/ballot.ts#L52)
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
### asCircuitInputs
|
|
111
|
+
|
|
112
|
+
▸ **asCircuitInputs**(): `bigint`[]
|
|
113
|
+
|
|
114
|
+
Convert in a format suitable for the circuit
|
|
115
|
+
|
|
116
|
+
#### Returns
|
|
117
|
+
|
|
118
|
+
`bigint`[]
|
|
119
|
+
|
|
120
|
+
the ballot as a BigInt array
|
|
121
|
+
|
|
122
|
+
#### Defined in
|
|
123
|
+
|
|
124
|
+
[ballot.ts:45](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/ballot.ts#L45)
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
### copy
|
|
129
|
+
|
|
130
|
+
▸ **copy**(): [`Ballot`](Ballot.md)
|
|
131
|
+
|
|
132
|
+
Create a deep clone of this Ballot
|
|
133
|
+
|
|
134
|
+
#### Returns
|
|
135
|
+
|
|
136
|
+
[`Ballot`](Ballot.md)
|
|
137
|
+
|
|
138
|
+
a copy of the ballot
|
|
139
|
+
|
|
140
|
+
#### Defined in
|
|
141
|
+
|
|
142
|
+
[ballot.ts:68](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/ballot.ts#L68)
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
### equals
|
|
147
|
+
|
|
148
|
+
▸ **equals**(`b`): `boolean`
|
|
149
|
+
|
|
150
|
+
Check if two ballots are equal (same votes and same nonce)
|
|
151
|
+
|
|
152
|
+
#### Parameters
|
|
153
|
+
|
|
154
|
+
| Name | Type | Description |
|
|
155
|
+
| :--- | :-------------------- | :------------------------- |
|
|
156
|
+
| `b` | [`Ballot`](Ballot.md) | The ballot to compare with |
|
|
157
|
+
|
|
158
|
+
#### Returns
|
|
159
|
+
|
|
160
|
+
`boolean`
|
|
161
|
+
|
|
162
|
+
whether the two ballots are equal
|
|
163
|
+
|
|
164
|
+
#### Defined in
|
|
165
|
+
|
|
166
|
+
[ballot.ts:81](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/ballot.ts#L81)
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
### hash
|
|
171
|
+
|
|
172
|
+
▸ **hash**(): `bigint`
|
|
173
|
+
|
|
174
|
+
Generate an hash of this ballot
|
|
175
|
+
|
|
176
|
+
#### Returns
|
|
177
|
+
|
|
178
|
+
`bigint`
|
|
179
|
+
|
|
180
|
+
The hash of the ballot
|
|
181
|
+
|
|
182
|
+
#### Defined in
|
|
183
|
+
|
|
184
|
+
[ballot.ts:36](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/ballot.ts#L36)
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
### toJSON
|
|
189
|
+
|
|
190
|
+
▸ **toJSON**(): [`IJsonBallot`](../interfaces/IJsonBallot.md)
|
|
191
|
+
|
|
192
|
+
Serialize to a JSON object
|
|
193
|
+
|
|
194
|
+
#### Returns
|
|
195
|
+
|
|
196
|
+
[`IJsonBallot`](../interfaces/IJsonBallot.md)
|
|
197
|
+
|
|
198
|
+
#### Defined in
|
|
199
|
+
|
|
200
|
+
[ballot.ts:112](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/ballot.ts#L112)
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
### fromJSON
|
|
205
|
+
|
|
206
|
+
▸ **fromJSON**(`json`): [`Ballot`](Ballot.md)
|
|
207
|
+
|
|
208
|
+
Deserialize into a Ballot instance
|
|
209
|
+
|
|
210
|
+
#### Parameters
|
|
211
|
+
|
|
212
|
+
| Name | Type | Description |
|
|
213
|
+
| :----- | :-------------------------------------------- | :---------------------- |
|
|
214
|
+
| `json` | [`IJsonBallot`](../interfaces/IJsonBallot.md) | the json representation |
|
|
215
|
+
|
|
216
|
+
#### Returns
|
|
217
|
+
|
|
218
|
+
[`Ballot`](Ballot.md)
|
|
219
|
+
|
|
220
|
+
the deserialized object as a Ballot instance
|
|
221
|
+
|
|
222
|
+
#### Defined in
|
|
223
|
+
|
|
224
|
+
[ballot.ts:125](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/ballot.ts#L125)
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
### genBlankBallot
|
|
229
|
+
|
|
230
|
+
▸ **genBlankBallot**(`numVoteOptions`, `voteOptionTreeDepth`): [`Ballot`](Ballot.md)
|
|
231
|
+
|
|
232
|
+
Generate a blank ballot
|
|
233
|
+
|
|
234
|
+
#### Parameters
|
|
235
|
+
|
|
236
|
+
| Name | Type | Description |
|
|
237
|
+
| :-------------------- | :------- | :--------------------------------------------------- |
|
|
238
|
+
| `numVoteOptions` | `number` | How many vote options are available |
|
|
239
|
+
| `voteOptionTreeDepth` | `number` | How deep is the merkle tree holding the vote options |
|
|
240
|
+
|
|
241
|
+
#### Returns
|
|
242
|
+
|
|
243
|
+
[`Ballot`](Ballot.md)
|
|
244
|
+
|
|
245
|
+
a Blank Ballot object
|
|
246
|
+
|
|
247
|
+
#### Defined in
|
|
248
|
+
|
|
249
|
+
[ballot.ts:104](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/ballot.ts#L104)
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
### genRandomBallot
|
|
254
|
+
|
|
255
|
+
▸ **genRandomBallot**(`numVoteOptions`, `voteOptionTreeDepth`): [`Ballot`](Ballot.md)
|
|
256
|
+
|
|
257
|
+
Generate a random ballot
|
|
258
|
+
|
|
259
|
+
#### Parameters
|
|
260
|
+
|
|
261
|
+
| Name | Type | Description |
|
|
262
|
+
| :-------------------- | :------- | :--------------------------------------------------- |
|
|
263
|
+
| `numVoteOptions` | `number` | How many vote options are available |
|
|
264
|
+
| `voteOptionTreeDepth` | `number` | How deep is the merkle tree holding the vote options |
|
|
265
|
+
|
|
266
|
+
#### Returns
|
|
267
|
+
|
|
268
|
+
[`Ballot`](Ballot.md)
|
|
269
|
+
|
|
270
|
+
a random Ballot
|
|
271
|
+
|
|
272
|
+
#### Defined in
|
|
273
|
+
|
|
274
|
+
[ballot.ts:92](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/ballot.ts#L92)
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Keypair
|
|
3
|
+
sidebar_label: Keypair
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**`Notice`**
|
|
7
|
+
|
|
8
|
+
A KeyPair is a pair of public and private keys
|
|
9
|
+
This is a MACI keypair, which is not to be
|
|
10
|
+
confused with an Ethereum public and private keypair.
|
|
11
|
+
A MACI keypair is comprised of a MACI public key and a MACI private key
|
|
12
|
+
|
|
13
|
+
## Table of contents
|
|
14
|
+
|
|
15
|
+
### Constructors
|
|
16
|
+
|
|
17
|
+
- [constructor](Keypair.md#constructor)
|
|
18
|
+
|
|
19
|
+
### Properties
|
|
20
|
+
|
|
21
|
+
- [privKey](Keypair.md#privkey)
|
|
22
|
+
- [pubKey](Keypair.md#pubkey)
|
|
23
|
+
|
|
24
|
+
### Methods
|
|
25
|
+
|
|
26
|
+
- [copy](Keypair.md#copy)
|
|
27
|
+
- [equals](Keypair.md#equals)
|
|
28
|
+
- [toJSON](Keypair.md#tojson)
|
|
29
|
+
- [fromJSON](Keypair.md#fromjson)
|
|
30
|
+
- [genEcdhSharedKey](Keypair.md#genecdhsharedkey)
|
|
31
|
+
|
|
32
|
+
## Constructors
|
|
33
|
+
|
|
34
|
+
### constructor
|
|
35
|
+
|
|
36
|
+
• **new Keypair**(`privKey?`): [`Keypair`](Keypair.md)
|
|
37
|
+
|
|
38
|
+
Create a new instance of a Keypair
|
|
39
|
+
|
|
40
|
+
#### Parameters
|
|
41
|
+
|
|
42
|
+
| Name | Type | Description |
|
|
43
|
+
| :--------- | :---------------------- | :------------------------- |
|
|
44
|
+
| `privKey?` | [`PrivKey`](PrivKey.md) | the private key (optional) |
|
|
45
|
+
|
|
46
|
+
#### Returns
|
|
47
|
+
|
|
48
|
+
[`Keypair`](Keypair.md)
|
|
49
|
+
|
|
50
|
+
**`Notice`**
|
|
51
|
+
|
|
52
|
+
if no privKey is passed, it will automatically generate a new private key
|
|
53
|
+
|
|
54
|
+
#### Defined in
|
|
55
|
+
|
|
56
|
+
[keyPair.ts:26](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/keyPair.ts#L26)
|
|
57
|
+
|
|
58
|
+
## Properties
|
|
59
|
+
|
|
60
|
+
### privKey
|
|
61
|
+
|
|
62
|
+
• **privKey**: [`PrivKey`](PrivKey.md)
|
|
63
|
+
|
|
64
|
+
#### Defined in
|
|
65
|
+
|
|
66
|
+
[keyPair.ts:17](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/keyPair.ts#L17)
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
### pubKey
|
|
71
|
+
|
|
72
|
+
• **pubKey**: [`PubKey`](PubKey.md)
|
|
73
|
+
|
|
74
|
+
#### Defined in
|
|
75
|
+
|
|
76
|
+
[keyPair.ts:19](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/keyPair.ts#L19)
|
|
77
|
+
|
|
78
|
+
## Methods
|
|
79
|
+
|
|
80
|
+
### copy
|
|
81
|
+
|
|
82
|
+
▸ **copy**(): [`Keypair`](Keypair.md)
|
|
83
|
+
|
|
84
|
+
Create a deep clone of this Keypair
|
|
85
|
+
|
|
86
|
+
#### Returns
|
|
87
|
+
|
|
88
|
+
[`Keypair`](Keypair.md)
|
|
89
|
+
|
|
90
|
+
a copy of the Keypair
|
|
91
|
+
|
|
92
|
+
#### Defined in
|
|
93
|
+
|
|
94
|
+
[keyPair.ts:41](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/keyPair.ts#L41)
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
### equals
|
|
99
|
+
|
|
100
|
+
▸ **equals**(`keypair`): `boolean`
|
|
101
|
+
|
|
102
|
+
Check whether two Keypairs are equal
|
|
103
|
+
|
|
104
|
+
#### Parameters
|
|
105
|
+
|
|
106
|
+
| Name | Type | Description |
|
|
107
|
+
| :-------- | :---------------------- | :-------------------------- |
|
|
108
|
+
| `keypair` | [`Keypair`](Keypair.md) | the keypair to compare with |
|
|
109
|
+
|
|
110
|
+
#### Returns
|
|
111
|
+
|
|
112
|
+
`boolean`
|
|
113
|
+
|
|
114
|
+
whether they are equal or not
|
|
115
|
+
|
|
116
|
+
#### Defined in
|
|
117
|
+
|
|
118
|
+
[keyPair.ts:58](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/keyPair.ts#L58)
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
### toJSON
|
|
123
|
+
|
|
124
|
+
▸ **toJSON**(): [`IJsonKeyPair`](../interfaces/IJsonKeyPair.md)
|
|
125
|
+
|
|
126
|
+
Serialize into a JSON object
|
|
127
|
+
|
|
128
|
+
#### Returns
|
|
129
|
+
|
|
130
|
+
[`IJsonKeyPair`](../interfaces/IJsonKeyPair.md)
|
|
131
|
+
|
|
132
|
+
#### Defined in
|
|
133
|
+
|
|
134
|
+
[keyPair.ts:75](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/keyPair.ts#L75)
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
### fromJSON
|
|
139
|
+
|
|
140
|
+
▸ **fromJSON**(`json`): [`Keypair`](Keypair.md)
|
|
141
|
+
|
|
142
|
+
Deserialize into a Keypair instance
|
|
143
|
+
|
|
144
|
+
#### Parameters
|
|
145
|
+
|
|
146
|
+
| Name | Type |
|
|
147
|
+
| :----- | :---------------------------------------------- |
|
|
148
|
+
| `json` | [`IJsonKeyPair`](../interfaces/IJsonKeyPair.md) |
|
|
149
|
+
|
|
150
|
+
#### Returns
|
|
151
|
+
|
|
152
|
+
[`Keypair`](Keypair.md)
|
|
153
|
+
|
|
154
|
+
a keypair instance
|
|
155
|
+
|
|
156
|
+
#### Defined in
|
|
157
|
+
|
|
158
|
+
[keyPair.ts:87](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/keyPair.ts#L87)
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
### genEcdhSharedKey
|
|
163
|
+
|
|
164
|
+
▸ **genEcdhSharedKey**(`privKey`, `pubKey`): `EcdhSharedKey`
|
|
165
|
+
|
|
166
|
+
Generate a shared key
|
|
167
|
+
|
|
168
|
+
#### Parameters
|
|
169
|
+
|
|
170
|
+
| Name | Type |
|
|
171
|
+
| :-------- | :---------------------- |
|
|
172
|
+
| `privKey` | [`PrivKey`](PrivKey.md) |
|
|
173
|
+
| `pubKey` | [`PubKey`](PubKey.md) |
|
|
174
|
+
|
|
175
|
+
#### Returns
|
|
176
|
+
|
|
177
|
+
`EcdhSharedKey`
|
|
178
|
+
|
|
179
|
+
#### Defined in
|
|
180
|
+
|
|
181
|
+
[keyPair.ts:49](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/keyPair.ts#L49)
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Message
|
|
3
|
+
sidebar_label: Message
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**`Notice`**
|
|
7
|
+
|
|
8
|
+
An encrypted command and signature.
|
|
9
|
+
|
|
10
|
+
## Table of contents
|
|
11
|
+
|
|
12
|
+
### Constructors
|
|
13
|
+
|
|
14
|
+
- [constructor](Message.md#constructor)
|
|
15
|
+
|
|
16
|
+
### Properties
|
|
17
|
+
|
|
18
|
+
- [data](Message.md#data)
|
|
19
|
+
- [msgType](Message.md#msgtype)
|
|
20
|
+
- [DATA_LENGTH](Message.md#data_length)
|
|
21
|
+
|
|
22
|
+
### Methods
|
|
23
|
+
|
|
24
|
+
- [asArray](Message.md#asarray)
|
|
25
|
+
- [asCircuitInputs](Message.md#ascircuitinputs)
|
|
26
|
+
- [asContractParam](Message.md#ascontractparam)
|
|
27
|
+
- [copy](Message.md#copy)
|
|
28
|
+
- [equals](Message.md#equals)
|
|
29
|
+
- [hash](Message.md#hash)
|
|
30
|
+
- [toJSON](Message.md#tojson)
|
|
31
|
+
- [fromJSON](Message.md#fromjson)
|
|
32
|
+
|
|
33
|
+
## Constructors
|
|
34
|
+
|
|
35
|
+
### constructor
|
|
36
|
+
|
|
37
|
+
• **new Message**(`msgType`, `data`): [`Message`](Message.md)
|
|
38
|
+
|
|
39
|
+
Create a new instance of a Message
|
|
40
|
+
|
|
41
|
+
#### Parameters
|
|
42
|
+
|
|
43
|
+
| Name | Type | Description |
|
|
44
|
+
| :-------- | :--------- | :---------------------- |
|
|
45
|
+
| `msgType` | `bigint` | the type of the message |
|
|
46
|
+
| `data` | `bigint`[] | the data of the message |
|
|
47
|
+
|
|
48
|
+
#### Returns
|
|
49
|
+
|
|
50
|
+
[`Message`](Message.md)
|
|
51
|
+
|
|
52
|
+
#### Defined in
|
|
53
|
+
|
|
54
|
+
[message.ts:23](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/message.ts#L23)
|
|
55
|
+
|
|
56
|
+
## Properties
|
|
57
|
+
|
|
58
|
+
### data
|
|
59
|
+
|
|
60
|
+
• **data**: `bigint`[]
|
|
61
|
+
|
|
62
|
+
#### Defined in
|
|
63
|
+
|
|
64
|
+
[message.ts:14](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/message.ts#L14)
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
### msgType
|
|
69
|
+
|
|
70
|
+
• **msgType**: `bigint`
|
|
71
|
+
|
|
72
|
+
#### Defined in
|
|
73
|
+
|
|
74
|
+
[message.ts:12](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/message.ts#L12)
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
### DATA_LENGTH
|
|
79
|
+
|
|
80
|
+
▪ `Static` **DATA_LENGTH**: `number` = `10`
|
|
81
|
+
|
|
82
|
+
#### Defined in
|
|
83
|
+
|
|
84
|
+
[message.ts:16](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/message.ts#L16)
|
|
85
|
+
|
|
86
|
+
## Methods
|
|
87
|
+
|
|
88
|
+
### asArray
|
|
89
|
+
|
|
90
|
+
▸ **asArray**(): `bigint`[]
|
|
91
|
+
|
|
92
|
+
Return the message as an array of bigints
|
|
93
|
+
|
|
94
|
+
#### Returns
|
|
95
|
+
|
|
96
|
+
`bigint`[]
|
|
97
|
+
|
|
98
|
+
the message as an array of bigints
|
|
99
|
+
|
|
100
|
+
#### Defined in
|
|
101
|
+
|
|
102
|
+
[message.ts:33](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/message.ts#L33)
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### asCircuitInputs
|
|
107
|
+
|
|
108
|
+
▸ **asCircuitInputs**(): `bigint`[]
|
|
109
|
+
|
|
110
|
+
Return the message as a circuit input
|
|
111
|
+
|
|
112
|
+
#### Returns
|
|
113
|
+
|
|
114
|
+
`bigint`[]
|
|
115
|
+
|
|
116
|
+
the message as a circuit input
|
|
117
|
+
|
|
118
|
+
#### Defined in
|
|
119
|
+
|
|
120
|
+
[message.ts:48](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/message.ts#L48)
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
### asContractParam
|
|
125
|
+
|
|
126
|
+
▸ **asContractParam**(): [`IMessageContractParams`](../interfaces/IMessageContractParams.md)
|
|
127
|
+
|
|
128
|
+
Return the message as a contract param
|
|
129
|
+
|
|
130
|
+
#### Returns
|
|
131
|
+
|
|
132
|
+
[`IMessageContractParams`](../interfaces/IMessageContractParams.md)
|
|
133
|
+
|
|
134
|
+
the message as a contract param
|
|
135
|
+
|
|
136
|
+
#### Defined in
|
|
137
|
+
|
|
138
|
+
[message.ts:39](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/message.ts#L39)
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
### copy
|
|
143
|
+
|
|
144
|
+
▸ **copy**(): [`Message`](Message.md)
|
|
145
|
+
|
|
146
|
+
Create a copy of the message
|
|
147
|
+
|
|
148
|
+
#### Returns
|
|
149
|
+
|
|
150
|
+
[`Message`](Message.md)
|
|
151
|
+
|
|
152
|
+
a copy of the message
|
|
153
|
+
|
|
154
|
+
#### Defined in
|
|
155
|
+
|
|
156
|
+
[message.ts:61](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/message.ts#L61)
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
### equals
|
|
161
|
+
|
|
162
|
+
▸ **equals**(`m`): `boolean`
|
|
163
|
+
|
|
164
|
+
Check if two messages are equal
|
|
165
|
+
|
|
166
|
+
#### Parameters
|
|
167
|
+
|
|
168
|
+
| Name | Type | Description |
|
|
169
|
+
| :--- | :---------------------- | :-------------------------- |
|
|
170
|
+
| `m` | [`Message`](Message.md) | the message to compare with |
|
|
171
|
+
|
|
172
|
+
#### Returns
|
|
173
|
+
|
|
174
|
+
`boolean`
|
|
175
|
+
|
|
176
|
+
the result of the comparison
|
|
177
|
+
|
|
178
|
+
#### Defined in
|
|
179
|
+
|
|
180
|
+
[message.ts:72](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/message.ts#L72)
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
### hash
|
|
185
|
+
|
|
186
|
+
▸ **hash**(`encPubKey`): `bigint`
|
|
187
|
+
|
|
188
|
+
Hash the message data and a public key
|
|
189
|
+
|
|
190
|
+
#### Parameters
|
|
191
|
+
|
|
192
|
+
| Name | Type | Description |
|
|
193
|
+
| :---------- | :-------------------- | :-------------------------------------------------- |
|
|
194
|
+
| `encPubKey` | [`PubKey`](PubKey.md) | the public key that is used to encrypt this message |
|
|
195
|
+
|
|
196
|
+
#### Returns
|
|
197
|
+
|
|
198
|
+
`bigint`
|
|
199
|
+
|
|
200
|
+
the hash of the message data and the public key
|
|
201
|
+
|
|
202
|
+
#### Defined in
|
|
203
|
+
|
|
204
|
+
[message.ts:55](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/message.ts#L55)
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
### toJSON
|
|
209
|
+
|
|
210
|
+
▸ **toJSON**(): [`IMessageContractParams`](../interfaces/IMessageContractParams.md)
|
|
211
|
+
|
|
212
|
+
Serialize to a JSON object
|
|
213
|
+
|
|
214
|
+
#### Returns
|
|
215
|
+
|
|
216
|
+
[`IMessageContractParams`](../interfaces/IMessageContractParams.md)
|
|
217
|
+
|
|
218
|
+
#### Defined in
|
|
219
|
+
|
|
220
|
+
[message.ts:86](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/message.ts#L86)
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
### fromJSON
|
|
225
|
+
|
|
226
|
+
▸ **fromJSON**(`json`): [`Message`](Message.md)
|
|
227
|
+
|
|
228
|
+
Deserialize into a Message instance
|
|
229
|
+
|
|
230
|
+
#### Parameters
|
|
231
|
+
|
|
232
|
+
| Name | Type | Description |
|
|
233
|
+
| :----- | :------------------------------------------------------------------ | :---------------------- |
|
|
234
|
+
| `json` | [`IMessageContractParams`](../interfaces/IMessageContractParams.md) | the json representation |
|
|
235
|
+
|
|
236
|
+
#### Returns
|
|
237
|
+
|
|
238
|
+
[`Message`](Message.md)
|
|
239
|
+
|
|
240
|
+
the deserialized object as a Message instance
|
|
241
|
+
|
|
242
|
+
#### Defined in
|
|
243
|
+
|
|
244
|
+
[message.ts:95](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/message.ts#L95)
|