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

@neus/sdk

v1.0.3

Published

NEUS SDK - Create and verify cryptographic proofs with simple, clean API

Readme

NEUS SDK

JavaScript client (and optional widgets) for the NEUS Network verification API.

Install

npm install @neus/sdk

Create a proof (browser wallet flow)

This path requests a wallet signature in the browser and submits the verification request:

import { NeusClient } from '@neus/sdk';

const client = new NeusClient({ apiUrl: 'https://api.neus.network' });

const res = await client.verify({
  verifier: 'ownership-basic',
  content: 'Hello NEUS'
});

// Proof ID (standard). qHash is a deprecated alias.
const proofId = res.proofId;
const status = await client.getStatus(proofId);

Client configuration

const client = new NeusClient({
  // Optional: API base URL (default: https://api.neus.network)
  apiUrl: 'https://api.neus.network',
  // Optional: request timeout (ms)
  timeout: 30000,
});

Create a proof (server / manual signing)

If you already have a signature over the NEUS Standard Signing String, submit it directly:

const res = await client.verify({
  verifierIds: ['ownership-basic'],
  data: {
    owner: '0x1111111111111111111111111111111111111111',
    content: 'Hello NEUS',
    reference: { type: 'url', id: 'https://example.com' }
  },
  walletAddress: '0x1111111111111111111111111111111111111111',
  signature: '0x...',
  signedTimestamp: Date.now(),
  chainId: 84532,
  options: { privacyLevel: 'private' }
});

What verifiers are available?

Use the API directly (avoids drift):

  • GET /api/v1/verification/verifiers

Hosted interactive verifiers

For interactive verifiers (ownership-social, ownership-org-oauth, proof-of-human), use VerifyGate hosted checkout mode. These flows require NEUS-hosted popup/redirect UX (OAuth/ZK), not direct wallet-only creation via client.verify(...).

import { VerifyGate } from '@neus/sdk/widgets';

export default function HostedGateExample() {
  return (
    <VerifyGate
      requiredVerifiers={['ownership-social']}
      onVerified={(result) => {
        console.log('Hosted verification complete:', result.proofId);
      }}
    >
      <button>Unlock with Social</button>
    </VerifyGate>
  );
}

Gate checks (recommended for server-side gating)

For production server-side gating, prefer the minimal public endpoint:

const res = await client.gateCheck({
  address: 'YOUR_WALLET_OR_DID',
  verifierIds: ['token-holding'],
  contractAddress: '0x...',
  minBalance: '100',
  chainId: 8453,
  // Optional: require a recent proof for point-in-time verifiers (example: last hour)
  since: Date.now() - 60 * 60 * 1000
});

if (!res.data?.eligible) {
  throw new Error('Access denied');
}

Note: gateCheck evaluates existing public/discoverable proofs. For strict real-time decisions, create a new proof via client.verify(...) (or POST /api/v1/verification) and use the final status.

Resilience & Polling

The SDK is designed for production stability:

  • Automatic Backoff: pollProofStatus() automatically detects rate limiting (429) and applies jittered exponential backoff.

  • Wallet Identification: Automatically attaches headers to preferred wallet-based limiting for higher reliability behind shared IPs (NATs).

  • Private proof by Proof ID: client.getPrivateStatus(proofId, wallet)

  • Private proofs by wallet/DID: client.getPrivateProofsByWallet(walletOrDid, { limit, offset }, wallet) (owner dashboard / first-party UX only; not recommended for integrator gating)

  • Revoke your proof: client.revokeOwnProof(proofId, wallet)

Example:

const privateData = await client.getPrivateStatus(proofId, window.ethereum);

const privateProofs = await client.getPrivateProofsByWallet(
  'YOUR_WALLET_OR_DID',
  { limit: 50, offset: 0 },
  window.ethereum
);

await client.revokeOwnProof(proofId, window.ethereum);

Compatibility note: qHash remains supported as a deprecated alias (proofId === qHash).

React widgets

For UI gating, see ./widgets/README.md.

Widget imports:

import { VerifyGate, ProofBadge } from '@neus/sdk/widgets';

Reference docs

  • API Reference: ../docs/api/README.md
  • OpenAPI (JSON): ../docs/api/public-api.json