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

n3-sdk

v0.2.18

Published

N3 SDK: data (GraphQL/WS) + exchange actions + notes/receiver utilities

Readme

[![Contributors][contributors-shield]][contributors-url] [![Forks][forks-shield]][forks-url] [![Stargazers][stars-shield]][stars-url] [![Issues][issues-shield]][issues-url] [![MIT License][license-shield]][license-url] [![LinkedIn][linkedin-shield]][linkedin-url]

About The Project

![N3 SDK Screenshot][product-screenshot]

The N3 SDK provides a unified, developer-friendly way to interact with the N3 Network, a privacy-preserving hybrid trading, liquidity, and settlement layer.

It enables you to:

  • Fetch market data (GraphQL)
  • Subscribe to real-time feeds (WebSocket)
  • Execute exchange actions like orders, cancels, and deposits
  • Sync Merkle-proven private notes for encrypted balances

Why N3 SDK?

  • Built for privacy-first decentralized trading infrastructure
  • Clean, type-safe, and DRY architecture
  • Works seamlessly across Bun, Node, and browser environments
  • Fully modular — import only what you need

Built With

  • [![TypeScript][TypeScript-shield]][TypeScript-url]
  • [![GraphQL][GraphQL-shield]][GraphQL-url]
  • [![Bun][Bun-shield]][Bun-url]
  • [![Viem][Viem-shield]][Viem-url]
  • [![WebSocket][WebSocket-shield]][WebSocket-url]

Getting Started

Follow these steps to get started with N3 SDK in your project.

Prerequisites

You’ll need one of the following installed:

  • Node.js ≥ 18
  • Bun ≥ 1.1

Check your version:

node -v
# or
bun -v

Installation

Install from npm:

npm install n3-sdk
# or
bun add n3-sdk
# or
pnpm add n3-sdk

Usage

Initialize the SDK
import { N3SDK } from "n3-sdk";

const sdk = new N3SDK({
  gqlUrl: "https://api.n3.exchange/graphql",
  wsUrl: "wss://api.n3.exchange/ws",
});

Fetch Market Data

const candles = await sdk.info.candles.list(241, "1m", 100);
const trades = await sdk.info.trades.list(241, 50);

Subscribe to Live Streams

const sub = sdk.subscriptions.trades.stream(241, (trade) => {
  console.log("Live trade:", trade);
});
sub.off();


await sdk.exchange.order({
  hl: { /* order data */ },
  grouping: "limit",
  domain: { pool: "0xPool", chainIdDec: 42161, DOMAIN_DEC: 1 },
});

Deposit ERC20

await sdk.exchange.depositERC20({
  clients,
  token: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  assetId: 100, (Hyperliquid tokenIDs)
  amount: 1000n * 10n ** 6n,
});

Receiver Sync

const stop = sdk.startReceiverSync(noteStore, clients);
stop();

Architecture

┌────────────────────────────┐
│        Client App          │
│   (Web / Node / Mobile)    │
└────────────┬───────────────┘
             │
             ▼
     ┌────────────────────┐
     │       N3 SDK       │
     │────────────────────│
     │ Info (GraphQL)     │ → Historical data
     │ Subscriptions (WS) │ → Live streams
     │ Exchange Actions   │ → Orders & Withdrawals
     │ Notes / Receiver   │ → Merkle tracking
     └────────────────────┘
             │
             ▼
     ┌────────────────────┐
     │  N3 Gateway + TEE  │
     └────────────────────┘


     The SDK exposes three namespaces:
	•	info → Historical GraphQL queries
	•	subscriptions → WebSocket data fan-outs
	•	exchange → Orders, cancels, deposits, withdrawals

Tooling

Tool
Purpose
TypeScript
Full static typing
Tsup
High-speed bundler (ESM output)
Viem
Blockchain client abstraction
GraphQL
Data layer
WebSocket
Real-time transport
Bun
Dev runtime & test harness


License
Distributed under the MIT License. See LICENSE.txt for details.


Contact

N3 Labs
Website: https://n3.exchange
Docs: https://docs.n3.exchange
Twitter: @n3labs
Email: [email protected]
Project Link: https://github.com/n3labs/n3-sdk