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

@neuraiproject/neurai-depin-terminal

v2.0.2

Published

Neurai DePIN terminal messaging client

Downloads

11

Readme

Neurai DePIN Terminal

Terminal client for Neurai DePIN messaging with full-screen interface.

Features

  • ✅ Full-screen terminal interface with charsm
  • ✅ Simple configuration via config.json
  • Encrypted private key storage with AES-256-GCM encryption
  • ✅ Automatic broadcast to all token holders
  • ✅ Full support for server privacy layer (depinpoolpkey)
  • ✅ Automatic polling every 10 seconds (configurable)
  • ✅ Proper message deduplication
  • ✅ Robust error handling and reconnection

Requirements

  • Node.js v22 or higher
  • A DePIN token on the Neurai network
  • WIF private key of an address that owns the token
  • Access to a Neurai DePIN RPC server

Installation

Install from npm

npm install -g @neuraiproject/neurai-depin-terminal

Then run:

neurai-depin-terminal
cd docs/neurai-depin-client
npm install

Configuration

When you run the application for the first time, an interactive wizard will start and create the config.json file:

npm start

The wizard will ask you for:

  1. RPC Server: DePIN RPC server URL (required)
  2. RPC Username: RPC username (optional, leave empty if not required)
  3. RPC Password: RPC password (optional, leave empty if not required)
  4. DePIN Token: Asset name (any valid Neurai asset)
  5. Private Key: Your private key in WIF format
  6. Polling Interval: Interval in milliseconds to check for new messages (default: 10000)
  7. Timezone: Timezone offset or "UTC" for message timestamps (default: UTC)
  8. Encryption Password: Password to encrypt your private key (4-30 characters, required)

Important: Your private key will be encrypted with AES-256-GCM using the password you provide. You will need to enter this password every time you start the application. The decrypted key is kept in memory only and never saved unencrypted.

Example config.json

{
  "rpc_url": "https://rpc-depin.neurai.org",
  "rpc_username": "",
  "rpc_password": "",
  "token": "MYTOKEN",
  "privateKey": "a1b2c3...encrypted_data...xyz789",
  "network": "xna",
  "pollInterval": 10000
}

Note: The privateKey field contains the encrypted private key in the format salt:iv:authTag:encrypted (all in hex, colon-separated). This is automatically created by the wizard when you provide your encryption password.

Note: The /rpc path is automatically appended by the application, so just provide the base URL (e.g., https://rpc-depin.neurai.org or https://rpc-depin.neurai.org:19001).

Usage

Once configured, simply run:

npm start

Building Binaries

You can create standalone executables for Linux, macOS, and Windows:

npm run build

The binaries will be generated in the bin/ directory. This allows you to run the application without having Node.js installed on the target machine.

Note: The build process uses esbuild to bundle the source code and pkg to create the executables.

Password Prompt: On startup, you will be prompted to enter your encryption password to decrypt the private key. You have 3 attempts. If all attempts fail, the application will exit.

Interface

The application will display a full-screen interface with:

┌────────────────────────────────────────────────────────────┐
│ Neurai DePIN | RPC: localhost:19001 | ● Connected          │
│ Token: MYTOKEN | NXXXabc...xyz | Last check: 10:23:45       │
├────────────────────────────────────────────────────────────┤
│                                                            │
│ [10:20:15] NXXXdef...123: Hello world                      │
│ [10:21:32] NXXXghi...456: Testing DePIN messaging          │
│ [10:22:18] YOU: This is my message                         │
│                                                            │
│                                                            │
├────────────────────────────────────────────────────────────┤
│ > Type message... (Enter: Send | Esc: Quit)                │
└────────────────────────────────────────────────────────────┘

Components:

  • Top bar: Shows RPC connection status, configured token, address and last check time
  • Message area: Shows received and sent messages (scrollable with arrow keys)
  • Input area: Type your message here

Keyboard Shortcuts

  • Enter or Ctrl+S: Send message
  • Escape or Ctrl+C: Exit application
  • Up/Down arrows: Scroll in message area
  • Ctrl+Left / Ctrl+Right: Switch tabs
  • Ctrl+W: Close active private tab

Private Messages

Send a private message by starting the line with @ and the destination address:

@NxxxRecipientAddress Hello, this is a private message.

Messages without the @address prefix are sent as group/broadcast messages. Typing @ at the start opens a recipient list you can navigate with arrow keys and select with Enter (Esc to close). The recipient list is cached and refreshed every 60 seconds to keep selection fast. Private conversations appear as tabs named after the sender (e.g. abc...xyz). New private messages are marked with an asterisk. The Group tab always shows only group messages. Sending a private message opens its tab automatically.

How It Works

  1. Startup: Application loads configuration and connects to RPC server
  2. Polling: Every 10 seconds (configurable) checks for new messages in the DePIN pool
  3. Reception: Messages are automatically decrypted and displayed on screen
  4. Sending: Messages without a prefix are sent to all token holders with a revealed pubkey (broadcast). To send a private message, use @address message.
  5. Recipients: Eligible recipients are fetched via listdepinaddresses and cached locally (refreshed every 60 seconds)
  6. Privacy: If the server has a privacy layer configured (depinpoolpkey), messages are additionally encrypted

Architecture

src/
├── index.js                    # Main entry point
├── config/
│   └── ConfigManager.js        # Configuration management + wizard
├── wallet/
│   └── WalletManager.js        # WIF derivation + RPC client
├── messaging/
│   ├── MessageStore.js         # Message deduplication
│   ├── MessagePoller.js        # Automatic polling
│   └── MessageSender.js        # Broadcast sending
├── ui/
│   └── CharsmUI.js             # Charsm interface
└── lib/
    └── depinMsgLoader.js       # IIFE bundle loader

Troubleshooting

Error: "neurai-depin-msg bundle not found"

Run npm install to install dependencies.

Error: "Error connecting to RPC"

Verify that:

  • The RPC server is accessible
  • The URL in config.json is correct
  • Credentials (username/password) are correct if the server requires them

I'm not receiving messages

Verify that:

  • Your address owns the configured DePIN token
  • Other token holders exist with revealed public keys
  • The RPC server supports DePIN methods (depinreceivemsg, depinsubmitmsg)
  • The RPC server supports listdepinaddresses for recipient discovery

Error: "No recipients found with revealed public key"

For others to receive your messages, they must have revealed their public key. This is done through a special transaction to the burn address or via the corresponding RPC command.

Security

  • Private key storage: Your WIF private key is encrypted with AES-256-GCM using a password-derived key (scrypt with 32-byte salt). The encrypted private key is stored in config.json in the format salt:iv:authTag:encrypted. The decrypted key is only kept in memory during runtime and is never saved unencrypted to disk.
  • Password requirements: Encryption password must be between 4 and 30 characters. You have 3 attempts to enter the correct password on startup.
  • Private key usage: Your private key is never sent to the server. It's only used locally to sign and decrypt messages.
  • Message encryption: Messages are encrypted with ECIES (Elliptic Curve Integrated Encryption Scheme) before being sent.
  • Privacy layer: If enabled, adds an additional encryption layer using the server pool's public key.

License

MIT