mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
* 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>
33 lines
933 B
Dart
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 {}
|
|
}
|