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

@constellation-network/digital-evidence-sdk-x402

v0.1.1

Published

x402 micropayment extension for the Digital Evidence Depository SDK

Readme

@constellation-network/digital-evidence-sdk-x402

npm CI License

x402 micropayment extension for the Digital Evidence Depository SDK. Pay-per-request fingerprint submission using USDC on Base via an Ethereum wallet — no API key required.

For full documentation including payment control, custom signers, and pricing, see the x402 Payments guide.

Install

npm install @constellation-network/digital-evidence-sdk-x402 ethers

Quick start

import { ethers } from 'ethers';
import { DedX402Client, createEthersSigner } from '@constellation-network/digital-evidence-sdk-x402';

const wallet = new ethers.Wallet(process.env.ETH_PRIVATE_KEY!);
const client = new DedX402Client({
  baseUrl: 'https://de-api.constellationnetwork.io',
  signer: createEthersSigner(wallet),
  signingPrivateKey: process.env.DAG_PRIVATE_KEY!,
});

// Generate a fingerprint (org/tenant IDs derived from wallet)
const submission = await client.generateFingerprint({
  eventId: crypto.randomUUID(),
  documentId: 'doc-001',
  documentContent: 'Hello, world!',
});

// Submit — payment is handled automatically
const results = await client.fingerprints.submit([submission]);

How it works

The client uses the x402 protocol to handle payments transparently. When the API responds with 402 Payment Required, the client signs an EIP-3009 TransferWithAuthorization using your Ethereum wallet and retries the request with the payment header attached.

Organization and tenant IDs are deterministically derived from your wallet address (UUID v5), so no prior registration is needed.

Configuration

const client = new DedX402Client({
  baseUrl: 'https://de-api.constellationnetwork.io',
  signer: createEthersSigner(wallet),
  signingPrivateKey: '...',  // DAG/SECP256K1 key for fingerprint signing (optional)
  autoPay: true,             // Auto-pay on 402 responses (default: true)
  timeout: 30000,            // Request timeout in ms (default: 30000)
});

When autoPay is false, paid endpoints return a PaymentRequiredResult instead of paying automatically, allowing caller-driven payment flows.

API

Client

| Property / Method | Description | |---|---| | client.fingerprints | Fingerprint API (submit, search, upload) | | client.batches | Batch status API | | client.generateFingerprint(opts) | Generate a signed fingerprint (requires signingPrivateKey) | | client.orgId | Deterministic org UUID from wallet | | client.tenantId | Deterministic tenant UUID from wallet | | client.walletAddress | Ethereum wallet address |

Fingerprints

| Method | Payment | Description | |---|---|---| | submit(submissions) | Paid | Submit fingerprints for notarization | | submitInBatches(submissions, batchSize?, delayMs?) | Paid | Submit in batches (separate payment per batch) | | upload(submissions, documents) | Paid | Upload fingerprints with documents (multipart) | | search(params) | Paid | Search fingerprints with filtering and pagination | | getByHash(hash) | Public | Get fingerprint detail by hash | | getProof(hash) | Public | Get Merkle inclusion proof | | getLatest(limit?, status?) | Public | Get latest fingerprints | | getStats() | Public | Get platform-wide statistics |

Development

npm install
npm test
npm run build
npm run lint

License

Apache-2.0