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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@grapenpm/vine-reputation-client

v0.1.31

Published

Composable client for the Grape Vine Reputation Solana program

Readme

🍇 Vine Reputation Client

A lightweight, composable TypeScript client for interacting with the Vine Reputation Program on Solana.

This package provides:

  • PDA helpers
  • account decoders
  • read APIs (fetch config, reputation, metadata)
  • instruction builders (initialize, add/reset/transfer reputation, admin actions)

Designed for DAOs, governance apps, leaderboards, badges, and reputation systems.


✨ Why Vine Reputation?

Vine Reputation enables DAOs to:

  • Assign non-transferable reputation points
  • Track reputation per season
  • Support governance weighting, leaderboards, badges, and access control
  • Keep logic on-chain, UI off-chain, and tooling open

This client makes the program easy to integrate without Anchor or manual IDL parsing.


📦 Installation

npm install @grapenpm/vine-reputation-client

or

yarn add @grapenpm/vine-reputation-client

🔑 PDA Helpers

Derive all PDAs used by the Vine Reputation program.

import {
  getConfigPda,
  getReputationPda,
  getProjectMetaPda,
} from "@grapenpm/vine-reputation-client";
import { PublicKey } from "@solana/web3.js";

const daoId = new PublicKey("DAO_PUBLIC_KEY");

const [configPda] = getConfigPda(daoId);
const [projectMetaPda] = getProjectMetaPda(daoId);

Fetch Reputation Config

import { fetchConfig } from "@grapenpm/vine-reputation-client";
import { Connection } from "@solana/web3.js";

const connection = new Connection("https://api.devnet.solana.com");

const config = await fetchConfig(connection, daoId);

console.log("Authority:", config.authority.toBase58());
console.log("Current season:", config.currentSeason);
console.log("Reputation mint:", config.repMint.toBase58());

Fetch User Reputation

import { fetchReputation } from "@grapenpm/vine-reputation-client";
import { PublicKey } from "@solana/web3.js";

const user = new PublicKey("USER_WALLET");

const reputation = await fetchReputation(
  connection,
  daoId,
  user,
  config.currentSeason
);

console.log("Reputation points:", reputation?.amount.toString());

Fetch Project Metadata (for UI Customization)

import { fetchProjectMetadata } from "@grapenpm/vine-reputation-client";

const meta = await fetchProjectMetadata(connection, daoId);

console.log("Metadata URI:", meta?.metadataUri);

Initialize a Reputation Space

import { buildInitializeConfigIx } from "@grapenpm/vine-reputation-client";

const ix = await buildInitializeConfigIx({
  daoId,
  repMint,
  initialSeason: 1,
  authority: wallet.publicKey,
  payer: wallet.publicKey,
});

Add Reputation Points

import { buildAddReputationIx } from "@grapenpm/vine-reputation-client";

const ix = await buildAddReputationIx({
  daoId,
  authority: wallet.publicKey,
  payer: wallet.publicKey,
  user,
  amount: BigInt(10),
  currentSeason: config.currentSeason,
});

Reset or Transfer Reputation

buildResetReputationIx(...)
buildTransferReputationIx(...)

How to set decay (global, on ReputationConfig)

import {
  buildSetDecayBpsIx,
  VINE_REP_PROGRAM_ID,
} from "@grapenpm/vine-reputation-client";
import { Transaction } from "@solana/web3.js";

// 30% decay per season
const decayBps = 3000;

const ix = await buildSetDecayBpsIx({
  daoId,
  authority: wallet.publicKey, // MUST be config.authority
  decayBps,
});

const tx = new Transaction().add(ix);
const sig = await wallet.sendTransaction(tx, connection);
await connection.confirmTransaction(sig, "confirmed");

How to fetch & use decay

const config = await fetchConfig(connection, daoId);
const decayBps = config?.decayBps ?? 0;

const w0 = seasonWeight(decayBps, 0); // 1.0
const w1 = seasonWeight(decayBps, 1); // 0.7 (if 30%)
const w2 = seasonWeight(decayBps, 2); // 0.49

Close Accounts (Danger Zone)

buildCloseConfigIx(...)
buildCloseReputationIx(...)
buildCloseProjectMetadataIx(...)

Use Cases

•	DAO governance weighting
•	Contributor reputation
•	Leaderboards
•	Badges & access tiers
•	Delegation signals
•	Anti-sybil scoring
•	Community incentives

Philosophy

Vine Reputation is: • Composable – small, focused primitives • Permissioned – authority-controlled • Transparent – on-chain state • UI-agnostic – bring your own frontend