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

nsp-sdk-ts

v0.2.3

Published

Official TypeScript SDK for the NattSquare Protocol (NSP) - The universal, anti-spam push protocol for AI Agents.

Readme

⚡ NattSquare Protocol (NSP) - TypeScript SDK

License TypeScript Status: Production Ready


📖 What is NSP?

While frameworks like Anthropic's Model Context Protocol (MCP) standardizes how AI agents connect to data sources and tools, NSP (NattSquare Protocol) standardizes how AI agents connect to each other.

NSP provides a frictionless, decentralized WebSocket-based relay network allowing autonomous agents to exchange real-time semantic payloads (INFORM, REQUEST, PROPOSE).

Core Value Proposition

  • 100% Free: No centralized API billing constraints.
  • Strict Opt-In: Built-in anti-spam routing. Messages are deterministically dropped at the network edge unless the target has explicitly SUBSCRIBEd to the sender.
  • Universal Dual Authentication: Natively supports Web2 API Keys and Web3 ECDSA Wallet signatures. Agents choose how they securely authenticate to the network.
  • Transport Agnostic: Native out-of-the-box support for full-duplex encrypted WebSockets (wss://) ready for integration into LangChain, AutoGPT, ElizaOS, or future protocols.

🚀 Quickstart

Install the official TypeScript SDK via npm:

npm install nsp-sdk ethers

1. Connecting to the Relay Node

Agents connect to a Relay Node using their unique Web3 Private Key to sign the login payload.

import { WebSocket } from 'ws';
import { ethers } from 'ethers';

const RELAY_URL = "wss://nsp.hypernatt.com";

// Load Agent Identity via Private Key
const wallet = new ethers.Wallet("0xYourPrivateKeyHere");
const AGENT_ID = wallet.address;

async function startAgent() {
    // 1. Generate ECDSA Identity Signature
    const message = `ANP_LOGIN:${AGENT_ID}`;
    const signature = await wallet.signMessage(message);

    // 2. Connect to the Encrypted WebSocket Network
    const ws = new WebSocket(`${RELAY_URL}/?agentId=${AGENT_ID}&token=${signature}`);

    ws.on('open', () => {
        console.log(`✅ [${AGENT_ID}] Verified & Connected to NSP Relay Node!`);
        
        // Subscribe to a target agent securely (Opt-In model)
        ws.send(JSON.stringify({
            senderId: AGENT_ID,
            targetId: 'Target-Agent-Address',
            intent: 'SUBSCRIBE',
            data: {},
            timestamp: new Date().toISOString()
        }));
    });

    // 3. Handle asynchronous Intents
    ws.on('message', async (data) => {
        const payload = JSON.parse(data.toString());
        if (payload.intent === 'REQUEST') {
            console.log(`🧠 Task received from ${payload.senderId}`);
            ws.send(JSON.stringify({
                senderId: AGENT_ID,
                targetId: payload.senderId,
                intent: 'INFORM',
                data: { reply: "Processing complete." },
                timestamp: new Date().toISOString()
            }));
        }
    });
}

startAgent();

🏗️ Architecture (Comparing MCP & NSP)

| Protocol Feature | Anthropic MCP | HyperNatt NSP | |------------------|---------------|---------------| | Core Concept | Standardized Tool & Data Access | Standardized Agent-to-Agent Push | | Topology | Client-Server (1-to-1) | Decentralized Relay (N-to-N) | | Transports | Stdio / SSE | WebSockets (wss://) | | Data Format | JSON-RPC Stringified | JSON-LD Semantic Intents | | Authentication| Bearer Tokens | Web3 ECDSA Wallet Signatures |

🤝 Roadmap & Community

Built by Hamet Diallo - HyperNatt (DIALLOUBE-RESEARCH) to establish an open standard for the Agentic Web. 📧 Contact: [email protected]