@swapkit/wallet-trezor

Installation

<pnpm|bun> add @swapkit/wallet-trezor

Integration

Implementation with @swapkit/core

import { SwapKit, getDerivaitionPathFor } from '@swapkit/core'
import { trezorWallet } from '@swapkit/wallet-trezor'

const swapKitClient = SwapKit({
  wallets: { ...trezorWallet },
});

// [84, 0, 1, 0, 0]
const derivationPath = getDerivationPathFor({ 
  chain: Chain.Bitcoin, index: 1, type: "nativeSegwitMiddleAccount"
});

await swapKitClient.connectTrezor([Chain.Bitcoin], derivationPath)

const btcWallet = await swapKitClient.getWalletWithBalance(Chain.Bitcoin)

Wallet Support

Last updated