Skip to content

IP‑On‑Chain RPC API

This page documents the JSON‑RPC surface exposed by the ip-onchain pallet.


Quick‑Start

# Single entity with entity_id = 0 lookup (latest block)
curl -H "Content-Type: application/json" \
     -d '{"jsonrpc":"2.0","id":1,"method":"ipOnchain_entity","params":[0]}' \
     {RPC_URL}

Methods Reference

Method Purpose Params Returns
`` Get one entity EntityId, BlockHash? EntityDetails
`` Range query from, to, BlockHash? Vec<(EntityId, EntityDetails)>
`` Get one author AuthorId, BlockHash? AuthorDetails
`` Range of authors from, to, BlockHash? Vec<(AuthorId, AuthorDetails)>
`` Get one authority AuthorityId, BlockHash? AuthorityDetails
`` Range of authorities from, to, BlockHash? Vec<(AuthorityId, AuthorityDetails)>

All range calls are inclusive of both bounds.

Common Parameters

Name Type Description
BlockHash H256 Optional. Target block to query. Omit for the best (latest) block.

Error Codes

Code Variant Meaning
1 RuntimeError Runtime API call failed or trapped
2 DecodeError Supplied parameter could not be SCALE‑decoded

Errors are delivered as ErrorObject in standard JSON‑RPC error responses.


See Also