From 1933f21fc64b0542b6731799657ba8d42f888d71 Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Sun, 28 Sep 2025 11:26:28 -0700 Subject: [PATCH 1/9] feat: Create IIdentityManagerV2 Interface --- src/interfaces/IIdentityManagerV2.sol | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 src/interfaces/IIdentityManagerV2.sol diff --git a/src/interfaces/IIdentityManagerV2.sol b/src/interfaces/IIdentityManagerV2.sol new file mode 100644 index 0000000..1990f8c --- /dev/null +++ b/src/interfaces/IIdentityManagerV2.sol @@ -0,0 +1,4 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.24; + +interface IIdentityManagerV2 {} \ No newline at end of file From ef05dc23e151ccdf8f1ef265ec1780047461e1a7 Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Sun, 28 Sep 2025 11:27:57 -0700 Subject: [PATCH 2/9] feat: Add Contract Title Natspec Comments --- src/interfaces/IIdentityManagerV2.sol | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/interfaces/IIdentityManagerV2.sol b/src/interfaces/IIdentityManagerV2.sol index 1990f8c..c7317dd 100644 --- a/src/interfaces/IIdentityManagerV2.sol +++ b/src/interfaces/IIdentityManagerV2.sol @@ -1,4 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.24; +/** + * @title IIdentityManagerV2 + * @notice Interface for the enhanced IdentityManagerV2 contract + * @dev This interface defines all external functions for identity verification management + */ interface IIdentityManagerV2 {} \ No newline at end of file From 4ae0747dd78102c64c1b33bed1241b5245871746 Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Sun, 28 Sep 2025 11:28:24 -0700 Subject: [PATCH 3/9] feat: Add enum VerificationLevel --- src/interfaces/IIdentityManagerV2.sol | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/interfaces/IIdentityManagerV2.sol b/src/interfaces/IIdentityManagerV2.sol index c7317dd..b073649 100644 --- a/src/interfaces/IIdentityManagerV2.sol +++ b/src/interfaces/IIdentityManagerV2.sol @@ -6,4 +6,7 @@ pragma solidity 0.8.24; * @notice Interface for the enhanced IdentityManagerV2 contract * @dev This interface defines all external functions for identity verification management */ -interface IIdentityManagerV2 {} \ No newline at end of file +interface IIdentityManagerV2 { + // Enums + enum VerificationLevel { NONE, DEVICE, ORB } +} \ No newline at end of file From a39994c1ac2589c59ca63cab2ccf29c468c34131 Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Sun, 28 Sep 2025 11:28:41 -0700 Subject: [PATCH 4/9] feat: Add enum UserType --- src/interfaces/IIdentityManagerV2.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/interfaces/IIdentityManagerV2.sol b/src/interfaces/IIdentityManagerV2.sol index b073649..09d072b 100644 --- a/src/interfaces/IIdentityManagerV2.sol +++ b/src/interfaces/IIdentityManagerV2.sol @@ -9,4 +9,6 @@ pragma solidity 0.8.24; interface IIdentityManagerV2 { // Enums enum VerificationLevel { NONE, DEVICE, ORB } + enum UserType { STUDENT, INSTITUTION, VERIFIER, ADMIN } + } \ No newline at end of file From 1f71398ad8b5acab03bb404d6d1b630edc483497 Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Sun, 28 Sep 2025 11:29:02 -0700 Subject: [PATCH 5/9] feat: Add UserVerification Struct --- src/interfaces/IIdentityManagerV2.sol | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/interfaces/IIdentityManagerV2.sol b/src/interfaces/IIdentityManagerV2.sol index 09d072b..ae50a49 100644 --- a/src/interfaces/IIdentityManagerV2.sol +++ b/src/interfaces/IIdentityManagerV2.sol @@ -11,4 +11,14 @@ interface IIdentityManagerV2 { enum VerificationLevel { NONE, DEVICE, ORB } enum UserType { STUDENT, INSTITUTION, VERIFIER, ADMIN } + // Structs + struct UserVerification { + bool isVerified; + VerificationLevel level; + UserType userType; + uint256 verificationTimestamp; + uint256 expirationTimestamp; + uint256 nullifierHash; + string metadata; + } } \ No newline at end of file From b072c2e081e1cc28d5130844eaa604a86154031a Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Sun, 28 Sep 2025 11:29:22 -0700 Subject: [PATCH 6/9] feat: Add VerificationStats Struct --- src/interfaces/IIdentityManagerV2.sol | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/interfaces/IIdentityManagerV2.sol b/src/interfaces/IIdentityManagerV2.sol index ae50a49..4ec050c 100644 --- a/src/interfaces/IIdentityManagerV2.sol +++ b/src/interfaces/IIdentityManagerV2.sol @@ -21,4 +21,12 @@ interface IIdentityManagerV2 { uint256 nullifierHash; string metadata; } + + struct VerificationStats { + uint256 totalVerifications; + uint256 deviceVerifications; + uint256 orbVerifications; + uint256 activeVerifications; + uint256 expiredVerifications; + } } \ No newline at end of file From e1cc327228752da47352c7e146a820695f636181 Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Sun, 28 Sep 2025 11:30:06 -0700 Subject: [PATCH 7/9] feat: Add UserVerified Eventr --- src/interfaces/IIdentityManagerV2.sol | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/interfaces/IIdentityManagerV2.sol b/src/interfaces/IIdentityManagerV2.sol index 4ec050c..8bf8672 100644 --- a/src/interfaces/IIdentityManagerV2.sol +++ b/src/interfaces/IIdentityManagerV2.sol @@ -29,4 +29,13 @@ interface IIdentityManagerV2 { uint256 activeVerifications; uint256 expiredVerifications; } + + // Events + event UserVerified( + address indexed user, + uint256 indexed nullifierHash, + VerificationLevel level, + UserType userType, + uint256 expirationTimestamp + ); } \ No newline at end of file From ab59a8ec34aa4a2fc17d6ea6a5e3d5a05f066281 Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Sun, 28 Sep 2025 11:30:26 -0700 Subject: [PATCH 8/9] feat: Add UserVerificationRevoked Event --- src/interfaces/IIdentityManagerV2.sol | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/interfaces/IIdentityManagerV2.sol b/src/interfaces/IIdentityManagerV2.sol index 8bf8672..d170923 100644 --- a/src/interfaces/IIdentityManagerV2.sol +++ b/src/interfaces/IIdentityManagerV2.sol @@ -38,4 +38,10 @@ interface IIdentityManagerV2 { UserType userType, uint256 expirationTimestamp ); + + event UserVerificationRevoked( + address indexed user, + address indexed revoker, + string reason + ); } \ No newline at end of file From 2aa8813f4230d903305580562dce82db65576097 Mon Sep 17 00:00:00 2001 From: tyranis0x01 Date: Sun, 28 Sep 2025 11:30:51 -0700 Subject: [PATCH 9/9] feat: forge fmt --- src/interfaces/IIdentityManagerV2.sol | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/interfaces/IIdentityManagerV2.sol b/src/interfaces/IIdentityManagerV2.sol index d170923..3bb8d6e 100644 --- a/src/interfaces/IIdentityManagerV2.sol +++ b/src/interfaces/IIdentityManagerV2.sol @@ -7,9 +7,18 @@ pragma solidity 0.8.24; * @dev This interface defines all external functions for identity verification management */ interface IIdentityManagerV2 { - // Enums - enum VerificationLevel { NONE, DEVICE, ORB } - enum UserType { STUDENT, INSTITUTION, VERIFIER, ADMIN } + // Enums + enum VerificationLevel { + NONE, + DEVICE, + ORB + } + enum UserType { + STUDENT, + INSTITUTION, + VERIFIER, + ADMIN + } // Structs struct UserVerification { @@ -39,9 +48,5 @@ interface IIdentityManagerV2 { uint256 expirationTimestamp ); - event UserVerificationRevoked( - address indexed user, - address indexed revoker, - string reason - ); -} \ No newline at end of file + event UserVerificationRevoked(address indexed user, address indexed revoker, string reason); +}