mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-25 13:09:32 +00:00
ce21098e98
* CW-488 minor code cleanup * Add Derivation Path selector for BTC and LTC * CW-488 Initial Passphrase Impl * CW-488 Final Passphrase Impl * Quick Fix of language Service * CW-488 Implement PR Suggestions * CW-488 Implement PR Suggestions * CW-488 Implement Passphrase for Bitcoin Cash * CW-488 Implement Passphrase for Bitcoin Cash * CW-488 Implement Passphrase for Bitcoin Cash * remove monero and wownero support for passphrase until merged [skip ci] * CW-488 Apply requested change * CW-488 Add Passphrase to QR * CW-488 Fix Seed generation * CW-488 Implement Electrum Passphrases * CW-488 Add Seed Length Selector to BIP39 Seeds * CW-488 Minor fix [skip ci] --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
62 lines
1.8 KiB
Dart
62 lines
1.8 KiB
Dart
import 'package:cw_core/hardware/hardware_account_data.dart';
|
|
import 'package:cw_core/wallet_credentials.dart';
|
|
import 'package:cw_core/wallet_info.dart';
|
|
|
|
class BitcoinNewWalletCredentials extends WalletCredentials {
|
|
BitcoinNewWalletCredentials({
|
|
required String name,
|
|
WalletInfo? walletInfo,
|
|
String? password,
|
|
DerivationType? derivationType,
|
|
String? derivationPath,
|
|
String? passphrase,
|
|
}) : super(
|
|
name: name,
|
|
walletInfo: walletInfo,
|
|
password: password,
|
|
passphrase: passphrase,
|
|
);
|
|
}
|
|
|
|
class BitcoinRestoreWalletFromSeedCredentials extends WalletCredentials {
|
|
BitcoinRestoreWalletFromSeedCredentials({
|
|
required String name,
|
|
required String password,
|
|
required this.mnemonic,
|
|
WalletInfo? walletInfo,
|
|
required DerivationType derivationType,
|
|
required String derivationPath,
|
|
String? passphrase,
|
|
}) : super(
|
|
name: name,
|
|
password: password,
|
|
passphrase: passphrase,
|
|
walletInfo: walletInfo,
|
|
derivationInfo: DerivationInfo(
|
|
derivationType: derivationType,
|
|
derivationPath: derivationPath,
|
|
));
|
|
|
|
final String mnemonic;
|
|
}
|
|
|
|
class BitcoinRestoreWalletFromWIFCredentials extends WalletCredentials {
|
|
BitcoinRestoreWalletFromWIFCredentials({
|
|
required String name,
|
|
required String password,
|
|
required this.wif,
|
|
WalletInfo? walletInfo,
|
|
}) : super(name: name, password: password, walletInfo: walletInfo);
|
|
|
|
final String wif;
|
|
}
|
|
|
|
class BitcoinRestoreWalletFromHardware extends WalletCredentials {
|
|
BitcoinRestoreWalletFromHardware({
|
|
required String name,
|
|
required this.hwAccountData,
|
|
WalletInfo? walletInfo,
|
|
}) : super(name: name, walletInfo: walletInfo);
|
|
|
|
final HardwareAccountData hwAccountData;
|
|
}
|