mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 17:57:36 +00:00
40 lines
1 KiB
Dart
40 lines
1 KiB
Dart
import 'package:flutter/foundation.dart';
|
|
import 'package:cake_wallet/core/pending_transaction.dart';
|
|
import 'package:cake_wallet/core/transaction_history.dart';
|
|
import 'package:cake_wallet/src/domain/common/transaction_priority.dart';
|
|
import 'package:cake_wallet/src/domain/common/crypto_currency.dart';
|
|
import 'package:cake_wallet/src/domain/common/sync_status.dart';
|
|
import 'package:cake_wallet/src/domain/common/node.dart';
|
|
import 'package:cake_wallet/src/domain/common/wallet_type.dart';
|
|
|
|
abstract class WalletBase<BalaceType> {
|
|
WalletType type;
|
|
|
|
CryptoCurrency currency;
|
|
|
|
String get name;
|
|
|
|
String address;
|
|
|
|
BalaceType balance;
|
|
|
|
SyncStatus syncStatus;
|
|
|
|
String get seed;
|
|
|
|
Object get keys;
|
|
|
|
TransactionHistoryBase transactionHistory;
|
|
|
|
String get id => walletTypeToString(type).toLowerCase() + '_' + name;
|
|
|
|
Future<void> connectToNode({@required Node node});
|
|
|
|
Future<void> startSync();
|
|
|
|
Future<PendingTransaction> createTransaction(Object credentials);
|
|
|
|
double calculateEstimatedFee(TransactionPriority priority);
|
|
|
|
Future<void> save();
|
|
}
|