Files
hash-wallet/cw_bitcoin/lib/hardware/bitcoin_hardware_wallet_service.dart
T
Konstantin UllrichandGitHub 0d353a0932 feat: enhance hardware wallet compatibility and improve transaction handling (#3517)
* feat: enhance hardware wallet compatibility and improve transaction handling

- Updated hardware wallet services for Bitcoin and Litecoin (Ledger & Trezor).
- Added `LitecoinTrezorService` for signing and managing Litecoin transactions.
- Improved `PSBTTransaction` builder to handle change outputs and derivation paths.
- Fixed exception handling in `wallet_hardware_restore_view_model`.
- Refactored output and input structures to ensure consistency and extend compatibility.

* refactor: address comments

* refactor: address comments

* refactor: address comments
2026-09-01 19:42:33 +08:00

17 lines
553 B
Dart

import "dart:typed_data";
import "package:cw_bitcoin/electrum_wallet.dart";
import "package:cw_bitcoin/psbt/transaction_builder.dart";
mixin BitcoinHardwareWalletService {
Future<Uint8List> getMasterFingerprint() async => Uint8List.fromList([0, 0, 0, 0]);
}
mixin LitecoinHardwareWalletService on BitcoinHardwareWalletService {
Future<String> signLitecoinTransaction({
required List<PSBTReadyBitcoinOutput> outputs,
required List<PSBTReadyUtxoWithAddress> inputs,
required Map<String, PublicKeyWithDerivationPath> publicKeys,
});
}