Interface ITonConnect

Hierarchy

  • ITonConnect

Implemented by

Properties

account: null | Account

Current connected account or null if no account is connected.

connected: boolean

Shows if the wallet is connected right now.

wallet: null | Wallet

Current connected wallet or null if no account is connected.

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: ((walletInfo: null | Wallet) => void)

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

        • (walletInfo: 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>

Generated using TypeDoc