i am learning building Dapps. And i got to know to know about metamask. I've read about metamask is an ethereum wallet which we can use to sign Tx's without running a full node and inject web3 to webpages. and I know that the architecture of Dapps is like-

web-app --> web3 ---(JSON RPC)--->RPC PORT ---> GETH NODE--->ethereum API ---->ethereum blockchain.

if I am running my own ethereum node. and in my web-app i am using nodejs which can import web3 library.so why do i need metamask? and where does the metamask fits in Dapp architecture?

1 Answer 1


Metamask is a browser extension. More info: https://metamask.io

It is not used in node.js or server side implementation. For server side, you have to unlock accounts using private keys, etc.

For the browser side, it injects web3 object, which you can use in browser side Javascript and call all the methods and all.

Sample code for browser side implementation

In the sample code, not to confuse with external web3 implementation (which is called as web3Infura), as that was done for separate version of web3.

But as you can see, there is web3 object automatically injected by metamask and which you can use to do all kinds of things.

Hope this helps!

  • To be more accurate MetaMask is a browser extension wallet with web3 interface support. MetaMask is also now launching a mobile wallet with support for WalletConnect, different interface: ethnews.com/metamask-develops-mobile-client Jun 19, 2019 at 10:09
  • so it means it is necessary to use metamask or mist browser? will i able to sign my transactions made by dapp without using metamask or mist etc. Jun 19, 2019 at 20:20
  • If you dont want to use metamaks, then you can use private keys to sign transaction. but it is highly discouraged to do in browser/client side. you can do that in server side like node.js etc. Jun 20, 2019 at 6:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.