forked from emmaguo13/zk-blind
-
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.
- Loading branch information
Showing
2 changed files
with
33 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.9; | ||
|
||
struct EmailProof { | ||
string domainName; // Domain name of the sender's email | ||
bytes32 publicKeyHash; // Hash of the DKIM public key used in email/proof | ||
uint timestamp; // Timestamp of the email | ||
string maskedCommand; // Masked command of the email | ||
bytes32 emailNullifier; // Nullifier of the email to prevent its reuse. | ||
bytes32 accountSalt; // Create2 salt of the account | ||
bool isCodeExist; // Check if the account code is exist | ||
bytes proof; // ZK Proof of Email | ||
} | ||
|
||
interface IVerifier { | ||
|
||
/** | ||
* @notice Verifies the provided email proof. | ||
* @param proof The email proof to be verified. | ||
* @return bool indicating whether the proof is valid. | ||
*/ | ||
function verifyEmailProof( | ||
EmailProof memory proof | ||
) external view returns (bool); | ||
|
||
/** | ||
* @notice Returns a constant value representing command bytes. | ||
* @return uint256 The constant value of command bytes. | ||
*/ | ||
function getCommandBytes() external pure returns (uint256); | ||
} |
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