browserUtils
Index
Enumerations
BrowserSupport
Interfaces
Ethereum
ExtendedWindow
InjectedWeb3
Web3VersionAPI
WindowWithEthereum
WindowWithWeb3
Functions
Functions
getBrowserSupport
▸ getBrowserSupport(): NoMetamask | MetamaskLegacy | MetamaskModern | None
Defined in src/browserUtils.ts:45
Returns the browser support for Ethereum
Returns: NoMetamask | MetamaskLegacy | MetamaskModern | None
onAddressChange
▸ onAddressChange(cb
: function): (Anonymous function)
Defined in src/browserUtils.ts:189
Runs the callback anytime the wallet address changes in the browser
Parameters:
▪ cb: function
callback that receives the new address and the previous one
▸ (newAddress
: string, previousAddress?
: undefined | string): void
Parameters:
Name | Type |
| string |
| undefined | string |
Returns: (Anonymous function)
an unsubscribe function
onNetworkChange
▸ onNetworkChange(cb
: function): (Anonymous function)
Defined in src/browserUtils.ts:225
Runs the callback anytime the current network changes in the browser
Parameters:
▪ cb: function
callback that receives the new network id and the previous one
▸ (newNetwork
: number, previousNetwork?
: undefined | number): void
Parameters:
Name | Type |
| number |
| undefined | number |
Returns: (Anonymous function)
an unsubscribe function
Last updated