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

@openclawdsolana/clawd-sdk

v0.1.0

Published

OpenClawd Solana SDK — Agent & token launches with adaptive bonding curves, Token2022, pTokens, and intelligent vault mechanics

Readme

@openclawdsolana/clawd-sdk

Solana SDK and IDL for AI agent and token launches. Built on top of Meteora's Dynamic Bonding Curve (DBC) with a new adaptive intelligence layer, Token2022/pToken support, and a vault with novel burn and lock mechanics.


What's inside

Token standards

| Standard | Description | |----------|-------------| | spl | Standard SPL Token (Token Program) | | token2022 | Token Extensions — any combination of transfer fee, metadata pointer, permanent delegate, interest bearing, non-transferable, etc. | | ptoken | Programmable Token — Token2022 + Transfer Hook pointing to the clawd_protocol program. Every transfer runs on-chain logic: behavioral tracking, fee routing to vault, conviction score updates. |

Adaptive Bonding Curve

A sentiment engine wraps the DBC pool. It computes an EMA-based buy/sell sentiment score and adjusts the effective fee in real time:

  • Bullish → fee discount (incentivise continued buying)
  • Bearish → fee premium (slow down selling pressure)
  • Updates on-chain via update_curve_sentiment — permissionless, interval-gated

Vault & Novel Burn Mechanisms

Four orthogonal burn mechanisms, all permissionless:

1. Entropy Burns

Reads the DBC pool's volatility_accumulator directly. When it exceeds a configurable threshold, burns from the inflation reserve proportional to excess volatility.

burn = reserve × max(0, accumulator − threshold) × sensitivity / 10000

Creates a negative-feedback loop: more volatility → more supply burned → price stabilises.

2. Behavioral Fingerprint Burns

Scores each wallet's trading behaviour across three axes:

  • Trade frequency — >30 trades in 60 slots signals bot activity
  • Hold duration — avg hold <3 slots signals flipper
  • Position size — normalised position BPS

Wallets above the bot threshold lose a fraction of pending rewards (not principal). Call is permissionless; only requires publicly observable trade data.

3. Anti-Gravity Sweep

When current_price < floor_price (configurable % of ATH):

  1. Uses accumulated fee reserve to buy tokens from the DBC pool
  2. Immediately burns all purchased tokens

Self-funding: fuelled by normal trading fees. No centralised treasury, no admin key.

4. Agent Epoch Burns

Every epoch (~24h), the bound AI agent reports activity metrics on-chain:

  • Tasks completed
  • Revenue generated (lamports)
  • Uptime (BPS)

Burn from inflation reserve = reserve × activity_score/10000 × epoch_burn_rate.

Active agents → more burns → deflationary pressure. Aligns AI utility with token economics.

Conviction Vault

Lock tokens to earn a conviction score and protocol revenue share.

score = amount × duration_epochs × consistency_multiplier
multiplier = 1.0 + min(consecutive_epochs × 0.1, 9.0)
  • Revenue share proportional to score
  • Early exit burns 20% of principal — a real cost, not a fee
  • Consecutive relocking compounds the multiplier

Milestone-Gated Developer Locks

Team/dev tokens locked until on-chain milestones are verified. No pure time-locks.

Milestone types (all verifiable without off-chain oracles except holder count):

  • MarketCapQuote — DBC pool quote_reserve reaches threshold
  • CumulativeVolume — DBC pool cumulative trading volume
  • GraduationAchieved — pool migrated to permanent AMM
  • AgentTasksCompleted — agent lifetime tasks counter
  • HolderCount — requires authority attestation

Agent-Token Bindings

Every token launch can register an AgentBinding PDA that:

  • Links the agent's wallet pubkey to the token mint
  • Stores the SHA-256 of the agent's character JSON
  • Stores the SHA-256 of three-laws.md (constitution hash)
  • Records lifetime tasks/revenue on-chain as agent operates

Install

npm install @openclawdsolana/clawd-sdk
# or
pnpm add @openclawdsolana/clawd-sdk

Quick start

Launch an agent pToken

import { Connection, Keypair } from "@solana/web3.js";
import {
  defaultAgentLaunchParams,
  buildAgentLaunchInstructions,
} from "@openclawdsolana/clawd-sdk";

const connection = new Connection("https://api.mainnet-beta.solana.com");
const agentWallet = Keypair.generate();

const params = defaultAgentLaunchParams({
  agentWallet: agentWallet.publicKey,
  name: "Clawd Alpha",
  symbol: "CALPHA",
  uri: "https://arweave.net/my-metadata",
  constitutionPath: "./three-laws.md",
  character: { role: "trader", style: "methodical" },
});

const result = await buildAgentLaunchInstructions(
  connection,
  params,
  feeReceiver
);

// result.instructions → Tx 1: mint + vault + binding
// result.mintKeypair → sign with this
// result.vaultPda, result.agentBindingPda → PDAs

Get an adaptive swap quote

import { AdaptiveCurve, designDefaultAgentCurve } from "@openclawdsolana/clawd-sdk/bonding-curve";

const config = designDefaultAgentCurve({ startPrice: 0.000001, migrationPrice: 0.001 });
const curve = new AdaptiveCurve(config, dbcPoolPubkey);

const quote = await curve.quoteSwap(connection, {
  sqrtPrice: currentSqrtPrice,
  quoteReserve: poolQuoteReserve,
  baseReserve: poolBaseReserve,
  buyBaseForQuote: false, // selling base for quote
  amountIn: 1_000_000n,
});

console.log(quote.outputAmount, quote.sentimentLabel, quote.effectiveFeeNumerator);

Trigger an entropy burn

import { estimateEntropyBurn, buildEntropyBurnInstruction } from "@openclawdsolana/clawd-sdk/vault";

const estimate = estimateEntropyBurn(vaultState, currentVolatilityAccumulator);

if (estimate.wouldTrigger) {
  const { instructions } = buildEntropyBurnInstruction(
    vaultPda, dbcPool, inflationReserveAccount, baseMint, caller
  );
  // send instructions in a transaction
}

Conviction staking

import {
  buildConvictionStakeInstruction,
  estimateConvictionScore,
  slotsUntilFreeUnlock,
} from "@openclawdsolana/clawd-sdk/vault";

const score = estimateConvictionScore(
  1_000_000n,     // 1M tokens
  1_296_000n,     // 6 days in slots
  3,              // 3 consecutive epochs locked before
);

const { instructions } = buildConvictionStakeInstruction(
  vaultPda, stakerAta, convictionPoolAta, baseMint, staker,
  1_000_000n, 1_296_000n
);

Milestone-gated dev lock

import { defaultDevMilestones, buildCreateMilestoneLockInstruction } from "@openclawdsolana/clawd-sdk/vault";

const milestones = defaultDevMilestones(10_000_000n); // lock 10M tokens

const { instructions } = buildCreateMilestoneLockInstruction(
  vaultPda, devAta, vaultTokenAccount, baseMint, devWallet, milestones
);
// Unlocks: 10% at 1k holders, 20% at graduation-size mcap, 30% at 5k holders, 40% at graduation

Program ID

CLAWDpRoToCoLv1pRoGRaM111111111111111111111

Built on top of Meteora DBC:

dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN

Publish

NPM_TOKEN=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 npm publish --access public