Skip to content
function isValidEIP712Signature(s): boolean;

Returns whether s has the shape of an EIP-712 signature (0x-prefixed, 65 bytes, hex-parseable). This is a format/shape pre-check ONLY — it does NOT verify recoverability, reject an all-zero or high-s (malleable) signature, or validate the v byte. Always pair this with real EIP-712 recovery (e.g. recoverTypedDataAddress) before treating a signature as valid.

This is an EOA-shape pre-check: ERC-1271 contract signatures (e.g. a Safe’s threshold signature) are not 65 bytes and are valid on-chain, so never use this to gate a signature that may come from a contract signer.

Parameters

ParameterTypeDescription
s`0x${string}`The bytes in question.

Returns

boolean

True if the provided bytes have the shape of an EIP-712 signature, false otherwise.