@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,289 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: PubKey
|
|
3
|
+
sidebar_label: PubKey
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**`Notice`**
|
|
7
|
+
|
|
8
|
+
A class representing a public key
|
|
9
|
+
This is a MACI public key, which is not to be
|
|
10
|
+
confused with an Ethereum public key.
|
|
11
|
+
A serialized MACI public key is prefixed by 'macipk.'
|
|
12
|
+
A raw MACI public key can be thought as a pair of
|
|
13
|
+
BigIntegers (x, y) representing a point on the baby jubjub curve
|
|
14
|
+
|
|
15
|
+
## Table of contents
|
|
16
|
+
|
|
17
|
+
### Constructors
|
|
18
|
+
|
|
19
|
+
- [constructor](PubKey.md#constructor)
|
|
20
|
+
|
|
21
|
+
### Properties
|
|
22
|
+
|
|
23
|
+
- [rawPubKey](PubKey.md#rawpubkey)
|
|
24
|
+
|
|
25
|
+
### Methods
|
|
26
|
+
|
|
27
|
+
- [asArray](PubKey.md#asarray)
|
|
28
|
+
- [asCircuitInputs](PubKey.md#ascircuitinputs)
|
|
29
|
+
- [asContractParam](PubKey.md#ascontractparam)
|
|
30
|
+
- [copy](PubKey.md#copy)
|
|
31
|
+
- [equals](PubKey.md#equals)
|
|
32
|
+
- [hash](PubKey.md#hash)
|
|
33
|
+
- [serialize](PubKey.md#serialize)
|
|
34
|
+
- [toJSON](PubKey.md#tojson)
|
|
35
|
+
- [deserialize](PubKey.md#deserialize)
|
|
36
|
+
- [fromJSON](PubKey.md#fromjson)
|
|
37
|
+
- [isValidSerializedPubKey](PubKey.md#isvalidserializedpubkey)
|
|
38
|
+
|
|
39
|
+
## Constructors
|
|
40
|
+
|
|
41
|
+
### constructor
|
|
42
|
+
|
|
43
|
+
• **new PubKey**(`rawPubKey`): [`PubKey`](PubKey.md)
|
|
44
|
+
|
|
45
|
+
Create a new instance of a public key
|
|
46
|
+
|
|
47
|
+
#### Parameters
|
|
48
|
+
|
|
49
|
+
| Name | Type | Description |
|
|
50
|
+
| :---------- | :------- | :----------------- |
|
|
51
|
+
| `rawPubKey` | `PubKey` | the raw public key |
|
|
52
|
+
|
|
53
|
+
#### Returns
|
|
54
|
+
|
|
55
|
+
[`PubKey`](PubKey.md)
|
|
56
|
+
|
|
57
|
+
#### Defined in
|
|
58
|
+
|
|
59
|
+
[publicKey.ts:24](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/publicKey.ts#L24)
|
|
60
|
+
|
|
61
|
+
## Properties
|
|
62
|
+
|
|
63
|
+
### rawPubKey
|
|
64
|
+
|
|
65
|
+
• **rawPubKey**: `PubKey`
|
|
66
|
+
|
|
67
|
+
#### Defined in
|
|
68
|
+
|
|
69
|
+
[publicKey.ts:18](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/publicKey.ts#L18)
|
|
70
|
+
|
|
71
|
+
## Methods
|
|
72
|
+
|
|
73
|
+
### asArray
|
|
74
|
+
|
|
75
|
+
▸ **asArray**(): `bigint`[]
|
|
76
|
+
|
|
77
|
+
Return this public key as an array of bigints
|
|
78
|
+
|
|
79
|
+
#### Returns
|
|
80
|
+
|
|
81
|
+
`bigint`[]
|
|
82
|
+
|
|
83
|
+
the public key as an array of bigints
|
|
84
|
+
|
|
85
|
+
#### Defined in
|
|
86
|
+
|
|
87
|
+
[publicKey.ts:59](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/publicKey.ts#L59)
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### asCircuitInputs
|
|
92
|
+
|
|
93
|
+
▸ **asCircuitInputs**(): `string`[]
|
|
94
|
+
|
|
95
|
+
Return this public key as circuit inputs
|
|
96
|
+
|
|
97
|
+
#### Returns
|
|
98
|
+
|
|
99
|
+
`string`[]
|
|
100
|
+
|
|
101
|
+
an array of strings
|
|
102
|
+
|
|
103
|
+
#### Defined in
|
|
104
|
+
|
|
105
|
+
[publicKey.ts:53](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/publicKey.ts#L53)
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
### asContractParam
|
|
110
|
+
|
|
111
|
+
▸ **asContractParam**(): [`IG1ContractParams`](../interfaces/IG1ContractParams.md)
|
|
112
|
+
|
|
113
|
+
Return this public key as smart contract parameters
|
|
114
|
+
|
|
115
|
+
#### Returns
|
|
116
|
+
|
|
117
|
+
[`IG1ContractParams`](../interfaces/IG1ContractParams.md)
|
|
118
|
+
|
|
119
|
+
the public key as smart contract parameters
|
|
120
|
+
|
|
121
|
+
#### Defined in
|
|
122
|
+
|
|
123
|
+
[publicKey.ts:40](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/publicKey.ts#L40)
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
### copy
|
|
128
|
+
|
|
129
|
+
▸ **copy**(): [`PubKey`](PubKey.md)
|
|
130
|
+
|
|
131
|
+
Create a copy of the public key
|
|
132
|
+
|
|
133
|
+
#### Returns
|
|
134
|
+
|
|
135
|
+
[`PubKey`](PubKey.md)
|
|
136
|
+
|
|
137
|
+
a copy of the public key
|
|
138
|
+
|
|
139
|
+
#### Defined in
|
|
140
|
+
|
|
141
|
+
[publicKey.ts:34](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/publicKey.ts#L34)
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
### equals
|
|
146
|
+
|
|
147
|
+
▸ **equals**(`p`): `boolean`
|
|
148
|
+
|
|
149
|
+
Check whether this public key equals to another public key
|
|
150
|
+
|
|
151
|
+
#### Parameters
|
|
152
|
+
|
|
153
|
+
| Name | Type | Description |
|
|
154
|
+
| :--- | :-------------------- | :----------------------------- |
|
|
155
|
+
| `p` | [`PubKey`](PubKey.md) | the public key to compare with |
|
|
156
|
+
|
|
157
|
+
#### Returns
|
|
158
|
+
|
|
159
|
+
`boolean`
|
|
160
|
+
|
|
161
|
+
whether they match
|
|
162
|
+
|
|
163
|
+
#### Defined in
|
|
164
|
+
|
|
165
|
+
[publicKey.ts:92](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/publicKey.ts#L92)
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
### hash
|
|
170
|
+
|
|
171
|
+
▸ **hash**(): `bigint`
|
|
172
|
+
|
|
173
|
+
Hash the two baby jubjub coordinates
|
|
174
|
+
|
|
175
|
+
#### Returns
|
|
176
|
+
|
|
177
|
+
`bigint`
|
|
178
|
+
|
|
179
|
+
the hash of this public key
|
|
180
|
+
|
|
181
|
+
#### Defined in
|
|
182
|
+
|
|
183
|
+
[publicKey.ts:85](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/publicKey.ts#L85)
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
### serialize
|
|
188
|
+
|
|
189
|
+
▸ **serialize**(): `string`
|
|
190
|
+
|
|
191
|
+
Generate a serialized public key from this public key object
|
|
192
|
+
|
|
193
|
+
#### Returns
|
|
194
|
+
|
|
195
|
+
`string`
|
|
196
|
+
|
|
197
|
+
the string representation of a serialized public key
|
|
198
|
+
|
|
199
|
+
#### Defined in
|
|
200
|
+
|
|
201
|
+
[publicKey.ts:65](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/publicKey.ts#L65)
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
### toJSON
|
|
206
|
+
|
|
207
|
+
▸ **toJSON**(): [`IJsonPublicKey`](../modules.md#ijsonpublickey)
|
|
208
|
+
|
|
209
|
+
Serialize this object
|
|
210
|
+
|
|
211
|
+
#### Returns
|
|
212
|
+
|
|
213
|
+
[`IJsonPublicKey`](../modules.md#ijsonpublickey)
|
|
214
|
+
|
|
215
|
+
#### Defined in
|
|
216
|
+
|
|
217
|
+
[publicKey.ts:128](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/publicKey.ts#L128)
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
### deserialize
|
|
222
|
+
|
|
223
|
+
▸ **deserialize**(`s`): [`PubKey`](PubKey.md)
|
|
224
|
+
|
|
225
|
+
Deserialize a serialized public key
|
|
226
|
+
|
|
227
|
+
#### Parameters
|
|
228
|
+
|
|
229
|
+
| Name | Type | Description |
|
|
230
|
+
| :--- | :------- | :------------------------ |
|
|
231
|
+
| `s` | `string` | the serialized public key |
|
|
232
|
+
|
|
233
|
+
#### Returns
|
|
234
|
+
|
|
235
|
+
[`PubKey`](PubKey.md)
|
|
236
|
+
|
|
237
|
+
the deserialized public key
|
|
238
|
+
|
|
239
|
+
#### Defined in
|
|
240
|
+
|
|
241
|
+
[publicKey.ts:99](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/publicKey.ts#L99)
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
### fromJSON
|
|
246
|
+
|
|
247
|
+
▸ **fromJSON**(`json`): [`PubKey`](PubKey.md)
|
|
248
|
+
|
|
249
|
+
Deserialize a JSON object into a PubKey instance
|
|
250
|
+
|
|
251
|
+
#### Parameters
|
|
252
|
+
|
|
253
|
+
| Name | Type | Description |
|
|
254
|
+
| :----- | :----------------------------------------------- | :-------------- |
|
|
255
|
+
| `json` | [`IJsonPublicKey`](../modules.md#ijsonpublickey) | the json object |
|
|
256
|
+
|
|
257
|
+
#### Returns
|
|
258
|
+
|
|
259
|
+
[`PubKey`](PubKey.md)
|
|
260
|
+
|
|
261
|
+
PubKey
|
|
262
|
+
|
|
263
|
+
#### Defined in
|
|
264
|
+
|
|
265
|
+
[publicKey.ts:139](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/publicKey.ts#L139)
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
### isValidSerializedPubKey
|
|
270
|
+
|
|
271
|
+
▸ **isValidSerializedPubKey**(`s`): `boolean`
|
|
272
|
+
|
|
273
|
+
Check whether a serialized public key is serialized correctly
|
|
274
|
+
|
|
275
|
+
#### Parameters
|
|
276
|
+
|
|
277
|
+
| Name | Type | Description |
|
|
278
|
+
| :--- | :------- | :------------------------ |
|
|
279
|
+
| `s` | `string` | the serialized public key |
|
|
280
|
+
|
|
281
|
+
#### Returns
|
|
282
|
+
|
|
283
|
+
`boolean`
|
|
284
|
+
|
|
285
|
+
whether the serialized public key is valid
|
|
286
|
+
|
|
287
|
+
#### Defined in
|
|
288
|
+
|
|
289
|
+
[publicKey.ts:114](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/publicKey.ts#L114)
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: StateLeaf
|
|
3
|
+
sidebar_label: StateLeaf
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**`Notice`**
|
|
7
|
+
|
|
8
|
+
A leaf in the state tree, which maps
|
|
9
|
+
public keys to voice credit balances
|
|
10
|
+
|
|
11
|
+
## Implements
|
|
12
|
+
|
|
13
|
+
- [`IStateLeaf`](../interfaces/IStateLeaf.md)
|
|
14
|
+
|
|
15
|
+
## Table of contents
|
|
16
|
+
|
|
17
|
+
### Constructors
|
|
18
|
+
|
|
19
|
+
- [constructor](StateLeaf.md#constructor)
|
|
20
|
+
|
|
21
|
+
### Properties
|
|
22
|
+
|
|
23
|
+
- [pubKey](StateLeaf.md#pubkey)
|
|
24
|
+
- [timestamp](StateLeaf.md#timestamp)
|
|
25
|
+
- [voiceCreditBalance](StateLeaf.md#voicecreditbalance)
|
|
26
|
+
|
|
27
|
+
### Methods
|
|
28
|
+
|
|
29
|
+
- [asArray](StateLeaf.md#asarray)
|
|
30
|
+
- [asCircuitInputs](StateLeaf.md#ascircuitinputs)
|
|
31
|
+
- [asContractParam](StateLeaf.md#ascontractparam)
|
|
32
|
+
- [copy](StateLeaf.md#copy)
|
|
33
|
+
- [equals](StateLeaf.md#equals)
|
|
34
|
+
- [hash](StateLeaf.md#hash)
|
|
35
|
+
- [serialize](StateLeaf.md#serialize)
|
|
36
|
+
- [toJSON](StateLeaf.md#tojson)
|
|
37
|
+
- [deserialize](StateLeaf.md#deserialize)
|
|
38
|
+
- [fromJSON](StateLeaf.md#fromjson)
|
|
39
|
+
- [genBlankLeaf](StateLeaf.md#genblankleaf)
|
|
40
|
+
- [genRandomLeaf](StateLeaf.md#genrandomleaf)
|
|
41
|
+
|
|
42
|
+
## Constructors
|
|
43
|
+
|
|
44
|
+
### constructor
|
|
45
|
+
|
|
46
|
+
• **new StateLeaf**(`pubKey`, `voiceCreditBalance`, `timestamp`): [`StateLeaf`](StateLeaf.md)
|
|
47
|
+
|
|
48
|
+
Create a new instance of a state leaf
|
|
49
|
+
|
|
50
|
+
#### Parameters
|
|
51
|
+
|
|
52
|
+
| Name | Type | Description |
|
|
53
|
+
| :------------------- | :-------------------- | :--------------------------------------- |
|
|
54
|
+
| `pubKey` | [`PubKey`](PubKey.md) | the public key of the user signin up |
|
|
55
|
+
| `voiceCreditBalance` | `bigint` | the voice credit balance of the user |
|
|
56
|
+
| `timestamp` | `bigint` | the timestamp of when the user signed-up |
|
|
57
|
+
|
|
58
|
+
#### Returns
|
|
59
|
+
|
|
60
|
+
[`StateLeaf`](StateLeaf.md)
|
|
61
|
+
|
|
62
|
+
#### Defined in
|
|
63
|
+
|
|
64
|
+
[stateLeaf.ts:25](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/stateLeaf.ts#L25)
|
|
65
|
+
|
|
66
|
+
## Properties
|
|
67
|
+
|
|
68
|
+
### pubKey
|
|
69
|
+
|
|
70
|
+
• **pubKey**: [`PubKey`](PubKey.md)
|
|
71
|
+
|
|
72
|
+
#### Implementation of
|
|
73
|
+
|
|
74
|
+
[IStateLeaf](../interfaces/IStateLeaf.md).[pubKey](../interfaces/IStateLeaf.md#pubkey)
|
|
75
|
+
|
|
76
|
+
#### Defined in
|
|
77
|
+
|
|
78
|
+
[stateLeaf.ts:13](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/stateLeaf.ts#L13)
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
### timestamp
|
|
83
|
+
|
|
84
|
+
• **timestamp**: `bigint`
|
|
85
|
+
|
|
86
|
+
#### Defined in
|
|
87
|
+
|
|
88
|
+
[stateLeaf.ts:17](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/stateLeaf.ts#L17)
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
### voiceCreditBalance
|
|
93
|
+
|
|
94
|
+
• **voiceCreditBalance**: `bigint`
|
|
95
|
+
|
|
96
|
+
#### Implementation of
|
|
97
|
+
|
|
98
|
+
[IStateLeaf](../interfaces/IStateLeaf.md).[voiceCreditBalance](../interfaces/IStateLeaf.md#voicecreditbalance)
|
|
99
|
+
|
|
100
|
+
#### Defined in
|
|
101
|
+
|
|
102
|
+
[stateLeaf.ts:15](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/stateLeaf.ts#L15)
|
|
103
|
+
|
|
104
|
+
## Methods
|
|
105
|
+
|
|
106
|
+
### asArray
|
|
107
|
+
|
|
108
|
+
▸ **asArray**(): `bigint`[]
|
|
109
|
+
|
|
110
|
+
Return this state leaf as an array of bigints
|
|
111
|
+
|
|
112
|
+
#### Returns
|
|
113
|
+
|
|
114
|
+
`bigint`[]
|
|
115
|
+
|
|
116
|
+
the state leaf as an array of bigints
|
|
117
|
+
|
|
118
|
+
#### Defined in
|
|
119
|
+
|
|
120
|
+
[stateLeaf.ts:79](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/stateLeaf.ts#L79)
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
### asCircuitInputs
|
|
125
|
+
|
|
126
|
+
▸ **asCircuitInputs**(): `bigint`[]
|
|
127
|
+
|
|
128
|
+
Return this state leaf as an array of bigints
|
|
129
|
+
|
|
130
|
+
#### Returns
|
|
131
|
+
|
|
132
|
+
`bigint`[]
|
|
133
|
+
|
|
134
|
+
the state leaf as an array of bigints
|
|
135
|
+
|
|
136
|
+
#### Defined in
|
|
137
|
+
|
|
138
|
+
[stateLeaf.ts:85](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/stateLeaf.ts#L85)
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
### asContractParam
|
|
143
|
+
|
|
144
|
+
▸ **asContractParam**(): [`IStateLeafContractParams`](../interfaces/IStateLeafContractParams.md)
|
|
145
|
+
|
|
146
|
+
Return this state leaf as a contract param
|
|
147
|
+
|
|
148
|
+
#### Returns
|
|
149
|
+
|
|
150
|
+
[`IStateLeafContractParams`](../interfaces/IStateLeafContractParams.md)
|
|
151
|
+
|
|
152
|
+
the state leaf as a contract param (object)
|
|
153
|
+
|
|
154
|
+
#### Defined in
|
|
155
|
+
|
|
156
|
+
[stateLeaf.ts:97](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/stateLeaf.ts#L97)
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
### copy
|
|
161
|
+
|
|
162
|
+
▸ **copy**(): [`StateLeaf`](StateLeaf.md)
|
|
163
|
+
|
|
164
|
+
Crate a deep copy of the object
|
|
165
|
+
|
|
166
|
+
#### Returns
|
|
167
|
+
|
|
168
|
+
[`StateLeaf`](StateLeaf.md)
|
|
169
|
+
|
|
170
|
+
a copy of the state leaf
|
|
171
|
+
|
|
172
|
+
#### Defined in
|
|
173
|
+
|
|
174
|
+
[stateLeaf.ts:35](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/stateLeaf.ts#L35)
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
### equals
|
|
179
|
+
|
|
180
|
+
▸ **equals**(`s`): `boolean`
|
|
181
|
+
|
|
182
|
+
Check if two state leaves are equal
|
|
183
|
+
|
|
184
|
+
#### Parameters
|
|
185
|
+
|
|
186
|
+
| Name | Type | Description |
|
|
187
|
+
| :--- | :-------------------------- | :----------------------------- |
|
|
188
|
+
| `s` | [`StateLeaf`](StateLeaf.md) | the state leaf to compare with |
|
|
189
|
+
|
|
190
|
+
#### Returns
|
|
191
|
+
|
|
192
|
+
`boolean`
|
|
193
|
+
|
|
194
|
+
whether they are equal or not
|
|
195
|
+
|
|
196
|
+
#### Defined in
|
|
197
|
+
|
|
198
|
+
[stateLeaf.ts:110](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/stateLeaf.ts#L110)
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
### hash
|
|
203
|
+
|
|
204
|
+
▸ **hash**(): `bigint`
|
|
205
|
+
|
|
206
|
+
Hash this state leaf (first convert as array)
|
|
207
|
+
|
|
208
|
+
#### Returns
|
|
209
|
+
|
|
210
|
+
`bigint`
|
|
211
|
+
|
|
212
|
+
the has of the state leaf elements
|
|
213
|
+
|
|
214
|
+
#### Defined in
|
|
215
|
+
|
|
216
|
+
[stateLeaf.ts:91](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/stateLeaf.ts#L91)
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
### serialize
|
|
221
|
+
|
|
222
|
+
▸ **serialize**(): `string`
|
|
223
|
+
|
|
224
|
+
Serialize the state leaf
|
|
225
|
+
|
|
226
|
+
#### Returns
|
|
227
|
+
|
|
228
|
+
`string`
|
|
229
|
+
|
|
230
|
+
**`Notice`**
|
|
231
|
+
|
|
232
|
+
serialize the public key
|
|
233
|
+
|
|
234
|
+
**`Notice`**
|
|
235
|
+
|
|
236
|
+
convert the voice credit balance and timestamp to a hex string
|
|
237
|
+
|
|
238
|
+
#### Defined in
|
|
239
|
+
|
|
240
|
+
[stateLeaf.ts:122](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/stateLeaf.ts#L122)
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
### toJSON
|
|
245
|
+
|
|
246
|
+
▸ **toJSON**(): [`IJsonStateLeaf`](../interfaces/IJsonStateLeaf.md)
|
|
247
|
+
|
|
248
|
+
Serialize to a JSON object
|
|
249
|
+
|
|
250
|
+
#### Returns
|
|
251
|
+
|
|
252
|
+
[`IJsonStateLeaf`](../interfaces/IJsonStateLeaf.md)
|
|
253
|
+
|
|
254
|
+
#### Defined in
|
|
255
|
+
|
|
256
|
+
[stateLeaf.ts:143](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/stateLeaf.ts#L143)
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
### deserialize
|
|
261
|
+
|
|
262
|
+
▸ **deserialize**(`serialized`): [`StateLeaf`](StateLeaf.md)
|
|
263
|
+
|
|
264
|
+
Deserialize the state leaf
|
|
265
|
+
|
|
266
|
+
#### Parameters
|
|
267
|
+
|
|
268
|
+
| Name | Type | Description |
|
|
269
|
+
| :----------- | :------- | :------------------------ |
|
|
270
|
+
| `serialized` | `string` | the serialized state leaf |
|
|
271
|
+
|
|
272
|
+
#### Returns
|
|
273
|
+
|
|
274
|
+
[`StateLeaf`](StateLeaf.md)
|
|
275
|
+
|
|
276
|
+
a deserialized state leaf
|
|
277
|
+
|
|
278
|
+
#### Defined in
|
|
279
|
+
|
|
280
|
+
[stateLeaf.ts:133](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/stateLeaf.ts#L133)
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
### fromJSON
|
|
285
|
+
|
|
286
|
+
▸ **fromJSON**(`json`): [`StateLeaf`](StateLeaf.md)
|
|
287
|
+
|
|
288
|
+
Deserialize into a StateLeaf instance
|
|
289
|
+
|
|
290
|
+
#### Parameters
|
|
291
|
+
|
|
292
|
+
| Name | Type | Description |
|
|
293
|
+
| :----- | :-------------------------------------------------- | :---------------------- |
|
|
294
|
+
| `json` | [`IJsonStateLeaf`](../interfaces/IJsonStateLeaf.md) | the json representation |
|
|
295
|
+
|
|
296
|
+
#### Returns
|
|
297
|
+
|
|
298
|
+
[`StateLeaf`](StateLeaf.md)
|
|
299
|
+
|
|
300
|
+
the deserialized object as a StateLeaf instance
|
|
301
|
+
|
|
302
|
+
#### Defined in
|
|
303
|
+
|
|
304
|
+
[stateLeaf.ts:156](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/stateLeaf.ts#L156)
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
### genBlankLeaf
|
|
309
|
+
|
|
310
|
+
▸ **genBlankLeaf**(): [`StateLeaf`](StateLeaf.md)
|
|
311
|
+
|
|
312
|
+
Generate a blank state leaf
|
|
313
|
+
|
|
314
|
+
#### Returns
|
|
315
|
+
|
|
316
|
+
[`StateLeaf`](StateLeaf.md)
|
|
317
|
+
|
|
318
|
+
a blank state leaf
|
|
319
|
+
|
|
320
|
+
#### Defined in
|
|
321
|
+
|
|
322
|
+
[stateLeaf.ts:47](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/stateLeaf.ts#L47)
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
### genRandomLeaf
|
|
327
|
+
|
|
328
|
+
▸ **genRandomLeaf**(): [`StateLeaf`](StateLeaf.md)
|
|
329
|
+
|
|
330
|
+
Generate a random leaf (random salt and random key pair)
|
|
331
|
+
|
|
332
|
+
#### Returns
|
|
333
|
+
|
|
334
|
+
[`StateLeaf`](StateLeaf.md)
|
|
335
|
+
|
|
336
|
+
a random state leaf
|
|
337
|
+
|
|
338
|
+
#### Defined in
|
|
339
|
+
|
|
340
|
+
[stateLeaf.ts:70](https://github.com/privacy-scaling-explorations/maci/blob/6a905de08/domainobjs/ts/stateLeaf.ts#L70)
|