Skip to main content

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​

Applicationswhat you build or useweb walletNeuraiWalletNeurai Signyour dAppWallet shellwires everything togetherneurai-jswalletOperationsassets, signing, scripts, messagingneurai-assetsneurai-sign-transactionneurai-scriptsneurai-depin-msghistory-listFoundationskeys, transactions, node accessneurai-keyneurai-create-transactionneurai-messageneurai-rpcneurai-readerNodeJSON-RPC, behind neurai-rpc-proxyneuraid

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​

PackageVersionWhat it does
neurai-key4.0.0Addresses 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-transaction0.8.0Builds 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-message0.10.0Sign 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-rpc0.6.0Typed 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-reader0.1.0Read-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​

PackageVersionWhat it does
neurai-scripts0.8.1Opcode 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-transaction2.4.1Signs a raw transaction in pure JavaScript: classic P2PKH inputs and AuthScript inputs with the three auth types, NoAuth, PQ and Legacy
neurai-assets1.6.0Issue, reissue, transfer, tag, freeze and query every asset type including DePIN, non-custodially, with owner-token protection and correct unit handling
neurai-depin-msg3.1.0DePIN 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-list1.2.5Turns raw address deltas from a node into a human-readable list of incoming and outgoing transfers of XNA and assets

Wallet shell​

PackageVersionWhat it does
neurai-jswallet0.15.2Non-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​

PackageVersionWhat it does
neurai-sign-esp320.6.0Full 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​

level 0level 1level 2level 3level 4level 5neurai-keyneurai-rpcneurai-depin-msgneurai-messagehistory-listsign-esp32neurai-create-transactionneurai-readerneurai-scriptsneurai-sign-transactionneurai-assetsrpc as peer dependencyneurai-jswalletalso depends on key, rpc, create-transaction, scripts and sign-transactionstandalone: rpc, depin-msg, message, history-list, sign-esp32reader depends on rpc onlyNIP-040 chain: create-transaction → scripts → sign-transaction → assets → jswallet

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++.

LibraryLanguageWhat it does
uNeuraiC++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
NeuraiDepinMsgC++Builds, encrypts, signs and serializes DePIN messages on the ESP32, compatible with Neurai Core
mldsa-esp32CML-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
NeuraiHWC++Hardware wallet firmware for ESP32, the device side of neurai-sign-esp32
poseidon-cC++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.

ProjectStackWhat it does
neurai-rpc-proxyNode.jsSafe 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-servicesNode.jsWebSocket backend for mobile and light wallets: push notifications, ZMQ subscription to the node, sync gating and the DePIN RPCs over one socket
neurai-explorerRust, Next.jsThe block explorer at explorer.neurai.org. See Explorer
neurai-monitorJavaScriptSelf-hosted availability and SSL monitoring for network services. See Monitor
neurai-lockTypeScriptGate a web app with the blockchain: users sign in by proving ownership of a Neurai address. A WordPress plugin is available
neurai-depin-terminalJavaScriptFull-screen terminal client for DePIN messaging
neurai-ai-chatTypeScriptChat interface for the AI responder over DePIN messages
neurai-addon-signJavaScriptThe Neurai Sign browser extension for Chrome and Firefox
walletconnectTypeScriptWalletConnect integration, specification and dApp demo
esp32-tool-flasherAstroBrowser-based flasher for the ESP32 firmware images
electrum-neuraiPythonElectrum wallet with asset support, with electrumx-neurai as its server

Which library do I need?​

I want toUse
Show balances, assets or transactions without handling keysneurai-reader
Build a wallet or dApp in the browser or React Nativeneurai-jswallet
Derive addresses from a seed phraseneurai-key
Sign a login message or verify oneneurai-message
Issue or transfer assets from a backendneurai-assets with neurai-rpc
Build and sign a raw transaction by handneurai-create-transaction and neurai-sign-transaction
Write a covenant or a custom scriptneurai-scripts
Send and receive DePIN messagesneurai-depin-msg, plus neurai-sign-esp32 if the key lives on a device
Put Neurai on a microcontrolleruNeurai, NeuraiDepinMsg, mldsa-esp32
Expose a node to the web safelyneurai-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.