Skip to main content
Dynamic supports hardware wallet connections via compatible software wallets. When a user has their Ledger device connected through a supported Bitcoin wallet (Leather, Magic Eden, Phantom, or Xverse), Dynamic can detect that the wallet account originates from a hardware device, connect to it, and handle the signing flow appropriately. Currently supported hardware wallet vendor: Ledger Currently supported chain: Bitcoin

How it works

Hardware wallets don’t connect directly to the browser — they work through a software wallet that acts as a bridge to the hardware device. When a software wallet supports Ledger, it exposes the hardware wallet’s accounts and routes signing requests to the device. Dynamic’s hardware wallet support works at two levels:
  1. Discovery — identify which wallet providers in your project support a given hardware wallet vendor
  2. Connection — pass the hardware wallet vendor when connecting, so the wallet provider knows to use the hardware device

Checking hardware wallet support

Use getAvailableWalletsToConnect and canConnectWithHardwareWallet to find which wallet providers in your project support Ledger:
import {
  getAvailableWalletsToConnect,
  canConnectWithHardwareWallet,
} from '@dynamic-labs-sdk/client';

const ledgerProviders = getAvailableWalletsToConnect().filter((provider) =>
  canConnectWithHardwareWallet({
    walletProviderKey: provider.key,
    hardwareWalletVendor: 'ledger',
  })
);

console.log('Providers that support Ledger:', ledgerProviders.map((p) => p.name));

Connecting with a hardware wallet

Find the first available Ledger-compatible provider and pass hardwareWalletVendor when connecting:
import {
  getAvailableWalletsToConnect,
  canConnectWithHardwareWallet,
  connectAndVerifyWithWalletProvider,
} from '@dynamic-labs-sdk/client';

const ledgerProvider = getAvailableWalletsToConnect().find((provider) =>
  canConnectWithHardwareWallet({
    walletProviderKey: provider.key,
    hardwareWalletVendor: 'ledger',
  })
);

if (ledgerProvider) {
  const walletAccount = await connectAndVerifyWithWalletProvider({
    walletProviderKey: ledgerProvider.key,
    hardwareWalletVendor: 'ledger',
  });
}

Detecting hardware wallet accounts

Use isHardwareWalletAccount to check if a connected wallet account came from a hardware wallet:
import { isHardwareWalletAccount, getWalletAccounts } from '@dynamic-labs-sdk/client';

const accounts = getWalletAccounts();

for (const account of accounts) {
  if (isHardwareWalletAccount({ walletAccount: account })) {
    console.log(`${account.address} is connected via hardware wallet`);
    console.log('Vendor:', account.hardwareWalletVendor); // 'ledger'
  }
}

Filtering providers by hardware wallet support

Build a UI that shows only wallet providers compatible with a given hardware wallet:
import {
  getAvailableWalletsToConnect,
  canConnectWithHardwareWallet,
} from '@dynamic-labs-sdk/client';

const allProviders = getAvailableWalletsToConnect();

const ledgerCompatible = allProviders.filter((provider) =>
  canConnectWithHardwareWallet({
    walletProviderKey: provider.key,
    hardwareWalletVendor: 'ledger',
  })
);

console.log('Providers that support Ledger:', ledgerCompatible.map((p) => p.name));

Chain support

Ledger hardware wallet support is currently available for Bitcoin only, via the following wallet providers: Leather, Magic Eden, Phantom, and Xverse. See Adding Bitcoin Extensions for setup and a full connection example.

API reference