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

neptune-cash

v0.0.4

Published

Community-made library for the Neptune Cash and the Neptune Privacy cryptocurrencies

Readme

Neptune Cash JS

Neptune Cash JS is a community-made wrapper for neptune-core JSON RPC API requests. Currently, it supports first 20 implemented API methods in both Neptune Cash and Neptune Privacy. Licensed under Apache-2.0.

[!IMPORTANT] To see README.md or source code of your version please checkout to the right tag. The npm packages already contain the right data.

How to use it?

I assume, that you have already used libraries like ethers or viem and know how JSON-RPC works. Also, I hope you are a little bit familiar with neptune-core.

First of all, install the library using:

npm install neptune-cash

Next, create a client object:

import {NeptuneClient} from "neptune-cash"

const neptune = new NeptuneClient()

Note, that you aren't connect with the server immediately. The connection happens every time when you invoke methods.

The constructor takes two parameters:

  1. hostName - host name of the RPC server, default localhost
  2. port - port of the RPC server, default 9797 (notice that the default port for the XNT is 9897)

To create your own server check Configuring RPC server. If you don't like to, you can use mine - hostName: 217.160.149.196 with default port 🙂

Methods

The NeptuneClient class provides two kinds of async methods:

  1. with safe prefix - they return error (if occurred) as a field of an object:

    { success: true, data: T } | { success: false, error: JSONRPCErrorType | RequestErrorType }

    In this case I was inspired by zod. See src/types/internal.ts for more details.

  2. without safe prefix - these methods can throw instance of class extending Error if error occurred.

Error classes

The library provides following classes for error handling (no other errors can be thrown):

  1. RequestError - extends Error - responsible for network errors, e.g. invalid port or no internet connection.
  2. JSONRPCError - extends Error, responsible for errors from RPC responses. Also parent class for two following:
    • MethodNotFoundError - thrown when your server doesn't support a given method.
    • InvalidParamsError - thrown when params you provided to method are invalid. Types of method arguments aren't perfect so this error can occur often.

Configuring RPC server

Neptune Cash

  1. Download neptune-core 0.5.0 from here.

  2. Sync your node with the network:

    neptune-core --peer <address>

    To get currently working peers you can search the internet or ask someone on the Neptune Cash Telegram. You can use many --peer with other addresses.

  3. Run the server:

    neptune-core --listen-rpc --peer <address> --rpc-modules "chain,node,archival"

    This command will start the server with all modules (and methods) supported by the library.

Neptune Privacy (XNT)

  1. Download xnt-core 0.1.0 from here.

  2. Sync your node with the network:

    xnt-core --peer <address>

    To get currently working peers you can search the internet or ask someone on the Neptune Privacy Telegram. You can use many --peer with other addresses.

  3. Run the server:

    xnt-core --listen-rpc --peer <address> --rpc-modules "chain,node,archival"

    This command will start the server with all modules (and methods) supported by the library.

Using my RPC

  • Neptune Cash

    const neptune = new NeptuneClient("217.160.149.196", DEFAULT_NEPTUNE_CASH_PORT);
  • Neptune Privacy (XNT)

    const neptune = new NeptuneClient("217.160.149.196", DEFAULT_XNT_PORT);

Remember to provide the right imports!

Specification

  • neptune-core 0.5.0 modules: chain, node, archival
  • xnt-core 0.1.0 modules: chain, node, archival

Some of the newer features may not work.

Tech stack

The whole library is based on the ofetch. Also, I've used ts-node as a dev dependency.

Contact

If you have any questions/suggestions feel free to message me on Telegram, or Discord: @comradecobweb. You can also open an issue!

Useful resources

API Docs Kaffin's PR message.rs https.rs ops.rs XNT source code