Get started — v2 (Multi-blockchain)
v2 is coming soon. This page documents the upcoming multi-blockchain API. For the current stable release, see v1.
This guide shows how to install and initialize Ledger Wallet Provider. In v2 the SDK ships no chain by default: you declare the blockchain families you want to handle by passing one factory per family to initializeLedgerProvider. Register EVM alone, Solana alone, or both. Install the UI package plus a family package for each chain you support. The SDK registers only the families that you declared (provided they are enabled in your partner configuration).
Partner program: Ledger Wallet Provider requires enrollment in Ledger’s partner program to obtain API keys. Contact our team to discuss integration.
Before you start, check the Requirements to confirm your target browsers support Web HID and Web Bluetooth.
Install the SDK
Install the UI package and a family package for each chain you support:
npm install @ledgerhq/ledger-wallet-provider
npm install @ledgerhq/ledger-wallet-provider-evm # EVM (EIP-6963 / EIP-1193)
npm install @ledgerhq/ledger-wallet-provider-solana # Solana (Wallet Standard)You can also install with yarn or pnpm. Skip a family package if you do not support that chain.
Initialize the provider
import { initializeLedgerProvider } from '@ledgerhq/ledger-wallet-provider'
import { evmBlockchainProviderFactory } from '@ledgerhq/ledger-wallet-provider-evm'
import { solanaBlockchainProviderFactory } from '@ledgerhq/ledger-wallet-provider-solana'
import '@ledgerhq/ledger-wallet-provider/styles.css'
const cleanup = initializeLedgerProvider({
dAppIdentifier: 'my-dapp',
apiKey: 'your-api-key',
loggerLevel: 'info',
blockchainProviderFactories: [
evmBlockchainProviderFactory,
solanaBlockchainProviderFactory,
],
})
// Call cleanup() when your application unmountsPass the registration exported by each family package you installed. initializeLedgerProvider mounts the Ledger UI and announces Ledger only for families that appear in both blockchainProviderFactories and your partner dApp configuration (tied to dAppIdentifier):
- EVM via EIP-6963 / EIP-1193
- Solana via Wallet Standard
It returns a cleanup function — call it when your application unmounts to remove the UI and unregister the providers.
See Configuration for the full list of options.
SSR and dynamic imports
The SDK uses browser APIs (window, document, CustomEvent). In SSR frameworks (Next.js, Nuxt, SvelteKit, …), load it only on the client:
import { useEffect } from 'react'
useEffect(() => {
let cleanup: (() => void) | undefined
;(async () => {
await import('@ledgerhq/ledger-wallet-provider/styles.css')
const [
{ initializeLedgerProvider },
{ evmBlockchainProviderFactory },
{ solanaBlockchainProviderFactory },
] = await Promise.all([
import('@ledgerhq/ledger-wallet-provider'),
import('@ledgerhq/ledger-wallet-provider-evm'),
import('@ledgerhq/ledger-wallet-provider-solana'),
])
cleanup = initializeLedgerProvider({
dAppIdentifier: 'my-dapp',
apiKey: 'your-api-key',
blockchainProviderFactories: [
evmBlockchainProviderFactory,
solanaBlockchainProviderFactory,
],
})
})()
return () => cleanup?.()
}, [])Choose your chain
After initialization, integrate discovery and signing for each supported blockchain family. The blockchain family needs to be enabled in your partner configuration:
More blockchain families will follow the same pattern: install the family package, pass its factory, then use the chain-specific guide.
Next steps
- Configuration — UI position, environment, and other options
- API reference —
initializeLedgerProvider,blockchainProviderFactories, and the EVM EIP-1193 provider surface - Package attestation — verify npm provenance