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

@web3auth/sign-in-with-web3

v6.0.0

Published

Authenticate users with their Web3 accounts instead of relying on custodial OAuth providers. Users sign a standard message with any Web3-compatible wallet, keeping full control of their identity and data.

Downloads

1,649

Readme

@web3auth/sign-in-with-web3

Authenticate users with their Web3 accounts instead of relying on custodial OAuth providers. Users sign a standard message with any Web3-compatible wallet, keeping full control of their identity and data.

Sign-In with Web3 uses a standard message format compliant with CAIP-74, parameterized by scope, session details, and security mechanisms (e.g., a nonce).

Supported Chains

  • EthereumEIP-4361 with EIP-1271/6492 smart contract signature support
  • SolanaSIP-99 with ed25519 signature verification

Installation

npm install @web3auth/sign-in-with-web3

Usage

Register strategies

Strategies are not auto-registered. Register the chains you need before using SIWWeb3:

import { SIWWeb3, ethereumStrategy, solanaStrategy } from "@web3auth/sign-in-with-web3";

SIWWeb3.registerStrategy(ethereumStrategy);
SIWWeb3.registerStrategy(solanaStrategy);

Basic

// Parse a signed message string (chain is detected automatically)
const msg = new SIWWeb3(messageString);

// Or construct from fields (chain is required)
const msg = new SIWWeb3({
  chain: "ethereum", // or "solana"
  payload: {
    domain: "example.com",
    address: "0x...",
    statement: "Sign in with Ethereum to the app.",
    uri: "https://example.com",
    version: "1",
    chainId: 1,
    nonce: "32891757",
    issuedAt: new Date().toISOString(),
  },
});

// Generate the EIP-4361 message to sign
const messageToSign = msg.prepareMessage();

// Verify a signature
const { success, error } = await msg.verify(msg.payload, signature);

Using chain-specific classes directly

import { SIWE, SIWS } from "@web3auth/sign-in-with-web3";

const ethMsg = new SIWE({ header, payload, signature });
const solMsg = new SIWS(messageString);

Registering a custom strategy

import { SIWWeb3 } from "@web3auth/sign-in-with-web3";

SIWWeb3.registerStrategy({
  chain: "mychain",
  parse: (msg) => new MyChainSIW(msg),
  create: (params) => new MyChainSIW(params),
});

Architecture

src/
  client.ts          — SIWWeb3 (main entry, strategy registry)
  strategies/
    base.ts          — SIWBase (abstract base class)
    ethereum.ts      — SIWE + EIP-1271/6492 verifier
    solana.ts        — SIWS + ed25519 verifier
  regex.ts           — Shared message parsing
  types.ts           — Shared types

Exports

| Export | Description | |---|---| | SIWWeb3 | Main class with chain auto-detection and strategy registry | | SIWBase | Abstract base class for building custom chain strategies | | SIWE | Ethereum sign-in (EIP-4361) | | SIWS | Solana sign-in (SIP-99) | | ethereumStrategy | Ethereum strategy for registry | | solanaStrategy | Solana strategy for registry | | eipVerifyMessage | EIP-1271/6492 signature verification utility |

Migration from @web3auth/sign-in-with-ethereum / @web3auth/sign-in-with-solana

These packages have been deprecated and consolidated into this package.

- import { SIWEthereum } from "@web3auth/sign-in-with-ethereum";
- import { SIWS } from "@web3auth/sign-in-with-solana";
+ import { SIWWeb3, ethereumStrategy, solanaStrategy, SIWE, SIWS } from "@web3auth/sign-in-with-web3";
+ SIWWeb3.registerStrategy(ethereumStrategy);
+ SIWWeb3.registerStrategy(solanaStrategy);

Key changes from previous versions:

  • SIWEthereum has been renamed to SIWE
  • network property has been renamed to chain
  • chain is now required when constructing from an object
  • Strategies must be registered manually (no longer auto-registered)

Docs