You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.
The current forceParams request to install then install flow feels a little clunky to me. This issue will be for discussing the API for installing a plugin.
I was thinking we could unify the installation of the plugin with the permission to connect to it, maybe something like this:
constresult=awaitethereum.send({method: 'wallet_requestPermissions',params: [{wallet_connectToPlugin_pluginA: {
sourceUrl,}}]})// If the user approves, and the plugin does not exist, we install it.// If the user approves and the plugin is already installed, we merely grant permission to connect to it.// Now this site can send messages to that plugin:awaitethereum.send({method: 'wallet_connectToPlugin_pluginA',params: [RPC_PAYLOAD]})
The text was updated successfully, but these errors were encountered:
The proposal above is distinct from current behavior because we currently are lazily installing the plugin on the first invocation, but we should just install it as soon as permission to interact with it was granted.
I implemented this. There are probably still ways to refine installation, though, so I'm keeping this open for the general cause of improving it further and having a place to discuss how.
The current
forceParams
request to install then install flow feels a little clunky to me. This issue will be for discussing the API for installing a plugin.I was thinking we could unify the installation of the plugin with the permission to connect to it, maybe something like this:
The text was updated successfully, but these errors were encountered: