Detecting and Understanding the Ethereum Provider

Published by Mario Oettler on

Last Updated on 20. March 2023 by Martin Schuster

In this topic, we use the Ethereum provider API of our wallet. The provider API is specified in EIP-1193 to maintain a consistent API for interacting with wallet accounts and the blockchain.

MetaMask provides such a provider API.

It allows websites to:

  • read and interact with user’s accounts
  • read data from the blockchain
  • sign and send transactions

Extensive information about MetaMask and its provider API can be found here.

Historically, the provider was made available by window.ethereum. If you check if that is true, then the provider is available.

Another way to detect a provider is to use a library that does this for you. Some libraries support multiple platforms.

Categories:

https://blockchain-academy.hs-mittweida.de/wp-content/uploads/2021/04/logo_bcam_rgb_gross.png

Welcome

Blockchain Academy

Continue with credential

No account yet?

Powered by Hidy

Register with Hidy


Register
Sign in

We need the following credential to register:

please select:

To create a new account, we need the following data from you:

We would appreciate the following additional information from you for the creation of your account:

Welcome

Blockchain Academy

Continue with credential

Already have an account?

Powered by Hidy

Sign in with Hidy


Register
Sign in

We need the following credential to log in:

please select: