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

@rohan-zk/sdk

v0.1.1

Published

The Trust Layer for AI Agents – Zero-Knowledge Handshakes between autonomous machines.

Downloads

30

Readme

@rohan-zk/sdk

The Trust Layer for AI Agents.

Zero-Knowledge Handshakes between autonomous machines. Private deals, public proof.

npm version License: MIT


What is this?

Rohan enables AI agents to negotiate confidential deals (NDAs, payments, contracts) with each other using Zero-Knowledge Proofs. The deal content stays private. Only a cryptographic commitment lands on-chain.

Think of it as Stripe for machine-to-machine trust – but instead of credit cards, your agents use ZK-SNARKs.

Install

npm install @rohan-zk/sdk

Quickstart

import { RohanNode } from '@rohan-zk/sdk';

// 1. Create an agent
const agent = new RohanNode({
  port: 4000,
  walletKey: process.env.ROHAN_KEY!,
});

// 2. Listen for incoming deals
agent.onHandshake((deal) => {
  console.log(`Deal from ${deal.from}: ${deal.commitment}`);
});

// 3. Go live
await agent.start();

That's it. Your agent is now a ZK-enabled node in the Rohan network.

Send a Confidential Handshake

const result = await agent.handshake(
  'http://partner-agent:4000/api/zk-handshake',
  'NDA for Project Alpha – Confidential',
  150  // utility fee
);

console.log(result.txId);             // "tx_e9fb3b78..."
console.log(result.onChainCommitment); // "e2d68af9..."

The deal content ("NDA for Project Alpha") never leaves your machine. Only the cryptographic proof is sent to the partner agent, who verifies it without seeing the data.

API Reference

new RohanNode(config)

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | port | number | ✅ | – | Port to listen on for incoming handshakes | | walletKey | string | ✅ | – | Private key (load from env, never hardcode) | | did | string | ❌ | Auto-generated | Decentralized Identifier for this node | | minFee | number | ❌ | 100 | Minimum utility fee for incoming handshakes | | verbose | boolean | ❌ | true | Enable console logging |

agent.start(): Promise<void>

Start the node. Begins listening for incoming ZK-Handshakes on the configured port.

agent.stop(): Promise<void>

Gracefully shut down the node.

agent.onHandshake(callback): void

Register a callback that fires when a verified handshake arrives.

agent.onHandshake(async (handshake) => {
  console.log(handshake.from);          // DID of the sender
  console.log(handshake.commitment);    // On-chain commitment hash
  console.log(handshake.txId);          // Transaction ID
  console.log(handshake.verified);      // Always true (rejected proofs don't fire)
});

agent.handshake(url, payload, fee): Promise<HandshakeResult>

Initiate a confidential deal with a remote agent.

| Parameter | Type | Description | |-----------|------|-------------| | url | string | Full URL of the remote agent's handshake endpoint | | payload | string | Secret deal content (never transmitted) | | fee | number | Utility fee (default: 150) |

Returns:

{
  status: 'success' | 'error',
  message: string,
  onChainCommitment?: string,  // The public proof hash
  txId?: string                // Ledger transaction ID
}

agent.getDid(): string

Returns the Decentralized Identifier of this node.

Architecture

┌──────────────────────────────────────────────────────┐
│                    Your Application                   │
│                                                      │
│   const agent = new RohanNode({ port, walletKey })   │
│   agent.handshake(url, secret, fee)                  │
└──────────────────┬───────────────────────────────────┘
                   │
        ┌──────────▼──────────┐
        │    @rohan-zk/sdk    │
        │                     │
        │  ┌───────────────┐  │
        │  │   Prover      │  │  ← Generates ZK-Proof locally
        │  │  (prover.ts)  │  │    (secret data stays here)
        │  └───────┬───────┘  │
        │          │ proof    │
        │  ┌───────▼───────┐  │
        │  │  Express API  │  │  ← Sends/receives proofs
        │  │  /api/zk-*    │  │
        │  └───────┬───────┘  │
        │          │          │
        │  ┌───────▼───────┐  │
        │  │  Verifier     │  │  ← Validates incoming proofs
        │  │ (verifier.ts) │  │
        │  └───────────────┘  │
        └─────────────────────┘
                   │
        ┌──────────▼──────────┐
        │  Midnight Network   │  ← The ZK-Settlement Layer
        │  (coming soon)      │
        └─────────────────────┘

Endpoints

Every RohanNode automatically exposes:

| Method | Path | Description | |--------|------|-------------| | GET | /health | Node status, DID, version, uptime | | POST | /api/zk-handshake | Incoming ZK-Proof verification |

Security

  • Private keys are held in RAM only. Never written to disk.
  • Deal content never leaves the prover machine. Only the ZK-Proof travels.
  • Idempotency keys prevent replay attacks on handshake endpoints.
  • Minimum fee enforcement rejects underpaid handshakes automatically.

Roadmap

  • [x] Mock ZK-Proof simulation (SHA-256 commitments)
  • [x] Express-based handshake protocol
  • [x] TypeScript with full type definitions
  • [ ] Real zk-SNARK integration via Midnight Network
  • [ ] On-chain commitment verification
  • [ ] DID exchange protocol
  • [ ] Multi-agent routing

License

MIT © Rohan Protocol