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 🙏

© 2025 – Pkg Stats / Ryan Hefner

unver

v0.0.2

Published

Universal Signature Verification for Ethers

Downloads

16

Readme

unver

Universal Signature Verification for ethers.js, with support for:

  • Externally Owned Accounts
  • Contract Accounts via ERC-1271
  • Predeployed Contract Accounts via ERC-6492
  • Predelegated Contract Accounts via ERC-8010

Table of Contents

Usage

import * as ethers from 'ethers'
import { UnverProvider } from 'unver'

const provider = UnverProvider.wrap(
  new ethers.JsonRpcProvider('https://eth.merkle.io')
)

const address = '0x...'
const digest = '0x...'
const signature = '0x...'

const valid = await provider.verifyHash(address, digest, signature)

API Reference

UnverProvider.wrap

Wraps an ethers.AbstractProvider with the UnverProvider interface.

const provider = UnverProvider.wrap(
  new ethers.JsonRpcProvider('https://eth.merkle.io')
)

Interface

declare function wrap(provider: ethers.AbstractProvider): 
  Provider<ethers.AbstractProvider & UnverProvider> 

Signature.verifyHash

Verifies a signature for a given address and digest.

const address = '0x...'
const digest = '0x...'
const signature = '0x...'

// Provider usage
const valid = await provider.verifyHash(address, digest, signature)

// Function usage
import { Signature } from 'unver'
const valid = await Signature.verifyHash(provider, address, digest, signature)

Interface

declare function verifyHash(
  provider: ethers.AbstractProvider,
  address: string,
  digest: Uint8Array | string,
  signature: ethers.SignatureLike,
): Promise<boolean>

Signature.verifyMessage

Verifies a signature for a given address and message.

const address = '0x...'
const message = 'hello world'
const signature = '0x...'

// Provider usage
const valid = await provider.verifyMessage(address, message, signature)

// Function usage
import { Signature } from 'unver'
const valid = await Signature.verifyMessage(provider, address, message, signature)

Interface

declare function verifyMessage(
  provider: ethers.AbstractProvider,
  address: string,
  message: Uint8Array | string,
  signature: ethers.SignatureLike,
): Promise<boolean>

Signature.verifyTypedData

Verifies a signature for a given address and typedData.

const address = '0x...'
const domain = {
  name: 'My App',
  version: '1.0.0',
  chainId: 1,
  verifyingContract: '0x...'
}
const types = {
  Person: [
    { name: 'name', type: 'string' },
    { name: 'age', type: 'uint256' },
  ],
}
const value = {
  name: 'John Doe',
  age: 20,
}
const signature = '0x...'

// Provider usage
const valid = await provider.verifyTypedData(address, domain, types, value, signature)

// Function usage
import { Signature } from 'unver'
const valid = await Signature.verifyTypedData(provider, address, domain, types, value, signature)

Interface

declare function verifyTypedData(
  provider: ethers.AbstractProvider,
  address: string,
  domain: ethers.TypedDataDomain,
  types: Record<string, Array<ethers.TypedDataField>>,
  value: Record<string, unknown>,
  signature: ethers.SignatureLike,
): Promise<boolean>

Development

bun install  # Install dependencies
bun test     # Run tests

Community

Check out the following places for more content:

Support