MetaMask / web3-provider-engine

A JavaScript library for composing Ethereum provider objects using middleware modules
MIT License
599 stars 328 forks source link

Utilization in Chrome Extensions #319

Open curldapps opened 5 years ago

curldapps commented 5 years ago

Hi MetaMask team -

Thanks for providing this awesome provider engine! I wanted to get your opinion/pointers on using this provider engine inside my own Chrome Extension. Could I use this to inject web3 into web pages in the context of a custom Chrome Extension?

Essentially, I need a way to format and sign Ethereum transactions from a custom Chrome Extension, and I am exploring options to do this without requiring end-users to install multiple different extensions.

The user would need to be able to create a key, then create a transaction, and sign it for submission which requires injected web3 and a provider. Any guidance on viability and integration of this engine into a custom extension would be hugely appreciated.

Thanks

curldapps commented 5 years ago

A potential workaround (non-ideal) is that users are required to have MetaMask installed as well and use the provider therein to do the transaction processing:

https://medium.com/@writeprovidence/how-to-create-a-web3-provider-from-another-extension-6b5ea59ed4c9

In an ideal world, I would like to be able to generate a key and process the transaction within one single extension.