Comprehensive collection of Solana wallet adapters for TypeScript applications with tree-shaking support
npx @tessl/cli install tessl/npm-solana--wallet-adapter-wallets@0.19.0Solana Wallet Adapters is a comprehensive collection of all wallet adapter packages for the Solana ecosystem. It provides a unified interface for integrating multiple cryptocurrency wallets into TypeScript applications, with tree-shaking support to include only the adapters you actually use.
npm install @solana/wallet-adapter-wallets@solana/web3.js@^1.98.0Import specific wallet adapters:
import {
PhantomWalletAdapter,
PhantomWalletName,
SolflareWalletAdapter,
SolflareWalletName,
BitgetWalletAdapter,
BitgetWalletName
} from "@solana/wallet-adapter-wallets";Import all adapters (supports tree-shaking):
import * as wallets from "@solana/wallet-adapter-wallets";For CommonJS environments:
const {
PhantomWalletAdapter,
SolflareWalletAdapter,
BitgetWalletAdapter
} = require("@solana/wallet-adapter-wallets");import { PhantomWalletAdapter } from "@solana/wallet-adapter-wallets";
import { Connection, clusterApiUrl } from "@solana/web3.js";
// Initialize wallet adapter
const walletAdapter = new PhantomWalletAdapter();
// Connect to wallet
await walletAdapter.connect();
// Use wallet for transactions
const connection = new Connection(clusterApiUrl('mainnet-beta'));
const signature = await walletAdapter.sendTransaction(
transaction,
connection
);The package serves as a comprehensive re-export hub, providing:
Every wallet adapter follows a consistent export pattern:
PhantomWalletAdapter)PhantomWalletName)PhantomWalletAdapterConfig)Standard browser extension and mobile wallets with full transaction and message signing capabilities.
class PhantomWalletAdapter extends BaseMessageSignerWalletAdapter {
name: WalletName<'Phantom'>;
url: string;
icon: string;
supportedTransactionVersions: ReadonlySet<TransactionVersion>;
constructor(config?: PhantomWalletAdapterConfig);
connect(): Promise<void>;
disconnect(): Promise<void>;
autoConnect(): Promise<void>;
sendTransaction<T extends Transaction | VersionedTransaction>(
transaction: T,
connection: Connection,
options?: SendTransactionOptions
): Promise<TransactionSignature>;
signTransaction<T extends Transaction | VersionedTransaction>(transaction: T): Promise<T>;
signAllTransactions<T extends Transaction | VersionedTransaction>(transactions: T[]): Promise<T[]>;
signMessage(message: Uint8Array): Promise<Uint8Array>;
}
const PhantomWalletName: WalletName<'Phantom'>;
interface PhantomWalletAdapterConfig {}Hardware wallet integrations with custom derivation path support and specialized connection patterns.
class LedgerWalletAdapter extends BaseSignerWalletAdapter {
name: WalletName<'Ledger'>;
url: string;
icon: string;
supportedTransactionVersions: ReadonlySet<TransactionVersion>;
constructor(config?: LedgerWalletAdapterConfig);
connect(): Promise<void>;
disconnect(): Promise<void>;
signTransaction<T extends Transaction | VersionedTransaction>(transaction: T): Promise<T>;
signAllTransactions<T extends Transaction | VersionedTransaction>(transactions: T[]): Promise<T[]>;
}
const LedgerWalletName: WalletName<'Ledger'>;
interface LedgerWalletAdapterConfig {
derivationPath?: Buffer;
}
function getDerivationPath(account?: number, change?: number): Buffer;Wallets with unique features like social login, QR-code signing, or development/testing capabilities.
class ParticleAdapter extends BaseMessageSignerWalletAdapter {
name: WalletName<'Particle'>;
particle: ParticleNetwork;
constructor(config?: ParticleAdapterConfig);
}
interface ParticleAdapterConfig {
config?: ConstructorParameters<typeof ParticleNetwork>[0];
login?: Parameters<SolanaWallet['connect']>[0];
}
class UnsafeBurnerWalletAdapter extends BaseSignInMessageSignerWalletAdapter {
name: WalletName<'Burner Wallet'>;
signIn(input?: SolanaSignInInput): Promise<SolanaSignInOutput>;
}Type-safe constants for wallet identification and selection.
type WalletName<T extends string = string> = T & { __brand: 'WalletName' };
const PhantomWalletName: WalletName<'Phantom'>;
const SolflareWalletName: WalletName<'Solflare'>;
const LedgerWalletName: WalletName<'Ledger'>;
const TrezorWalletName: WalletName<'Trezor'>;
// ... 32+ additional wallet namestype TransactionVersion = 'legacy' | 0;
interface SendTransactionOptions {
signers?: Keypair[];
skipPreflight?: boolean;
preflightCommitment?: Commitment;
maxRetries?: number;
minContextSlot?: number;
}
interface WalletAdapterConfig {}
enum WalletAdapterNetwork {
Mainnet = 'mainnet-beta',
Testnet = 'testnet',
Devnet = 'devnet'
}interface SolanaSignInInput {
domain: string;
address?: string;
statement?: string;
uri?: string;
version?: string;
chainId?: string;
nonce?: string;
issuedAt?: string;
expirationTime?: string;
notBefore?: string;
requestId?: string;
resources?: string[];
}
interface SolanaSignInOutput {
account: {
address: string;
publicKey: Uint8Array;
};
signedMessage: Uint8Array;
signature: Uint8Array;
}// ParticleNetwork is from @particle-network/solana package
// These are the key types used in configuration
interface ParticleNetwork {
auth: {
getUserInfo(): Promise<{
uuid: string;
email?: string;
name?: string;
avatar?: string;
}>;
};
}
interface SolanaWallet {
connect(options?: {
loginType?: string;
account?: string;
}): Promise<void>;
}
// Base wallet adapter types from @solana/web3.js
type Transaction = import('@solana/web3.js').Transaction;
type VersionedTransaction = import('@solana/web3.js').VersionedTransaction;
type Connection = import('@solana/web3.js').Connection;
type TransactionSignature = import('@solana/web3.js').TransactionSignature;
type Keypair = import('@solana/web3.js').Keypair;
type Commitment = import('@solana/web3.js').Commitment;