Giter Site home page Giter Site logo

URI Scheme about caips HOT 14 OPEN

chainagnostic avatar chainagnostic commented on July 29, 2024 1
URI Scheme

from caips.

Comments (14)

pedrouid avatar pedrouid commented on July 29, 2024 1

I agree that these would not qualify as URLs but only as URIs or URNs

I would keep it simple by just concatenating with colons to index standards


caip:10:eip155:1:0xab16a96d359ec26a11e2c2b3d8f8b8942d5bfcdb

from caips.

Arachnid avatar Arachnid commented on July 29, 2024 1

I think it makes more sense for CAIPs to maintain a registry rather than try and make the standard number part of the URI. Email URIs are mailto:[email protected], not rfc:822:[email protected]. HTTP URLs aren't rfc2616://. Part of the job of a URI is to be readable, and that means using human-comprehensible identifers whenever possible.

from caips.

romeo4934 avatar romeo4934 commented on July 29, 2024 1

more something like that?
blockchain:bip122:12a765e31ffd4059bada1e25190f6e98
cryptoaddress:cosmos:cosmoshub-3:cosmos1t2uflqwqe0fsj0shcfkrvpukewcw40yjj6hdc0
asset:cosmos:Binance-Chain-Tigris/slip44:714

from caips.

Arachnid avatar Arachnid commented on July 29, 2024 1

It should be easy to maintain a registry, then!

from caips.

TimDaub avatar TimDaub commented on July 29, 2024 1

As I'm wanting to start using CAIP-22 to address erc721's as compliant IANA URIs I was wondering what are the necessary steps towards registration with IANA. Does anyone know?

from caips.

pedrouid avatar pedrouid commented on July 29, 2024

My proposal would be to continue using colons as we have so far to index different CAIPs

caip:2:eip155:1

caip:10:eip155:1:0xab16a96d359ec26a11e2c2b3d8f8b8942d5bfcdb

This we could then extended it more easily for new standards but still have more efficient parsing

from caips.

ligi avatar ligi commented on July 29, 2024

linking this discussion mentioned in the call: ipfs/kubo#1678
and I suggest:

caip://2/eip155:1
^^^ scheme
      ^ authority (CAIP number)
           ^^^^^^^^ path (CAIP content)

this might be less correct AFAIR (need to read up on this again - very long ago since I digged into this) - but more tooling sees things like this as an actual URL and sees caip as a scheme one can associate to.

from caips.

Arachnid avatar Arachnid commented on July 29, 2024

@ligi A CAIP number is not an 'authority' in the RFC 3986 meaning of the word:

Many URI schemes include a hierarchical element for a naming
authority so that governance of the name space defined by the
remainder of the URI is delegated to that authority (which may, in
turn, delegate it further). The generic syntax provides a common
means for distinguishing an authority based on a registered name or
server address, along with optional port and user information.

I'd strongly suggest not trying to make this an 'authority' for cargo cult reasons (eg, people are familiar with the :// syntax). Also, I don't think these quality as URLs, because they don't provide a primary means of locating the resource; they're URIs or URNs.

It seems to me that the simplest and most sensible scheme would be to specify that the first part of the path is drawn from a registry maintained by the CAIP maintainers, and can include eip155 and any others that are defined from time to time, and that the syntax of the remainder of the path depends on the first component.

from caips.

Arachnid avatar Arachnid commented on July 29, 2024

While it'd be nice to have a URI scheme for each CAIP, it's probably more realistic to be something like caip:eip155:1:..., and have a CAIP registry that defines how eip155 URIs work.

from caips.

romeo4934 avatar romeo4934 commented on July 29, 2024

We don't have that many types of CAIP. The most important one are
CAIP2 -> blockchain ID
CAIP10 -> Address
CAIP19 -> Asset Type and ID

from caips.

TimDaub avatar TimDaub commented on July 29, 2024

more something like that? blockchain:bip122:12a765e31ffd4059bada1e25190f6e98 cryptoaddress:cosmos:cosmoshub-3:cosmos1t2uflqwqe0fsj0shcfkrvpukewcw40yjj6hdc0 asset:cosmos:Binance-Chain-Tigris/slip44:714

I think still using the "/" slash symbol here can cause compatibility issues when using e.g. CAIP-19 within an URL. See #81.

from caips.

romeo4934 avatar romeo4934 commented on July 29, 2024

I agree

from caips.

TimDaub avatar TimDaub commented on July 29, 2024

I think it makes more sense for CAIPs to maintain a registry rather than try and make the standard number part of the URI. Email URIs are mailto:[email protected], not rfc:822:[email protected]. HTTP URLs aren't rfc2616://. Part of the job of a URI is to be readable, and that means using human-comprehensible identifers whenever possible.

I don't find the human-readability argument convincing. It'd be much clearer to my developer brain if we'd indeed start HTTP URLs with rfc2616 as then I'd exactly know where to look for a manual or protocol description.

Besides, it's not entirely clear where to look for the the mapping of scheme to RFC.

But I'd like to highlight another thing: For long ERC721 stood for NFTs, though now there seems to also be a ERC1155. So wouldn't registering a naming in a registry cause problems suddenly? Who'd decide what is the real "NFT"? In today's case too: I can't overrule what's considered an email and mailto.

I like naming it by standards as there's a clear and permissionless way of reserving a name: Write a standard, get allocated a ascending integer, name your URIs.

from caips.

silverpill avatar silverpill commented on July 29, 2024

@TimDaub This is IANA URI scheme registry: https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml

Requests for permanent registration must be preceded by mailing list review,
per Section 7.2 of [RFC7595].

RFC7595, section 7.2: https://www.rfc-editor.org/rfc/rfc7595.html#section-7.2

from caips.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.