Skip to content

Commit c4edc0f

Browse files
authored
Merge branch 'main' into main
2 parents a9fd854 + d65ae6b commit c4edc0f

10 files changed

Lines changed: 513 additions & 19 deletions

File tree

.github/workflows/jekyll.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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 only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
24+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
25+
concurrency:
26+
group: "pages"
27+
cancel-in-progress: false
28+
29+
jobs:
30+
# Build job
31+
build:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
- name: Setup Ruby
37+
# https://github.com/ruby/setup-ruby/releases/tag/v1.207.0
38+
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4
39+
with:
40+
ruby-version: '3.1' # Not needed with a .ruby-version file
41+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
42+
cache-version: 0 # Increment this number if you need to re-download cached gems
43+
- name: Setup Pages
44+
id: pages
45+
uses: actions/configure-pages@v5
46+
- name: Build with Jekyll
47+
# Outputs to the './_site' directory by default
48+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
49+
env:
50+
JEKYLL_ENV: production
51+
- name: Upload artifact
52+
# Automatically uploads an artifact from the './_site' directory by default
53+
uses: actions/upload-pages-artifact@v3
54+
55+
# Deployment job
56+
deploy:
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
runs-on: ubuntu-latest
61+
needs: build
62+
steps:
63+
- name: Deploy to GitHub Pages
64+
id: deployment
65+
uses: actions/deploy-pages@v4

_template/caip350.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,27 @@ created: <date created on, in ISO 8601 (yyyy-mm-dd) format>
1010
requires: <list of standards required to understand this one>
1111
---
1212

13-
## Chain reference
14-
13+
## Namespace Reference
1514
ChainType binary key: `0xXXXX`
1615
[CAIP-104] namespace: `XXXXX`
1716

17+
## Chain reference
18+
1819
<!-- check existing caip350 profiles on namespaces chainagnostic.org as well as open PRs for collisions with previously-registered binary keys -->
1920

2021
### Text representation
2122

22-
<!-- a description of the format of chain namespace + reference intended for the text representation of ERC-7930 Interoperable Addresses -->
23+
<!-- a description of the format of the chain reference specific to this namespace -->
24+
<!-- this defines ONLY the chainReference portion; per CAIP-350, the full chain identifier is <namespace>:<chainReference> -->
2325
<!-- MUST include how to represent the ChainType without a reference, since that is supported by [ERC-7930] -->
2426

25-
##### Text representation -> CAIP-2 conversion
27+
##### Text representation -> customary (CAIP-2) conversion
2628

2729
<!-- instructions for how to convert from the above to a CAIP-2 string -->
2830

29-
##### CAIP-2 - text representation conversion
31+
##### Customary (CAIP-2) conversion - text representation conversion
3032

31-
<!-- instructions for how to convert from a CAIP-2 string to the Interoperable Address format -->
33+
<!-- instructions for how to convert from a CAIP-2 string to this standard's text representation -->
3234

3335
#### Binary representation
3436

bip122/caip350.md

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
---
2+
namespace-identifier: bip122-caip350
3+
title: BIP122 Namespace - Interoperable Address
4+
binary-key: 0001
5+
author: Orca (@0xrcinus), Mono (@0xMonoAx)
6+
discussions-to: https://ethereum-magicians.org/t/erc-7930-interoperable-addresses/23365
7+
status: Draft
8+
type: Standard
9+
created: 2026-01-29
10+
requires: CAIP-2
11+
---
12+
13+
## Namespace Reference
14+
15+
ChainType binary key: `0x0001`
16+
17+
[CAIP-104] namespace: `bip122`
18+
19+
## Chain reference
20+
21+
See this namespace's [CAIP-2](caip2.md) profile. The chain reference is the first 32 characters (16 bytes) of the genesis block hash in lowercase hex.
22+
23+
### Text representation
24+
25+
```
26+
<genesis_hash_prefix>
27+
```
28+
29+
This is the first 32 lowercase hex characters (16 bytes) of the genesis block hash as defined in [BIP122][].
30+
31+
> **Note:** Per [CAIP-350], the full chain identifier is `bip122:<genesis_hash_prefix>` (e.g., `bip122:000000000019d6689c085ae165831e93`, `bip122:000000000933ea01ad0ee984209779ba`).
32+
33+
##### Text representation -> customary (CAIP-2) conversion
34+
35+
The text representation (chain reference) is the same as the chain reference in the [CAIP-2](caip2.md) chain identifier; no conversion is needed.
36+
37+
##### Customary (CAIP-2) conversion - text representation conversion
38+
39+
The chain reference in the [CAIP-2](caip2.md) chain identifier is the same as the text representation; no conversion is needed.
40+
41+
#### Binary representation
42+
43+
The chain reference is the 16 bytes corresponding to the first 32 hex characters of the genesis block hash. Bytes are in the same order as the hex string (first two hex characters encode the first byte, etc.).
44+
45+
#### Text -> binary conversion
46+
47+
Decode the 32-character lowercase hex string to 16 bytes (RFC-4616 base16, no 0x-prefix).
48+
49+
#### Binary -> text conversion
50+
51+
Encode the 16 bytes as 32 lowercase hex characters (RFC-4616 base16, no 0x-prefix).
52+
53+
#### Examples
54+
55+
| Chain | Text (chain reference) | Binary |
56+
|-------|------------------------|--------------------------------|
57+
| Bitcoin mainnet | `000000000019d6689c085ae165831e93` | `0x000000000019d6689c085ae165831e93` |
58+
| Bitcoin testnet | `000000000933ea01ad0ee984209779ba` | `0x000000000933ea01ad0ee984209779ba` |
59+
| Litecoin mainnet | `12a765e31ffd4059bada1e25190f6e98` | `0x12a765e31ffd4059bada1e25190f6e98` |
60+
61+
## Addresses
62+
63+
See this namespace's [CAIP-10](caip10.md) profile. BIP122 supports multiple address types (P2SH, SegWit, Taproot) with different native encodings (base58btc, bech32, bech32m).
64+
65+
### Text representation
66+
67+
```
68+
<address>
69+
```
70+
71+
Where `<address>` is the full native ASCII form (base58btc, bech32, or bech32m) as in [CAIP-10](caip10.md)—e.g. P2SH `35PBEaofpUeH8VnnNSorM1QZsadrZoQp4N`, SegWit `bc1qwz2lhc40s8ty3l5jg3plpve3y3l82x9l42q7fk`, or Taproot `bc1pmzfrwwndsqmk5yh69yjr5lfgfg4ev8c0tsc06e`.
72+
73+
#### Text representation -> native representation conversion
74+
75+
No transformation; the text representation is the native representation.
76+
77+
#### Native representation -> text representation conversion
78+
79+
No transformation; the native representation is the text representation.
80+
81+
### Binary representation
82+
83+
The binary representation uses a one-byte type prefix followed by the decoded payload (without checksum):
84+
85+
- **0x01 — P2SH**: 1 byte version (network-dependent) + 20 bytes script hash (21 bytes total after type).
86+
- **0x02 — Witness (SegWit / Taproot)**: 1 byte witness version (0 for P2WPKH, 1 for P2TR, etc.) + 20 or 32 bytes program (22 or 34 bytes total after type).
87+
88+
Checksums are omitted in binary; they can be recomputed when converting back to text.
89+
90+
#### Text -> binary conversion
91+
92+
1. Detect address type from prefix (e.g. `3` for P2SH, `bc1q`/`tb1q` etc. for witness).
93+
2. Decode using the appropriate scheme ([base58btc][] for P2SH, [bech32][]/[bech32m][] for witness) and strip checksum.
94+
3. Prepend type byte 0x01 (P2SH) or 0x02 (witness), then append version byte and hash/program bytes as above.
95+
96+
#### Binary -> text conversion
97+
98+
1. Read the type byte (0x01 or 0x02).
99+
2. For 0x01: read 21 bytes (1 version + 20 hash), encode with base58btc including checksum for the target network.
100+
3. For 0x02: read 1 byte witness version, then 20 or 32 bytes program; encode with [bech32][] or [bech32m][] (and correct HRP for network).
101+
102+
### Examples
103+
104+
| Text (Bitcoin mainnet) | Binary (hex, after type byte) |
105+
|------------------------|-------------------------------|
106+
| P2SH `35PBEaofpUeH8VnnNSorM1QZsadrZoQp4N` | `0x01` + base58btc-decoded payload (version + 20-byte hash) |
107+
| SegWit `bc1qwz2lhc40s8ty3l5jg3plpve3y3l82x9l42q7fk` | `0x02` + `0x00` + 20-byte witness program |
108+
| Taproot `bc1pmzfrwwndsqmk5yh69yjr5lfgfg4ev8c0tsc06e` | `0x02` + `0x01` + 32-byte witness program |
109+
110+
## Error handling
111+
112+
When converting from this profile's [CAIP-2] encoding to this profile's [CAIP-350] encoding, the chain reference is already fully specified (32 hex chars), so no loss of information or difference of expression occurs. For addresses, invalid or unsupported native encodings (e.g. legacy P2PKH excluded from [CAIP-10](caip10.md)) should be rejected with an appropriate error.
113+
114+
## Implementation considerations
115+
116+
Legacy P2PKH addresses are excluded from [CAIP-10](caip10.md) and therefore from this profile. Only P2SH, SegWit, and Taproot address types are supported. Implementations must use the correct HRP and version bytes per network (e.g. mainnet vs testnet, or other BIP122 chains).
117+
118+
## References
119+
120+
[BIP122]: https://github.com/bitcoin/bips/blob/master/bip-0122.mediawiki
121+
[BIP13]: https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki
122+
[BIP173]: https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki
123+
[BIP350]: https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki
124+
[base58btc]: https://datatracker.ietf.org/doc/html/draft-msporny-base58-02
125+
[bech32]: https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki
126+
[bech32m]: https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki
127+
[CAIP-2]: https://chainagnostic.org/CAIPs/caip-2
128+
[CAIP-10]: https://chainagnostic.org/CAIPs/caip-10
129+
[CAIP-104]: https://chainagnostic.org/CAIPs/caip-104
130+
[CAIP-350]: https://chainagnostic.org/CAIPs/caip-350

casper/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
namespace-identifier: casper
33
title: Casper network
4-
author: <["David Hernando <david.hernando@make.services>", "Adrian Wrona <adrian@casper.network>"]>
4+
author: ["David Hernando <david.hernando@make.services>", "Adrian Wrona <adrian@casper.network>"]
55
discussions-to: https://github.com/ChainAgnostic/namespaces/pull/100
66
status: Draft
77
type: Informational

eip155/caip350.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,19 @@ See [EIP-155] and [EIP-2294].
2222
### Text representation
2323

2424
```
25-
eip155:<number>
25+
<number>
2626
```
27+
2728
Where `<number>` is the decimal representation of the chain's `chainId`, without leading zeroes.
2829

29-
##### Text representation -> CAIP-2 conversion
30+
> **Note:** Per [CAIP-350], the full chain identifier is `eip155:<number>` (e.g., `eip155:1`, `eip155:10`).
31+
32+
33+
##### Text representation -> customary (CAIP-2) conversion
3034

3135
In the case where the `chainId` is larger than what can be represented in 32 decimal characters, the leading 32 characters should be used.
3236

33-
##### CAIP-2 - text representation conversion
37+
##### Customary (CAIP-2) conversion - text representation conversion
3438

3539
This transformation would not be fully deterministic in the case where `chainId`s larger than 10^32 are used. It is assumed wallets and other software will be able to differentiate between chains from just the leading 32 decimal characters, and use a lookup table of popular chains to complete the missing information to convert CAIP-2 identifiers to this standard.
3640

@@ -60,8 +64,11 @@ Bytes of EVM addresses are trivially stored as the payload.
6064
It's worth noting that addresses are currently 20 bytes, but that might change in the future, most likely to 32 bytes [^2]
6165

6266
### Text representation
67+
```
68+
<address>
69+
```
70+
Where `<address>` is the 20 bytes of an EVM address, hexadecimal-encoded according to [EIP-55] with `0x` prefix.
6371

64-
For text representation, the 20 bytes of EVM addresses should be hexadecimal-encoded according to [EIP-55].
6572
This standard deliberately does not define the text representation of EVM addresses if they are extended in the future, since it's not possible to know which human-readable representation will be more familiar to users in such hypothetical scenario.
6673
This profile should be amended in the future to reflect it in such a case.
6774

solana/caip350.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,19 @@ We chose to use the blockhash in full, as opposed to using the [CAIP-2], for con
2222

2323
### Text representation
2424

25-
The full base58btc-encoded genesis blockhash is used. This is larger than the [CAIP-2] representation.
25+
```
26+
<genesis_blockhash>
27+
```
28+
Where `<genesis_blockhash>` is the full 44-character base58btc-encoded genesis blockhash. This is larger than the [CAIP-2] representation (which truncates to 32 characters).
2629

27-
##### Text representation -> CAIP-2 conversion
30+
> **Note:** Per [CAIP-350], the full chain identifier is `solana:<genesis_blockhash>` (e.g., `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d`).
2831
29-
The leading 32 characters are used, and the rest discarded, in a manner similar to what is specified on [this namespace's CAIP-2](caip2.md) profile.
3032

31-
##### CAIP-2 - text representation conversion
33+
##### Text representation -> customary (CAIP-2) conversion
34+
35+
The leading 32 characters are used, and the rest discarded, in a manner similar to what is specified on [this namespace's CAIP-2](caip2.md) profile (e.g., `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`).
36+
37+
##### Customary (CAIP-2) conversion?CAIP-2 - text representation conversion
3238

3339
This transformation is not fully deterministic.
3440
It is assumed wallets and other software will be able to differentiate between chains with just the leading 32 base58btc-encoded characters, and use a lookup table of chains to complete the missing information to convert [CAIP-2] identifiers to those defined in this standard.
@@ -61,7 +67,11 @@ Solana addresses are 32-byte public keys, conventionally displayed to users as b
6167

6268
### Text representation
6369

64-
base58btc-encoded ASCII of the entire public key bytes.
70+
```
71+
<public_key>
72+
```
73+
74+
Where `<public_key>` is the base58btc-encoded ASCII of the entire 32-byte public key.
6575

6676
##### Text representation -> native representation conversion
6777

stacks/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ the Stacks ecosystem.
1818
- [Stacks developer documentation][]
1919
- [CAIP-2][]
2020
- [CAIP-10][]
21+
- [CAIP-19][]
2122

2223
[SIP-005]: https://github.com/stacksgov/sips/blob/main/sips/sip-005/sip-005-blocks-and-transactions.md
2324
[Stacks developer documentation]: https://docs.stacks.co/
2425
[CAIP-2]: https://github.com/chainagnostic/caips/blob/master/caips/caip-2.md
2526
[CAIP-10]: https://github.com/chainagnostic/caips/blob/master/caips/caip-10.md
27+
[CAIP-19]: https://github.com/chainagnostic/caips/blob/master/caips/caip-19.md
2628

2729
## Copyright
2830

0 commit comments

Comments
 (0)