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-???? | Web-Wallet Bridge - Extensive Light Wallet Standard #620

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

klntsky
Copy link
Contributor

@klntsky klntsky commented Nov 17, 2023

This PR adds a new CIP that describes a webpage-based communication bridge allowing dApps to interface with Cardano wallets. This interface extends CIP-30. Improvements over the original standard are:

  • More data queries
  • Interfaces that allow transaction building on the wallet side
  • Use of JSON instead of CBOR

Context: https://cardano.ideascale.com/c/idea/103857
Discussion: https://discord.gg/XFjAzsQyaM


Rendered Proposal on fork

@Ryun1 Ryun1 added the Category: Wallets Proposals belonging to the 'Wallets' category. label Nov 17, 2023
Copy link
Collaborator

@rphair rphair left a comment

Choose a reason for hiding this comment

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

Looks like a highly useful proposal 👍

Implementors: []
Discussions:
- https://github.com/cardano-foundation/cips/pulls/620
- [Cardano Working Groups Discord server](https://discord.gg/XFjAzsQyaM)
Copy link
Collaborator

@rphair rphair Nov 17, 2023

Choose a reason for hiding this comment

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

Suggested change
- [Cardano Working Groups Discord server](https://discord.gg/XFjAzsQyaM)
- https://discord.gg/XFjAzsQyaM

The YAML section here doesn't understand Markdown. The invite link should be OK on its own because people following it will have no trouble finding the #wallet-standard channel.

Copy link
Collaborator

@Ryun1 Ryun1 left a comment

Choose a reason for hiding this comment

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

This is a very interesting proposal and something I am very keen to follow the development on. 😎
This has spurred me on to continue working on #619, I think that CPS and this proposal will work well being developed side-by-side.

I have added a couple editorial comments.
A few larger questions I have:

  • Does this need to extend CIP-30?
    • What was the motivation to use the CIP30 extension mechanism?
    • As to me this is close to making CIP30 unneeded, so I think we could consider alternate routes to extending CIP30, such as CIP90.
  • Is it really the wallet's role to be able to query many aspects of Cardano? id argue no
    • To me it makes more sense to split the large .query endpoint into separate standards so wallets can choose what things they support querying, if this is pursued.

@@ -0,0 +1,230 @@
---
CIP: ?
Title: Extensive Light Wallet Standard
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
Title: Extensive Light Wallet Standard
Title: Web-Wallet Bridge - Extensive Light Wallet Standard

For CIP-30 extensions we have been enforcing the prefix of "Web-Wallet Bridge -".

Choose a reason for hiding this comment

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

Also, I think this shouldn't be constrained by light wallets - why not just any wallet?

Copy link
Collaborator

@rphair rphair Nov 18, 2023

Choose a reason for hiding this comment

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

There may be even a better designation than "light" because the incorporation of a query layer could make the wallet quite a bit heavier. 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

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

As per Discord there are better terms evolving for the different classes of wallets: https://discord.com/channels/971785110770831360/992011119872970762/1176547955919044680

(not quoting here yet since these terms are still in flux according to "Workshop" on wallet interfaces scheduled in the coming day... if finalised @klntsky @Ryun1 @mkazlauskas we should copy them here)

Copy link
Collaborator

Choose a reason for hiding this comment

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

... copying these operating definitions here for public consideration in the meantime, since haven't seen it transcribed anywhere else on GitHub or changed yet (thanks to @yHSJ for the formulation):

  • Zero Data Wallet: This wallet has no notion of the blockchain, it is simply an interface for cryptographic operations
  • Personal Data Wallet: This wallet does provide some data from the blockchain, but it is limited to only the data that is relevant to the key pairs controlled by the wallet
  • Full Data Wallet: This wallet has complete view of the blockchain and can do any querying that a dApp would do

- A transaction is passed for signing, but the wallet does not yet know about the UTxOs it spends, and thus refuses to sign it
- A transaction is sent to the network via the dApp backend (bypassing CIP-30 submit method) and is confirmed there, but the wallet still does not know about its consumed inputs, and thus returns outdated data.

### Principles of this CIP
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this text could better fit in the Rationale section, as it is giving context to why the specification is designed the way it is.


## Specification

### Query layer
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should wallets be treated as a all-knowing query layer for Cardano?
Do wallet providers want to support this? - could it be expensive for them?

Choose a reason for hiding this comment

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

💯, maybe part of the query layer that allows querying arbitrary (not just user's wallet-related) data such as any utxo or transaction could be a separate extension/cip. Not sure how to define the boundary here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should wallets be treated as a all-knowing query layer for Cardano?
Do wallet providers want to support this? - could it be expensive for them?

@Ryun1 I addressed these concerns in my new CPS: #625

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should wallets be treated as a all-knowing query layer for Cardano?

Standardizing the query layers would allow wallets to be free from the burden of running their own infrastructure. Thus it would not be a problem to force the wallets to provide query layers - they will be just passing data from JS to query layer provider's HTTP interface, which does not require any infra.

@Ryun1 Ryun1 changed the title CIP-????: Extensive Light Wallet Standard CIP-???? | Extensive Light Wallet Standard Nov 17, 2023
* Plutus Script
* PubKey

### JsonTx API

Choose a reason for hiding this comment

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

It would be great to specify this as a separate CIP, so that it could be maintained independently of dapp connector and other CIPs could reference it. @KtorZ seems to have done some work on this already https://github.com/CardanoSolutions/cardanonical

@klntsky klntsky changed the title CIP-???? | Extensive Light Wallet Standard CIP-???? | Web-Wallet Bridge - Extensive Light Wallet Standard Nov 27, 2023
@klntsky
Copy link
Contributor Author

klntsky commented Nov 27, 2023

@Ryun1

Does this need to extend CIP-30?

No, there's no technical requirement.

What was the motivation to use the CIP30 extension mechanism?

I didn't know about CIP-90 at the time. If the APIs are compatible with CIP-30, then it's better to switch to referencing CIP-90 instead, because it would free us from CIP-30 as dependency.

@klntsky
Copy link
Contributor Author

klntsky commented Nov 30, 2023

Screenshot from 2023-11-30 15-30-22

Let's put this on hold until we figure out the dependencies - at least as draft CIPs outlining scope.

@rphair
Copy link
Collaborator

rphair commented Aug 20, 2024

@klntsky reflecting your #620 (comment) I'm finally marking this Waiting for Author - the next time we look at PRs that haven't been going anywhere, it would move progressively to (potentially) Abandoned and then closed.

But the dependencies you mention above are mostly merged... I would rather continue active review than close it or leave it as a Draft forever. Can you please give us an update ASAP about how this problem looks today & what exactly we are still waiting for?

@rphair rphair added the State: Waiting for Author Proposal showing lack of documented progress by authors. label Aug 20, 2024
@rphair
Copy link
Collaborator

rphair commented Sep 24, 2024

@klntsky this "draft" has been open for nearly a year so I believe it could be effectively abandoned in its current form. If not, please do something to finalise this draft for review or withdraw it by closing this PR. As I recall the community was responsive to this idea so personally I hope you will continue work on it.

@rphair rphair added State: Likely Abandoned Close if confirmed abandoned (long waiting). and removed State: Waiting for Author Proposal showing lack of documented progress by authors. labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Wallets Proposals belonging to the 'Wallets' category. State: Likely Abandoned Close if confirmed abandoned (long waiting).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants