API Reference

The RougeChain node exposes a REST API on the configured --api-port (default: 5101).

Important: All write operations (POST/PUT/DELETE) require v2 signed requests using ML-DSA-65 client-side signing. Legacy unsigned v1 write endpoints return 410 GONE in production. Private keys never leave your application.

Base URL

Local node:

http://127.0.0.1:5101/api

Public testnet:

https://testnet.rougechain.io/api

Public mainnet:

https://api.rougechain.io/api

Both public endpoints send Access-Control-Allow-Origin: *, so browser dApps and localhost dev servers can call them directly with no per-origin allowlisting. (The API has no cookie/session auth — every write is ML-DSA-65 signed — so a wildcard is safe, the same posture as public RPC providers.)

Address Format

RougeChain uses Bech32m addresses with the rouge1 prefix (e.g., rouge1q8f3x7k2m4n9p...). These are derived from the SHA-256 hash of the raw ML-DSA-65 public key.

Accepted formats differ per endpoint:

EndpointAccepts
/api/balance/:publicKey, /api/balance/:publicKey/:tokenhex public key or rouge1… address
/api/address/:pubkey/transactionshex public key or rouge1… address
/api/resolve/:inputhex public key or rouge1… address
/api/nft/owner/:pubkeyexact match on the owner as recorded — normally the hex public key; a rouge1… address does not match a pubkey-owned NFT
/api/account/:pubkey/noncehex public key or rouge1… address (resolved via the node's address index; an address that has never sent a transaction returns 0; a malformed one returns 400)

When in doubt, pass the hex public key.

Tip: Use GET /api/resolve/:input to convert between rouge1… addresses and hex public keys.

v2 Signed Request Format

All write endpoints use a standard signed-request envelope:

{
  "payload": {
    "...endpoint-specific fields...",
    "from": "your-signing-public-key-hex",
    "timestamp": 1706745600000,
    "nonce": "random-hex-string"
  },
  "signature": "ml-dsa65-signature-of-payload-hex",
  "public_key": "your-signing-public-key-hex"
}

The payload is JSON-serialized with keys sorted alphabetically, then signed with your ML-DSA-65 private key. The server verifies the signature, checks the timestamp (must be within ±5 minutes of the server clock), and rejects a signature it has already seen within that window. Messenger, mail and name endpoints additionally require a unique nonce of 8–128 characters. The envelope may also carry an optional payload_bytes_hex (the exact bytes that were signed); when present the node verifies those bytes and checks that they decode to payload.

Endpoints Overview

System

EndpointMethodDescription
/api/healthGETNode health check
/api/statsGETNetwork statistics
/api/wsGETWebSocket for real-time events
/api/price/xrgeGETCurrent XRGE price

Blockchain

EndpointMethodDescription
/api/blocksGETGet recent blocks (max 100) or a page of blocks
/api/blocks/summaryGETBlock summary for charts
/api/block/:heightGETGet block by height
/api/txsGETGet transactions
/api/tx/:hashGETGet transaction by hash
/api/tx/:hash/receiptGETGet transaction receipt
/api/eventsGETGet all events

Wallet & Accounts

EndpointMethodDescription
/api/balance/:publicKeyGETGet XRGE balance
/api/balance/:publicKey/:tokenGETGet token balance
/api/account/:pubkey/nonceGETGet account nonce
/api/resolve/:inputGETResolve address ↔ public key
/api/address/:pubkey/transactionsGETGet address transactions
/api/v2/transferPOSTTransfer tokens (signed)
/api/v2/faucetPOSTRequest testnet tokens (signed)

Tokens

EndpointMethodDescription
/api/tokensGETList all tokens
/api/token/:symbol/metadataGETGet token metadata
/api/token/:symbol/holdersGETGet token holders
/api/token/:symbol/transactionsGETGet token transactions
/api/burn-addressGETGet official burn address
/api/burnedGETGet burned token stats
/api/v2/token/createPOSTCreate token (signed); mintable / max_supply since TOKEN_MINTING (mainnet block 235)
/api/v2/token/mintPOSTMint more of a mintable token, creator only (signed); live since mainnet block 235
/api/v2/token/metadata/updatePOSTUpdate token metadata (signed)
/api/v2/token/metadata/claimPOSTClaim metadata ownership (signed)

Token Allowances (ERC-20 Style)

EndpointMethodDescription
/api/v2/token/approvePOSTApprove spender allowance (signed)
/api/v2/token/transfer-fromPOSTTransfer using allowance (signed)
/api/v2/token/freezePOSTFreeze/unfreeze token transfers (signed)
/api/token/allowanceGETCheck specific allowance
/api/token/allowancesGETList allowances by owner/spender
/api/allowances/:pubkeyGETList all allowances for a key
/api/locks/:pubkeyGETGet token locks

Staking & Validators

EndpointMethodDescription
/api/validatorsGETList validators
/api/validators/statsGETValidator vote stats
/api/selectionGETProposer for the next height. Once proposer selection is active, the consensus designated proposer (rule: "designated_max_stake", same as designated_proposer_next in /api/stats; no entropy fields); before activation, the legacy QRNG lottery (rule: "legacy_qrng_lottery")
/api/finalityGETFinality status (legacy, informational — see Finality)
/api/votesGETVote quorum info
/api/v2/stakePOSTStake tokens (signed)
/api/v2/unstakePOSTUnstake tokens (signed)

Token Staking Pools (suspended since block 245)

create_staking_pool, token_stake and token_unstake are suspended transaction types since mainnet block 245 (testnet 1390): no block may carry them. These read routes answer with empty data on mainnet (no pool was ever created). See Status.

EndpointMethodDescription
/api/staking/poolsGETList all staking pools
/api/staking/pool/:pool_idGETGet staking pool details
/api/staking/stakes/:pubkeyGETGet stakes by owner
/api/staking/pool/:pool_id/stakesGETGet stakes in a pool

AMM/DEX

EndpointMethodDescription
/api/poolsGETList liquidity pools
/api/pool/:pool_idGETGet pool details
/api/pool/:pool_id/pricesGETGet price history
/api/pool/:pool_id/eventsGETGet pool events
/api/pool/:pool_id/statsGETGet pool statistics
/api/swap/quotePOSTGet swap quote
/api/v2/pool/createPOSTCreate liquidity pool (signed)
/api/v2/pool/add-liquidityPOSTAdd liquidity (signed)
/api/v2/pool/remove-liquidityPOSTRemove liquidity (signed)
/api/v2/swap/executePOSTExecute swap (signed)

NFTs

EndpointMethodDescription
/api/nft/collectionsGETList collections
/api/nft/collection/:idGETGet collection
/api/nft/collection/:id/tokensGETGet collection tokens
/api/nft/token/:coll/:idGETGet specific NFT
/api/nft/owner/:pubkeyGETGet NFTs by owner
/api/v2/nft/collection/createPOSTCreate collection (signed)
/api/v2/nft/mintPOSTMint NFT (signed)
/api/v2/nft/batch-mintPOSTBatch mint (signed)
/api/v2/nft/transferPOSTTransfer NFT (signed)
/api/v2/nft/burnPOSTBurn NFT (signed)
/api/v2/nft/lockPOSTLock/unlock NFT (signed)
/api/v2/nft/freeze-collectionPOSTFreeze collection (signed)

Smart Contracts

EndpointMethodDescription
/api/v2/contract/publishPOSTPublish (deploy) WASM contract (player-signed, 10 XRGE)
/api/v2/contract/executePOSTCall a contract method (player-signed, fee = gasLimit × 0.000001 XRGE)
/api/contract/:address/queryPOSTRead-only call (free, not signed)
/api/contract/:addressGETGet contract metadata
/api/contract/:address/stateGETGet contract state
/api/contract/:address/eventsGETGet contract events (limit, before, tx)
/api/contractsGETList contracts

Bridge (ETH/USDC + XRGE)

EndpointMethodDescription
/api/bridge/configGETETH/USDC bridge config
/api/bridge/claimPOSTClaim bridge deposit
/api/bridge/withdrawPOSTWithdraw to EVM
/api/bridge/withdrawalsGETList pending withdrawals
/api/bridge/activityGETPublic bridge activity (deposits + withdrawals, paginated)
/api/bridge/activity/:txIdGETOne bridge transfer by RougeChain tx id
/api/bridge/withdrawals/:txIdDELETEFulfill withdrawal
/api/bridge/btc/deposit-addressPOSTPer-recipient BTC deposit address (qBTC)
/api/bridge/xrge/configGETXRGE bridge config
/api/bridge/xrge/claimPOSTClaim XRGE deposit
/api/bridge/xrge/withdrawPOSTWithdraw XRGE to EVM
/api/bridge/xrge/withdrawalsGETList XRGE withdrawals
/api/bridge/xrge/withdrawals/:txIdDELETEFulfill XRGE withdrawal

Shielded Transactions (suspended since block 245)

The V1 shielded pool is suspended: shield, shielded_transfer and unshield are refused (this transaction type is suspended) and a block carrying them is invalid. The mainnet pool is empty (shielded_supply 0). A redesigned pool (V2) is in development and unaudited — see Status.

EndpointMethodDescription
/api/v2/shielded/shieldPOSTRefused: suspended
/api/v2/shielded/transferPOSTRefused: suspended
/api/v2/shielded/unshieldPOSTRefused: suspended
/api/shielded/statsGETShielded pool statistics (pool total 0 on mainnet)
/api/shielded/nullifier/:hashGETCheck nullifier

Rollup (research prototype — not part of consensus)

The rollup accumulator batches transfers in memory and proves them with a STARK, but nothing in consensus reads a batch: a submitted transfer moves no funds and enters no block.

EndpointMethodDescription
/api/v2/rollup/statusGETRollup status
/api/v2/rollup/batch/:idGETGet rollup batch
/api/v2/rollup/submitPOSTSubmit rollup transfer

Governance (suspended since block 245)

On-chain governance (create_proposal, cast_vote, execute_proposal, delegate, undelegate) is suspended: no block may carry these types, and none was ever used on mainnet. These read routes return empty lists on mainnet. Treasury decisions for Regenerate use the node-hosted Regenerate votes in the meantime.

EndpointMethodDescription
/api/governance/proposalsGETList all proposals
/api/governance/proposals/:tokenGETProposals by token
/api/governance/proposal/:idGETGet proposal details
/api/governance/proposal/:id/votesGETGet proposal votes

Social

EndpointMethodDescription
/api/social/track/:trackId/statsGETGet track stats (plays, likes, comments)
/api/social/track/:trackId/commentsGETGet track comments
/api/social/artist/:pubkey/statsGETGet artist stats (followers, following)
/api/social/user/:pubkey/likesGETGet user's liked track/post IDs
/api/social/user/:pubkey/followingGETGet user's followed artists
/api/social/user/:pubkey/postsGETGet user's posts
/api/social/post/:postIdGETGet a single post with stats
/api/social/post/:postId/statsGETGet post stats (likes, reposts, replies)
/api/social/post/:postId/repliesGETGet replies to a post
/api/social/timelineGETGlobal timeline (newest first)
/api/v2/social/playPOSTRecord a play (signed)
/api/v2/social/likePOSTToggle like (signed)
/api/v2/social/commentPOSTPost a comment (signed)
/api/v2/social/comment/deletePOSTDelete a comment (signed)
/api/v2/social/followPOSTToggle follow (signed)
/api/v2/social/postPOSTCreate a post (signed)
/api/v2/social/post/deletePOSTDelete a post (signed)
/api/v2/social/repostPOSTToggle repost (signed)
/api/v2/social/feedPOSTGet following feed (signed)

Messenger

EndpointMethodDescription
/api/messenger/walletsGETList messenger wallets
/api/v2/messenger/wallets/registerPOSTRegister wallet (signed)
/api/v2/messenger/conversationsPOSTCreate conversation (signed)
/api/v2/messenger/conversations/listPOSTList conversations (signed)
/api/v2/messenger/conversations/deletePOSTDelete conversation (signed)
/api/v2/messenger/messagesPOSTSend message (signed)
/api/v2/messenger/messages/listPOSTList messages (signed)
/api/v2/messenger/messages/readPOSTMark as read (signed)
/api/v2/messenger/messages/deletePOSTDelete message (signed)

Mail

EndpointMethodDescription
/api/v2/names/registerPOSTRegister mail name (signed)
/api/v2/names/releasePOSTRelease a name (signed)
/api/names/resolve/:nameGETResolve name → wallet
/api/names/reverse/:walletIdGETReverse lookup → name
/api/v2/mail/sendPOSTSend encrypted mail (signed)
/api/v2/mail/folderPOSTGet inbox/sent/trash (signed)
/api/v2/mail/messagePOSTGet single mail item (signed)
/api/v2/mail/readPOSTMark as read (signed)
/api/v2/mail/movePOSTMove to folder (signed)
/api/v2/mail/deletePOSTDelete permanently (signed)

Push Notifications

EndpointMethodDescription
/api/push/registerPOSTRegister push token (PQC-signed)
/api/push/unregisterPOSTUnregister push token (PQC-signed)

P2P

EndpointMethodDescription
/api/peersGETList known peers
/api/peers/registerPOSTRegister as peer
/api/blocks/importPOSTImport block from peer
/api/tx/broadcastPOSTReceive broadcasted tx

Authentication

If a node is started with --api-keys, most REST routes require a key — reads included, not just writes. Exempt are /, /api/health, /api/stats, /api/v2/*, /api/bridge/*, /api/messenger/*, /api/mail/*, /api/names/* and the faucet. Send the key as X-API-Key or Authorization: Bearer:

curl -H "X-API-Key: your-api-key" http://127.0.0.1:5101/api/blocks

The public endpoints (api.rougechain.io, testnet.rougechain.io) do not require a key.

Rate Limiting

Rate limiting is disabled by default (all limits 0 = unlimited). Limits are per minute and tiered:

  • Tier 1 (Validators): Proven via X-Validator-Key / X-Validator-Sig / X-Validator-Ts headers (the signed timestamp must be within 30 seconds) — --rate-limit-validator
  • Tier 2 (Registered peers): Recognized by IP — --rate-limit-peer
  • Tier 3 (Public): GET requests use --rate-limit-read-per-minute, all other methods --rate-limit-write-per-minute

--rate-limit-per-minute is a deprecated alias: when it is set and neither read nor write limit is, it applies to both (a deprecation warning is logged); explicit read/write limits take precedence.

Clients are keyed by the connecting IP. Behind a reverse proxy on the same host, start the node with --trust-proxy (env QV_TRUST_PROXY=true): requests whose TCP peer is loopback are then keyed by X-Real-IP, else the rightmost X-Forwarded-For entry; requests from any other peer always use the socket IP. Every route is rate-limited, including the peer routes /api/finality/* (which stay API-key exempt).