-
Notifications
You must be signed in to change notification settings - Fork 318
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-0030 | Better describe API extension compatibility #486
Conversation
…ips simultaneously.
This arose out of confusion related to CIP-62 and how to handle the API changes for extensions in a way that didn't break existing wallet implementations of the draft to cip-62. For example, CIP-62 is still draft, so do we refer to it as The previous In a nutshell, this mostly consists of better documenting corner cases or previously undefined states. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I quite like the goal and form of these additions.
This layouts a clear path for how extensions can be developed with backwards and forwards compatibility in mind. This aspect were perhaps overlooked when merging the last CIP-30 change in #446.
type Paginate = {| | ||
page: number, | ||
limit: number, | ||
|}; | ||
``` | ||
|
||
Used to specify optional pagination for some API calls. Limits results to {limit} each page, and uses a 0-indexing {page} to refer to which of those pages of {limit} items each. dApps should be aware that if a wallet is modified between paginated calls that this will change the pagination, e.g. some results skipped or showing up multiple times but otherwise the wallet must respect the pagination order. | ||
|
||
#### Extension |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it would make extension discovery easier if we have a list of accepted extensions here in the CIP or an attached file to make it machine readable?
|
||
Extensions that are draft, in development, or prototyped should not use official "cip" numbering. | ||
|
||
They should instead be referred to as "x-cip" and the number can be arbitrary and should not be expected to be unique. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the term "x-cip" is somewhat ambiguous, I see no reason we could use something like "experimental" or "draft-cip".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was following the convention used by the original mime std. i.e. https://www.rfc-editor.org/rfc/rfc1590#section-2.1
That said, I am not concerned about the actual label used, if "x-cip" is considered ambiguous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, when I saw the prefix x-
that is exactly what I thought: based on the MIME convention. So it seems intuitive & well precedented to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, I didn't know about that :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a quick look, view full headers in almost any email message 🤓
Then, new functionalities are introduced via additional CIPs and may be all or partially supported by wallets. | ||
|
||
If the extensions list is not specified, it defaults to an empty list `{}`. | ||
The wallet should treat an empty list as a request to enable **ALL** extensions which are not mutually exclusive. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By enabling all wallets do lose the ability to permission per extension.
Although nothing was stopping wallets from enabling all supported extensions regardless of what dApps were asking for - this would make wallet implementations simpler. Additionally, I am unsure of the real utility of permissioning access to extensions - I cannot think of a usecase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no security implication documented here in CIP-30 for enabling extensions. Nor how such a flow would work.
There is also no signalling back to the dApp that it's security restricted vs just not available.
For example, if a phone app asks to use the camera, it's told either "there is no camera" OR "you don't have permission to use the camera", which are different states to which the app can make different UX decisions.
If this is intended to be a security mechanism, then that should have proper consideration and specification.
|
||
Yes. | ||
It would be a legitimate implementation of this CIP for a wallet to **ALWAYS** enable every extension it supports, regardless of the requested list of extensions. | ||
The only caveat is that the [`cardano.{walletName}.extensions`](#cardanowalletnamesupportedextensions-extension) property must faithfully reflect the extensions which the wallet API object supports. | ||
|
||
##### Should extensions follow a specific format? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want to make things very explicit - so prospective extension CIPs should clearly outline and log their respective "x-cip" numbering/naming.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, wallets should list all extensions they support, both experimental/draft and finalized CIPs.
Typo Co-authored-by: Ryan Williams <44342099+Ryun1@users.noreply.github.com>
Agree Co-authored-by: Ryan Williams <44342099+Ryun1@users.noreply.github.com>
Further community input on this would great if possible, tagging some relevant parties @Scitz0 @refi93 @Quantumplation @rooooooooob 😎 |
I dont have much to add to the conversation but looks fine to me. |
Adds specification to better describe the "Extensions Enable" API, with an effort to better control backwards and forwards compatibility.
Define a way to specify experimental extensions that do not compete with official extensions, and describe the path forward.
Add language tags to code blocks.
Use
-
consistently for unordered lists.Properly declare HTTP urls.
CIP-0030 with this update, rendered in branch