CakeWallet/lib/core/wallet_base.dart

25 lines
557 B
Dart
Raw Normal View History

2020-06-01 21:13:56 +03:00
import 'package:flutter/foundation.dart';
2020-06-20 10:10:00 +03:00
import 'package:cake_wallet/core/transaction_history.dart';
2020-06-01 21:13:56 +03:00
import 'package:cake_wallet/src/domain/common/node.dart';
2020-06-20 10:10:00 +03:00
import 'package:cake_wallet/src/domain/common/wallet_type.dart';
2020-06-01 21:13:56 +03:00
abstract class WalletBase<BalaceType> {
2020-06-20 10:10:00 +03:00
WalletType type;
2020-06-01 21:13:56 +03:00
2020-06-20 10:10:00 +03:00
String get name;
2020-06-01 21:13:56 +03:00
String address;
BalaceType balance;
2020-06-20 10:10:00 +03:00
TransactionHistoryBase transactionHistory;
2020-06-01 21:13:56 +03:00
Future<void> connectToNode({@required Node node});
2020-06-20 10:10:00 +03:00
2020-06-01 21:13:56 +03:00
Future<void> startSync();
2020-06-20 10:10:00 +03:00
2020-06-01 21:13:56 +03:00
Future<void> createTransaction(Object credentials);
2020-06-20 10:10:00 +03:00
2020-06-01 21:13:56 +03:00
Future<void> save();
2020-06-20 10:10:00 +03:00
}