mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
* feat: add support for Trezor hardware wallet integration Restore Wallets * feat: add Trezor hardware wallet support, implement RLP decoding utility, and update transaction signing logic * feat: add bitcoin trezor signing * chore: update Trezor Connect dependency to specific commit hash in pubspec_base.yaml * feat: add trezor support for litecoin * feat: add colorFilter for device manufacturer icons to align with theme styles * refactor: optimize Trezor callback handling * feat: add BitBox and Trezor support for Bitcoin and Litecoin, update transaction signing logic, and improve modularity in hardware wallet services * refactor: simplify constructor assertions in `BaseBottomSheetWidget` and cleanup Trezor chainId handling logic * feat: conditionally render device manufacturers based on platform and hide SeedSigner for now
30 lines
854 B
Dart
30 lines
854 B
Dart
import 'package:cake_wallet/entities/hardware_wallet/hardware_wallet_device.dart';
|
|
import 'package:cw_core/hardware/hardware_wallet_service.dart';
|
|
import 'package:cw_core/wallet_base.dart';
|
|
import 'package:cw_core/wallet_info.dart';
|
|
import 'package:cw_core/wallet_type.dart';
|
|
|
|
abstract class HardwareWalletViewModel {
|
|
HardwareWalletType get hardwareWalletType;
|
|
bool get isConnected;
|
|
bool get isBleEnabled;
|
|
bool get hasBluetooth;
|
|
|
|
Future<void> updateBleState();
|
|
|
|
Stream<HardwareWalletDevice> scanForBleDevices();
|
|
|
|
Future<List<HardwareWalletDevice>> getAllUsbDevices();
|
|
|
|
Future<void> stopScanning();
|
|
|
|
Future<bool> connectDevice(HardwareWalletDevice device, WalletType type);
|
|
|
|
HardwareWalletService getHardwareWalletService(WalletType type);
|
|
|
|
void initWallet(WalletBase wallet);
|
|
|
|
String? interpretErrorCode(String error) => null;
|
|
}
|
|
|