Constructors
constructor
- new MetaMaskConnector(provider?: BrowserProvider): MetaMaskConnector
Parameters
Optional
provider: BrowserProvider
Accessors
chainId
- get chainId(): null | string
Returns null | string
currentAccount
- get currentAccount(): null | string
Returns null | string
Methods
connectWallet
- connectWallet(): Promise<void>
Returns Promise<void>
isMetaMaskInstalled
- isMetaMaskInstalled(): true
Returns true
isWalletIsConnected
- isWalletIsConnected(): boolean
Returns boolean
providerOnAccountsChanged
- providerOnAccountsChanged(listener: Listener): void
Returns void
providerOnChainChanged
- providerOnChainChanged(listener: Listener): void
Returns void
providerOnConnect
- providerOnConnect(listener: Listener): void
Returns void
providerOnDisconnect
- providerOnDisconnect(listener: Listener): void
Returns void
providerRemoveListener
- providerRemoveListener(event: string, listener: Listener): void
Parameters
- event: string
- listener: Listener
Returns void
providerRemoveListeners
- providerRemoveListeners(): void
Returns void
requestAccounts
- requestAccounts(): Promise<null | string[]>
Returns Promise<null | string[]>
signMessage
- signMessage(message: string): Promise<undefined | string>
Returns Promise<undefined | string>
web3ProviderOn
- web3ProviderOn(event: string, listener: Listener): void
Parameters
- event: string
- listener: Listener
Returns void
web3ProviderRemoveListener
- web3ProviderRemoveListener(event: string, listener: Listener): void
Parameters
- event: string
- listener: Listener
Returns void
web3ProviderRemoveListeners
- web3ProviderRemoveListeners(): void
Returns void
EIP-1193 Event Listeners
.on in Web3Provider does not understand EIP-1193 events see - https://github.com/ethers-io/ethers.js/discussions/1560#discussioncomment-730893