feat: bip39 decred (#3348)

cyan committed Aug 25, 2026 at 20:01 UTC 3d9b79f536ad88c8bfe1b840c93a5dc130011388
20 files changed +208 -43
cw_decred/lib/api/libdcrwallet.dart
+1 -1
@@ -182,7 +182,7 @@ class Libwallet {
182 final cName = name.toCString();
183 final cSignReq = signReq.toCString();
184 res = executePayloadFn(
185 - fn: () => dcrwalletApi.createSignedTransaction(cName, cSignReq),
185 + fn: () => dcrwalletApi.createTransaction(cName, cSignReq),
186 ptrsToFree: [cName, cSignReq],
187 );
188 break;
cw_decred/lib/mnemonic_validation.dart new
+24
@@ -0,0 +1,24 @@
1 +import "package:bip39/bip39.dart" as bip39;
2 +
3 +class DecredMnemonicIsIncorrectException implements Exception {
4 + @override
5 + String toString() =>
6 + "Decred mnemonic has incorrect format. Mnemonic should be a valid BIP39 seed (12 or 24 words) or a native Decred seed (15 words).";
7 +}
8 +
9 +bool isValidDecredMnemonic(String mnemonic, {bool allowNativeSeed = true}) {
10 + if (bip39.validateMnemonic(mnemonic)) {
11 + return true;
12 + }
13 + if (!allowNativeSeed) {
14 + return false;
15 + }
16 + final wordCount = mnemonic.trim().split(RegExp(r"\s+")).where((word) => word.isNotEmpty).length;
17 + return wordCount == 15;
18 +}
19 +
20 +void validateDecredMnemonic(String mnemonic, {bool allowNativeSeed = true}) {
21 + if (!isValidDecredMnemonic(mnemonic, allowNativeSeed: allowNativeSeed)) {
22 + throw DecredMnemonicIsIncorrectException();
23 + }
24 +}
cw_decred/lib/wallet.dart
+32 -5
@@ -22,8 +22,10 @@ import 'package:cw_decred/wallet_service.dart';
22 import 'package:cw_decred/balance.dart';
23 import 'package:cw_decred/transaction_info.dart';
24 import 'package:cw_core/crypto_currency.dart';
25 +import 'package:cw_core/encryption_file_utils.dart';
26 import 'package:cw_core/wallet_info.dart';
27 import 'package:cw_core/wallet_base.dart';
28 +import 'package:cw_core/wallet_keys_file.dart';
29 import 'package:cw_core/transaction_priority.dart';
30 import 'package:cw_core/pending_transaction.dart';
31 import 'package:cw_core/sync_status.dart';
@@ -36,9 +38,11 @@ part 'wallet.g.dart';
38 class DecredWallet = DecredWalletBase with _$DecredWallet;
39
40 abstract class DecredWalletBase
39 - extends WalletBase<DecredBalance, DecredTransactionHistory, DecredTransactionInfo> with Store {
41 + extends WalletBase<DecredBalance, DecredTransactionHistory, DecredTransactionInfo>
42 + with Store, WalletKeysFile {
43 DecredWalletBase(WalletInfo walletInfo, DerivationInfo derivationInfo, String password,
41 - Box<UnspentCoinsInfo> unspentCoinsInfo, Libwallet libwallet, Function() closeLibwallet)
44 + Box<UnspentCoinsInfo> unspentCoinsInfo, Libwallet libwallet, Function() closeLibwallet,
45 + {this.passphrase, required this.encryptionFileUtils})
46 : _password = password,
47 _libwallet = libwallet,
48 _closeLibwallet = closeLibwallet,
@@ -113,6 +117,17 @@ abstract class DecredWalletBase
117 return _seed;
118 }
119
120 + @override
121 + final String? passphrase;
122 +
123 + final EncryptionFileUtils encryptionFileUtils;
124 +
125 + @override
126 + WalletKeysData get walletKeysData => WalletKeysData(
127 + mnemonic: seed,
128 + passphrase: passphrase,
129 + );
130 +
131 @override
132 Object get keys => {};
133
@@ -402,11 +417,11 @@ abstract class DecredWalletBase
417 "feerate": creds.feeRate ?? defaultFeeRate,
418 "password": _password,
419 "sendall": sendAll,
420 + "sign": true,
421 };
422 final res = await _libwallet.createSignedTransaction(walletInfo.name, jsonEncode(signReq));
423 final decoded = json.decode(res);
408 - final signedHex = decoded["signedhex"];
409 -
424 + final signedHex = decoded["hex"];
425 final send = () async {
426 await _libwallet.sendRawTransaction(walletInfo.name, signedHex);
427 await updateBalance();
@@ -518,7 +533,12 @@ abstract class DecredWalletBase
533 String uniqueTxID(String id, int vout) => "$id:$vout";
534
535 @override
521 - Future<void> save() async {}
536 + Future<void> save() async {
537 + if (watchingOnly) {
538 + return;
539 + }
540 + await saveKeysFile(_password, encryptionFileUtils);
541 + }
542
543 @override
544 bool get hasRescan => walletBirthdayBlockHeight() != -1;
@@ -620,6 +640,13 @@ abstract class DecredWalletBase
640 }
641
642 await sourceDir.delete(recursive: true);
643 +
644 + for (final suffix in const ['.keys', '.keys.backup']) {
645 + final file = File(p.join(newDirPath, '${walletInfo.name}$suffix'));
646 + if (file.existsSync()) {
647 + await file.rename(p.join(newDirPath, '$newWalletName$suffix'));
648 + }
649 + }
650 }
651
652 @override
cw_decred/lib/wallet_creation_credentials.dart
+11 -3
@@ -3,8 +3,15 @@ import 'package:cw_core/wallet_info.dart';
3 import 'package:cw_core/hardware/hardware_account_data.dart';
4
5 class DecredNewWalletCredentials extends WalletCredentials {
6 - DecredNewWalletCredentials({required String name, WalletInfo? walletInfo})
7 - : super(name: name, walletInfo: walletInfo);
6 + DecredNewWalletCredentials(
7 + {required String name,
8 + String? password,
9 + String? passphrase,
10 + this.mnemonic,
11 + WalletInfo? walletInfo})
12 + : super(name: name, password: password, passphrase: passphrase, walletInfo: walletInfo);
13 +
14 + final String? mnemonic;
15 }
16
17 class DecredRestoreWalletFromSeedCredentials extends WalletCredentials {
@@ -12,8 +19,9 @@ class DecredRestoreWalletFromSeedCredentials extends WalletCredentials {
19 {required String name,
20 required String password,
21 required this.mnemonic,
22 + String? passphrase,
23 WalletInfo? walletInfo})
16 - : super(name: name, password: password, walletInfo: walletInfo);
24 + : super(name: name, password: password, passphrase: passphrase, walletInfo: walletInfo);
25
26 final String mnemonic;
27 }
cw_decred/lib/wallet_service.dart
+89 -11
@@ -1,6 +1,10 @@
1 import 'dart:convert';
2 import 'dart:io';
3 +import 'package:bip39/bip39.dart' as bip39;
4 +import 'package:cw_core/encryption_file_utils.dart';
5 +import 'package:cw_core/wallet_keys_file.dart';
6 import 'package:cw_decred/api/libdcrwallet.dart';
7 +import 'package:cw_decred/mnemonic_validation.dart';
8 import 'package:cw_decred/wallet_creation_credentials.dart';
9 import 'package:cw_decred/wallet.dart';
10 import 'package:cw_core/wallet_base.dart';
@@ -17,9 +21,10 @@ class DecredWalletService extends WalletService<
21 DecredRestoreWalletFromSeedCredentials,
22 DecredRestoreWalletFromPubkeyCredentials,
23 DecredRestoreWalletFromHardwareCredentials> {
20 - DecredWalletService(this.unspentCoinsInfoSource);
24 + DecredWalletService(this.unspentCoinsInfoSource, this.isDirect);
25
26 final Box<UnspentCoinsInfo> unspentCoinsInfoSource;
27 + final bool isDirect;
28 final seedRestorePath = "m/44'/42'";
29 static final seedRestorePathTestnet = "m/44'/1'";
30 static final pubkeyRestorePath = "m/44'/42'/0'";
@@ -55,6 +60,11 @@ class DecredWalletService extends WalletService<
60
61 @override
62 Future<DecredWallet> create(DecredNewWalletCredentials credentials, {bool? isTestnet}) async {
63 + final strength = credentials.seedPhraseLength == 24 ? 256 : 128;
64 + final mnemonic = (credentials.mnemonic?.isNotEmpty == true)
65 + ? credentials.mnemonic!
66 + : bip39.generateMnemonic(strength: strength);
67 + validateDecredMnemonic(mnemonic, allowNativeSeed: false);
68 await this.init();
69 final dirPath = await pathForWalletDir(name: credentials.walletInfo!.name, type: getType());
70 final network = isTestnet == true ? testnet : mainnet;
@@ -62,12 +72,16 @@ class DecredWalletService extends WalletService<
72 "name": credentials.walletInfo!.name,
73 "datadir": dirPath,
74 "pass": credentials.password!,
75 + "mnemonic": mnemonic,
76 + "seedpass": credentials.passphrase ?? "",
77 + "birthday": DateTime.now().millisecondsSinceEpoch ~/ 1000,
78 "net": network,
79 "unsyncedaddrs": true,
80 };
81 await libwallet!.createWallet(jsonEncode(config));
82 final di = await credentials.walletInfo!.getDerivationInfo();
83 di.derivationPath = isTestnet == true ? seedRestorePathTestnet : seedRestorePath;
84 + di.derivationType = DerivationType.bip39;
85 await di.save();
86 credentials.walletInfo!.save();
87 credentials.walletInfo!.network = network;
@@ -78,9 +92,14 @@ class DecredWalletService extends WalletService<
92 // going forward.
93 credentials.walletInfo!.dirPath = "";
94 credentials.walletInfo!.path = "";
81 - final wallet = DecredWallet(credentials.walletInfo!, di, credentials.password!,
82 - this.unspentCoinsInfoSource, libwallet!, closeLibwallet);
95 + final wallet = _createWalletInstance(
96 + credentials.walletInfo!,
97 + di,
98 + credentials.password!,
99 + passphrase: credentials.passphrase,
100 + );
101 await wallet.init();
102 + await wallet.save();
103 return wallet;
104 }
105
@@ -151,9 +170,10 @@ class DecredWalletService extends WalletService<
170 "unsyncedaddrs": true,
171 };
172 await libwallet!.loadWallet(jsonEncode(config));
154 - final wallet = DecredWallet(
155 - walletInfo, di, password, this.unspentCoinsInfoSource, libwallet!, closeLibwallet);
173 + final passphrase = await _loadPassphrase(name, password);
174 + final wallet = _createWalletInstance(walletInfo, di, password, passphrase: passphrase);
175 await wallet.init();
176 + await _persistSeedDerivationType(wallet);
177 return wallet;
178 }
179
@@ -184,8 +204,7 @@ class DecredWalletService extends WalletService<
204 libwallet = await Libwallet.spawn();
205 libwallet!.initLibdcrwallet("", "err");
206 }
187 - final currentWallet = DecredWallet(
188 - currentWalletInfo, di, password, this.unspentCoinsInfoSource, libwallet!, closeLibwallet);
207 + final currentWallet = _createWalletInstance(currentWalletInfo, di, password);
208
209 await currentWallet.renameWalletFiles(newName);
210
@@ -201,6 +220,7 @@ class DecredWalletService extends WalletService<
220 @override
221 Future<DecredWallet> restoreFromSeed(DecredRestoreWalletFromSeedCredentials credentials,
222 {bool? isTestnet}) async {
223 + validateDecredMnemonic(credentials.mnemonic);
224 await this.init();
225 final network = isTestnet == true ? testnet : mainnet;
226 final dirPath = await pathForWalletDir(name: credentials.walletInfo!.name, type: getType());
@@ -209,22 +229,81 @@ class DecredWalletService extends WalletService<
229 "datadir": dirPath,
230 "pass": credentials.password!,
231 "mnemonic": credentials.mnemonic,
232 + "seedpass": credentials.passphrase ?? "",
233 "net": network,
234 "unsyncedaddrs": true,
235 };
236 await libwallet!.createWallet(jsonEncode(config));
237 final di = await credentials.walletInfo!.getDerivationInfo();
238 di.derivationPath = isTestnet == true ? seedRestorePathTestnet : seedRestorePath;
239 + di.derivationType =
240 + bip39.validateMnemonic(credentials.mnemonic) ? DerivationType.bip39 : DerivationType.def;
241 await di.save();
242 credentials.walletInfo!.network = network;
243 credentials.walletInfo!.dirPath = "";
244 credentials.walletInfo!.path = "";
222 - final wallet = DecredWallet(credentials.walletInfo!, di, credentials.password!,
223 - this.unspentCoinsInfoSource, libwallet!, closeLibwallet);
245 + final wallet = _createWalletInstance(
246 + credentials.walletInfo!,
247 + di,
248 + credentials.password!,
249 + passphrase: credentials.passphrase,
250 + );
251 await wallet.init();
252 + await wallet.save();
253 return wallet;
254 }
255
256 + EncryptionFileUtils get _encryptionFileUtils => encryptionFileUtilsFor(isDirect);
257 +
258 + DecredWallet _createWalletInstance(
259 + WalletInfo walletInfo,
260 + DerivationInfo di,
261 + String password, {
262 + String? passphrase,
263 + }) {
264 + return DecredWallet(
265 + walletInfo,
266 + di,
267 + password,
268 + unspentCoinsInfoSource,
269 + libwallet!,
270 + closeLibwallet,
271 + passphrase: passphrase,
272 + encryptionFileUtils: _encryptionFileUtils,
273 + );
274 + }
275 +
276 + Future<String?> _loadPassphrase(String name, String password) async {
277 + if (!await WalletKeysFile.hasKeysFile(name, getType())) {
278 + return null;
279 + }
280 + try {
281 + final keys = await WalletKeysFile.readKeysFile(
282 + name,
283 + getType(),
284 + password,
285 + _encryptionFileUtils,
286 + );
287 + return keys.passphrase;
288 + } catch (_) {
289 + return null;
290 + }
291 + }
292 +
293 + Future<void> _persistSeedDerivationType(DecredWallet wallet) async {
294 + final seed = wallet.seed;
295 + if (seed == null || seed.isEmpty) {
296 + return;
297 + }
298 + final expected =
299 + bip39.validateMnemonic(seed) ? DerivationType.bip39 : DerivationType.def;
300 + if (wallet.derivationInfo.derivationType == expected) {
301 + return;
302 + }
303 + wallet.derivationInfo.derivationType = expected;
304 + await wallet.derivationInfo.save();
305 + }
306 +
307 // restoreFromKeys only supports restoring a watch only wallet from an account
308 // pubkey.
309 @override
@@ -247,8 +326,7 @@ class DecredWalletService extends WalletService<
326 credentials.walletInfo!.network = network;
327 credentials.walletInfo!.dirPath = "";
328 credentials.walletInfo!.path = "";
250 - final wallet = DecredWallet(credentials.walletInfo!, di, credentials.password!,
251 - this.unspentCoinsInfoSource, libwallet!, closeLibwallet);
329 + final wallet = _createWalletInstance(credentials.walletInfo!, di, credentials.password!);
330 await wallet.init();
331 return wallet;
332 }
cw_decred/pubspec.yaml
+1
@@ -12,6 +12,7 @@ environment:
12 dependencies:
13 flutter:
14 sdk: flutter
15 + bip39: ^1.0.6
16 cw_core:
17 path: ../cw_core
18
lib/core/wallet_creation_service.dart
+1 -1
@@ -86,6 +86,7 @@ class WalletCreationService {
86 case WalletType.dogecoin:
87 case WalletType.nano:
88 case WalletType.zcash:
89 + case WalletType.decred:
90 return true;
91 case WalletType.monero:
92 case WalletType.wownero:
@@ -93,7 +94,6 @@ class WalletCreationService {
94 case WalletType.haven:
95 case WalletType.banano:
96 case WalletType.zano:
96 - case WalletType.decred:
97 return false;
98 }
99 }
lib/decred/cw_decred.dart
+19 -6
@@ -5,13 +5,26 @@ class CWDecred extends Decred {
5
6 @override
7 WalletCredentials createDecredNewWalletCredentials(
8 - {required String name, WalletInfo? walletInfo}) =>
9 - DecredNewWalletCredentials(name: name, walletInfo: walletInfo);
8 + {required String name,
9 + String? password,
10 + String? passphrase,
11 + String? mnemonic,
12 + WalletInfo? walletInfo}) =>
13 + DecredNewWalletCredentials(
14 + name: name,
15 + password: password,
16 + passphrase: passphrase,
17 + mnemonic: mnemonic,
18 + walletInfo: walletInfo);
19
20 @override
21 WalletCredentials createDecredRestoreWalletFromSeedCredentials(
13 - {required String name, required String mnemonic, required String password}) =>
14 - DecredRestoreWalletFromSeedCredentials(name: name, mnemonic: mnemonic, password: password);
22 + {required String name,
23 + required String mnemonic,
24 + required String password,
25 + String? passphrase}) =>
26 + DecredRestoreWalletFromSeedCredentials(
27 + name: name, mnemonic: mnemonic, password: password, passphrase: passphrase);
28
29 @override
30 WalletCredentials createDecredRestoreWalletFromPubkeyCredentials(
@@ -19,8 +32,8 @@ class CWDecred extends Decred {
32 DecredRestoreWalletFromPubkeyCredentials(name: name, pubkey: pubkey, password: password);
33
34 @override
22 - WalletService createDecredWalletService(Box<UnspentCoinsInfo> unspentCoinSource) =>
23 - DecredWalletService(unspentCoinSource);
35 + WalletService createDecredWalletService(Box<UnspentCoinsInfo> unspentCoinSource, bool isDirect) =>
36 + DecredWalletService(unspentCoinSource, isDirect);
37
38 @override
39 List<TransactionPriority> getTransactionPriorities() => DecredTransactionPriority.all;
lib/di.dart
+2 -1
@@ -1343,7 +1343,8 @@ Future<void> setup({
1343 case WalletType.zano:
1344 return zano!.createZanoWalletService();
1345 case WalletType.decred:
1346 - return decred!.createDecredWalletService(_unspentCoinsInfoSource);
1346 + return decred!.createDecredWalletService(
1347 + _unspentCoinsInfoSource, SettingsStoreBase.walletPasswordDirectInput);
1348 case WalletType.haven:
1349 return HavenWalletService();
1350 case WalletType.zcash:
lib/reactions/wallet_utils.dart
+1 -1
@@ -17,11 +17,11 @@ bool isBIP39Wallet(WalletType walletType) {
17 case WalletType.monero:
18 case WalletType.dogecoin:
19 case WalletType.zcash:
20 + case WalletType.decred:
21 return true;
22 case WalletType.wownero:
23 case WalletType.haven:
24 case WalletType.zano:
24 - case WalletType.decred:
25 case WalletType.none:
26 return false;
27 }
lib/src/screens/restore/wallet_restore_page.dart
+1 -1
@@ -630,7 +630,7 @@ class _WalletRestorePageBodyState extends State<_WalletRestorePageBody>
630 }
631
632 if ((walletRestoreViewModel.type == WalletType.decred) &&
633 - seedWords.length != WalletRestoreViewModelBase.decredSeedMnemonicLength) {
633 + ![12, 15, 24].contains(seedWords.length)) {
634 return false;
635 }
636
lib/view_model/advanced_privacy_settings_view_model.dart
+3 -2
@@ -59,6 +59,7 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store {
59 case WalletType.solana:
60 case WalletType.tron:
61 case WalletType.zcash:
62 + case WalletType.decred:
63 return true;
64
65 case WalletType.bitcoin:
@@ -74,7 +75,6 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store {
75 case WalletType.none:
76 case WalletType.haven:
77 case WalletType.zano:
77 - case WalletType.decred:
78 return false;
79 }
80 }
@@ -107,7 +107,8 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store {
107 WalletType.zano,
108 WalletType.dogecoin,
109 WalletType.zcash,
110 - ].contains(type);
110 + WalletType.decred,
111 + ].contains(type);
112
113 @computed
114 bool get addCustomNode => _addCustomNode;
lib/view_model/wallet_creation_vm.dart
+2
@@ -179,6 +179,8 @@ abstract class WalletCreationVMBase with Store {
179 );
180 }
181 return bitcoin!.getElectrumDerivations()[DerivationType.electrum]!.first;
182 + case WalletType.decred:
183 + return DerivationInfo(derivationType: DerivationType.bip39);
184 default:
185 return DerivationInfo(derivationType: DerivationType.unknown);
186 }
lib/view_model/wallet_groups_display_view_model.dart
+6 -1
@@ -131,6 +131,10 @@ abstract class WalletGroupsDisplayViewModelBase with Store {
131 bool isNotMoneroBip39Wallet =
132 wallet.type == WalletType.monero && di.derivationType != DerivationType.bip39;
133
134 + bool isNotDecredBip39Wallet = wallet.type == WalletType.decred &&
135 + di.derivationType != DerivationType.bip39 &&
136 + di.derivationType != DerivationType.unknown;
137 +
138 // Exclude if any of these conditions are true
139 shouldExcludeGroup = shouldExcludeGroup ||
140 isNonBIP39Wallet ||
@@ -138,7 +142,8 @@ abstract class WalletGroupsDisplayViewModelBase with Store {
142 isElectrumDerivationType ||
143 isSameTypeAsSelectedWallet ||
144 isNonSeedWallet ||
141 - isNotMoneroBip39Wallet;
145 + isNotMoneroBip39Wallet ||
146 + isNotDecredBip39Wallet;
147 }
148
149 if (shouldExcludeGroup) continue;
lib/view_model/wallet_new_vm.dart
+5 -1
@@ -149,7 +149,11 @@ abstract class WalletNewVMBase extends WalletCreationVM with Store {
149 network: zcashNetwork,
150 );
151 case WalletType.decred:
152 - return decred!.createDecredNewWalletCredentials(name: name);
152 + return decred!.createDecredNewWalletCredentials(
153 + name: name,
154 + password: walletPassword,
155 + passphrase: passphrase,
156 + mnemonic: newWalletArguments!.mnemonic);
157 case WalletType.none:
158 case WalletType.haven:
159 throw Exception('Unexpected type: ${type.toString()}');
lib/view_model/wallet_restore_view_model.dart
+1
@@ -216,6 +216,7 @@ abstract class WalletRestoreViewModelBase extends WalletCreationVM with Store {
216 name: name,
217 mnemonic: seed,
218 password: password,
219 + passphrase: passphrase,
220 );
221 case WalletType.zcash:
222 return zcash!.createZcashRestoreWalletFromSeedCredentials(
pubspec.lock
+4 -4
@@ -1871,8 +1871,8 @@ packages:
1871 dependency: "direct overridden"
1872 description:
1873 path: "."
1874 - ref: 40af7c48cf34211ba3cc9e87dd05ed1af8a429a2
1875 - resolved-ref: 40af7c48cf34211ba3cc9e87dd05ed1af8a429a2
1874 + ref: "40af7c48cf34211ba3cc9e87dd05ed1af8a429a2"
1875 + resolved-ref: "40af7c48cf34211ba3cc9e87dd05ed1af8a429a2"
1876 url: "https://github.com/cake-tech/ledger-usb-plus"
1877 source: git
1878 version: "1.0.8"
@@ -3161,8 +3161,8 @@ packages:
3161 dependency: "direct overridden"
3162 description:
3163 path: "."
3164 - ref: 6735c1bdf7f42c501d51c20564eb957c3a12b981
3165 - resolved-ref: 6735c1bdf7f42c501d51c20564eb957c3a12b981
3164 + ref: "6735c1bdf7f42c501d51c20564eb957c3a12b981"
3165 + resolved-ref: "6735c1bdf7f42c501d51c20564eb957c3a12b981"
3166 url: "https://github.com/cake-tech/universal_ble.git"
3167 source: git
3168 version: "2.0.0"
scripts/android/build_decred.sh
+1 -1
@@ -7,7 +7,7 @@ cd "$(dirname "$0")"
7 CW_DECRED_DIR=$(realpath ../..)/cw_decred
8 LIBWALLET_PATH="${PWD}/decred/libwallet"
9 LIBWALLET_URL="https://github.com/decred/libwallet.git"
10 -LIBWALLET_VERSION="05f8d7374999400fe4d525eb365c39b77d307b14"
10 +LIBWALLET_VERSION="ecc4a5fb9594368777848de42d7e072d62406507"
11
12 if [[ -e $LIBWALLET_PATH ]]; then
13 rm -fr $LIBWALLET_PATH || true
scripts/ios/build_decred.sh
+1 -1
@@ -3,7 +3,7 @@ set -e
3 . ./config.sh
4 LIBWALLET_PATH="${EXTERNAL_IOS_SOURCE_DIR}/libwallet"
5 LIBWALLET_URL="https://github.com/decred/libwallet.git"
6 -LIBWALLET_VERSION="05f8d7374999400fe4d525eb365c39b77d307b14"
6 +LIBWALLET_VERSION="ecc4a5fb9594368777848de42d7e072d62406507"
7
8 if [[ -e $LIBWALLET_PATH ]]; then
9 rm -fr $LIBWALLET_PATH
tool/configure.dart
+3 -3
@@ -1259,12 +1259,12 @@ import 'package:cw_decred/mnemonic.dart';
1259
1260 abstract class Decred {
1261 WalletCredentials createDecredNewWalletCredentials(
1262 - {required String name, WalletInfo? walletInfo});
1262 + {required String name, String? password, String? passphrase, String? mnemonic, WalletInfo? walletInfo});
1263 WalletCredentials createDecredRestoreWalletFromSeedCredentials(
1264 - {required String name, required String mnemonic, required String password});
1264 + {required String name, required String mnemonic, required String password, String? passphrase});
1265 WalletCredentials createDecredRestoreWalletFromPubkeyCredentials(
1266 {required String name, required String pubkey, required String password});
1267 - WalletService createDecredWalletService(Box<UnspentCoinsInfo> unspentCoinSource);
1267 + WalletService createDecredWalletService(Box<UnspentCoinsInfo> unspentCoinSource, bool isDirect);
1268
1269 List<TransactionPriority> getTransactionPriorities();
1270 TransactionPriority getDecredTransactionPriorityMedium();