Question:

Is Metamask a web3 provider?

Amelia: 2 weeks ago

Is Metamask a web3 provider? I am aware it is a wallet. But is it also a web3 provider?

I have read from here (https://ethereum.stackexchange.com/a/34072/44794) that:

Web3 provider is a website running geth or parity node which talks to Ethereum network.

Then I have read here (https://github.com/Web3Modal/web3modal#introduction) that:

Web3Modal is an easy-to-use library to help developers add support for multiple providers in their apps with a simple customizable configuration.

What do you call Metamask, Dapper, Gnosis Safe, Frame and the rest? Are they web3Providers? Or what are they?

I am asking this line of code here (https://github.com/Web3Modal/web3modal#usage):

const provider = await web3Modal.connect();

const web3 = new Web3(provider)

// what is provider and why should I pass it to a new instantiation of web3?

;

Answer:
Mia: 2 weeks ago

Is Metamask a web3 provider?

Yes.

Web3 provider is a website running geth or parity node which talks to Ethereum network.

In the answer you've pointed to, when he says "website", he really means "RPC endpoint" (you'll see his path contains the string "api"), where the endpoint will likely be on a back end server running an Ethereum node.

The endpoint - i.e. path for connecting to a client node - is "provided" in one of two ways:

  • Built directly into your front end via a library (e.g. Authereum), or
  • Injected into the front end by the browser or browser add-on (e.g. Metamask).

Web3Modal allows you to handle both of these, and have the user pick the one they want to use.