Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Daedalus payment URLs #883
It would be really nice to have a feature that would allow to create a "payment URL", like:
And when someone opens this url in their browser - Daedalus (if installed) opens and shows a special dialog, like "Do you really want to send 100 ADA to this address:
This feature would allow people to create easy-to-use payment links, or for example - donation links, like "Donate 5 ADA | Donate 10 ADA" under some content, so users don't have to copy-paste addresses manually.
It maybe very useful for some application and could be a nice solution until ecosystem gets SPVs and full-browser integrations, etc. Once those are present - these links could also lead to other clients, like, if I have lite-client or SPV version of Daedalus installed - it is opened from link. If I have a browser-extension installed (possible in the feature) - then browser dialog is opened from link and allows to send coins thru this browser-client.
Sadly I don't know much details for now, but as I understand - browsers are able to associate some types of links (by protocol, a assume) to certain applications (thru OS, probably), so when
I will post comments here, if I get more info about possible implementation details later.
You need to also specify a unit instead of just an amount. Under your proposal you cannot send 0.5 ADA. It would be better to do something like &amount=100&unit=ADA vs &amount=100&unit=lovelace.
Oh yeah, totally forgot about this. Tho, the unit thing is debatable. I love the idea to not having to remember about lovelaces when specifying the amount (as I did in the example), and very many people would just automatically put amount in ADA. BUT at the same time they would then try to put numbers, like
So always using lovelaces might be the only stable option. People would just have to learn and accept that fact. And always using lovelaces would also force all tutorials and examples to show that fact, like "To send 1 ADA put this:
The only other sustainable option I see for now is to use two separate parameters, like
But that looks reeeeeealy weird.
In the future these URLs could also specify the coin to be used, like:
To send 1 BTC-20 (Cardano BTC token). Notice how there are two additional zeros in amount.
Or if IOHK develop a stable currency and call it
To send 10 NASH :)
But the idea here is that
Additional idea is that the
Initially I though of these links just as additional "platform API", that different clients would be able to support. To make it more obvious it may be better to change protocol name to "cardano", so initial example would look like:
With change like this, specifying coins as parameter seems more appropriate:
And the pool example:
New idea is that Daedalus or other wallets could (and prolly should at some point) provide the function of a local address-book, where a user can keep a list of addresses with names assigned to them. In this case these "payment URLs" could also provide an operation like:
Which would open a Cardano wallet and add new address into the address-book, with the name assigned.
Function like this (or many similar function) could mitigate the problem that many users want to see "human-readable" addresses, which is not equal to "short hashes", but actually something like an understandable known domain name, e.g. -
A solution like this looks to me very much nicer than an addition of any external "monolith" address-resolving system, which immediately becomes vulnerable for attacks like DNS-hijack (when potentially all name-address pairs can be compromised for some time), name similarity attacks (like giveaway scams on twitter), etc.
@archfan We're currently implementing this for Yoroi
Daedalus team is free to implement this feature whenever they want :)