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

v0.3.0

Published

TypeScript SDK for the Digital Evidence Depository (DED) on Constellation Network

Downloads

373

Readme

@constellation-network/digital-evidence-sdk

npm CI License

TypeScript SDK for the Digital Evidence Depository on Constellation Network. Create, sign, and submit cryptographic fingerprints for document notarization.

Install

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

Modules

Core (default import) — pure cryptographic operations with no network dependencies. Works in browsers, Node.js, and serverless environments.

Network (subpath import) — HTTP client for the Digital Evidence Ingestion API. Provides authenticated endpoints for submission and search, plus public endpoints for lookup and proofs.

// Core — always available
import { generateFingerprint, generateKeyPair } from '@constellation-network/digital-evidence-sdk';

// Network — optional, import separately
import { DedClient } from '@constellation-network/digital-evidence-sdk/network';

Usage

Generate a signed fingerprint

import {
  generateFingerprint,
  generateKeyPair,
  validateSubmission,
} from '@constellation-network/digital-evidence-sdk';

const keyPair = generateKeyPair();

const submission = await generateFingerprint({
  orgId: '550e8400-e29b-41d4-a716-446655440000',
  tenantId: '123e4567-e89b-12d3-a456-426614174000',
  eventId: '7ca8c920-0ead-22e2-91c5-11d05fe540d9',
  documentId: 'contract-2024-001',
  documentContent: 'This is my document content',
  includeMetadata: true,
  tags: { department: 'legal' },
}, keyPair.privateKey);

validateSubmission(submission);

Step-by-step signing

import {
  createFingerprintValue,
  signFingerprint,
  hashDocument,
  getPublicKeyId,
} from '@constellation-network/digital-evidence-sdk';

const documentRef = hashDocument('my document content');

const value = createFingerprintValue({
  orgId: '550e8400-e29b-41d4-a716-446655440000',
  tenantId: '123e4567-e89b-12d3-a456-426614174000',
  eventId: '7ca8c920-0ead-22e2-91c5-11d05fe540d9',
  documentId: 'contract-2024-001',
  documentRef,
}, getPublicKeyId(privateKey));

const signedFingerprint = await signFingerprint(value, privateKey);

Reusable generator

import { FingerprintGenerator } from '@constellation-network/digital-evidence-sdk';

const generator = new FingerprintGenerator({
  privateKey: 'your-private-key',
  orgId: '550e8400-e29b-41d4-a716-446655440000',
  tenantId: '123e4567-e89b-12d3-a456-426614174000',
});

const submission = await generator.generate({
  eventId: crypto.randomUUID(),
  documentId: 'doc-001',
  documentContent: 'Document content',
  tags: { priority: 'high' },
});

Submit to the API

import { DedClient } from '@constellation-network/digital-evidence-sdk/network';

const client = new DedClient({
  baseUrl: 'http://localhost:8081',
  apiKey: 'your-api-key',
});

// Authenticated
const results = await client.fingerprints.submit([submission]);
const search = await client.fingerprints.search({ documentId: 'contract-2024-001' });

// Public (no API key required)
const detail = await client.fingerprints.getByHash(hash);
const proof = await client.fingerprints.getProof(hash);
const stats = await client.fingerprints.getStats();

Core API

| Export | Description | |--------|-------------| | generateFingerprint | Create, sign, and package a fingerprint in one call | | createFingerprintValue | Build the fingerprint value object | | signFingerprint | Sign a fingerprint value with a private key | | hashDocument | SHA-256 hash a document (string or bytes) | | validateSubmission | Validate a submission against the schema (throws on error) | | safeValidateSubmission | Validate without throwing, returns result object | | FingerprintGenerator | Reusable generator with stored config | | generateKeyPair | Generate a new SECP256K1 key pair | | keyPairFromPrivateKey | Derive a key pair from an existing private key |

Signature Protocol

The SDK implements SECP256K1_RFC8785_V1:

  1. Canonicalize JSON per RFC 8785
  2. SHA-256 hash the canonical bytes
  3. Convert hash to hex string, treat as UTF-8 bytes
  4. SHA-512 hash, truncate to 32 bytes
  5. Sign with SECP256K1 ECDSA

Development

npm install
npm test
npm run build
npm run lint

License

Apache-2.0