Stacks Namespace - Chains

Author Léo Pradel @pradel, Greg Ogunyanwo @gregogun
Status Draft
Type Standard
Created 2022-06-07
Requires CAIP-2


For context, see the [CAIP-2][] specification.


In [CAIP-2][] a general blockchain identification scheme is defined. This is the implementation of CAIP-2 for Stacks. The chain ID is used as a way to mitigate replay attacks on different Stacks chains, as it is included in the transaction encoding. Stacks mainnet runs on bitcoin mainnet and testnet runs on bitcoin testnet3.


For reference, the format of reference currently specified in SIP-005 is an unsigned integer in decimal representation. The unsigned integer is represented as a 32-bit unsigned integer with a maximum value of 2^32-1.

Resolution Method

To resolve a blockchain reference for the stacks namespace, make an API call request to a blockchain node on the route /v2/info, the response will contain the network_id field. For example:

  "id": 1,
  "network_id": 1,
  "server_version": "stacks-node (develop:4641001+, release build, linux [x86_64])",
  // ... other fields

Test Cases

This is a list of manually composed examples

# Stacks mainnet

# Stacks testnet


  • [SIP-005][] - Blocks and Transactions
  • [API documentation][] - Core API info

[SIP-005][] [API documentation][] [CAIP-2][]

Copyright and related rights waived via CC0.


Please cite this document as:

Léo Pradel @pradel, Greg Ogunyanwo @gregogun, "namespaces/stacks-caip2: Stacks Namespace - Chains [DRAFT]," Chain Agnostic Namespaces, stacks-caip2, June 2022 / . [Online serial]. Available: