-
Notifications
You must be signed in to change notification settings - Fork 86
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
17 changed files
with
289 additions
and
429 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
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
53 changes: 53 additions & 0 deletions
53
modules/passkey/contracts/interfaces/ICustomECDSASignerFactory.sol
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,53 @@ | ||
// SPDX-License-Identifier: LGPL-3.0-only | ||
pragma solidity >=0.8.0 <0.9.0; | ||
|
||
/** | ||
* @title Custom ECDSA Signer Factory | ||
* @dev Interface for a factory contract that can create ERC-1271 compatible signers, and verify | ||
* signatures for custom ECDSA schemes. | ||
* @custom:security-contact bounty@safe.global | ||
*/ | ||
interface ICustomECDSASignerFactory { | ||
/** | ||
* @notice Gets the unique signer address for the specified data. | ||
* @dev The unique signer address must be unique for some given data. The signer is not | ||
* guaranteed to be created yet. | ||
* @param x The x-coordinate of the public key. | ||
* @param y The y-coordinate of the public key. | ||
* @param verifier The address of the verifier. | ||
* @return signer The signer address. | ||
*/ | ||
function getSigner(uint256 x, uint256 y, address verifier) external view returns (address signer); | ||
|
||
/** | ||
* @notice Create a new unique signer for the specified data. | ||
* @dev The unique signer address must be unique for some given data. This must not revert if | ||
* the unique owner already exists. | ||
* @param x The x-coordinate of the public key. | ||
* @param y The y-coordinate of the public key. | ||
* @param verifier The address of the verifier. | ||
* @return signer The signer address. | ||
*/ | ||
function createSigner(uint256 x, uint256 y, address verifier) external returns (address signer); | ||
|
||
/** | ||
* @notice Verifies a signature for the specified address without deploying it. | ||
* @dev This must be equivalent to first deploying the signer with the factory, and then | ||
* verifying the signature with it directly: | ||
* `factory.createSigner(signerData).isValidSignature(message, signature)` | ||
* @param message The signed message. | ||
* @param signature The signature bytes. | ||
* @param x The x-coordinate of the public key. | ||
* @param y The y-coordinate of the public key. | ||
* @param verifier The address of the verifier. | ||
* @return magicValue Returns the ERC-1271 magic value when the signature is valid. Reverting or | ||
* returning any other value implies an invalid signature. | ||
*/ | ||
function isValidSignatureForSigner( | ||
bytes32 message, | ||
bytes calldata signature, | ||
uint256 x, | ||
uint256 y, | ||
address verifier | ||
) external view returns (bytes4 magicValue); | ||
} |
87 changes: 0 additions & 87 deletions
87
modules/passkey/contracts/interfaces/ICustomSignerFactory.sol
This file was deleted.
Oops, something went wrong.
56 changes: 0 additions & 56 deletions
56
modules/passkey/contracts/interfaces/IWebAuthnVerifier.sol
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.