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

@suirify/suirifysdk

v0.1.7

Published

TypeScript SDK for reading Suirify attestation objects over Sui RPC.

Readme

Suirify SDK

TypeScript SDK for reading Suirify_Attestation objects over the Sui RPC in a privacy-preserving, read-only fashion. The SDK powers:

  • A minimal, reusable SuirifySdk

⚠️ Security & Privacy: Never persist personal data. Only store the wallet address, attestation objectId, verification level, issued/expiry timestamps, and revocation bit. Do not copy name_hash or PII fields off-chain. Always serve this SDK over HTTPS and talk to HTTPS RPC endpoints.


Quick Start

# install dependencies
npm install

# build the SDK (dist/)
npm run build

# run unit tests
npm test

# spin up the React demo (after building the SDK once)
cd src/examples/web-demo
npm install
npm run dev

Create a .env file (root and demos can share it) using .env.example:

SUI_RPC_URL=https://fullnode.testnet.sui.io:443
SUI_NETWORK=testnet

Installing as a dependency

This repository is ready to be published to npm. Until then, consume it locally via file: references (see the web demo). After publishing:

import { SuirifySdk } from "suirifysdk";

const client = new SuirifySdk({
  rpcUrl: process.env.SUI_RPC_URL,
});
const result = await client.getAttestationForOwner("0xALICE");
if (result.found && result.attestation) {
  const validity = await client.isValid(result.attestation);
  if (validity.valid) {
    // TODO: show consent modal to end-user, then read claims via client.getPublicClaims
  }
} else {
  // Redirect to SUIrify onboarding portal (placeholder link in README)
}

SDK Highlights

  • Read-only flow. Nothing is written on-chain, but every lookup/claim read is guarded by a wallet signature for user consent.
  • Attestation discovery. Uses getOwnedObjects to find Suirify_Attestation structs.
  • Robust parsing. parseObject.ts normalizes differing RPC payload shapes; extendable via comments.
  • Consent-aware claims. getPublicClaims() requests user consent before exposing public fields.
  • Validity helper. isValid() checks revocation, expiry, and status bits.
  • In-memory caching. Avoids repeated RPC calls within a configurable window (cacheMs).

Full API docs live in docs/API.md.

Consent Flow Integration

By default the SDK auto-consents (with a warning) to keep scripts runnable. In your UI, register a consent handler to show a modal / sheet:

const client = new SuirifySdk();
client.setConsentHandler(async (fields) => {
  const ok = await openYourModal(fields); // resolve true/false
  // fields can include the special "attestation_lookup" scope before any RPC queries happen
  return ok;
});

const claims = await client.getPublicClaims(walletAddress, [
  "is_human_verified",
  "is_over_18",
  "verification_level",
]);

Node Demo

A light CLI script fetches and prints a wallet's attestation:

SUI_RPC_URL=https://fullnode.testnet.sui.io:443 \
  npx ts-node src/examples/node-demo/demo.ts 0xYourSuiAddress

Tests

Vitest covers:

  • findAttestationObjects filtering logic
  • Field parsing in getAttestationByObjectId
  • isValid revocation / expiry guards

Run them with npm test.

Extending / Production TODOs

  • [ ] Replace mock consent in non-UI contexts with real UX surfaces.
  • [ ] Use a backend callback to map wallet → attestation metadata if storing server-side state.
  • [ ] Harden parseObject.ts once the on-chain struct stabilizes; document any provider-specific quirks near the helper comments.
  • [ ] Rate-limit RPC calls and add retries/backoff.
  • [ ] Never cache PII server-side. Store only: wallet address, attestation object ID, verification level, issue/expiry timestamps, and revocation flag.

RPC & Network Notes

  • Default RPC: https://fullnode.testnet.sui.io:443
  • Always use an HTTPS RPC endpoint.
  • Set SUI_NETWORK in .env for logging/documentation purposes (not currently enforced in code).

Built for the Suirify protocol to demonstrate a consent-first, read-only attestation flow. Contributions welcome—open a PR once you've run npm run build && npm test.