Getting Wallets Information
Get Current Wallet Information
Use the walletType property to get the current wallet type.
Use the walletAddress property to get the current wallet address.
Get Installed Wallets Information
Use the allWallets property to access all registered wallets as an array of WalletInformation objects. This data can be used to filter or display wallets based on your application's requirements.
The following code shows the definition of the WalletInformation interface:
WalletInformation interfacereact
export interface WalletInformation {
name: SupportedWallets;
icon: string; // (URL or base64)
isInstalled: boolean;
isConnected: boolean;
isRecommended: boolean; // (coming soon)
}The following example demonstrates how to retrieve the installed wallets:
Retrieve the installed walletsreact
import { useWalletConnect, WalletInformation } from "@btc-vision/walletconnect";
function App() {
const {allWallets} = useWalletConnect()
allWallets.map((wallet: WalletInformation) => {
console.log(wallet)
})
}