dev
dart 118 lines 3.61 KB
Raw
1 import 'package:cw_core/wallet_info.dart';
2
3 const SILENT_PAYMENTS_SCAN_PATH = "m/352'/0'/0'/1'/0";
4 const SILENT_PAYMENTS_SPEND_PATH = "m/352'/0'/0'/0'/0";
5 const SILENT_PAYMENTS_SCAN_PATH_TESTNET = "m/352'/1'/0'/1'/0";
6 const SILENT_PAYMENTS_SPEND_PATH_TESTNET = "m/352'/1'/0'/0'/0";
7
8 Map<DerivationType, List<DerivationInfo>> electrum_derivations = {
9 DerivationType.electrum: [
10 DerivationInfo(
11 derivationType: DerivationType.electrum,
12 derivationPath: "m/0'",
13 description: "Electrum",
14 scriptType: "p2wpkh",
15 ),
16 ],
17 DerivationType.bip39: [
18 DerivationInfo(
19 derivationType: DerivationType.bip39,
20 derivationPath: "m/44'/0'/0'",
21 description: "Standard BIP44",
22 scriptType: "p2pkh",
23 ),
24 DerivationInfo(
25 derivationType: DerivationType.bip39,
26 derivationPath: "m/49'/0'/0'",
27 description: "Standard BIP49 compatibility segwit",
28 scriptType: "p2wpkh-p2sh",
29 ),
30 DerivationInfo(
31 derivationType: DerivationType.bip39,
32 derivationPath: "m/84'/0'/0'",
33 description: "Standard BIP84 native segwit",
34 scriptType: "p2wpkh",
35 ),
36 DerivationInfo(
37 derivationType: DerivationType.bip39,
38 derivationPath: "m/86'/0'/0'",
39 description: "Standard BIP86 Taproot",
40 scriptType: "p2tr",
41 ),
42 DerivationInfo(
43 derivationType: DerivationType.bip39,
44 derivationPath: "m/0'",
45 description: "Non-standard legacy",
46 scriptType: "p2pkh",
47 ),
48 DerivationInfo(
49 derivationType: DerivationType.bip39,
50 derivationPath: "m/0'",
51 description: "Non-standard compatibility segwit",
52 scriptType: "p2wpkh-p2sh",
53 ),
54 DerivationInfo(
55 derivationType: DerivationType.bip39,
56 derivationPath: "m/0'",
57 description: "Non-standard native segwit",
58 scriptType: "p2wpkh",
59 ),
60 DerivationInfo(
61 derivationType: DerivationType.bip39,
62 derivationPath: "m/44'/0'/0'",
63 description: "Samourai Deposit",
64 scriptType: "p2wpkh",
65 ),
66 DerivationInfo(
67 derivationType: DerivationType.bip39,
68 derivationPath: "m/49'/0'/0'",
69 description: "Samourai Deposit",
70 scriptType: "p2wpkh",
71 ),
72 DerivationInfo(
73 derivationType: DerivationType.bip39,
74 derivationPath: "m/84'/0'/2147483644'",
75 description: "Samourai Bad Bank (toxic change)",
76 scriptType: "p2wpkh",
77 ),
78 DerivationInfo(
79 derivationType: DerivationType.bip39,
80 derivationPath: "m/84'/0'/2147483645'",
81 description: "Samourai Whirlpool Pre Mix",
82 scriptType: "p2wpkh",
83 ),
84 DerivationInfo(
85 derivationType: DerivationType.bip39,
86 derivationPath: "m/84'/0'/2147483646'",
87 description: "Samourai Whirlpool Post Mix",
88 scriptType: "p2wpkh",
89 ),
90 DerivationInfo(
91 derivationType: DerivationType.bip39,
92 derivationPath: "m/44'/0'/2147483647'",
93 description: "Samourai Ricochet legacy",
94 scriptType: "p2pkh",
95 ),
96 DerivationInfo(
97 derivationType: DerivationType.bip39,
98 derivationPath: "m/49'/0'/2147483647'",
99 description: "Samourai Ricochet compatibility segwit",
100 scriptType: "p2wpkh-p2sh",
101 ),
102 DerivationInfo(
103 derivationType: DerivationType.bip39,
104 derivationPath: "m/84'/0'/2147483647'",
105 description: "Samourai Ricochet native segwit",
106 scriptType: "p2wpkh",
107 ),
108 DerivationInfo(
109 derivationType: DerivationType.bip39,
110 derivationPath: "m/84'/2'/0'",
111 description: "Default Litecoin",
112 scriptType: "p2wpkh",
113 ),
114 ],
115 };
116
117 String electrum_path = electrum_derivations[DerivationType.electrum]!.first.derivationPath!;
118 String segwit_path = "m/84'/0'/0'";