Neurai Libraries
Everything Neurai publishes for developers is open source under the NeuraiProject organization on GitHub. The JavaScript packages live on npm under the @neuraiproject scope and are written so that keys never leave the caller: they build, sign and decrypt locally and let you choose the transport to a node.
This page lists every library, what it does and how they fit together. Versions are the ones published on npm as of September 2026.
How the JavaScript SDK fits together
Each package does one job. A wallet or dApp usually installs neurai-jswallet, which wires the rest and re-exports the primitives. A backend or a script that only needs one capability installs that package alone.
JavaScript packages
Foundations
| Package | Version | What it does |
|---|---|---|
neurai-key | 4.0.0 | Addresses from a BIP39 mnemonic with BIP32 and BIP44 derivation. Mainnet, testnet and regtest. Native post-quantum HD tree and xpqp / tpqp extended keys since 4.0 |
neurai-create-transaction | 0.8.0 | Builds unsigned raw transactions locally: XNA payments, asset transfers, transferwithmessage, asset and null-asset scripts. Handles the rvn and xna asset markers of NIP-040. Does not select UTXOs, estimate fees or sign |
neurai-message | 0.10.0 | Sign and verify messages, compatible with the node's signmessage and verifymessage. Legacy compact signatures and the PQ ML-DSA-44 format for AuthScript addresses |
neurai-rpc | 0.6.0 | Typed JSON-RPC client for a node or proxy, with the full method list including the DePIN protocol 2 RPCs. JSON-RPC errors are rejected, never swallowed |
neurai-reader | 0.1.0 | Read-only, key-less access to the chain: balances, assets, transactions, mempool. Points at the public RPC services by default and never builds or signs anything |
Operations
| Package | Version | What it does |
|---|---|---|
neurai-scripts | 0.8.1 | Opcode constants, ScriptBuilder and byte helpers. Standard scripts (P2PKH, P2WPKH, P2WSH, AuthScript, multisig, OP_RETURN) and composable covenants such as partial-fill sell orders |
neurai-sign-transaction | 2.4.1 | Signs a raw transaction in pure JavaScript: classic P2PKH inputs and AuthScript inputs with the three auth types, NoAuth, PQ and Legacy |
neurai-assets | 1.6.0 | Issue, reissue, transfer, tag, freeze and query every asset type including DePIN, non-custodially, with owner-token protection and correct unit handling |
neurai-depin-msg | 3.1.0 | DePIN messaging protocol 2 for browsers, Node.js and React Native: signed challenge requests, poolsig verification against a pinned pool key, ECIES encryption and decryption, and depinsubmitmsg envelopes. Pure JS crypto, no network code of its own |
neurai-history-list | 1.2.5 | Turns raw address deltas from a node into a human-readable list of incoming and outgoing transfers of XNA and assets |
Wallet shell
| Package | Version | What it does |
|---|---|---|
neurai-jswallet | 0.15.2 | Non-custodial wallet library that composes the packages above: key management, address scanning, UTXO discovery, asset operations and signing. Networks xna, xna-test, xna-legacy and xna-legacy-test. Ships CJS, ESM, browser ESM and IIFE bundles |
Hardware bridge
| Package | Version | What it does |
|---|---|---|
neurai-sign-esp32 | 0.6.0 | Full PSBT workflow against an ESP32 hardware wallet over the Web Serial API: build, send for signing, finalize and extract the raw transaction. Supports PQ addresses and acts as the DePIN identity adapter for neurai-depin-msg. Experimental |
Dependencies between packages
Two chains meet only in neurai-jswallet. The DePIN chain, neurai-rpc and neurai-depin-msg, has no internal dependencies. The transaction chain runs from neurai-create-transaction through neurai-scripts and neurai-sign-transaction to neurai-assets. A change at the bottom, such as the NIP-040 asset marker, is published level by level upwards.
Device libraries
For ESP32 and other 32-bit microcontrollers, in C and C++.
| Library | Language | What it does |
|---|---|---|
uNeurai | C++ | Micro-Neurai: private and public keys, HD wallets, recovery phrases, PSBT, scripts and Neurai assets for Arduino, mbed and bare metal. Optional ML-DSA-44 and AuthScript support behind a build flag. Elliptic curve code from trezor-crypto |
NeuraiDepinMsg | C++ | Builds, encrypts, signs and serializes DePIN messages on the ESP32, compatible with Neurai Core |
mldsa-esp32 | C | ML-DSA (FIPS 204) post-quantum signatures on ESP32 at the three NIST levels, with hardware RNG, constant-time operations and key storage in NVS flash |
NeuraiHW | C++ | Hardware wallet firmware for ESP32, the device side of neurai-sign-esp32 |
poseidon-c | C++ | Poseidon hash, the SNARK-friendly function behind OP_POSEIDON |
The IoT development page shows uNeurai and DePIN messaging running on a board.
Services and tools
Applications built on the libraries that you can run yourself.
| Project | Stack | What it does |
|---|---|---|
neurai-rpc-proxy | Node.js | Safe web API in front of a node: whitelists RPC methods, applies per-IP limits and serves the DePIN protocol 2 endpoints. Runs the public rpc-main.neurai.org and rpc-testnet.neurai.org |
neurai-wallet-services | Node.js | WebSocket backend for mobile and light wallets: push notifications, ZMQ subscription to the node, sync gating and the DePIN RPCs over one socket |
neurai-explorer | Rust, Next.js | The block explorer at explorer.neurai.org. See Explorer |
neurai-monitor | JavaScript | Self-hosted availability and SSL monitoring for network services. See Monitor |
neurai-lock | TypeScript | Gate a web app with the blockchain: users sign in by proving ownership of a Neurai address. A WordPress plugin is available |
neurai-depin-terminal | JavaScript | Full-screen terminal client for DePIN messaging |
neurai-ai-chat | TypeScript | Chat interface for the AI responder over DePIN messages |
neurai-addon-sign | JavaScript | The Neurai Sign browser extension for Chrome and Firefox |
walletconnect | TypeScript | WalletConnect integration, specification and dApp demo |
esp32-tool-flasher | Astro | Browser-based flasher for the ESP32 firmware images |
electrum-neurai | Python | Electrum wallet with asset support, with electrumx-neurai as its server |
Which library do I need?
| I want to | Use |
|---|---|
| Show balances, assets or transactions without handling keys | neurai-reader |
| Build a wallet or dApp in the browser or React Native | neurai-jswallet |
| Derive addresses from a seed phrase | neurai-key |
| Sign a login message or verify one | neurai-message |
| Issue or transfer assets from a backend | neurai-assets with neurai-rpc |
| Build and sign a raw transaction by hand | neurai-create-transaction and neurai-sign-transaction |
| Write a covenant or a custom script | neurai-scripts |
| Send and receive DePIN messages | neurai-depin-msg, plus neurai-sign-esp32 if the key lives on a device |
| Put Neurai on a microcontroller | uNeurai, NeuraiDepinMsg, mldsa-esp32 |
| Expose a node to the web safely | neurai-rpc-proxy |
Quick examples
Read an asset without any key:
import Reader from "@neuraiproject/neurai-reader";
const asset = await Reader.getAsset("BUTTER");
console.table(asset);
Call your own node:
import { getRPC, methods } from "@neuraiproject/neurai-rpc";
const rpc = getRPC("username", "password", "http://127.0.0.1:19001");
const height = await rpc(methods.getblockcount, []);
console.log(height);
Install the wallet shell:
npm install @neuraiproject/neurai-jswallet
Each repository's README documents its API in full. The Developer section has end-to-end examples for assets, DePIN messaging, IoT and AI.