@txnlab/use-wallet-solid package provides SolidJS-specific bindings for use-wallet, including a context provider and reactive primitives that enable fine-grained reactivity in Solid applications.
Installation
- npm
- yarn
- pnpm
Setup
Configure wallet provider
Create aWalletManager instance with your desired wallet providers and network configuration, then wrap your app with the WalletProvider component.
Using the wallet hook
TheuseWallet hook provides reactive access to wallet state and signing methods. All returned values are reactive signals or accessors.
Basic usage
Return values
TheuseWallet hook returns reactive signals and methods:
Signing transactions
ThetransactionSigner method is compatible with the Algorand SDK’s AtomicTransactionComposer.
Network management
TheuseNetwork hook provides methods for managing network configuration.
Return values
Managing accounts
Switch between accounts for a connected wallet:Working with multiple wallets
Iterate through wallets and check their connection status:Signing arbitrary data
For wallets that support it, you can sign arbitrary data for authentication:Accessing the wallet manager
For advanced use cases, access the wallet manager directly:TypeScript support
The package includes full TypeScript definitions. All hooks and components are fully typed:Next steps
Configuration
Learn about wallet and network configuration options
Wallets
Explore supported wallet providers and their options