Installation
Install the required peer dependency:Basic usage
Configuration
The Defly wallet accepts the following configuration options:Custom WalletConnect bridge URL. Defaults to the standard Defly bridge.
Whether to show a toast notification when signing transactions.
Chain ID for the Algorand network:
416001: MainNet416002: TestNet416003: BetaNet4160: Custom network
Type definition
Features
Multi-account support
Defly Wallet supports connecting multiple accounts. All connected accounts are available through the wallet state.Mobile deep linking
On mobile devices, Defly Wallet uses deep linking to open the native app for transaction signing.DeFi integration
Defly Wallet includes built-in DeFi features and swap functionality for enhanced user experience.Methods
connect()
Initiates connection to Defly Wallet. Opens the Defly connection modal. Returns:Promise<WalletAccount[]>
disconnect()
Disconnects from Defly Wallet and clears the session. Returns:Promise<void>
signTransactions()
Signs transactions using Defly Wallet. See signing transactions for details. Parameters:txnGroup: Transaction or array of transactions to signindexesToSign?: Optional array of indexes to sign
Promise<(Uint8Array | null)[]>
Session management
Defly Wallet uses WalletConnect for session management. Sessions persist across page reloads and are automatically restored when the app initializes.WalletConnect session handling
Defly and Pera wallets share WalletConnect infrastructure. use-wallet manages session switching automatically when toggling between these wallets.Platform support
- Web: Full support
- Mobile: Full support via deep linking
- Desktop: Full support