├── .DS_Store ├── .gitattributes ├── .github └── workflows │ └── node.js.yml ├── .gitignore ├── README.MD ├── circuits ├── hasherPoseidon.circom ├── identityCommitment.circom ├── incrementalMerkleTree.circom ├── modulo.circom ├── poseidon │ ├── common.circom │ ├── poseidonHashT3.circom │ └── poseidonHashT6.circom ├── processAttestations.circom ├── proveReputation.circom ├── sparseMerkleTree.circom ├── test │ ├── allEpochKeyProcessed_test.circom │ ├── epochKeyExists_test.circom │ ├── hasher5_test.circom │ ├── hashleftright_test.circom │ ├── identityCommitment_test.circom │ ├── merkleTreeInclusionProof_test.circom │ ├── merkleTreeLeafExists_test.circom │ ├── processAttestations_test.circom │ ├── proveReputation_test.circom │ ├── smtInclusionProof_test.circom │ ├── smtLeafExists_test.circom │ ├── userStateTransition_test.circom │ ├── verifyEpochKey_test.circom │ └── verifyHashChain_test.circom ├── userStateTransition.circom ├── verifiyEpochKey.circom └── verifyHashChain.circom ├── cli ├── attest.ts ├── attesterSignUp.ts ├── defaults.ts ├── deploy.ts ├── epochTransition.ts ├── genEpochKeyAndProof.ts ├── genReputationProof.ts ├── genUnirepIdentity.ts ├── index.ts ├── prefix.ts ├── test │ ├── testAllCommands.ts │ └── utils.ts ├── userSignUp.ts ├── userStateTransition.ts ├── utils.ts ├── verifyEpochKeyProof.ts └── verifyReputationProof.ts ├── config ├── nullifierDomainSeparator.ts └── testLocal.ts ├── contracts ├── Address.sol ├── ComputeRoot.sol ├── DomainObjs.sol ├── Hasher.sol ├── Poseidon.sol ├── SnarkConstants.sol ├── Unirep.sol └── UnirepParameters.sol ├── core ├── UnirepState.ts ├── UserState.ts ├── index.ts └── utils.ts ├── crypto ├── SMT │ ├── SparseMerkleTree.ts │ ├── index.ts │ └── utils.ts └── crypto.ts ├── hardhat.config.ts ├── package.json ├── scripts ├── buildPoseidon.ts ├── buildProveReputationSnark.sh ├── buildSnarks.ts ├── buildUserStateTransitionSnark.sh ├── buildVerifyEpochKeySnark.sh ├── genVerifier.ts ├── installZkutil.sh ├── testCLI.sh └── verifier_groth16.sol ├── test ├── circuits │ ├── IncrementalMerkleTree.ts │ ├── hasher.ts │ ├── identityCommitment.ts │ ├── processAttestations.ts │ ├── proveReputation.ts │ ├── sparseMerkleTree.ts │ ├── userStateTransition.ts │ ├── utils.ts │ ├── verifyEpochKey.ts │ └── verifyHashChain.ts ├── contracts │ ├── Attesting.ts │ ├── EpochTransition.ts │ ├── EventSequencing.ts │ └── SignUp.ts ├── integration │ └── Integration.ts └── utils.ts └── tsconfig.json /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/.DS_Store -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sol linguist-language=Solidity -------------------------------------------------------------------------------- /.github/workflows/node.js.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/.github/workflows/node.js.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/.gitignore -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/README.MD -------------------------------------------------------------------------------- /circuits/hasherPoseidon.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/hasherPoseidon.circom -------------------------------------------------------------------------------- /circuits/identityCommitment.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/identityCommitment.circom -------------------------------------------------------------------------------- /circuits/incrementalMerkleTree.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/incrementalMerkleTree.circom -------------------------------------------------------------------------------- /circuits/modulo.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/modulo.circom -------------------------------------------------------------------------------- /circuits/poseidon/common.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/poseidon/common.circom -------------------------------------------------------------------------------- /circuits/poseidon/poseidonHashT3.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/poseidon/poseidonHashT3.circom -------------------------------------------------------------------------------- /circuits/poseidon/poseidonHashT6.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/poseidon/poseidonHashT6.circom -------------------------------------------------------------------------------- /circuits/processAttestations.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/processAttestations.circom -------------------------------------------------------------------------------- /circuits/proveReputation.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/proveReputation.circom -------------------------------------------------------------------------------- /circuits/sparseMerkleTree.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/sparseMerkleTree.circom -------------------------------------------------------------------------------- /circuits/test/allEpochKeyProcessed_test.circom: -------------------------------------------------------------------------------- 1 | include "../userStateTransition.circom" 2 | 3 | component main = allEpochKeyProcessed(8, 5); -------------------------------------------------------------------------------- /circuits/test/epochKeyExists_test.circom: -------------------------------------------------------------------------------- 1 | include "../userStateTransition.circom" 2 | 3 | component main = epochKeyExist(32); -------------------------------------------------------------------------------- /circuits/test/hasher5_test.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/test/hasher5_test.circom -------------------------------------------------------------------------------- /circuits/test/hashleftright_test.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/test/hashleftright_test.circom -------------------------------------------------------------------------------- /circuits/test/identityCommitment_test.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/test/identityCommitment_test.circom -------------------------------------------------------------------------------- /circuits/test/merkleTreeInclusionProof_test.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/test/merkleTreeInclusionProof_test.circom -------------------------------------------------------------------------------- /circuits/test/merkleTreeLeafExists_test.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/test/merkleTreeLeafExists_test.circom -------------------------------------------------------------------------------- /circuits/test/processAttestations_test.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/test/processAttestations_test.circom -------------------------------------------------------------------------------- /circuits/test/proveReputation_test.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/test/proveReputation_test.circom -------------------------------------------------------------------------------- /circuits/test/smtInclusionProof_test.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/test/smtInclusionProof_test.circom -------------------------------------------------------------------------------- /circuits/test/smtLeafExists_test.circom: -------------------------------------------------------------------------------- 1 | include "../sparseMerkleTree.circom" 2 | 3 | component main = SMTLeafExists(8); -------------------------------------------------------------------------------- /circuits/test/userStateTransition_test.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/test/userStateTransition_test.circom -------------------------------------------------------------------------------- /circuits/test/verifyEpochKey_test.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/test/verifyEpochKey_test.circom -------------------------------------------------------------------------------- /circuits/test/verifyHashChain_test.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/test/verifyHashChain_test.circom -------------------------------------------------------------------------------- /circuits/userStateTransition.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/userStateTransition.circom -------------------------------------------------------------------------------- /circuits/verifiyEpochKey.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/verifiyEpochKey.circom -------------------------------------------------------------------------------- /circuits/verifyHashChain.circom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/circuits/verifyHashChain.circom -------------------------------------------------------------------------------- /cli/attest.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/cli/attest.ts -------------------------------------------------------------------------------- /cli/attesterSignUp.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/cli/attesterSignUp.ts -------------------------------------------------------------------------------- /cli/defaults.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/cli/defaults.ts -------------------------------------------------------------------------------- /cli/deploy.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/cli/deploy.ts -------------------------------------------------------------------------------- /cli/epochTransition.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/cli/epochTransition.ts -------------------------------------------------------------------------------- /cli/genEpochKeyAndProof.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/cli/genEpochKeyAndProof.ts -------------------------------------------------------------------------------- /cli/genReputationProof.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/cli/genReputationProof.ts -------------------------------------------------------------------------------- /cli/genUnirepIdentity.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/cli/genUnirepIdentity.ts -------------------------------------------------------------------------------- /cli/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/cli/index.ts -------------------------------------------------------------------------------- /cli/prefix.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/cli/prefix.ts -------------------------------------------------------------------------------- /cli/test/testAllCommands.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/cli/test/testAllCommands.ts -------------------------------------------------------------------------------- /cli/test/utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/cli/test/utils.ts -------------------------------------------------------------------------------- /cli/userSignUp.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/cli/userSignUp.ts -------------------------------------------------------------------------------- /cli/userStateTransition.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/cli/userStateTransition.ts -------------------------------------------------------------------------------- /cli/utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/cli/utils.ts -------------------------------------------------------------------------------- /cli/verifyEpochKeyProof.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/cli/verifyEpochKeyProof.ts -------------------------------------------------------------------------------- /cli/verifyReputationProof.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/cli/verifyReputationProof.ts -------------------------------------------------------------------------------- /config/nullifierDomainSeparator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/config/nullifierDomainSeparator.ts -------------------------------------------------------------------------------- /config/testLocal.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/config/testLocal.ts -------------------------------------------------------------------------------- /contracts/Address.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/contracts/Address.sol -------------------------------------------------------------------------------- /contracts/ComputeRoot.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/contracts/ComputeRoot.sol -------------------------------------------------------------------------------- /contracts/DomainObjs.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/contracts/DomainObjs.sol -------------------------------------------------------------------------------- /contracts/Hasher.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/contracts/Hasher.sol -------------------------------------------------------------------------------- /contracts/Poseidon.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/contracts/Poseidon.sol -------------------------------------------------------------------------------- /contracts/SnarkConstants.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/contracts/SnarkConstants.sol -------------------------------------------------------------------------------- /contracts/Unirep.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/contracts/Unirep.sol -------------------------------------------------------------------------------- /contracts/UnirepParameters.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/contracts/UnirepParameters.sol -------------------------------------------------------------------------------- /core/UnirepState.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/core/UnirepState.ts -------------------------------------------------------------------------------- /core/UserState.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/core/UserState.ts -------------------------------------------------------------------------------- /core/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/core/index.ts -------------------------------------------------------------------------------- /core/utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/core/utils.ts -------------------------------------------------------------------------------- /crypto/SMT/SparseMerkleTree.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/crypto/SMT/SparseMerkleTree.ts -------------------------------------------------------------------------------- /crypto/SMT/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/crypto/SMT/index.ts -------------------------------------------------------------------------------- /crypto/SMT/utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/crypto/SMT/utils.ts -------------------------------------------------------------------------------- /crypto/crypto.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/crypto/crypto.ts -------------------------------------------------------------------------------- /hardhat.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/hardhat.config.ts -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/package.json -------------------------------------------------------------------------------- /scripts/buildPoseidon.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/scripts/buildPoseidon.ts -------------------------------------------------------------------------------- /scripts/buildProveReputationSnark.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/scripts/buildProveReputationSnark.sh -------------------------------------------------------------------------------- /scripts/buildSnarks.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/scripts/buildSnarks.ts -------------------------------------------------------------------------------- /scripts/buildUserStateTransitionSnark.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/scripts/buildUserStateTransitionSnark.sh -------------------------------------------------------------------------------- /scripts/buildVerifyEpochKeySnark.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/scripts/buildVerifyEpochKeySnark.sh -------------------------------------------------------------------------------- /scripts/genVerifier.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/scripts/genVerifier.ts -------------------------------------------------------------------------------- /scripts/installZkutil.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/scripts/installZkutil.sh -------------------------------------------------------------------------------- /scripts/testCLI.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/scripts/testCLI.sh -------------------------------------------------------------------------------- /scripts/verifier_groth16.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/scripts/verifier_groth16.sol -------------------------------------------------------------------------------- /test/circuits/IncrementalMerkleTree.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/test/circuits/IncrementalMerkleTree.ts -------------------------------------------------------------------------------- /test/circuits/hasher.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/test/circuits/hasher.ts -------------------------------------------------------------------------------- /test/circuits/identityCommitment.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/test/circuits/identityCommitment.ts -------------------------------------------------------------------------------- /test/circuits/processAttestations.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/test/circuits/processAttestations.ts -------------------------------------------------------------------------------- /test/circuits/proveReputation.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/test/circuits/proveReputation.ts -------------------------------------------------------------------------------- /test/circuits/sparseMerkleTree.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/test/circuits/sparseMerkleTree.ts -------------------------------------------------------------------------------- /test/circuits/userStateTransition.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/test/circuits/userStateTransition.ts -------------------------------------------------------------------------------- /test/circuits/utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/test/circuits/utils.ts -------------------------------------------------------------------------------- /test/circuits/verifyEpochKey.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/test/circuits/verifyEpochKey.ts -------------------------------------------------------------------------------- /test/circuits/verifyHashChain.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/test/circuits/verifyHashChain.ts -------------------------------------------------------------------------------- /test/contracts/Attesting.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/test/contracts/Attesting.ts -------------------------------------------------------------------------------- /test/contracts/EpochTransition.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/test/contracts/EpochTransition.ts -------------------------------------------------------------------------------- /test/contracts/EventSequencing.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/test/contracts/EventSequencing.ts -------------------------------------------------------------------------------- /test/contracts/SignUp.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/test/contracts/SignUp.ts -------------------------------------------------------------------------------- /test/integration/Integration.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/test/integration/Integration.ts -------------------------------------------------------------------------------- /test/utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/test/utils.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NIC619/UniRep/HEAD/tsconfig.json --------------------------------------------------------------------------------