Skip to Content
API referenceSIWX EVMSrcComponentsverifyEip1271()

API Reference — @tuwaio/siwx (CAIP-122 Authentication Layer)


verifyEip1271()

verifyEip1271(message, signature, options): Promise<EvmVerifyResult>

Defined in: packages/siwx-evm/src/verify.ts:120 

Verifies an EVM (eip155) CAIP-122 signature using EIP-1271 (isValidSignature). This method is used for smart contract wallets (e.g., Safe, Argent, Gnosis).

Falls back gracefully if the publicClient is not provided.

Parameters

message

string

The raw CAIP-122 message string that was signed.

signature

`0x${string}`

The hex-encoded signature from the smart contract wallet.

options

EvmVerifyOptions

Options including the publicClient to use for on-chain calls.

Returns

Promise<EvmVerifyResult>

An EvmVerifyResult with success: true and the parsed message, or an error result.

Example

const result = await verifyEip1271(rawMessage, '0xdeadbeef...', { publicClient }); if (result.success) console.log('Contract wallet authenticated:', result.data?.address);
Last updated on