Skip to main content

Self-Custodial Wallets

A self-custodial wallet stores your private key on a device you control. No third party holds the key, and no third party can authorize transactions on your behalf. If you lose the device and your recovery passphrase, access to your assets is permanently lost. Every self-custodial wallet compatible with Sui implements the Wallet Standard, which means Sui dApp Kit and other apps can discover and connect to them automatically, without any wallet-specific code.

Phantom

Phantom is a self-custodial, multi-chain browser extension wallet available for Chrome, Firefox, Edge, and Brave, as well as a mobile app for iOS and Android. It stores your private key on your device and encrypts it with a password.

On Sui, Phantom supports the following:

  • Sending and receiving SUI and Sui-native tokens
  • In-app token swaps
  • NFT management
  • Staking
  • Connecting to Sui apps through the Wallet Standard

To get started, install Phantom from phantom.com and create or import a Sui account. Phantom detects the Sui network automatically. If you already have a Sui account elsewhere, you can import it using your existing recovery passphrase or private key.

Ledger

Ledger is a hardware wallet that stores private keys on a dedicated secure element chip physically isolated from your computer or phone. Transactions are signed on the device itself, so the private key never leaves the hardware.

On Sui, Ledger supports the following:

  • Sending and receiving SUI and Sui tokens natively through Ledger Live
  • Clear Signing, which displays human-readable transaction details on the device screen before you confirm anything
  • Connecting to third-party Sui wallets and apps that support hardware signers

To use Ledger with Sui, install the Sui app on your Ledger device through Ledger Wallet. Connect your Ledger device to a wallet such as Ledger Wallet or a compatible Sui wallet such as Slush.

App integration

The Sui dApp Kit is the official SDK for building Sui apps. Any wallet that implements the Wallet Standard, including Phantom and Ledger, is detected automatically and appears in the connection UI without any wallet-specific configuration.

Sui dApp Kit 2.0 consists of two packages:

  • @mysten/dapp-kit-core: Framework-agnostic core that works with vanilla JavaScript, React, Vue, or any other framework.
  • @mysten/dapp-kit-react: React bindings built on top of the core package, including hooks and pre-built components.

Install

For React applications:

npm i @mysten/dapp-kit-react @mysten/sui

For vanilla JavaScript or other frameworks:

npm i @mysten/dapp-kit-core @mysten/sui

Set up a dApp Kit instance

Create a configuration file to initialize your dApp Kit instance. The createDAppKit function manages wallet connections, network configuration, and Sui client access.

`

ParameterRequiredDescription
networksYesList of networks the app supports
defaultNetworkNoInitial network. Defaults to first in the networks array
createClientYesFactory function that returns a SuiClient for a given network
autoConnectNoReconnects to the last used wallet on load. Defaults to true
enableBurnerWalletNoEnables a development-only burner wallet. Defaults to false
walletInitializersNoCustom wallet registrations for wallets outside the Wallet Standard
slushWalletConfigNoEnables and configures Slush Wallet. Set to null to disable

Add the provider

Wrap your application with DAppKitProvider to make all hooks available throughout the component tree:

ConnectButton renders a complete wallet connection UI. It automatically lists any browser extension wallets the user has installed that implement the Wallet Standard with no additional configuration required.

Read wallet state

Use hooks to access information about the connected wallet and account:

HookDescription
useWalletsReturns all detected Wallet Standard wallets
useWalletConnectionReturns connection status, connected wallet, and current account
useCurrentWalletReturns the currently connected wallet
useCurrentAccountReturns the currently selected account
useDAppKitReturns the dApp Kit instance and its actions

List available wallets

Sign and execute a transaction

When the user is connected through a hardware wallet such as Ledger, signAndExecuteTransaction routes the signing request to the device. Once the user approves on the hardware device, the host wallet submits the signed transaction to the Sui network and returns the digest and effects to your app.

Preferred wallets

Use preferredWallets in createDAppKit to sort specific wallets to the top of the connection UI. Wallets are matched by name:

export const dAppKit = createDAppKit({
networks: ['mainnet'],
createClient: (network) =>
new SuiGrpcClient({ network, baseUrl: GRPC_URLS[network] }),
walletInitializers: [],
});

Wallet ordering and filtering can also be controlled through the ConnectModal component.