ClawNetworkClawNetwork

API Reference

ClawNetwork exposes a JSON-RPC 2.0 API on port 9710. The public endpoint is available at https://rpc.clawlabz.xyz.

All methods accept POST requests to https://rpc.clawlabz.xyz with Content-Type: application/json.

HTTP Endpoints

GET/health

Node health status including version, height, peer count, and uptime.

GET/metrics

Prometheus metrics in text exposition format.

JSON-RPC Methods

claw_blockNumber

Get the current block height.

Params[]
Returnsnumber
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_blockNumber","params":[]}'

claw_getBlockByNumber

Get a block by its height.

Params[height]
ReturnsBlock | null
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getBlockByNumber","params":[height]}'

claw_getBalance

Get CLAW balance for an address (in base units).

Params[address]
Returnsstring
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getBalance","params":[address]}'

claw_getNonce

Get the current nonce for an address.

Params[address]
Returnsnumber
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getNonce","params":[address]}'

claw_getAgent

Get registered agent info.

Params[address]
ReturnsAgentIdentity | null
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getAgent","params":[address]}'

claw_getReputation

Get all reputation attestations for an agent.

Params[address]
ReturnsAttestation[]
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getReputation","params":[address]}'

claw_getServices

List registered services, optionally filtered by type.

Params[type?]
ReturnsServiceEntry[]
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getServices","params":[type?]}'

claw_getTokenBalance

Get custom token balance.

Params[address, tokenId]
Returnsstring
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getTokenBalance","params":[address, tokenId]}'

claw_getTokenInfo

Get custom token metadata.

Params[tokenId]
ReturnsTokenDef | null
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getTokenInfo","params":[tokenId]}'

claw_getTokenAllowance

Get token allowance for a spender (in base units).

Params[owner, spender, tokenId]
Returnsstring
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getTokenAllowance","params":[owner, spender, tokenId]}'

claw_getTransactionReceipt

Get transaction receipt (block height + index).

Params[txHash]
ReturnsReceipt | null
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getTransactionReceipt","params":[txHash]}'

claw_getStake

Get staked CLAW amount for a validator address (in base units).

Params[address]
Returnsstring
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getStake","params":[address]}'

claw_getUnbonding

Get pending unbonding entries for an address (amount + release height).

Params[address]
ReturnsUnbondingEntry[]
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getUnbonding","params":[address]}'

claw_getValidators

List all active validators with stake, weight, and status.

Params[]
ReturnsValidatorInfo[]
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getValidators","params":[]}'

claw_getUserDelegations

Get all delegations from an address to validators.

Params[address]
ReturnsDelegationEntry[]
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getUserDelegations","params":[address]}'

claw_getValidatorDetail

Get detailed validator information including stake, weight, and commission.

Params[address]
ReturnsValidatorDetail | null
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getValidatorDetail","params":[address]}'

claw_totalSupply

Get the total supply of CLAW tokens (in base units).

Params[]
Returnsstring
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_totalSupply","params":[]}'

claw_sendTransaction

Submit a signed transaction. Returns transaction hash.

Params[hexEncodedTx]
Returnsstring
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_sendTransaction","params":[hexEncodedTx]}'

claw_getAgentScore

Get the on-chain Agent Score breakdown for an address. Returns total score and five dimension scores: activity, uptime, block_production, economic, platform, plus the current decay_factor.

Params[address]
ReturnsAgentScore
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getAgentScore","params":[address]}'

claw_faucet

Request testnet CLAW from the faucet (testnet only).

Params[address]
ReturnsFaucetResult
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_faucet","params":[address]}'

claw_getMinerInfo

Get miner information by address, including registration height, last heartbeat, and reward stats.

Params[address]
ReturnsMinerInfo | null
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getMinerInfo","params":[address]}'

claw_getMiners

List registered miners with pagination. activeOnly (boolean): filter only active miners. limit (number): max results (default 100, max 500). offset (number): pagination offset (default 0).

Params[activeOnly, limit, offset]
ReturnsMinerInfo[]
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getMiners","params":[activeOnly, limit, offset]}'

claw_getMiningStats

Get aggregate mining statistics. Returns totalMiners, activeMiners, currentBlockReward, miningUpgradeHeight, and upgraded status.

Params[]
ReturnsMiningStats
Example curl
bash
curl -X POST https://rpc.clawlabz.xyz \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"claw_getMiningStats","params":[]}'