Files
hash-wallet/lib/view_model/hardware_wallet/hardware_wallet_view_model.dart
T
ed540bae04 CW-1291-ledger-fixes (#3390)
* feat: add connecting indicator in hardware wallet connect screen

* chore: bump ledger related dependencies

* chore: bump ledger related dependencies

* feat: add additional guard against gLedger being null

* auto-reformat

* feat: improve ledger connection and state management

* fix: connect_device_page padding on iOS

* chore: update universal_ble dependency reference

---------

Co-authored-by: Robert Malikowski <malikowskirobert@gmail.com>
Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
2026-07-16 21:39:49 +03:00

33 lines
933 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 isBleEnabled;
bool get hasBluetooth;
bool get isConnecting;
bool isConnected(WalletType type);
Future<void> updateBleState();
Stream<HardwareWalletDevice> scanForBleDevices();
Future<List<HardwareWalletDevice>> getAllUsbDevices();
Future<void> stopScanning();
Future<bool> connectDevice(HardwareWalletDevice device, WalletType type);
HardwareWalletService getHardwareWalletService(WalletType type);
Future<void> initWallet(WalletBase wallet);
String? interpretErrorCode(String error) => null;
Future<void> close() async {}
}