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-protocol/sdk

v0.3.1

Published

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

Readme

🚨 v0.3.1 "The Gasless Update" is live: We achieved Stripe-DX for ZK-Proofs. No wallets, no DUST-tokens, no cryptography PhD required. Just an API key.

🛑 The Problem: AI Agents leak data via REST

When your agent talks to another agent via API, the payload is exposed. Centralized servers see your agent's confidential logic, system prompts, and negotiation limits.

⚡ The Solution: Rohan ZK-Handshakes

Rohan enables agents to negotiate confidential deals (NDAs, payments, secrets) using Zero-Knowledge Proofs (zk-SNARKs) on the Midnight Blockchain.

  • Private Deals: The actual deal content never leaves your server.
  • Public Proof: Only an encrypted cryptographic commitment lands on-chain.
  • Zero Web3 Friction: Our Relayer Node handles gas fees. You just code.

What is this?

Rohan enables AI agents to negotiate confidential deals (NDAs, payments, secrets) with each other using Zero-Knowledge Proofs (zk-SNARKs) on the Midnight Blockchain. The actual deal content never leaves your server. Only an encrypted cryptographic commitment lands on-chain.

With SDK v0.3.1, we refined the "Gas Station / Relayer" architecture (Stripe-DX). You no longer need to manage DUST-Token balances, blockchain wallets, or complex cryptography. You simply provide an API Key, and our Relayer pays the gas fees and manages the chain interactions for your agent.

Install

npm install @rohan-protocol/sdk

Quickstart

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

// 1. Create an agent connected to the Relayer (No Wallets required!)
const agent = new RohanNode({
  apiKey: process.env.ROHAN_API_KEY || 'rohan_sk_test',
  relayerUrl: 'https://api.rohanprotocol.network'
});

// 2. Listen for incoming deals (Trustless Verification via Network Ledger)
agent.onHandshake((deal) => {
  console.log(`Deal confirmed on-chain! From: ${deal.from}`);
  console.log(`Commitment Hash: ${deal.commitment}`);
});

// 3. Connect to the Blockchain Tracker
await agent.start();

Send a Confidential Handshake

You can prompt your agent to execute a confidential data transfer utilizing our ZK Proof flow:

const result = await agent.handshake(
  'did:rohan:partner_agent',           // Target DID (or raw Contract Address)
  { nda: 'Project Alpha', blueprints: true }, // Secret data (remains offline, auto-stringified)
  150  // Toll fee in DUST
);

console.log(result.status);            // "success"
console.log(result.txId);              // "tx_mid_892f7dbf..."
console.log(result.onChainCommitment); // "ca5ab9c2..."

🤖 LangChain Integration (God Mode)

Turn your standard LLM into an autonomous Web3 protocol user. We provide a drop-in LangChain Tool wrapper. Your agent can decide by itself when it is appropriate to use a ZK-Handshake to protect confidential data.

import { RohanSecureHandshakeTool } from '@rohan-protocol/sdk';

// Inject the Tool into LangChain/LangGraph
const handshakeTool = new RohanSecureHandshakeTool(agent);
const tools = [handshakeTool, /* other system tools */];

// The LLM will now autonomously construct the ZK-Handshake payload 
// when its system prompt instructs it to securely transmit money or data.

API Reference

new RohanNode(config)

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | apiKey | string | ✅ | – | API key for the Gas Station / Relayer | | relayerUrl | string | ✅ | – | The URL of the Rohan Gas Station | | did | string | ❌ | Auto-generated| Decentralized Identifier for this node |

agent.start(): Promise<void>

Initializes the Ledger Poller. It watches the Midnight Blockchain for status updates relevant to this node.

agent.onHandshake(callback): void

Fires automatically when a cryptographic ZK-Proof addressed to this agent is successfully verified on the Midnight Ledger.

agent.handshake(targetIdentifier, dealPayload, fee): Promise<HandshakeResult>

Generates a Zero-Knowledge Proof locally and relays it via the Gas Station API.

  • targetIdentifier: A DID (did:rohan:...) or a raw Midnight Contract Address. DIDs are resolved automatically.
  • dealPayload: string | object — The confidential data you are masking. Objects are auto-stringified.
  • fee: Toll fee in DUST (default: 150, minimum: 100).

Architecture

┌──────────────────────────────────────────────────────┐
│                    Your AI Agent                      │
│                                                      │
│   const agent = new RohanNode({ apiKey, relayerUrl })│
│   agent.handshake("did:rohan:partner", { secret })   │
└──────────────────┬───────────────────────────────────┘
                   │
        ┌──────────▼──────────┐
        │  @rohan-protocol/sdk│
        │  (Prover Module)    │ ← Generates ZK-Proof locally
        └──────────┬──────────┘
                   │ HTTP POST (Proof Blob + API Key)
        ┌──────────▼──────────┐
        │  Rohan Relayer Node │ ← Verifies API Key & Pays DUST Fee
        └──────────┬──────────┘
                   │ Submit transaction to Midnight
        ┌──────────▼──────────┐
        │  Midnight Network   │ ← The ZK-Settlement Layer
        └─────────────────────┘

Security

  • Gasless Architecture: API Keys replace vulnerable Wallet Seeds on the client side.
  • Zero-Knowledge: The deal content is hashed prior to proof generation. Only mathematical assurances are broadcasted.
  • Trustless Execution: Webhooks are deprecated. Incoming deals trigger strictly based on cryptographic changes on the Ledger.

Seeking Alpha Access? We are currently hand-picking our first 50 validators. Send your Agent DID and use-case to [email protected]

License

MIT © Rohan Protocol