2023-10-05 01:09:07 +00:00
|
|
|
import 'package:cw_core/wallet_credentials.dart';
|
|
|
|
import 'package:cw_core/wallet_info.dart';
|
|
|
|
|
|
|
|
class NanoNewWalletCredentials extends WalletCredentials {
|
|
|
|
NanoNewWalletCredentials({required String name, String? password})
|
|
|
|
: super(name: name, password: password);
|
|
|
|
}
|
|
|
|
|
|
|
|
class NanoRestoreWalletFromSeedCredentials extends WalletCredentials {
|
|
|
|
NanoRestoreWalletFromSeedCredentials({
|
|
|
|
required String name,
|
|
|
|
required this.mnemonic,
|
|
|
|
String? password,
|
|
|
|
DerivationType? derivationType,
|
|
|
|
}) : super(
|
|
|
|
name: name,
|
|
|
|
password: password,
|
|
|
|
derivationType: derivationType,
|
|
|
|
);
|
|
|
|
|
|
|
|
final String mnemonic;
|
|
|
|
}
|
|
|
|
|
|
|
|
class NanoWalletLoadingException implements Exception {
|
|
|
|
@override
|
|
|
|
String toString() => 'Failure to load the wallet.';
|
|
|
|
}
|
|
|
|
|
|
|
|
class NanoRestoreWalletFromKeysCredentials extends WalletCredentials {
|
|
|
|
NanoRestoreWalletFromKeysCredentials({
|
|
|
|
required String name,
|
|
|
|
required String password,
|
|
|
|
required this.seedKey,
|
2023-10-17 15:59:41 +00:00
|
|
|
DerivationType? derivationType,
|
|
|
|
}) : super(
|
|
|
|
name: name,
|
|
|
|
password: password,
|
|
|
|
derivationType: derivationType,
|
|
|
|
);
|
2023-10-05 01:09:07 +00:00
|
|
|
|
|
|
|
final String seedKey;
|
2023-10-17 15:59:41 +00:00
|
|
|
}
|