DePIN Messaging
DePIN Messaging is Neurai's private, token-gated messaging layer for devices and people. Membership is decided on-chain by holding a DePIN token. Messages travel off-chain through a service node, encrypted end to end, and expire after a configurable time. Nothing about a message is ever written to the blockchain: no fees, no permanence.
DePIN Messaging is experimental and currently available on testnet and regtest only. This documentation describes protocol 2, which is a breaking change from protocol 1. Clients should check that depingetmsginfo reports protocol: 2.
How it works
- A token owner issues a DePIN asset such as
&NEWSand hands holdings to the addresses that may take part. Sections such as&NEWS/GENERALcreate channels inside it. - A service node runs a message pool for that token. It verifies on-chain holdings, enforces limits and stores ciphertext for a few days.
- A holder encrypts a message for the other holders' public keys, signs it and submits it. Other holders authenticate with a single-use challenge, fetch the ciphertext and decrypt it locally.
Trust model
| Party | Holds | Can do | Cannot do |
|---|---|---|---|
| Holder / client | Its own secp256k1 key | Read and publish in the pools it holds tokens for | Act for another address |
| Service node | The pool key | Enforce access, authenticate readers, sign replies | Read message content, forge a message |
| RPC proxy | Node RPC credentials | Whitelist DePIN RPCs, rate-limit by IP | Read, forge or silently alter a reply once the pool key is pinned |
| Token owner | The owner token &NAME! | Issue holdings and sections, freeze holders, purge the pool | Read messages it was not a recipient of |
In one sentence: the chain decides who may participate, the holder's key proves identity and decrypts, the pool key authenticates the service, and nothing in between can read, forge or silently alter anything.
Key properties
| Property | Detail |
|---|---|
| Access | Active holdings of &TOKEN or any of its ancestors. Frozen or self-revoked holdings do not grant access. |
| Confidentiality | Content is encrypted per recipient with ECIES (secp256k1 ECDH) and AES-256-GCM. The node stores ciphertext only. |
| Integrity | Every message carries a DER ECDSA signature from the sender. Every reply from the node is signed with the pool key. |
| Authentication | Single-use signed challenges. No sessions, cookies or bearer tokens. |
| Persistence | In-memory pool, 7-day expiry by default. Nothing is written on-chain. |
| Transport | Standard JSON-RPC on the node's RPC port, usually behind an RPC proxy. There is no separate DePIN port. |
What is public and what is not
- Confidential: message content, challenge nonces and every reply bound to an address.
- Public: token names, the section hierarchy, who holds what and which addresses have revealed a public key. All of this is chain data.
- Visible to the node: the sender, token, timestamp and recipient hashes of a submission. The protocol does not promise anonymity.
Documentation map
| Page | Read it when you want to |
|---|---|
| Tokens and access | Understand DePIN assets, sections, freezing, transfer states and how access is computed |
| Client guide | Build a client or library: pin the pool key, authenticate, read, decrypt and publish |
| Protocol reference | Implement the byte-exact formats: serialization, ECIES envelope, signatures, limits and error codes |
| Running a service node | Operate a pool: indexes, configuration flags, persistence and the optional AI responder |
Resources
- DePIN-Messaging on GitHub: JavaScript implementation of the message cryptography and a web demo.
- Neurai node source: reference implementation, full specification and test vectors under
doc/andcontrib/depin/. - IoT development: using DePIN Messaging from low-power devices.
- AI integration: connecting an AI responder to a pool through MCP.