Is it referring to the ethereum blockchain?
Sorry if this seems too basic of a question. I'm new and I can't seem to find an answer anywhere.
This link should explain where the window.ethereum
object is derived from.
This link should explain its purpose.
tl,dr - Metamask injects window.ethereum
into the browser, it is a API Provider which uses a JSON RPC API (like Infura) to communicate with Ethereal network Nodes (e.g. running Geth)
ethereum
is the API Provider object injected into the global window object. The purpose of that object is to make API calls to Geth nodes via Infura. It will also allow the dapp to determine which blockchain is being targeted.
Commented
Apr 18, 2022 at 5:41
You can think of window.ethereum
as an object that let you communicate with a browser extension(in most cases Metamask). Actually, it literally is an object.
The browser extension(let's say Metamask) does all the hard work of managing user's addresses, and interacting with a blockchain. But there is no way for your web3 application to directly talk to Metamask.
window.ethereum
sits in between a web3 application and Metamask. It lets your web3 app to interact with blockchain through Metamask.