Create SIP-22: Deep Links
I have attempted to describe a URL schema for deep links as well as a method for using them.
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?
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.