Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace forward slash with semicolon as delimiter for hierarchical separation #82

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TimDaub
Copy link

@TimDaub TimDaub commented Nov 11, 2021

Fixes #81

  • in case this PR gets merged, I'd be happy to update any CAIP relying on CAIP-19 too

@TimDaub TimDaub changed the title Replace forward slash with semicolon for hierarchical separation Replace forward slash with semicolon as delimiter for hierarchical separation Nov 11, 2021
@obstropolos
Copy link
Contributor

Hey @TimDaub - we're going through the backlog here, is this still active / relevant for review?

@TimDaub
Copy link
Author

TimDaub commented May 4, 2023

i don‘t know

I‘ve seen ppl use the chain:// scheme but the problems in #81 haven‘t changed or have they?

@pedrouid
Copy link
Member

Hey @TimDaub, could you join our Discord for CASA? I would love to discuss more in detail about this PR

https://discord.gg/sykcEGpN

@@ -31,7 +31,7 @@ The Asset Type is a string designed to uniquely identify the types of assets in
The `asset_type` is a case-sensitive string in the form

```
asset_type: chain_id + "/" + asset_namespace + ":" + asset_reference
asset_type: chain_id + ";" + asset_namespace + ":" + asset_reference
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
asset_type: chain_id + ";" + asset_namespace + ":" + asset_reference
asset_type: chain_id + "-" + asset_namespace + ":" + asset_reference

Would porefer if we use - instead because semicolon might break DIDs in the future:
https://www.w3.org/TR/did-core/#did-url-syntax

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both CAIP-2 identifiers and asset namespaces may also contain -, so with - separators CAIP-19 identifiers will be ambiguous. Example:

CAIP-2: namespace:chain-1
Asset namespace: asset-namespace
Asset reference: 123

The resulting CAIP-19 asset type would be namespace:chain-1-token-namespace:123. It is not clear how it should be parsed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CAIP-19 cannot be unescaped in URL paths
5 participants