SDK Reference

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',
  wallet: window.ethereum
});

// Proof ID (qHash): stable identifier you can store and use for status polling
const proofId = res.qHash;
const status = await client.getStatus(proofId);

Client configuration

Create a proof (server / manual signing)

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

What verifiers are available?

Use the API directly (avoids drift):

  • GET /api/v1/verification/verifiers

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

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 (qHash): client.getPrivateStatus(qHash, wallet)

  • Private proofs by wallet/DID: client.getPrivateProofsByWallet(walletOrDid, { limit, offset }, wallet)

React widgets

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

Widget imports:

Reference docs

  • API Reference: ../docs/api/README.md

  • OpenAPI (JSON): ../docs/api/public-api.json

Last updated

Was this helpful?