@neus/sdk for api.neus.network so headers and paths stay correct.
Browser vs server
Do not put
npk_* or other secrets in browser bundles. If you need calls the SDK does not expose from the client, proxy through your backend — API overview.
Install
Hosted URL (browser default)
getHostedCheckoutUrl supports login, a published gate, or direct verifier checks. These are separate recipes: intent: 'login' removes checkout parameters, and gateId owns the gate policy instead of mixing with verifiers or preset. Shared handoff options are returnUrl, mode, origin, and oauthProvider; advanced sponsor options are appId and billingWallet.
For agent identity + delegation, use getHostedAgentCreateUrl so dedicated-wallet identity and controller approval stay in the correct order. Agent create · Hosted Verify.
React: Widgets.
Client configuration
apiKey (server key, sent as Authorization: Bearer), appId, billingWallet, appLinkQHash, paymentSignature, extraHeaders, hubChainId, enableLogging. Keep apiKey and any secret server-side only.
App attribution (appId)
Set appId only for advanced server/app attribution flows. It is public, not a secret, and it is not required for published gate checkout or gateCheck({ gateId }).
Verification options
Pass these underoptions on client.verify(...):
Reuse-vs-create is a widget concern: the
strategy prop (reuse-or-create default, fresh, reuse) lives on VerifyGate, not on client.verify(). Verification patterns for privacy and widget options.
Optional: client.verify() (signs in the browser)
Use only when you intentionally keep signing in your page (wallet extension or injected provider):
Advanced: manual signing (full control)
When you assembleverifierIds / data yourself, then sign the standardized string. The example below is EVM. For non-EVM, pass the provider explicitly and include chain as a CAIP-2 value. See CAIP-380 Portable Proof.
GET /api/v1/verification/verifiers.
Gate checks: gateCheck vs checkGate
Wallet-link: hosted first
For typical UX, use Hosted Verify so wallet selection and secondary signing stay on NEUS. Direct mode is for integrations that already control the secondary wallet and provider.Gate checks from your servers
verifierIds checks are advanced protocol calls; do not use them as the normal product checkout path.
Polling
pollProofStatus() backs off on 429 and transient errors.
Advanced: private proof operations
Catalog and health
List the live verifier ids or fetch the full catalog with metadata and access levels.gateCheck:
