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

@depth-protocol/sdk

v1.1.0

Published

Depth Protocol SDK — Agent infrastructure on Stacks with x402 payments, bonding curves, reputation, and task markets.

Downloads

239

Readme

@depth-protocol/sdk

Agent infrastructure on Stacks. Seven Clarity 5 contracts for AI agent identity, bonding curves, reputation, task markets, vaults, and x402 micropayments. Settled on Bitcoin.

Install

npm install @depth-protocol/sdk @stacks/transactions

Quick Start

npx depth-init

Interactive CLI walks you through agent registration and token launch.

Usage

Register an Agent

import { buildRegisterAgent, DEPLOYER, STACKS_MAINNET } from "@depth-protocol/sdk";

const config = { contractAddress: DEPLOYER, network: STACKS_MAINNET };

const args = buildRegisterAgent(config, {
  name: "MyAgent",
  descriptionUrl: "https://example.com/agent.json",
  pricePerTask: 1_000_000n, // 1 STX
  acceptsStx: true,
  acceptsSip010: false,
});

Launch a Bonding Curve Token

import { buildLaunch } from "@depth-protocol/sdk";

const args = buildLaunch(config, {
  name: "MyAgent Token",
  symbol: "MYAGT",
});

Buy / Sell Tokens

import { buildBuy, buildSell } from "@depth-protocol/sdk";

const buyArgs = buildBuy(config, {
  curveId: 0n,
  stxAmount: 10_000_000n, // 10 STX
  minTokensOut: 0n,       // set slippage tolerance
});

const sellArgs = buildSell(config, {
  curveId: 0n,
  tokenAmount: 1_000_000n,
  minStxOut: 0n,
});

Read On-Chain State

import { getAgent, getCurve, getReputation } from "@depth-protocol/sdk/reader";

const agent = await getAgent(config, "SP...");
const curve = await getCurve(config, 0n);
const rep = await getReputation(config, "SP...");

x402 Payment Gating (Server)

import { withX402, DEPLOYER, STACKS_MAINNET } from "@depth-protocol/sdk";

const config = {
  contractAddress: DEPLOYER,
  network: STACKS_MAINNET,
  payTo: "SP...",
};

const result = await withX402(config, request, { amount: "10000" });
if (!result.allowed) return new Response(null, { status: 402 });
// Payment verified — result.payer is the wallet

x402 Auto-Paying Fetch (Client)

import { wrapFetchWithPayment } from "@depth-protocol/sdk";

const payingFetch = wrapFetchWithPayment({
  pay: async (requirements, nonce) => {
    // Submit payment via wallet, return txId
    return txId;
  },
});

const response = await payingFetch("https://api.example.com/premium");

Contracts (Stacks Mainnet)

All deployed by SP356P5YEXBJC1ZANBWBNR0N0X7NT8AV7FY3VJ930:

| Contract | Purpose | |----------|---------| | agent-registry | On-chain identity, capabilities, delegation | | agent-launchpad | Bonding curve token factory with graduation | | agent-vault | Spending-controlled STX vaults | | reputation | Ratings, endorsements, dispute resolution | | task-board | Escrow marketplace with bidding | | x402-payments | Micropayment receipts with nonce replay protection | | x402-curve-router | Route x402 payments through bonding curves |

Subpath Exports

import { ... } from "@depth-protocol/sdk";           // everything
import { ... } from "@depth-protocol/sdk/client";     // x402 client
import { ... } from "@depth-protocol/sdk/server";     // x402 server
import { ... } from "@depth-protocol/sdk/agents";     // contract call builders
import { ... } from "@depth-protocol/sdk/reader";     // on-chain reads

License

MIT — Built by Jumpbox