2021-04-02 17:43:06 +00:00
|
|
|
import 'package:mobx/mobx.dart';
|
2020-09-21 11:50:26 +00:00
|
|
|
import 'package:cake_wallet/entities/sync_status.dart';
|
|
|
|
import 'package:cake_wallet/entities/transaction_history.dart';
|
|
|
|
import 'package:cake_wallet/entities/wallet_type.dart';
|
|
|
|
import 'package:cake_wallet/entities/transaction_creation_credentials.dart';
|
|
|
|
import 'package:cake_wallet/entities/pending_transaction.dart';
|
|
|
|
import 'package:cake_wallet/entities/balance.dart';
|
|
|
|
import 'package:cake_wallet/entities/node.dart';
|
2020-01-04 19:31:52 +00:00
|
|
|
|
|
|
|
abstract class Wallet {
|
|
|
|
WalletType getType();
|
|
|
|
|
|
|
|
WalletType walletType;
|
|
|
|
|
|
|
|
Observable<Balance> onBalanceChange;
|
|
|
|
|
|
|
|
Observable<SyncStatus> syncStatus;
|
|
|
|
|
|
|
|
Observable<String> get onNameChange;
|
|
|
|
|
|
|
|
Observable<String> get onAddressChange;
|
|
|
|
|
|
|
|
String get name;
|
|
|
|
|
|
|
|
String get address;
|
|
|
|
|
|
|
|
Future updateInfo();
|
|
|
|
|
|
|
|
Future<String> getFilename();
|
|
|
|
|
|
|
|
Future<String> getName();
|
|
|
|
|
|
|
|
Future<String> getAddress();
|
|
|
|
|
|
|
|
Future<String> getSeed();
|
|
|
|
|
|
|
|
Future<Map<String, String>> getKeys();
|
|
|
|
|
|
|
|
Future<String> getFullBalance();
|
|
|
|
|
|
|
|
Future<String> getUnlockedBalance();
|
|
|
|
|
|
|
|
Future<int> getCurrentHeight();
|
|
|
|
|
|
|
|
Future<int> getNodeHeight();
|
|
|
|
|
|
|
|
Future<bool> isConnected();
|
|
|
|
|
|
|
|
Future close();
|
|
|
|
|
|
|
|
TransactionHistory getHistory();
|
|
|
|
|
|
|
|
Future connectToNode({Node node, bool useSSL = false, bool isLightWallet = false});
|
|
|
|
|
|
|
|
Future startSync();
|
|
|
|
|
|
|
|
Future<PendingTransaction> createTransaction(
|
|
|
|
TransactionCreationCredentials credentials);
|
|
|
|
|
|
|
|
Future rescan({int restoreHeight = 0});
|
|
|
|
}
|