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

CIP-0047? | Proposal for open Daedalus or desktop wallet via URL #234

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CIP-0035/CIP-0035.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Moved to [CIP-0035/README.md](./README.md).
Copy link
Member

Choose a reason for hiding this comment

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

This is not needed for new CIPs.

38 changes: 38 additions & 0 deletions CIP-0035/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
CIP: 35
Title: Daedalus URI Scheme
Authors: Daniel Main <daniel.main@iohk.io>
Comments-URI:
- https://github.com/cardano-foundation/CIPs/pull/130
Copy link
Collaborator

Choose a reason for hiding this comment

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

great that you have the last PR discussion in there, but can you also add this one?
- https://github.com/cardano-foundation/CIPs/pull/234

Status: Draft
Type: Informational
Created: 2022-03-18
License: CC-BY-4.0
---

# Abstract

This proposal is an extension of CIP-0013, which describes a basic URI scheme to handle ada transfers or partial transactions with Daedalus or any desktop Wallet installed in the operating system.

# 💡 Motivation

DEX, Web-dApps and Desktop-dApps (e.g. games or desktop applications) should have the possibility to interact directly with desktop wallets. By defining a URI scheme and registering it in the operating system, it will allow opening Daedalus or any desktop wallet same as when you call or click a mailto:email@sample.com and your email client is opened.
Copy link
Collaborator

Choose a reason for hiding this comment

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

changing this to mailto:email@sample.com (i.e, adding backticks around it) should prevent the email address from being formatted differently (as a clickable & invalid email address) in the formatted Markdown (as it appears now).


An application could ask for a payment and offer options like PayPal, Visa, cardano-web. Although a user might want to help cardano to get more decentralized using a full-node-wallet that is why the application could also offer payments with a cardano-desktop.
The usage of a different URL will solve the problem of users, which have multiple wallets: browser-wallet for daily usage and a secure desktop wallet for the savings.

# 📖 Specification

The core implementation should follow the [BIP-21](https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki) standard (with `bitcoin:` replaced with `web+cardano:`)

Correct examples:
```
<a href="web+cardano://Ae2tdPwUPEZ76BjmWDTS7poTekAvNqBjgfthF92pSLSDVpRVnLP7meaFhVd?unix-timestamp-timeout=1647896861">Buy/Send/Donate</a>
<a href="web+cardano-testnet://Ae2tdPwUPEZ76BjmWDTS7poTekAvNqBjgfthF92pSLSDVpRVnLP7meaFhVd?unix-timestamp-timeout=1647896861">Buy/Send/Donate (Testnet)</a>
Copy link
Contributor

Choose a reason for hiding this comment

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

I would strongly advise against doing web+cardano-testnet. Cardano, just like Ethereum, it sure to have many different networks in the future and we don't want to be stuck with a bunch of different URI schemes for every network. Instead, I suggest you include something similar to CIP34 inside the payload

Copy link
Contributor Author

@danielmain danielmain Mar 24, 2022

Choose a reason for hiding this comment

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

I would strongly advise against doing web+cardano-testnet. Cardano, just like Ethereum, it sure to have many different networks in the future and we don't want to be stuck with a bunch of different URI schemes for every network. Instead, I suggest you include something similar to CIP34 inside the payload

@SebastienGllmt : the network cannot be "selected" in Daedalus. For each Network exist a different Daedalus installation. This is how it is implemented, and I am afraid this will not be changed.

Coming back to the vscode example.

vscode:// => opens Visual Studio
vscode-insiders:// => opens Visual Studio Insiders

grafik

You can run this command (in case you are on macOs), and you will see how most of the desktop applications register their URIs: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump URLSchemeBinding

So, Flight is for us, like the Insider version.
cc: @nikolaglumac

Copy link

@michalrus michalrus Mar 29, 2022

Choose a reason for hiding this comment

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

Cardano, just like Ethereum, it sure to have many different networks in the future and we don't want to be stuck with a bunch of different URI schemes for every network. Instead, I suggest you include something similar to CIP34 inside the payload

At least in Daedalus’ case, each network is handled by a different build.

If we are to define only a single protocol:, by which the OS differentiates which app to choose, we would have to either:

  • let the user choose, after clicking a link, in a system prompt, which Daedalus build to use to handle it, and
    • how easy it would be to mis-click is not for me to decide,
    • I think some OS-es don’t show the full list of possible apps, just a few recent ones?
  • or create a completely separate small app that opens an appropriate Daedalus build (if it is installed) based on protocol:THIS_PART which the OS is not concerned with – in effect re-implementing a great deal of what already is there in all 3 OS-es, and having to make it cross-platform, having to detect where each Daedalus is installed etc. etc. – a mess.

<a href="web+cardano-flight://Ae2tdPwUPEZ76BjmWDTS7poTekAvNqBjgfthF92pSLSDVpRVnLP7meaFhVd?unix-timestamp-timeout=1647896861">Buy/Send/Donate (Mainnet and using Daedalus Flight)</a>
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the point of web-cardano-flight? This seems very Daedalus-specific. Why not just use web+cardano and leave it up to the OS prompt to choose which app to launch (Daedalus or Daedalus Flight)?

```

## Considerations

- Since Daedalus is shipped for a single network separately (mainnet and testnet), and can be installed alongside a flight version (mainnet), the URL needs to specify which version is being referred.
- Adding the unix-timestamp-timeout parameter, in other words: the time in (Unix format) in the future where the transaction is no longer valid. This will allow using a desktop wallet that might take minutes to start, or not yet be synchronized, will prevent the user from unnecessarily sending a transaction.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ The entire process is described in greater detail in [CIP1 - "CIP Process"](./CI
| 32 | [Inline Datums](./CIP-0032/) | Draft |
| 33 | [Reference Scripts](./CIP-0033/) | Draft |
| 34 | [Chain ID Registry](./CIP-0034/) | Draft |
| 35 | [Desktop wallet application URL](./CIP-0035/) | Draft |
| 1852 | [HD (Hierarchy for Deterministic) Wallets for Cardano](./CIP-1852/) | Draft |
| 1853 | [HD (Hierarchy for Deterministic) Stake Pool Cold Keys for Cardano](./CIP-1853/) | Draft |
| 1854 | [Multi-signatures HD Wallets](./CIP-1854/) | Draft |
Expand Down