mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-05-09 19:12:14 +00:00
* feat: Enhance Wallet Groups Implementation by using hashedIdentifiers instead of parentAddresses * fix: Call updateWalletGroups even if group has an hash identifier * feat: Add secrets to workflow * feat: Enhance Wallet Groups Implementation by using hashedIdentifiers instead of parentAddresses * Handle wallet grouping edgecase where wallet is restored via non seed medium * fix: Valid wallet/wallet groups not showing up when choosing wallet/groups for creating new wallets
65 lines
1.8 KiB
Dart
65 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,
|
|
this.mnemonic,
|
|
}) : super(
|
|
name: name,
|
|
walletInfo: walletInfo,
|
|
password: password,
|
|
passphrase: passphrase,
|
|
);
|
|
|
|
final String? mnemonic;
|
|
}
|
|
|
|
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;
|
|
}
|