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

avp-wallet-sdk

v1.0.1

Published

JavaScript client for the AVP Agent Verification Protocol — multi-chain wallet trust scoring with Sybil resistance and ZK nullifiers

Readme

avp-wallet-sdk

JavaScript/TypeScript client for the AVP Agent Verification Protocol — multi-chain wallet trust scoring with Sybil resistance and ZK nullifiers.

Install

npm install avp-wallet-sdk

Zero dependencies. Works in Node.js 18+ and modern browsers.

Quick Start

import { AVPClient } from 'avp-wallet-sdk'

const client = new AVPClient('https://avp-protocol.onrender.com')

// Step 1 — get a challenge message to sign
const challenge = await client.challenge('0xYourWallet', 'ethereum')
console.log(challenge.message) // sign this with your wallet

// Step 2 — submit the signature
const result = await client.verify(challenge, { signature: '0x...' })
console.log(result.trustScore)    // 75
console.log(result.trustTier)     // "verified"
console.log(result.permissions)   // ["read", "write", "governance_vote"]
console.log(result.jwtToken)      // "eyJ..."

// Step 3 — validate a token later
const info = await client.validate(result.jwtToken)
console.log(info.valid)           // true
console.log(info.walletAddress)   // "0xYourWallet"

TypeScript

Full TypeScript support included:

import { AVPClient, VerifyResult, Challenge } from 'avp-wallet-sdk'

const client = new AVPClient()
const challenge: Challenge = await client.challenge('0xWallet', 'ethereum')
const result: VerifyResult = await client.verify(challenge, { signature: '0x...' })

Development Mode

Use TEST_ prefixed signatures to test without a real wallet:

const result = await client.quickVerify('0xTestWallet', 'ethereum', 'TEST_my_sig')
console.log(result.trustTier) // "basic"

Supported Chains

| Chain | Value | |----------|------------| | Ethereum | ethereum | | Polygon | polygon | | BSC | bsc | | Solana | solana |

Trust Tiers

| Tier | Score | Key Permissions | |-----------|--------|----------------------------------------| | SOVEREIGN | 80–100 | governance_vote, admin_actions | | VERIFIED | 60–79 | write, transfer_standard | | BASIC | 40–59 | read, transfer_limited | | UNTRUSTED | 0–39 | read only |

Boost Trust Score

const result = await client.verify(challenge, {
  signature: '0x...',
  operatorId: 'my-operator',          // +15–25 points if operator has stake
  deviceFingerprint: 'browser-hash',  // +10 points
})

Error Handling

import {
  AVPClient,
  AVPAuthError,
  AVPChallengeError,
  AVPRateLimitError,
  AVPSybilError,
  AVPTokenError,
  AVPConnectionError,
} from 'avp-wallet-sdk'

const client = new AVPClient()

try {
  const challenge = await client.challenge('0xWallet', 'ethereum')
  const result = await client.verify(challenge, { signature: '0x...' })
} catch (err) {
  if (err instanceof AVPAuthError) {
    console.error('Signature verification failed')
  } else if (err instanceof AVPChallengeError) {
    console.error('Challenge expired or already used')
  } else if (err instanceof AVPRateLimitError) {
    console.error(`Rate limited — retry in ${err.retryAfter}s`)
  } else if (err instanceof AVPSybilError) {
    console.error('Wallet flagged as Sybil risk')
  } else if (err instanceof AVPConnectionError) {
    console.error('Could not reach AVP server')
  }
}

Permission Checks

const result = await client.verify(challenge, { signature: '0x...' })

if (result.can('governance_vote')) {
  // wallet can participate in DAO governance
}

if (result.isVerified) {
  // trust tier is verified or sovereign
}

if (result.isSovereign) {
  // highest trust tier
}

Configuration

const client = new AVPClient(
  'https://your-avp-instance.com',
  {
    timeout: 30000,  // request timeout in ms (default: 30000)
    retries: 3,      // retries on network errors (default: 3)
  }
)

React / Next.js Example

import { AVPClient } from 'avp-wallet-sdk'
import { useAccount, useSignMessage } from 'wagmi'

const client = new AVPClient()

export function VerifyWallet() {
  const { address } = useAccount()
  const { signMessageAsync } = useSignMessage()

  async function handleVerify() {
    // Step 1 — get challenge
    const challenge = await client.challenge(address, 'ethereum')

    // Step 2 — sign with wallet (wagmi)
    const signature = await signMessageAsync({ message: challenge.message })

    // Step 3 — verify
    const result = await client.verify(challenge, { signature })
    console.log('Trust tier:', result.trustTier)
  }

  return <button onClick={handleVerify}>Verify Wallet</button>
}

Run Tests

node tests/test.js

Tests run against the live API. Requires Node.js 18+ and internet connection.

Links

License

MIT — Oyewole Emmanuel Abiodun