POSITRONIC: Next Upgrade
POSITRONIC is the next major upgrade to the Neurai network, built to expand what Neurai can express on-chain and what developers and users can do with it in practice.
What is POSITRONIC?
POSITRONIC is a protocol upgrade inspired by the idea of the positronic brain in Isaac Asimov's books. We chose the name because those fictional systems represent a leap in intelligence, capability, adaptability, and sophistication. That same inspiration defines this upgrade: POSITRONIC is intended to give Neurai a much more powerful technical foundation, with deeper scripting, stronger post-quantum readiness, richer DePIN primitives, and a broader surface for advanced asset and application design.
Rather than being a single isolated feature, POSITRONIC is a stacked upgrade that touches scripting, assets, transaction format, wallet behavior, DePIN communication, block timing, and the desktop toolchain.
Note: the current summary below is based on the code difference available in the local
Neurairepository between tag1.0.5and branchDePIN-Test. This clone does not currently include a localmainbranch, so1.0.5..DePIN-Testis the closest visible baseline for the latest mainline code in this environment.
At a Glance
| Area | What POSITRONIC adds |
|---|---|
| Covenants & Opcodes | A large new opcode set: introspection (OP_TXHASH, OP_TXFIELD), covenants (OP_CHECKTEMPLATEVERIFY, OP_CHECKSIGFROMSTACK), reference inputs and 64-bit arithmetic. |
| AuthScript & PQ | PQ wallet and RPC, native PQ-HD derivation, Bech32m witness v1 destinations, and a new AuthScript execution model backing PQ-protected addresses and covenants. |
| Transaction v3 | A new vrefin reference-input section so scripts can read external UTXOs without spending them. Foundation for oracles and richer DePIN state. |
| DePIN Messaging | A full DePIN message pool with ECIES hybrid encryption (AES-256-GCM + Secp256k1 envelopes), private and group messages, persistence, and a per-recipient key model. |
| MCP for LLMs | A built-in MCP layer that wires any OpenAI-compatible local or remote LLM to the Neurai node over encrypted DePIN messages, with no third party in between. |
| 30-second blocks | NIP-028 halves the block target (60s → 30s) for faster confirmations, with the subsidy halving interval doubled to preserve emission. |
| DePIN Assets | A new soulbound asset type (&-prefixed) for identity, devices and memberships, doubling as the access key for DePIN chat and MCP channels. |
| Toolchain | C++17 → C++20, Qt5 → Qt6 (6.8.3 LTS), native Qt build support and Wayland integration. |
Key Features
Positronic Naming Rationale
The name is not decorative. In the same way Asimov used positronic brains to describe systems with radically expanded capabilities, POSITRONIC represents a major expansion of Neurai's expressive power. The upgrade brings together multiple independent improvements that, combined, make the network feel substantially more capable than a routine version increment.
Major Covenant and Opcode Expansion
POSITRONIC adds a much larger scripting toolbox for advanced covenant-style behavior and transaction introspection. The code in DePIN-Test introduces or re-enables the following opcodes:
| Opcode | Hex | Category | Description |
|---|---|---|---|
OP_CHECKTEMPLATEVERIFY | 0xb3 | Covenant | Commits to a template of the spending transaction for covenant-style constraints. |
OP_CHECKSIGFROMSTACK | 0xb4 | Covenant | Verifies a signature against an arbitrary message popped from the stack. |
OP_TXHASH | 0xb5 | Introspection | Pushes a configurable hash over selected transaction fields. |
OP_TXFIELD | 0xb6 | Introspection | Pushes a specific field of the spending transaction onto the stack. |
OP_SPLIT | 0xb7 | Bytes | Splits a byte string into two parts at a given position. |
OP_REVERSEBYTES | 0xbc | Bytes | Reverses the byte order of the top stack item. |
OP_CAT | 0x7e | Bytes | Concatenates the two top byte strings. |
OP_TXLOCKTIME | 0xc5 | Introspection | Pushes the nLockTime of the spending transaction. |
OP_OUTPUTVALUE | 0xcc | Introspection | Pushes the value of a given output of the spending transaction. |
OP_OUTPUTSCRIPT | 0xcd | Introspection | Pushes the scriptPubKey of a given output. |
OP_OUTPUTASSETFIELD | 0xce | Asset | Pushes a field of an asset payload attached to an output. |
OP_INPUTASSETFIELD | 0xcf | Asset | Pushes a field of the asset payload of an input. |
OP_INPUTCOUNT | 0xd0 | Introspection | Pushes the number of inputs in the spending transaction. |
OP_OUTPUTCOUNT | 0xd1 | Introspection | Pushes the number of outputs in the spending transaction. |
OP_REFINPUTFIELD | 0xd2 | Reference | Pushes a field of a v3 reference input (vrefin) without spending it. |
OP_REFINPUTASSETFIELD | 0xd3 | Reference | Pushes an asset field of a v3 reference input. |
OP_REFINPUTCOUNT | 0xd4 | Reference | Pushes the number of reference inputs in the transaction. |
OP_OUTPUTAUTHCOMMITMENT | 0xd5 | Asset | NIP-023: exposes the AuthScript commitment attached to an output. |
OP_INPUTVALUE | 0xd6 | Introspection | NIP-024: pushes the value of a given input. |
OP_CHAINCONTEXT | 0xd7 | Context | NIP-026: exposes blockchain-level context (height, time, etc.) to scripts. |
In addition, 64-bit signed arithmetic is enabled for OP_MUL (multiplication), OP_DIV (division) and OP_MOD (modulo).
Together, these additions move Neurai much closer to a programmable covenant environment instead of a simple transaction-only asset chain.
AuthScript, PQ Addresses, and Post-Quantum Readiness
POSITRONIC also introduces a much deeper post-quantum stack. POSITRONIC is not just bolting on "new addresses": it introduces AuthScript, a new execution model that becomes the foundation for advanced contracts, covenants and post-quantum protected destinations.
- PQ wallet & RPC — post-quantum keys integrated into the wallet, with a new RPC surface to derive, import and sign with PQ material.
- Native PQ-HD derivation — hierarchical deterministic derivation for post-quantum keys, so PQ accounts get the same backup ergonomics as classical ones.
- Bech32m witness v1 destinations — a new address format for AuthScript and PQ outputs, cleanly separated from legacy script types.
- AuthScript execution model — the foundation for advanced contracts, covenant logic, and post-quantum protected destinations.
Mempool policy, witness relay and RBF rules are adjusted for the larger PQ-related script elements, and wallet persistence is expanded to track AuthScript spend data correctly.
Transaction v3 and Reference Inputs
Another major change is transaction version 3 with a brand new vrefin section: reference inputs, UTXOs that scripts can read without spending them. This unlocks oracles, external state reads, advanced DePIN state models and more expressive contracts, and is what makes several of the new introspection opcodes materially useful in real scenarios.
vrefin— reference inputs: UTXOs that scripts can inspect but do not spend.- Introspection ready —
OP_REFINPUTFIELD,OP_REFINPUTASSETFIELDandOP_REFINPUTCOUNToperate overvrefin. - Oracle-friendly — external UTXOs become a portable source of state for contracts and DePIN flows.
tx v3 {
vin [ ... ] // spent inputs (classical)
vrefin [ ... ] // reference inputs (read-only, new)
vout [ ... ] // outputs
// Scripts in vin can call:
// OP_REFINPUTCOUNT
// OP_REFINPUTFIELD <index> <field>
// OP_REFINPUTASSETFIELD <index> <field>
// ... without spending the referenced UTXO.
}
30-Second Blocks (NIP-028)
POSITRONIC halves the block target from 60 seconds to 30 seconds. Cutting first-confirmation latency in half makes payments feel near-instant, asset issuance and DePIN messages settle faster, miner feedback loops tighten, and contract / oracle responses arrive quicker.
To keep monetary policy intact, the subsidy halving interval is doubled (14400 → 28800 blocks) so emission and the ~10-day micro-halving cadence are preserved across the change.
DePIN Messaging and Private Communication for Token Holders
The DePIN-Test branch adds a much more complete DePIN communication layer: a DePIN message pool with persistence, signing, and MCP client/worker components, plus RPC methods for DePIN messaging flows.
At the user level, this enables encrypted communication models tied to DePIN tokens, including private and group messaging for token holders, with tooling intended for non-custodial clients such as web wallets or AI-integrated applications.
Under the hood, the message pool relies on ECIES hybrid encryption: a single AES-256-GCM payload is shared by all recipients, while each token holder receives an individually encrypted AES key tied to the hash of their address. Messages are signed by the sender, support two types — private (0x01) and group (0x02) — and use a default expiry of 7 days (max 30).
| Value | Meaning |
|---|---|
19002 | Default DePIN pool port |
AES-256-GCM | Payload encryption |
Secp256k1 | Per-recipient envelopes |
7 days | Default message expiry (max 30) |
MCP: Connecting LLMs to the Neurai Node via DePIN
One of the most distinctive additions in DePIN-Test is a built-in MCP layer (LLM-to-node bridge) that lets a local or remote large language model interact with the Neurai network through encrypted DePIN messages. This turns any node into a non-custodial, on-chain reachable AI assistant for token holders, with no centralized API in between.
Architecture. The MCP integration is built on top of three internal components inside the node:
- A message layer (
depinmsgpool/depinmsgpoolnet) that handles the encrypted DePIN message pool and remote pool queries. - An MCP client (
depinmcpclient) that talks to any OpenAI-compatible HTTP endpoint, so you can plug in LM Studio, Ollama, llama.cpp servers, or any compatible local/remote LLM runtime. - An MCP worker (
depinmcpworker) — a background thread that polls the DePIN pool on a configurable interval, decrypts messages addressed to the node's pool key, filters them by token and command prefix (for example/ai), forwards the prompt to the LLM, encrypts the response for all token holders, and publishes it back to the pool.
Flow. Token holders send an encrypted DePIN message containing a command (e.g. /ai <prompt>). The worker decrypts it with the node's BIP44-derived pool key (m/44'/0'/200'/change/0), rate-limits per sender, calls the configured LLM endpoint with the prompt, prefixes the answer (e.g. [BOT]: ...), signs and encrypts the reply for the token's holders, and pushes it back as a group message. The conversation never leaves the encrypted DePIN channel.
Capabilities for LLM integration. This design enables several practical scenarios:
- Decentralized AI assistants whose entry point is a DePIN token rather than a web API.
- Private, end-to-end encrypted prompts and answers between holders of the same DePIN asset.
- Bot-style services (translation, summarization, on-chain Q&A) that can run on commodity hardware, including memory-limited devices such as ESP32-class boards acting as clients.
- Group AI channels where every holder of a given DePIN asset can read the model's responses, but outsiders cannot.
RPC surface. The node exposes dedicated RPC methods to operate this layer:
| RPC method | Purpose |
|---|---|
depingetmsginfo | Inspect a single DePIN message in the local pool. |
depinsendmsg | Send an encrypted message to a DePIN token audience. |
depinsubmitmsg | Submit a pre-built encrypted message into the pool. |
depinreceivemsg | Pull encrypted messages targeted at this node. |
depingetmsg | Fetch and decrypt a specific message by id. |
depinpoolstats | Statistics about the local DePIN message pool. |
depinmcpstatus | MCP worker status: processed commands, active model, uptime. |
depinpoolpkey | Returns the node's DePIN pool public key for outbound encryption. |
Configuration. The MCP bridge is opt-in and is enabled at node startup:
| Flag | Purpose |
|---|---|
-depinmcp=1 | Enable the MCP worker. |
-depinmcpurl / -depinmcpendpoint | OpenAI-compatible LLM server URL and endpoint path. |
-depinmcpapikey | Optional API key for the LLM server. |
-depinmcpkey | Command prefix the worker listens for (default /ai). |
-depinmcpaddress | Signing address used by the bot replies. |
-depinmcpinterval | Polling cadence over the DePIN pool. |
-depinmcpprefix | Label prefixed to every reply (default [BOT]). |
-depinmcptimeout | Timeout for the LLM HTTP call. |
-depinmcpratelimit | Per-sender rate limit. |
-depinmcppoolhost / -depinmcppoolport | Pool location to read/write messages from. |
The node must also be started with -assetindex and -pubkeyindex so encryption can resolve token holders.
In short, POSITRONIC ships the plumbing for a Neurai node to act as an autonomous, encrypted gateway between DePIN token communities and any LLM the operator chooses to run, without relying on third-party AI APIs.
New DePIN Asset Type
POSITRONIC introduces a dedicated DePIN asset class designed for device identity, memberships and bound credentials. It is soulbound by default, gated by the creator, and double-purposed as the access key for DePIN chat and MCP-agent channels.
- Naming and structure — asset names are prefixed with
&(e.g.&DEVICE). Sub-DePIN names use/, like&DEVICE/ROUTER001, for fleet hierarchies and per-unit serial numbering.units = 0: there is no fractional supply. Burn cost mirrors the unique-asset issuance fee (10 XNA). - Soulbound transfers — every transfer is co-signed by the creator. The wallet auto-attaches the asset's owner-token to the transaction, so a holder cannot move the asset alone. If the owner-token is missing the node returns
bad-txns-... doesn't have owner token for DEPIN asset. - Owner revocation — the creator can freeze any holder's address with flag
R, immediately invalidating the holder's DePIN asset (validated byVerifyDEPINOwnerChange). The owner-token's own address is exempt and can never be frozen. - Holder self-revocation — holders can mark their own asset as invalid using flag
S(VerifySelfRestrictionChange). Once self-revoked the asset stops being valid for that address; only the creator can re-activate it viafreeze/unfreezewithflag = 0. - Reissue and sub-issuance — reissue requires the owner-token to be present at the creator's address. Sub-DePIN assets can be issued under a parent for fleet-style structures without polluting the root namespace.
- Identity for DePIN messaging — a DePIN asset is the access key to its encrypted chat: only token holders can read or write the asset's DePIN channel. The same token gates the node-side MCP worker.
Typical uses:
- Device identity for IoT and DePIN hardware (one asset per unit, owner-gated).
- Memberships and access passes that the issuer can revoke without burning supply.
- Per-cohort encrypted chat (private and group) keyed by the holder set.
- Gating MCP agent calls so only token holders can talk to the bot.
- Soulbound credentials: badges, certifications, reputation tags.
- Fleet hierarchies via sub-DePIN names like
&FLEET/UNIT001.
The branch currently enables DePIN assets on testnet and regtest.
Compiler, Build System, and Neurai-QT Modernization
POSITRONIC is also a platform refresh: the language standard, Qt framework, build system and dependency graph all move forward so Neurai and Neurai-QT can keep evolving cleanly.
| Area | From | To |
|---|---|---|
| Language standard | C++17 | C++20 |
| Desktop framework | Qt5 | Qt 6.8.3 LTS |
| Build system | Legacy | Native Qt build |
| Linux integration | — | Wayland |
In practice, POSITRONIC is not only about protocol features. It also updates the engineering base needed to keep Neurai and Neurai-QT moving forward.
More Than a Single Feature Set
The code comparison also shows supporting changes that reinforce the upgrade as a whole: mempool policy changes, witness relay adjustments for larger PQ-related script elements, RBF restrictions for asset-wrapped AuthScript spends, expanded wallet persistence for AuthScript spend data, and a large new test surface covering the added functionality.
Wallets
POSITRONIC is being integrated across the Neurai wallet family:
NeuraiWallet
Mobile · React Native (iOS / Android) · in progress
- Mobile non-custodial wallet (BlueWallet fork).
- ML-DSA-44 AuthScript via
NeuraiPQWallet. - Bech32m witness v1 PQ addresses (
nq1.../tnq1...). - Native PQ-HD derivation
m_pq/100'/1900'/0'/0'/index'. - PQ keys are not WIF-compatible, so external sweep is disallowed.
- Source: github.com/NeuraiProject/NeuraiWallet
Neurai Web Wallet
Browser · branch DePIN-test · in progress
- Runs entirely in the browser, so keys never leave the device.
- Built-in DePIN chat: private, group and bot channels.
- Powered by
@neuraiproject/neurai-depin-msg. - Networks:
xna,xna-test,xna-legacy,xna-legacy-test. - PQ networks recognised; not yet wired into DePIN chat.
- Open testnet · Source
Neurai Sign Extension
Browser extension · Chrome & Firefox (MV3) · ready
- Manifest V3 extension for Chrome and Firefox.
- Multi-account keys with PIN protection and auto-lock.
- Message signing via approval popup, with request history.
- DApp provider:
window.neuraiWallet(isInstalled,getAddress(),signMessage()). - Balance and asset view with auto-refresh.
- Client-side only, with RPC signing paths forbidden by a build check.
- Chrome Web Store · Firefox Add-ons · Source
Libraries
A modular JavaScript / TypeScript SDK (plus supporting services) backs the upgrade:
| Package | Language / Version | What it does |
|---|---|---|
@neuraiproject/neurai-jswallet | JS/TS · v0.14.3 | Non-custodial wallet shell wiring the whole Neurai JS SDK: key management, address scanning, UTXO discovery and signing. Ships CJS, ESM, browser ESM and IIFE bundles. |
@neuraiproject/neurai-sign-transaction | JS/TS · v2.1.0 | Pure-JS signer for XNA, asset and AuthScript inputs. Auth types: NoAuth (0x00), PQ (0x01), Legacy (0x02). Accepts PQ keys as seed, ML-DSA-44 secret or keydata blob. |
@neuraiproject/neurai-scripts | JS/TS · v0.5.0 | Opcode constants, ScriptBuilder and byte/hex helpers. Standard scripts (P2PKH, P2WPKH, P2WSH, AuthScript, multisig, OP_RETURN) and partial-fill sell-order covenants. |
@neuraiproject/neurai-assets | JS/TS · v1.2.5 | All asset types (ROOT, SUB, UNIQUE, QUALIFIER, RESTRICTED, DEPIN): issue, reissue, tag, freeze + asset RPC query wrappers, with owner-token protection. |
@neuraiproject/neurai-create-transaction | JS/TS · v0.3.1 | Low-level unsigned raw transaction builder. Encodes XNA payments, asset transfers, transferwithmessage and asset/null-asset scripts. |
@neuraiproject/neurai-depin-msg | JS · v2.1.3 | Builds, encrypts, signs and serializes DePIN messages client-side, returning the hex payload ready for depinsubmitmsg. Exposes window.neuraiDepinMsg. |
neurai-wallet-services | Node.js · v1.0.0 | Backend WebSocket service for mobile and light wallets: persistent WSS at /push, ZMQ subscriber to the node, sync gating, rate limiting, and the DePIN messaging RPCs over the same socket. |
mldsa-esp32 | C++ · Arduino / PlatformIO | ML-DSA (FIPS 204) for ESP32 microcontrollers. All three NIST levels (44/65/87), hardware RNG, constant-time operations and persistent key storage in flash (NVS). |
Path to Mainnet
Where POSITRONIC stands today, grouped by phase. Tooling and libraries are wired up; the network is now exercising the changes on testnet before audit and activation.
| Phase | Status | Scope |
|---|---|---|
| Design | ✅ Done | Specs, NIPs, opcode catalogue — protocol shape locked in. |
| Development | ✅ Done | Node core, script engine, addresses — reference implementations built. |
| Integration | ✅ Done | Wallets, libraries, MCP bridge — tooling surfaces wired up. |
| Testnet | 🔄 In progress | Public testnet, regtest, DePIN pool — live network exercise underway. |
| Audit | ⏳ Queued | Security review and bug bounty — external pass before activation. |
| Mainnet | 🗓️ TBA | Coordinated activation — timeline to be announced. |
Upgrade Timeline
Details about the POSITRONIC upgrade timeline will be announced on official Neurai channels. Stay tuned for updates.
Stay Updated
- Follow the Neurai community for the latest announcements.
- Join the discussion on official social channels.
- Monitor the Neurai GitHub for technical progress.