Files
hash-wallet/cw_bitcoin
98f58c2898 Cw 1624 trezor passphrase on trezor device instead of app (#3601)
* feat: add support for Trezor device settings configuration and `AwaitingSettings` state in pairing flow

* fix ugly widgets

* trezor options ui

* feat: add support for Trezor on device passphrases

* chore: bump trezor_flutter deps

* fix: remove unused subtitle property in proceed_on_device_sheet [skip ci]

* chore: update trezor_flutter dependency to latest commit [skip ci]

* fix: set restore height and store wallet during initialization steps

---------

Co-authored-by: Robert Malikowski <malikowskirobert@gmail.com>
2026-09-18 02:27:32 +02:00
..

cw_bitcoin

Bitcoin-family Electrum wallet implementation used by Cake Wallet (BTC, LTC and derivatives).

Features

  • Electrum client and wallet with address/UTXO management and snapshots.
  • Derivation via BIP‑39; receive/change chains with per-coin configs.
  • Create/sign/broadcast transactions; PSBT helpers and payjoin support.
  • Transaction history, priorities, and size-based fee calculations.
  • Hardware wallet support for BTC/LTC.

Getting started

Use the module via app services (see bitcoin_wallet_service.dart, litecoin_wallet_service.dart). Ensure Electrum nodes are configured for the target coin.

final wallet = await BitcoinWallet.create(
  mnemonic: '...',
  password: 'secret',
  walletInfo: walletInfo,
  unspentCoinsInfo: unspentCoinsBox,
  encryptionFileUtils: encryption,
);

Usage

Send BTC with medium priority:

final feeRate = wallet.feeRate(BitcoinTransactionPriority.medium);
final pending = await wallet.createTransaction(
  outputs: [BitcoinTransactionOutput(address: 'bc1...', amount: 50000)],
  feeRate: feeRate,
);
final txHash = await pending.commit();

See lib/ for wallet/services, PSBT, and payjoin utilities.