| 1 | import "package:cake_wallet/entities/hardware_wallet/hardware_wallet_device.dart"; |
| 2 | import "package:cw_core/hardware/hardware_wallet_service.dart"; |
| 3 | import "package:cw_core/wallet_base.dart"; |
| 4 | import "package:cw_core/wallet_info.dart"; |
| 5 | import "package:cw_core/wallet_type.dart"; |
| 6 | |
| 7 | abstract class HardwareWalletViewModel { |
| 8 | HardwareWalletType get hardwareWalletType; |
| 9 | bool get isBleEnabled; |
| 10 | bool get hasBluetooth; |
| 11 | bool get isConnecting; |
| 12 | |
| 13 | bool isConnected(WalletType type); |
| 14 | |
| 15 | Future<void> updateBleState(); |
| 16 | |
| 17 | Stream<HardwareWalletDevice> scanForBleDevices(); |
| 18 | |
| 19 | Future<List<HardwareWalletDevice>> getAllUsbDevices(); |
| 20 | |
| 21 | Future<void> stopScanning(); |
| 22 | |
| 23 | Future<bool> connectDevice(HardwareWalletDevice device, WalletType type); |
| 24 | |
| 25 | HardwareWalletService getHardwareWalletService(WalletType type); |
| 26 | |
| 27 | Future<void> initWallet(WalletBase wallet); |
| 28 | |
| 29 | String? interpretErrorCode(String error) => null; |
| 30 | |
| 31 | Future<void> close() async {} |
| 32 | } |