
Connecting IDX Wallet enables users to interact with Solana dApps securely using a non-custodial model.
Your application never gets access to private keys. Instead, it reads the public key, sends transaction requests, and receives signed responses from the wallet.
IDX Wallet integrates with the Solana Wallet Adapter while also supporting custom injected providers for broader compatibility.
IDX Wallet integrates with the Solana Wallet Adapter standard, which acts as a bridge between your application and supported wallets. This allows your application to support both standard adapter wallets and browser-injected providers.
When a user clicks Connect Wallet:
The connection system is built on two layers so apps can support both standard adapter wallets and browser-injected providers.
The app determines which wallets are available, which are installed, and which can be connected. This process is split into detection and installation validation.
This function scans both adapter wallets and browser-injected wallets with SSR-safe checks to avoid runtime issues.
Reference Implementation
import {
useWallet as useAdapterWallet,
WalletNotSelectedError,
} from "@solana/wallet-adapter-react";
const {
wallets: adapterWallets,
wallet: selectedAdapter,
publicKey: solanaPublicKey,
connected: isSolanaAdapterConnected,
connecting: isSolanaAdapterConnecting,
connect: adapterConnect,
disconnect: adapterDisconnect,
select: adapterSelect,
sendTransaction: adapterSendTransaction,
signTransaction: adapterSignTransaction,
} = useAdapterWallet();
const detectWallets = useCallback(() => {
if (typeof window === "undefined") {
return {
adapterWallets: adapterWallets.map((w) => w.adapter.name),
coinbase: false,
metamask: false,
trust: false,
brave: false,
jupiter: false,
idxWallet: false,
};
}
return {
adapterWallets: adapterWallets.map((w) => w.adapter.name),
coinbase: !!window?.coinbaseSolana,
metamask: !!window?.ethereum?.isMetaMask,
trust:
!!window?.trustwallet?.solana ||
(window?.solana?.isTrust && !!window?.solana),
brave: !!window?.braveSolana,
jupiter: !!window?.jupiter?.solana,
idxWallet: !!(
(window?.solana?.isIDXWallet && window?.solana) ||
window?.IdxWallet ||
window?.idxWallet
),
};
}, [adapterWallets]);IDX Wallet is detected using multiple fallbacks to support different injection patterns and browser behaviors.
Compatibility Fallbacks
window.solana?.isIDXWallet window.idxWallet window.IdxWallet
Detection alone is not enough. The app must confirm whether a wallet is actually installed and ready for user interaction.
Reference Implementation
const isWalletInstalled = useCallback(
(id) => {
if (typeof window === "undefined") return false;
if (!id) return false;
const normalizedId = normalizeWalletId(id);
const adapter = adapterWallets.find(
(w) => normalizeWalletId(w.adapter.name) === normalizedId
);
if (adapter) {
return adapter.readyState === "Installed";
}
switch (id) {
case "coinbase":
return !!window?.coinbaseSolana;
case "metamask":
return !!window?.ethereum?.isMetaMask;
case "trustwallet":
return (
!!window?.trustwallet?.solana ||
(window?.solana?.isTrust && !!window?.solana)
);
case "brave":
return !!window?.braveSolana;
case "jupiter":
return !!window?.jupiter?.solana;
case "idxwallet":
return !!(
(window?.solana?.isIDXWallet && window?.solana) ||
window?.IdxWallet ||
window?.idxWallet
);
default:
return false;
}
},
[adapterWallets, normalizeWalletId]
);Once a wallet is detected and installed, the connection sequence is predictable and state-driven.
Pseudo-code
User clicks "Connect" -> adapterSelect(walletName) -> adapterConnect() IF success: publicKey available connected = true IF rejected: throw error
Connection errors should clearly distinguish selection issues from user rejection or runtime failures.
Example
try {
adapterSelect(walletName);
await adapterConnect();
} catch (err) {
if (err instanceof WalletNotSelectedError) {
console.error("Wallet not selected");
} else {
console.error(err);
}
}These states provide a reliable lifecycle model for UI rendering and business logic.
Not Installed
Wallet not detected on adapter or injection layer.
Installed
Wallet is available but session is not connected yet.
Connecting
Connection request sent, waiting for user approval.
Connected
Public key is available and signing APIs are active.
Disconnected
Session is closed and app access is removed.
Adapter-compatible for standard Solana wallets
Injection-aware for IDX Wallet and ecosystem wallets
Multi-layer wallet detection and installation checks
User-controlled flow with wallet-side signature approval