Constructors
new MetaMask()
Parameters
Returns
MetaMask
Properties
Methods
addNetwork()
Parameters
Returns
Promise<boolean>
True if the network was added successfully
addNewAccount()
Parameters
Returns
Promise<boolean>
True if the account was added successfully
addNewToken()
Returns
Promise<boolean>
True if the token was added successfully
approveNewNetwork()
Returns
Promise<boolean>
True if the new network was approved successfully
approveSwitchNetwork()
Returns
Promise<boolean>
True if the network switch was approved successfully
approveTokenPermission()
Parameters
Returns
Promise<boolean>
True if the permission was approved, false otherwise
closeTransactionDetails()
Returns
Promise<boolean>
True if the transaction details were closed successfully, false otherwise
confirmSignature()
Returns
Promise<boolean>
True if the signature was confirmed successfully, false otherwise
confirmTransaction()
Parameters
Returns
Promise<boolean>
True if the transaction was confirmed successfully
confirmTransactionAndWaitForMining()
Returns
Promise<boolean>
True if the transaction was confirmed and mined successfully, false otherwise
connectToAnvil()
Parameters
Returns
Promise<boolean>
True if the connection was successful, false otherwise
connectToDapp()
Parameters
Returns
Promise<boolean>
True if the connection was successful
createAnvilNode()
Parameters
Returns
Promise<{
"anvil": Anvil;
"chainId": number;
"rpcUrl": string;
}>
Object containing the Anvil instance, RPC URL, and chain ID
decrypt()
Returns
Promise<boolean>
True if the message was decrypted successfully, false otherwise
deployToken()
Returns
Promise<boolean>
True if the token was deployed successfully
emptyAnvilNode()
Returns
Promise<boolean>
True if the operation was successful
getAccount()
Returns
Promise<string>
The current account name
getAccountAddress()
Returns
Promise<string>
The current account address
getNetwork()
Returns
Promise<string>
The current network name
goBackToHomePage()
Returns
Promise<boolean>
True if the navigation was successful
importWallet()
Parameters
Returns
Promise<boolean>
True if the import was successful
importWalletFromPrivateKey()
Parameters
Returns
Promise<boolean>
True if the import was successful
lock()
Returns
Promise<boolean>
True if the wallet was locked successfully
openSettings()
Returns
Promise<boolean>
True if the settings page was opened successfully
openSidebarMenu()
Parameters
Returns
Promise<boolean>
True if the menu was opened successfully
openTransactionDetails()
Parameters
Returns
Promise<boolean>
True if the transaction details were opened successfully, false otherwise
providePublicEncryptionKey()
Returns
Promise<boolean>
True if the key was provided successfully, false otherwise
rejectNewNetwork()
Returns
Promise<boolean>
True if the new network was rejected successfully
rejectSignature()
Returns
Promise<boolean>
True if the signature was rejected successfully
rejectSwitchNetwork()
Returns
Promise<boolean>
True if the network switch was rejected successfully
rejectTokenPermission()
Returns
Promise<boolean>
True if the permission was rejected successfully
rejectTransaction()
Returns
Promise<boolean>
True if the transaction was rejected successfully
renameAccount()
Parameters
Returns
Promise<boolean>
True if the rename was successful
resetAccount()
Returns
Promise<boolean>
True if the reset was successful
switchAccount()
Parameters
Returns
Promise<boolean>
True if the switch was successful
switchNetwork()
Parameters
Returns
Promise<boolean>
True if the switch was successful, false otherwise
toggleDismissSecretRecoveryPhraseReminder()
Returns
Promise<boolean>
True if the toggle was successful
toggleShowTestNetworks()
Returns
Promise<boolean>
True if the toggle was successful
unlock()
Returns
Promise<boolean>
True if the wallet was unlocked successfully
