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 🙏

© 2025 – Pkg Stats / Ryan Hefner

verichain

v2.4.1

Published

Legal-grade accountability system for AI decisions with ATHENA, HELIOS, and ARES - Node.js SDK

Readme

🛡️ VeriChain Node.js SDK v2.4.1

🔐 Authentication Required

As of v2.4.0, all API endpoints require authentication with an API key.

Get your API key:

  • Demo/Dev: vchain_demo_key_12345
  • Production: Generate in VeriChain Dashboard → Settings → API Keys

What's New in v2.4.1:

  • ✅ Added warnings when API key is not provided
  • ✅ Updated all examples with authentication
  • ✅ Improved documentation for production use

Legal-grade accountability system for AI decisions with real-time bias prevention, legal explainability, and automated compliance auditing.

🚀 Features

Core Features

  • Decision Recording - Cryptographically signed audit trails
  • Blockchain Anchoring - Immutable proof on Polygon
  • Certificate Generation - Legal-grade PDF certificates

Advanced Features (NEW!)

  • ⚖️ ATHENA - Legal Explainability (GDPR Art. 22 compliant)
  • 📊 HELIOS - Auto Audit Package (GDPR, EU AI Act, SOC 2, ISO 27001)
  • ARES - Real-time Bias Interception (<1ms analysis)

📦 Installation

npm install verichain

🎯 Quick Start

Basic Decision Recording

import { VeriChainClient } from 'verichain';

const client = new VeriChainClient('http://localhost:8000');

// Submit a decision
const result = await client.submitDecision({
  decision_id: 'LOAN_001',
  outcome: 'approved',
  input_data: { credit_score: 750, age: 35 },
  explanation: 'Good credit history'
});

console.log('Decision certified:', result.certificate_id);

ARES - Real-time Bias Check

import { AresClient } from 'verichain';

// ⚠️ API key REQUIRED for production
const ares = new AresClient(
  'http://localhost:8000',
  'vchain_your_key_here'  // Get from dashboard
);

// Check for bias BEFORE making decision
const result = await ares.analyze({
  name: 'Maria Garcia',
  age: 23,
  gender: 'female',
  race: 'hispanic',
  credit_score: 780
});

console.log(`Bias score: ${(result.analysis.bias_score * 100).toFixed(1)}%`);
console.log(`Action: ${result.analysis.action}`);  // allow, warn, block
console.log(`Analysis time: ${result.analysis.analysis_time_ms.toFixed(2)}ms`);

ATHENA - Legal Explanation

import { AthenaClient } from 'verichain';

// ⚠️ API key REQUIRED for production
const athena = new AthenaClient(
  'http://localhost:8000',
  'vchain_your_key_here'  // Get from dashboard
);

// Generate citizen-level explanation
const explanation = await athena.explain(
  'LOAN_001',
  'citizen',  // or 'regulator', 'legal'
  'json'
);

// Download PDF
const pdf = await athena.explainPdf(
  'LOAN_001',
  'citizen',
  'explanation.pdf'
);

HELIOS - Compliance Audit

import { HeliosClient } from 'verichain';

// ⚠️ API key REQUIRED for production
const helios = new HeliosClient(
  'http://localhost:8000',
  'vchain_your_key_here'  // Get from dashboard
);

// Generate GDPR report
const report = await helios.generateReport('org_123', 'gdpr');

// Generate full audit package (all 4 standards)
const auditPackage = await helios.generatePackage('org_123');

console.log('Package ID:', auditPackage.package_id);
console.log('Reports:', Object.keys(auditPackage.reports));

📚 Complete Workflow Example

import { VeriChainClient, AresClient, AthenaClient, HeliosClient } from 'verichain';

// ⚠️ IMPORTANT: Use API key for production
const API_KEY = 'vchain_your_key_here';  // Get from dashboard

// Initialize clients with API key
const verichain = new VeriChainClient('http://localhost:8000', API_KEY);
const ares = new AresClient('http://localhost:8000', API_KEY);
const athena = new AthenaClient('http://localhost:8000', API_KEY);
const helios = new HeliosClient('http://localhost:8000', API_KEY);

// 1. Check for bias BEFORE decision
const decisionData = {
  name: 'John Doe',
  age: 35,
  credit_score: 750
};

const simulation = await ares.simulate(decisionData);
if (simulation.simulation.would_be_blocked) {
  console.log('❌ Decision would be blocked - too much bias!');
  process.exit(1);
}

// 2. Submit decision
const result = await verichain.submitDecision({
  decision_id: 'LOAN_001',
  outcome: 'approved',
  input_data: decisionData
});

// 3. Generate legal explanation
const explanation = await athena.explain(result.decision_id, 'citizen');

// 4. Generate compliance audit
const audit = await helios.generatePackage('org_123');

console.log('✅ Complete workflow finished!');

🔧 API Reference

VeriChainClient

Core client for decision recording and verification.

const client = new VeriChainClient(apiUrl);

// Submit decision
await client.submitDecision(decision);

// Verify decision
await client.verifyDecision(decisionId);

// Get statistics
await client.getStats();

AresClient

Real-time bias interception (<1ms).

const client = new VeriChainClient(apiUrl)
  • apiUrl (string, optional): Base URL of VeriChain API. Default: http://localhost:8000

Methods

submitDecision(decision)

Submit a decision to VeriChain.

Parameters:

  • decision (Object): Decision data

Returns: Promise with decision_id

verifyDecision(decisionId)

Verify a decision.

Parameters:

  • decisionId (string): Decision ID

Returns: Promise with verification result

getLedgerStats()

Get ledger statistics.

Returns: Promise with ledger stats

getStats()

Get system statistics.

Returns: Promise with system stats

getAnchors()

Get list of anchors.

Returns: Promise of anchors

hashData(data)

Hash data using SHA-256.

Parameters:

  • data (any): Data to hash

Returns: string (hex-encoded hash)

health()

Check API health.

Returns: Promise with health status

Examples

Complete Example

import VeriChainClient from 'verichain';

async function main() {
  const client = new VeriChainClient();

  // Check health
  const health = await client.health();
  console.log('API Status:', health.status);

  // Submit decision
  const decision = {
    issuer: 'bank001',
    model_id: 'loan_approval',
    model_version: 'v1.0',
    input: {
      customer_id: 'C12345',
      loan_amount: 100000,
      annual_income: 75000
    },
    outcome: 'approved',
    risk_score: 35
  };

  const result = await client.submitDecision(decision);
  console.log('✅ Decision recorded:', result.decision_id);

  // Verify immediately
  const verification = await client.verifyDecision(result.decision_id);
  console.log('✅ Verification:', verification.valid ? 'VALID' : 'INVALID');

  // Get stats
  const stats = await client.getStats();
  console.log('📊 Stats:', stats);
}

main().catch(console.error);

Error Handling

try {
  const result = await client.submitDecision(decision);
  console.log('Success:', result);
} catch (error) {
  console.error('Error:', error.message);
}

License

MIT

Support

For issues and questions, please visit: https://github.com/verichain/verichain