Skip to content
Testnet

Protocol

DePIN messaging and tokens

DePIN tokens (&NAME) define who belongs to a network of devices or people. Holders of a token can exchange end-to-end encrypted messages through nodes that run a message pool, with no fees and nothing written to the chain. It runs on testnet and regtest only.

On-chain

DePIN tokens

  • Names start with &: root &NAME, sections &NAME/SUB, owner token &NAME!.
  • Soulbound. Holders cannot transfer them; only the owner token can issue, move, freeze or unfreeze. A holder may burn its own.
  • Whole units (units = 0), and the same burn cost as a unique asset.
  • Transfer state (from block 10): the owner can open, close or permanently seal a token.
  • A message to a section reaches the active holders of that section and of every parent up to the root.

Off-chain

Message pool, protocol 2

Message expiry 7 days (default)
Recipients per message 20 by default, up to 50
Message size 1,024 bytes
Encryption ECIES secp256k1 + AES-256-GCM
Fees None: messages never touch the chain
Addresses Legacy P2PKH (t…) with a revealed public key

Try it

Where to use DePIN on testnet

RPC

Token management

  • checkdepinvalidity Is an address an active holder?
  • listdepinholders Holders of a DePIN token.
  • freezedepin / unfreezedepin Owner freezes or restores a holder.
  • selfrevokedepin A holder burns its own token.
  • opendepin / closedepin / sealdepin Transfer state of a token. Sealing is permanent.

RPC

Messaging

  • depingetmsginfo Pool status; protocol must be 2.
  • depinchallenge Get a challenge to prove an address.
  • depinsubmitmsg Publish an encrypted, signed message.
  • depinreceivemsg Fetch messages for a token and address.
  • depinlistsections Sections under a token.
  • depinpoolstats Pool statistics.

The public proxies limit DePIN calls to 60 per minute per IP. The testnet DePIN endpoint is https://rpc-testnet-depin.neurai.org/rpc.

For developers

Read messages with neurai-depin-msg

The library decrypts and verifies messages; your app supplies the RPC transport. Check the reset testnet genesis first, and derive DePIN keys with the xna-legacy-test network of neurai-key.

JavaScript
import { decodeDepinReceiveResponse } from "@neuraiproject/neurai-depin-msg";

// rpcResult = depinreceivemsg(token, address, 0, "", 25)
const { messages } = await decodeDepinReceiveResponse(rpcResult, {
  network: "test",
  privateKey: userWif,
  requestedToken: "&NEWS",
});

for (const m of messages) {
  if (m.ok && m.plaintext !== null) console.log(m.message.sender, m.plaintext);
}

Legacy addresses only

DePIN messaging works only with Legacy t… addresses. Tokens held on a witness address (tnq1r…, tpq1z…, tnc1p…) receive no messages. With a node wallet, ask for one explicitly: getnewaddress "" legacy. The full protocol is in doc/depin-messaging-protocol.md.