-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Interface for ISWTRProxy.sol added (#5)
* interface added * interface moved to right folder * missing function interface added * new contract deployed --------- Co-authored-by: Lesther Caballero <[email protected]>
- Loading branch information
1 parent
46c9c91
commit 2ac01a5
Showing
9 changed files
with
185 additions
and
93 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.24; | ||
|
||
interface IComplianceBridge { | ||
function hasVerification( | ||
address userAddress, | ||
uint32 verificationType, | ||
uint32 expirationTimestamp, | ||
address[] memory allowedIssuers | ||
) external returns (bool); | ||
|
||
function getVerificationData( | ||
address userAddress, | ||
address issuerAddress | ||
) external returns (bytes memory); | ||
|
||
function addVerificationDetails( | ||
address userAddress, | ||
string memory originChain, | ||
uint32 verificationType, | ||
uint32 issuanceTimestamp, | ||
uint32 expirationTimestamp, | ||
bytes memory proofData, | ||
string memory schema, | ||
string memory issuerVerificationId, | ||
uint32 version | ||
) external; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,125 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.24; | ||
|
||
interface ISWTRProxy { | ||
struct VerificationData { | ||
// Verification type | ||
uint32 verificationType; | ||
// Verification Id | ||
bytes verificationId; | ||
// Verification issuer address | ||
address issuerAddress; | ||
// From which chain proof was transferred | ||
string originChain; | ||
// Original issuance timestamp | ||
uint32 issuanceTimestamp; | ||
// Original expiration timestamp | ||
uint32 expirationTimestamp; | ||
// Original proof data (ZK-proof) | ||
bytes originalData; | ||
// ZK-proof original schema | ||
string schema; | ||
// Verification id for checking(KYC/KYB/AML etc) from issuer side | ||
string issuerVerificationId; | ||
// Version | ||
uint32 version; | ||
} | ||
|
||
enum VerificationType { | ||
VT_UNSPECIFIED, // VT_UNSPECIFIED defines an invalid/undefined verification type. | ||
VT_KYC, // Know Your Custom | ||
VT_KYB, // Know Your Business | ||
VT_KYW, // Know Your Wallet | ||
VT_HUMANITY, // Check humanity | ||
VT_AML, // Anti Money Laundering (check transactions) | ||
VT_ADDRESS, | ||
VT_CUSTOM, | ||
VT_CREDIT_SCORE | ||
} | ||
|
||
struct Issuer { | ||
string name; | ||
uint32 version; | ||
address issuerAddress; | ||
} | ||
|
||
function getIssuerRecordByAddress( | ||
address issuerAddress | ||
) external view returns (Issuer memory); | ||
|
||
function getIssuerAddressesByNameAndVersions( | ||
string memory name, | ||
uint32[] memory version | ||
) external view returns (address[] memory); | ||
|
||
function listIssuersRecord( | ||
uint256 start, | ||
uint256 end | ||
) external view returns (Issuer[] memory); | ||
|
||
function issuerRecordCount() external view returns (uint256); | ||
|
||
function isUserVerified( | ||
address userAddress, | ||
ISWTRProxy.VerificationType verificationType | ||
) external view returns (bool); | ||
|
||
function isUserVerifiedBy( | ||
address userAddress, | ||
ISWTRProxy.VerificationType verificationType, | ||
address[] memory allowedIssuers | ||
) external view returns (bool); | ||
|
||
function listVerificationData( | ||
address userAddress, | ||
address issuerAddress | ||
) external view returns (ISWTRProxy.VerificationData[] memory); | ||
|
||
function getVerificationDataById( | ||
address userAddress, | ||
address issuerAddress, | ||
bytes memory verificationId | ||
) external view returns (ISWTRProxy.VerificationData memory); | ||
|
||
function getVerificationCountry( | ||
address userAddress, | ||
address issuerAddress, | ||
ISWTRProxy.VerificationType verificationType | ||
) external view returns (string memory); | ||
|
||
function decodeQuadrataPassportV1OriginalData( | ||
bytes memory originalData | ||
) | ||
external | ||
pure | ||
returns ( | ||
uint8 aml, | ||
string memory country, | ||
string memory did, | ||
bool isBusiness, | ||
bool investorStatus | ||
); | ||
|
||
function decodeWorldcoinV1OriginalData( | ||
bytes memory originalData | ||
) | ||
external | ||
pure | ||
returns ( | ||
string memory merkle_root, | ||
string memory nullifier_hash, | ||
string memory proof, | ||
string memory verification_level | ||
); | ||
|
||
function passedVerificationType( | ||
address userAddress, | ||
address issuerAddress, | ||
ISWTRProxy.VerificationType verificationType | ||
) external view returns (bool); | ||
|
||
function walletPassedAML( | ||
address userAddress, | ||
address issuerAddress | ||
) external view returns (bool); | ||
} |
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
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
Oops, something went wrong.