Build against the current public testnet API, then use a local node and CLI when you need deeper chain access. Open live testnet stats

Developer

Build on the Chipcoin testnet with the public API and local CLI.

This page defines the practical developer surface: the local node HTTP API, the wallet-safe public testnet API, the explorer proxy boundary, the bootstrap seed service, the local CLI, and the recommended flow for testing addresses, transactions, and node reward visibility.

Node HTTP API

Run a local node when you need the complete read API, reward endpoints, mempool, peers, or mining-private surfaces.

Wallet-safe API

Use the public testnet API for browser wallets and integrations that need a deliberately limited CORS-enabled surface.

CLI and explorer

Use the CLI for local operator work and the explorer for human-readable chain and reward inspection.

Node HTTP API

A local testnet node exposes the full HTTP API on localhost.

A testnet node usually exposes its HTTP API locally at http://127.0.0.1:28081. This is the complete node-facing API surface. Not every endpoint should be made public.

Base

  • GET /v1/health
  • GET /v1/status
  • GET /v1/supply
  • GET /v1/tip

Blocks and chain

  • GET /v1/blocks?limit=20&from_height=4633
  • GET /v1/block?height=4599
  • GET /v1/block?hash=<block_hash>

Transactions

  • GET /v1/tx/<txid>
  • POST /v1/tx/submit
{
  "raw_hex": "<serialized_tx_hex>"
}

Mempool

  • GET /v1/mempool

Address read API

  • GET /v1/address/<address>
  • GET /v1/address/<address>/utxos
  • GET /v1/address/<address>/history?limit=50&order=desc

order accepts asc or desc.

Peers

  • GET /v1/peers
  • GET /v1/peers/summary
  • GET /v1/peers/public

/v1/peers/public is the right endpoint for public bootstrap peer discovery.

Native Rewards API

Reward-node data is exposed through explicit read endpoints.

Epoch and assignments

  • GET /v1/rewards/epoch?epoch_index=<n>&node_id=<node_id>
  • GET /v1/rewards/assignments?epoch_index=<n>&node_id=<node_id>
  • GET /v1/rewards/node-status?node_id=<node_id>&epoch_index=<n>

Fees and summaries

  • GET /v1/rewards/node-fees
  • GET /v1/rewards/epoch-summary?epoch_index=<n>

Attestations and settlement

  • GET /v1/rewards/attestations?epoch_index=<n>
  • GET /v1/rewards/settlements?epoch_index=<n>
  • GET /v1/rewards/settlement-report?epoch_index=<n>

Public Testnet API

The public API is intentionally wallet-safe and CORS-enabled.

The public API base for applications and browser wallets is https://testnet-api.chipcoinprotocol.com. It is designed for a narrow testnet integration surface, not as an unrestricted node RPC endpoint.

Allowed public endpoints

  • GET /v1/health
  • GET /v1/status
  • GET /v1/supply
  • GET /v1/address/<address>
  • GET /v1/address/<address>/utxos
  • GET /v1/address/<address>/history?limit=50&order=desc
  • GET /v1/tx/<txid>
  • POST /v1/tx/submit
  • OPTIONS for the same public paths

CORS boundary

The wallet-safe API allows browser access with CORS. It should not expose mining, private wallet, local filesystem, unrestricted node administration, or generic command execution surfaces. Broader chain and reward reads can be exposed through the explorer proxy when intentionally public.

API Examples

Start with status, supply, address lookup, and transaction submission.

Health

curl https://testnet-api.chipcoinprotocol.com/v1/health

Status

curl https://testnet-api.chipcoinprotocol.com/v1/status

Supply

curl https://testnet-api.chipcoinprotocol.com/v1/supply

Address

curl https://testnet-api.chipcoinprotocol.com/v1/address/CHC...

Transaction

curl https://testnet-api.chipcoinprotocol.com/v1/tx/<txid>

Submit raw transaction

curl -X POST https://testnet-api.chipcoinprotocol.com/v1/tx/submit \
  -H "Content-Type: application/json" \
  -d '{"raw_hex":"<serialized_tx_hex>"}'

Explorer API

The explorer has its own same-origin API surface.

The explorer frontend uses /api/testnet and /api/devnet from explorer.chipcoinprotocol.com. That API is same-origin for the explorer UI, so it does not need CORS headers for the explorer itself.

Testnet proxy base

https://explorer.chipcoinprotocol.com/api/testnet

  • GET /v1/status
  • GET /v1/supply
  • GET /v1/peers/public
  • GET /v1/rewards/epoch-summary?epoch_index=45

Public-safe reads

Read-only chain, status, supply, address, transaction, public peers, and reward summary endpoints are appropriate public candidates.

Open explorer

Use the explorer for human inspection of blocks, addresses, transactions, reward history, and network activity.

Open Explorer

Private APIs

Mining and full peer diagnostics should stay private or explicitly authorized.

Mining API

  • GET /mining/status
  • POST /mining/get-block-template
  • POST /mining/submit-block

Keep these local or available only to authorized miners.

Example mining bodies

{
  "payout_address": "<CHC_address>",
  "miner_id": "miner-a",
  "template_mode": "full_block"
}
{
  "template_id": "<template_id>",
  "serialized_block": "<block_hex>",
  "miner_id": "miner-a"
}

Bootstrap Seed Service

The bootstrap seed service is separate from the node HTTP API.

Seed endpoints

  • GET /v1/health
  • GET /v1/peers?network=testnet
  • POST /v1/announce

Role

Use the seed service for peer discovery and announcement workflows, not as a replacement for the node API.

CLI

The CLI is the deeper operator and developer interface.

The CLI runs against a local node database and local wallet files. It is the right tool for node operators, reward-node inspection, wallet diagnostics, and workflows that should not be exposed through the public browser API.

If your node is deployed with Docker Compose, run CLI commands inside the node container so the CLI sees the same mounted chain database as the running node. In the standard deployment, the host database is stored at /var/lib/chipcoin/data/node-testnet.sqlite3 and is mounted in the container as /runtime/node.sqlite3.

Docker Compose form

cd /opt/chipcoin
docker compose --env-file .env \
  -p chipcoin-testnet \
  exec -T node chipcoin --network testnet \
  --data /runtime/node.sqlite3 \
  status

Host-side form

chipcoin --network testnet \
  --data /var/lib/chipcoin/data/node-testnet.sqlite3 \
  status

Status

chipcoin --network testnet \
  --data /var/lib/chipcoin/data/node-testnet.sqlite3 \
  status

Tip

chipcoin --network testnet \
  --data /var/lib/chipcoin/data/node-testnet.sqlite3 \
  tip

Difficulty

chipcoin --network testnet \
  --data /var/lib/chipcoin/data/node-testnet.sqlite3 \
  difficulty

Wallet balance

chipcoin --network testnet \
  --data /var/lib/chipcoin/data/node-testnet.sqlite3 \
  wallet-balance \
  --wallet-file /path/to/wallet.json

Reward summary

chipcoin --network testnet \
  --data /var/lib/chipcoin/data/node-testnet.sqlite3 \
  reward-summary

Address history

chipcoin --network testnet \
  --data /var/lib/chipcoin/data/node-testnet.sqlite3 \
  address-history CHC...

Developer Flow

A practical integration starts with wallet, faucet, API, and explorer verification.

Recommended sequence

  1. Install the browser wallet or run a local testnet node.
  2. Create a testnet address.
  3. Request testnet CHC from the faucet.
  4. Use the public API for status, supply, address, and transaction checks.
  5. Use the explorer for richer block and reward history views.
  6. Use the CLI when you need local chain or wallet diagnostics.

Security rule

Wallet files, private keys, faucet secrets, and local node databases must stay server-side or local to the operator. The public frontend should never receive wallet secrets or shell execution capability.

Build Next

Use the public API for browser-safe integrations and the CLI for deeper node work.

The current public testnet is the correct target for wallet integration, faucet testing, transaction submission, explorer verification, and reward-node inspection.