From 66d3aea286d4859d874ad65f72e3b1a53e55f5f8 Mon Sep 17 00:00:00 2001 From: tristan-bp <150206045+tristan-bp@users.noreply.github.com> Date: Thu, 6 Nov 2025 22:13:25 -0600 Subject: [PATCH] expanding charset to include underscores --- CAIPs/caip-10.md | 7 ++++--- CAIPs/caip-19.md | 11 ++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CAIPs/caip-10.md b/CAIPs/caip-10.md index e33882e5..fee3a75a 100644 --- a/CAIPs/caip-10.md +++ b/CAIPs/caip-10.md @@ -6,7 +6,7 @@ discussions-to: https://github.com/ChainAgnostic/CAIPs/pull/10 status: Final type: Standard created: 2020-03-13 -updated: 2022-10-23 +updated: 2025-11-06 requires: 2 --- @@ -45,10 +45,10 @@ The `account_id` is a case-sensitive string in the form ``` account_id: chain_id + ":" + account_address chain_id: [-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32} (See [CAIP-2][]) -account_address: [-.%a-zA-Z0-9]{1,128} +account_address: [-_.%a-zA-Z0-9]{1,128} ``` -Note that `-`, `%` and `.` characters are allowed, but no other +Note that `-`, `_`, `%` and `.` characters are allowed, but no other non-alphanumerics such as `:`, `/` or `\`. Implementers are recommended to use "URL encoding" (% + 2-character codes, canonically capitalized) as per [Section 2][rfc3986sec2.1] of [RFC 3986][rfc3986] to escape any further non-alphanumeric @@ -125,6 +125,7 @@ of specification for details. ## Changelog +- 2025-11-06: expanded charset to include `_` - 2022-10-23: expanded charset to include `-`,`.`, and `%`; also added canonicalization section and links - 2022-03-10: update RegEx to incorporate CAIP-2 reference diff --git a/CAIPs/caip-19.md b/CAIPs/caip-19.md index 41482a0e..da448736 100644 --- a/CAIPs/caip-19.md +++ b/CAIPs/caip-19.md @@ -6,7 +6,7 @@ discussions-to: https://github.com/ChainAgnostic/CAIPs/pull/19 status: Review type: Standard created: 2020-06-23 -updated: 2020-06-23 +updated: 2025-11-06 requires: 2 --- @@ -46,10 +46,10 @@ The `asset_type` is a case-sensitive string in the form asset_type: chain_id + "/" + asset_namespace + ":" + asset_reference chain_id: Namespace+Blockchain ID as per [CAIP-2][] asset_namespace: [-a-z0-9]{3,8} -asset_reference: [-.%a-zA-Z0-9]{1,128} +asset_reference: [-_.%a-zA-Z0-9]{1,128} ``` -Note that `-`, `%` and `.` characters are allowed in `asset_references`, which +Note that `-`, `_`, `%` and `.` characters are allowed in `asset_references`, which include on-chain addresses like those specified in [CAIP-10][], but no other non-alphanumerics such as `:`, `/` or `\`. Implementers are recommended to use "URL encoding" (% + 2-character codes, canonically capitalized) as per [Section @@ -73,11 +73,11 @@ The `asset_id` is a case-sensitive string in the form ``` asset_id: asset_type + "/" + token_id -token_id: [-.%a-zA-Z0-9]{1,78} +token_id: [-_.%a-zA-Z0-9]{1,78} ``` -Note that `-`, `%` and `.` characters are allowed, but no other +Note that `-`, `_`, `%` and `.` characters are allowed, but no other non-alphanumerics such as `:`, `/` or `\`. Implementers are recommended to use "URL encoding" (% + 2-character codes, canonically capitalized) as per [Section 2][rfc3986sec2.1] of [RFC 3986][rfc3986] to escape any further non-alphanumeric @@ -173,6 +173,7 @@ hedera:mainnet/nft:0.0.55492/12 ## Changelog +- 2025-11-06: expanded charset to include `_` - 2022-10-23: - expanded charset to include `-`,`.`, and `%` - added canonicalization section and links