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

@grapenpm/grape-verification-registry

v0.1.4

Published

Client helpers for the Grape Verification Registry Solana program

Readme

Grape Verification Registry (Client Helpers)

Client-side helpers for the Grape Verification Registry Solana program.

This package provides hashing utilities, PDA derivation helpers, and read helpers used by Discord bots, Telegram bots, and web UIs that integrate with the on-chain verification registry.

🔐 Privacy-first design

  • No plaintext Discord / Telegram / Twitter / Email IDs stored on-chain
  • No wallet public keys stored in program state
  • All identities and wallets are represented by salted hashes

📦 Installation

npm install @grapenpm/grape-verification-registry

🧠 What this package does

This package is intentionally small and focused. It helps you: • Derive PDAs exactly the same way as the on-chain program • Compute identity hashes and wallet hashes correctly • Read verification state from chain (spaces, identities, wallet links)

It does not: • Perform OAuth (Discord / Telegram / Twitter) • Manage nonces or signatures • Enforce token-gating rules • Provide UI components

Those belong in your app or bot.

🏗 Concepts (quick overview)

Space

A per-DAO configuration account. • Holds the DAO ID • Holds a random salt used for hashing • Defines the attestor authority

Identity

A verified platform identity (e.g. a Discord user), stored as a hash. • One identity per (space, platform, id_hash) • Can link to multiple wallets • Can expire or be revoked

Wallet Link

A link between an identity and a wallet hash. • Users can link multiple wallets • Wallet public keys are never stored in account data

🔑 Constants & Enums

import {
  PROGRAM_ID,
  VerificationPlatform,
} from "@grapenpm/grape-verification-registry";
VerificationPlatform.Discord   // 0
VerificationPlatform.Telegram  // 1
VerificationPlatform.Twitter   // 2
VerificationPlatform.Email     // 3

🔐 Hashing Helpers

Wallet hash

import { walletHash } from "@grapenpm/grape-verification-registry";
import { PublicKey } from "@solana/web3.js";

const hash = walletHash(spaceSalt, walletPubkey);

Equivalent to on-chain:

sha256( space.salt || "wallet" || wallet_pubkey )

Identity hash

import { identityHash } from "@grapenpm/grape-verification-registry";

const hash = identityHash(
  spaceSalt,
  "discord",
  discordUserId
);

Equivalent to on-chain:

sha256( space.salt || platform_tag || platform_user_id )

Supported tags: • discord • telegram • twitter • email

📍 PDA Helpers

Space PDA

import { deriveSpacePda } from "@grapenpm/grape-verification-registry";

const [spacePda] = deriveSpacePda(daoPubkey);

Seeds:

["space", dao_id]

Identity PDA

import { deriveIdentityPda } from "@grapenpm/grape-verification-registry";

const [identityPda] = deriveIdentityPda(
  spacePda,
  VerificationPlatform.Discord,
  idHash
);

Seeds:

["identity", space, platform_seed, id_hash]

Wallet Link PDA

import { deriveLinkPda } from "@grapenpm/grape-verification-registry";

const [linkPda] = deriveLinkPda(identityPda, walletHash);

Seeds:

["link", identity, wallet_hash]

🔍 Read Helpers

Fetch space

import { fetchSpace } from "@grapenpm/grape-verification-registry";

const accountInfo = await fetchSpace(connection, spacePda);

Fetch identity

import { fetchIdentity } from "@grapenpm/grape-verification-registry";

const accountInfo = await fetchIdentity(connection, identityPda);

Fetch all wallets linked to an identity

import { fetchLinksForIdentity } from "@grapenpm/grape-verification-registry";

const links = await fetchLinksForIdentity(connection, identityPda);

🌐 Network notes • This package is network-agnostic • Devnet / Mainnet is determined entirely by: • the Connection you pass • the program ID you use

The default PROGRAM_ID currently points to devnet.

🧪 Versioning & stability

Current status: ALPHA • APIs may evolve • Hashing and PDA derivations are considered stable • New helpers may be added without breaking changes

🤝 Intended usage

This package is designed to be used by: • Discord verification bots • Telegram verification bots • Wallet-linking web UIs • Indexers and token-gating services

All of them should derive hashes and PDAs identically, using this package as the source of truth.