cake_wallet/cw_nano/lib/nano_wallet_creation_credentials.dart

48 lines
1.6 KiB
Dart
Raw Normal View History

2023-07-24 20:23:09 +00:00
import 'package:cw_core/wallet_credentials.dart';
import 'package:cw_core/wallet_info.dart';
2023-07-24 21:01:07 +00:00
// class NanoNewWalletCredentials extends WalletCredentials {
// NanoNewWalletCredentials({required String name, WalletInfo? walletInfo})
// : super(name: name, walletInfo: walletInfo);
// }
// class NanoRestoreWalletFromSeedCredentials extends WalletCredentials {
// NanoRestoreWalletFromSeedCredentials(
// {required String name,
// required String password,
// required this.mnemonic,
// WalletInfo? walletInfo})
// : super(name: name, password: password, walletInfo: walletInfo);
// final String mnemonic;
// }
// class NanoRestoreWalletFromWIFCredentials extends WalletCredentials {
// NanoRestoreWalletFromWIFCredentials(
// {required String name, required String password, required this.wif, WalletInfo? walletInfo})
// : super(name: name, password: password, walletInfo: walletInfo);
// final String wif;
// }
2023-07-24 20:23:09 +00:00
class NanoNewWalletCredentials extends WalletCredentials {
2023-07-24 21:01:07 +00:00
NanoNewWalletCredentials({required String name, required this.language, String? password})
: super(name: name, password: password);
final String language;
2023-07-24 20:23:09 +00:00
}
class NanoRestoreWalletFromSeedCredentials extends WalletCredentials {
NanoRestoreWalletFromSeedCredentials(
2023-07-24 21:01:07 +00:00
{required String name, required this.mnemonic, int height = 0, String? password})
: super(name: name, password: password, height: height);
2023-07-24 20:23:09 +00:00
final String mnemonic;
}
2023-07-24 21:01:07 +00:00
class NanoWalletLoadingException implements Exception {
@override
String toString() => 'Failure to load the wallet.';
2023-07-24 20:23:09 +00:00
}