CIP - Generalized Cardano URLs

Background

CIP13 currently defines a simple custom URI protocol (web+cardano//) that allows for (1) ADA payments and (2) signalling delegation preferences.
With more a more new functionalities coming into Cardano, there is a high chance that we see new use cases requiring new URL schemes, which may result in the current CIP13 spec being overloaded with more extensions or in new schemes based on a separate URI protocol (e.g. cardano-nft//) being adopted de facto. In fact, there is already interest in extending CIP13 for including delegation portfolios, on-chain metadata requests and eventually we’ll need to consider native assets in payments too.
So there is clearly a need for a more sustainable, standardised framework.

Proposal

Write a new CIP that would replace CIP13 with a definition of a generalised URL scheme based on a single URI (ie. we keep web+cardano//). This CIP should:

  • Provide a framework for adding new extensions (or actions) to the Cardano URI protocol. Tentatively this could simply be:
    web+cardano//$ACTION[?key=value][&key=value]*

  • Provide a framework for describing each new action as a separate CIP. This means that each new action, like transfer or stake should have its own CIP describing specific URI parameters, and other technical considerations.

  • Keep a track of all the new actions added to the protocol

I’ll monitor this thread for a few days and then I’ll submit a CIP proposal.

Backwards compatibility

Wallets may still support the old scheme, since only payments work differently and delegation actions already follow the main idea presented here.

Examples

// ADA payments can be kept as before
web+cardano//Ae2tdPwUPEZ76BjmWDTS7poTekAvNqBjgfthF92pSLSDVpRVnLP7meaFhVd

// a payment request for a specific native token
web+cardano//transfer?addr=Ae2tdPwUPEZ76BjmWDTS7poTekAvNqBjgfthF92pSLSDVpRVnLP7meaFhVd&assetId=asset1rjklcrnsdzqp65wjgrg55sy9723kw09mlgvlc3&amount=10

// single pool delegation
web+cardano://stake?d12e6fe1123bf111b77b57994bcd836af8ba2b3aa72cfcefbec2d3d4=1

// delegation portfolio, split as (1/3, 2/3).
web+cardano://stake?d12e6fe1123bf111b77b57994bcd836af8ba2b3aa72cfcefbec2d3d4=1&c94e6fe1123bf111b77b57994bcd836af8ba2b3aa72cfcefbec2d3d0=2"
5 Likes

Yo! This is a great idea I’ve been trying to wrap my head around for a good while. Thanks for starting the initiative!

On my side, I’ve specifically been thinking how to address metadata from URLs, and during my tests, I came up with the need for also specifying network and metadatum label.
Following your suggestion, I think a first approach/example to what I’ve been trying to solve could be something like:

web+cardano://metadata?network=testnet?key=1337

Maybe also add a type for it? In e.g., type=nft721 etc?

1 Like

yes @v-almonacid I believe that’s what everybody will need in the long run… just let’s first please complete the process of agreeing upon (by way of a properly merged CIP version) the long pending pool link (//stake) component first :sunglasses: :pray: (comment on github)

1 Like

Great! yeah, if take this path, we can have a separate CIP for web+cardano://metadata with its own custom parameters.

1 Like

@v-almonacid @SebastienGllmt @Frederic we decided at the CIP meeting today to go ahead with this plan, since we had a recent PR proposing some detailed changes to the URI scheme (suggesting many more like it will be submitted over time).

As I think you’ve also imagined, I’ve put forward that there would be organisational and technical bottlenecks from having one massive document (CIP-0013, which currently has the only 2 URI scopes of “payment links” and “stake pool links”) as a comprehensive URI scheme. This bottleneck would be restrictive based on the number of URI scopes I expect will be proposed.

Having one single “URI framework” CIP, untouched as other URI protocol extensions emerge, would prevent one single document from having an unmanageable amount of authors who wouldn’t be traceable to the parts of the URI scheme they have introduced (and may also have some social / ethical responsibility for).

So I’ve planned to draft a new framework CIP according to your guidelines above & the discussion at this meeting (CIP Editors Meeting #30 - Crowdcast) unless Vicente you would prefer to do it first, or as co-authors. I’ll progress this in the first half of October when clear of some obligations regarding the Cardano Summit & will watch this thread in the meantime.

Hey, so it looks this ended up being necessary as I thought. I’ll be happy to help with the spec. I can submit a first draft PR in the following days and then we can work together on it.

2 Likes

sounds good… I should be ready to help progress this after about 1 more work week :sunglasses:

1 Like

Hey @COSDpool , I’m really sorry but I’ve been too busy and offline for quite some time. If you want to take the lead on this, go ahead cause I’m really having trouble to find time to work on these kind of things right now :frowning:

1 Like

thanks @v-almonacid for the update & the vote of confidence. I’ve also been having one of those offline periods, hopefully emerging soon. Looking forward to getting this done next month… will tag you here & on Github when I have something posted :sunglasses:

p.s. @v-almonacid since in the last few months there haven’t been any generally applicable extensions to the Cardano URI Scheme beyond those currently documented in CIP-0013 I’d been proceeding slowly with this.

Now it seems like the developer community has standardised on working with payments & stake pool delegation through the dApp connector(s) instead. This really hit home for me last week when I couldn’t choose a stake pool in the Nami wallet without using the web site pool.pm to formulate the delegation request so it could be signed in the wallet.

I still think as per CIP-0013 there would be great utility in using URIs for delegation changes & payments, and many other things e.g. working with metadata, but without developers going along with that idea it seems there’s less need to generalise the existing Cardano URI Scheme.

Therefore I’m no longer planning to submit our planned proposal (which would deprecate CIP-0013 & maybe require 2 new proposals for the payments + stake pool links) until any developer shows an interest in implementing URI support. In the meantime I’ll keep watching this thread to stay aware of how others feel about this. :face_with_monocle:

2 Likes

Hey @COSDpool , that makes a lot of sense. If the feature is not required then we would just add more overhead with that CIP.

When I was working on Yoroi mobile there were a few use-cases I was thinking about which inspired this proposal. For instance, it’s harder to implement a dApp conector for mobile platforms so using URIs was a possible simple solution to provide at least some smart contract functionality. I don’t know if that’s still relevant though but I think you are right and we should just wait and see.

1 Like

This is one of many quite questionable design decisions of Nami to only allow delegation to their own pool out of the box.

That being said, I really would like URIs more than full dApp connections for a lot of use cases, but if the wallet apps don’t do it, there is not much we can do.

1 Like

An additional reason to leave CIP-0013 alone (without creating space pre-emptively for adding more URI methods)…at today’s CIP meeting, for the huge dApp Connector (CIP-0030) we’ve tentatively agreed that new additions should be added as separate CIPs.

Therefore, as long as we’re sticking with that precedent, I’m going to suggest that any PR’s coming for new Cardano URI methods, i.e. proposing additions to CIP-0013, be submitted as separate CIPs instead.

p.s. CIP-0013 update by tomislavhoracek · Pull Request #130 · cardano-foundation/CIPs · GitHub

Hi @COSDpool would you please help me to understand why you want us to throw CIP-0013? I would like to update it instead of re-creating a new one so we have there the whole discussion documented.

If by “throw CIP-0013” you mean “close your current PR and submit a new one”… Since it’s already explained in my last comment above, I’ll post here the minutes for that meeting when they’re released so you can follow that discussion.

If you want to weigh in against the group consensus that future URI protocol updates (or future dApp connector updates, etc.) be submitted as new CIPs, please consider coming to the CIP meeting and making your case.

That discussion won’t be lost. In fact the latest & probably last update to CIP-0013 (“Stake Pool URIs”) began as a PR which also had to be closed to follow the group consensus at the time about whether it should be a separate CIP. You can still see this discussion at the link to my closed PR#25 in the header of CIP-0013.

Already created a new draft :wink: [CIP-0035] Proposal for open Daedalus or desktop wallet via URL by danielmain · Pull Request #234 · cardano-foundation/CIPs · GitHub
Hope it’s ok now

1 Like