-
Notifications
You must be signed in to change notification settings - Fork 10
docs: MetaMask snaps design #91
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
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| #### Using wallet service | ||
|
|
||
| The wallet service is still not ready to be used by the MetaMask snaps, especially because it currently still doesn't support nano contracts and its wallet lib in use is old. |
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.
This is about to change though
| After the dApp call above, the MetaMask snaps code will receive and identify each request with a code similar to the one below: | ||
|
|
||
| ``` | ||
| export const onRpcRequest: OnRpcRequestHandler = async ({ |
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 should normalize the request methods so we can use the handleRpcRequest method of the rpc-lib.
| The handler method will be implemented using the RPC lib already developed for the Reown integration. | ||
|
|
||
| ``` | ||
| // This is a prompt handler expected by the RPC lib when the method requires user confirmation |
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.
Are we going to be able to use the rpc-lib existing Triggers? e.g. CreateNanoContractCreateTokenTxLoadingFinishedTrigger
| ... | ||
| ``` | ||
|
|
||
| The handler method will be implemented using the RPC lib already developed for the Reown integration. |
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 it would be great to better describe how the rpc-lib integration will be done, are we going to use the existing rpcMethods and just listen for triggers in the snap code?
Acceptance Criteria
Rendered