-
Notifications
You must be signed in to change notification settings - Fork 15
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
Create SIP-22: Deep Links #134
Conversation
I think I have a different idea about how to do this now. Will make a different proposal. |
OK I have updated this based on what I think is the right approach. The only thing that is missing is that ideally the request to open a page could also pass along some parameters. For example, let's say a Snap has multiple features in its home page, like 1) swap 2) bridge 3) stake. If a Snap wants to open its home page and navigate to one of those interfaces, it will need to be able to pass a parameter that can be processed by the homepage. The request could look like this: await snap.request({
method: 'snap_open',
params: {
url: 'npm:@consensys/starknet-snap/page/home',
params: {...}
},
}); Would that be a good approach? |
You can have the params in the url, condense the request a little. It makes sense to have params for the urls, we might have to update the SIP that defines pages to accommodate params. |
On second thought you can just use anchors if all you're looking for out of the params is to navigate to a certain part of a page |
Changed the URL scheme based on some more convos and reduced the scope of the SIP to just define the scheme, in a later SIP (or MIP?) we can spec the RPC navigation method. |
Validation logic has been updated to allow for an `Icon` to also be included as a `Link` child. A new URL scheme is also introduced `metamask:` (see [SIP-22](MetaMask/SIPs#134)), this scheme will allow a snap to navigate to the extension and other snap pages through a `metamask:` schemed URL.
I have attempted to describe a URL schema for deep links as well as a method for using them.