Skip to Content
📢 Breaking change: Applications using LedgerJS for transport implementation should migrate to the Device Management Kit (DMK). Learn more.
DocumentationLedger Wallet ProviderGet Started

Get started with Ledger Wallet Provider

This guide shows you how to install and initialize Ledger Wallet Provider. You install the UI package plus a family package for each chain you support, then pass those factories to one initializeLedgerProvider call. The SDK registers only the families that are also enabled in your partner configuration (dAppIdentifier). Then follow the guide for your chain.

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.

The family packages declare rxjs, xstate, purify-ts and @ledgerhq/device-management-kit as peer dependencies, so they share a single instance with the UI package. npm 7+, pnpm and Yarn Berry install them for you; on Yarn 1, add them explicitly.

Initialize the provider

import { initializeLedgerProvider } from '@ledgerhq/ledger-wallet-provider' import { createEvmBlockchainProvider } from '@ledgerhq/ledger-wallet-provider-evm' import { createSolanaBlockchainProvider } 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: [ { family: 'ethereum', create: createEvmBlockchainProvider }, { family: 'solana', create: createSolanaBlockchainProvider }, ], }) // Call cleanup() when your application unmounts

Pass a factory for each family 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):

If both factories are passed and both families are enabled, both providers are registered from the same init call. Without blockchainProviderFactories, no chain provider is registered.

It returns a cleanup function — call it when your application unmounts to remove the UI and unregister any providers that were registered.

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 }, { createEvmBlockchainProvider }, { createSolanaBlockchainProvider }, ] = 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: [ { family: 'ethereum', create: createEvmBlockchainProvider }, { family: 'solana', create: createSolanaBlockchainProvider }, ], }) })() return () => cleanup?.() }, [])

Choose your chain

After initialization, integrate discovery and signing for each family you registered and that is 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, stubs, environment, and other options
  • API reference — initializeLedgerProvider, blockchainProviderFactories, and the EVM EIP-1193 provider surface
  • Package attestation — verify npm provenance
Last updated on
Ledger
Copyright © Ledger SAS. All rights reserved. Ledger, Ledger Stax, Ledger Flex, Ledger Nano, Ledger Nano S, Ledger OS, Ledger Wallet, [LEDGER] (logo), [L] (logo) are trademarks owned by Ledger SAS.