REST API Documentation

The Triangles daemon exposes a REST API on the RPC port (default 19112) when started with -rest=1. All responses are JSON. Public endpoints require no authentication.

Public Endpoints

No authentication required. Rate limited.

GET /rest/chaininfo

Chain state: height, best block hash, supply, difficulty

GET /rest/block/{hash}

Block details by hash. Append .hex for raw hex.

GET /rest/blockheader/{hash}

Block header (lightweight, no tx list)

GET /rest/blockbyheight/{n}

Block details by height

GET /rest/blockhashbyheight/{n}

Get block hash at a given height

GET /rest/tx/{txid}

Transaction details. Append .hex for raw hex.

GET /rest/mempool

List of unconfirmed transaction IDs

GET /rest/difficulty

Current PoW and PoS difficulty

GET /rest/supply

UTXO set statistics and total supply

GET /rest/staking

Staking network stats (weight, difficulty, expected time)

GET /rest/mining

Mining info (hashrate, block value, stake interest)

GET /rest/subsidy

Current block subsidy/reward

GET /rest/estimatefee

Estimated fee per kilobyte

GET /rest/checkpoint

Sync checkpoint information

GET /rest/network

Network info (version, connections, proxy)

GET /rest/peers

List of connected peers with details

GET /rest/validate/{addr}

Validate a Triangles address

GET /rest/address/{addr}/balance

Address balance (requires -addressindex=1)

GET /rest/address/{addr}/utxos

Address unspent outputs (requires -addressindex=1)

GET /rest/address/{addr}/txids

Address transaction history. Supports ?start=N&end=N (requires -addressindex=1)

POST /rest/tx/decode

Decode a raw transaction. Body: {"hex":"..."}

POST /rest/tx/send

Broadcast a raw transaction. Body: {"hex":"..."}

Wallet Endpoints

Require HTTP Basic Auth (RPC credentials) or Bearer token (-restapikey).

GET /rest/wallet/info

Wallet summary (balance, tx count, keypool)

GET /rest/wallet/balance

Wallet balance

GET /rest/wallet/transactions

Recent wallet transactions. Supports ?count=N&skip=N

GET /rest/wallet/transaction/{txid}

Wallet transaction detail

GET /rest/wallet/unspent

Wallet unspent outputs. Supports ?minconf=N&maxconf=N

GET /rest/wallet/addresses

Wallet address groupings

GET /rest/wallet/staking

Staking info for this wallet

POST /rest/wallet/address/new

Generate a new receiving address

POST /rest/wallet/send

Send coins. Body: {"address":"...", "amount":N}

POST /rest/wallet/sendmany

Send to multiple addresses. Body: {"recipients":{"addr":amount}}

POST /rest/wallet/unlock

Unlock wallet. Body: {"passphrase":"...", "timeout":N}

POST /rest/wallet/lock

Lock the wallet

Configuration

-rest=1 Enable the REST API
-addressindex=1 Enable address index (required for /address/* endpoints)
-restcorsorigin=* Set CORS allowed origin (default: *)
-restapikey=<token> Bearer token for wallet endpoint authentication
-restratelimit=30 Rate limit per IP per second (default: 30, 0=disabled)
Height: 2,191,462 Supply: 222,090.373669 TRI PoS Diff: 0.0000 Peers: 6 Chain: main
Triangles Block Explorer — cryptographic-triangles.org