Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@tonconnect/ui

Latest version: v6.2.0

Overview

Last scanned
1 Dec 2026
Published
1 Dec 2026
npm package Publisher: it-tonstudio-io, mywallet.io, thekiba
564 Stars
267 Forks
9 Versions
475.9K Downloads
TypeScript Repo language

Scan summary

@tonconnect/ui was last scanned on 1 Dec 2026 at version 6.2.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 9 versions; the latest 3 were published within 5 days (27 Nov – 1 Dec 2026).
  • Findings: No rules fired in version 6.2.0.
  • Downloads: 475,947 downloads.

Versions

9 versions published
Versions and the rules that fired in each
VersionPublishedStatus
6.2.0 LATEST 1 Dec 2026 No rules fired
6.1.0 28 Nov 2026 No rules fired
6.0.0 27 Nov 2026 No rules fired
5.0.4 22 Nov 2026 Not shown
5.0.3 13 Nov 2026 Not shown

No rules fired in 6.2.0

Findings

Findings for v6.2.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 6.2.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

TON Connect UI

TonConnect UI is a UI kit for TonConnect SDK. Use it to connect your app to TON wallets via TonConnect protocol.

If you use React for your dapp, take a look at TonConnect UI React kit.

If you want to use TonConnect on the server side, you should use the TonConnect SDK.

You can find more details and the protocol specification in the docs.


Latest API documentation

Getting started

Installation with cdn

Add the script to your HTML file:

<script src="https://unpkg.com/@tonconnect/ui@latest/dist/tonconnect-ui.min.js"></script>

ℹ️ If you don't want auto-update the library, pass concrete version instead of latest, e.g.

<script src="https://unpkg.com/@tonconnect/ui@0.0.9/dist/tonconnect-ui.min.js"></script>

You can find TonConnectUI in global variable TON_CONNECT_UI, e.g.

<script>
    const tonConnectUI = new TON_CONNECT_UI.TonConnectUI({
        manifestUrl: 'https://<YOUR_APP_URL>/tonconnect-manifest.json',
        buttonRootId: '<YOUR_CONNECT_BUTTON_ANCHOR_ID>'
    });
</script>

Installation with npm

npm i @tonconnect/ui

Usage

Create TonConnectUI instance

import { TonConnectUI } from '@tonconnect/ui'

const tonConnectUI = new TonConnectUI({
    manifestUrl: 'https://<YOUR_APP_URL>/tonconnect-manifest.json',
    buttonRootId: '<YOUR_CONNECT_BUTTON_ANCHOR_ID>'
});

You can also specify required wallet features to filter wallets that will be shown in the connect wallet modal:

import { TonConnectUI } from '@tonconnect/ui'

const tonConnectUI = new TonConnectUI({
    manifestUrl: 'https://<YOUR_APP_URL>/tonconnect-manifest.json',
    buttonRootId: '<YOUR_CONNECT_BUTTON_ANCHOR_ID>',
    walletsRequiredFeatures: {
        sendTransaction: {
            minMessages: 2, // Wallet must support at least 2 messages
            extraCurrencyRequired: true // Wallet must support extra currency
        }
    }
});

This will filter out wallets that don't support sending multiple messages or don't support extra currencies.

You can also specify preferred wallet features to prioritize wallets that support them in the connect wallet modal. These wallets will be shown first in the list, but others will still be available:

import { TonConnectUI } from '@tonconnect/ui'

const tonConnectUI = new TonConnectUI({
    manifestUrl: 'https://<YOUR_APP_URL>/tonconnect-manifest.json',
    buttonRootId: '<YOUR_CONNECT_BUTTON_ANCHOR_ID>',
    walletsPreferredFeatures: {
        sendTransaction: {
            minMessages: 2,
            extraCurrencyRequired: true
        }
    }
});

This will highlight wallets that support sending multiple messages and extra currencies, but won’t hide those that don’t. Use this to gently recommend more feature-rich wallets without excluding others.

Analytics

You can configure analytics collection when creating TonConnectUI:

const tonConnectUI = new TonConnectUI({
    manifestUrl: 'https://<YOUR_APP_URL>/tonconnect-manifest.json',
    analytics: { mode: 'off' } // or 'telemetry' (default), 'full'
});

Analytics modes:

Mode Description
off Analytics turned off. No events are collected or sent.
telemetry (default) Analytics used for technical research and issue debugging.
full Full analytics events.

See all available options:

TonConnectUiOptionsWithManifest

TonConnectUiOptionsWithConnector

Change options if needed

tonConnectUI.uiOptions = {
    language: 'ru',
    uiPreferences: {
        theme: THEME.DARK
    }
};

UI element will be rerendered after assignation. You should pass only options that you want to change. Passed options will be merged with current UI options. Note, that you have to pass object to tonConnectUI.uiOptions to keep reactivity.

DON'T do this:

/* WRONG, WILL NOT WORK */ tonConnectUI.uiOptions.language = 'ru'; 

See all available options

Fetch wallets list

const walletsList = await tonConnectUI.getWallets();

/* walletsList is 
{
    name: string;
    imageUrl: string;
    tondns?: string;
    aboutUrl: string;
    universalLink?: string;
    deepLink?: string;
    bridgeUrl?: string;
    jsBridgeKey?: string;
    injected?: boolean; // true if this wallet is injected to the webpage
    embedded?: boolean; // true if the dapp is opened inside this wallet's browser
}[] 
 */

or

const walletsList = await TonConnectUI.getWallets();

Open connect modal

"TonConnect UI connect button" (which is added at buttonRootId) automatically handles clicks and calls connect. But you are still able to open "connect modal" programmatically, e.g. after click on your custom connect button.

await tonConnectUI.openModal();

This method opens the modal window and returns a promise that resolves after the modal window is opened.

If there is an error while modal opening, TonConnectUIError or TonConnectError will be thrown depends on situation.

Close connect modal

tonConnectUI.closeModal();

This method closes the modal window.

Get current modal state

This getter returns the current state of the modal window. The state will be an object with status and closeReason properties. The status can be either 'opened' or 'closed'. If the modal is closed, you can check the closeReason to find out the reason of closing.

const currentModalState = tonConnectUI.modalState;

Subscribe to the modal window state changes

To subscribe to the changes of the modal window state, you can use the onModalStateChange method. It returns a function which has to be called to unsubscribe.

const unsubscribeModal = tonConnectUI.onModalStateChange(
    (state: WalletsModalState) => {
        // update state/reactive variables to show updates in the ui
        // state.status will be 'opened' or 'closed'
        // if state.status is 'closed', you can check state.closeReason to find out the reason
    }
);

Call unsubscribeModal() later to save resources when you don't need to listen for updates anymore.

Wallets Modal Control

The tonConnectUI provides methods for managing the modal window, such as openModal(), closeModal() and other, which are designed for ease of use and cover most use cases.

const { modal } = tonConnectUI;

// Open and close the modal
await modal.open();
modal.close();

// Get the current modal state
const currentState = modal.state;

// Subscribe and unsubscribe to modal state changes
const unsubscribe = modal.onStateChange(state => { /* ... */ });
unsubscribe();

While tonConnectUI internally delegates these calls to the modal, it is recommended to use the tonConnectUI methods for a more straightforward and consistent experience. The modal is exposed in case you need direct access to the modal window's state and behavior, but this should generally be avoided unless necessary.

Open specific wallet

The methods described in this section are marked as experimental and are subject to change in future releases.

To open a modal window for a specific wallet, use the openSingleWalletModal() method. This method accepts the wallet app_name as a parameter (please refer to the wallets-list.json) and opens the corresponding wallet modal. It returns a promise that resolves after the modal window is successfully opened.

await tonConnectUI.openSingleWalletModal('wallet_identifier');

To close the currently open specific wallet modal, use the closeSingleWalletModal() method:

tonConnectUI.closeSingleWalletModal();

To subscribe to the state changes of the specific wallet modal, use the onSingleWalletModalStateChange((state) => {}) method. It accepts a callback function that will be called with the current modal state.

const unsubscribe = tonConnectUI.onSingleWalletModalStateChange((state) => {
    console.log('Modal state changed:', state);
});

// Call `unsubscribe` when you want to stop listening to the state changes
unsubscribe();

To get the current state of the specific wallet modal window, use the singleWalletModalState property:

const currentState = tonConnectUI.singleWalletModalState;
console.log('Current modal state:', currentState);

Get current connected Wallet and WalletInfo

You can use special getters to read current connection state. Note that this getter only represents current value, so they are not reactive. To react and handle wallet changes use onStatusChange method.

const currentWallet = tonConnectUI.wallet;
const currentWalletInfo = tonConnectUI.walletInfo;
const currentAccount = tonConnectUI.account;
const currentIsConnectedStatus = tonConnectUI.connected;

Subscribe to the connection status changes

To subscribe to the changes of the connection status, you can use the onStatusChange method. It returns a function which has to be called to unsubscribe.

const unsubscribe = tonConnectUI.onStatusChange(
    walletAndwalletInfo => {
        // update state/reactive variables to show updates in the ui
    } 
);

Call unsubscribe() later to save resources when you don't need to listen for updates anymore.

Disconnect wallet

Call to disconnect the wallet.

await tonConnectUI.disconnect();

Send transaction

Wallet must be connected when you call sendTransaction. Otherwise, an error will be thrown.

const transaction = {
    validUntil: Math.floor(Date.now() / 1000) + 60, // 60 sec
    messages: [
        {
            address: "EQBBJBB3HagsujBqVfqeDUPJ0kXjgTPLWPFFffuNXNiJL0aA",
            amount: "20000000",
         // stateInit: "base64bocblahblahblah==" // just for instance. Replace with your transaction initState or remove
        },
        {
            address: "EQDmnxDMhId6v1Ofg_h5KR5coWlFG6e86Ro3pc7Tq4CA0-Jn",
            amount: "60000000",
         // payload: "base64bocblahblahblah==" // just for instance. Replace with your transaction payload or remove
        }
    ]
};

// you can also include extra currencies in your transaction
const transactionWithExtraCurrency = {
    validUntil: Math.floor(Date.now() / 1000) + 60,
    messages: [
        {
            address: "EQBBJBB3HagsujBqVfqeDUPJ0kXjgTPLWPFFffuNXNiJL0aA",
            // Specify the extra currency
            extraCurrency: {
                100: "10000000"
            }
        }
    ]
};

try {
    const result = await tonConnectUI.sendTransaction(transaction);

    // you can use signed boc to find the transaction 
    const someTxData = await myAppExplorerService.getTransaction(result.boc);
    alert('Transaction was sent successfully', someTxData);
} catch (e) {
    console.error(e);
}
Trace ID for analytics

You can pass a custom trace ID to track the transaction through your analytics:

const result = await tonConnectUI.sendTransaction(transaction, {
    traceId: '019a2a92-a884-7cfc-b1bc-caab18644b6f' // optional, UUIDv7 auto-generated if not provided
});

console.log(result.traceId); // use this ID to correlate with analytics events

sendTransaction will automatically render informational modals and notifications. You can change its behavior:

const result = await tonConnectUI.sendTransaction(defaultTx, {
    modals: ['before', 'success', 'error'],
    notifications: ['before', 'success', 'error']
});

Default configuration is:

const defaultBehavior = {
    modals: ['before'],
    notifications: ['before', 'success', 'error']
}

You can also modify this behavior for all actions calls using uiOptions setter:

tonConnectUI.uiOptions = {
        actionsConfiguration: {
            modals: ['before', 'success', 'error'],
            notifications: ['before', 'success', 'error']
        }
    };
Structured items

Instead of raw messages, you can describe what to do — transfer TON, a jetton, or an NFT — and let the wallet build the message body (BoC) for you. Pass items instead of messages; the two are mutually exclusive in a single request.

import { comment } from '@ton/ton';

await tonConnectUI.sendTransaction({
    validUntil: Math.floor(Date.now() / 1000) + 600,
    network: '-239', // CHAIN.MAINNET; '-3' for testnet
    items: [
        // Native TON transfer
        {
            type: 'ton',
            address: 'EQD4oN...wz7A',
            amount: '5000000',
            payload: comment('Hello, world!') // optional, base64 BoC
        },
        // Jetton (TEP-74) transfer — the wallet resolves the user's jetton wallet
        // and builds the transfer body
        {
            type: 'jetton',
            master: 'EQCxE6...Id_sDs',  // jetton master address
            amount: '1000000',          // amount in jetton elementary units
            destination: 'EQD4oN...wz7A'
        },
        // NFT (TEP-62) transfer
        {
            type: 'nft',
            nftAddress: 'EQAcoW...qD8qM3T',
            newOwner: 'EQD4oN...wz7A'
        }
    ]
});

Structured items work only with wallets that advertise the matching SendTransaction.itemTypes. Restrict the wallet picker with walletsRequiredFeatures so only supporting wallets are shown:

const tonConnectUI = new TonConnectUI({
    manifestUrl: 'https://<YOUR_APP_URL>/tonconnect-manifest.json',
    walletsRequiredFeatures: {
        sendTransaction: { itemTypes: ['ton', 'jetton', 'nft'] }
    }
});

items are also accepted by signMessage. See StructuredItem for the full field reference.

Sign data

Sign arbitrary data with the user's wallet. The wallet will display the data to the user for confirmation before signing. Wallet must be connected when you call signData, otherwise an error will be thrown.

Data Types

You can sign three types of data. Choose the right format based on your use case:

  • Text - Use for human-readable text that users should see and understand
  • Cell - Use for TON Blockchain data that should be used in smart contracts (wallet may show unknown content warning)
  • Binary - For other arbitrary data (least preferred due to security warnings)
Text Format

Use when you need to sign human-readable text. The wallet displays the text to the user.

Parameters:

  • type (string, required): Must be "text"
  • text (string, required): UTF-8 text to sign
  • network (string, optional): "-239" for mainnet, "-3" for testnet
  • from (string, optional): Signer address in raw format "0:<hex>"
const textData = {
    type: "text",
    text: "Confirm new 2fa number:\n+1 234 567 8901",
    network: "-239", // MAINNET = '-239', TESTNET = '-3'
    from: "0:348bcf827469c5fc38541c77fdd91d4e347eac200f6f2d9fd62dc08885f0415f"
};

try {
    const result = await tonConnectUI.signData(textData);
    console.log('Signed:', result);
} catch (e) {
    console.error('Error:', e);
}

You can also pass a trace ID to correlate with analytics:

const result = await tonConnectUI.signData(textData, {
    traceId: '019a2a92-a884-7cfc-b1bc-caab18644b6f' // optional, UUIDv7 auto-generated if not provided
});

console.log(result.traceId); // use this ID to correlate with analytics events
Binary Format

Use for arbitrary binary data. The wallet shows a warning about unknown content.

Parameters:

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @tonconnect/ui

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Frame 2085668439 (1)
Group 1261154229