Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
OBrezhniev committed Apr 12, 2024
1 parent 4318bc7 commit da072fa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion circuits/lib/utils/claimUtils.circom
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ template getValueByIndex(){
value <== mux.out;
}

// verify that the claim has expiration time and it is less then timestamp
// verify that provided timestamp is less than claim expiration time
template verifyExpirationTime() {
signal input {binary} expirationFlag; // claimFlags[3] (expiration flag) is set
signal input claim[8];
Expand Down
3 changes: 3 additions & 0 deletions circuits/lib/utils/idUtils.circom
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ template GatherID() {
template TakeNBits(n) {
signal input in;
signal output out;

assert(n <= 254);

// We take only n least significant bits from 254 bit number.
component bits = Num2Bits_strict();
bits.in <== in;
Expand Down
1 change: 0 additions & 1 deletion circuits/onchain/credentialAtomicQueryV3OnChain.circom
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ issuerLevels - Merkle tree depth level for claims issued by the issuer
claimLevels - Merkle tree depth level for claim JSON-LD document
maxValueArraySize - Number of elements in comparison array for in/notin operation if level = 3 number of values for
comparison ["1", "2", "3"]
idOwnershipLevels - Merkle tree depth level for personal claims
onChainLevels - Merkle tree depth level for Auth claim on-chain
*/
template credentialAtomicQueryV3OnChain(issuerLevels, claimLevels, maxValueArraySize, idOwnershipLevels, onChainLevels) {
Expand Down

0 comments on commit da072fa

Please sign in to comment.