verifyEvmSignature()
verifyEvmSignature(
message,signature,options?):Promise<EvmVerifyResult>
Defined in: siwx-evm/src/verify.ts:193
Verifies an eip155 CAIP-122 signature from an EOA or a smart contract wallet.
Tries verifyEip191 first. If it fails and options.publicClient is set, falls back to
verifyEip1271 (one on-chain eth_call).
Parameters
message
string
The exact CAIP-122 message string that was signed.
signature
`0x${string}`
The hex-encoded signature returned by the wallet.
options?
EvmVerifyOptions = {}
publicClient enables the EIP-1271 fallback; skipExpiration is passed to both checks.
Returns
Promise<EvmVerifyResult>
The first successful result (with method), otherwise the failed result of the last check that ran.
Never throws.
Example
const result = await verifyEvmSignature(rawMessage, '0xdeadbeef...', { publicClient });
if (result.success) console.log('Authenticated via:', result.method);Last updated on