API for getting, listening for, and registering "@wallet-standard/base".Wallet | Wallets.

interface Wallets {
    get(): readonly Wallet[];
    on<E>(event: E, listener: WalletsEventsListeners[E]): (() => void);
    register(...wallets: Wallet[]): (() => void);
}

Methods

Methods

  • Get all Wallets that have been registered.

    Returns readonly Wallet[]

    Registered Wallets.

  • Add an event listener and subscribe to events for Wallets that are registered and unregistered.

    Type Parameters

    Parameters

    Returns (() => void)

    off function which may be called to remove the event listener and unsubscribe from events.

    As with all event listeners, be careful to avoid memory leaks.

      • (): void
      • Returns void

  • Register Wallets. This can be used to programmatically wrap non-standard wallets as Standard Wallets.

    Apps generally do not need to, and should not, call this.

    Parameters

    • Rest...wallets: Wallet[]

      Wallets to register.

    Returns (() => void)

    unregister function which may be called to programmatically unregister the registered Wallets.

    Apps generally do not need to, and should not, call this.

      • (): void
      • Returns void