2021-12-24 12:52:08 +00:00
|
|
|
import 'package:cw_core/wallet_base.dart';
|
|
|
|
import 'package:cw_core/wallet_credentials.dart';
|
|
|
|
import 'package:cw_core/wallet_type.dart';
|
|
|
|
|
|
|
|
abstract class WalletService<N extends WalletCredentials,
|
|
|
|
RFS extends WalletCredentials, RFK extends WalletCredentials> {
|
|
|
|
WalletType getType();
|
|
|
|
|
|
|
|
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);
|
2023-07-12 23:20:11 +00:00
|
|
|
|
|
|
|
Future<void> rename(String name, String password, String newName);
|
2021-12-24 12:52:08 +00:00
|
|
|
}
|