Class AccountMetamaskFactory

A factory class that generates instances of AccountMetamask.

Hierarchy (View Summary)

Constructors

Accessors

  • get provider(): BaseProvider

    Returns BaseProvider

    this class is not intended to provide raw access to the provider

Methods

  • Discovers accounts in set that already have been used (has any on-chain transactions). It returns an empty array if none of accounts been used. If a used account is preceded by an unused account then it would be ignored.

    Parameters

    • node: Node

      Instance of Node to get account information from

    Returns Promise<AccountBase[]>

  • It throws an exception if MetaMask or Aeternity snap has an incompatible version or is not installed or is not connected to the aepp.

    Returns Promise<void>

    use requestSnap instead

  • Request MetaMask to install Aeternity snap or connect it to the current aepp. MetaMask can have only one Aeternity snap version installed at a time. This method is intended to upgrade the snap to a specified version if needed by the aepp. If Aeternity snap is installed but wasn't used by the aepp, then the user still needs to approve the connection. If the currently installed version corresponds to the version range, then the snap won't be upgraded. To downgrade the snap, the user must manually uninstall the current version.

    Parameters

    • version: string = ...

      Snap version range (e.g. 1, 0.1.*, ^0.0.9, ~0.0.9; >=0.0.9 <0.1.0) (default: a version range supported by sdk)

    Returns Promise<SnapDetails>