ECDSAUtils

Git Source

Inherits: EIP712

Provides ECDSA signature utilities for verifying bridge request data

Functions

constructor

Initializes the EIP712 domain with the given name and version

constructor(string memory name, string memory version) EIP712(name, version);

Parameters

NameTypeDescription
namestringThe user-readable name of the signing domain
versionstringThe current major version of the signing domain

getDigest

Computes the EIP712 digest for the given bridge request data

function getDigest(Structs.BridgeRequestData memory data) public view returns (bytes32);

Parameters

NameTypeDescription
dataStructs.BridgeRequestDataThe bridge request data to be hashed

Returns

NameTypeDescription
<none>bytes32The EIP712 hash of the given bridge request data

getSigner

Recovers the signer address from the given bridge request data and signature

function getSigner(Structs.BridgeRequestData memory data, bytes memory signature) public view returns (address);

Parameters

NameTypeDescription
dataStructs.BridgeRequestDataThe bridge request data that was signed
signaturebytesThe ECDSA signature

Returns

NameTypeDescription
<none>addressThe address of the signer