Skip to content
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

Implementing basic MetaMask provider communicating with iframe #7217

Open
DaniellMesquita opened this issue Sep 25, 2019 · 3 comments

Comments

@DaniellMesquita
Copy link

commented Sep 25, 2019

I'm developing a browser which is early based on sandboxed iframe. I know there is webview and browserwindow, but this is a experiment implementation of which level a iframe-based browser can achieve till I implement a better approach.

image

iframes and the main page can exchange messages. When a DApp inside iframe tries to communicate with MetaMask extension, the main page get it as message from iframe and repasses it to a basic MetaMask implementation. This basic implementation would have only these basic functions: ethereum.enable(), sign message, ethereum.send(options).
I ask, how can the main page get MetaMask API's messages from iframe and translates to a web3 provider very-basic UI?

https://metamask.github.io/metamask-docs/API_Reference/Ethereum_Provider
https://metamask.github.io/metamask-docs/API_Reference/Signing_Data/Eth_Sign

@DaniellMesquita

This comment has been minimized.

Copy link
Author

commented Sep 25, 2019

@DaniellMesquita

This comment has been minimized.

Copy link
Author

commented Sep 25, 2019

Reference: #6597

@DaniellMesquita

This comment has been minimized.

Copy link
Author

commented Sep 25, 2019

I'm not asking any MetaMask developer to do it for me.
What I ask is a explanation of the implementation of a very basic web3 provider which would communicate with a main page wrapper (same page of the basic web3 provider) which translates requests from a DApp inside iframe.
This is to make IC a basic web3 browser, using both Cordova/Muon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.