Extends¶
Constructor¶
constructor(extension)
Parameter
extension
-MetamaskExtension
Property¶
extension¶
Type: MetamaskExtension
Description: Metamask wrapper instance passed by constructor.
Methods¶
link¶
async link()
Description
Connect user to the MetaMask. This method will call out MetaMask if user are not connected to it. This is useful when MetaMask is not logged in.
Returns :
Promise<Result<String, Status>>
:Selected account in MetaMask will be set into the data field of Result if link successfully.
unlink¶
async unlink()
Description
Disconnect user and MetaMask.
Returns :
Promise<Result<Bool, Status>>
:Boolean value true will be set into the data field of Result if unlink successfully.