SolidPeer

BCHN reference

Bitcoin Cash Node's JSON-RPC interface, proxied through the gateway with per-call CC billing.

Endpoint

https://solidpeer.io/bchn/<network>/<token>

POST a JSON-RPC envelope as the body. Single requests and batches are both supported (batch size capped at 20).

curl https://solidpeer.io/bchn/mainnet/<token> \
  -H "content-type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"getblockcount","params":[]}'

Response:

{ "jsonrpc": "2.0", "id": 1, "result": 882357 }

Method allowlist

BCHN's full RPC surface is large; the gateway exposes a curated subset useful for application clients. The default-allowed set covers chain inspection, address scan, block / transaction lookup, mempool inspection, and transaction broadcast. Wallet RPCs (getnewaddress, signrawtransaction, etc.) are not exposed — bring your own keys.

Methods are filtered at the gateway: an unknown or denied method returns 400 method_not_in_allowlist without touching the upstream.

Write methods

sendrawtransaction and generatetoaddress (regtest only) are write methods. By default, tokens are read-only and writes are rejected with 403 method_not_in_allowlist. To enable writes on a token, leave the per-token method allowlist empty (full read-only default) and explicitly include the write method, or mint a token without any allowlist (allows all default methods including writes).

Cost model

200 CC per call on mainnet; 100 CC per call on testnets/regtest. Cache hits and forwards charge the same headline amount.

Available methods

  • getblockchaininfo — current chain state (height, header tip, verification progress).
  • getblockcount — height of the most-recent validated block. Reference
  • getblockhash — height → block hash.
  • getbestblockhash — tip block hash.
  • getblock — block-by-hash, with verbosity levels (raw hex / decoded header / decoded with txs).
  • getblockheader — decoded header only.
  • getrawtransaction — transaction-by-id, raw hex or decoded. Reference
  • gettxout — UTXO inspection (unspent output by (txid, vout)).
  • getmempoolentry, getrawmempool — mempool inspection.
  • getnetworkinfo, getpeerinfo — node identity / peering metadata (operator info, redacted).
  • sendrawtransaction — broadcast a signed transaction hex.
  • generatetoaddress — mine blocks (regtest only; rejected on mainnet/chipnet/testnet4).

Full per-method docs are in progress. The contract is whatever BCHN itself implements — the gateway is transparent, so the parameter shape and response shape of an allowed method match BCHN's reference behavior.

Notes

  • Headers: the gateway emits a Server-Version header on responses so a client library can detect protocol version drift across upstreams.
  • getpeerinfo redaction: peer IP fields are replaced with <redacted> in responses to anonymous clients. Timing, byte counts, and protocol-flag fields are preserved.
  • Batches: JSON-RPC 2.0 batch requests respond with a JSON array of the same length, in submission order. Each sub-request is independently billed and may individually succeed or fail.