Hierarchy

  • TonConnect

Implements

Constructors

Accessors

Methods

  • Disconnect form thw connected wallet and drop current session.

    Parameters

    • Optional options: {
          signal?: AbortSignal;
      }
      • Optional signal?: AbortSignal

    Returns Promise<void>

  • Allows to subscribe to connection status changes and handle connection errors.

    Returns

    unsubscribe callback.

    Parameters

    • callback: ((wallet: null | Wallet) => void)

      will be called after connections status changes with actual wallet or null.

        • (wallet: null | Wallet): void
        • Parameters

          Returns void

    • Optional errorsHandler: ((err: TonConnectError) => void)

      (optional) will be called with some instance of TonConnectError when connect error is received.

    Returns (() => void)

      • (): void
      • Allows to subscribe to connection status changes and handle connection errors.

        Returns

        unsubscribe callback.

        Returns void

  • Pause bridge HTTP connection. Might be helpful, if you want to pause connections while browser tab is unfocused, or if you use SDK with NodeJS and want to save server resources.

    Returns void

  • Try to restore existing session and reconnect to the corresponding wallet. Call it immediately when your app is loaded.

    Parameters

    • Optional options: {
          openingDeadlineMS?: number;
          signal?: AbortSignal;
      }
      • Optional openingDeadlineMS?: number
      • Optional signal?: AbortSignal

    Returns Promise<void>

  • Check if the app is opened inside specified wallet's browser.

    Parameters

    • walletJSKey: string

      target wallet's js bridge key.

    Returns boolean

  • Check if specified wallet is injected and available to use with the app.

    Parameters

    • walletJSKey: string

      target wallet's js bridge key.

    Returns boolean

Generated using TypeDoc