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

@katanga/sdk-core

v0.1.0

Published

Core types, ABIs, and utilities for the Katanga agent-to-agent marketplace protocol on Flare Network.

Readme

@katanga/sdk-core

Core types, ABIs, and utilities for the Katanga agent-to-agent marketplace protocol on Flare Network.

Install

npm install @katanga/sdk-core

What's included

| Module | Purpose | |--------|---------| | ABIs | KatangaMarket, KatangaEscrow (+ FDC methods), KatangaReputation, FDC system contracts | | Types | Solidity struct mirrors, Schema.org Product metadata, EscrowState, Supabase DB types | | Constants | Chain definitions (Coston2/Flare), contract addresses, CHAIN_REGISTRY, FDC constants | | Client | Viem client factory (createKatangaClient) for Coston2/Flare | | x402 | XRPL settlement types — SettlementRail (evm, xrpl-x402, xrpl-fdc) | | FDC | Flare Data Connector client — cross-chain XRP payment attestation and Merkle proof retrieval | | SyncEngine | Polling scheduler with circuit breaker, DeltaDetector, StockSnapshot, PriceSnapshot, FulfillmentSnapshot | | Credentials | CredentialStore interface, EnvCredentialStore (KATANGA_SOURCE_{ID}_{FIELD}), MemoryCredentialStore | | Telemetry | AgentTelemetry interface, ConsoleTelemetry, NoopTelemetry | | IPFS | KatangaIPFS — upload/fetch Schema.org listing metadata via Pinata |

Usage

import {
  katangaMarketAbi,
  katangaEscrowAbi,
  CONTRACTS,
  coston2,
  getChainConfig,
  CHAIN_REGISTRY,
  type ListingMetadata,
  EscrowState,
} from "@katanga/sdk-core";

// Get chain config for Coston2 testnet
const config = getChainConfig(114);
console.log(config.displayName);     // "Flare (Testnet)"
console.log(config.contracts.escrow); // "0x5a1BEB..."
console.log(config.settlement);       // ["evm", "xrpl-fdc"]

FDC Payment Attestation

Verify native XRP payments on XRPL via the Flare Data Connector:

import { verifyXrpPaymentViaFdc, hashXrplAddress } from "@katanga/sdk-core";

// 1. Hash XRPL addresses for on-chain comparison
const buyerHash = hashXrplAddress("rBuyerXRPAddress");

// 2. Full FDC verification flow (~3-5 min)
const proof = await verifyXrpPaymentViaFdc(
  publicClient, walletClient, "coston2", xrplTxHash,
  { onPoll: (ms) => console.log(`Waiting ${ms / 1000}s...`) }
);

// 3. Submit proof to escrow contract
await walletClient.writeContract({
  address: escrowAddress,
  abi: katangaEscrowAbi,
  functionName: "createEscrowWithXrpProof",
  args: [listingId, quantity, shippingHash, proof.roundId, proof.proof, proof.merkleProof],
});

SyncEngine

import { SyncEngine, DEFAULT_CIRCUIT_BREAKER, ConsoleTelemetry } from "@katanga/sdk-core";

const engine = new SyncEngine(DEFAULT_CIRCUIT_BREAKER, new ConsoleTelemetry("my-agent"));
engine.on("stock_changed", (event) => {
  console.log(`${event.sku}: ${event.current.quantityAvailable} units`);
});
engine.scheduleTask({ name: "stock", intervalMs: 120_000, execute: async () => [] });

Credential Store

import { EnvCredentialStore } from "@katanga/sdk-core";

// Reads: KATANGA_SOURCE_SHOPIFY_TYPE=api_key, KATANGA_SOURCE_SHOPIFY_API_KEY=shpat_...
const store = new EnvCredentialStore();
const creds = await store.get("shopify"); // { type: "api_key", apiKey: "shpat_..." }

License

MIT