npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tuwaio/siwx-evm

v0.2.1

Published

Layer 2 (L2) of the TUWA Ecosystem. EVM adapter for @tuwaio/siwx. Signs and verifies CAIP-122 messages for eip155 chains via viem and wagmi.

Downloads

2,754

Readme

@tuwaio/siwx-evm

NPM Version License

EVM adapter for @tuwaio/siwx (L2). Signs and verifies CAIP-122 messages for eip155 chains via viem, including EIP-1271 smart contract wallet support.


🏛️ Core Capabilities

  • EIP-191 Verification: Standard EOA (Externally Owned Account) signature verification using viem's recoverAddress.
  • EIP-1271 Verification: Smart contract wallet verification (isValidSignature) via an on-chain readContract call using a viem PublicClient.
  • Extracts and normalizes EVM addresses from CAIP-10 strings.

💾 Installation

pnpm add @tuwaio/siwx-evm @tuwaio/siwx-core viem @wagmi/core

🚀 API & Module Architecture

createEvmSiwxSigner(target, account?)

Creates a standard SIWX signer callback for EVM chains. Automatically adapts to either a Wagmi Config or a Viem WalletClient.

import { createEvmSiwxSigner } from '@tuwaio/siwx-evm';

const signer = createEvmSiwxSigner(walletClient);
const signature = await signer('Message to sign');

verifyEvmSignature(message, signature, options?): Promise<EvmVerifyResult>

Universal EVM signature verifier for CAIP-122 messages. Tries EIP-191 (EOA ecrecover) first; if that fails and options.publicClient is provided, automatically attempts EIP-1271 (isValidSignature) on-chain verification.

import { verifyEvmSignature } from '@tuwaio/siwx-evm';

const result = await verifyEvmSignature(rawMessage, '0xsignature...', { publicClient });
if (result.success) {
  console.log(`Verified via ${result.method}. Address:`, result.data?.address);
}

verifyEip191(message, signature, options?): Promise<EvmVerifyResult>

Verifies a standard EOA wallet signature. Recovers the signer address and compares it to the CAIP-10 address embedded in the message. Accepts optional options?: EvmVerifyOptions (e.g. { skipExpiration?: boolean }).

import { verifyEip191 } from '@tuwaio/siwx-evm';

const result = await verifyEip191(rawMessage, '0xsignature...');
if (result.success) {
  console.log('Verified via EIP-191. Address:', result.data?.address);
}

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

Verifies a smart contract wallet signature (Safe, Argent, Gnosis, etc.) by calling isValidSignature on-chain. Requires a viem PublicClient passed via options.publicClient. Accepts optional { skipExpiration?: boolean }.

import { verifyEip1271 } from '@tuwaio/siwx-evm';
import { createPublicClient, http } from 'viem';
import { mainnet } from 'viem/chains';

const publicClient = createPublicClient({ chain: mainnet, transport: http() });

const result = await verifyEip1271(rawMessage, '0xsignature...', { publicClient });
if (result.success) {
  console.log('Verified via EIP-1271 (contract wallet)');
}

Peer Dependencies

| Package | Version | | ------------------- | ------------- | | @tuwaio/siwx-core | workspace:* | | viem | ^2.0.0 | | @wagmi/core | ^3.0.0 |


📄 License

Licensed under the Apache-2.0 License. See the LICENSE file for details.