BIP122 Namespace - Chains

Author Simon Warta, ligi, Pedro Gomes
Status Draft
Type Standard
Created 2019-12-05
Updated 2022-03-27
Requires CAIP-2
Withdrawal reason CAIP-4


For context, see the CAIP-2 specification.


The chain ID identifiers for BIP122 are specified in BIP122’s chain ID definition.


The syntax for BIP122 chain ID can be summarized as a 32-character prefix from the hash of the genesis block of a given chain, in lowercase hex representation.

Resolution Method

To query for a Chain ID to represent or checksum a BIP122 reference, make a JSON-RPC request to the blockchain node with method getblockhash, for example:

// Request
  "id": 1,
  "jsonrpc": "2.0",
  "method": "getblockhash",
  "params": [0]

// Response
  "id": 1,
  "jsonrpc": "2.0",
  "result": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"

The response will return as a result value the hash for the block with height 0 that should be sliced to its first 16 bytes (32 characters for base 16) to be compatible with the reference syntax defined above.

Test Cases

This is a list of manually composed examples:

# Bitcoin mainnet (see [chain ID section of BIP122](

# Litecoin

# Feathercoin (Litecoin fork)


  • BIP13: Bitcoin Improvement Proposal specifying “Script Hash” addresses
  • BIP21: Bitcoin Improvement Proposal specifying bitcoin URI scheme
  • BIP122: Bitcoin Improvement Proposal specifying blockchain URI scheme


Copyright and related rights waived via CC0.


Please cite this document as:

Simon Warta, ligi, Pedro Gomes, "namespaces/bip122-caip2: BIP122 Namespace - Chains [DRAFT]," Chain Agnostic Namespaces, bip122-caip2, December 2019 / March 2022. [Online serial]. Available: