ECDSASig
ECDSASig
Contract for verifying ECDSA signatures against operator keys
Implements SigManager interface using OpenZeppelin's ECDSA library
Methods
_verifyKeySignature
function _verifyKeySignature(
address operator,
bytes memory key_,
bytes memory signature
) internal pure override returns (bool)
Verifies that a signature was created by the owner of a key
The key is expected to be a bytes32 that can be converted to an Ethereum address
Parameters
Name | Type | Description |
---|---|---|
operator | address | The address of the operator that owns the key |
key_ | bytes memory | The public key to verify against, encoded as bytes |
signature | bytes memory | The ECDSA signature to verify |
Returns
Name | Type | Description |
---|---|---|
bool | True if the signature was created by the key owner, false otherwise |
recover
function recover(bytes32 hash, bytes memory signature) public pure returns (address)
Recovers the signer address from a hash and signature
Wrapper around OpenZeppelin's ECDSA.recover
Parameters
Name | Type | Description |
---|---|---|
hash | bytes32 | The message hash that was signed |
signature | bytes memory | The ECDSA signature |
Returns
Name | Type | Description |
---|---|---|
address | The address that created the signature |