A utility library for detecting the presence of the GameStop Wallet Browser Extension provider. It connects to the wallet via window.gamestop
if it's set as the default provider, or window.ethereum
if not set as the default provider.
import detectGamestopProvider from "@gamestopnft/detect-gamestop-provider";
detectGamestopProvider()
.then((provider) => console.log(provider))
.catch((e) => console.error(e));
<html>
<body>
</body>
<script type="text/javascript" src="../dist/index.min.js"></script>
<script type="text/javascript">
detectGamestopProvider.default().then(p => alert(p));
</script>
</html>
detectGamestopProvider accepts an optional parameter:
Denotes how much time (in milliseconds) to wait for asynchronously injected providers to load.
Type: number
Default: 3000
Please utilize either of the following logos (svg or png) when integrating with the GameStop Wallet.