Closed gmcdev closed 6 years ago
@gmcdev thats pretty nifty that your taking this on. I've been working a little on porting MetaMask into other contexts and their is discussion of breaking out metamask-core which i see you've already started doing a little how is your progress going? do you need some explanations of things?
controller -> provider connection is done because essentially you could think of metamask as a decoupled application where the background process is the api the ui is a trusted connection and dapps are a untrusted connection.
if you dont mind me asking what are your breaking it out for?
I can top-level a little bit of the prototype we're working on, but preferably offline ;)
In the context of this thread: Ethereum has tremendous potential in its ability to script exchanges of value. However, development of apps on Ethereum has proven to be quite an undertaking: It's a big paradigm shift, and there is a lot of new stuff to learn.
The majority of what Metamask does is what the boilerplate of any Ethereum application would need to do: It secures private keys, manages wallets, details tx history, and signs/submits txs to the blockchain. These are things that enterprise doesn't want to spend time/money figuring out.
Further, a pro-level application is going to want to handle said functionality internally, not depend on a specific browser/extension -- even one as widely respected as Metamask. So that's why we've been working to embed Metamask directly in a web-app.
As such, I think the Eth-dev community would also benefit from the proverbial npm install metamask-controller
because it would give them a platform on which they could spend more of their time focused on building great contract-writing/-management interfaces.
Closing due to inactivity - if this is still relevant, feel free to open a new issue.
https://github.com/MetaMask/metamask-extension/blob/master/docs/porting_to_new_environment.md
Love the progress here, thank you -- couple things I found while working in parallel to get MetaMask implemented free of the extension:
In the UI, I needed access to:
metamask.ethProvider
metamask.ethQuery
In the UI, I needed to subscribe to:
update
eventOnce free of the Extension, in the Controller, I found the
controllerConnection
stream to be unnecessary. Removing that helped immensely to isolate and clarify the almightyproviderConnection
.Lastly, more long-term, for total abstraction from the browser, these would also need to be configurable:
global.localStorage
global.fetch