mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49:22 +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>
112 lines
3.3 KiB
Dart
112 lines
3.3 KiB
Dart
import 'package:cw_core/wallet_info.dart';
|
|
|
|
Map<DerivationType, List<DerivationInfo>> electrum_derivations = {
|
|
DerivationType.electrum: [
|
|
DerivationInfo(
|
|
derivationType: DerivationType.electrum,
|
|
derivationPath: "m/0'",
|
|
description: "Electrum",
|
|
scriptType: "p2wpkh",
|
|
),
|
|
],
|
|
DerivationType.bip39: [
|
|
DerivationInfo(
|
|
derivationType: DerivationType.bip39,
|
|
derivationPath: "m/44'/0'/0'",
|
|
description: "Standard BIP44",
|
|
scriptType: "p2pkh",
|
|
),
|
|
DerivationInfo(
|
|
derivationType: DerivationType.bip39,
|
|
derivationPath: "m/49'/0'/0'",
|
|
description: "Standard BIP49 compatibility segwit",
|
|
scriptType: "p2wpkh-p2sh",
|
|
),
|
|
DerivationInfo(
|
|
derivationType: DerivationType.bip39,
|
|
derivationPath: "m/84'/0'/0'",
|
|
description: "Standard BIP84 native segwit",
|
|
scriptType: "p2wpkh",
|
|
),
|
|
DerivationInfo(
|
|
derivationType: DerivationType.bip39,
|
|
derivationPath: "m/86'/0'/0'",
|
|
description: "Standard BIP86 Taproot",
|
|
scriptType: "p2tr",
|
|
),
|
|
DerivationInfo(
|
|
derivationType: DerivationType.bip39,
|
|
derivationPath: "m/0'",
|
|
description: "Non-standard legacy",
|
|
scriptType: "p2pkh",
|
|
),
|
|
DerivationInfo(
|
|
derivationType: DerivationType.bip39,
|
|
derivationPath: "m/0'",
|
|
description: "Non-standard compatibility segwit",
|
|
scriptType: "p2wpkh-p2sh",
|
|
),
|
|
DerivationInfo(
|
|
derivationType: DerivationType.bip39,
|
|
derivationPath: "m/0'",
|
|
description: "Non-standard native segwit",
|
|
scriptType: "p2wpkh",
|
|
),
|
|
DerivationInfo(
|
|
derivationType: DerivationType.bip39,
|
|
derivationPath: "m/44'/0'/0'",
|
|
description: "Samourai Deposit",
|
|
scriptType: "p2wpkh",
|
|
),
|
|
DerivationInfo(
|
|
derivationType: DerivationType.bip39,
|
|
derivationPath: "m/49'/0'/0'",
|
|
description: "Samourai Deposit",
|
|
scriptType: "p2wpkh",
|
|
),
|
|
DerivationInfo(
|
|
derivationType: DerivationType.bip39,
|
|
derivationPath: "m/84'/0'/2147483644'",
|
|
description: "Samourai Bad Bank (toxic change)",
|
|
scriptType: "p2wpkh",
|
|
),
|
|
DerivationInfo(
|
|
derivationType: DerivationType.bip39,
|
|
derivationPath: "m/84'/0'/2147483645'",
|
|
description: "Samourai Whirlpool Pre Mix",
|
|
scriptType: "p2wpkh",
|
|
),
|
|
DerivationInfo(
|
|
derivationType: DerivationType.bip39,
|
|
derivationPath: "m/84'/0'/2147483646'",
|
|
description: "Samourai Whirlpool Post Mix",
|
|
scriptType: "p2wpkh",
|
|
),
|
|
DerivationInfo(
|
|
derivationType: DerivationType.bip39,
|
|
derivationPath: "m/44'/0'/2147483647'",
|
|
description: "Samourai Ricochet legacy",
|
|
scriptType: "p2pkh",
|
|
),
|
|
DerivationInfo(
|
|
derivationType: DerivationType.bip39,
|
|
derivationPath: "m/49'/0'/2147483647'",
|
|
description: "Samourai Ricochet compatibility segwit",
|
|
scriptType: "p2wpkh-p2sh",
|
|
),
|
|
DerivationInfo(
|
|
derivationType: DerivationType.bip39,
|
|
derivationPath: "m/84'/0'/2147483647'",
|
|
description: "Samourai Ricochet native segwit",
|
|
scriptType: "p2wpkh",
|
|
),
|
|
DerivationInfo(
|
|
derivationType: DerivationType.bip39,
|
|
derivationPath: "m/84'/2'/0'",
|
|
description: "Default Litecoin",
|
|
scriptType: "p2wpkh",
|
|
),
|
|
],
|
|
};
|
|
|
|
String electrum_path = electrum_derivations[DerivationType.electrum]!.first.derivationPath!;
|