Solana Wallet Standard
Wallet Standard discovery for Solana wallets, via @usebutr/svm.
@usebutr/svm discovers Solana wallets (Phantom, Solflare, Backpack, Magic Eden,
…) through the Wallet Standard.
Discovery
autoDiscovery() from @usebutr/wallets handles SVM discovery automatically.
For an SVM-only setup, wire it directly with createWalletSource:
import { createWalletSource } from "@usebutr/core";
import { discoverSvmAdapters } from "@usebutr/svm";
import { WalletManagerProvider } from "@usebutr/react";
const discovery = createWalletSource(discoverSvmAdapters);
<WalletManagerProvider discovery={discovery}>
{children}
</WalletManagerProvider>@usebutr/svm lazily imports @wallet-standard/app (an optional peer dependency). That
asynchronous warmup is one reason restored SVM wallets can land in pendingIds for a moment — see
hydration.
Capabilities
Resolved from the wallet's advertised Wallet Standard features via
resolveWalletStandardCapabilities:
signMessage— true only if the wallet advertisessolana:signMessage.sendTransaction— true only if it advertisessolana:signAndSendTransaction.subscribe— true via the Standardchangeevent.switchChain— local state + per-callchaininput when more than one chain is advertised.requestAccounts— generally a no-op: Standard wallets expose all accounts at once, there is no picker.
Always branch on capabilities.
Working with the signer
getSigner() on an SVM adapter returns the WalletStandardWallet. You call
its features directly (or bridge into a Solana library):
const walletStd = (await wallet.connector.getSigner()) as WalletStandardWallet;
const feature = walletStd.features["solana:signMessage"];
const account = walletStd.accounts[0];
const [output] = await feature.signMessage({ account, message });See Solana integrations for the full
build-and-send flow with @solana/web3.js, @solana/kit, and
@solana/wallet-adapter-react.
Chains
SVM_CHAINS_LIST / SVM_CHAINS ship Solana mainnet, testnet, and devnet.
slugify and resolveWalletStandardCapabilities are exported for adapter
authors.
Source: packages/svm/src. Used by all apps/demo-with-solana-* demos and (via
@usebutr/wallets) apps/demo-vite.