TON Wallet Integration
Getting Started
To develop TON wallet functionality for Cactus Link, firstly install Cactus Link.
The TON wallet integration follows the TonConnect protocol.
Connecting to the Wallet
// Connect and request ton_addr
const response = await window.tonkeeper.tonConnect_connect([
{
manifestUrl: "https://yourapp.com/tonconnect-manifest.json",
items: [{ name: "ton_addr" }]
}
]);
Supported Methods
| Method | Description |
|---|---|
tonConnect_connect |
Connect the wallet and request account info |
tonConnect_reconnect |
Reconnect a previously authorized session |
tonConnect_disconnect |
Disconnect the wallet |
tonConnect_sendTransaction |
Send a TON transaction |
tonConnect_signData |
Sign arbitrary data |
Supported Events
| Event | Description |
|---|---|
connect |
Fired after a successful connection |
connect_error |
Fired when connection fails |
disconnect |
Fired when the wallet disconnects |
tonConnect_event |
General TonConnect protocol events |