Wallet Basics
8 examples to get you started with Solana wallets - 5 basic and 3 intermediate.
Search across all documentation pages
8 examples to get you started with Solana wallets - 5 basic and 3 intermediate.
Browsers need a wallet extension or mobile wallet that implements the Wallet Standard (formerly wallet-adapter protocol). Your dApp uses adapter hooks - it never touches secret keys.
Wallets expose connect, disconnect, and signTransaction to registered apps.
// Wallets register via window events - adapters discover them
console.log("Install Phantom or Solflare for browser signing");Use RPC for balances before connect.
import { createSolanaRpc, address } from "@solana/kit";
const rpc = createSolanaRpc(process.env.NEXT_PUBLIC_RPC_URL!);
const bal = await rpc.getBalance(address("PUBKEY")).send();Show connect button only when action requires signing.
"use client";
export function ConnectHint() {
return <button type="button">Connect wallet to continue</button>;
}Wallet network must match app RPC.
const CLUSTER = "devnet"; // document in UI footerWallets display human-readable effects before sign.
// Build unsigned message in app; wallet signs after user confirmsLet users pick among installed wallets.
// Wallet modal lists Phantom, Solflare, Backpack, etc.Off-chain signatures prove pubkey control.
// wallet.signMessage(new TextEncoder().encode("Sign in to MyApp"))Ledger signs via wallet app proxy.
// User connects Ledger through Phantom/SolflareStack versions: This page was written for Agave 4.1.1, Solana CLI 3.0.10, Anchor 0.32.1, anchor-lang 0.32.1, Rust 1.91.1, @solana/kit 7.0.0, Surfpool 0.12.0, and LiteSVM 0.6.x.
Reviewed by Chris St. John·Last updated Jul 16, 2026