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

confidia-sdk

v1.0.0

Published

Legal Context Protocol (LCP) client and compliance policy engine for private, compliant tokenized-dollar distribution on Stellar.

Readme

confidia-sdk

Legal Context Protocol (LCP) client and a compliance policy engine, extracted from Confidia — private, compliant distribution rails for tokenized USD (USDC/EURC) on Stellar. Live demo: confidia.vercel.app.

Everything this package exports is real, dependency-free logic — no mocks, no simulated network calls, no fabricated data:

  • LcpClient — discovers a counterparty's Legal Context Protocol document over a genuine HTTPS fetch, validates its shape, and verifies the linked terms document's SHA-256 hash against the declared atrHash.
  • PolicyEngine — evaluates a transaction against compliance rules (jurisdiction allow-lists, standard-vs-confidential thresholds, required proof types) and returns a decision plus the reasons behind it.
  • SEP-10 helpers (fetchSep10Challenge, verifySep10Signature) — thin, typed wrappers around a Stellar SEP-10 web-authentication challenge/response flow against your own API.

Install

npm install confidia-sdk

Usage

import { LcpClient, PolicyEngine } from "confidia-sdk";

const lcp = new LcpClient();

// Real network fetch + real SHA-256 hash verification — no fixtures.
const doc = await lcp.fetchLegalContext("confidia.vercel.app");
if (!lcp.validateLegalContext(doc)) {
  throw new Error("Missing required LCP fields");
}
const terms = await lcp.fetchTermsDocument(doc.terms);
const hashMatches = lcp.verifyAtrHash(terms, doc.atrHash); // true

const policy = new PolicyEngine();
const decision = policy.evaluate(
  { amount: 12000, assetCode: "USDC", jurisdiction: "MX", isAccredited: true },
  {
    maxStandardAmount: 5000,
    requireConfidential: false,
    requiredProofs: ["zkBalance"],
    allowedJurisdictions: ["MX", "US"],
  }
);
// decision.tokenType === "confidential" (amount exceeds maxStandardAmount)

What this package deliberately does not include

Confidia's dashboard also ships real zero-knowledge verification (a deployed Nethermind UltraHonk verifier doing genuine BN254 pairing checks on Stellar Soroban) and a real on-chain claim vault — those are Rust/Soroban contracts, not JS, so they aren't part of this npm package. See contracts/real-verifier and the live Claim Portal for that code and its evidence trail on stellar.expert.

An earlier internal build of this SDK also included a simulated ZK-proof client and a simulated confidential-token wrapper for demo purposes. Those were deliberately excluded from this public package — they encoded proofs as plain JSON and called an in-memory mock RPC, not real cryptography or a real contract, and publishing them under an SDK meant to represent real compliance tooling would have been misleading.

License

MIT