Class WalletConnection

Constructors

  • Parameters

    • accountId: string

      The connected account

    • publicKey: string

      The accounts public key

    • watchOnly: boolean

      Indicates whether this account is watch only, or not. Watch Only accounts cannot sign messages.

    • availableNodeHosts: string[]

      The available nodeHosts for given network, which are registered in the wallet.

    • currentNodeHost: string

      The currently selected nodeHost in the wallet

    • adapter: ExtensionAdapter

      the extension adapter with its internal implementation

    Returns WalletConnection

Properties

accountId: string

The connected account

availableNodeHosts: string[]

The available nodeHosts for given network, which are registered in the wallet.

currentNodeHost: string

The currently selected nodeHost in the wallet

publicKey: string

The accounts public key

watchOnly: boolean

Indicates whether this account is watch only, or not. Watch Only accounts cannot sign messages.

Methods

  • Listens to changes in the wallet

    Only one listener instance is allowed, previous listener will be removed/overwritten

    Parameters

    • notificationHandler: ExtensionNotificationHandler

      The object with the event handler

    Returns ExtensionListener

    The listener instance, needed to unlisten