| 1 | import 'package:cw_core/wallet_credentials.dart'; |
| 2 | import 'package:cw_core/wallet_info.dart'; |
| 3 | |
| 4 | class NanoNewWalletCredentials extends WalletCredentials { |
| 5 | NanoNewWalletCredentials({ |
| 6 | required String name, |
| 7 | WalletInfo? walletInfo, |
| 8 | String? password, |
| 9 | DerivationType? derivationType, |
| 10 | this.mnemonic, |
| 11 | String? passphrase, |
| 12 | }) : super( |
| 13 | name: name, |
| 14 | password: password, |
| 15 | walletInfo: walletInfo, |
| 16 | passphrase: passphrase, |
| 17 | derivationInfo: DerivationInfo(derivationType: derivationType), |
| 18 | ); |
| 19 | |
| 20 | final String? mnemonic; |
| 21 | } |
| 22 | |
| 23 | class NanoRestoreWalletFromSeedCredentials extends WalletCredentials { |
| 24 | NanoRestoreWalletFromSeedCredentials({ |
| 25 | required String name, |
| 26 | required this.mnemonic, |
| 27 | String? password, |
| 28 | required DerivationType derivationType, |
| 29 | String? passphrase, |
| 30 | }) : super( |
| 31 | name: name, |
| 32 | password: password, |
| 33 | derivationInfo: DerivationInfo(derivationType: derivationType), |
| 34 | passphrase: passphrase, |
| 35 | ); |
| 36 | |
| 37 | final String mnemonic; |
| 38 | } |
| 39 | |
| 40 | class NanoWalletLoadingException implements Exception { |
| 41 | @override |
| 42 | String toString() => 'Failure to load the wallet.'; |
| 43 | } |
| 44 | |
| 45 | class NanoRestoreWalletFromKeysCredentials extends WalletCredentials { |
| 46 | NanoRestoreWalletFromKeysCredentials({ |
| 47 | required String name, |
| 48 | required String password, |
| 49 | required DerivationType derivationType, |
| 50 | required this.seedKey, |
| 51 | }) : super( |
| 52 | name: name, |
| 53 | password: password, |
| 54 | derivationInfo: DerivationInfo(derivationType: derivationType), |
| 55 | ); |
| 56 | |
| 57 | final String seedKey; |
| 58 | } |