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

por-sdk

v0.8.0

Published

Proof of Real — gate any Sui app on verified-human credentials in a few lines.

Readme

por-sdk

Gate any Sui app on verified-human credentials — in a few lines.

npm install por-sdk @mysten/sui

Off-chain gate (show/hide a claim, gate an action)

Three lines:

import { PorClient, Level } from 'por-sdk';

const por = new PorClient();                               // 1 · testnet by default
if (!(await por.isVerified(address, Level.DeviceHuman)))   // 2 · real human?
  throw new Error('Not a verified human');                 // 3

isVerified returns true only if the address holds a PoR credential that is unexpired, at least the level you require, and not revoked. All three are checked by default; revocation costs one extra read-only call — pass { checkRevocation: false } to skip it. (Need just the revocation bit? por.isRevoked(credId).)

High-value gates: prefer the on-chain gate below. Any off-chain isVerified read has a check→act gap — the holder could be revoked, or swap credentials, between the read and your action. The on-chain requireVerified PTB enforces it atomically.

On-chain gate (inside a Programmable Transaction)

Compose require_verified before your protocol's gated call — the whole transaction aborts if the caller isn't a verified human. By default this is the revocation-aware gate (level + expiry + not-revoked):

import { Transaction } from '@mysten/sui/transactions';
import { PorClient, Level } from 'por-sdk';

const por = new PorClient();
const tx = new Transaction();

// aborts unless `credentialId` is valid at >= L2 AND not revoked
por.requireVerified(tx, { credential: credentialId, minLevel: Level.RealAction });

// ...your gated move call, e.g. the airdrop claim...
tx.moveCall({ target: `${AIRDROP_PKG}::airdrop::claim`, arguments: [/* ... */] });

In your own Move module the gate is one line. Use registry::require_verified (passes the shared Registry) for the revocation-aware check; credential::require_verified is the lighter level+expiry-only variant:

use por::registry;
registry::require_verified(&registry, cred, 2, clock); // >= L2, unexpired, not revoked

Read a credential

const cred = await por.getCredential(address);
// { id, level, expiresAtMs, issuedAtMs, deviceCommitment, attestor } | null

Levels

| Level | Meaning | |---|---| | DeviceHuman (0) | genuine device + live human | | Phone (1) | + phone/SIM uniqueness | | RealAction (2) | + real-world-action history & continuous re-attestation | | UniquePerson (3) | + unique verified person |

Config

new PorClient() defaults to PoR's testnet deployment. Override with your own client or addresses:

new PorClient({ suiClient, deployment: { network, packageId, registryId } });

Try it

npm install && npm run build
npm run demo                 # reads a real testnet credential