API Reference
ClawNetwork exposes a JSON-RPC 2.0 API on port 9710.
All methods accept POST requests to http://localhost:9710 with Content-Type: application/json.
HTTP Endpoints
GET
/healthNode health status including version, height, peer count, and uptime.
GET
/metricsPrometheus metrics in text exposition format.
JSON-RPC Methods
clw_blockNumber
Get the current block height.
Params
[]Returns
numberExample curl
curl -X POST http://localhost:9710 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"clw_blockNumber","params":[]}'clw_getBlockByNumber
Get a block by its height.
Params
[height]Returns
Block | nullExample curl
curl -X POST http://localhost:9710 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"clw_getBlockByNumber","params":[height]}'clw_getBalance
Get CLW balance for an address (in base units).
Params
[address]Returns
stringExample curl
curl -X POST http://localhost:9710 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"clw_getBalance","params":[address]}'clw_getNonce
Get the current nonce for an address.
Params
[address]Returns
numberExample curl
curl -X POST http://localhost:9710 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"clw_getNonce","params":[address]}'clw_getAgent
Get registered agent info.
Params
[address]Returns
AgentIdentity | nullExample curl
curl -X POST http://localhost:9710 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"clw_getAgent","params":[address]}'clw_getReputation
Get all reputation attestations for an agent.
Params
[address]Returns
Attestation[]Example curl
curl -X POST http://localhost:9710 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"clw_getReputation","params":[address]}'clw_getServices
List registered services, optionally filtered by type.
Params
[type?]Returns
ServiceEntry[]Example curl
curl -X POST http://localhost:9710 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"clw_getServices","params":[type?]}'clw_getTokenBalance
Get custom token balance.
Params
[address, tokenId]Returns
stringExample curl
curl -X POST http://localhost:9710 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"clw_getTokenBalance","params":[address, tokenId]}'clw_getTokenInfo
Get custom token metadata.
Params
[tokenId]Returns
TokenDef | nullExample curl
curl -X POST http://localhost:9710 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"clw_getTokenInfo","params":[tokenId]}'clw_getTransactionReceipt
Get transaction receipt (block height + index).
Params
[txHash]Returns
Receipt | nullExample curl
curl -X POST http://localhost:9710 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"clw_getTransactionReceipt","params":[txHash]}'clw_sendTransaction
Submit a signed transaction. Returns transaction hash.
Params
[hexEncodedTx]Returns
stringExample curl
curl -X POST http://localhost:9710 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"clw_sendTransaction","params":[hexEncodedTx]}'clw_faucet
Request testnet CLW from the faucet (testnet only).
Params
[address]Returns
FaucetResultExample curl
curl -X POST http://localhost:9710 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"clw_faucet","params":[address]}'