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

nano-ipc

v2.0.0

Published

Library for interacting with the Nano node IPC

Downloads

29

Readme

nano-ipc-js

A Javascript library for interacting with the experimental Nano currency node IPC.

The IPC client is responsible only for low-level communication and does not do any extra processing on the node response beyond JSON parsing. It has a request queue built in so that you can create multiple requests simultaneously without having to wait for previous ones to finish in your application code.

This code is experimental and not production tested. Use at your own risk.

Example

const { Client } = require('nano-ipc')

// Create a new Client with the default IPC path
const client = new Client()

// Connect to the IPC. This returns a Promise. If you don't wait for the connection
// to be established, you're gonna get an exception when attempting to call the IPC.
await client.connect()

// Send a request to the Nano node. This works exactly like the old RPC API. Returns a
// Promise that resolves with the Node response. This library does no processing on the
// response data.
const resp = await client.call({ action: 'block_count' })
console.log(resp.count, resp.unchecked)

// If we don't disconnect when we're done interacting with the node IPC, your program will
// hang as there is still an active connection open.
client.disconnect()

API

Client

constructor([path], [options]) => Client

Creates a new IPC client.

  • path: Path to the IPC socket on the local filesystem. Defaults to /tmp/nano.
  • options
    • autoConnect: Will automatically connect to the IPC server when attemtping a call, if disconnected. This also allows you to automatically reconnect if the server ever disconnects. Default: true.

connect() => Promise

Connects to the node IPC. This is required before making any IPC calls, and you must wait for the connection to be completed. The returned Promise will resolve when connected.

call(request) => Promise

Sends a request to the Nano node.

  • request: The request to send to the node, which should be an object as the client will handle JSON encoding for you.

Returns a Promise, which will receive the node response as a JSON decoded object when the request is completed.

disconnect() => Promise

Disconnects from the IPC connection. Returns a Promise that resolves when the connection is closed.

The IPC connection is persistent in order to make requests as fast as possible, so you must manually disconnect from the IPC when your program shuts down otherwise it will hang.