Comment on page
Ledger
pnpm
yarn
npm
pnpm add @swapkit/wallet-ledger
yarn add @swapkit/wallet-ledger
npm add @swapkit/wallet-ledger
import { SwapKitCore, Chain } from '@swapkit/core';
import { ledgerWallet } from '@swapkit/wallet-ledger';
const client = new SwapKitCore();
client.extend({ wallets: [ledgerWallet] });
// [44, 60, 0, 0, 2]
const defaultDerivationPath = getDerivationPathFor({ chain: Chain.ETH, index: 2 })
// [44, 60, 2, 0, 0]
const ledgerLiveDerivationPath = getDerivationPathFor({
chain: Chain.ETH,
index: 2,
// Chain dependend -> 'legacy' | 'ledgerLive' | 'nativeSegwitMiddleAccount' | 'segwit';
type: 'ledgerLive'
```
})
await client.connectLedger(Chain.ETH, ledgerLiveDerivationPath)
Last modified 2mo ago