2020-06-20 07:10:00 +00:00
|
|
|
import 'package:cake_wallet/core/wallet_base.dart';
|
|
|
|
import 'package:cake_wallet/core/wallet_credentials.dart';
|
2021-05-07 07:36:38 +00:00
|
|
|
import 'package:cake_wallet/entities/wallet_type.dart';
|
2020-06-20 07:10:00 +00:00
|
|
|
|
|
|
|
abstract class WalletService<N extends WalletCredentials,
|
|
|
|
RFS extends WalletCredentials, RFK extends WalletCredentials> {
|
2021-05-07 07:36:38 +00:00
|
|
|
WalletType getType();
|
|
|
|
|
2020-06-20 07:10:00 +00:00
|
|
|
Future<WalletBase> create(N credentials);
|
|
|
|
|
|
|
|
Future<WalletBase> restoreFromSeed(RFS credentials);
|
|
|
|
|
|
|
|
Future<WalletBase> restoreFromKeys(RFK credentials);
|
|
|
|
|
|
|
|
Future<WalletBase> openWallet(String name, String password);
|
|
|
|
|
|
|
|
Future<bool> isWalletExit(String name);
|
|
|
|
|
|
|
|
Future<void> remove(String wallet);
|
|
|
|
}
|