Skip to main content

Tonconnect (soon)

tons supports Tonconnect v2 protocol. User can connect/disconnect a wallet to any dapp and confirm transactions.

tons-interactive

  1. Connect wallet to a dapp (0:00)
  2. Confirm transaction (0:50)
  3. Disconnect the wallet (1:32)

tons

Connect a wallet

tons tonconnect connect myWallet COPIED_BASE64_PAYLOAD

List connections

$ tons tonconnect list
| Wallet | Connected at | Dapp Name | Dapp Url | Dapp Client Id |
|:-----------:|:--------------------------:|:---------:|:----------------------------------------:|:----------------------------------------------------------------:|
| myWallet | 2023-06-26 14:40:31.838090 | Demo Dapp | https://ton-connect.github.io/demo-dapp/ | 3329b835c95ea84cc841dfdca5eff9b8178c7221fe8174736c5cee59a3df9201 |

Handle new request

tons tonconnect handle-queued-request myWallet 3329b835c95ea84cc841dfdca5eff9b8178c7221fe8174736c5cee59a3df9201

Disconnect the wallet

tons tonconnect disconnect myWallet 3329b835c95ea84cc841dfdca5eff9b8178c7221fe8174736c5cee59a3df9201