Skip to content

Commit

Permalink
Add citizenship check to queryIdentityTd1
Browse files Browse the repository at this point in the history
  • Loading branch information
erdoganishe committed Oct 15, 2024
1 parent 8760a79 commit a19ea63
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions circuits/identityManagement/circuits/queryIdentityTD1.circom
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ include "identityStateVerifier.circom";
include "../../dateUtilities/dateComparisonEncoded.circom";
include "circomlib/circuits/comparators.circom";
include "../../dateUtilities/dateComparisonEncodedNormalized.circom";
include "./citizenshipCheck.circom";

// QUERY SELECTOR:
// 0 - nullifier (+)
Expand Down Expand Up @@ -228,4 +229,11 @@ template QueryIdentity(idTreeDepth) {

identityStateVerifier.idStateRoot <== idStateRoot;
identityStateVerifier.idStateSiblings <== idStateSiblings;

//---------------------------------
//Citizenship Blacklist check

component citizenshipCheck = CitizenshipCheck();
citizenshipCheck.citizenship <== dg1DataExtractor.citizenship;
citizenshipCheck.blacklist <== citizenshipMask;
}
5 changes: 5 additions & 0 deletions circuits/identityManagement/m.circom
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pragma circom 2.1.6;

include "./circuits/queryIdentityTD1.circom";

component main = QueryIdentity(80);

0 comments on commit a19ea63

Please sign in to comment.