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

bringid

v0.3.1-beta-rc.0

Published

Verify humanity and request reputation scores in your Next.js or Node.js app.

Readme

BringID SDK

Verify humanity and request reputation scores in your Next.js or Node.js app.

Installation

npm install bringid

Quick Start

import { BringID } from "bringid";

const bringid = new BringID();

// Get a reputation score (0-100) — works immediately
const { score } = await bringid.getAddressScore("0x...");

// Verify humanity and get proofs — requires modal setup (see below)
const { proofs, points } = await bringid.verifyHumanity();

// Verify proofs and get points breakdown — works immediately
const { verified, points } = await bringid.verifyProofs({ proofs: [ ... ]})

Note: getAddressScore and verifyProofs works out of the box. verifyHumanity requires the modal provider — see Setup below.

Requirements

For React/Next.js:

  • Next.js 13+ (App Router)
  • React 18+
  • Wallet provider (wagmi, ethers, etc.)

For Node.js:

  • Node.js 16+

Setup

1. Create the SDK instance

Create a shared instance to use across your app:

// lib/bringid.ts
import { BringID } from "bringid";

export const bringid = new BringID();
// will return a BringID instance ready for production

2. Add the Modal Provider

The verifyHumanity method requires a modal. Render it once at the root of your app:

// app/providers/BringIDProvider.tsx
"use client";

import { BringIDModal } from "bringid/react";
import { useAccount, useWalletClient } from "wagmi";

export function BringIDProvider({ children }: { children: React.ReactNode }) {
  const { address } = useAccount();
  const { data: walletClient } = useWalletClient();

  return (
    <>
      {walletClient && (
        <BringIDModal
          address={address}
          generateSignature={(message) => walletClient.signMessage({ message })}
          iframeOnLoad={() => console.log("BringID ready")}
        />
      )}
      {children}
    </>
  );
}

3. Wrap your layout

// app/layout.tsx
import { BringIDProvider } from "./providers/BringIDProvider";

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en">
      <body>
        <WagmiProvider>
          <BringIDProvider>{children}</BringIDProvider>
        </WagmiProvider>
      </body>
    </html>
  );
}

API

bringid.getAddressScore(address)

Returns a reputation score for any address. No wallet connection required.

const { score } = await bringid.getAddressScore("0x...");

Returns:

  • score — number between 0 and 100

bringid.verifyProofs({ proofs, provider })

Verifies proofs and returns verification status with points breakdown.

const { verified, points } = await bringid.verifyProofs({ proofs: [ ... ] });
// verified: true/false
// points: { total: 15, groups: [{ credential_group_id: "16", points: 10 }, ...] }

const provider = new JsonRpcProvider('https://sepolia.base.org');
const { verified, points } = await bringid.verifyProofs({ proofs: [ ... ], provider });
// it is possible to use a custom JSONRpcProvider for a proofs validity check

Returns:

  • verified — boolean indicating if proofs are valid
  • points — object containing:
    • total — total points across all credential groups
    • groups — array of { credential_group_id, points } for each proof

bringid.verifyHumanity(options?)

Opens the verification modal and returns proofs. Requires the modal provider to be mounted.

const { proofs, points } = await bringid.verifyHumanity();

// With custom scope
const { proofs, points } = await bringid.verifyHumanity({
  scope: "0x...",
});

// With minumum points requirement. If `minPoints` not presented any amount of points above 0 is acceptable
const { proofs, points } = await bringid.verifyHumanity({
  minPoints: 10,
});

Returns:

  • proofs — Array of semaphore proofs
  • points — Humanity points earned

Configuration

Development Mode

Use mode="dev" on the modal for testing:

<BringIDModal
  mode="dev"
  address={address}
  generateSignature={(message) => walletClient.signMessage({ message })}
/>

Also it should be used for BringID instance

const bringid = new BringID({ mode: "dev" });

Note: Production mode is enabled by default. Only use dev mode during development.

Example

"use client";

import { useState } from "react";
import { bringid } from "@/lib/bringid";

export function VerifyButton() {
  const [points, setPoints] = useState<number | null>(null);

  const handleVerify = async () => {
    try {
      const { points, proofs } = await bringid.verifyHumanity();
      setPoints(points);
    } catch (err) {
      console.error("Verification failed:", err);
    }
  };

  return (
    <div>
      <button onClick={handleVerify}>Verify Humanity</button>
      {points !== null && <p>Points: {points}</p>}
    </div>
  );
}

Troubleshooting

Modal doesn't open

  • Ensure BringIDProvider is in your layout
  • Ensure the component calling verifyHumanity has "use client"
  • Ensure wallet is connected before calling

Score returns undefined

  • Verify the address format is correct (checksummed)

License

MIT