├── CNAME ├── .DS_Store ├── .gitignore ├── index.html ├── _data └── statuses.yml ├── assets └── tiny_github_logo.png ├── .editorconfig ├── FUNDING.json ├── _includes ├── discussion_links.html ├── superseded_by.html ├── crosslinks.html ├── authorlist.html ├── caipnums.html └── caiptable.html ├── 404.html ├── fil ├── README.md └── caip2.md ├── chia └── README.md ├── monero ├── README.md ├── caip10.md └── caip2.md ├── waves ├── README.md ├── caip19.md ├── caip10.md └── caip2.md ├── avalanche └── README.md ├── koinos ├── README.md └── caip2.md ├── arweave ├── README.md ├── caip10.md └── caip2.md ├── antelope └── README.md ├── conflux ├── README.md └── caip2.md ├── aleo ├── README.md ├── caip10.md └── caip2.md ├── vechain ├── README.md ├── caip10.md └── caip2.md ├── stacks ├── README.md ├── caip10.md ├── caip2.md └── caip122.md ├── algorand ├── README.md └── caip2.md ├── mina └── README.md ├── partisia ├── README.md └── caip2.md ├── xrpl └── README.md ├── ergo ├── README.md ├── caip2.md ├── caip19.md └── caip10.md ├── reef ├── README.md └── caip2.md ├── casper ├── README.md ├── caip2.md └── caip10.md ├── solana ├── README.md ├── caip10.md ├── caip19.md └── caip2.md ├── ccd └── README.md ├── starknet ├── README.md ├── caip10.md └── caip2.md ├── swift ├── caip2.md ├── README.md └── caip19.md ├── tvm ├── README.md └── caip2.md ├── stellar ├── README.md └── caip2.md ├── mvx ├── README.md ├── caip10.md └── caip2.md ├── Gemfile ├── wallet ├── README.md └── caip2.md ├── alephium ├── caip19.md ├── README.md ├── caip2.md └── caip10.md ├── tezos ├── README.md └── caip10.md ├── _config.yml ├── bip122 ├── README.md └── caip2.md ├── eip155 ├── README.md ├── caip122.md ├── caip211.md ├── caip2.md └── caip19.md ├── .github └── workflows │ └── pages.yml ├── hedera ├── README.md └── caip10.md ├── Gemfile.lock ├── sui └── README.md ├── iota └── README.md ├── _template ├── README.md └── caip350.md ├── qubic ├── README.md └── caipX.md ├── polkadot └── README.md ├── cosmos ├── caip10.md └── README.md └── quai └── README.md /CNAME: -------------------------------------------------------------------------------- 1 | namespaces.chainagnostic.org 2 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainAgnostic/namespaces/HEAD/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | _site 2 | .sass-cache 3 | .jekyll-cache 4 | .jekyll-metadata 5 | vendor 6 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Home 4 | --- 5 | 6 | {% include caiptable.html caips=site.pages %} -------------------------------------------------------------------------------- /_data/statuses.yml: -------------------------------------------------------------------------------- 1 | - Draft 2 | - Rejected 3 | - Review 4 | - Last Call 5 | - Final 6 | - Withdrawn 7 | - Superseded -------------------------------------------------------------------------------- /assets/tiny_github_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChainAgnostic/namespaces/HEAD/assets/tiny_github_logo.png -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | trim_trailing_whitespace = true 6 | insert_final_newline = true 7 | -------------------------------------------------------------------------------- /FUNDING.json: -------------------------------------------------------------------------------- 1 | { 2 | "drips": { 3 | "ethereum": { 4 | "ownedBy": "0xEDA75C4e519FD27d7d28B7F20be407435fb74e2d" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /_includes/discussion_links.html: -------------------------------------------------------------------------------- 1 | {% assign links=include.links|split:"," %} 2 | {% for link in links %} 3 | {{ link | strip | xml_escape }} 4 | {% endfor %} -------------------------------------------------------------------------------- /_includes/superseded_by.html: -------------------------------------------------------------------------------- 1 | {% assign caips=include.caips|split:"," %} 2 | {% for str in caips %} 3 | {% if str contains "http" %} 4 | {{str|strip}}{% if forloop.last == false %}, {% endif %} 5 | {% elsif str contains "CAIP" %} 6 | {{str|strip}}{% if forloop.last == false %}, {% endif %} 7 | {% else %} 8 | {{str|strip}}{% if forloop.last == false %}, {% endif %} 9 | {% endif %} 10 | {% endfor %} -------------------------------------------------------------------------------- /404.html: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: /404.html 3 | layout: default 4 | --- 5 | 6 | 19 | 20 |
21 |

404

22 | 23 |

Page not found :(

24 |

The requested page could not be found.

25 |
26 | -------------------------------------------------------------------------------- /_includes/crosslinks.html: -------------------------------------------------------------------------------- 1 | {% assign links = include.links | split:"," %} 2 | {% for link in links %} 3 | {% if link contains "http" %} 4 | {{- link | strip -}}{% if forloop.last == false %}, {% endif %} 5 | {% elsif link contains "CAIP" %} 6 | {{- link | strip -}}{% if forloop.last == false %}, {% endif %} 7 | {% else %} 8 | {{link | strip}}{% if forloop.last == false %}, {% endif %} 9 | {% endif %} 10 | {% endfor %} -------------------------------------------------------------------------------- /_includes/authorlist.html: -------------------------------------------------------------------------------- 1 | {%- assign authors=include.authors|split:"," -%} 2 | {%- for author in authors -%} 3 | {%- if author contains "<" -%} 4 | {%- assign authorparts=author|split:"<" -%} 5 | "}}">{{authorparts[0]|strip}} 6 | {%- elsif author contains "(@" -%} 7 | {%- assign authorparts=author|split:"(@" -%} 8 | {{authorparts[0]|strip}} 9 | {%- else -%} 10 | {{author}} 11 | {%- endif -%} 12 | {% if forloop.last == false %}, {% endif %} 13 | {%- endfor -%} -------------------------------------------------------------------------------- /fil/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: fil 3 | title: Filecoin Ecosystem 4 | author: Sergey Ukustov (@ukstv) 5 | status: Draft 6 | type: Informational 7 | created: 2020-08-26 8 | updated: 2022-03-27 9 | replaces: CAIP-23 10 | --- 11 | 12 | # Namespace for FileCoin Networks 13 | 14 | This document is about the details of the Filecoin network namespace and reference. 15 | 16 | ## References 17 | 18 | - [Filecoin Specification](https://beta.spec.filecoin.io/appendix/address/) 19 | 20 | ## Rights 21 | 22 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). -------------------------------------------------------------------------------- /chia/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: chia 3 | title: Chia Ecosystem 4 | author: Jeff Cruikshank (@paninaro) 5 | status: Draft 6 | type: Informational 7 | created: 2023-05-24 8 | requires: ["CAIP-2"] 9 | --- 10 | 11 | # Namespace for Chia Blockchains 12 | 13 | This document defines the applicability of CAIP schemes to the blockchains of 14 | the Chia ecosystem. 15 | 16 | ## Syntax 17 | 18 | The namespace "chia" refers to the Chia open-source blockchain platform. 19 | 20 | ## References 21 | 22 | - [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md) 23 | 24 | ## Rights 25 | 26 | Copyright and related rights waived via CC0. 27 | -------------------------------------------------------------------------------- /_includes/caipnums.html: -------------------------------------------------------------------------------- 1 | {% assign caips=include.caips|split:"," %} 2 | {% for str in caips %} 3 | {% if str contains "http" %} 4 | {{- str | remove: "," | remove: "[" | remove: '"' | remove: "]" -}}{% if forloop.last == false %}, {% endif %} 5 | {% elsif str contains "CAIP" %} 6 | {{- str | remove: "," | remove: "[" | remove: '"' | remove: "]" -}}{% if forloop.last == false %}, {% endif %} 7 | {% else %} 8 | {{str|strip}}{% if forloop.last == false %}, {% endif %} 9 | {% endif %} 10 | {% endfor %} -------------------------------------------------------------------------------- /monero/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: monero 3 | title: Monero 4 | author: silverpill (@silverpill) 5 | status: Draft 6 | type: Informational 7 | created: 2023-04-27 8 | requires: ["CAIP-2"] 9 | --- 10 | 11 | # Namespace for Monero chains 12 | 13 | This document defines the applicability of CAIP schemes to the blockchains of the Monero ecosystem. 14 | 15 | ## Syntax 16 | 17 | The namespace "monero" refers to the Monero blockchain, its forks and testnets. 18 | 19 | ## References 20 | 21 | - [Community, End-user, and Developer Onboarding Website][communitysite] 22 | 23 | [communitysite]: https://www.getmonero.org/ 24 | 25 | ## Copyright 26 | 27 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 28 | -------------------------------------------------------------------------------- /waves/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: waves 3 | title: Waves Ecosystem 4 | author: Maxim Smolyakov (@msmolyakov), Yury Sidorov (@darksyd94) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/49 6 | status: Draft 7 | type: Informational 8 | created: 2023-01-19 9 | requires: ["CAIP-2", "CAIP-10", "CAIP-19"] 10 | --- 11 | 12 | # Namespace for Waves Blockchains 13 | 14 | This document defines the applicability of CAIP schemes to the blockchains of 15 | the Waves ecosystem. 16 | 17 | ## References 18 | 19 | - [Official website](https://waves.tech) 20 | - [Waves Documentation](https://docs.waves.tech) 21 | - [Waves Developer Portal](https://dev.waves.tech) 22 | 23 | ## Copyright 24 | 25 | Copyright and related rights waived via CC0. 26 | -------------------------------------------------------------------------------- /avalanche/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: avax 3 | title: Avalanche Ecosystem 4 | author: Gergely Lovas (@gergelylovas) 5 | status: Draft 6 | type: Informational 7 | created: 2024-07-16 8 | replaces: CAIP-28 9 | --- 10 | 11 | # Namespace for Avalanche chains 12 | 13 | This document defines the applicability of CAIP schemes to the blockchains of 14 | the Avalanche Ecosystem. 15 | 16 | ## Syntax 17 | 18 | The namespace `avax` refers to the Avalanche Ecosystem, including private 19 | Avalanche L1s. 20 | 21 | ## References 22 | 23 | [Official website]: https://www.avax.network/ 24 | [Avalanche documentation]: https://docs.avax.network/ 25 | 26 | ## Copyright 27 | 28 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). -------------------------------------------------------------------------------- /koinos/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: koinos 3 | title: Koinos Namespace 4 | author: Roamin (@roaminro) 5 | status: Draft 6 | type: Informational 7 | created: 2023-04-10 8 | requires: ["CAIP-2"] 9 | --- 10 | 11 | # Namespace for Koinos Blockchains 12 | 13 | This document defines the applicability of CAIP schemes to the blockchains of 14 | the Koinos ecosystem. 15 | 16 | ## Syntax 17 | 18 | The namespace "koinos" refers to the Koinos open-source blockchain framework. 19 | 20 | ## References 21 | 22 | - [Koinos documentation](https://docs.koinos.io/) 23 | - [Koinos Blockchain Framework ecosystem](https://github.com/koinos) 24 | - [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md) 25 | 26 | ## Rights 27 | 28 | Copyright and related rights waived via CC0. 29 | -------------------------------------------------------------------------------- /arweave/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: arweave 3 | title: Arweave Namespace 4 | author: Rohit Pathare (@ropats16), Phil Billingsby (@pbillingsby) 5 | status: Draft 6 | type: Informational 7 | created: 2022-08-27 8 | requires: ["CAIP-2", "CAIP-10", "CAIP-122"] 9 | --- 10 | 11 | # Namespace for Arweave chains 12 | 13 | This document describes the details of the Arweave network namespace and reference. 14 | 15 | ## References 16 | 17 | - [Arweave](https://github.com/ArweaveTeam/arweave-standards) 18 | - [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md) 19 | - [CAIP-10](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md) 20 | - [CAIP-122](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-122.md) 21 | 22 | ## Rights 23 | 24 | Copyright and related rights waived via CC0. 25 | -------------------------------------------------------------------------------- /antelope/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: antelope 3 | title: Antelope (formerly known as EOSIO) Namespace 4 | author: Aaron Caswell (@porkchop) 5 | status: Draft 6 | type: Informational 7 | created: 2023-09-19 8 | --- 9 | 10 | # Namespace for Antelope Blockchains 11 | 12 | This document defines the applicability of CAIP schemes to the blockchains of 13 | the Antelope ecosystem, which include EOS, Telos, WAX and more. 14 | 15 | ## Syntax 16 | 17 | The namespace "antelope" refers to the Antelope open-source blockchain platform. 18 | 19 | ## References 20 | 21 | - [Antelope documentation](https://docs.eosnetwork.com/) 22 | - [Antelope Blockchain Platform ecosystem](https://github.com/antelopeIO) 23 | - [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md) 24 | 25 | ## Rights 26 | 27 | Copyright and related rights waived via CC0. 28 | -------------------------------------------------------------------------------- /conflux/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: conflux 3 | title: Conflux Network 4 | author: iosh (@iosh) 5 | status: Draft 6 | type: Informational 7 | created: 2024-08-09 8 | --- 9 | 10 | # Namespace for Conflux Network blockchains 11 | 12 | This document defines the applicability of CAIP schemes to the blockchain of the Conflux network (core space) ecosystem. 13 | 14 | ## Syntax 15 | 16 | The namespace "conflux" refers to the Conflux Network(core space), its forks, devnets and testnets. 17 | 18 | ## References 19 | 20 | [Conflux network website]: https://confluxnetwork.org/ 21 | [Conflux Docs site]: https://doc.confluxnetwork.org/docs/core/core-space-basics/addresses 22 | [Addresses]: https://doc.confluxnetwork.org/docs/core/core-space-basics/addresses 23 | 24 | ## Copyright 25 | 26 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 27 | -------------------------------------------------------------------------------- /aleo/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: aleo 3 | title: Aleo Network 4 | author: Jonathan Gonzalez (@jonandgon, jonathan@puzzle.online) 5 | discussions-to: 6 | status: Draft 7 | type: Standard 8 | created: 2023-09-12 9 | requires: ["CAIP-2", "CAIP-10"] 10 | --- 11 | 12 | # Namespace for Aleo Network Blockchains 13 | 14 | This document defines the applicability of CAIP schemes to the networks of the Aleo Network blockchain ecosystem. 15 | 16 | # Syntax 17 | 18 | The `aleo` namespace profiles CAIP scheme and behaviors for referring to networks and other objects within the Aleo Network blockchain ecosystem. 19 | 20 | # References 21 | 22 | - [Aleo Network Documentation][]: Developer docs for the Aleo Network. 23 | 24 | [Aleo Network Documentation]: https://developer.aleo.org 25 | 26 | ## Copyright 27 | 28 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 29 | -------------------------------------------------------------------------------- /vechain/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: vechain 3 | title: Vechain Based Networks 4 | author: Darren Kelly (@darrenvechain) 5 | status: Draft 6 | type: Informational 7 | created: 2023-07-10 8 | updated: 2023-07-10 9 | requires: ["CAIP-2", "CAIP-10"] 10 | --- 11 | 12 | # Namespace for VechainThor chains 13 | 14 | This document defines the applicability of CAIP schemes to the blockchains of 15 | the VeChain ecosystem. 16 | 17 | ## Syntax 18 | 19 | The namespace "vechain" refers to the VechainThor open-source blockchain platform. 20 | 21 | ## References 22 | 23 | - [VeChain Developer Portal](https://docs.vechain.org/) 24 | - [VeChain Developer Portal Self-Test Resources](https://docs.vechain.org/development-resources) 25 | - [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md) 26 | 27 | ## Copyright 28 | 29 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 30 | -------------------------------------------------------------------------------- /stacks/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: stacks 3 | title: Stacks Namespace 4 | author: Léo Pradel @pradel, Greg Ogunyanwo @gregogun 5 | status: Draft 6 | type: Informational 7 | created: 2022-06-07 8 | --- 9 | 10 | # Namespace for Stacks chains 11 | 12 | This document defines the applicability of CAIP schemes to the blockchains of 13 | the Stacks ecosystem. 14 | 15 | ## References 16 | 17 | - [SIP-005][] 18 | - [Stacks developer documentation][] 19 | - [CAIP-2][] 20 | - [CAIP-10][] 21 | 22 | [SIP-005]: https://github.com/stacksgov/sips/blob/main/sips/sip-005/sip-005-blocks-and-transactions.md 23 | [Stacks developer documentation]: https://docs.stacks.co/ 24 | [CAIP-2]: https://github.com/chainagnostic/caips/blob/master/caips/caip-2.md 25 | [CAIP-10]: https://github.com/chainagnostic/caips/blob/master/caips/caip-10.md 26 | 27 | ## Copyright 28 | 29 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 30 | -------------------------------------------------------------------------------- /algorand/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: algorand 3 | title: Algorand Namespace 4 | author: Jason Paulos (@jasonpaulos) 5 | status: Draft 6 | type: Informational 7 | created: 2023-01-11 8 | requires: ["CAIP-2"] 9 | --- 10 | 11 | # Namespace for Algorand Blockchains 12 | 13 | This document defines the applicability of CAIP schemes to the blockchains of 14 | the Algorand ecosystem. 15 | 16 | ## Syntax 17 | 18 | The namespace "algorand" refers to the Algorand open-source blockchain platform. 19 | 20 | ## References 21 | 22 | - [Algorand Specifications](https://github.com/algorandfoundation/specs) 23 | - [Algorand Developer Portal](https://developer.algorand.org) 24 | - [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md) 25 | - [CAIP-10](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md) 26 | - [CAIP-122](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-122.md) 27 | 28 | ## Rights 29 | 30 | Copyright and related rights waived via CC0. 31 | -------------------------------------------------------------------------------- /mina/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: mina 3 | title: Mina Namespace 4 | author: Mina Foundation 5 | status: Draft 6 | type: Informational 7 | created: 2023-09-15 8 | requires: ["CAIP-2"] 9 | --- 10 | 11 | # Namespace for Mina chains 12 | 13 | This document defines the applicability of CAIP schemes to the blockchains of 14 | the Mina ecosystem. 15 | 16 | ## Syntax 17 | 18 | The namespace "mina" refers to the Mina blockchain, its forks, devnets and testnets. 19 | 20 | ## References 21 | 22 | - [Mina Protocol Website][] 23 | - [Mina Protocol Developer Documentation][] 24 | - [Mina Rosetta Implementation][] 25 | 26 | [CAIP-2]: https://ChainAgnostic.org/CAIPs/caip-2 27 | [Mina Protocol Website]: https://minaprotocol.com/ 28 | [Mina Protocol Developer Documentation]: https://docs.minaprotocol.com/ 29 | [Mina Rosetta Implementation]: https://docs.minaprotocol.com/node-operators/rosetta 30 | 31 | ## Copyright 32 | 33 | Copyright and related rights waived 34 | via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). -------------------------------------------------------------------------------- /partisia/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: partisia 3 | title: Partisia Blockchain 4 | author: Partisia Blockchain Foundation 5 | status: Draft 6 | type: Informational 7 | created: 2024-10-22 8 | requires: CAIP-2 9 | --- 10 | 11 | # Namespace for Partisia Blockchains 12 | 13 | This document defines the applicability of CAIP schemes to the networks of the Partisia blockchain 14 | ecosystem. 15 | 16 | # Syntax 17 | 18 | The `partisia` namespace refers to networks and other objects within the Partisia blockchain 19 | ecosystem. 20 | 21 | ## References 22 | 23 | - [Partisia Blockchain Developer Documentation][] - Developer documentation for Partisia Blockchain 24 | - [Partisia Blockchain CAIP-2][] - Partisia Blockchain network identifiers 25 | 26 | [Partisia Blockchain Developer Documentation]: https://partisiablockchain.gitlab.io/documentation/index.html 27 | [Partisia Blockchain CAIP-2]: caip2 28 | 29 | ## Copyright 30 | 31 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 32 | -------------------------------------------------------------------------------- /xrpl/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: xrpl 3 | title: XRP Ledger Namespace 4 | author: Anton Dalgren (@antondalgren) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/57/ 6 | status: Draft 7 | type: Informational 8 | created: 2023-02-23 9 | updated: 2023-08-12 10 | requires: ["CAIP-2", "CAIP-10", "CAIP-122"] 11 | --- 12 | 13 | # Namespace for XRP Ledger 14 | 15 | This document defines the applicability of CAIP schemes to the blockchains of 16 | the XRP Ledger ecosystem. 17 | 18 | ## Syntax 19 | 20 | The namespace `xrpl` refers to the XRP Ledger ecosystem, including private 21 | networks. 22 | 23 | ## References 24 | 25 | - [XRP Ledger documentation](https://xrpl.org/docs.html) 26 | - [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md) 27 | - [CAIP-10](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md) 28 | - [CAIP-122](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-122.md) 29 | 30 | ## Rights 31 | 32 | Copyright and related rights waived via CC0. 33 | -------------------------------------------------------------------------------- /ergo/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: ergo 3 | title: Ergo Ecosystem 4 | author: Yuriy Gagarin (@gagarin55) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/98 6 | status: Draft 7 | type: Informational 8 | created: 2023-11-02 9 | requires: ["CAIP-2", "CAIP-10", "CAIP-19"] 10 | --- 11 | 12 | # Namespace for Ergo Blockchains 13 | 14 | This document defines the applicability of CAIP schemes to the blockchains of 15 | the Ergo ecosystem. 16 | Ergo uses a variant of the UTXO addressing model that introduces an abstraction called a [box], which can be helpful to understand before attempting interoperability with either account-model or classic UTXO namespaces. 17 | 18 | ## Syntax 19 | 20 | The namespace "ergo" refers to the Ergo open-source blockchain platform. 21 | 22 | ## References 23 | 24 | - [Official website](https://ergoplatform.org/) 25 | - [Ergo Documentation](https://docs.ergoplatform.com/) 26 | 27 | [box]: https://docs.ergoplatform.com/dev/data-model/box/ 28 | 29 | ## Copyright 30 | 31 | Copyright and related rights waived via CC0. 32 | -------------------------------------------------------------------------------- /reef/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: reef 3 | title: Reef Namespace 4 | author: Boo 0x (@boo-0x) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/issues/74 6 | status: Draft 7 | type: Informational 8 | created: 2023-06-29 9 | --- 10 | 11 | # Namespace Reef chains 12 | 13 | ## Introduction 14 | 15 | Reef is a modular layer 1 blockchain for DeFi, NFTs and gaming. It is built with Substrate modules, has EVM support and uses Nominated Proof of Stake consensus. 16 | Despite some tooling in common (such as [SS58][]-based per-chain addresses), direct interaction with Polkadot nodes, contracts, or wallets according to the standards of the Polkadot namespace is not currently possible. 17 | 18 | ## Syntax 19 | 20 | The namespace "reef" refers to the Reef open-source blockchain platform. 21 | 22 | ## References 23 | 24 | - [Reef Chain](https://reef.io/) 25 | - [Docs](https://docs.reef.io/) 26 | - [GitHub](https://github.com/reef-chain) 27 | 28 | ## Copyright 29 | 30 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 31 | -------------------------------------------------------------------------------- /casper/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: casper 3 | title: Casper network 4 | author: <["David Hernando ", "Adrian Wrona "]> 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/100 6 | status: Draft 7 | type: Informational 8 | created: 2024-01-12 9 | requires: ["CAIP-2", "CAIP-10"] 10 | --- 11 | 12 | # Namespace for Casper chains 13 | 14 | This document defines the applicability of CAIP schemes to the blockchain of the Casper network ecosystem. 15 | 16 | ## Syntax 17 | 18 | The namespace `casper` refers to the Casper network blockchain, its forks and testnets. 19 | 20 | ## References 21 | 22 | [Casper network website]: https://casper.network/en-us/ 23 | [Casper Docs site]: https://docs.casper.network/ 24 | [Accounts and Keys]: https://docs.casper.network/concepts/accounts-and-keys 25 | [Deploys and the Deploy lifecycle]: https://docs.casper.network/deploy-and-deploy-lifecycle/ 26 | 27 | ## Copyright 28 | 29 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 30 | -------------------------------------------------------------------------------- /solana/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: solana 3 | title: Solana Ecosystem 4 | author: Antoine Herzog (@antoineherzog), Josh Hundley (@oJshua) 5 | discussions-to: https://github.com/ChainAgnostic/CAIPs/pull/60 6 | status: Draft 7 | type: Informational 8 | created: 2021-08-03 9 | updated: 2023-03-27 10 | replaces: CAIP-28 11 | --- 12 | 13 | # Namespace for Solana chains 14 | 15 | ## Introduction 16 | 17 | Blockchains in the "solana" namespace are validated by their genesis hash; each 18 | blockchain is maintained by a "[Cluster][]" of nodes, with its own gossip 19 | entrypoint and other endpoints. 20 | 21 | ## Syntax 22 | 23 | The namespace "solana" refers to the Solana open-source blockchain platform. 24 | 25 | ## References 26 | 27 | [Address Lookup Table Proposal]: https://docs.solana.com/proposals/transactions-v2 28 | [Account Types]: https://docs.solana.com/terminology#account 29 | [Address Expressions]: https://docs.solana.com/cli/transfer-tokens#receive-tokens 30 | 31 | ## Copyright 32 | 33 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). -------------------------------------------------------------------------------- /ccd/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: ccd 3 | title: Concordium 4 | author: "Concordium development team " 5 | status: Draft 6 | type: Informational 7 | created: 2023-04-01 8 | requires: ["CAIP-2"] 9 | --- 10 | 11 | # Namespace for Concordium Blockchains 12 | 13 | This document defines the applicability of CAIP schemes to the networks of the Concordium blockchain ecosystem. 14 | 15 | # Syntax 16 | 17 | The `ccd` namespace refers to networks and other objects within the Concordium blockchain ecosystem. 18 | 19 | ## References 20 | 21 | - [Concordium Developer Documentation][] 22 | - [Concordium gRPC][] - Interacting with a Concordium node: Description of the Concordium gRPC API. 23 | - [Concordium CAIP-2][] - Concordium network identifiers. 24 | 25 | [Concordium Developer Documentation]: https://developer.concordium.software/en/mainnet/index.html 26 | [Concordium gRPC]: http://developer.concordium.software/concordium-grpc-api/ 27 | [Concordium CAIP-2]: caip2 28 | 29 | ## Copyright 30 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 31 | -------------------------------------------------------------------------------- /starknet/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: starknet 3 | title: StarkNet Ecosystem 4 | author: Argent Labs 5 | discussions-to: 6 | status: Draft 7 | type: Informational 8 | created: 2022-12-04 9 | updated: 2022-12-04 10 | replaces: CAIP-28 11 | --- 12 | 13 | # Namespace for StarkNet 14 | 15 | ## Introduction 16 | 17 | This document describes the syntax and structure of the namespace for StarkNet. 18 | 19 | ## Syntax 20 | 21 | The namespace "starknet" refers to the StarkNet Layer 2 chain on Ethereum. 22 | 23 | [Cairo field elements][] are one of the more novel aspects of Cairo's [Type system][], although future interfaces may not require any special knowledge or handling of field elements. ([More on field elements][].) 24 | 25 | ## References 26 | 27 | [Type system]: https://starknet.io/docs/reference/syntax.html#type-system 28 | [Cairo field elements]: https://starknet.io/docs/how_cairo_works/cairo_intro.html#field-elements 29 | [More on field elements]: https://medium.com/nethermind-eth/field-elements-all-the-way-down-59f02387d1d6 30 | 31 | ## Copyright 32 | 33 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). -------------------------------------------------------------------------------- /swift/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: swift-caip2 3 | title: SWIFT Network - Network Identifiers 4 | author: Bumblefudge (@bumblefudge), Daniel Rocha (@danroc) 5 | status: Draft 6 | type: Informational 7 | created: 2025-01-22 8 | updated: 2025-01-22 9 | --- 10 | 11 | # CAIP-2 12 | 13 | *For context, see the [CAIP-2][] specification.* 14 | 15 | ## Rationale 16 | 17 | The topology of SWIFT's current and next-generation messaging networks is not sufficiently known by the authors to specify the current system of gateways. 18 | This profile is a stub awaiting prototyping efforts. 19 | 20 | ## Syntax 21 | 22 | TBD 23 | 24 | ### Special Case: Off-network Modeling 25 | 26 | To borrow SWIFT data models and accounting conventions without sending or receiving SWIFT messages, simply use network identifier `0`. 27 | As in other namespaces, it is used here to refer to "out of band"/"off-network" usage. 28 | 29 | ## References 30 | 31 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 32 | [CAIP-19]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md 33 | 34 | ## Rights 35 | 36 | Copyright and related rights waived via CC0. 37 | -------------------------------------------------------------------------------- /tvm/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: TVM 3 | title: TVM Ecosystem 4 | author: Lev Antropov(@levantropov), Vitaly Gritsay(@vvismaster) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/52/ 6 | status: Draft 7 | type: Informational 8 | created: 2023-03-22 9 | updated: 2023-03-22 10 | --- 11 | 12 | This document describes the syntax and structure of the TVM namespace for chains 13 | using the TON Virtual Machine. Currently, TVM is used by such networks as: 14 | Everscale, TON, Venom, Gosh. 15 | 16 | # Namespace for TVM chains 17 | 18 | Networks using TVM do not have a single, commonly accepted standard for 19 | identifying chains, so chains will be named according to their generally 20 | accepted names. The naming principle is described in CAIP-2. 21 | 22 | ## References 23 | 24 | * [Everscale Blockchain](https://docs.everscale.network/) 25 | * [Everscale Standards](https://docs.everscale.network/standard) 26 | * [TON Blockchain](https://ton.org/docs) 27 | * [Venom Blockchain](https://venom.foundation/) 28 | * [Gosh Blockchain](https://gosh.sh/) 29 | 30 | ## Copyright 31 | 32 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 33 | -------------------------------------------------------------------------------- /stellar/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: stellar 3 | title: Stellar Ecosystem 4 | author: Gleb Pitsevich (@pitsevich) 5 | status: Draft 6 | type: Informational 7 | created: 2021-02-17 8 | updated: 2022-03-27 9 | replaces: CAIP-28 10 | --- 11 | 12 | # Namespace for Stellar Chains 13 | 14 | The namespace `stellar` refers to the wider Stellar ecosystem, including private 15 | networks. 16 | 17 | ## References 18 | 19 | - [Stellar Specification](https://developers.stellar.org/docs) - 20 | - [Stellar Asset Types](https://developers.stellar.org/docs/issuing-assets/) - 21 | Context on asset-types in Stellar 22 | - [Stellar Network Passphrase](https://developers.stellar.org/docs/glossary/network-passphrase/) 23 | 24 | [Stellar Specification]: https://developers.stellar.org/docs 25 | [Stellar Asset Types]: https://developers.stellar.org/docs/issuing-assets/ 26 | [Stellar Network Passphrase]: https://developers.stellar.org/docs/glossary/network-passphrase/ 27 | 28 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 29 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 30 | 31 | ## Copyright 32 | 33 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). -------------------------------------------------------------------------------- /mvx/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: mvx 3 | title: MultiversX Namespace 4 | author: MultiversX Team 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/issues/89 6 | status: Draft 7 | type: Informational 8 | created: 2023-09-11 9 | --- 10 | 11 | # Namespace for MultiversX Blockchains 12 | 13 | This document defines the applicability of CAIP schemes to the networks of the MultiversX blockchain ecosystem. 14 | 15 | ## Syntax 16 | 17 | The namespace `mvx` refers to the MultiversX open-source blockchain platform. 18 | 19 | ## References 20 | 21 | 22 | - [MultiversX Documentation][MultiversX Docs] 23 | - [MultiversX Specifications][] 24 | - [MultiversX governance][] 25 | - [Integrators Guide][] 26 | 27 | [MultiversX governance]: https://agora.multiversx.com/c/governance/9 28 | [MultiversX Docs]: https://docs.multiversx.com/ 29 | [MultiversX Specifications]: https://github.com/multiversx/mx-specs 30 | [MultiversX Constants]: https://docs.multiversx.com/developers/constants 31 | [MultiversX REST API]: https://docs.multiversx.com/sdk-and-tools/rest-api 32 | [Integrators Guide]: https://docs.multiversx.com/integrators/overview 33 | [BIP_0173]: https://en.bitcoin.it/wiki/BIP_0173 34 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 35 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 36 | 37 | ## Rights 38 | 39 | Copyright and related rights waived via CC0. 40 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | # Hello! This is where you manage which Jekyll version is used to run. 3 | # When you want to use a different version, change it below, save the 4 | # file and run `bundle install`. Run Jekyll with `bundle exec`, like so: 5 | # 6 | # bundle exec jekyll serve 7 | # 8 | # This will help ensure the proper Jekyll version is running. 9 | # Happy Jekylling! 10 | gem "jekyll", "~> 4.2.2" 11 | # This is the default theme for new Jekyll sites. You may change this to anything you like. 12 | gem "minima", "~> 2.5" 13 | # If you want to use GitHub Pages, remove the "gem "jekyll"" above and 14 | # uncomment the line below. To upgrade, run `bundle update github-pages`. 15 | # gem "github-pages", group: :jekyll_plugins 16 | # If you have any plugins, put them here! 17 | group :jekyll_plugins do 18 | gem "jekyll-feed", "~> 0.12" 19 | end 20 | 21 | # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem 22 | # and associated library. 23 | platforms :mingw, :x64_mingw, :mswin, :jruby do 24 | gem "tzinfo", "~> 1.2" 25 | gem "tzinfo-data" 26 | end 27 | 28 | # Performance-booster for watching directories on Windows 29 | gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] 30 | 31 | # Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem 32 | # do not have a Java counterpart. 33 | gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] 34 | 35 | # Webrick required for local-serving preview 36 | gem "webrick", "~> 1.8" -------------------------------------------------------------------------------- /arweave/caip10.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: arweave-caip10 3 | title: Arweave Namespace - Addresses 4 | author: Rohit Pathare (@ropats16), Phil Billingsby (@pbillingsby), Dan MacDonald (@DanMacDonald) 5 | discussions-to: 6 | status: Draft 7 | type: Standard 8 | created: 2022-09-01 9 | requires: ["CAIP-2", "CAIP-10"] 10 | --- 11 | 12 | # CAIP-10 13 | 14 | *For context, see the [CAIP-10][] specification.* 15 | 16 | ## Abstract 17 | In CAIP-10 an account identification scheme is defined. This is the implementation of CAIP-10 for Arweave network. 18 | 19 | ## Rationale 20 | 21 | Particularities of syntax for Arweave "accounts" have been specified. 22 | 23 | ## Syntax 24 | 25 | Arweave addresses have a normalization of lowercase letters, uppercase letters, numbers and `-`s. The addresses are encoded in base64Url format. 26 | 27 | ### Backwards Compatibility 28 | 29 | Not applicable. 30 | 31 | ## Test Cases 32 | 33 | ``` 34 | # Arweave mainnet 35 | arweave:7wIU:kY9RAgTJEImkBpiKgVeXrsGV02T-D4dI3ZvSpnn7HSk 36 | ``` 37 | 38 | ## References 39 | 40 | - [Arweave](https://github.com/ArweaveTeam/arweave-standards) 41 | - [Hash of Genesis Block](https://viewblock.io/arweave/block/0) 42 | - [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md) 43 | - [CAIP-10](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md) 44 | - [CAIP-122](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-122.md) 45 | 46 | 47 | 48 | ## Rights 49 | 50 | Copyright and related rights waived via CC0. -------------------------------------------------------------------------------- /wallet/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: wallet 3 | title: Wallet Namespace 4 | author: Vandan Parikh (@vandan), Bumblefudge (@bumblefudge) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/119 6 | status: Draft 7 | type: Informational 8 | created: 2024-07-16 9 | --- 10 | 11 | ## Rationale 12 | 13 | The handling of direct communications channels between cryptographic user-agents (i.e., wallets) and applications vary widely across cryptographic systems. 14 | Rather than being a true namespace defined outside of CASA, this "meta-namespace" informationally groups together the wallet sub-namespaces of other namespaces specified at CASA. 15 | This "meta-namespace" is intended to facilitate an explicit segregation of connection mechanics, methods, and notifications for these channels from the very different mechanics, methods, and notifications used for application <> node purposes in each namespace. 16 | 17 | ## Governance 18 | 19 | This namespace is purely formal and governed in CASA, and as such should only be used as a kind of "alias" or "passthrough" to each other namespace's application<>wallet mechanisms, governed accordingly in each namespace's native governance. 20 | Contributors are discouraged from making any claims or specifying any behaviors not already specified in the referenced namespaces; 21 | furthermore, contributers are encouraged to provide normative references when adding to the profiles for a given CAIP. 22 | 23 | ## Copyright 24 | 25 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 26 | -------------------------------------------------------------------------------- /swift/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: swift 3 | title: SWIFT Network 4 | author: Bumblefudge (@bumblefudge), Daniel Rocha (@danroc) 5 | status: Draft 6 | type: Informational 7 | created: 2025-01-22 8 | updated: 2025-01-22 9 | --- 10 | 11 | # Namespace for SWIFT Networks chains 12 | 13 | This document describes the syntax and structure of the [SWIFT][] namespace, which encompasses many legacy and novel standards for international asset transfers and transactions. 14 | 15 | ## Introduction 16 | 17 | SWIFT names a consortium of 11,000 financial institutions worldwide that use a number of digital networks to compliantly transfer assets internationally. 18 | The organization's purview covers many messaging and reporting systems, as well as multiple data models for assets. 19 | 20 | ## References 21 | 22 | - [Swift.com][]: Overview of the organization and its various operations 23 | - [ISO 4217:2015][]: Identifier scheme for national and extranational fiat currencies 24 | - [ISO 4217 Registry][]: Current list of current and historical 4217 currency codes 25 | - [ISO 20022-1:2013][]: Next-gen standard consolidating prior SWIFT messaging formats and data models into an overarching methodology encompassing more use-cases and reporting regimes 26 | 27 | [Swift.com]: https://www.swift.com/about-us/discover-swift/messaging-and-standards 28 | [ISO 4217:2015]: https://www.iso.org/standard/64758.html 29 | [ISO 4217 Registry]: https://www.iso.org/iso-4217-currency-codes.html 30 | [ISO 20022-1:2013]: https://www.iso20022.org/ 31 | 32 | ## Rights 33 | 34 | Copyright and related rights waived via CC0. 35 | -------------------------------------------------------------------------------- /alephium/caip19.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: alephium-caip19 3 | title: Alephium Namespace - Assets 4 | author: Hongchao Liu (@h0ngcha0) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/117 6 | status: Draft 7 | type: Standard 8 | created: 2024-06-20 9 | updated: 2024-06-20 10 | requires: ["CAIP-2", "CAIP-19"] 11 | --- 12 | 13 | ## Rationale 14 | 15 | Tokens are first class citizens on Alephium. Just like the native 16 | token `ALPH`, all tokens on Alephium are managed by UTXOs, which is 17 | battle tested for secure asset management. 18 | 19 | New tokens are deployed through the deployment of new contracts, with 20 | token's id matching the id of the issuing contract. The process of 21 | token issuance is the same for both fungible and non-fungible tokens. 22 | 23 | ## Specification of token id 24 | 25 | Token's id is the same as its issuing contract's id, which is a 32 26 | bytes blake2b hash encoded as a hex string. It is not specific to a 27 | network or a group. 28 | 29 | ## Syntax 30 | 31 | Alephium token id represented as 32 byte array encoded as hex string. 32 | 33 | ## Examples 34 | 35 | ``` 36 | alephium:universal:383bc735a4de6722af80546ec9eeb3cff508f2f68e97da19489ce69f3e703200 37 | ``` 38 | 39 | ## References 40 | 41 | - [Token](https://docs.alephium.org/dapps/concepts/tokens) 42 | - [Fungible token standard](https://docs.alephium.org/dapps/standards/fungible-tokens) 43 | - [Non-fungible token standard](https://docs.alephium.org/dapps/standards/non-fungible-tokens) 44 | 45 | ## Copyright 46 | 47 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 48 | -------------------------------------------------------------------------------- /alephium/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: alephium 3 | title: Alephium Ecosystem 4 | author: Hongchao Liu (@h0ngcha0) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/117 6 | status: Draft 7 | type: Informational 8 | created: 2024-06-19 9 | requires: ["CAIP-2", "CAIP-10", "CAIP-19"] 10 | --- 11 | 12 | # Namespace for Alephium Blockchains 13 | 14 | This document defines the applicability of CAIP schemes to the 15 | blockchains of the Alephium ecosystem. 16 | 17 | Alephium uses the stateful UTXO model where assets are managed by 18 | UTXOs while contract states are managed using account-based 19 | model. Alephium is also a sharded blockchain, its state is divided 20 | into groups, with separate chains responsible for processing 21 | transactions from one group to another. Alephium's mainnet currently 22 | has 4 groups and 16 blockchains, more groups and blockchains can be 23 | added to increase the throughput. 24 | 25 | Understanding these concepts is helpful for interoperability with 26 | other account-based or classic UTXO namespaces. 27 | 28 | ## Syntax 29 | 30 | The namespace `alephium` refers to the Alephium blockchain platform. 31 | 32 | ## References 33 | 34 | - [Official website](https://alephium.org/) 35 | - [Alephium Documentation](https://docs.alephium.org/) 36 | - [Stateful UTXO](https://medium.com/@alephium/an-introduction-to-the-stateful-utxo-model-8de3b0f76749) 37 | - [Blockflow](https://medium.com/@alephium/an-introduction-to-blockflow-alephiums-sharding-algorithm-bbbf318c3402) 38 | 39 | ## Copyright 40 | 41 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 42 | -------------------------------------------------------------------------------- /fil/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: fil-caip2 3 | title: Blockchain Reference for Filecoin Namespace - Chains 4 | author: Sergey Ukustov (@ukstv) 5 | discussions-to: https://github.com/ChainAgnostic/CAIPs/pull/23 6 | status: Draft 7 | type: Standard 8 | created: 2020-08-26 9 | updated: 2022-03-27 10 | requires: CAIP-2 11 | replaces: CAIP-23 12 | --- 13 | 14 | # CAIP-2 15 | 16 | This document is about the details of the Filecoin network namespace and reference for CAIP-2. 17 | 18 | ## Abstract 19 | In CAIP-2 a general blockchain identification scheme is defined. This is the 20 | implementation of CAIP-2 for Filecoin network. 21 | 22 | ## Motivation 23 | See CAIP-2. 24 | 25 | ## Specification 26 | 27 | ### Filecoin Namespace 28 | 29 | The namespace "fil" refers to the wider Filecoin ecosystem. 30 | 31 | #### Reference Definition 32 | 33 | The reference relies on Filecoin's current designation of addresses belonging to 34 | test or main networks by prefixing them with `t` or `f` correspondingly. 35 | 36 | Reference could only be populated with `f` or `t` symbols. 37 | 38 | ## Rationale 39 | 40 | Blockchains in the "filecoin" namespace are [Filecoin](https://filecoin.io) 41 | blockchains, i.e. Filecoin mainnet, Filecoin testnet, and few devnets. 42 | 43 | ## Backwards Compatibility 44 | 45 | Not applicable 46 | 47 | ## Test Cases 48 | 49 | This is a list of manually composed examples 50 | 51 | ``` 52 | # Testnet and Devnets 53 | fil:t 54 | 55 | # Mainnet 56 | fil:f 57 | ``` 58 | 59 | ## References 60 | 61 | - [Filecoin Specification](https://beta.spec.filecoin.io/appendix/address/) 62 | 63 | ## Rights 64 | 65 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). -------------------------------------------------------------------------------- /arweave/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: arweave-caip2 3 | title: Arweave Namespace - Chains 4 | author: Rohit Pathare (@ropats16), Phil Billingsby (@pbillingsby), Dan MacDonald (@DanMacDonald) 5 | discussions-to: 6 | status: Draft 7 | type: Standard 8 | created: 2022-09-01 9 | requires: CAIP-2 10 | --- 11 | 12 | # CAIP-2 13 | 14 | *For context, see the [CAIP-2][] specification.* 15 | 16 | ## Abstract 17 | In CAIP-2 a general blockchain identification scheme is defined. This is the implementation of CAIP-2 for Arweave network. 18 | 19 | ### Arweave Namespace 20 | 21 | The namespace "arweave" refers to the wider Arweave ecosystem. 22 | 23 | #### Reference Definition 24 | 25 | The reference relies on Arweave's current designation of addresses belonging to main network by prefixing them with `7wIU` which is the representation of the [hash of the genesis block](https://viewblock.io/arweave/block/0) truncated to the first 4 characters. 26 | 27 | 28 | ## Rationale 29 | 30 | Arweave has one blockchain, the [Blockweave](https://www.arweave.org/technology#blockweaves). 31 | 32 | ## Backwards Compatibility 33 | 34 | Not applicable. 35 | 36 | ## Test Cases 37 | 38 | This is a manually composed example. 39 | 40 | ``` 41 | # Arweave Mainnet 42 | arweave:7wIU 43 | ``` 44 | 45 | ## References 46 | 47 | - [Arweave](https://github.com/ArweaveTeam/arweave-standards) 48 | - [Hash of Genesis Block](https://viewblock.io/arweave/block/0) 49 | - [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md) 50 | - [CAIP-10](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md) 51 | - [CAIP-122](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-122.md) 52 | 53 | 54 | 55 | ## Rights 56 | 57 | Copyright and related rights waived via CC0. -------------------------------------------------------------------------------- /tezos/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: tezos 3 | title: Tezos Namespace 4 | author: Stanly Johnson (@stanly-johnson), Carlo van Driesten (@jdsika) 5 | status: Draft 6 | type: Informational 7 | created: 2020-12-12 8 | updated: 2024-02-20 9 | replaces: CAIP-26 10 | --- 11 | 12 | This document defines the applicability of CAIP schemes to the blockchains of the Tezos ecosystem according to the *Namespace Reference Purpose and Guidelines* of [CAIP-104][]. 13 | 14 | ## Syntax 15 | 16 | The namespace `tezos` refers to the Tezos open-source blockchain protocol in general. The main implementation is called [Octez][]. The [Tezos test network infrastructure][] provides an overview of the different chains maintained by the community. 17 | 18 | ## References 19 | 20 | - [Tezos Website][] - Official project website. 21 | - [Octez][] - Main implementation for the Tezos standard. 22 | - [Octez Documentation][] - How to get started with Tezos. 23 | - [Tezos Foundation][] - Non-profit organization supporting Tezos ecosystem development. 24 | - [CAIP-2][] - Blockchain Chain ID Specification. 25 | - [tzstats.com Tezos Mainnet Genesis Block][] - A Tezos block explorer and the Tezos Mainnet Genesis Block. 26 | 27 | [CAIP-104]: https://chainagnostic.org/CAIPs/caip-104 28 | [Tezos Website]: https://tezos.com/ 29 | [Octez]: https://research-development.nomadic-labs.com/announcing-octez.html 30 | [Octez Documentation]: https://tezos.gitlab.io/ 31 | [Tezos Foundation]: https://tezos.foundation/ 32 | [Tezos test network infrastructure]: https://teztnets.com/ 33 | [CAIP-2]: https://chainagnostic.org/CAIPs/caip-2 34 | [tzstats.com Tezos Mainnet Genesis Block]: https://tzstats.com/0 35 | 36 | ## Rights 37 | 38 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 39 | -------------------------------------------------------------------------------- /solana/caip10.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: solana-caip10 3 | title: Solana Namespace - Addresses 4 | author: Haardik (@haardikk21) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/26 6 | status: Draft 7 | type: Standard 8 | created: 2022-06-08 9 | updated: 2022-06-08 10 | requires: ["CAIP-2", "CAIP-10"] 11 | --- 12 | 13 | # CAIP-10 14 | 15 | _For context, see the [CAIP-10][] specification._ 16 | 17 | ## Rationale 18 | 19 | Solana "addresses" are base-58 encoded 256-bit Ed25519 public keys with length varying from 32 to 44 characters. 20 | 21 | ## Syntax 22 | 23 | The syntax of a Solana address matches the following regular expression: 24 | 25 | `[1-9A-HJ-NP-Za-km-z]{32,44}` 26 | 27 | ## Chain IDs 28 | 29 | _For context, see the [CAIP-2][] specification._ 30 | 31 | | Network Name | Chain ID | 32 | | ------------ | -------------------------------- | 33 | | Mainnet | 5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp | 34 | | Devnet | EtWTRABZaYq6iMfeYKouRu166VU2xqa1 | 35 | | Testnet | 4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z | 36 | 37 | ## Test Cases 38 | 39 | ``` 40 | # Solana Mainnet 41 | solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp:7S3P4HxJpyyigGzodYwHtCxZyUQe9JiBMHyRWXArAaKv 42 | 43 | # Solana Devnet 44 | solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1:DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK 45 | 46 | # Solana Testnet 47 | solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z:6LmSRCiu3z6NCSpF19oz1pHXkYkN4jWbj9K1nVELpDkT 48 | ``` 49 | 50 | ## References 51 | 52 | [Validating Account Addresses](https://docs.solana.com/integrations/exchange#validating-user-supplied-account-addresses-for-withdrawals) 53 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 54 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 55 | 56 | ## Rights 57 | 58 | Copyright and related rights waived via CC0. 59 | -------------------------------------------------------------------------------- /vechain/caip10.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: vechain-caip10 3 | title: Vechain Namespace - Addresses 4 | author: Darren Kelly (@darrenvechain) 5 | status: Draft 6 | type: Standard 7 | created: 2023-07-17 8 | updated: 2023-07-17 9 | requires: ["CAIP-2", "CAIP-10"] 10 | --- 11 | 12 | # CAIP-10 13 | 14 | *For context, see the [CAIP-10][] specification.* 15 | 16 | ## Rationale 17 | 18 | VechainThor uses Secp256k1 for transaction signing. The account addresses are derived by taking the Keccak-256 hash of the public key and representing it as a hexadecimal number. The last 20 bytes of the Keccak-256 hash are used to generate the address. 19 | 20 | VechainThor addresses are hex-encoded strings with a length of 42 characters, prefixed with `0x`. 21 | 22 | Private keys used for other EVM compatible chains will produce the same account address. 23 | 24 | ## Syntax 25 | 26 | Vechain addresses match the following regular expression: 27 | 28 | ``` 29 | 0x[a-fA-F0-9]{40} 30 | ``` 31 | 32 | 33 | ## Test Cases 34 | 35 | Account address: 36 | 37 | ``` 38 | # Vechain Thor MainNet 39 | vechain:b1ac3413d346d43539627e6be7ec1b4a:0xf077b491b355E64048cE21E3A6Fc4751eEeA77fa 40 | 41 | # Vechain Thor TestNet 42 | vechain:87721b09ed2e15997f466536b20bb127:0xf077b491b355E64048cE21E3A6Fc4751eEeA77fa 43 | ``` 44 | 45 | Contract address: 46 | ``` 47 | # Vechain Thor MainNet 48 | vechain:b1ac3413d346d43539627e6be7ec1b4a:0x0000000000000000000000000000456E65726779 49 | 50 | # Vechain Thor TestNet 51 | vechain:87721b09ed2e15997f466536b20bb127:0x0000000000000000000000000000456E65726779 52 | ``` 53 | 54 | ## References 55 | 56 | - [VeChain Developer Portal](https://docs.vechain.org/) 57 | - [VeChain Developer Portal Self-Test Resources](https://docs.vechain.org/development-resources) 58 | 59 | ## Copyright 60 | 61 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 62 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # Welcome to Jekyll! 2 | # 3 | # This config file is meant for settings that affect your whole blog, values 4 | # which you are expected to set up once and rarely edit after that. If you find 5 | # yourself editing this file very often, consider using Jekyll's data files 6 | # feature for the data you need to update frequently. 7 | # 8 | # For technical reasons, this file is *NOT* reloaded automatically when you use 9 | # 'bundle exec jekyll serve'. If you change this file, please restart the server process. 10 | # 11 | # If you need help with YAML syntax, here are some quick references for you: 12 | # https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml 13 | # https://learnxinyminutes.com/docs/yaml/ 14 | # 15 | # Site settings 16 | # These are used to personalize your new site. If you look in the HTML files, 17 | # you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. 18 | # You can create any custom variable you would like, and they will be accessible 19 | # in the templates via {{ site.myvariable }}. 20 | 21 | title: Chain Agnostic Namespaces 22 | description: >- # this means to ignore newlines until "baseurl:" 23 | Chain Agnostic Namespaces profile CAIPs for a given blockchain environment, serving as a reference for cross-environment development. 24 | url: "https://namespaces.chainagnostic.org" # the base hostname & protocol for your site, e.g. http://example.com 25 | github_username: ChainAgnostic 26 | repository: ChainAgnostic/namespaces 27 | caips_linkbase: "https://chainagnostic.org/CAIPs/" 28 | 29 | header_pages: 30 | - index.html 31 | 32 | # Build settings 33 | theme: minima 34 | highlighter: rouge 35 | markdown: kramdown 36 | plugins: 37 | - jekyll-feed 38 | 39 | permalink: /:slug 40 | 41 | defaults: 42 | - scope: 43 | path: "" 44 | values: 45 | layout: "profile" 46 | 47 | exclude: 48 | - _template/* 49 | - assets/* 50 | -------------------------------------------------------------------------------- /ergo/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: ergo-caip2 3 | title: Ergo Blockchain ID Specification 4 | author: Yuriy Gagarin (@gagarin55) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/98 6 | status: Draft 7 | type: Standard 8 | created: 2023-11-02 9 | updated: 2023-11-09 10 | --- 11 | 12 | 13 | ## Abstract 14 | 15 | In CAIP-2 a general blockchain identification scheme is defined. 16 | This is the implementation of CAIP-2 for Ergo network. 17 | 18 | ## Specification 19 | 20 | Blockchains in the "ergo" namespace are identified by their chain ID. 21 | 22 | Chain ID is 32-character prefix from the hash of the genesis block of a given chain, in lowercase hex representation. 23 | 24 | 25 | ### Syntax 26 | 27 | The `chain_id` is a case-sensitive string in the form 28 | 29 | ``` 30 | chain_id: namespace + ":" + reference 31 | namespace: ergo 32 | reference: 32-character prefix from the hash of the genesis block 33 | ``` 34 | 35 | ### Resolution method 36 | 37 | One can resolve chain ID by request `info` method on Ergo node API (see [RPC Endpoints][]): 38 | ``` 39 | curl https://node.ergo.watch/info 40 | ``` 41 | 42 | JSON Response contains `genesisBlockId` field: 43 | ``` 44 | { 45 | ... 46 | "genesisBlockId" : "b0244dfc267baca974a4caee06120321562784303a8a688976ae56170e4d175b", 47 | ... 48 | } 49 | ``` 50 | So chain ID for Mainnet is `b0244dfc267baca974a4caee06120321`. 51 | 52 | 53 | ## Test Cases 54 | 55 | This is a list of manually composed examples 56 | 57 | ``` 58 | # Ergo mainnet 59 | ergo:b0244dfc267baca974a4caee06120321 60 | 61 | # Ergo testnet 62 | ergo:e7553c9a716bb3983ac8b0c21689a1f3 63 | 64 | ``` 65 | 66 | ## References 67 | - [Address][] - Address Encoding scheme on Ergo blockchain 68 | - [RPC Endpoints][] - Ergo full node RPC API 69 | 70 | [Address]:https://docs.ergoplatform.com/assets/py/Ergo_Address_Encoding/ 71 | [RPC Endpoints]:https://docs.ergoplatform.com/node/swagger/ 72 | 73 | 74 | ## Copyright 75 | 76 | Copyright and related rights waived via [CC0](../LICENSE). -------------------------------------------------------------------------------- /bip122/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: bip122 3 | title: Bitcoin-based Networks (BIP122) 4 | author: Simon Warta (@webmaster128), ligi , Pedro Gomes (@pedrouid) 5 | status: Draft 6 | type: Informational 7 | created: 2019-12-05 8 | updated: 2022-03-27 9 | replaces: CAIP-4 10 | --- 11 | 12 | # Namespace for BIP122 chains 13 | 14 | This document describes the syntax and structure of the [BIP122][] namespace, 15 | which formalized a URI scheme for references on Bitcoin-based networks that 16 | conform to the convention, abstracting out specifics of block explorer 17 | interfaces. 18 | 19 | ## Context 20 | 21 | [BIP122][] is a draft specification from the Bitcoin improvement process from 22 | 2015 which has achieved wide adoption. It defines a `blockchain://` URI scheme, 23 | although it has not, to date, been registered with IANA. Note: an IANA 24 | registration has been 25 | [proposed](https://www.iana.org/assignments/uri-schemes/prov/bitcoin) for 26 | `bitcoin://` URIs, based on the older, and less chain-agnostic [BIP21][]. 27 | 28 | ## References 29 | 30 | - [BIP13][]: Bitcoin Improvement Proposal specifying "Script Hash" addresses 31 | - [BIP21][]: Bitcoin Improvement Proposal specifying `bitcoin` URI scheme 32 | - [BIP122][]: Bitcoin Improvement Proposal specifying `blockchain` URI scheme 33 | 34 | [BIP13]: https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki 35 | [BIP21]: https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki 36 | [BIP122]: https://github.com/bitcoin/bips/blob/master/bip-0122.mediawiki 37 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 38 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 39 | [CAIP-19]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md 40 | [CAIP-21]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-21.md 41 | [CAIP-22]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-22.md 42 | 43 | ## Rights 44 | 45 | Copyright and related rights waived via CC0. 46 | -------------------------------------------------------------------------------- /eip155/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: eip155 3 | title: Ethereum Ecosystem (EIP155) 4 | author: Simon Warta (@webmaster128), ligi , Pedro Gomes (@pedrouid), Antoine Herzog (@antoineherzog), Joel Thorstensson (@oed) 5 | status: Draft 6 | type: Informational 7 | created: 2019-12-05 8 | updated: 2022-03-27 9 | replaces: ["CAIP-3", "CAIP-21", "CAIP-22"] 10 | --- 11 | 12 | # Namespace for EIP155 chains 13 | 14 | This document describes the syntax and structure of the [EIP155][] namespace, 15 | commonly referred to as the "EVM" namespace for chains using the Ethereum 16 | Virtual Machine. 17 | 18 | ## Introduction 19 | 20 | [EIP155][] is an Ethereum Improvement Process specifying addressing across 21 | Ethereum-based chains, generalized by [CAIP-2][]. Definition of valid 22 | `references` within that namespace and constraints are deferred to the 23 | [EIP155][] specification, which may be superseded by future EIPs. 24 | 25 | ## References 26 | 27 | - [EIP155][]: Ethereum Improvement Proposal specifying generation and validation of ChainIDs 28 | - [ethereum-lists/chains][]: An open registry for eip155 network operators to claim a 29 | unique chainID and self-publish RPC/node information for them. 30 | - [ERC20][]: Basic [aka Fungible] Token Standard 31 | - [ERC721][]: Non-Fungible Token Standard 32 | 33 | [Chainid.network]: https://github.com/ethereum-lists/chains 34 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 35 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 36 | [CAIP-19]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md 37 | [CAIP-21]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-21.md 38 | [CAIP-22]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-22.md 39 | [EIP155]: https://eips.ethereum.org/EIPS/eip-155 40 | [ERC20]: https://eips.ethereum.org/EIPS/eip-20 41 | [ERC721]: https://eips.ethereum.org/EIPS/eip-721 42 | 43 | 44 | ## Rights 45 | 46 | Copyright and related rights waived via CC0. 47 | -------------------------------------------------------------------------------- /stacks/caip10.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: stacks-caip10 3 | title: Stacks Namespace - Addresses 4 | author: Léo Pradel @pradel, Greg Ogunyanwo @gregogun 5 | discussions-to: https://forum.stacks.org/t/caip-2-and-caip-10-stacks-specification/13290 6 | status: Draft 7 | type: Standard 8 | created: 2022-06-07 9 | requires: ["CAIP-10", "CAIP-2"] 10 | --- 11 | 12 | # CAIP-10 13 | 14 | *For context, see the [CAIP-10][] specification.* 15 | 16 | ## Rationale 17 | 18 | Stacks aligns squarely with the "account" model rather than the "UXTO" model but 19 | uses the format "c32check" to address the "account" model. 20 | 21 | ## Syntax 22 | 23 | Address string concatenates 2 fields without whitespace or dividers: a 1-byte version prefix and a 20-byte hash of any one of the following: 24 | - A single secp256k1 public key (either compressed or uncompressed) 25 | - A Bitcoin p2sh multisig script 26 | - A Bitcoin p2wpkh-p2sh script 27 | - A Bitcoin p2wsh-p2sh script 28 | - A Bitcoin p2tr script 29 | 30 | Valid CAIP-10 `account_id`s in this namespace are represented as [c32check][]-encoded addresses. The addresses are always all-caps. 31 | 32 | A regular expression for validating the `account_id` can be defined as: 33 | ``` 34 | stacks:S[A-Z0-9]{30-40} 35 | ``` 36 | 37 | ## Test Cases 38 | 39 | ``` 40 | # Stacks mainnet, p2pkh input = a46ff88886c2ef9762d970b4d2c63678835bd39d 41 | stacks:1:SP2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKNRV9EJ7 42 | 43 | # Stacks testnet 44 | stacks:2147483648:ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM 45 | ``` 46 | 47 | ## References 48 | 49 | - [SIP-005][] 50 | - [c32check][] documentation 51 | - [c32check typescript implementation][] on github 52 | 53 | [SIP-005]: https://github.com/stacksgov/sips/blob/main/sips/sip-005/sip-005-blocks-and-transactions.md 54 | [c32check]: https://github.com/stacks-network/c32check#how-it-works 55 | [c32check typescript implementation]: https://github.com/stacks-network/c32check 56 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 57 | 58 | ## Copyright 59 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 60 | -------------------------------------------------------------------------------- /.github/workflows/pages.yml: -------------------------------------------------------------------------------- 1 | # This workflow uses actions that are not certified by GitHub. 2 | # They are provided by a third-party and are governed by 3 | # separate terms of service, privacy policy, and support 4 | # documentation. 5 | 6 | # Sample workflow for building and deploying a Jekyll site to GitHub Pages 7 | name: Deploy Jekyll site to Pages 8 | 9 | on: 10 | # Runs on pushes targeting the default branch 11 | push: 12 | branches: ["main"] 13 | 14 | # Allows you to run this workflow manually from the Actions tab 15 | workflow_dispatch: 16 | 17 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 18 | permissions: 19 | contents: read 20 | pages: write 21 | id-token: write 22 | 23 | # Allow one concurrent deployment 24 | concurrency: 25 | group: "pages" 26 | cancel-in-progress: true 27 | 28 | jobs: 29 | # Build job 30 | build: 31 | runs-on: ubuntu-latest 32 | steps: 33 | - name: Checkout 34 | uses: actions/checkout@v3 35 | - name: Setup Ruby 36 | uses: ruby/setup-ruby@v1 37 | with: 38 | ruby-version: '2.6' # Not needed with a .ruby-version file 39 | bundler-cache: true # runs 'bundle install' and caches installed gems automatically 40 | cache-version: 1 # Increment this number if you need to re-download cached gems 41 | - name: Setup Pages 42 | id: pages 43 | uses: actions/configure-pages@v2 44 | - name: Build with Jekyll 45 | # Outputs to the './_site' directory by default 46 | run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" --trace 47 | env: 48 | JEKYLL_ENV: production 49 | - name: Upload artifact 50 | # Automatically uploads an artifact from the './_site' directory by default 51 | uses: actions/upload-pages-artifact@v3 52 | 53 | # Deployment job 54 | deploy: 55 | environment: 56 | name: github-pages 57 | url: ${{ steps.deployment.outputs.page_url }} 58 | runs-on: ubuntu-latest 59 | needs: build 60 | steps: 61 | - name: Deploy to GitHub Pages 62 | id: deployment 63 | uses: actions/deploy-pages@v4 64 | -------------------------------------------------------------------------------- /stacks/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: stacks-caip2 3 | title: Stacks Namespace - Chains 4 | author: Léo Pradel @pradel, Greg Ogunyanwo @gregogun 5 | discussions-to: https://forum.stacks.org/t/caip-2-and-caip-10-stacks-specification/13290 6 | status: Draft 7 | type: Standard 8 | created: 2022-06-07 9 | requires: CAIP-2 10 | --- 11 | 12 | # CAIP-2 13 | 14 | *For context, see the [CAIP-2][] specification.* 15 | 16 | ## Rationale 17 | 18 | In [CAIP-2][] a general blockchain identification scheme is defined. This is the 19 | implementation of CAIP-2 for Stacks. The chain ID is used as a way to mitigate 20 | replay attacks on different Stacks chains, as it is included in the transaction 21 | encoding. Stacks mainnet runs on bitcoin mainnet and testnet runs on bitcoin 22 | testnet3. 23 | 24 | ## Syntax 25 | 26 | For reference, the format of reference currently specified in SIP-005 is an 27 | unsigned integer in decimal representation. The unsigned integer is represented 28 | as a 32-bit unsigned integer with a maximum value of 2^32-1. 29 | 30 | ### Resolution Method 31 | 32 | To resolve a blockchain reference for the stacks namespace, make an API call 33 | request to a blockchain node on the route `/v2/info`, the response will contain the 34 | `network_id` field. For example: 35 | 36 | ``` 37 | { 38 | "id": 1, 39 | "network_id": 1, 40 | "server_version": "stacks-node 2.05.0.2.0 (develop:4641001+, release build, linux [x86_64])", 41 | // ... other fields 42 | } 43 | ``` 44 | 45 | ## Test Cases 46 | 47 | This is a list of manually composed examples 48 | 49 | ``` 50 | # Stacks mainnet 51 | stacks:1 52 | 53 | # Stacks testnet 54 | stacks:2147483648 55 | ``` 56 | 57 | ## References 58 | 59 | - [SIP-005][] - Blocks and Transactions 60 | - [API documentation][] - Core API info 61 | 62 | [SIP-005][https://github.com/stacksgov/sips/blob/main/sips/sip-005/sip-005-blocks-and-transactions.md] 63 | [API documentation][https://hirosystems.github.io/stacks-blockchain-api/#operation/get_core_api_info] 64 | [CAIP-2][https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md] 65 | 66 | ## Copyright 67 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 68 | -------------------------------------------------------------------------------- /hedera/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: hedera 3 | title: Hedera Namespace 4 | author: Danno Ferrin (@shemnon) 5 | status: Accepted 6 | type: Informational 7 | created: 2021-11-01 8 | updated: 2022-03-27 9 | replaces: CAIP-75 10 | --- 11 | 12 | # Namespace for Hedera chains 13 | 14 | This namespace encompasses all 4 networks of the Hedera Hashgraph system, which 15 | is centrally governed and currently includes 4 "Networks" that are 16 | heirarchically organized into "Shards", "Realms", and Assets/Addresses. 17 | 18 | ## Introduction 19 | 20 | The prefix `hedera` designates the CAIP-conformant schemata of the Hedera namespace. 21 | 22 | ## Governance 23 | 24 | Note that the 3 CAIPs defined here have also been edited by their author into a 25 | Hedera Improvement Proposal, [HIP-30][], which has been accepted and published 26 | in 2021. Should the latter be superseded in a future HIP, the informational 27 | encoded here may become out of date; in the case of a conflict, consider the 28 | current body of HIPs canonical for Hedera architecture and consider these CAIPs 29 | a "legacy" addressing system for external consumption. 30 | 31 | ## References 32 | 33 | - [HIP-30][] - CAIP Identifiers for the Hedera Network 34 | - [Hedera Developer Documentation][] 35 | 36 | [CAIP-2]: https://chainAgnostic.org/CAIPS/caip-19 37 | [CAIP-10]: https://chainAgnostic.org/CAIPS/caip-19 38 | [CAIP-19]: https://chainAgnostic.org/CAIPS/caip-19 39 | [CAIP-152]: https://chainAgnostic.org/CAIPS/caip-152 40 | [CAIP-153]: https://chainAgnostic.org/CAIPS/caip-153 41 | [HIP-15]: https://github.com/hashgraph/hedera-improvement-proposal/blob/master/HIP/hip-15.md 42 | [HIP-30]: https://github.com/hashgraph/hedera-improvement-proposal/blob/master/HIP/hip-30.md 43 | [Hedera Developer Documentation]: https://docs.hedera.com/guides/ 44 | [Native Account Syntax]: https://docs.hedera.com/guides/core-concepts/accounts#account-id 45 | [Hedera Token Service SDK Docs]: https://docs.hedera.com/guides/docs/sdks/tokens 46 | [ERC20 & ERC721 Compatibility]: https://docs.hedera.com/guides/core-concepts/smart-contracts/supported-erc-token-standards 47 | 48 | ## Copyright 49 | 50 | Copyright and related rights waived 51 | via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).**** 52 | -------------------------------------------------------------------------------- /wallet/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: wallet-caip2 3 | title: Wallet Namespace - RPC namespaces 4 | author: Vandan Parikh (@vandan), Bumblefudge (@bumblefudge) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/119 6 | status: Draft 7 | type: Informational 8 | created: 2024-07-16 9 | --- 10 | 11 | *For context, see the [CAIP-2][] specification.* 12 | 13 | Each `chainId` reference in the `wallet:` namespace is defined as the namespace identifier for another namespace. 14 | 15 | This combination (i.e. `wallet:eip155`) refers not to an `eip155` network but specifically to an application<>wallet connection defined according to the wallet and RPC conventions of the `eip155` namespace. 16 | 17 | ## Rationale 18 | 19 | Implementers of [CAIP-25][] and other multichain application<>wallet connections have long struggled with how to map offchain or direct-to-wallet methods, notifications, and metadata to one another across namespaces, and how to safely and ergonomically segregate them from node-dependent/network-dependent functions. 20 | For this reason, an abstraction (in the form of a "meta-namespace" routing to the other namespaces) is here proposed. 21 | 22 | ## Semantics 23 | 24 | `wallet:{namespace}` is functionally an alias for `{namespace}:wallet`, where `:wallet` refers to a special-case of a wallet connection, not a proper network (as required by the CAIP-2 profile for `eip155`). 25 | 26 | ## Syntax 27 | 28 | The only valid values for a `chainId` reference in the `wallet` namespace are the namespace identifiers of other namespaces. 29 | For a current list of these, see [namespaces][]. 30 | 31 | ### Resolution Mechanics 32 | 33 | All resolution is defined in the namespace referred to, and ideally specified in its `/README.md` file here. 34 | As resolution depends entirely on transport and connection mechanism, no uniform resolution mechanics should be assumed. 35 | 36 | ## Test Cases 37 | 38 | < TODO > 39 | 40 | ## Additional Considerations 41 | 42 | < TODO > 43 | 44 | ## References 45 | 46 | [CAIP-2]: https://chainagnostic.org/CAIPs/caip-2 47 | [CAIP-25]: https://chainagnostic.org/CAIPs/caip-25 48 | [namespaces]: https://namespaces.chainagnostic.org/ 49 | 50 | ## Copyright 51 | 52 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/) 53 | -------------------------------------------------------------------------------- /starknet/caip10.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: starknet-caip10 3 | title: StarkNet Namespace - Addresses 4 | author: Argent Labs 5 | discussions-to: 6 | status: Draft 7 | type: Standard 8 | created: 2022-11-18 9 | updated: 2022-11-18 10 | requires: ["CAIP-2", "CAIP-10"] 11 | supersedes: CAIP-5 12 | --- 13 | 14 | # CAIP-10 15 | 16 | *For context, see the [CAIP-10][] specification.* 17 | 18 | ## Rationale 19 | 20 | The address of a StarkNet account is represented by an element of a field, whose maximum 21 | value is slightly less than `2**256 - 1`. Because of this, 32-byte hex representations of 22 | these addresses always have a leading zero. 23 | 24 | ## Syntax 25 | 26 | Like on Ethereum, StarkNet addresses begin with `0x` followed by 64 hexadecimal characters 27 | representing the zero-padded address number, totaling 66 characters. 28 | 29 | It's recommended to checksum the address using capitalization according to 30 | [EIP55][], as is common elsewhere on EVM systems. 31 | 32 | ## Test Cases 33 | 34 | ``` 35 | # StarkNet mainnet alpha (valid/checksummed) 36 | starknet:SN_MAIN:0x02DdfB499765c064eaC5039E3841AA5f382E73B598097a40073BD8B48170Ab57 37 | 38 | # StarkNet mainnet alpha (may not validate in checksum-conformant systems) 39 | starknet:SN_MAIN:0x02ddfb499765c064eac5039e3841aa5f382e73b598097a40073bd8b48170ab57 40 | 41 | # StarkNet goerli alpha 42 | starknet:SN_GOERLI:0x02DdfB499765c064eaC5039E3841AA5f382E73B598097a40073BD8B48170Ab57 43 | ``` 44 | 45 | 46 | ## References 47 | 48 | - [addresses][]: Address format on StarkNet 49 | - [Length of addresses][]: Decision fixing the length of addresses on StarkNet 50 | 51 | [addresses]: https://starknet.io/docs/how_cairo_works/cairo_intro.html#field-elements 52 | [Length of addresses]: https://github.com/starkware-libs/starknet-specs/pull/58 53 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 54 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 55 | [CAIP-19]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md 56 | [CAIP-21]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-21.md 57 | [CAIP-22]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-22.md 58 | [EIP55]: https://eips.ethereum.org/EIPS/eip-55 59 | 60 | ## Rights 61 | 62 | Copyright and related rights waived via CC0. 63 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | addressable (2.8.1) 5 | public_suffix (>= 2.0.2, < 6.0) 6 | colorator (1.1.0) 7 | concurrent-ruby (1.1.10) 8 | em-websocket (0.5.3) 9 | eventmachine (>= 0.12.9) 10 | http_parser.rb (~> 0) 11 | eventmachine (1.2.7) 12 | ffi (1.15.5) 13 | forwardable-extended (2.6.0) 14 | http_parser.rb (0.8.0) 15 | i18n (1.12.0) 16 | concurrent-ruby (~> 1.0) 17 | jekyll (4.2.2) 18 | addressable (~> 2.4) 19 | colorator (~> 1.0) 20 | em-websocket (~> 0.5) 21 | i18n (~> 1.0) 22 | jekyll-sass-converter (~> 2.0) 23 | jekyll-watch (~> 2.0) 24 | kramdown (~> 2.3) 25 | kramdown-parser-gfm (~> 1.0) 26 | liquid (~> 4.0) 27 | mercenary (~> 0.4.0) 28 | pathutil (~> 0.9) 29 | rouge (~> 3.0) 30 | safe_yaml (~> 1.0) 31 | terminal-table (~> 2.0) 32 | jekyll-feed (0.16.0) 33 | jekyll (>= 3.7, < 5.0) 34 | jekyll-sass-converter (2.2.0) 35 | sassc (> 2.0.1, < 3.0) 36 | jekyll-seo-tag (2.8.0) 37 | jekyll (>= 3.8, < 5.0) 38 | jekyll-watch (2.2.1) 39 | listen (~> 3.0) 40 | kramdown (2.4.0) 41 | rexml 42 | kramdown-parser-gfm (1.1.0) 43 | kramdown (~> 2.0) 44 | liquid (4.0.3) 45 | listen (3.7.1) 46 | rb-fsevent (~> 0.10, >= 0.10.3) 47 | rb-inotify (~> 0.9, >= 0.9.10) 48 | mercenary (0.4.0) 49 | minima (2.5.1) 50 | jekyll (>= 3.5, < 5.0) 51 | jekyll-feed (~> 0.9) 52 | jekyll-seo-tag (~> 2.1) 53 | pathutil (0.16.2) 54 | forwardable-extended (~> 2.6) 55 | public_suffix (5.0.0) 56 | rb-fsevent (0.11.2) 57 | rb-inotify (0.10.1) 58 | ffi (~> 1.0) 59 | rexml (3.2.5) 60 | rouge (3.30.0) 61 | safe_yaml (1.0.5) 62 | sassc (2.4.0) 63 | ffi (~> 1.9) 64 | terminal-table (2.0.0) 65 | unicode-display_width (~> 1.1, >= 1.1.1) 66 | unicode-display_width (1.8.0) 67 | webrick (1.8.1) 68 | 69 | PLATFORMS 70 | arm64-darwin-22 71 | universal-darwin-21 72 | x86_64-linux 73 | 74 | DEPENDENCIES 75 | http_parser.rb (~> 0.6.0) 76 | jekyll (~> 4.2.2) 77 | jekyll-feed (~> 0.12) 78 | minima (~> 2.5) 79 | tzinfo (~> 1.2) 80 | tzinfo-data 81 | wdm (~> 0.1.1) 82 | webrick (~> 1.8) 83 | 84 | BUNDLED WITH 85 | 2.3.24 86 | -------------------------------------------------------------------------------- /ergo/caip19.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: ergo-caip19 3 | title: Ergo Namespace - Assets 4 | author: Yuriy Gagarin (@gagarin55) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/98 6 | status: Draft 7 | type: Standard 8 | created: 2023-11-04 9 | updated: 2023-12-12 10 | requires: ["CAIP-2", "CAIP-19"] 11 | --- 12 | 13 | ## Rationale 14 | 15 | Ergo supports custom tokens as first-class citizens as outlined in [EIP-0004]. 16 | 17 | A transaction can create tokens from thin air in its outputs if the Asset ID matches the ID of the transaction's first input ([box]). 18 | Since the box identifier is cryptographically unique, it's impossible to have a second asset with the same identifier. 19 | This rule also implies that only one new asset can be created per transaction. 20 | 21 | The ID format for fungible (ERC20-equivalent) and non-fungible (ERC-721 equivalent) tokens is the same. 22 | The process for issuance of either is also the same. 23 | The only difference is that NFTs must have specific values (see [EIP-0004]) for certain properties. 24 | 25 | ## Specification of Asset ID 26 | 27 | Asset ID is a 32 byte array encoded as a hex string. 28 | When issued, it is equal to the ID of the transaction's first input that issued this asset. 29 | 30 | ## Syntax 31 | 32 | The syntax of Ergo Asset ID: 33 | 34 | ``` 35 | address: namespace + ":" chainId + ":" + reference 36 | namespace: ergo 37 | chain ID: 32-character prefix from the hash of the genesis block 38 | reference: Ergo Asset ID represented as hex string 39 | ``` 40 | 41 | ## Examples 42 | 43 | ``` 44 | # Ergo Mainnet 45 | ergo:b0244dfc267baca974a4caee06120321:56d89fdb0c92605d6c80f06a4c6a217f62bdc5695776f916daeabd708683f60d 46 | 47 | # Ergo Testnet 48 | ergo:e7553c9a716bb3983ac8b0c21689a1f3:0160b869f30a5424e59cb3453e8a726b81fe83761d02ab41829cb7b2e4b624bc 49 | 50 | ``` 51 | 52 | ## Links 53 | 54 | - [Token][token] overview 55 | - [Ergo Box][box] overview 56 | - [About addresses in Ergo Documentation][address format] 57 | - [Ergo Assets standard][EIP-0004] 58 | [box]: https://docs.ergoplatform.com/dev/data-model/box/ 59 | [token]: https://docs.ergoplatform.com/dev/data-model/box/tokens/ 60 | [address format]: https://docs.ergoplatform.com/dev/wallet/address/address_types 61 | [EIP-0004]: https://github.com/ergoplatform/eips/blob/master/eip-0004.md 62 | 63 | ## Copyright 64 | 65 | Copyright and related rights waived via [CC0](../LICENSE). 66 | -------------------------------------------------------------------------------- /sui/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: sui 3 | title: Sui Ecosystem 4 | author: William Robertson (@williamrobertson13) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/146 6 | status: Draft 7 | type: Informational 8 | created: 2025-06-18 9 | updated: 2025-06-18 10 | --- 11 | 12 | # Namespace for Sui Chains 13 | 14 | Sui is a smart contract platform that uses a Move-based, object-centric data model and is optimized for parallel execution. Transactions in Sui operate on objects rather than accounts, allowing independent operations to be executed in parallel without coordination. This enables high throughput while preserving safety and determinism. 15 | 16 | A Sui network is maintained by a validator committee responsible for processing transactions, reaching consensus, and producing checkpoint digests — cryptographic summaries of network state at fixed intervals. These checkpoints serve as the canonical state and ensure consistency across nodes. 17 | 18 | Each network is uniquely identified by its genesis checkpoint digest — the cryptographic hash of the very first checkpoint, signed by the original validator set. This digest anchors the network’s identity in verifiable history and validator consensus. 19 | 20 | ## Rationale 21 | 22 | Because chain identity and state in Sui revolve around checkpoints and objects rather than blocks and accounts, standard CAIP identifiers (e.g., for chains, accounts, and assets) must be adapted accordingly. 23 | 24 | This namespace defines how Sui’s architecture maps to cross-chain standards to support consistent and interoperable multi-chain tooling. 25 | 26 | ## Governance 27 | 28 | Sui protocol upgrades and standards are coordinated by the Sui Foundation in collaboration with core contributors and the broader developer community. Changes are proposed through SIPs (Sui Improvement Proposals), with open discussion and reference implementations maintained on GitHub. 29 | 30 | ## References 31 | 32 | - [Sui Docs] — Developer documentation and concept overviews for building on Sui. 33 | - [Sui GitHub] — Official GitHub repository for the Sui smart contract platform. 34 | - [Sui SIPs] — Official GitHub repository for Sui Improvement Proposals. 35 | 36 | [Sui Docs]: https://docs.sui.io/ 37 | [Sui GitHub]: https://github.com/MystenLabs/sui 38 | [Sui SIPs]: https://github.com/sui-foundation/sips 39 | 40 | ## Copyright 41 | 42 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 43 | -------------------------------------------------------------------------------- /casper/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: casper-caip2 3 | title: Casper Chains 4 | author: <["David Hernando ", "Adrian Wrona "]> 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/100 6 | status: Draft 7 | type: Standard 8 | created: 2024-01-12 9 | requires: ["CAIP-2"] 10 | --- 11 | 12 | # CAIP-2 13 | 14 | *For context, see the [CAIP-2][] specification.* 15 | 16 | ## Rationale 17 | 18 | The Chain ID is a human-readable identifier for a Casper network blockchain. It should not be confused with the `genesis_hash`, which is the true and unique identifier of a chain. 19 | 20 | ## Syntax 21 | 22 | It consists of the prefix `casper:` followed by the chainspec name of that network. Such name is a string that permits to easily identify the network and protect from replay attacks. 23 | 24 | ### Resolution Method 25 | 26 | To resolve the [chainspec][] name for a given Casper network chain, send an RPC request with method `info_get_status` to a Casper node in that network. The result object in the RPC response will contain the property `chainspec_name` containing the [chainspec][] name corresponding to that network. 27 | 28 | For example: 29 | 30 | ```jsonc 31 | // Command 32 | curl --request POST \ 33 | --header "Content-Type: application/json" \ 34 | --data '{"jsonrpc":"2.0", "id": 1, "method":"info_get_status", "params":{}}' \ 35 | http://52.35.59.254:7777/rpc | jq .result.chainspec_name 36 | 37 | // Result 38 | "casper-test" 39 | ``` 40 | 41 | Append the prefix `"casper:"` to form the Chain Id for that chain. In the example above: `casper:casper-test`. 42 | 43 | ## Test Cases 44 | 45 | This is a list of manually composed Chain Id examples 46 | 47 | ``` 48 | # Casper Mainnet 49 | casper:casper 50 | 51 | # Casper Testnet 52 | casper:casper-test 53 | ``` 54 | 55 | For testing purposes, the Casper Association maintains the following RPC endpoints: 56 | 57 | * Casper Mainnet: http://34.224.191.55:7777/rpc 58 | * Testnet: http://52.35.59.254:7777/rpc 59 | 60 | 61 | ## References 62 | 63 | - [Casper Docs site][] 64 | - [Casper Chain Specification][Chainspec] 65 | - [CAIP-2][] 66 | 67 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 68 | [Casper Docs site]: https://docs.casper.network/ 69 | [Chainspec]: https://docs.casper.network/operators/setup-network/chain-spec/ 70 | 71 | ## Copyright 72 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). -------------------------------------------------------------------------------- /swift/caip19.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: swift-caip19 3 | title: SWIFT Network - Asset Identifiers 4 | author: Bumblefudge (@bumblefudge), Daniel Rocha (@danroc) 5 | status: Draft 6 | type: Informational 7 | created: 2025-01-22 8 | updated: 2025-01-22 9 | --- 10 | 11 | # CAIP-19 12 | 13 | *For context, see the [CAIP-19][] specification.* 14 | 15 | ## Rationale 16 | 17 | A common data model was needed to represent fiat balances in multichain networks, and rather than invent an arbitrary new one, using SWIFT/ISO notation seemed more forward-compatible. 18 | As no SWIFT namespace was yet defined, an "empty" one with a special-case for off-network/out-of-band usage, "chainId 0", was added and ISO 4217 codes were used for internationally-recognized fiat currencies and notations. 19 | 20 | ## Syntax 21 | 22 | The fiat currency standard used across most modern SWIFT tooling and accounting systems is ISO 4217, which assigns a 3-letter code to each national currency on Earth, as well as a few supranational ones (`EUR` for the Euro), and a special category, all prefixed with `X`, for major rare metals. 23 | The 3-letter codes are here capitalized, following the legacy convention. 24 | 25 | The template for validating these namespace is as follows: 26 | ``` 27 | chain_id: "swift:" + network_id + "/iso4217:" + currencycode 28 | network_id: 0 for off-network usage or TBD for specific SWIFT networks 29 | currencycode: [A-Z]{3} 30 | ``` 31 | 32 | Other asset standards (such as the [ISO 15022] standard for securities accounting or the more verbose [ISO 20022] data model for assets) may be specified at a later time, pending community interest. 33 | 34 | ## Test Cases 35 | 36 | ``` 37 | # Euro (€) 38 | swift:0/iso4217:EUR 39 | 40 | # US Dollar ($) 41 | swift:0/iso4217:USD 42 | 43 | # Argentine Peso ($) 44 | swift:0/iso4217:ARS 45 | 46 | ``` 47 | 48 | ## References 49 | 50 | - [ISO 4217:2015][]: Identifier scheme for national and extranational fiat currencies 51 | - [ISO 4217 Registry][]: Current list of current and historical 4217 currency codes 52 | 53 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 54 | [CAIP-19]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md 55 | [ISO 4217:2015]: https://www.iso.org/standard/64758.html 56 | [ISO 4217 Registry]: https://www.iso.org/iso-4217-currency-codes.html 57 | [ISO 15022]: https://www.iso20022.org/welcome-iso-15022 58 | [ISO 20022]: https://www.iso20022.org/ 59 | 60 | ## Rights 61 | 62 | Copyright and related rights waived via CC0. 63 | -------------------------------------------------------------------------------- /iota/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: iota 3 | title: IOTA 4 | author: Enrico Marconi (@UMR1352) 5 | status: Draft 6 | type: Informational 7 | created: 2025-07-28 8 | --- 9 | 10 | # Namespace for IOTA networks 11 | 12 | IOTA is a Move-based smart contract platform designed for high performance. Unlike traditional blockchains 13 | that use accounts and process transactions sequentially, IOTA uses an object-centric data model. 14 | This allows transactions to operate on individual objects, enabling them to be executed in parallel without 15 | needing to be coordinated. This architecture ensures high throughput while maintaining security and consistency. 16 | 17 | The IOTA network is maintained by a committee of validators. These validators are responsible for processing 18 | transactions and creating checkpoint digests, which are cryptographic summaries of the network's state at regular 19 | intervals. These checkpoints are crucial because they serve as the official, canonical state of the network. 20 | 21 | Each IOTA network has a unique identity, established by its genesis checkpoint digest. This is the cryptographic 22 | hash of the very first checkpoint, signed by the original validators. This digest acts as a verifiable anchor for 23 | the network’s identity. 24 | 25 | ## Rationale 26 | 27 | This distinct design - which focuses on checkpoints and objects instead of blocks and accounts - requires a special 28 | approach to integrate with standard cross-chain identifiers (CAIPs). 29 | 30 | This new namespace provides the necessary framework to map [IOTA's architecture][IOTA Docs] to these standards, ensuring 31 | compatibility and interoperability with multi-chain tools. 32 | 33 | ## Governance 34 | 35 | The IOTA Foundation coordinates protocol upgrades and standards by working with core contributors and the developer 36 | community. Proposed changes go through an open process called [IOTA Improvement Proposals][IOTA IIPs] (IIPs), with discussions 37 | and reference implementations maintained on [GitHub][IOTA Github]. 38 | 39 | ## References 40 | 41 | - [IOTA Docs] - Developer documentation and cencept overviews for for building on IOTA. 42 | - [IOTA GitHub] - Official GitHub repository for the IOTA smart contract platform. 43 | - [IOTA IIPs] - Official GitHub repository for IOTA Improvement Proposals. 44 | 45 | [IOTA Docs]: https://docs.iota.org 46 | [IOTA GitHub]: https://github.com/iotaledger/iota 47 | [IOTA IIPs]: https:/github.com/iotaledger/IIPs 48 | 49 | ## Copyright 50 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 51 | -------------------------------------------------------------------------------- /waves/caip19.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: waves-caip19 3 | title: Waves Namespace - Assets 4 | author: Maxim Smolyakov (@msmolyakov), Yury Sidorov (@darksyd94) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/49 6 | status: Draft 7 | type: Standard 8 | created: 2023-01-19 9 | requires: ["CAIP-2", "CAIP-19"] 10 | --- 11 | 12 | ## Rationale 13 | 14 | Any account can issue its own token. The new token is immediately available. 15 | 16 | The ID format for fungible (ERC20-equivalent) and non-fungible (ERC-721 17 | equivalent) tokens is the same. The process for issuance of either is also the 18 | same. The only difference is that NFTs must have specific values for certain 19 | properties. 20 | 21 | ## Specification of Asset ID 22 | 23 | Asset ID is a 32 byte array encoded as a [Base58btc][]-encoded string. When 24 | issued directly, it is equal to the ID of the transaction that issued this 25 | asset; when the token is issued using via a smart contract call, the asset will 26 | instead be addressed by a Blake2b-256 hash of the transaction and parameters 27 | passed in the call. This is true for both fungible and non-fungible tokens, 28 | which are distinguished instead by their [token][] metadata which can be 29 | retrieved or verified by an RPC call from a node (see [token][] reference). 30 | 31 | ## Syntax 32 | 33 | The syntax of Waves Asset ID: 34 | 35 | ``` 36 | address: namespace + ":" chainId + ":" + reference 37 | namespace: waves 38 | chain ID: [-128..127] value packed to 3 characters with leading zeros 39 | reference: Waves Asset ID represented as [Base58btc][]-encoded string 40 | ``` 41 | 42 | ## Examples 43 | 44 | ``` 45 | # Waves Mainnet (87) 46 | waves:087:DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p 47 | 48 | # Waves Testnet (84) 49 | waves:084:2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ 50 | 51 | # Waves custom network (-7) 52 | waves:-07:2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ 53 | ``` 54 | 55 | ## Links 56 | 57 | - [Token][token] overview 58 | - [Token ID][token id] syntax 59 | - [About addresses in Waves Documentation][address format] 60 | - [Conversion between binary and Base58btc representation][base58btc] 61 | 62 | [token]: https://docs.waves.tech/en/blockchain/token 63 | [token id]: https://docs.waves.tech/en/blockchain/token/token-id 64 | [address format]: https://docs.waves.tech/en/blockchain/account/address 65 | [address checksum]: https://docs.waves.tech/en/blockchain/binary-format/address-binary-format 66 | [base58btc]: https://en.bitcoin.it/wiki/Base58Check_encoding#Base58_symbol_chart 67 | 68 | ## Copyright 69 | 70 | Copyright and related rights waived via [CC0](../LICENSE). 71 | -------------------------------------------------------------------------------- /alephium/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: alephium-caip2 3 | title: Alephium Blockchain ID Specification 4 | author: Hongchao Liu (@h0ngcha0) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/117 6 | status: Draft 7 | type: Standard 8 | created: 2024-06-19 9 | updated: 2024-06-19 10 | --- 11 | 12 | ## Abstract 13 | 14 | In CAIP-2 a general blockchain identification scheme is defined. 15 | This is the implementation of CAIP-2 for Alephium network. 16 | 17 | ## Rationale 18 | 19 | Alephium is a sharded blockchain that organizes addresses and states 20 | into distinct groups. The blockchain id includes both the network id 21 | and the group information. 22 | 23 | Each transaction has an origin and destination group. All transactions 24 | from by addresses in group `G1` to addresses in group `G2` will be 25 | included in chain `G1 -> G2`. If there are `G` groups on Alephium, 26 | there will be `G`*`G` chains inside of it. In Alephium, groups are 27 | like cities and chains are like roads connecting them. 28 | 29 | Both contract and address belong to a group. A contract deployed in 30 | one group can only be interacted with directly with an address from 31 | the same group. Therefore it is common for a dApp deployed in one 32 | group to request connection to an address within the same 33 | group. However a dApp deployed in all groups might request connection 34 | with an address from any group. 35 | 36 | The Network id can be one of three values: `mainnet`, `testnet` and 37 | `devnet`. 38 | 39 | Currently, Alephium has 4 groups. The group component of the 40 | blockchain id can take one of five values: `0`, `1`, `2` and `3` which 41 | correspond to groups `0` through `3`, and `-1` which represents any 42 | group. 43 | 44 | ### Syntax 45 | 46 | The `chain_id` is a case-insensitive string in the form 47 | 48 | ``` 49 | chain_id: alephium + ":" + group + "_" + network_id 50 | network_id: mainnet, testnet or devnet 51 | group: 0, 1, 2, 3 or -1 52 | ``` 53 | 54 | For information that is not network or group specific, there is a 55 | special chain id `alephium:universal`. 56 | 57 | ## Test Cases 58 | 59 | This is a list of manually composed examples 60 | 61 | ``` 62 | # Alephium mainnet, group 0 63 | alephium:0_mainnet 64 | 65 | # Alephium testnet, any group 66 | alephium:-1_testnet 67 | 68 | ``` 69 | 70 | ## References 71 | 72 | - [Blockflow](https://medium.com/@alephium/an-introduction-to-blockflow-alephiums-sharding-algorithm-bbbf318c3402) 73 | - [API Endpoints](https://node.mainnet.alephium.org/docs/) 74 | 75 | ## Copyright 76 | 77 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 78 | -------------------------------------------------------------------------------- /_template/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: 3 | title: <{namespace common name} [, aka ecosystem name]> 4 | author: <["FirstName1 LastName1 (@GitHubUsername1)", "AnonHandle2 "]> 5 | status: Draft 6 | type: Informational 7 | created: 8 | requires (*optional): <["CAIP-X", "CAIP-Y"]> 9 | replaces (*optional): 10 | --- 11 | 12 | # Namespace for {non-technical name for ecosystem or family of chains} 13 | 14 | 15 | As the old saying goes, "If you can't explain it simply, you don't understand it 16 | well enough." Here is where you can provide a simplified and layman-accessible 17 | explanation of what is particular to this namespace or how it differs from EVM 18 | chains, where the CAIPs are easiest to apply/understand. 19 | 20 | ## Rationale 21 | 22 | A short (~200 word) description of any technical issues being addressed by the 23 | naming of the namespace, or other informational asides about the particularities 24 | of the namespace. 25 | 26 | ## Governance 27 | 28 | A short (~200 word) description of the improvement proposal process or other 29 | specification/governance context that a first-time implementer of cross-chain 30 | work in this namespace/ecosystem should know. 31 | 32 | ## References 33 | 34 | Links to external resources that help understanding the namespace or the 35 | specification/applied-CAIP better in this context. This can also include links 36 | to existing implementations. 37 | 38 | The preferred format, for browser-rendering and long-term maintenance, is a 39 | bulletted list of [Name][] links (rather than classical [Name](referent) links), 40 | followed by ` - ` and a summary or explanation of the content. In a separate 41 | section below, add the name-referent pairs in the `[Name]: https://{referent} ` 42 | format-- this will be invisible in any Github-flavored Markdown rendering 43 | (including jekyll/github pages, aka github.io, but also docusaurus and many 44 | dev-docs rendering engines). 45 | 46 | ## Copyright 47 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 48 | -------------------------------------------------------------------------------- /qubic/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: qubic 3 | title: Qubic Ecosystem 4 | author: Aleish (@aleishio) 5 | status: Draft 6 | discussions-to: https://github.com/ChainAgnostic/namespaces/issues/138 7 | type: Informational 8 | created: 2025-02-17 9 | --- 10 | 11 | # Namespace for {non-technical name for ecosystem or family of chains} 12 | 13 | Qubic is a high-performance Layer 1 blockchain that offers instant finality, feeless transactions, and rapid smart contract execution. 14 | It distinguishes itself by integrating Useful Proof of Work (UPoW), transforming mining energy into artificial intelligence computations, thereby laying the groundwork for decentralized Artificial General Intelligence (AGI). 15 | 16 | ## Governance 17 | 18 | Qubic uses a quorum-based consensus system with 676 Computors (nodes) responsible for executing smart contracts, validating transactions, and securing the network. At least 451 Computors must agree to reach consensus, following a Byzantine Fault Tolerance (BFT) model that ensures resilience against malicious or faulty nodes. 19 | 20 | Governance applies specifically to changes in the node software and protocol, including updates to consensus rules, computation mechanisms, and economic adjustments. Governance does not directly cover RPC methods, addressability, or multichain compatibility, but protocol modifications may indirectly influence them. 21 | 22 | Proposed changes are discussed in the Computors-Operator channel on Discord, where Computors debate modifications before each epoch. An epoch occurs weekly, and approved changes are implemented at the start of the next epoch, ensuring structured and continuous updates to the network. 23 | 24 | Developers and Computors can follow governance discussions and decisions on Discord. You can find the invite link to Discord on the [Qubic Official Website][1]. 25 | 26 | ## References 27 | 28 | - [Qubic Official Website][1] - The main portal for Qubic, providing comprehensive information about the project. 29 | - [Qubic Documentation][2] - Detailed guides and resources for developers and users. 30 | - [Qubic Whitepaper][3] - In-depth technical documentation outlining Qubic's architecture and objectives. 31 | - [Qubic Tokenomics][4] - Insights into the economic model and utility of the $QUBIC token. 32 | - [Useful Proof of Work in Qubic][5] - Explanation of the UPoW mechanism and its role in the network. 33 | 34 | [1]: https://qubic.org 35 | [2]: https://docs.qubic.org 36 | [3]: https://whitepaper.qubic.org 37 | [4]: https://docs.qubic.org/learn/tokenomics/ 38 | [5]: https://docs.qubic.org/learn/upow/ 39 | 40 | 41 | ## Copyright 42 | 43 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 44 | -------------------------------------------------------------------------------- /starknet/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: starknet-caip2 3 | title: StarkNet Namespace - Chains 4 | author: Argent Labs 5 | discussions-to: 6 | status: Draft 7 | type: Standard 8 | created: 2022-11-18 9 | updated: 2022-11-18 10 | requires: CAIP-2 11 | supersedes: CAIP-5 12 | --- 13 | 14 | # CAIP-2 15 | 16 | *For context, see the [CAIP-2][] specification.* 17 | 18 | ### Rationale / Syntax 19 | 20 | The namespace `starknet` refers to the StarkNet Layer 2 on Ethereum. 21 | 22 | StarkNet currently represents its chains with string identifiers such as 23 | `SN_MAIN` and `SN_GOERLI`. Internally, these strings are encoded as field 24 | elements (according to a transformation documented in the system's [core 25 | documentation][Transaction structure]), but using the case-sensitive root string 26 | identifiers simplifies interoperability by sidestepping type system 27 | interoperability around integers. 28 | 29 | ### Resolution Method 30 | 31 | To resolve a reference for the StarkNet namespace, make a JSON-RPC 32 | request to a StarkNet Pathfinder node with method `starknet_chainId`, for example: 33 | 34 | ```python 35 | import requests 36 | 37 | response = requests.post( 38 | url=f"https://starknet-goerli.infura.io/v3/{API_KEY}", 39 | json={"jsonrpc": "2.0", "method": "starknet_chainId", "params": [], "id": 1}, 40 | ) 41 | 42 | hex_chain_id = response.json()["result"] # "0x534e5f474f45524c49" 43 | chain_id = bytes.fromhex(hex_chain_id[2:]).decode() # "SN_GOERLI" 44 | ``` 45 | 46 | The response will return a base-16-encoded field element that should be converted to 47 | a string to express a StarkNet-compatible reference. 48 | 49 | ## Test Cases 50 | 51 | This is a list of manually composed examples: 52 | 53 | ``` 54 | # StarkNet mainnet alpha 55 | starknet:SN_MAIN 56 | 57 | # StarkNet goerli alpha 58 | starknet:SN_GOERLI 59 | ``` 60 | 61 | ## References 62 | 63 | - [Transaction structure][]: StarkNet's documentation on chainIDs used in transaction. 64 | - [Making requests][]: Infura's documentation on how to call their Ethereum-style RPC endpoints for StarkNet. 65 | 66 | [Transaction structure]: https://docs.starknet.io/documentation/develop/Blocks/transactions/#chain-id 67 | [Making requests]: https://docs.infura.io/infura/networks/starknet/make-requests 68 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 69 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 70 | [CAIP-19]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md 71 | [CAIP-21]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-21.md 72 | [CAIP-22]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-22.md 73 | 74 | ## Rights 75 | 76 | Copyright and related rights waived via CC0. 77 | -------------------------------------------------------------------------------- /conflux/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: conflux-caip2 3 | title: Conflux Namespace - Chains 4 | author: iosh (@iosh) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/124 6 | status: Draft 7 | type: Standard 8 | created: 2024-08-09 9 | requires: CAIP-2 10 | --- 11 | 12 | # CAIP-2 13 | 14 | _For context, see the [CAIP-2][] specification._ 15 | 16 | ## Rationale 17 | 18 | Conflux network(core space) consists of 2 networks: main network and testing network. 19 | Private networks can also be created. 20 | 21 | The main network has a network ID of 1029, represented by `cfx`. The test network has a network ID of 1, represented by `cfxtest`. Private networks are represented by `net[network ID]`. 22 | 23 | 24 | ## Syntax 25 | 26 | A network id in the Conflux core space is defined as an unsigned integer ranging from 1 to 4294967295. 27 | 28 | ### Resolution Mechanics 29 | 30 | To resolve the a network reference for a conflux network, POST a JSON-RPC request to the RPC endpoint of the blockchain node with path / for example: 31 | 32 | ```jsonc 33 | // request 34 | curl -X POST --data \ 35 | '{ 36 | "method": "cfx_getStatus", 37 | "params": [], 38 | "jsonrpc": "2.0", 39 | "id": 1 40 | }' \ 41 | -H "Content-Type: application/json" \ 42 | https://main.confluxrpc.com 43 | 44 | // response 45 | 46 | { 47 | "jsonrpc": "2.0", 48 | "id": 1, 49 | "result": { 50 | "bestHash": "0x4e5607b1c23124fad2c7e431f34ca52bc3e28e90df2e3733d0a50d64d4790693", 51 | "chainId": "0x405", 52 | "ethereumSpaceChainId": "0x406", 53 | "networkId": "0x405", 54 | "epochNumber": "0x6158f8d", 55 | "blockNumber": "0xeb54f08", 56 | "pendingTxNumber": "0xc9", 57 | "latestCheckpoint": "0x614b3a0", 58 | "latestConfirmed": "0x6158f6a", 59 | "latestState": "0x6158f89", 60 | "latestFinalized": "0x6158eb0" 61 | } 62 | } 63 | 64 | ``` 65 | 66 | The response will return a JSON object which will include node status and the `networkId`, encoded in hexadecimal, of the current chain. 67 | 68 | ## Test Cases 69 | 70 | ``` 71 | # conflux mainnet 72 | conflux:cfx 73 | 74 | # conflux testnet 75 | conflux:cfxtest 76 | 77 | # private network 78 | conflux:net2024 79 | 80 | ``` 81 | 82 | ## References 83 | 84 | - [CAIP-2][] 85 | - [Conflux core space Docs][] The Conflux Core Space Docs 86 | - [Conflux core space RPC endpoint][] Publicly available Conflux Core Space network RPC endpoints 87 | 88 | [CAIP-2]: https://chainagnostic.org/CAIPs/caip-2 89 | [Conflux core space Docs]: https://doc.confluxnetwork.org/docs/core/Overview 90 | [Conflux core space RPC endpoint]: https://doc.confluxnetwork.org/docs/core/conflux_rpcs 91 | 92 | ## Copyright 93 | 94 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 95 | -------------------------------------------------------------------------------- /mvx/caip10.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: mvx-caip10 3 | title: MultiversX Namespace - Addresses 4 | author: MultiversX Team 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/issues/89 6 | status: Draft 7 | type: Standard 8 | created: 2023-09-11 9 | requires: ["CAIP-2", "CAIP-10"] 10 | --- 11 | 12 | # CAIP-10 13 | 14 | _For context, see the [CAIP-10][] specification._ 15 | 16 | ## Rationale 17 | 18 | The MultiversX Address format is bech32, specified by the [BIP_0173][]. 19 | The human-readable-part of the bech32 addresses is "erd" and the universal separator `1`, which means that the MultiversX address always starts with an `erd1`, e.g.: 20 | `erd1sea63y47u569ns3x5mqjf4vnygn9whkk7p6ry4rfpqyd6rd5addqyd9lf2`. 21 | 22 | The MultiversX network defines the address of an account as the bech32 representation of the public key of its corresponding pair of keys (the secret key remains known only to the user that owns the key pair). The public key is 32 bytes in length (64 hex characters), while the address (bech32) is 62 characters long. 23 | 24 | On MultiversX, deployed Smart Contracts and only deployed Smart Contracts have their hex (raw) addresses prefixed with 8 zero bytes (meaning that their bech32 address will begin with `erd1qqqqqqqqqqqq` ) 25 | 26 | ## Syntax 27 | 28 | ``` 29 | caip10-like address: namespace + ":" chainId + ":" + address 30 | namespace: mvx 31 | chain Id: 1, D or T 32 | address: bech32-formatted MultiversX address (erd1...) 33 | ``` 34 | 35 | ## Test Cases 36 | 37 | ``` 38 | #Wallet address on MultiversX Mainnet 39 | mvx:1:erd1uapegx64zk6yxa9kxd2ujskkykdnvzlla47uawh7sh0rhwx6y60sv68me9 40 | 41 | #Deployed Smart Contract on MultiversX Mainnet 42 | mvx:1:erd1qqqqqqqqqqqqqpgqhe8t5jewej70zupmh44jurgn29psua5l2jps3ntjj3 43 | 44 | MultiversX Devnet 45 | mvx:D:erd1devnet6uy8xjusvusfy3q83qadfhwrtty5fwa8ceh9cl60q2p6ysra7aaa 46 | 47 | MultiversX Testnet 48 | mvx:T:erd1sea63y47u569ns3x5mqjf4vnygn9whkk7p6ry4rfpqyd6rd5addqyd9lf2 49 | ``` 50 | 51 | ## References 52 | 53 | - [MultiversX Documentation][MultiversX Docs] 54 | - [MultiversX Specifications][] 55 | - [Integrators Guide][] 56 | - [BIP_0173][], the Bitcoin Improvement Proposal that includes the bech32 algorithm and python code 57 | 58 | [MultiversX Docs]: https://docs.multiversx.com/ 59 | [MultiversX Specifications]: https://github.com/multiversx/mx-specs 60 | [Integrators Guide]: https://docs.multiversx.com/integrators/overview 61 | [BIP_0173]: https://en.bitcoin.it/wiki/BIP_0173 62 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 63 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 64 | 65 | ## Copyright 66 | 67 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 68 | -------------------------------------------------------------------------------- /polkadot/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: polkadot 3 | title: Polkadot Namespace 4 | author: ["Pedro Gomes (@pedrouid)", "Joshua Mir (@joshua-mir)", "Shawn Tabrizi (@shawntabrizi)", "Juan Caballero (@bumblefudge)", "Antonio Antonino (@ntn-x2)"] 5 | status: Draft 6 | type: Informational 7 | created: 2020-04-01 8 | updated: 2023-02-22 9 | replaces: CAIP-13 10 | --- 11 | 12 | # Polkadot Namespace 13 | 14 | ## Introduction 15 | 16 | These documents define the syntax and canonical references of the CASA URI schemes for the Polkadot namespace. 17 | 18 | It is important for developers new to the Polkadot ecosystem to know that, unlike many other namespaces, the exact execution environment, RPC methods, block sizes and other core features of a Polkadot-based blockchain vary widely in a very layered and modular architecture based on "pallets": components of a blockchain runtime (i.e., VM) composed of storage and a set of functions to operate on that storage. 19 | 20 | Polkadot-based blockchains can be of two types: parachains or solo chains. 21 | In the first case, a parachain represents L1 infrastructure with a 12s block time that relies on the security properties of the L0 relay chain its blocks are anchored onto. 22 | The two relaychains currently deployed in a production environment are Polkadot and Kusama, with the latter being only an economically-incentivized canary network. 23 | Relay chains have a 6s block time and are secured by a [Nominated Proof of Stake (NPoS) consensus protocol][polkadot-consensus] which provides deterministic block finalization. 24 | 25 | The mentioned architecture creates an environment for complex "cross-chain" use cases between Polkadot-based chains. 26 | Within the framework of the Cross-Chain Messaging [XCM][], cross-chain interactions are enabled by `MultiLocation`s: ways of describing the source and the destination of an XCM message that is agnostic with respect to the consensus system the two actors are part of. 27 | Because with the release of XCM v3 `MultiLocation`s have been updated to always refer to "absolute" locations of source and destination, they represent a suitable starting point for CASA-style addressing. 28 | 29 | ## References 30 | 31 | - [Polkadot documentation][]: Homepage for ecosystem-wide developer documentation 32 | - [Polkadot public RPC endpoints][]: for dev/testing purposes 33 | - [XCM][]: Cross Consensus Messaging defies an addressing network across 34 | 35 | [polkadot-consensus]: https://wiki.polkadot.network/docs/learn-consensus 36 | [Polkadot documentation]: https://wiki.polkadot.network/ 37 | [Polkadot public RPC endpoints]: https://wiki.polkadot.network/docs/maintain-endpoints 38 | [XCM]: https://wiki.polkadot.network/docs/learn-xcm 39 | 40 | ## Copyright 41 | 42 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 43 | -------------------------------------------------------------------------------- /solana/caip19.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: solana-caip19 3 | title: Solana Namespace - Asset 4 | author: Qiao Liang (@qbig) 5 | discussions-to: 6 | status: Draft 7 | type: Standard 8 | created: 2022-06-01 9 | updated: 2022-06-01 10 | requires: ["CAIP-2", "CAIP-10", "CAIP-19", "CAIP-30"] 11 | --- 12 | 13 | # CAIP-19 14 | 15 | *For context, see the [CAIP-19][] specification.* 16 | 17 | ## Rationale 18 | 19 | On Solana, all contracts are stateless and state is instead represented using "accounts". More specifically, all fungible and non-fungible tokens use the same instance of token contracts and for each token: 20 | 21 | - 1 single global "mint" account instance is used for the global data like "total supply". 22 | - each token account represents an account balance belonging to a given address. 23 | 24 | The only difference between fungible tokens and non-fungible tokens is that non-fungible token mints have a total supply of 1 and zero decimal place. Both asset type can be identified by their "mint" account. 25 | 26 | 27 | ## Syntax 28 | 29 | After the [CAIP-2][] (namespace+chainID), a slash defines an `asset_namespace` and an `asset_reference`. Since both fungible and non-fungible tokens can be identified using the mint account, we use `token` (fungible) and `nft` (non-fungible) as the asset namespaces and the address of the `mint` account as the reference in both. 30 | 31 | | Reference | Equivalent to | See also | 32 | | :--- | :---- | :--- | 33 | | token | ERC20 Token | [Metaplex](https://docs.metaplex.com/programs/token-metadata/token-standard) Fungible | 34 | | nft | ERC721 | [Metaplex](https://docs.metaplex.com/programs/token-metadata/token-standard) NonFungible| 35 | 36 | 37 | ## Examples 38 | 39 | ``` 40 | # One Solana Mainnet NFT:Pesky Penguins #398 41 | solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/nft:Fz6LxeUg5qjesYX3BdmtTwyyzBtMxk644XiTqU5W3w9w 42 | 43 | # Solana Mainnet USDC 44 | solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v 45 | ``` 46 | 47 | ## Links 48 | 49 | [Address Lookup Table Proposal]: https://docs.solana.com/proposals/transactions-v2 50 | [Account Types]: https://docs.solana.com/terminology#account 51 | [Address Expressions]: https://docs.solana.com/cli/transfer-tokens#receive-tokens 52 | [Token Mint]: https://spl.solana.com/token#creating-a-new-token-type 53 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 54 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 55 | [CAIP-19]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md 56 | [CAIP-30]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-30.md 57 | 58 | 59 | ## Copyright 60 | 61 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 62 | -------------------------------------------------------------------------------- /aleo/caip10.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: aleo-caip10 3 | title: Aleo Network - Namespace Accounts 4 | author: Jonathan Gonzalez (@jonandgon, jonathan@puzzle.online) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/129 6 | status: Draft 7 | type: Standard 8 | created: 2023-09-12 9 | requires: CAIP-10 10 | --- 11 | 12 | 19 | 20 | # CAIP-10 21 | 22 | *For context, see the [CAIP-10][] specification.* 23 | 24 | 25 | ## Rationale 26 | 27 | An Aleo account address is a unique identifier that allows users to transfer value and record data to one another in transactions. 28 | 29 | The account address is comprised of a public key for the account encryption scheme. 30 | 31 | ## Syntax 32 | 33 | Address Format Example 34 | `aleo1dg722m22fzpz6xjdrvl9tzu5t68zmypj5p74khlqcac0gvednygqxaax0j` 35 | 36 | An account address is formatted as a `Bech32` string, comprised of 63 characters. The account address is encoded with an address prefix that reads `aleo1`. 37 | 38 | A regular expression for validating an Aleo address can be defined as: 39 | 40 | `^aleo1[a-z0-9]{58}$` 41 | 42 | ## Test Cases 43 | 44 | ```env 45 | # Aleo Testnet 46 | aleo:1:aleo1ml2xr6fawppd6uaf8gn95uy2fpqqg8gk74k0lu8na7uvayk64v8qu8hw5u 47 | 48 | # Aleo Mainnet 49 | aleo:0:aleo1ml2xr6fawppd6uaf8gn95uy2fpqqg8gk74k0lu8na7uvayk64v8qu8hw5u 50 | ``` 51 | 52 | ## Additional Considerations (*OPTIONAL) 53 | 54 | Account addresses / keys are chain-agnostic. Signatures, however, are NOT chain agnostic. 55 | 56 | ## References 57 | 58 | - [Aleo Network Documentation][]: Developer docs for the Aleo Network. 59 | - [Aleo Account Documentation][]: Developer docs for account creation. 60 | 61 | [Aleo Network Documentation]: https://developer.aleo.org 62 | [Aleo Account Documentation]: https://developer.aleo.org/concepts/accounts 63 | [CAIP-2]: https://chainAgnostic.org/CAIPS/caip-2 64 | [CAIP-10]: https://chainAgnostic.org/CAIPS/caip-10 65 | [aleo CAIP-2]: aleo/caip2 66 | 67 | ## Copyright 68 | 69 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 70 | -------------------------------------------------------------------------------- /eip155/caip122.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: eip155-caip122 3 | title: EVM Namespace - SIWx 4 | author: Haardik (@haardikk21) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/30 6 | status: Draft 7 | type: Standard 8 | created: 2022-08-19 9 | updated: 2022-08-19 10 | requires: ["CAIP-122", "CAIP-2", "CAIP-10"] 11 | --- 12 | 13 | ## CAIP-122 14 | 15 | For context, see the [CAIP-122](CAIP-122) specification. 16 | 17 | ## Rationale 18 | 19 | On Ethereum, [EIP-4361](EIP-4361) Sign-in with Ethereum already exists, which was the inspiration for CAIP-122. This specification highlights how EIP-4361 conforms with CAIP-122. 20 | 21 | ## Specification 22 | 23 | ### Signing Algorithm 24 | 25 | Ethereum uses the ECDSA signing algorithm for signing and verifying messages. Ethereum addresses are derived from the public ECDSA key. 26 | 27 | ### Signature Type 28 | 29 | We use the signature type `eip191` and `eip1271` when referring to Ethereum Personal Signatures and Contract Signatures respectively, as specified in the EIP-4361 specification. 30 | 31 | ### Signature Creation 32 | 33 | The abstract data model must be converted into a string representation in an unambigious format. We use the format as defined in EIP-4361. 34 | 35 | ``` 36 | ${domain} wants you to sign in with your Ethereum account: 37 | ${address} 38 | 39 | ${statement} 40 | 41 | URI: ${uri} 42 | Version: ${version} 43 | Chain ID: ${chain-id} 44 | Nonce: ${nonce} 45 | Issued At: ${issued-at} 46 | Expiration Time: ${expiration-time} 47 | Not Before: ${not-before} 48 | Request ID: ${request-id} 49 | Resources: 50 | - ${resources[0]} 51 | - ${resources[1]} 52 | ... 53 | - ${resources[n]} 54 | ``` 55 | 56 | ### Signature Verification 57 | 58 | We use signature verification techniques from [EIP-191](EIP-191) and [EIP-1271](EIP-1271) as specified as well as any additional steps specified in [EIP-4361](EIP-4361). 59 | 60 | ## References 61 | 62 | [eip-4361]: https://eips.ethereum.org/EIPS/eip-4361 63 | [caip-10]: https://github.com/ChainAgnostic/CAIPs/blob/8fdb5bfd1bdf15c9daf8aacfbcc423533764dfe9/CAIPs/caip-10.md 64 | [caip-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 65 | [caip-122]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-122.md 66 | [eip-191]: https://eips.ethereum.org/EIPS/eip-191 67 | [eip-1271]: https://eips.ethereum.org/EIPS/eip-1271 68 | 69 | - [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361): Sign-In with Ethereum 70 | - [CAIP-10](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md): Account ID Specification 71 | - [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md): Blockchain ID Specification 72 | - [CAIP-122](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-122.md): Sign in With X Specification 73 | - [EIP-191](https://eips.ethereum.org/EIPS/eip-191): Signed Data Standard 74 | - [EIP-1271](https://eips.ethereum.org/EIPS/eip-1271): Standard Signature Validation Method for Contracts 75 | -------------------------------------------------------------------------------- /reef/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: reef-caip2 3 | title: Reef Namespace - Chains 4 | author: Boo 0x (@boo-0x) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/issues/74 6 | status: Draft 7 | type: Standard 8 | created: 2023-06-30 9 | requires: CAIP-2 10 | --- 11 | 12 | # CAIP-2 13 | 14 | *For context, see the [CAIP-2][] specification.* 15 | 16 | ## Rationale 17 | 18 | The namespace is called "reef" to encompass all chains of the Reef ecosystem. This includes a production network and one or more test networks. 19 | 20 | The rationale behind the use of block hash from the genesis block stems from its usage in the Reef architecture to secure network consensus. 21 | 22 | ## Syntax 23 | 24 | The definition for this namespace will use the `genesis-hash` as an identifier for different Reef chains. 25 | The format is a 32 character-long lowercase hexadecimal string, **without** the `0x` prefix, representing the first half of hash of the 0 block (genesis block) for a given chain. 26 | 27 | As [CAIP-2][] references for this namespace are 32-byte hashes in lowercase hexadecimal, they can be validated with the simple regular expression: `[0-9a-f]{32}` 28 | 29 | ### Resolution Method 30 | 31 | There is no index or registry that maps genesis hashes to networks, and defining such a mechanism for doing so is out of the scope for this specification. 32 | This specification assumes that consumers of this class of CAIP-2 identifiers are able to properly resolve them to the appropriate network. 33 | This specification then defines how to verify that a given RPC node, reachable via a regular URL, belongs to a given Reef network. 34 | 35 | Given the URL of a Reef network RPC node, make a JSON-RPC request to the node with method `chain_getBlockHash`, for example: 36 | 37 | ```jsonc 38 | // Request 39 | { 40 | "id": 1, 41 | "jsonrpc": "2.0", 42 | "method": "chain_getBlockHash", 43 | "params": [0] 44 | } 45 | 46 | // Response 47 | { 48 | "id": 1, 49 | "jsonrpc": "2.0", 50 | "result": "0x7834781d38e4798d548e34ec947d19deea29df148a7bf32484b7b24dacf8d4b7" 51 | } 52 | ``` 53 | The response will return as a result the hash of the block with height 0 (i.e., the genesis block). 54 | The leading `0x` and the last 32 characters will need to be trimmed, such that the resulting string is a 32-character Hexadecimal string (i.e., 16 bytes) that represents the Reef network in which the RPC node participates. 55 | 56 | ## Test Cases 57 | 58 | This is a list of manually composed examples: 59 | 60 | ``` 61 | # Reef Mainnet 62 | reef:7834781d38e4798d548e34ec947d19de 63 | 64 | # Reef Scuba testnet 65 | reef:b414a8602b2251fa538d38a932239150 66 | 67 | ## References 68 | 69 | - [Reef Chain](https://reef.io/) 70 | - [Docs](https://docs.reef.io/) 71 | - [GitHub](https://github.com/reef-chain) 72 | 73 | [CAIP-2]: https://chainagnostic.org/CAIPs/caip-2 74 | 75 | ## Copyright 76 | 77 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 78 | -------------------------------------------------------------------------------- /vechain/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: vechain-caip2 3 | title: Vechain Namespace 4 | author: Darren Kelly (@darrenvechain)) 5 | status: Draft 6 | type: Standard 7 | created: 2023-07-10 8 | updated: 2023-07-10 9 | requires: CAIP-2 10 | --- 11 | 12 | # CAIP-2 13 | *For context, see the [CAIP-2][] specification.* 14 | 15 | 16 | ## Abstract 17 | 18 | In CAIP-2 a general blockchain identification scheme is defined. This is the 19 | implementation of CAIP-2 for VechainThor network. 20 | 21 | ### Vechain Namespace 22 | 23 | The namespace "vechain" refers to the wider Vechain ecosystem. 24 | 25 | ## Rationale 26 | 27 | Vechain consists of 2 networks: a production network and a testing network. Private networks can also be created to aid in local development. Each network has a unique genesis ID that can be used to identify it. 28 | 29 | An identifier for a VechainThor chain consists of the namespace prefix "vechain:" 30 | followed by a truncated form of the chain's genesis ID. 31 | 32 | ## Syntax 33 | 34 | Due to length and character limitations of CAIP-2 reference identifiers 35 | (references must adhere to `[-_a-zA-Z0-9]{1,32}`), the commonly referenced 36 | standard genesis ID of a vechain cannot be used 37 | directly as a reference. 38 | 39 | Instead, one change must be made: 40 | 1. Only the last 32 characters of the genesis ID will be used 41 | 42 | ### Resolution Method 43 | 44 | To resolve the blockchain reference for VechainThor chain, a GET request can be 45 | made to an VechainThor node on the path `blocks/0`. This will return 46 | a JSON object with the the key `id`, whose value is the hex encoded ID of the current chain. 47 | 48 | For example: 49 | 50 | ```jsonc 51 | // Request 52 | curl "https://mainnet.vechain.org/blocks/0" 53 | 54 | // Response (formatted) 55 | { 56 | "number": 0, 57 | "id": "0x00000000851caf3cfdb6e899cf5958bfb1ac3413d346d43539627e6be7ec1b4a", 58 | "size": 170, 59 | "parentID": "0xffffffff53616c757465202620526573706563742c20457468657265756d2100" 60 | } 61 | ``` 62 | 63 | ```javascript 64 | const genesisId = "0x00000000851caf3cfdb6e899cf5958bfb1ac3413d346d43539627e6be7ec1b4a"; 65 | //get the last 32 characters of the genesis ID 66 | const truncatedId = genesisId.slice(-32); 67 | const identifier = "vechain:" + truncatedId; 68 | 69 | console.log(identifier); // prints "vechain:b1ac3413d346d43539627e6be7ec1b4a" 70 | ``` 71 | 72 | ## Test Cases 73 | 74 | ``` 75 | # VechainThor MainNet has the genesis ID 0x00000000851caf3cfdb6e899cf5958bfb1ac3413d346d43539627e6be7ec1b4a 76 | vechain:b1ac3413d346d43539627e6be7ec1b4a 77 | 78 | # VechainThor TestNet has the genesis ID 0x000000000b2bce3c70bc649a02749e8687721b09ed2e15997f466536b20bb127 79 | vechain:87721b09ed2e15997f466536b20bb127 80 | ``` 81 | 82 | ## References 83 | 84 | - [VechainThor REST API](https://docs.vechain.org/thor/thorest-api) 85 | - [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md) 86 | 87 | ## Rights 88 | 89 | Copyright and related rights waived via CC0. -------------------------------------------------------------------------------- /stacks/caip122.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: stacks-caip122 3 | title: Stacks Namespace - SIWx 4 | author: Léo Pradel @pradel 5 | discussions-to: https://forum.stacks.org/t/caip-2-and-caip-10-stacks-specification/13290 6 | status: Draft 7 | type: Standard 8 | created: 2023-01-08 9 | requires: ["CAIP-122", "CAIP-2", "CAIP-10"] 10 | --- 11 | 12 | ## CAIP-122 13 | 14 | For context, see the [CAIP-122][] specification. 15 | 16 | ## Rationale 17 | 18 | This specification provides the signing algorithm to use, the `type` of the 19 | signing algorithm to identify it, and a method for signature creation and 20 | verification as required by [CAIP-122][]. 21 | 22 | ## Specification 23 | 24 | ### Signing Algorithm 25 | 26 | Stacks uses the ECDSA secp256k1 signing algorithm for signing and verifying 27 | messages. The message is hashed with SHA256 before being used as an input for 28 | signing. 29 | 30 | ### Signature Type 31 | 32 | We propose using the signature type `stacks:secp256k1` to refer to the chain and 33 | algorithm used uniquely. 34 | 35 | ### Signature Creation 36 | 37 | The abstract data model defined by CAIP-122 must be converted into a string 38 | representation in an unambigious format, and then the string converted to a byte 39 | array to be signed over. 40 | 41 | We propose the following string format, inspired by [EIP-4361][]. 42 | 43 | ``` 44 | ${domain} wants you to sign in with your Stacks account: 45 | ${address} 46 | ${statement} 47 | URI: ${uri} 48 | Version: ${version} 49 | Chain ID: ${chain-id} 50 | Nonce: ${nonce} 51 | Issued At: ${timestamp} 52 | Expiration Time: ${expiration-time} 53 | Not Before: ${not-before} 54 | Request ID: ${request-id} 55 | Resources: 56 | - ${resources[0]} 57 | - ${resources[1]} 58 | ... 59 | - ${resources[n]} 60 | ``` 61 | 62 | ### Signature Verification 63 | 64 | As in other secp256k1 systems, the public key from which an address is derived 65 | can be recovered by smart contracts or elsewhere from a signature and the 66 | signing address, via the Stacks equivalent of the [ECRecover][] pattern. With 67 | the signature and public key, the message can be verified using the same 68 | algorithm as for signature creation. The message needs to be hashed with SHA256 69 | before being used as an input for verification. 70 | 71 | ## References 72 | 73 | [EIP-4361]: https://eips.ethereum.org/EIPS/eip-4361 74 | [CAIP-122]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-122.md 75 | [SIP-018]: https://github.com/stacksgov/sips/pull/57 76 | [ECRecover]: https://docs.stacks.co/docs/write-smart-contracts/clarity-language/language-functions#secp256k1-recover 77 | 78 | - [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361): Sign-In with Ethereum 79 | - [CAIP-10](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md): Account ID Specification 80 | - [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md): Blockchain ID Specification 81 | - [CAIP-122](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-122.md): Sign in With X Specification 82 | -------------------------------------------------------------------------------- /aleo/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: aleo-caip2 3 | title: Aleo Network - Namespace Chains 4 | author: Jonathan Gonzalez (@jonandgon, jonathan@puzzle.online) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/129 6 | status: Draft 7 | type: Standard 8 | created: 2023-09-12 9 | requires (*optional): CAIP-2 10 | replaces (*optional): CAIP-2 11 | --- 12 | 13 | 20 | 21 | # CAIP-2 22 | 23 | *For context, see the [CAIP-2][] specification.* 24 | 25 | ## Rationale 26 | 27 | The namespace `aleo` refers to the Aleo Network Layer 1 blockchain. 28 | 29 | An identifier for a Aleo chain consists of the namespace prefix "aleo:" followed by the chain id. 30 | 31 | ## Syntax 32 | 33 | The Aleo chain ID system maps between a human-readabe string (used to discriminate networks in the paths of [node endpoints][], for example) and an unsigned 16-bit binary integer, known colloquially as an "`u16` number", ranging from 0 to 65535 which is used internally. 34 | For example, at time or writing, the u16 number `1` maps to `testnet` and `0` maps to `mainnet`. 35 | The canonical location of the mapping of u16 integers to network name strings is still to be determined by the community, but in the case of conflicts between the community documentation and this document, the former should be taken as canonical. 36 | 37 | ### Backwards Compatibility 38 | 39 | n/a 40 | 41 | ### Resolution Method 42 | 43 | To resolve a reference for the Aleo namespace, get the latest block information from the chain you are interested in from an Aleo API node. An example using Javascript: 44 | 45 | ```env 46 | fetch('https://api.explorer.provable.com/v1/mainnet/latest/block') 47 | .then(response => response.json()) 48 | .then(response => console.log(response.header.metadata.network)) 49 | ``` 50 | 51 | will log `0`. 52 | 53 | ## Test Cases 54 | 55 | This is a manually composed example. 56 | 57 | ```env 58 | # Aleo Testnet 59 | aleo:1 60 | 61 | # Aleo Mainnet 62 | aleo:0 63 | ``` 64 | 65 | ## Additional Considerations 66 | 67 | Testnet3 has been deprecated and shut down in favor of Testnet. 68 | 69 | ## References 70 | 71 | - [Aleo Network Documentation][]: Developer docs for the Aleo Network. 72 | 73 | [Aleo Network Documentation]: https://developer.aleo.org 74 | [node endpoints]: https://developer.aleo.org/testnet/getting_started/overview/#query-the-network 75 | [CAIP-2]: https://chainAgnostic.org/CAIPS/caip-2 76 | 77 | ## Copyright 78 | 79 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 80 | -------------------------------------------------------------------------------- /qubic/caipX.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: qubic-caip2 3 | title: Qubic Namespace - Blockchain ID Specification 4 | author: ["Aleix (@aleishio)"] 5 | discussions-to: 6 | status: Draft 7 | type: Standard 8 | created: 2025-02-20 9 | requires: ["CAIP-2"] 10 | --- 11 | 12 | # CAIP-2 13 | 14 | This document is about the details of the Qubic network namespace and reference for CAIP-2. 15 | 16 | ## Abstract 17 | 18 | In [CAIP-2], a general blockchain identification scheme is defined. 19 | This is the implementation of CAIP-2 for Qubic network. 20 | 21 | ## Specification 22 | 23 | ### Namespace 24 | 25 | The namespace "qubic" refers to the wider Qubic ecosystem. 26 | 27 | ### Reference Definition 28 | 29 | The reference for the Qubic mainnet is defined as follows: 30 | 31 | - `qubic:mainnet` 32 | 33 | ### Testnet Consideration 34 | 35 | As of the creation date of this document, the Qubic blockchain operates solely on its mainnet. 36 | Should a testnet be introduced in the future, it will be assigned a distinct reference, such as: 37 | 38 | qubic:testnet 39 | 40 | ## Semantics 41 | 42 | - **Namespace (`qubic`)**: Identifies the Qubic blockchain. 43 | - **Reference (`mainnet`)**: Specifies the primary live network of the Qubic blockchain. 44 | 45 | ## Syntax 46 | 47 | The blockchain identifier for Qubic adheres to the following syntax: 48 | 49 | qubic:mainnet 50 | 51 | This identifier is case-sensitive and must be used exactly as specified. 52 | 53 | ## Resolution Mechanics 54 | 55 | To resolve and interact with the Qubic blockchain using this identifier, clients should direct their requests to the official Qubic RPC endpoint: 56 | 57 | https://rpc.qubic.org 58 | 59 | This endpoint provides access to network statistics, smart contract interactions, and other blockchain-related data. 60 | Detailed API documentation is available at [Qubic RPC Documentation][RPC Docs]. 61 | 62 | ## Backwards Compatibility 63 | 64 | This is the initial definition of the Qubic namespace under the CAIP-2 standard. 65 | There are no previous versions or legacy identifiers associated with this specification. 66 | 67 | ## Test Cases 68 | 69 | To validate the correct implementation of the Qubic blockchain identifier, consider the following examples: 70 | 71 | - Valid Identifier: `qubic:mainnet` 72 | - Invalid Identifier: `Qubic:mainnet` (namespace must be lowercase) 73 | - Invalid Identifier: `qubic:MAINNET` (reference must be lowercase) 74 | - Invalid Identifier: `qubic:` (reference is required) 75 | 76 | ## Additional Considerations 77 | 78 | Future updates to the Qubic network, such as the introduction of additional networks (e.g., testnets), will necessitate corresponding updates to this specification to include new references. 79 | 80 | ## References 81 | 82 | - [Qubic RPC Documentation][RPC Docs] 83 | 84 | [RPC Docs]: https://qubic.github.io/integration/Partners/qubic-rpc-doc.html?urls.primaryName=Qubic%20RPC%20Archive%20Tree 85 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 86 | 87 | ## Copyright 88 | 89 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 90 | 91 | -------------------------------------------------------------------------------- /solana/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: solana-caip2 3 | title: Solana Namespace - Chains 4 | author: Antoine Herzog (@antoineherzog), Josh Hundley (@oJshua) 5 | discussions-to: https://github.com/ChainAgnostic/CAIPs/pull/60 6 | status: Draft 7 | type: Standard 8 | created: 2021-08-03 9 | updated: 2023-03-27 10 | requires: CAIP-2 11 | replaces: CAIP-28 12 | --- 13 | 14 | # CAIP-2 15 | 16 | *For context, see the [CAIP-2][] specification.* 17 | 18 | ## Rationale 19 | 20 | In CAIP-2 a general blockchain identification scheme is defined. This is the 21 | implementation of CAIP-2 for Solana. Blockchains in the "solana" namespace are 22 | validated by their genesis hash; each blockchain is maintained by a 23 | "[Cluster][]" of nodes, with its own gossip entrypoint and other endpoints. 24 | These genesis hashes require no transformations to be used as conformant CAIP-2 25 | references aside from concatenating their first 32 characters. 26 | 27 | ## Syntax 28 | 29 | The namespace "solana" refers to the Solana open-source blockchain platform. 30 | 31 | ### Reference Definition 32 | 33 | The definition for this namespace will use the `genesisHash` as an identifier 34 | for different Solana chains. The method for calculating the chain ID is as 35 | follows with pseudo-code: 36 | 37 | ```bash 38 | truncate(genesisHash, 32) 39 | ``` 40 | 41 | ### Resolution Method 42 | 43 | To resolve a blockchain reference for the Solana namespace, make a JSON-RPC 44 | request to the [RPC Endpoints][] of a blockchain node with method 45 | `getGenesisHash`, for example: 46 | 47 | ```jsonc 48 | // Request 49 | { 50 | "id": 1, 51 | "jsonrpc": "2.0", 52 | "method": "getGenesisHash" 53 | } 54 | 55 | // Response 56 | { 57 | "id": 1, 58 | "jsonrpc": "2.0", 59 | "result": "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d" 60 | } 61 | ``` 62 | 63 | The response will return as a value for the result a 44-character 64 | [Base58btc][]-encoded hash for the block with height 0 that should be truncated to 65 | its first 32 characters to be [CAIP-2][] compatible. 66 | 67 | ### Backwards Compatibility 68 | 69 | Not applicable 70 | 71 | ## Test Cases 72 | 73 | This is a list of manually composed examples 74 | 75 | ```bash 76 | # Solana Mainnet 77 | solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp 78 | 79 | # Solana Devnet 80 | solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1 81 | 82 | # Solana Testnet 83 | solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z 84 | 85 | ``` 86 | 87 | ## References 88 | 89 | - [RPC Endpoints][] - RPC reference in Solana official documentation 90 | - [Solana core][] rust crate on crates.io 91 | - [Base58btc][] encoding "alphabet" (i.e. character-set) 92 | 93 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 94 | [Cluster]: https://docs.solana.com/clusters 95 | [RPC Endpoints]: https://docs.solana.com/cluster/rpc-endpoints 96 | [Solana core]: https://crates.io/crates/solana-program/ 97 | [base58btc]: https://en.bitcoin.it/wiki/Base58Check_encoding#Base58_symbol_chart 98 | 99 | ## Copyright 100 | 101 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 102 | -------------------------------------------------------------------------------- /tvm/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: TVM 3 | title: TVM Ecosystem 4 | author: Lev Antropov(@levantropov), Vitaly Gritsay(@vvismaster) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/52/ 6 | status: Draft 7 | type: Informational 8 | created: 2023-03-22 9 | updated: 2023-03-22 10 | --- 11 | 12 | # CAIP-2 13 | 14 | *For context, see the [CAIP-2][] specification.* 15 | 16 | ## Rationale 17 | 18 | Networks using TVM do not have a single, commonly accepted standard for 19 | identifying chains with human-readable strings, but the core node runtime 20 | identifies chains by an integer between -2147483648 and 2147483648 (2^31). This 21 | integer is present in each block of each chain, in the property `global_id`. 22 | These work well as `chain_id` values for composing [CAIP-2][] and other 23 | chain-id-qualified CASA schemes. 24 | 25 | At time of writing there is not a central registry for avoiding `global_id` 26 | conflicts or for mapping `global_id`s to public endpoints; instead, implementers 27 | should seek chain and node information in each chain's documentation (see links 28 | section below for examples). 29 | 30 | ``` 31 | The name of the chain is built according to the following rule: 32 | tvm: 33 | ``` 34 | 35 | ## Syntax 36 | 37 | Since `global_id`s can only be integers between -2147483648 and 2147483648, they 38 | are easy to validate numerically. A simple regular expression for validating as 39 | a string so would be: 40 | `[-]?[0-9]{1-10}` 41 | 42 | ### Resolution Mechanics 43 | 44 | You can confirm which chain a given node is running by sending a GraphQL request 45 | to a node on that network, requesting only the "global_id" property of any 46 | block. See, for example: 47 | 48 | ``` 49 | // Using the GraphQL endpoint of Everscale mainnet (42): 50 | // https://dapp01.itgold.io/graphql 51 | 52 | // Request 53 | query{ 54 | blocks( 55 | limit: 1 56 | ){ 57 | global_id 58 | } 59 | } 60 | 61 | // Response 62 | { 63 | "data": { 64 | "blocks": [ 65 | { 66 | "global_id": 42 67 | } 68 | ] 69 | } 70 | } 71 | 72 | // Using the GraphQL endpoint of TON mainnet (-239): 73 | // https://dton.io/graphql 74 | 75 | // Request 76 | { 77 | blocks(page: 0, page_size: 1) { 78 | global_id 79 | } 80 | } 81 | 82 | // Response 83 | { 84 | "data": { 85 | "blocks": [ 86 | { 87 | "global_id": -239 88 | } 89 | ] 90 | } 91 | } 92 | ``` 93 | 94 | ## Test Cases 95 | 96 | This is a list of manually composed examples: 97 | 98 | ``` 99 | # Everscale mainnet (global id = 42) 100 | tvm:42 101 | 102 | # TON mainnet (global id = -239) 103 | tvm:-239 104 | ``` 105 | 106 | ## References 107 | * [Everscale Blockchain](https://docs.everscale.network) 108 | * [Everscale GraphQL](https://dapp01.itgold.io/graphql) 109 | * [TON Blockchain](https://ton.org) 110 | * [TON GraphQL](https://dton.io/graphql) 111 | 112 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 113 | 114 | ## Copyright 115 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 116 | -------------------------------------------------------------------------------- /koinos/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: koinos-caip2 3 | title: Koinos Namespace - Chains 4 | author: Roamin (@roaminro) 5 | status: Draft 6 | type: Standard 7 | created: 2023-04-10 8 | requires: CAIP-2 9 | --- 10 | 11 | # CAIP-2 12 | 13 | *For context, see the [CAIP-2][] specification.* 14 | 15 | ## Abstract 16 | 17 | In [CAIP-2][], a general blockchain identification scheme is defined. This is the 18 | implementation of CAIP-2 for networks that are based on the Koinos Blockchain Framework. 19 | 20 | ### Koinos Namespace 21 | 22 | The namespace "koinos" refers to the wider Koinos Blockchain Framework ecosystem. 23 | 24 | ## Rationale 25 | 26 | Koinos consists of multiple networks: a production network (Mainnet) and a 27 | testing network (TestNet). Each network has a unique chain id that can be used to identify it. 28 | 29 | An identifier for a Koinos chain consists of the namespace prefix "koinos:" 30 | followed by a truncated form of the chain id. 31 | 32 | ## Syntax 33 | 34 | Due to length and character limitations of CAIP-2 reference identifiers 35 | (references must adhere to `[-_a-zA-Z0-9]{1,32}`), the chain id of a Koinos chain cannot be used 36 | directly as a reference. 37 | 38 | Instead, only the first 32 characters of the URL-safe base64-encoding chain id will be used. 39 | 40 | ### Resolution Method 41 | 42 | To resolve the chain id for a Koinos chain, a GET request can be 43 | made to a Koinos node using the JSON-RPC method `chain.get_chain_id`. This will return 44 | a JSON object with the key `chain_id`, whose value is the base64-url chain id of the current chain. 45 | 46 | For example: 47 | 48 | ```jsonc 49 | // Request 50 | curl -d '{"jsonrpc":"2.0", "method":"chain.get_chain_id", "params":{}, "id":0}' https://api.koinos.io 51 | 52 | // Response (formatted) 53 | { 54 | "jsonrpc": "2.0", 55 | "result": { 56 | "chain_id": "EiBZK_GGVP0H_fXVAM3j6EAuz3-B-l3ejxRSewi7qIBfSA==" 57 | }, 58 | "id": 0 59 | } 60 | ``` 61 | 62 | Note that the `chain_id` value returned must be substringed to the first 32 characters. 63 | 64 | For example, this JavaScript code transforms the above response into a CAIP-2 identifier: 65 | 66 | ```javascript 67 | // For the Koinos mainnet 68 | const chainId = "EiBZK_GGVP0H_fXVAM3j6EAuz3-B-l3ejxRSewi7qIBfSA=="; 69 | const prefix = chainId.substring(0, 32); 70 | const identifier = "koinos:" + prefix; 71 | 72 | console.log(identifier); // prints "koinos:EiBZK_GGVP0H_fXVAM3j6EAuz3-B-l3e" 73 | 74 | ``` 75 | 76 | ## Backwards Compatibility 77 | 78 | Not applicable. 79 | 80 | ## Test Cases 81 | 82 | ``` 83 | # Koinos Mainnet (chain id= EiBZK_GGVP0H_fXVAM3j6EAuz3-B-l3ejxRSewi7qIBfSA== ) 84 | koinos:EiBZK_GGVP0H_fXVAM3j6EAuz3-B-l3e 85 | 86 | # Koinos Harbinger (Testnet; chain id= EiAAKqFi-puoXnuJTdn7qBGGJa8yd-dcS2P0ciODe4wupQ== ) 87 | koinos:EiAAKqFi-puoXnuJTdn7qBGGJa8yd-dc 88 | ``` 89 | 90 | ## References 91 | 92 | - [Koinos documentation](https://docs.koinos.io/) 93 | - [Koinos JSON-RPC](https://docs.koinos.io/rpc/json-rpc.html) 94 | - [CAIP-2][] 95 | 96 | [CAIP-2]: https://chainagnostic.org/CAIPs/caip-2 97 | 98 | ## Rights 99 | 100 | Copyright and related rights waived via CC0. 101 | -------------------------------------------------------------------------------- /eip155/caip211.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: eip155-caip25 3 | title: EIP155 Namespace, aka EVM Chains - JSON-RPC Provider Authorization 4 | author: Pedro Gomes (@pedrouid), Hassan Malik (@hmalik88), bumblefudge (@bumblefudge) 5 | discussions-to: 6 | status: Draft 7 | type: Standard 8 | created: 2024-02-05 9 | updated: 2024-02-05 10 | requires: ["CAIP-25", "CAIP-211", "CAIP-217"] 11 | --- 12 | 13 | # CAIP-25 14 | 15 | _For context, see the [CAIP-211] and [CAIP-25] specifications._ 16 | 17 | ## Rationale 18 | 19 | In the Ethereum space, JSON-RPC connections are not constrained by a single interface definition; numerous overlapping implicit and explicit authorities define the valid interactions between a user agent like a wallet and a decentralization application (whether web-based or otherwise). 20 | The core RPC capabilities (concretely, the syntax and semantics of RPC methods and notifications) of any Ethereum or EVM-compatible network are assumed to be defined by the consensus of the Ethereum Improvement Proposal process. 21 | In practice, this consensus is captured almost exhaustively by the [common API documentation][execution API] published by the execution-client community; 22 | this documentation should be considered the implicit authority when no overriding authority has been declared for RPC capabilities. 23 | 24 | ## Capability Expression 25 | 26 | In the context of [CAIP-25][] or other negotiations between decentralized applications and user agents, decentralization applications SHOULD ONLY request, and wallets SHOULD ONLY express support for, RPC methods and notifications specified in the [execution API] documentation. 27 | The [execution API] capabilities are considered the implicit default authority in any `eip155` authorization scope where no authorities have been explicitly declared. 28 | 29 | When requesting or expressing support for any other RPC methods and/or notifications, additional authorities SHOULD be requested in a separate [CAIP-217] `authorizationScope` object, with authorities and endpoints explicitly declared as specified in [CAIP-211]. 30 | 31 | In any scope object with additional authorities declared, methods or notifications specified by multiple authorities should be defined and understood according to the greatest authority in the list as per the [CAIP-211] specification. 32 | 33 | ## Examples 34 | 35 | ## References 36 | 37 | - [EIP155][]: Ethereum Improvement Proposal specifying generation and validation of ChainIDs 38 | 39 | [execution API]: https://github.com/ethereum/execution-apis?tab=readme-ov-file#execution-api-specification 40 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 41 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 42 | [CAIP-19]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md 43 | [CAIP-25]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-25.md 44 | [CAIP-211]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-211.md 45 | [CAIP-217]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-217.md 46 | [EIP]: https://eips.ethereum.org/EIPS/eip-1 47 | [EIP155]: https://eips.ethereum.org/EIPS/eip-155 48 | 49 | ## Rights 50 | 51 | Copyright and related rights waived via CC0. 52 | -------------------------------------------------------------------------------- /waves/caip10.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: waves-caip10 3 | title: Waves Namespace - Addresses 4 | author: Maxim Smolyakov (@msmolyakov), Yury Sidorov (@darksyd94) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/49 6 | status: Draft 7 | type: Standard 8 | created: 2023-01-19 9 | requires: ["CAIP-2", "CAIP-10"] 10 | --- 11 | 12 | # CAIP-10 13 | 14 | *For context, see the [CAIP-10][] specification.* 15 | 16 | ## Rationale 17 | 18 | Each Waves "account" has one public key that is the same across any Waves 19 | blockchain. But on each Waves blockchain, this public key is expressed as a 20 | distinct "address" expressed as a 26 byte array derived from public key (and 21 | chain identifier) and represented as a [Base58btc][] encoded string. 22 | 23 | Waves "address" can change depending on chain ID. This prevents unintentional 24 | transfers across Waves blockchains. Addresses also contain an [address 25 | checksum][] mechanism, which protects against typos and copying errors of the 26 | address. 27 | 28 | ## Syntax 29 | 30 | The syntax of Waves addresses: 31 | 32 | ``` 33 | caip10-like address: namespace + ":" chainId + ":" + address 34 | namespace: waves 35 | chain Id: [-128..127] value packed with leading zeros at least 3 characters in length 36 | address: Waves address represented as a [Base58btc][]-encoded string 37 | ``` 38 | 39 | The underlying form of each Waves address is byte array of `Entity type + Chain 40 | ID + Account public key hash + Checksum`, where: 41 | 1. `Entity type` — always 1-byte integer with value `1` 42 | 2. `Chain ID` — 1-byte integer of current blockchain ID 43 | 3. `Account public key hash` — first 20 bytes of the result of 44 | `keccak256(publicKey)` hashing function 45 | 4. `Checksum` — first 4 bytes of the result of `keccak256(Entity type + Chain ID 46 | + Account public key hash)` hashing function. 47 | 48 | ### Resolution method 49 | 50 | To derive an address from public key, make a GET HTTP request 51 | `/addresses/publicKey/{publicKey}` to the blockchain node, for example: 52 | https://nodes-testnet.wavesnodes.com/addresses/publicKey/7Y5rWP1aB1iGkDer8cS9TasAv1HpvCMZiZ2C9KLema6 53 | 54 | Thus, the node will return in response an address of the account with the public 55 | key for the current blockchain, for example: 56 | 57 | ```json 58 | { 59 | "address": "3NBNV8hiq8DTVF7UmzFLSUwud3h3pKZkVB3" 60 | } 61 | ``` 62 | 63 | ## Test Cases 64 | 65 | ``` 66 | # Namespace-wide Public Key: 67 | # 7Y5rWP1aB1iGkDer8cS9TasAv1HpvCMZiZ2C9KLema6 68 | 69 | # Address on Waves Mainnet (87) 70 | waves:087:3PPPJ62chFkr7hQu34WLPwKiywCpeSbfap7 71 | 72 | # Address on Waves Testnet (84) 73 | waves:084:3NBNV8hiq8DTVF7UmzFLSUwud3h3pKZkVB3 74 | 75 | # Waves custom network (-7) 76 | waves:-07:4Wa91bcuNGyv4BdV52UJ2VdpRtvZTd4BZfm 77 | ``` 78 | 79 | ## Links 80 | 81 | - [About addresses in Waves Documentation][address format] 82 | - [Conversion between binary and Base58btc representation][base58btc] 83 | 84 | [address format]: https://docs.waves.tech/en/blockchain/account/address 85 | [address checksum]: https://docs.waves.tech/en/blockchain/binary-format/address-binary-format 86 | [base58btc]: https://en.bitcoin.it/wiki/Base58Check_encoding#Base58_symbol_chart 87 | 88 | ## Copyright 89 | 90 | Copyright and related rights waived via 91 | [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 92 | -------------------------------------------------------------------------------- /ergo/caip10.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: ergo-caip10 3 | title: Ergo Namespace - Addresses 4 | author: Yuriy Gagarin (@gagarin55) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/98 6 | status: Draft 7 | type: Standard 8 | created: 2023-11-02 9 | updated: 2023-11-09 10 | requires: ["CAIP-2", "CAIP-10"] 11 | --- 12 | 13 | # CAIP-10 14 | 15 | *For context, see the [CAIP-10][] specification.* 16 | 17 | ## Rationale 18 | 19 | A given Ergo "address" changes completely depending on the network identifier segment. 20 | Different address types in the Ergo-specific UTXO model, like the network identifier used to encode the network on which the address can be dereferenced, can only be determined by decoding the string and inspecting the initial prefix byte. 21 | This prevents unintentional transfers across Ergo blockchains. 22 | 23 | Constructing an address: 24 | 25 | - **Prefix byte** = `network identifier + address type discriminant` 26 | - **checksum** = `leftmost_4_bytes (blake2b256 (prefix byte || content bytes))` 27 | - **address** = `prefix byte || content bytes || checksum` 28 | 29 | Network type is 8-bit unsigned integer in which lower 4 bits are zeros. 30 | 31 | Possible values: 32 | * Mainnet - 0 (in hex `0x00`) 33 | * Testnet - 16 (in hex `0x10`) 34 | 35 | 36 | Address types are (semantics described below): 37 | 38 | * 0x01 - Pay-to-PublicKey(P2PK) address 39 | * 0x02 - Pay-to-Script-Hash(P2SH) 40 | * 0x03 - Pay-to-Script(P2S) 41 | 42 | For an address type, we form `content bytes` as follows: 43 | 44 | - **P2PK** - serialized (compressed) public key 45 | - **P2SH** - first 192 bits of the [Blake2b256][] hash of serialized script bytes 46 | - **P2S** - serialized script 47 | One the above has been constructed in binary, it is encoded according to the [Base58btc][] alphabet to be expressed as the `address` segment of a CAIP-10 string. 48 | The checksum is calculated after concatenating prefix byte to content bytes, and then postpended to form a full Ergo standard address notation. 49 | 50 | ## Syntax 51 | 52 | The syntax of Ergo addresses: 53 | 54 | ``` 55 | caip10-like address: namespace + ":" chainId + ":" + address 56 | namespace: ergo 57 | chain Id: 32-character prefix from the hash of the genesis block 58 | address: Ergo address represented as a [Base58btc][]-encoded string 59 | ``` 60 | 61 | 62 | 63 | ## Test Cases 64 | 65 | ``` 66 | # Namespace-wide bare public key in standard expression, without prefixes 67 | # 0x0202f2b96aa59e6f37fc978883f78e54fd319fa37dcf971d8e69f9e9225376bcf1 68 | 69 | # P2PK Address on Ergo Mainnet 70 | ergo:b0244dfc267baca974a4caee06120321:9eYMpbGgBf42bCcnB2nG3wQdqPzpCCw5eB1YaWUUen9uCaW3wwm 71 | 72 | # P2PK Address on Ergo Testnet 73 | ergo:e7553c9a716bb3983ac8b0c21689a1f3:3WvdWQMfUeKFcsQudPM4zqTCcncSAtYZgi96Vr3zLJqYQVn2qmaw 74 | ``` 75 | 76 | ## Links 77 | 78 | - [About addresses in Ergo Documentation][address format] 79 | - [Conversion between binary and Base58btc representation][base58btc] 80 | 81 | [address format]: https://docs.ergoplatform.com/dev/wallet/address/address_types 82 | [base58btc]: https://en.bitcoin.it/wiki/Base58Check_encoding#Base58_symbol_chart 83 | [blake2b256]: https://datatracker.ietf.org/doc/html/rfc7693#section-4 84 | 85 | ## Copyright 86 | 87 | Copyright and related rights waived via 88 | [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 89 | -------------------------------------------------------------------------------- /eip155/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: eip155-caip2 3 | title: EIP155 Namespace, aka EVM Chains - Chains 4 | author: Simon Warta (@webmaster128), ligi , Pedro Gomes (@pedrouid), Antoine Herzog (@antoineherzog), Joel Thorstensson (@oed) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/2 6 | status: Draft 7 | type: Standard 8 | created: 2019-12-05 9 | updated: 2022-03-27 10 | requires: CAIP-2 11 | replaces: CAIP-3 12 | --- 13 | 14 | # CAIP-2 15 | 16 | *For context, see the [CAIP-2][] specification.* 17 | 18 | ## Rationale 19 | 20 | The chain ID defined in EIP155 is the most widely used chain identifier in the Ethereum ecosystem known to the authors. It optimizes for uniqueness and its usage for replay protection has helped it achieve wide adoption. 21 | Unique network IDs can be self-registered in the [ethereum-lists/chains][] registry. 22 | 23 | ## Syntax 24 | 25 | For reference, The format of reference currently specified in EIP155 is an unsigned integer of type UINT256, which is 64 characters long in hexadecimal notation. 26 | That said, the longest `chainId` registered in the registry is 15 characters long, and compatibility with major wallets and common tooling in the Ethereum ecosystem is endangered when `chainId`s exceed 55 bits, so implementers are encouraged to observe the much shorter profile defined in [EIP-2294](https://ethereum-magicians.org/t/eip-2294-explicit-bound-to-chain-id/11090/14) in contexts where longer chainIds need to be supported. 27 | 28 | ### Resolution Method 29 | 30 | To resolve a blockchain reference for the EIP155 namespace, make a JSON-RPC request to a blockchain node with method `eth_chainId`, for example: 31 | 32 | ``` 33 | // Request 34 | { 35 | "id": 1, 36 | "jsonrpc": "2.0", 37 | "method": "eth_chainId", 38 | "params": [] 39 | } 40 | 41 | // Response 42 | { 43 | "id": 1, 44 | "jsonrpc": "2.0", 45 | "result": "0x1" 46 | } 47 | ``` 48 | 49 | The response will return a base-16-encoded integer that should be converted to base 10 to format an EIP155-compatible blockchain reference. 50 | 51 | ## Test Cases 52 | 53 | This is a list of manually composed examples 54 | 55 | ``` 56 | # Ethereum mainnet 57 | eip155:1 58 | 59 | # Görli 60 | eip155:5 61 | 62 | # Auxilium Network Mainnet 63 | eip155:28945486 64 | ``` 65 | 66 | ## References 67 | 68 | - [EIP155][]: Ethereum Improvement Proposal specifying generation and validation of ChainIDs 69 | - [ethereum-lists/chains][]: An open registry for eip155 network operators to claim a 70 | unique chainID and self-publish RPC/node information for them. 71 | - [ERC20][]: Basic [aka Fungible] Token Standard 72 | - [ERC721][]: Non-Fungible Token Standard 73 | 74 | [ethereum-lists/chains]: https://github.com/ethereum-lists/chains 75 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 76 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 77 | [CAIP-19]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md 78 | [CAIP-21]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-21.md 79 | [CAIP-22]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-22.md 80 | [EIP155]: https://eips.ethereum.org/EIPS/eip-155 81 | [ERC20]: https://eips.ethereum.org/EIPS/eip-20 82 | [ERC721]: https://eips.ethereum.org/EIPS/eip-721 83 | 84 | 85 | ## Rights 86 | 87 | Copyright and related rights waived via CC0. 88 | -------------------------------------------------------------------------------- /_includes/caiptable.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | {% assign allpages = site.pages | sort: "dir" %} 6 | 7 | {% assign namespaces = "" | split: ',' %} 8 | {% assign namespaceTitles = "" | split: ',' %} 9 | 10 | {% for page in allpages | group: "dir" %} 11 | {% if page.dir == "/" or page.dir == "/assets/" %} 12 | {% elsif namespaces contains page.dir %} 13 | {% else %} 14 | {% assign namespaces = namespaces | push: page.dir %} 15 | {% assign namespaceTitles = namespacesTitles | push: page.title %} 16 | {% endif %} 17 | {% endfor %} 18 | 19 |
20 | Chain Agnostic Namespaces offer an informative context and profiles for various Chain Agnostic Improvement Proposals ("CAIPs") for a given blockchain environment, serving as a reference for cross-chain and cross-ecosystem development. For more information on the Chain Agnostic Standards Alliance that edits these standards, see our homepage on github

21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | {% for dir in namespaces | sort: "dir" %} 40 | {% assign namespacetitle = "" %} 41 | {% assign namespace = "" | split: ',' %} 42 | {% for page in allpages | group: "dir" %} 43 | {% if dir == page.dir %} 44 | {% if page.name == "README.md" %} 45 | {% assign namespacetitle = page.title %} 46 | {% endif %} 47 | {% assign namespace = namespace | push: {{page.name}} %} 48 | {% endif %} 49 | {% endfor %} 50 | 51 | 52 | 53 | 54 | 61 | 66 | 71 | 76 | 81 | 86 | 91 | 92 | {% endfor %} 93 |
NamespaceCAIP profiles
Informative Context2101925122350
55 | {% if namespace contains "README.md" %} 56 | {{- namespacetitle -}} 57 | {% else %} 58 | {{ dir }} 59 | {% endif %} 60 | 62 | {% if namespace contains "caip2.md" %} 63 | X 64 | {% endif %} 65 | 67 | {% if namespace contains "caip10.md" %} 68 | X 69 | {% endif %} 70 | 72 | {% if namespace contains "caip19.md" %} 73 | X 74 | {% endif %} 75 | 77 | {% if namespace contains "caip25.md" %} 78 | X 79 | {% endif %} 80 | 82 | {% if namespace contains "caip122.md" %} 83 | X 84 | {% endif %} 85 | 87 | {% if namespace contains "caip350.md" %} 88 | X 89 | {% endif %} 90 |
94 | -------------------------------------------------------------------------------- /bip122/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: bip122-caip2 3 | title: BIP122 Namespace - Chains 4 | author: Simon Warta (@webmaster128), ligi , Pedro Gomes (@pedrouid), RareData (@RareData) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pulls/3 6 | status: Draft 7 | type: Standard 8 | created: 2019-12-05 9 | updated: 2024-08-17 10 | requires: CAIP-2 11 | replaces: CAIP-4 12 | --- 13 | 14 | # CAIP-2 15 | 16 | *For context, see the [CAIP-2][] specification.* 17 | 18 | ## Rationale 19 | 20 | The chain ID identifiers for BIP122 are specified in [BIP122's chain ID 21 | definition](https://github.com/bitcoin/bips/blob/master/bip-0122.mediawiki#definition-of-chain-id). 22 | 23 | ## Syntax 24 | 25 | The syntax for BIP122 chain ID can be summarized as a 32-character prefix from 26 | the hash of the genesis block of a given chain, in lowercase hex 27 | representation. 28 | 29 | ### Resolution Method 30 | 31 | To query for a Chain ID to represent or checksum a BIP122 reference, make a 32 | JSON-RPC request to the blockchain node with method `getblockhash`, for example: 33 | 34 | ```jsonc 35 | // Request 36 | { 37 | "id": 1, 38 | "jsonrpc": "2.0", 39 | "method": "getblockhash", 40 | "params": [0] 41 | } 42 | 43 | // Response 44 | { 45 | "id": 1, 46 | "jsonrpc": "2.0", 47 | "result": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f" 48 | } 49 | ``` 50 | 51 | The response will return as a result value the hash for the block with height 0 52 | that should be sliced to its first 16 bytes (32 characters for base 16) to be 53 | compatible with the reference syntax defined above. 54 | 55 | ## Test Cases 56 | 57 | This is a list of manually composed examples: 58 | 59 | ``` 60 | # Bitcoin mainnet (see https://github.com/bitcoin/bips/blob/master/bip-0122.mediawiki#definition-of-chain-id) 61 | bip122:000000000019d6689c085ae165831e93 62 | 63 | # Bitcoin Cash mainnet (forked from Bitcoin mainnet, the first Bitcoin Cash block is 478559) 64 | bip122:000000000000000000651ef99cb9fcbe 65 | 66 | # Litecoin mainnet 67 | bip122:12a765e31ffd4059bada1e25190f6e98 68 | 69 | # Dogecoin mainnet 70 | bip122:1a91e3dace36e2be3bf030a65679fe82 71 | 72 | # Bitcoin testnet 73 | bip122:000000000933ea01ad0ee984209779ba 74 | 75 | # Litecoin testnet 76 | bip122:4966625a4b2851d9fdee139e56211a0d 77 | 78 | # Dogecoin testnet 79 | bip122:bb0a78264637406b6360aad926284d54 80 | ``` 81 | 82 | ## References 83 | 84 | - [BIP13][]: Bitcoin Improvement Proposal specifying "Script Hash" addresses 85 | - [BIP21][]: Bitcoin Improvement Proposal specifying `bitcoin` URI scheme 86 | - [BIP122][]: Bitcoin Improvement Proposal specifying `blockchain` URI scheme 87 | 88 | [BIP13]: https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki 89 | [BIP21]: https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki 90 | [BIP122]: https://github.com/bitcoin/bips/blob/master/bip-0122.mediawiki 91 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 92 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 93 | [CAIP-19]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md 94 | [CAIP-21]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-21.md 95 | [CAIP-22]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-22.md 96 | 97 | ## Rights 98 | 99 | Copyright and related rights waived via CC0. 100 | -------------------------------------------------------------------------------- /partisia/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: partisia-caip2 3 | title: Partisia Blockchain - Networks 4 | author: Partisia Blockchain Foundation 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/130 6 | status: Draft 7 | type: Standard 8 | created: 2024-10-22 9 | --- 10 | 11 | 18 | 19 | # CAIP-2 20 | 21 | *For context, see the [CAIP-2][] specification.* 22 | 23 | 24 | 25 | CAIP-2 defines a general identification scheme for blockchains. This is the implementation of CAIP-2 26 | for Partisia Blockchain. 27 | 28 | ## Rationale 29 | 30 | 31 | Partisia Blockchain consists of multiple networks: mainnet, testnet and potentially other private 32 | networks. 33 | Each network has a unique chain id that can be used to identify the network. 34 | 35 | The Partisia Blockchain networks are identified by the `partisia` namespace prefix, followed by the 36 | chain id of the particular network. 37 | 38 | ## Syntax 39 | 40 | The chain id of Partisia Blockchain is a human-readable identifier of the particular chain. Due to 41 | the character limitations of CAIP-2, all characters that are not allowed in the CAIP-2 characterset (i.e., 42 | `[^-_a-zA-Z0-9]`) are replaced with `_`. 43 | 44 | ### Resolution Mechanics 45 | 46 | To resolve the blockchain reference for a Partisia Blockchain chain, a GET request can be made to a 47 | running reader node on the path `/blockchain/chainId`. This will return a JSON object with the key 48 | `chainId` that are the human-readable chain id of this chain. 49 | 50 | For example: 51 | 52 | ``` 53 | # Request 54 | curl -s https://reader.partisiablockchain.com/blockchain/chainId 55 | 56 | #Response 57 | { 58 | "chainId": "Partisia Blockchain" 59 | } 60 | ``` 61 | 62 | To convert this to a valid CAIP-2 identifier one need only replace any characters not allowed by the 63 | specification and prefix with the namespace. 64 | 65 | An example of the conversion using curl and jq: 66 | ```bash 67 | curl -s https://reader.partisiablockchain.com/blockchain/chainId | jq -r '.chainId | "partisia:" +gsub("[^a-zA-Z0-9]"; "_")' # Outputs: partisia:Partisia_Blockchain 68 | ``` 69 | 70 | ### Backwards Compatibility 71 | 72 | Not applicable 73 | 74 | ## Test Cases 75 | 76 | ``` 77 | # Partisia Blockchain mainnet 78 | partisia:Partisia_Blockchain 79 | 80 | # Partisia Blockchain testnet 81 | partisia:Partisia_Blockchain_Testnet 82 | ``` 83 | 84 | ## References 85 | 86 | - [Partisia Blockchain Developer Documentation][] 87 | - [CAIP-2][] 88 | 89 | [Partisia Blockchain Developer Documentation]: https://partisiablockchain.gitlab.io/documentation/index.html 90 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md 91 | 92 | ## Copyright 93 | 94 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 95 | -------------------------------------------------------------------------------- /alephium/caip10.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: alephium-caip10 3 | title: Alephium Namespace - Addresses 4 | author: Hongchao Liu (@h0ngcha0) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/117 6 | status: Draft 7 | type: Standard 8 | created: 2024-06-19 9 | updated: 2024-06-19 10 | requires: ["CAIP-2", "CAIP-10"] 11 | --- 12 | 13 | # CAIP-10 14 | 15 | *For context, see the [CAIP-10][] specification.* 16 | 17 | ## Rationale 18 | 19 | An address on Alephium is a unique identifier that represents an 20 | account or a contract. All networks share the same address format. 21 | 22 | There are 4 different address types on Alephium: 23 | 24 | * 0x00 - Pay to public key hash (P2PKH) 25 | * 0x01 - Pay to multiple public key Hash (P2MPKH) 26 | * 0x02 - Pay to script hash (P2SH) 27 | * 0x03 - Pay to contract (P2C) 28 | 29 | For each address type, `content bytes` are defined as follows: 30 | 31 | - **P2PKH** - serialized public key hash 32 | - **P2MPKH** - serialized public key hashes and multisig threshold 33 | - **P2SH** - serialized script hash 34 | - **P2C** - serialized contract id 35 | 36 | Hash algorithm used is blake2b. 37 | 38 | Constructing an address: 39 | 40 | - **address** = `address type || content bytes` 41 | 42 | Each address on Alephium belongs to a group, which can be derived 43 | deterministically from the address. 44 | 45 | The algorithm for deriving group information from `P2PKH`, `P2MPKH` 46 | and `P2SH` address are similar: 47 | 48 | 1. Take the relevant bytes from the address. For `P2PKH` and `P2SH` 49 | address, take the `content bytes` directly. For `P2MPKH` address, 50 | take the part of the `content bytes` corresponding to the first 51 | public key hash. 52 | 2. Hash the relevant bytes from step 1 using the `djb2` hash algorithm 53 | and perform a bitwise OR operation to the hashed value with `1`. 54 | 3. Take the result from step 2, perform bitwise XOR operation on its 55 | last 4 bytes to get an one byte integer. 56 | 4. The group number is the remainder of this one byte integer dividing 57 | the total number of groups, which is currently `4` on Alephium. 58 | 59 | For `P2C` address, group number is encoded directly as its last byte 60 | of its `content bytes`. 61 | 62 | A Typescript implementation of the logic to derive group information 63 | from address can be found 64 | [here](https://github.com/alephium/alephium-web3/blob/b4df0f2858778dec3767a9d23737b7995d3673cb/packages/web3/src/address/address.ts#L88-L104). 65 | 66 | ## Syntax 67 | 68 | The native Alephium address encoding is a [Base58][]-encoded string of the type defined above. 69 | [CAIP-10][] simply uses an entire native address as the `account_address` component. 70 | 71 | ## Test Cases 72 | 73 | ``` 74 | # P2PKH address 75 | alephium:0_mainnet:15EM5rGtt7dPRZScE4Z9oL2EDfj84JnoSgq3NNgdcGFyu 76 | 77 | # P2MPKH address 78 | alephium:0_testnet:2jW1n2icPtc55Cdm8TF9FjGH681cWthsaZW3gaUFekFZepJoeyY3ZbY7y5SCtAjyCjLL24c4L2Vnfv3KDdAypCddfAY 79 | 80 | # P2C address 81 | alephium:2_mainnet:26j4viXkBzJd5SaDtQzyGM6joqoECmajncT4QS3tmT9hb 82 | 83 | # P2SH address 84 | alephium:0_testnet:ibsc1yJLJxxVcsPfSDJoR3mzrasrZq2Rn63dFQGcDAYE 85 | ``` 86 | 87 | ## References 88 | 89 | - [Alephium Documentation](https://docs.alephium.org/) 90 | - [base58btc](https://en.bitcoin.it/wiki/Base58Check_encoding#Base58_symbol_chart) 91 | 92 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 93 | 94 | ## Copyright 95 | 96 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 97 | -------------------------------------------------------------------------------- /monero/caip10.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: monero-caip10 3 | title: Monero - Addresses 4 | author: silverpill (@silverpill) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/issues/41 6 | status: Draft 7 | type: Informational 8 | created: 2023-09-01 9 | requires: ["CAIP-10"] 10 | --- 11 | 12 | # CAIP-10 13 | 14 | *For context, see the [CAIP-10][] specification.* 15 | 16 | ## Rationale 17 | 18 | CAIP-10 defines a pattern for identifying an account in a blockchain. 19 | Monero chains use UTXO model and [Monero addresses][] are functionally similar to accounts in other namespaces. 20 | 21 | ## Semantics 22 | 23 | Monero has several types of addresses: [standard address](https://monerodocs.org/public-address/standard-address/), [subaddress](https://monerodocs.org/public-address/subaddress/) and [integrated address](https://monerodocs.org/public-address/integrated-address/). 24 | Any address contains network and address type identifiers, public spend key, public view key, a checksum, and may contain additional data depending on the address type. 25 | Note that the [Base58-monero][base58-monero] encoding algorithm is used to encode the address from a byte array into a string; it uses the same alphabet as [base58btc][] but should not be decoded using [base58btc][] libraries due to the additional padding step to normalize string length. 26 | 27 | CAIP-10 "accounts" should not be confused with [Monero accounts][], which are used in Monero wallets for grouping related addresses and transactions. 28 | 29 | ## Syntax 30 | 31 | Monero CAIP-10 account ID is a case-sensitive string in the form: 32 | 33 | ``` 34 | account_id: chain_id + ":" + address 35 | chain_id: See Monero CAIP-2 profile 36 | address: [a-zA-Z0-9]{95,106} 37 | ``` 38 | 39 | The syntax of `chain_id` is specified in [Monero CAIP-2][]. 40 | 41 | ## Test Cases 42 | 43 | This is a list of manually composed examples: 44 | 45 | ``` 46 | # Monero mainnet standard address 47 | monero:418015bb9ae982a1975da7d79277c270:4AdUndXHHZ6cfufTMvppY6JwXNouMBzSkbLYfpAV5Usx3skxNgYeYTRj5UzqtReoS44qo9mtmXCqY45DJ852K5Jv2684Rge 48 | 49 | # Monero mainnet integrated address 50 | monero:418015bb9ae982a1975da7d79277c270:4LL9oSLmtpccfufTMvppY6JwXNouMBzSkbLYfpAV5Usx3skxNgYeYTRj5UzqtReoS44qo9mtmXCqY45DJ852K5Jv2bYXZKKQePHES9khPK 51 | 52 | # Monero private testnet subaddress 53 | monero:00000000000000000000000000000000:86MD1PNx3vmKUQjLvxNnmUfGQoHXAg8x56Nq97KrziKj5K8ACnpNUYx2KjiNAczP3igo7uUUUoGssDvKuZ7UUEoM1A8cvZs 54 | ``` 55 | 56 | ## Additional Considerations 57 | 58 | In the future new types of Monero addresses will be introduced. 59 | They will likely be longer and may exceed the 128 character limit set in [CAIP-10][] specification. 60 | 61 | ## References 62 | 63 | - [Address documentation][Monero Addresses] from Monero documentation 64 | - [Account documentation][Monero Accounts] from Monero documentation 65 | 66 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 67 | [Monero addresses]: https://www.getmonero.org/resources/moneropedia/address.html 68 | [Monero accounts]: https://www.getmonero.org/resources/moneropedia/account.html 69 | [base58-monero]: https://monerodocs.org/cryptography/base58/ 70 | [Monero CAIP-2]: https://github.com/ChainAgnostic/namespaces/blob/main/monero/caip2.md 71 | [base58btc]: https://datatracker.ietf.org/doc/html/draft-msporny-base58-02 72 | [base58btc-alphabet]: https://datatracker.ietf.org/doc/html/draft-msporny-base58-02#section-21 73 | 74 | ## Copyright 75 | 76 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 77 | -------------------------------------------------------------------------------- /mvx/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: mvx-caip2 3 | title: MultiversX Namespace - Chains 4 | author: MultiversX Team 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/issues/89 6 | status: Draft 7 | type: Standard 8 | created: 2023-09-11 9 | requires: ["CAIP-2"] 10 | --- 11 | 12 | # CAIP-2 13 | 14 | _For context, see the [CAIP-2][] specification._ 15 | 16 | ## Abstract 17 | 18 | In [CAIP-2][] a general blockchain identification scheme is defined. 19 | This is the implementation of CAIP-2 for the MultiversX network. 20 | 21 | ### MultiversX Namespace 22 | 23 | The namespace `mvx` refers to the wider MultiversX ecosystem. 24 | 25 | ## Rationale 26 | 27 | MultiversX consists of multiple networks: a production network (Mainnet), a development testing network (Devnet) 28 | and a testing network (Testnet). More may be canonically addressed in the future. 29 | 30 | ## Syntax 31 | 32 | An identifier for an MultiversX chain consists of the namespace prefix "mvx:" 33 | followed by the chain's `chainId`. 34 | 35 | ### Reference Definition 36 | 37 | The reference to the MultiversX chain is identical the MultiversX community's native one-character representation for each chain: 38 | `1` for `Mainnet`, 39 | `D` for `Devnet`, or 40 | `T` for `Testnet` 41 | 42 | ### Resolution Method 43 | 44 | To resolve a blockchain reference for the MultiversX namespace, you can query the `network/config` endpoint on either the [lower level layer](https://gateway.multiversx.com) or the public [higher level layer](https://api.multiversx.com) that uses the gateway level underneath. 45 | 46 | ```jsonc 47 | // Request 48 | curl -X GET "https://api.multiversx.com/network/config" -H "accept: application/json" 49 | 50 | // Response (formatted) 51 | { 52 | "data": { 53 | "config": { 54 | "erd_chain_id": "1", 55 | // ... other fields 56 | } 57 | }, 58 | "code": "successful" 59 | } 60 | ``` 61 | 62 | The response will return a JSON object which will include the network configuration information and 63 | the `erd_chain_id` defined above can be retrieved from the `config` property of the 64 | response object. 65 | This can be used directly as the `reference` section of a CAIP-2 or CAIP-10. 66 | 67 | ## Backwards Compatibility 68 | 69 | Not applicable. 70 | 71 | ## Test Cases 72 | 73 | ``` 74 | This is a list of manually composed examples 75 | 76 | # MultiversX Mainnet 77 | mvx:1 78 | 79 | # MultiversX Devnet 80 | mvx:D 81 | 82 | # MultiversX Testnet 83 | mvx:T 84 | ``` 85 | 86 | ## References 87 | 88 | - [MultiversX Constants][] is where chainIds in their native, one-character representation are canonically published to date by the community 89 | - [MultiversX REST API][] 90 | - [MultiversX Specifications][] 91 | - [Integrators Guide][] 92 | 93 | [MultiversX Docs]: https://docs.multiversx.com/ 94 | [MultiversX Specifications]: https://github.com/multiversx/mx-specs 95 | [MultiversX Constants]: https://docs.multiversx.com/developers/constants 96 | [MultiversX governance]: https://agora.multiversx.com/c/governance/9 97 | [MultiversX REST API]: https://docs.multiversx.com/sdk-and-tools/rest-api 98 | [Integrators Guide]: https://docs.multiversx.com/integrators/overview 99 | [BIP_0173]: https://en.bitcoin.it/wiki/BIP_0173 100 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 101 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 102 | 103 | ## Rights 104 | 105 | Copyright and related rights waived via CC0. 106 | -------------------------------------------------------------------------------- /monero/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: monero-caip2 3 | title: Monero - Chains 4 | author: silverpill (@silverpill) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/issues/41 6 | status: Draft 7 | type: Informational 8 | created: 2023-04-27 9 | requires: ["CAIP-2"] 10 | --- 11 | 12 | # CAIP-2 13 | 14 | *For context, see the [CAIP-2][] specification.* 15 | 16 | ## Rationale 17 | 18 | CAIP-2 defines a way to identify a blockchain. Monero blockchain, its forks and testnets can be uniquely identified by their genesis blocks. 19 | 20 | ## Syntax 21 | 22 | Monero chain ID is a hash of its genesis block, truncated to the first 32 characters. 23 | 24 | ### Resolution Mechanics 25 | 26 | To obtain the genesis block hash, make a JSON-RPC request to the Monero daemon with method [get_block_header_by_height]. 27 | 28 | Request: 29 | 30 | ```json 31 | { 32 | "jsonrpc": "2.0", 33 | "id": "0", 34 | "method": "get_block_header_by_height", 35 | "params": { 36 | "height": 0 37 | } 38 | } 39 | ``` 40 | 41 | Response example (Monero mainnet): 42 | 43 | ```json 44 | { 45 | "id": "0", 46 | "jsonrpc": "2.0", 47 | "result": { 48 | "block_header": { 49 | "block_size": 80, 50 | "block_weight": 80, 51 | "cumulative_difficulty": 1, 52 | "cumulative_difficulty_top64": 0, 53 | "depth": 2873685, 54 | "difficulty": 1, 55 | "difficulty_top64": 0, 56 | "hash": "418015bb9ae982a1975da7d79277c2705727a56894ba0fb246adaabb1f4632e3", 57 | "height": 0, 58 | "long_term_weight": 80, 59 | "major_version": 1, 60 | "miner_tx_hash": "c88ce9783b4f11190d7b9c17a69c1c52200f9faaee8e98dd07e6811175177139", 61 | "minor_version": 0, 62 | "nonce": 10000, 63 | "num_txes": 0, 64 | "orphan_status": false, 65 | "pow_hash": "", 66 | "prev_hash": "0000000000000000000000000000000000000000000000000000000000000000", 67 | "reward": 17592186044415, 68 | "timestamp": 0, 69 | "wide_cumulative_difficulty": "0x1", 70 | "wide_difficulty": "0x1" 71 | }, 72 | "credits": 0, 73 | "status": "OK", 74 | "top_hash": "", 75 | "untrusted": false 76 | } 77 | } 78 | ``` 79 | 80 | ## Test Cases 81 | 82 | This is a list of manually composed examples: 83 | 84 | ``` 85 | # Monero mainnet 86 | monero:418015bb9ae982a1975da7d79277c270 87 | 88 | # Monero stagenet 89 | monero:76ee3cc98646292206cd3e86f74d88b4 90 | 91 | # Monero testnet 92 | monero:48ca7cd3c8de5b6a4d53d2861fbdaedc 93 | 94 | # Monero Private testnet (special case; see below) 95 | monero:00000000000000000000000000000000 96 | 97 | # Wownero mainnet 98 | monero:a3fd635dd5cb55700317783469ba749b 99 | ``` 100 | 101 | ## Additional Considerations 102 | 103 | Private testnet (also known as **regtest** or **fakechain**) has the same genesis block hash as Monero mainnet. 104 | To avoid conflicts, implementers should use chain ID `monero:00000000000000000000000000000000` to identify this chain, as above, and implementers are advised to take care in disambiguating this special case in their code. 105 | 106 | ## References 107 | 108 | - [Monero Networks][] 109 | 110 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 111 | [get_block_header_by_height]: https://www.getmonero.org/resources/developer-guides/daemon-rpc.html#get_block_header_by_height 112 | [Monero Networks]: https://monerodocs.org/infrastructure/networks/ 113 | 114 | ## Copyright 115 | 116 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 117 | -------------------------------------------------------------------------------- /stellar/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: stellar 3 | title: Stellar Namespace - Chains 4 | author: Gleb Pitsevich (@pitsevich) 5 | discussions-to: https://github.com/ChainAgnostic/CAIPs/pull/44 6 | status: Draft 7 | type: Standard 8 | created: 2021-02-17 9 | updated: 2022-03-27 10 | requires: CAIP-2 11 | replaces: CAIP-28 12 | --- 13 | 14 | # CAIP-2. 15 | 16 | *For context, see the [CAIP-2][] specification.* 17 | 18 | ## Rationale 19 | 20 | The namespace `stellar` refers to the wider Stellar ecosystem, including private 21 | networks. 22 | 23 | Each Stellar network has its own unique passphrase, which is to sign the genesis 24 | block but also used when validating signatures on a given transaction to ensure 25 | it was intended for that chain. The current passphrases for the Stellar public main-net 26 | and public testnet, commonly referred to as `pubnet` and `testnet` respectively, are: 27 | - Pubnet: `Public Global Stellar Network ; September 2015` 28 | - Testnet: `Test SDF Network ; September 2015` 29 | 30 | ## Syntax 31 | 32 | The reference relies on Stellar's current designation of addresses belonging to 33 | test or main networks by prefixing them with `testnet` or `pubnet` 34 | correspondingly. As these are the only two documented public Stellar networks, 35 | the only known chain IDs are `testnet` and `pubnet`. 36 | 37 | ### Resolution Method 38 | 39 | To resolve a blockchain reference for the Stellar namespace, make a REST GET 40 | request to the Stellar Horizon node with endpoint `/` or REST GET request to the 41 | Stellar Core node with endpoint `/info`, for example: 42 | 43 | ```jsonc 44 | // Request 45 | curl -X GET "https://horizon.stellar.org/" -H "accept: application/json" 46 | // Response 47 | { 48 | "_links": {"...": "..."}, 49 | "horizon_version": "2.0.0-rc-89ef5f86ac784d35e29845496e8e1bceac31298a", 50 | "core_version": "stellar-core 15.2.0 (54b03f755ae5d5aa12a799c8f1ee4d87fc9d1a1d)", 51 | "ingest_latest_ledger": 34073932, 52 | "history_latest_ledger": 34073932, 53 | "history_latest_ledger_closed_at": "2021-02-19T15:50:02Z", 54 | "history_elder_ledger": 2, 55 | "core_latest_ledger": 34073932, 56 | "network_passphrase": "Public Global Stellar Network ; September 2015", 57 | "current_protocol_version": 15, 58 | "core_supported_protocol_version": 15 59 | } 60 | ``` 61 | The response will return a JSON object which will include network information. 62 | 63 | The blockchain reference can be retrieved from `network_passphrase` response of 64 | Horizon or from the `network` response of Stellar Core. 65 | 66 | ### Backwards Compatibility 67 | 68 | Not applicable 69 | 70 | ## Test Cases 71 | 72 | This is a list of manually composed examples 73 | 74 | ``` 75 | # Testnet (Test SDF Network ; September 2015) 76 | stellar:testnet 77 | # Pubnet (Public Global Stellar Network ; September 2015) 78 | stellar:pubnet 79 | ``` 80 | 81 | ## References 82 | 83 | - [Stellar Specification](https://developers.stellar.org/docs) - 84 | - [Stellar Asset Types](https://developers.stellar.org/docs/issuing-assets/) - 85 | Context on asset-types in Stellar 86 | - [Stellar Network Passphrase](https://developers.stellar.org/docs/glossary/network-passphrase/) 87 | 88 | [Stellar Specification]: https://developers.stellar.org/docs 89 | [Stellar Asset Types]: https://developers.stellar.org/docs/issuing-assets/ 90 | [Stellar Network Passphrase]: https://developers.stellar.org/docs/glossary/network-passphrase/ 91 | 92 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 93 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 94 | 95 | ## Copyright 96 | 97 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). -------------------------------------------------------------------------------- /tezos/caip10.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: tezos-caip10 3 | title: Tezos Namespace - Account ID Specification 4 | author: Carlo van Driesten (@jdsika) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/40 6 | status: Draft 7 | type: Standard 8 | created: 2022-12-06 9 | updated: 2024-02-28 10 | requires: ["CAIP-2", "CAIP-10"] 11 | --- 12 | 13 | *For context, see the [CAIP-10][] specification.* 14 | 15 | ## Rationale 16 | 17 | Tezos supports the use of multiple public-key signature schemes; for this reason, a given account can have multiple addresses, each of which is prefixed with `tz1` ([Ed25519][] curve), `tz2` ([Secp256k1][] curve), `tz3` ([NIST P256][] curve), or `tz4` (BLS12-381 curve from the [BLS family][]) referenced in the [Tezos address types glossary][]. 18 | After the prefix, the rest of the account address is a [Base58 Check Encoded Blake2B Hash][] of a public key of the type corresponding to the prefix. 19 | 20 | ## Syntax 21 | 22 | The syntax of a Tezos address matches the following regular expression (note the [58-character alphabet][base58]): 23 | 24 | `(tz1|tz2|tz3|tz4)[1-9A-HJ-NP-Za-km-z]{33}` 25 | 26 | ## Chain IDs 27 | 28 | For how to compute a valid `chainId` segment or a list of examples, see [the CAIP-2 profile](./caip2.md). 29 | 30 | | Alias | Chain ID | 31 | | -------------- | -------------------------------- | 32 | | tezos:mainnet | tezos:NetXdQprcVkpaWU | 33 | | tezos:ghostnet | tezos:NetXnHfVqm9iesp | 34 | 35 | Tezos addresses are invariable across networks. 36 | 37 | ## Test Cases 38 | 39 | Manually composed examples follow: 40 | 41 | ```bash 42 | # Ed25519-key address on Tezos Mainnet 43 | # Genesis block hash: BLockGenesisGenesisGenesisGenesisGenesisf79b5d1CoW2 44 | tezos:NetXdQprcVkpaWU:tz1MJx9vhaNRSimcuXPK2rW4fLccQnDAnVKJ 45 | 46 | # NIST p256-key address on Tezos Ghostnet 47 | # Genesis block hash: BLockGenesisGenesisGenesisGenesisGenesis1db77eJNeJ9 48 | tezos:NetXnHfVqm9iesp:tz3btDQsDkqq2G7eBdrrLqetaAfLVw6BnPez 49 | ``` 50 | 51 | ## References 52 | 53 | - [Tezos address types][] - Important context on the Tezos system of addresses and key representations. 54 | - [Tezos Smart Contract][]: General definition of a Tezos smart contract. 55 | - [CAIP-2][]: Chain ID Specification. 56 | - [CAIP-10][]: Account ID Specification. 57 | - [Ed25519][] - Ed25519: high-speed high-security signatures. 58 | - [Secp256k1][] - Elliptic curve used in Bitcoin's public-key cryptography. 59 | - [NIST P256][] - One of the most used elliptic curves including native support in some mobile devices. 60 | - [BLS family][] - BLS12-381 is a pairing-friendly elliptic curve construction from the BLS family, with embedding degree 12. 61 | 62 | [Tezos address types]: https://tezos.gitlab.io/introduction/howtouse.html#implicit-accounts-and-smart-contracts 63 | [Tezos address types glossary]: https://tezos.gitlab.io/active/glossary.html#implicit-account 64 | [Tezos Smart Contract]: https://opentezos.com/tezos-basics/smart-contracts#general-definition-of-a-tezos-smart-contract 65 | [CAIP-2]: https://chainagnostic.org/CAIPs/caip-2 66 | [CAIP-10]: https://chainagnostic.org/CAIPs/caip-10 67 | [Base58]: https://datatracker.ietf.org/doc/html/draft-msporny-base58-03 68 | [Ed25519]: https://ed25519.cr.yp.to/ 69 | [Secp256k1]: https://en.bitcoin.it/wiki/Secp256k1 70 | [NIST P256]: https://csrc.nist.gov/csrc/media/events/workshop-on-elliptic-curve-cryptography-standards/documents/papers/session6-adalier-mehmet.pdf 71 | [BLS family]: https://eprint.iacr.org/2002/088 72 | [Base58 Check Encoded Blake2B Hash]: https://gitlab.com/tezos/tezos/-/blob/5bb8fd589cc8777f44c795b71acf3e0a5dcac06f/src/lib_crypto/blake2B.ml 73 | 74 | ## Rights 75 | 76 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 77 | -------------------------------------------------------------------------------- /casper/caip10.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: casper-caip10 3 | title: Casper - Addresses 4 | author: <["David Hernando ", "Adrian Wrona "]> 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/100 6 | status: Draft 7 | type: Standard 8 | created: 2024-01-12 9 | requires: ["CAIP-10"] 10 | 11 | --- 12 | 13 | 20 | 21 | # CAIP-10 22 | 23 | *For context, see the [CAIP-10][] specification.* 24 | 25 | ## Rationale 26 | 27 | The Casper blockchain uses an on-chain account-based model, uniquely identified by an AccountHash derived from a specific PublicKey. The AccountHash is derived from any of the supported PublicKey variants below to standardize keys that can vary in length. 28 | 29 | Casper supports two types of keys for creating accounts and signing transactions: 30 | 31 | - Ed25519 keys, which use the Edwards-curve Digital Signature Algorithm (EdDSA). 32 | 33 | - Secp256k1 keys, which use the Elliptic Curve Digital Signature Algorithm (ECDSA) with the P-256 curve. 34 | 35 | 36 | ## Syntax 37 | 38 | An Account hash is a 32-byte length hash derived from the public key by applying the `blake2b` hash function. 39 | 40 | Public key length depends on the key type: 41 | 42 | - For Ed25519, length is 66 bytes (the prefix 0x01 and the 64 bytes of the public key). 43 | 44 | - For Secp256k1, length is 68 bytes (the prefix 0x02 and the 66 bytes corresponding to the compressed form of the public key). 45 | 46 | Keys are usually represented with lowercase letters. However, [CEP-57] introduced an opt-in checksum scheme, based on EIP-55, to protect against copy errors by encoding a checksum in the capitalization of hexadecimal strings. 47 | 48 | ## Test Cases 49 | 50 | Ed25519 public key - checksummed 51 | `01d51D4d7e1Dc8166405EC6fFb21C94434Cfd4D9021Ed6D94A1FF3d7D613046710` 52 | 53 | Ed25519 public key - without checksum 54 | `01cd4f2ed572ea555ca46c17c83c43e609d2e916871236f40faa9ba747478e8dee` 55 | 56 | AccountHash for previous public key 57 | `account-hash-79c9563deeb7bbd05e91c7dddddec9328717fea1ae846dd54ab9dfeaae015bc0` 58 | 59 | Secp256k1 public key - checksummed 60 | `02038a9932973F5632BcF31ff9Ba83e7eB3Bd7457F85af79258bd6b0A1FF06017B5a` 61 | 62 | Secp256k1 public key - not checksummed 63 | `02022ade9bd8e06033e99b1bfbf789db4e2db0349045818469bbcaf756996900e838` 64 | 65 | AccountHash for previous public key 66 | `account-hash-5b7e450d8b1e58de5f012db6c6e934431a6b6b063e5d4955914675e791797712` 67 | 68 | Ed25519 public key - invalid checksum 69 | `01D51D4d7e1Dc8166405EC6fFb21C94434Cfd4D9021Ed6D94a1FF3d7d613046710` 70 | 71 | Secp256k1 public key - invalid checksum 72 | `02038A9932973f5632BcF31ff9Ba83e7eB3Bd7457F85af79258bd6b0A1FF06017b5A` 73 | 74 | ## References 75 | 76 | - [Accounts-and-Keys][] 77 | - [CEP-57][] 78 | - [Casper Docs site][] 79 | - [CAIP-10][] 80 | 81 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 82 | [CEP-57]: https://github.com/casper-network/ceps/blob/master/text/0057-checksummed-addresses.md 83 | [Accounts-and-Keys]: https://docs.casper.network/concepts/accounts-and-keys/ 84 | [Casper Docs site]: https://docs.casper.network/ 85 | 86 | ## Copyright 87 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 88 | -------------------------------------------------------------------------------- /eip155/caip19.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: eip155-caip19 3 | title: EIP155 Namespace, aka EVM Chains - Assets 4 | author: Simon Warta (@webmaster128), ligi , Pedro Gomes (@pedrouid), Antoine Herzog (@antoineherzog), Joel Thorstensson (@oed) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/2 6 | status: Draft 7 | type: Standard 8 | created: 2019-12-05 9 | updated: 2022-03-27 10 | requires: ["CAIP-2", "CAIP-10", "CAIP-19"] 11 | replaces: ["CAIP-21", "CAIP-22"] 12 | --- 13 | 14 | # CAIP-19 15 | 16 | _For context, see the [CAIP-19][] specification._ 17 | 18 | ## Rationale 19 | 20 | In the Ethereum space, most assets are either a unique on-chain token referenced 21 | by its address, often called a "native token" ([erc20][] tokens being the most 22 | common), or a uniquely-identifiable token within a registry governed by a 23 | contract at a given address ([erc721][] being the most common), often called an 24 | "NFT". An unambiguous and unique representation is easily achieved by using on- 25 | chain address prefixed by CAIP-2 information. 26 | 27 | ## Syntax 28 | 29 | After the CAIP-2 namespace+chainID, a slash defines an `asset_namespace` and an 30 | `asset_reference`. `asset_namespace` MUST refer to an asset type defined by an 31 | [Ethereum Improvement Proposal][EIP] of category ERC and status Final; the 32 | syntax is simply `erc` prepended to the final EIP number of the published 33 | document defining it, without a hyphen. 34 | 35 | - In the case of ERC20 tokens, the namespace is `erc20` and the address of the 36 | smart contract is the reference. 37 | - In the case of ERC721 tokens, the namespace is `erc721` and the address of the 38 | smart contract is the reference, with an optional additional identifier for 39 | the specific token separated from the reference by a "/" 40 | 41 | ## RegEx 42 | 43 | The RegEx validation strings are as follows: 44 | 45 | ``` 46 | asset_id: asset_type + "/" token_id 47 | asset_type: chain_id + "/" + asset_namespace + ":" + asset_reference 48 | chain_id: namespace + Blockchain ID as defined in [CAIP-2](./caip2.md) 49 | 50 | asset_namespace: erc[a-z0-9]{2,5} 51 | asset_reference: 0x[a-fA-F0-9]{40} 52 | token_id: [\d]{1,78} 53 | ``` 54 | 55 | ## Examples 56 | 57 | ``` 58 | # DAI Token 59 | eip155:1/erc20:0x6b175474e89094c44da98b954eedeac495271d0f 60 | 61 | # REQ Token 62 | eip155:1/erc20:0x8f8221afbb33998d8584a2b05749ba73c37a938a 63 | 64 | # CryptoKitties Collectible 65 | eip155:1/erc721:0x06012c8cf97BEaD5deAe237070F9587f8E7A266d 66 | 67 | # CryptoKitties Collectible ID 68 | eip155:1/erc721:0x06012c8cf97BEaD5deAe237070F9587f8E7A266d/771769 69 | 70 | # CryptoCoven.xyz Collectible ID 71 | eip155:1/erc721:0x5180db8f5c931aae63c74266b211f580155ecac8/4663 72 | ``` 73 | 74 | ## References 75 | 76 | - [EIP155][]: Ethereum Improvement Proposal specifying generation and validation of ChainIDs 77 | - [ethereum-lists/chains][]: An open registry for eip155 network operators to claim a 78 | unique chainID and self-publish RPC/node information for them. 79 | - [ERC20][]: Basic [aka Fungible] Token Standard 80 | - [ERC721][]: Non-Fungible Token Standard 81 | 82 | [Chainid.network]: https://github.com/ethereum-lists/chains 83 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 84 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 85 | [CAIP-19]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md 86 | [CAIP-21]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-21.md 87 | [CAIP-22]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-22.md 88 | [EIP]: https://eips.ethereum.org/EIPS/eip-1 89 | [EIP155]: https://eips.ethereum.org/EIPS/eip-155 90 | [ERC20]: https://eips.ethereum.org/EIPS/eip-20 91 | [ERC721]: https://eips.ethereum.org/EIPS/eip-721 92 | 93 | ## Rights 94 | 95 | Copyright and related rights waived via CC0. 96 | -------------------------------------------------------------------------------- /cosmos/caip10.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: cosmos-caip10 3 | title: Cosmos Namespace - Addresses 4 | author: Simon Warta (@webmaster128), Juan Caballero (@bumblefudge) 5 | discussions-to: https://github.com/ChainAgnostic/CAIPs/issues/5, https://github.com/ChainAgnostic/CAIPs/issues/6, https://github.com/ChainAgnostic/CAIPs/pull/1 6 | status: Draft 7 | type: Standard 8 | created: 2022-03-01 9 | updated: 2022-03-01 10 | requires: ["CAIP-2", "CAIP-10"] 11 | supersedes: CAIP-5 12 | --- 13 | 14 | # CAIP-10 15 | 16 | *For context, see the [CAIP-10][] specification.* 17 | 18 | ## Rationale 19 | 20 | Cosmos manages accounts on the "account" model rather than the UXTO model, but 21 | uses the format for "segwit" addresses proposed in the Bitcoin codebase by 22 | [BIP_0173][]. 23 | 24 | ## Syntax 25 | 26 | Valid CAIP-10 `account_id`s in this namespace are 20-byte "bech32" 27 | (i.e. checksummed base32 expressions, as defined in [BIP_0173][]) 28 | transformations of 32-byte secp256k1 public keys, prefixed by `cosmos` for an 29 | account address and `cosmosvaloper` for a validator address. For further 30 | information, see the [accounts][] section of the Cosmos documentation. 31 | 32 | These addresses can be validated with the following regular expressions, as the 33 | hexadecimals are normalized to lowercase: `cosmos[0-9a-f]{32}` for wallet 34 | addresses, `cosmosvaloper[0-9a-f]{32}` for validators. 35 | 36 | ## Test Cases 37 | 38 | TODO - PR's welcome! 39 | 40 | ## References 41 | 42 | - [ChainID tips][]: A useful thread on chainIDs on the Cosmos SDK github repo 43 | - [IOV Core TS][]: A reference implementation of the CAIP-2 section of this specification in the IOV Core SDK 44 | - [configuration objects][]: Tendermint core requires each chain have a unit 45 | genesis block and genesis block timestamp, and derives a chain ID 46 | (`chain_id` in their semantics) deterministically from those values; these 47 | - [IBC]: The Inter Blockchain Communication Protocol is used to enable bridges and multi-chain compatibility between Tendermint chains 48 | - [channels][]: The Inter-Blockchain Communication protocol establishes 49 | persistent "channels" between the clients of independent Cosmos-based 50 | blockchains; these can maintain state for assets across two chains like a 51 | bridged asset or smart contract. 52 | - [ICS]: The InterChain Standards are canonically maintained in this repo, and 53 | cover all aspects of interop and addressing between/across Cosmos chains 54 | and networks; these are equivalent to BIPs, EIPs, and CAIPs. 55 | - [IBC#517]: A GitHub thread containing a concise explanation of `chain_id` validation/constraints across Cosmos contexts 56 | 57 | [addresses][]: https://docs.cosmos.network/v0.42/basics/accounts.html 58 | [IBC#517]: https://github.com/cosmos/ibc/issues/517 59 | [IBC]: https://github.com/cosmos/ibc-go/blob/main/docs/ibc/overview.md 60 | [ICS]: https://github.com/cosmos/ibc 61 | [ChainID tips]: https://github.com/cosmos/cosmos-sdk/issues/5363 62 | [channels]: https://github.com/cosmos/ibc-go/blob/main/docs/ibc/overview.md#channels 63 | [clients]: https://github.com/cosmos/ibc-go/blob/main/docs/ibc/overview.md#clients 64 | [configuration objects]: https://docs.tendermint.com/v0.35/tendermint-core/using-tendermint.html#fields 65 | [IOV Core TS]: https://github.com/iov-one/iov-core/blob/1cd39e708b/packages/iov-cosmos/src/caip5.ts 66 | [BIP_0173]: https://en.bitcoin.it/wiki/BIP_0173 67 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 68 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 69 | [CAIP-19]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md 70 | [CAIP-21]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-21.md 71 | [CAIP-22]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-22.md 72 | 73 | ## Rights 74 | 75 | Copyright and related rights waived via CC0. -------------------------------------------------------------------------------- /cosmos/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: cosmos 3 | title: Cosmos Ecosystem 4 | author: Simon Warta (@webmaster128), bumblefudge (@bumblefudge) 5 | discussions-to: https://github.com/ChainAgnostic/CAIPs/issues/5, https://github.com/ChainAgnostic/CAIPs/issues/6, https://github.com/ChainAgnostic/CAIPs/pull/1 6 | status: Draft 7 | type: Standard 8 | created: 2022-03-01 9 | updated: 2022-03-26 10 | requires: CAIP-2 11 | supersedes: CAIP-5 12 | --- 13 | 14 | # Namespace for Cosmos chains 15 | 16 | This document describes the syntax and structure of the [Cosmos][] namespace, 17 | which formalized a URI scheme for references on the broader Cosmos ecosystem. 18 | This ecosystem includes many different kinds of blockchains, variously 19 | interoperable and interconnected, but share the consensus rules and 20 | [configuration objects][] of the Tendermint consensus engine. The namespace 21 | thus defined includes blockchains generated using the [Cosmos 22 | SDK](https://github.com/cosmos/cosmos-sdk) such as Cosmoshub, Binance, and the 23 | Cosmos Testnets, but also [Weave](https://github.com/iov-one/weave)-based 24 | blockchains, like IOV. These blockchains can have drastically different 25 | properties and capabilities, but have certain interoperability commitments 26 | imposed by the shared SDK and use the message-based Inter-Blockchain 27 | Communication Protocoal (IBC) to communicate and move assets between them along 28 | "[channels][]". 29 | 30 | ## References 31 | 32 | - [ChainID tips][] : A useful thread on chainIDs on the Cosmos SDK github repo 33 | - [IOV Core TS][] : A reference implementation of the CAIP-2 section of this specification in the IOV Core SDK 34 | - [configuration objects][] : Tendermint core requires each chain have a unit 35 | genesis block and genesis block timestamp, and derives a chain ID 36 | (`chain_id` in their semantics) deterministically from those values; these 37 | - [IBC][] : The Inter Blockchain Communication Protocol is used to enable bridges and multi-chain compatibility between Tendermint chains 38 | - [channels][] : The Inter-Blockchain Communication protocol establishes 39 | persistent "channels" between the clients of independent Cosmos-based 40 | blockchains; these can maintain state for assets across two chains like a 41 | bridged asset or smart contract. 42 | - [ICS][] : The InterChain Standards are canonically maintained in this repo, and 43 | cover all aspects of interop and addressing between/across Cosmos chains 44 | and networks; these are equivalent to BIPs, EIPs, and CAIPs. 45 | - [IBC#517][] : A GitHub thread containing a concise explanation of `chain_id` validation/constraints across Cosmos contexts 46 | 47 | [addresses]: https://docs.cosmos.network/v0.42/basics/accounts.html 48 | [IBC#517]: https://github.com/cosmos/ibc/issues/517 49 | [IBC]: https://github.com/cosmos/ibc-go/blob/main/docs/ibc/overview.md 50 | [ICS]: https://github.com/cosmos/ibc 51 | [ChainID tips]: https://github.com/cosmos/cosmos-sdk/issues/5363 52 | [channels]: https://github.com/cosmos/ibc-go/blob/main/docs/ibc/overview.md#channels 53 | [clients]: https://github.com/cosmos/ibc-go/blob/main/docs/ibc/overview.md#clients 54 | [configuration objects]: https://docs.tendermint.com/v0.35/tendermint-core/using-tendermint.html#fields 55 | [IOV Core TS]: https://github.com/iov-one/iov-core/blob/1cd39e708b/packages/iov-cosmos/src/caip5.ts 56 | [BIP_0173]: https://en.bitcoin.it/wiki/BIP_0173 57 | [CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md 58 | [CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md 59 | [CAIP-19]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md 60 | [CAIP-21]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-21.md 61 | [CAIP-22]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-22.md 62 | 63 | ## Rights 64 | 65 | Copyright and related rights waived via CC0. 66 | -------------------------------------------------------------------------------- /quai/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: quai 3 | title: Quai Namespace 4 | author: ["Jonathan Downing (@jdowning100)", "Dr. K (@mechanikalk)"] 5 | status: Draft 6 | type: Informational 7 | created: 2025-06-18 8 | --- 9 | 10 | # Namespace for Quai Network 11 | 12 | Quai is a decentralized, merge-mined, EVM-compatible Layer 1 network of blockchains that leverages a next-generation Proof-of-Work consensus mechanism called Proof-of-Entropy-Minima to eliminate block contention and provide lightning fast finality. Unlike traditional multi-chain systems, Quai uses a single global chain ID (9) for all shards and routes transactions based on address location, not per-chain logic, in which every address deterministically maps to a shard via its first byte. It supports protobuf-encoded transactions rather than RLP-encoded, setting it apart from standard Ethereum-based networks. 13 | 14 | ## Rationale 15 | 16 | Quai’s unique architectural model necessitates a distinct namespace for proper identification and interoperability. While it shares EVM compatibility at the level of contract execution, its divergence in transaction encoding (protobuf), shard-based address space, and shared global chain ID differentiate it from traditional Ethereum forks. Currently, only one shard is active in Quai, so integration is relatively simple. 17 | 18 | This namespace ensures that cross-chain tools such as WalletConnect, DID methods, and asset resolvers can interpret Quai’s model accurately — especially given the single-chain ID model combined with a sharded execution environment. 19 | 20 | ## Governance 21 | 22 | Quai protocol upgrades and standards are driven by the Quai Foundation in coordination with the Quai developer community. Improvement proposals are documented via QIPs (Quai Improvement Proposals), with reference implementations and discussion led through the official GitHub repositories and Discord. Final decisions for protocol-level changes are currently stewarded by core contributors, with an aim toward more decentralized governance in future roadmap stages. 23 | 24 | All RPC compatibility, chain metadata, and transaction standards are maintained openly at [docs.qu.ai][Quai Docs] and the [QIPs github repository][go-quia Github]. Developers are encouraged to participate in network design and contribute implementations via the quais.js SDK and go-quai node software repositories. 25 | 26 | ## References 27 | 28 | - [Quai Docs][] - Official Quai documentation including address sharding, quais.js SDK and Proof-of-Entropy-Minima (PoEM) reference 29 | - [Quai Docs: JSON-RPC][] - JSON-RPC Reference 30 | - [go-quai Github][] - Source code repository for the node protocol implementation 31 | - [Quai Improvement Proposals Github][] - Repository for QIPs and protocol design, including address sharding, Qi energy-based flatcoin controller design, and dynamic network expansion 32 | - [PoEM: A Better Proof-of-Work Fork Choice Rule][] - PoEM security proof, incentive design, and selfish mining analysis 33 | - [Quaiscan][] - Quai block explorer, currently running on shard 0, also known as cyprus-1 34 | - [Pelagus Wallet][] - Browser extension-based wallet that allows users to hold QUAI and interact with Quai mainnet and testnet dApps 35 | - [quais.js][] - SDK for deploying contracts and building dApps that interact with Quai 36 | 37 | [Quai Docs]: https://docs.qu.ai 38 | [Quai Docs: JSON-RPC]: https://docs.qu.ai/build/playground/overview#json-rpc-overview 39 | [go-quai Github]: https://github.com/dominant-strategies/go-quai 40 | [Quai Improvement Proposals Github]: https://github.com/quai-network/qips 41 | [PoEM: A Better Proof-of-Work Fork Choice Rule]: https://eprint.iacr.org/2024/200 42 | [Quaiscan]: https://quaiscan.io 43 | [Pelagus Wallet]: https://pelgauswallet.io 44 | [quais.js]: https://github.com/dominant-strategies/quais.js 45 | 46 | ## Copyright 47 | Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). 48 | -------------------------------------------------------------------------------- /hedera/caip10.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: hedera-caip10 3 | title: Hedera Namespace - Accounts 4 | author: Danno Ferrin (@shemnon) 5 | discussions-to: https://github.com/hashgraph/hedera-improvement-proposal/discussions/169 6 | status: Draft 7 | type: Standard 8 | created: 2021-11-01 9 | updated: 2022-03-27 10 | requires: ["CAIP-2", "CAIP-10"] 11 | replaces: CAIP-75 12 | --- 13 | 14 | # CAIP-10 15 | 16 | *For context, see the [CAIP-10][] specification.* 17 | 18 | ## Rationale 19 | 20 | In CAIP-10, a string-based general account address scheme is defined. The 21 | canonical representation of a Hedera Address encodes a three-part Hedera 22 | account ID as a string by separating the three parts with `.`s; this 23 | future-proofs the implementation of realms and shards, although in today's 24 | usage, effectively all known addresses still begin with `0.0.`. 25 | 26 | ### Syntax 27 | 28 | The `account_id` is a case-sensitive string in the form: 29 | 30 | ``` 31 | account_id: chain_id + ":" + account_address + checksum{0,1} 32 | chain_id: [:-a-zA-Z0-9]{5,32} 33 | account_address: [0-9]{1,19} + "." + [0-9]{1,19} + "." + [0-9]{1,19} 34 | optional checksum: "-" + [a-z]{5} 35 | ``` 36 | 37 | A regular expression for validating the above can be defined as: 38 | ``` 39 | hedera:[-a-zA-Z0-9]{5,32}:[0-9]{1,19}\.[0-9]{1,19}\.[0-9]{1,19}(\-[a-z]{5}){0,1} 40 | ``` 41 | 42 | ### Semantics 43 | 44 | The `chain_id` is specified by the [CAIP-2][] which describes the blockchain id. 45 | The `account_address` is the realm, shard, and account id, where each is 46 | separated by a dot (`.`) and each number is a non-negative signed 64-bit 47 | integer. The default value for realm and shard are 0. 48 | 49 | The optional checksum is described in 50 | [HIP-15](https://github.com/hashgraph/hedera-improvement-proposal/blob/master/HIP/hip-15.md). 51 | Addresses with or without checksum are both valid, so deduplication or 52 | canonicalization may be required. Note that intermediaries have no duty to 53 | validate the address against its 5-digit checksum. 54 | 55 | ## Test Cases 56 | 57 | This is a list of manually composed examples 58 | 59 | ``` 60 | # Devnet funding account 61 | hedera:devnet:0.0.98 62 | 63 | # Mainnet treasury 64 | hedera:mainnet:0.0.2 65 | 66 | # Previewnet app properties account 67 | hedera:previewnet:0.0.121 68 | 69 | # Mainnet account with checksum 70 | hedera:mainnet:0.0.123-vfmkw 71 | 72 | # Largest possible testnet account 73 | hedera:testnet:9223372036854775807.9223372036854775807.9223372036854775807 74 | ``` 75 | 76 | ## Backwards Compatibility 77 | 78 | Since the checksum is optional, in pathological account numbering scenarios it 79 | may need to be dropped. It is not expected that we will see this event in normal 80 | usage. 81 | 82 | ## References 83 | 84 | - [Hedera Developer Documentation][] 85 | - [Native Account Syntax][] - Explanation of shard + realm prefix usage within 86 | the Hedera ecosystem 87 | - [HIP-15][] - Hedera Improvment Proposal for Network Address Checksums 88 | - [HIP-30][] - CAIP Identifiers for the Hedera Network 89 | 90 | 91 | [CAIP-2]: https://chainAgnostic.org/CAIPS/caip-2 92 | [CAIP-10]: https://chainAgnostic.org/CAIPS/caip-10 93 | [CAIP-19]: https://chainAgnostic.org/CAIPS/caip-19 94 | [HIP-15]: https://github.com/hashgraph/hedera-improvement-proposal/blob/master/HIP/hip-15.md 95 | [HIP-30]: https://github.com/hashgraph/hedera-improvement-proposal/blob/master/HIP/hip-30.md 96 | [Hedera Developer Documentation]: https://docs.hedera.com/guides/ 97 | [Native Account Syntax]: https://docs.hedera.com/guides/core-concepts/accounts#account-id 98 | [Hedera Token Service SDK Docs]: https://docs.hedera.com/guides/docs/sdks/tokens 99 | [ERC20 & ERC721 Compatibility]: https://docs.hedera.com/guides/core-concepts/smart-contracts/supported-erc-token-standards 100 | 101 | ## Copyright 102 | 103 | Copyright and related rights waived 104 | via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).**** -------------------------------------------------------------------------------- /_template/caip350.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: 3 | binary-key: 4 | title: <{namespace common name} [, aka ecosystem name]> 5 | discussions-to: 6 | author: <["FirstName1 LastName1 (@GitHubUsername1)", "AnonHandle2 "]> 7 | status: Draft 8 | type: Informational 9 | created: 10 | requires: 11 | --- 12 | 13 | ## Chain reference 14 | 15 | ChainType binary key: `0xXXXX` 16 | [CAIP-104] namespace: `XXXXX` 17 | 18 | 19 | 20 | ### Text representation 21 | 22 | 23 | 24 | 25 | ##### Text representation -> CAIP-2 conversion 26 | 27 | 28 | 29 | ##### CAIP-2 - text representation conversion 30 | 31 | 32 | 33 | #### Binary representation 34 | 35 | 36 | 37 | #### Text -> binary conversion 38 | 39 | 40 | 41 | #### Binary -> text conversion 42 | 43 | 44 | 45 | #### Examples 46 | 47 | ## Addresses 48 | 49 | ### Text representation 50 | 51 | 52 | 53 | ##### Text representation -> native representation conversion 54 | 55 | 56 | 57 | 58 | 59 | ##### Native representation -> text representation conversion 60 | 61 | 62 | 63 | 64 | #### Binary representation 65 | 66 | 67 | 68 | #### Text -> binary conversion 69 | 70 | 71 | 72 | #### Binary -> text conversion 73 | 74 | 75 | 76 | #### Examples 77 | 78 | ### Error handling 79 | 80 | 81 | 82 | 85 | 86 | ### Implementation considerations 87 | 88 | 89 | 90 | 94 | 95 | ### Extra considerations 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /waves/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | caip: 2 3 | title: Waves Blockchain ID Specification 4 | author: Maxim Smolyakov (@msmolyakov), Yury Sidorov (@darksyd94) 5 | discussions-to: https://github.com/ChainAgnostic/namespaces/pull/49 6 | status: Draft 7 | type: Standard 8 | created: 2023-01-19 9 | requires: CAIP-2 10 | --- 11 | 12 | ## Abstract 13 | 14 | In CAIP-2 a general blockchain identification scheme is defined. This is the 15 | implementation of CAIP-2 for Waves network. 16 | 17 | ## Specification 18 | 19 | ### Syntax 20 | 21 | Blockchains in the "waves" namespace are identified by their chain ID. 22 | 23 | Chain ID format is a signed integer in decimal representation. The signed 24 | integer is represented as a one-byte signed integer in the range [-128..127]. 25 | 26 | ``` 27 | chainId: namespace + ":" + reference 28 | namespace: waves 29 | reference: integer in the range [-128..127], padded to 3 chars with leading 0s 30 | ``` 31 | 32 | If the value is shorter than 3 characters (negative sign included), then it must 33 | be padded with enough leading zeros to reach 3 characters, i.e. `-69` or `007`. 34 | 35 | ### Resolution method 36 | 37 | There is no in-protocol resolution method at present. But there is a solution 38 | for some cases where it might be needed. 39 | 40 | To resolve a blockchain reference for the Waves namespace, make a GET HTTP 41 | request `/addresses` to the blockchain node, for example: 42 | - ```GET https://nodes-testnet.wavesnodes.com/addresses``` 43 | 44 | The node will return in response an array of its public blockchain 45 | addresses, for example: 46 | 47 | ```json 48 | [ 49 | "3NA4UdyFVv7v1J6UgGe4moyHm2fambavqvm", 50 | "3MvbutkV3xapQVUcGBGWCongwfdH8LKTm8w" 51 | ] 52 | ``` 53 | 54 | Decode any of them as Base58 string and take the second byte from the resulting 55 | array, for example (in pseudocode): 56 | 57 | ```java 58 | byte getChainId(String address) { 59 | byte[] decodedAddress = decodeBase58(address); 60 | return decodedAddress[1]; 61 | } 62 | ``` 63 | 64 | This byte is the chain ID of the blockchain where this node is running. 65 | 66 | ## Rationale 67 | 68 | The chain ID is specified as a one-byte signed integer. 69 | 70 | For example, the chain ID of Mainnet is 87 (ASCII code of "W"). 71 | 72 | There may also be other custom networks based on Waves, but with a different 73 | chain ID. 74 | 75 | Chain ID is used in [binary 76 | format](https://docs.waves.tech/en/blockchain/binary-format/) in the addressing 77 | representations of all entities in the namespace, namely: 78 | - [Block][] 79 | - [Transaction][] 80 | - [Order][] 81 | - [Address][] 82 | - [Alias][] 83 | 84 | Therefore, these entities cannot be used on another network with different chain ID. 85 | 86 | ## Test Cases 87 | 88 | This is a list of manually composed examples 89 | 90 | ``` 91 | # Waves Mainnet 92 | waves:087 93 | 94 | # Waves Testnet 95 | waves:084 96 | 97 | # Waves Stagenet 98 | waves:083 99 | 100 | # Waves custom network used in the [private node Docker image][] 101 | waves:082 102 | 103 | # Waves custom network with a negative Chain ID 104 | waves:-07 105 | ``` 106 | 107 | ## Links 108 | 109 | - [About Chain ID in Waves Documentation](https://docs.waves.tech/en/blockchain/blockchain-network/#chain-id) 110 | - [About binary format of blockchain entities](https://docs.waves.tech/en/blockchain/binary-format/) 111 | 112 | [Block]: https://docs.waves.tech/en/blockchain/binary-format/block-binary-format 113 | [Transaction]: https://docs.waves.tech/en/blockchain/binary-format/transaction-binary-format/ 114 | [Order]: https://docs.waves.tech/en/blockchain/binary-format/order-binary-format 115 | [Address]: https://docs.waves.tech/en/blockchain/binary-format/address-binary-format 116 | [Alias]: https://docs.waves.tech/en/blockchain/binary-format/alias-binary-format 117 | [private node Docker image]: https://hub.docker.com/r/wavesplatform/waves-private-node 118 | 119 | ## Copyright 120 | 121 | Copyright and related rights waived via [CC0](../LICENSE). -------------------------------------------------------------------------------- /algorand/caip2.md: -------------------------------------------------------------------------------- 1 | --- 2 | namespace-identifier: algorand-caip2 3 | title: Algorand Namespace - Chains 4 | author: Jason Paulos (@jasonpaulos) 5 | status: Draft 6 | type: Standard 7 | created: 2023-01-11 8 | requires: CAIP-2 9 | --- 10 | 11 | # CAIP-2 12 | 13 | *For context, see the [CAIP-2][] specification.* 14 | 15 | ## Abstract 16 | 17 | In CAIP-2 a general blockchain identification scheme is defined. This is the 18 | implementation of CAIP-2 for Algorand network. 19 | 20 | ### Algorand Namespace 21 | 22 | The namespace "algorand" refers to the wider Algorand ecosystem. 23 | 24 | ## Rationale 25 | 26 | Algorand consists of multiple networks: a production network (MainNet), a 27 | testing network (TestNet), a network where new features are trialed (BetaNet), 28 | and many more, including private networks used for development. Each network has 29 | a unique genesis hash that can be used to identify it. 30 | 31 | An identifier for an Algorand chain consists of the namespace prefix "algorand:" 32 | followed by a truncated form of the chain's genesis hash. 33 | 34 | ## Syntax 35 | 36 | Due to length and character limitations of CAIP-2 reference identifiers 37 | (references must adhere to `[-_a-zA-Z0-9]{1,32}`), the commonly referenced 38 | standard base64-encoded genesis hash of an Algorand chain cannot be used 39 | directly as a reference. 40 | 41 | Instead, two changes must be made: 42 | 1. The genesis hash must be encoded with a URL-safe base64 alphabet (i.e. the 43 | characters `+` and `/` must be replaced with `-` and `_`, respectively). 44 | 2. Only the first 32 characters of the URL-safe base64-encoding will be used. 45 | 46 | ### Resolution Method 47 | 48 | To resolve the blockchain reference for an Algorand chain, a GET request can be 49 | made to an Algorand node on the path `/v2/transactions/params`. This will return 50 | a JSON object with the the key `genesis-hash`, whose value is the base64-encoded 51 | genesis hash of the current chain. 52 | 53 | For example: 54 | 55 | ```jsonc 56 | // Request 57 | curl -H "X-Algo-API-Token:${YOUR_AUTH_TOKEN}" "https://example.algorand.node/v2/transactions/params" 58 | 59 | // Response (formatted) 60 | { 61 | "consensus-version": "https://github.com/algorandfoundation/specs/tree/44fa607d6051730f5264526bf3c108d51f0eadb6", 62 | "fee": 0, 63 | "genesis-hash": "mFgazF+2uRS1tMiL9dsj01hJGySEmPN28B/TjjvpVW0=", 64 | "genesis-id": "betanet-v1.0", 65 | "last-round": 23473050, 66 | "min-fee": 1000 67 | } 68 | ``` 69 | 70 | Note that the `genesis-hash` value returned must be re-encoded with the URL-safe 71 | base64 alphabet, and it will be substringed to the first 32 characters. 72 | 73 | For example, this Node.js code transforms the above response into a CAIP-2 identifier: 74 | 75 | ```javascript 76 | const genesisHash = "mFgazF+2uRS1tMiL9dsj01hJGySEmPN28B/TjjvpVW0="; 77 | const urlSafe = Buffer.from(genesisHash, "base64").toString("base64url"); 78 | const prefix = urlSafe.substring(0, 32); 79 | const identifier = "algorand:" + prefix; 80 | 81 | console.log(identifier); // prints "algorand:mFgazF-2uRS1tMiL9dsj01hJGySEmPN2" 82 | ``` 83 | 84 | ## Backwards Compatibility 85 | 86 | Not applicable. 87 | 88 | ## Test Cases 89 | 90 | ``` 91 | # Algorand MainNet has the genesis hash wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8= 92 | algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73k 93 | 94 | # Algorand TestNet has the genesis hash SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI= 95 | algorand:SGO1GKSzyE7IEPItTxCByw9x8FmnrCDe 96 | 97 | # Algorand BetaNet has the genesis hash mFgazF+2uRS1tMiL9dsj01hJGySEmPN28B/TjjvpVW0= 98 | algorand:mFgazF-2uRS1tMiL9dsj01hJGySEmPN2 99 | ``` 100 | 101 | ## References 102 | 103 | - [Algorand Networks](https://developer.algorand.org/docs/get-details/algorand-networks/) 104 | - [Algorand REST API](https://developer.algorand.org/docs/rest-apis/algod/v2/) 105 | - [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md) 106 | 107 | ## Rights 108 | 109 | Copyright and related rights waived via CC0. 110 | --------------------------------------------------------------------------------