cake_wallet/cw_nano/lib/nano_wallet_creation_credentials.dart
2023-10-09 17:19:58 -04:00

51 lines
1.4 KiB
Dart

import 'package:cw_core/wallet_credentials.dart';
import 'package:cw_core/wallet_info.dart';
class NanoNewWalletCredentials extends WalletCredentials {
NanoNewWalletCredentials({
required String name,
String? password,
DerivationType? derivationType,
}) : super(
name: name,
password: password,
derivationInfo: DerivationInfo(derivationType: derivationType),
);
}
class NanoRestoreWalletFromSeedCredentials extends WalletCredentials {
NanoRestoreWalletFromSeedCredentials({
required String name,
required this.mnemonic,
int height = 0,
String? password,
required DerivationType derivationType,
}) : super(
name: name,
password: password,
height: height,
derivationInfo: DerivationInfo(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 DerivationType derivationType,
required this.seedKey,
}) : super(
name: name,
password: password,
derivationInfo: DerivationInfo(derivationType: derivationType),
);
final String seedKey;
}