SUI Wallet Integration
Getting Started
To develop SUI wallet functionality for Cactus Link, firstly install Cactus Link.
The SUI wallet integration follows the Sui Wallet Standard.
Connecting to the Wallet
import { getWallets } from '@mysten/wallet-standard';
const wallets = getWallets().get();
const cactusWallet = wallets.find(w => w.name === 'Cactus Link');
const { accounts } = await cactusWallet.features['standard:connect'].connect();
console.log(accounts);
Supported Methods
| Method | Description |
|---|---|
connect |
Connect and retrieve account address and public key |
signPersonalMessage |
Sign a personal message |
signTransaction |
Sign a transaction (returns signature without executing) |
signAndExecuteTransaction |
Sign and submit a transaction to the network |
reportTransactionEffects |
Report transaction effects back to the wallet |
getPublicKey |
Get the public key for an account |