-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
27272d1
commit 2d97e76
Showing
5 changed files
with
51 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
pragma circom 2.1.1; | ||
|
||
include "../../../circuits/lib/utils/claimUtils.circom"; | ||
include "../../../circuits/lib/utils/tags-managing.circom"; | ||
|
||
component main = getSubjectLocation(); | ||
template wrappedGetSubjectLocation() { | ||
signal input claimFlags[32]; | ||
signal output out; | ||
|
||
component check = getSubjectLocation(); | ||
check.claimFlags <== AddBinaryArrayTag(32)(claimFlags); | ||
out <== check.out; | ||
} | ||
|
||
component main = wrappedGetSubjectLocation(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
pragma circom 2.1.1; | ||
|
||
include "../../../circuits/lib/utils/claimUtils.circom"; | ||
include "../../../circuits/lib/utils/tags-managing.circom"; | ||
|
||
component main = isExpirable(); | ||
template wrappedIsExpirable() { | ||
signal input claimFlags[32]; | ||
signal output out; | ||
|
||
component check = isExpirable(); | ||
check.claimFlags <== AddBinaryArrayTag(32)(claimFlags); | ||
out <== check.out; | ||
} | ||
|
||
component main = wrappedIsExpirable(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
pragma circom 2.1.1; | ||
|
||
include "../../../circuits/lib/utils/claimUtils.circom"; | ||
include "../../../circuits/lib/utils/tags-managing.circom"; | ||
|
||
component main = isUpdatable(); | ||
template wrappedIsUpdatable() { | ||
signal input claimFlags[32]; | ||
signal output out; | ||
|
||
component check = isUpdatable(); | ||
check.claimFlags <== AddBinaryArrayTag(32)(claimFlags); | ||
out <== check.out; | ||
} | ||
|
||
component main = wrappedIsUpdatable(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
pragma circom 2.1.1; | ||
|
||
include "../../../circuits/lib/utils/claimUtils.circom"; | ||
include "../../../circuits/lib/utils/tags-managing.circom"; | ||
|
||
component main = verifyExpirationTime(); | ||
template wrappedVerifyExpirationTime() { | ||
signal input expirationFlag; // claimFlags[3] (expiration flag) is set | ||
signal input claim[8]; | ||
signal input timestamp; | ||
|
||
component check = verifyExpirationTime(); | ||
check.expirationFlag <== AddBinaryTag()(expirationFlag); | ||
check.claim <== claim; | ||
check.timestamp <== timestamp; | ||
} | ||
|
||
component main = wrappedVerifyExpirationTime(); |