Comments (2)
The purpose of this package is to reliably detect the MetaMask extension and mobile providers (window.ethereum
). They are, respectively, synchronously and asynchronously injected. This means that the extension provider will always be available by the time the website's JavaScript begins to execute, whereas the mobile provider may take some number of milliseconds before being set as window.ethereum
. This package handles both cases for you.
This package will also detect any window.ethereum
by default, although the consumer can specify whether window.ethereum.isMetaMask
must be true via the mustBeMetaMask
argument.
@metamask/get-provider
is probably a better name, although I'm not sure if it's significantly better. I don't think it's unreasonable for a package we've prefixed with @metamask
to be somewhat specific to us.
from detect-provider.
OK this makes sense. Thanks for explaining!
from detect-provider.
Related Issues (20)
- Unnecessary wait on desktop when not metamask installed HOT 1
- No provider selected for request eth_chainId when coinbase wallet extension is installed HOT 3
- @metamask/detect-provider: Unable to detect window.ethereum on Android browsers and Metamask app HOT 4
- @metamask/detect-provider: Unable to detect window.ethereum. HOT 7
- (WARNING) MetaMask: The event 'close' is deprecated and may be removed in the future. Please use 'disconnect' instead. HOT 1
- Failed to parse source map - Error: ENOENT: no such file or directory HOT 26
- Can't detect provider on Android Metamask browser HOT 14
- $@
- npm package is not up to date HOT 1
- Its seems the files for latest version is missing HOT 2
- Unexpected behavior when there are multiple injected providers HOT 1
- MetaMask detect connection does not detect my mobile MetaMask App HOT 21
- Property 'request' does not exist on type 'MetaMaskEthereumProvider'.ts(2339) HOT 10
- USTc
- C++ HOT 1
- Readme's description of the behaviour of mobile apps. HOT 6
- Reject instead of resolve(null) when `mustBeMetamask` is true HOT 1
- Is there an API to open the MetaMask mobile app?
- Export MetaMaskEthereumProvider
- Make compatible with EIP-6963
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from detect-provider.