Covenants & Opcodes
A large new opcode set: introspection (OP_TXHASH, OP_TXFIELD), covenants (OP_CHECKTEMPLATEVERIFY, OP_CHECKSIGFROMSTACK), reference inputs and 64-bit arithmetic.
Read moreInspired by Asimov's positronic brain, POSITRONIC is a stacked protocol upgrade that gives Neurai a deeper scripting toolbox, post-quantum readiness, richer DePIN primitives, and a native LLM bridge, turning the network into a substantially more expressive on-chain platform.
Positronic is not a single feature. It touches scripting, assets, transaction format, wallet behavior, DePIN communication and the desktop toolchain in one coordinated change.
A large new opcode set: introspection (OP_TXHASH, OP_TXFIELD), covenants (OP_CHECKTEMPLATEVERIFY, OP_CHECKSIGFROMSTACK), reference inputs and 64-bit arithmetic.
Read morePQ wallet and RPC, native PQ-HD derivation, Bech32m witness v1 destinations, and a new AuthScript execution model that backs PQ-protected addresses and covenants.
Read moreTransaction version 3 introduces vrefin reference inputs. Scripts can read external UTXOs without spending them. Foundation for oracles and richer DePIN state.
Read moreA full DePIN message pool with ECIES hybrid encryption (AES-256-GCM + Secp256k1 envelopes), private and group messages, persistence, and a per-recipient key model.
Read moreA built-in MCP layer wires any OpenAI-compatible local or remote LLM to the Neurai node. Token holders talk to a model through encrypted DePIN messages, with no third party in between.
Read moreC++17 → C++20, Qt5 → Qt6 (6.8.3 LTS), native Qt build support, Wayland integration, dependency and packaging refreshes across Neurai and Neurai-QT.
Read moreOn-chain AI agents whose entry point is a DePIN token, not a web API. Holders send an encrypted /ai prompt over the DePIN pool, the node's MCP worker calls the chosen LLM (LM Studio, Ollama, llama.cpp or remote), rate-limits per sender, signs and broadcasts the reply to all holders. Runs on commodity hardware, down to ESP32 clients.
Read moreHalving the block target (60s to 30s) cuts first-confirmation latency in half: payments feel near-instant, asset issuance and DePIN messages settle faster, miner feedback loops tighten, and contract / oracle responses arrive quicker. The subsidy halving interval is doubled (14400 to 28800) so emission and the ~10-day micro-halving cadence are preserved across the change. Active on testnet from height 22,700; mainnet pending fork activation.
Read moreNew soulbound asset type for identity, devices and memberships. Prefixed with & (e.g. &DEVICE, &DEVICE/ROUTER001), units = 0, with creator-gated transfers, owner revocation and holder self-revocation. Acts as the access key for DePIN-token chat and MCP agent channels.
Read morePositronic ships a much larger scripting toolbox: introspection over the spending transaction, covenants, reference-input reads, byte string ops, and dedicated asset-aware opcodes. Together they move Neurai close to a programmable covenant environment.
OP_CHECKTEMPLATEVERIFY0xb3Commits to a template of the spending transaction for covenant-style constraints.
OP_CHECKSIGFROMSTACK0xb4Verifies a signature against an arbitrary message popped from the stack.
OP_TXHASH0xb5Pushes a configurable hash over selected transaction fields.
OP_TXFIELD0xb6Pushes a specific field of the spending transaction onto the stack.
OP_SPLIT0xb7Splits a byte string into two parts at a given position.
OP_REVERSEBYTES0xbcReverses the byte order of the top stack item.
OP_CAT0x7eConcatenates the two top byte strings.
OP_TXLOCKTIME0xc5Pushes the nLockTime of the spending transaction.
OP_OUTPUTVALUE0xccPushes the value of a given output of the spending transaction.
OP_OUTPUTSCRIPT0xcdPushes the scriptPubKey of a given output.
OP_OUTPUTASSETFIELD0xcePushes a field of an asset payload attached to an output.
OP_INPUTASSETFIELD0xcfPushes a field of the asset payload of an input.
OP_INPUTCOUNT0xd0Pushes the number of inputs in the spending transaction.
OP_OUTPUTCOUNT0xd1Pushes the number of outputs in the spending transaction.
OP_REFINPUTFIELD0xd2Pushes a field of a v3 reference input (vrefin) without spending it.
OP_REFINPUTASSETFIELD0xd3Pushes an asset field of a v3 reference input.
OP_REFINPUTCOUNT0xd4Pushes the number of reference inputs in the transaction.
OP_OUTPUTAUTHCOMMITMENT0xd5NIP-023: exposes the AuthScript commitment attached to an output.
OP_INPUTVALUE0xd6NIP-024: pushes the value of a given input.
OP_CHAINCONTEXT0xd7NIP-026: exposes blockchain-level context (height, time, etc.) to scripts.
Positronic upgrades core arithmetic opcodes to 64-bit operations, so scripts can do precise value math without resorting to fragile workarounds.
OP_MUL64-bit signed multiplication.
OP_DIV64-bit signed division.
OP_MOD64-bit signed modulo.
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.
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.
Post-quantum keys integrated into the wallet, with new RPC surface to derive, import and sign with PQ material.
Hierarchical deterministic derivation for post-quantum keys, so PQ accounts get the same backup ergonomics as classical ones.
New address format for AuthScript and PQ outputs, with clean separation from legacy script types.
Foundation for advanced contracts, covenant logic, and post-quantum protected destinations.
Positronic introduces transaction version 3 with a brand new vrefin section: reference inputs 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.
Reference inputs: UTXOs that scripts can inspect but do not spend.
OP_REFINPUTFIELD, OP_REFINPUTASSETFIELD and OP_REFINPUTCOUNT operate over vrefin.
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.
}A DePIN message pool with persistence, signing and 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 support two types, private (0x01) and group (0x02), and default to a 7-day expiry (max 30).
A built-in MCP layer wires any OpenAI-compatible LLM (LM Studio, Ollama, llama.cpp, remote APIs) to a Neurai node. Token holders send /ai <prompt> as an encrypted DePIN message, the worker decrypts it with the node’s pool key, calls the LLM, encrypts the answer for the token’s holders, and pushes it back as a group message. The conversation never leaves the encrypted channel, with no centralized API in between.
depinmsgpool / depinmsgpoolnet: encrypted pool and remote pool queries.
depinmcpclient: talks to any OpenAI-compatible HTTP endpoint.
depinmcpworker: polls the pool, decrypts, calls the LLM, encrypts and publishes the reply.
depingetmsginfoInspect a single DePIN message in the local pool.depinsendmsgSend an encrypted message to a DePIN token audience.depinsubmitmsgSubmit a pre-built encrypted message into the pool.depinreceivemsgPull encrypted messages targeted at this node.depingetmsgFetch and decrypt a specific message by id.depinpoolstatsStatistics about the local DePIN message pool.depinmcpstatusMCP worker status: processed commands, active model, uptime.depinpoolpkeyReturns the node’s DePIN pool public key for outbound encryption.-depinmcp=1Enable the MCP worker.-depinmcpurl / -depinmcpendpointOpenAI-compatible LLM server URL and endpoint path.-depinmcpapikeyOptional API key for the LLM server.-depinmcpkeyCommand prefix the worker listens for (default /ai).-depinmcpaddressSigning address used by the bot replies.-depinmcpintervalPolling cadence over the DePIN pool.-depinmcpprefixLabel prefixed to every reply (default [BOT]).-depinmcptimeoutTimeout for the LLM HTTP call.-depinmcpratelimitPer-sender rate limit.-depinmcppoolhost / -depinmcppoolportPool location to read/write messages from.The node must also be started with -assetindex and -pubkeyindex so encryption can resolve token holders. Pool key is derived at m/44'/0'/200'/change/0.
A new asset class designed for device identity, memberships and bound credentials. Soulbound by default, gated by the creator, and double-purposed as the access key for DePIN chat and MCP-agent channels.
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).
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.
The creator can freeze any holder's address with flag R, immediately invalidating the holder's DePIN asset. Validated by VerifyDEPINOwnerChange. The owner-token's own address is exempt and can never be frozen (bad-txns-depin-owner-holder-address-cannot-be-revoked).
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 via freeze/unfreeze with flag = 0.
Reissue requires the owner-token to be present at the creator's address (bad-txns-depin-reissue-owner-address-mismatch). Sub-DePIN assets can be issued under a parent for fleet-style structures without polluting the root namespace.
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 — /ai prompts are accepted from holders, and replies are encrypted for the same audience.
&FLEET/UNIT001.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.
Clients that handle Neurai keys, AuthScript / Bech32m v1 destinations and the DePIN messaging channel. The list grows as integrations land.
NeuraiPQWallet.nq1... / tnq1...).m_pq/100'/1900'/0'/0'/index'.@neuraiproject/neurai-depin-msg.xna, xna-test, xna-legacy, xna-legacy-test.window.neuraiWallet (isInstalled, getAddress(), signMessage()).The JavaScript stack and supporting pieces shipped over the last three months: wallet libraries, raw-transaction builders, the script-assembly toolkit, asset and DePIN message helpers, and PQ signing on ESP32.
xna, xna-test, xna-legacy(-test), xna-pq(-test).0x00), PQ (0x01), Legacy (0x02).ScriptBuilder and byte/hex helpers.OP_CHECKTEMPLATEVERIFY, OP_CHECKSIGFROMSTACK, OP_TXFIELD, 64-bit OP_MUL/OP_SUB, …).N... / t... and witness v1 nq1... / tnq1... destinations.transferwithmessage.strict form (OP_XNA_ASSET OP_1 <commitment>).depinsubmitmsg RPC.window.neuraiDepinMsg./push with token auth in Sec-WebSocket-Protocol.address.changed, chain.tip, chain.reorg, node.synced / node.syncing.hashblock + rawtx) with polling fallback.503 Retry-After), session caps, cert hot-reload.