react-native-bdk-sdk 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,10 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.WordCount = exports.WalletEvent_Tags = exports.WalletEvent = exports.Wallet = exports.TxOut = exports.TxOrdering = exports.TxDetails = exports.TxBuilder = exports.SingleKeyDescriptorTemplate = exports.SentAndReceived = exports.Recipient = exports.Psbt = exports.OutPoint = exports.Network = exports.Mnemonic = exports.LocalOutput = exports.Language = exports.KeychainKind = exports.KeychainInfo = exports.DescriptorTemplate = exports.DerivationInfo = exports.ConfirmationBlockTime = exports.ChangeSpendPolicy = exports.BlockId = exports.BdkError_Tags = exports.BdkError = exports.Balance = exports.AddressInfo = void 0;
6
+ exports.WordCount = exports.WalletEvent_Tags = exports.WalletEvent = exports.Wallet = exports.TxOut = exports.TxOrdering = exports.TxDetails = exports.TxBuilder = exports.SingleKeyDescriptorTemplate = exports.SentAndReceived = exports.Recipient = exports.Psbt = exports.OutPoint = exports.Network = exports.Mnemonic = exports.LocalOutput = exports.Language = exports.KeychainKind = exports.KeychainInfo = exports.ElectrumClient = exports.DescriptorTemplate = exports.DerivationInfo = exports.ConfirmationBlockTime = exports.ChangeSpendPolicy = exports.BlockId = exports.BdkError_Tags = exports.BdkError = exports.Balance = exports.AddressInfo = void 0;
7
7
  exports.createDescriptor = createDescriptor;
8
8
  exports.createPublicDescriptor = createPublicDescriptor;
9
9
  exports.createSingleKeyDescriptor = createSingleKeyDescriptor;
10
+ exports.createWallet = createWallet;
10
11
  exports.default = void 0;
11
12
  exports.exportWallet = exportWallet;
12
13
  exports.isValidAddress = isValidAddress;
@@ -35,8 +36,6 @@ process?.env?.NODE_ENV !== "production" || false;
35
36
 
36
37
  /**
37
38
  * Generate an output descriptor string from a mnemonic using a standard BIP template.
38
- * Returns a descriptor like "wpkh([fingerprint/84'/0'/0']xprv.../0/*)" for BIP84.
39
- * Uses Bip44/49/84/86 descriptor templates.
40
39
  */
41
40
  function createDescriptor(mnemonic, template, keychain, network) /*throws*/{
42
41
  return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
@@ -44,9 +43,7 @@ function createDescriptor(mnemonic, template, keychain, network) /*throws*/{
44
43
  }, /*liftString:*/FfiConverterString.lift));
45
44
  }
46
45
  /**
47
- * Generate a public (watch-only) descriptor from an xpub string using a standard BIP template.
48
- * Returns a descriptor like "wpkh([fingerprint/84'/0'/0']xpub.../0/*)" for BIP84.
49
- * Uses Bip44Public/49Public/84Public/86Public descriptor templates.
46
+ * Generate a public (watch-only) descriptor from an xpub string.
50
47
  */
51
48
  function createPublicDescriptor(xpub, template, keychain, network) /*throws*/{
52
49
  return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
@@ -55,16 +52,30 @@ function createPublicDescriptor(xpub, template, keychain, network) /*throws*/{
55
52
  }
56
53
  /**
57
54
  * Generate a single-key descriptor from a key string.
58
- * Uses P2Pkh, P2Wpkh, P2Wpkh_P2Sh, or P2TR templates.
59
55
  */
60
56
  function createSingleKeyDescriptor(key, template, network) /*throws*/{
61
57
  return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
62
58
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_func_create_single_key_descriptor(FfiConverterString.lower(key), FfiConverterTypeSingleKeyDescriptorTemplate.lower(template), FfiConverterTypeNetwork.lower(network), callStatus);
63
59
  }, /*liftString:*/FfiConverterString.lift));
64
60
  }
61
+ /**
62
+ * Async wallet factory — creates or loads a wallet without blocking the JS thread.
63
+ */
64
+ async function createWallet(descriptor, changeDescriptor, network, dbPath, asyncOpts_) /*throws*/{
65
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
66
+ try {
67
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
68
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_func_create_wallet(FfiConverterString.lower(descriptor), FfiConverterString.lower(changeDescriptor), FfiConverterTypeNetwork.lower(network), FfiConverterString.lower(dbPath));
69
+ }, /*pollFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_poll_u64, /*cancelFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_cancel_u64, /*completeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_complete_u64, /*freeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_free_u64, /*liftFunc:*/FfiConverterTypeWallet.lift.bind(FfiConverterTypeWallet), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError));
70
+ } catch (__error) {
71
+ if (uniffiIsDebug && __error instanceof Error) {
72
+ __error.stack = __stack;
73
+ }
74
+ throw __error;
75
+ }
76
+ }
65
77
  /**
66
78
  * Export a wallet in FullyNoded-compatible JSON format for backup.
67
- * Mirrors bdk_wallet::export::FullyNodedExport.
68
79
  */
69
80
  function exportWallet(wallet, label, includeBlockHeight) /*throws*/{
70
81
  return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
@@ -88,19 +99,13 @@ function version() {
88
99
  }, /*liftString:*/FfiConverterString.lift));
89
100
  }
90
101
  /**
91
- * Compute a deterministic wallet name from its descriptors (useful for DB naming).
92
- * Mirrors bdk_wallet::wallet_name_from_descriptor().
102
+ * Compute a deterministic wallet name from its descriptors.
93
103
  */
94
104
  function walletNameFromDescriptor(descriptor, changeDescriptor, network) /*throws*/{
95
105
  return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
96
106
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_func_wallet_name_from_descriptor(FfiConverterString.lower(descriptor), FfiConverterOptionalString.lower(changeDescriptor), FfiConverterTypeNetwork.lower(network), callStatus);
97
107
  }, /*liftString:*/FfiConverterString.lift));
98
108
  }
99
-
100
- /**
101
- * A derived address with its derivation index. Mirrors bdk_wallet::AddressInfo.
102
- */
103
-
104
109
  /**
105
110
  * Generated factory for {@link AddressInfo} record objects.
106
111
  */
@@ -110,19 +115,8 @@ const AddressInfo = exports.AddressInfo = (() => {
110
115
  return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
111
116
  })();
112
117
  return Object.freeze({
113
- /**
114
- * Create a frozen instance of {@link AddressInfo}, with defaults specified
115
- * in Rust, in the {@link bdk_ffi} crate.
116
- */
117
118
  create,
118
- /**
119
- * Create a frozen instance of {@link AddressInfo}, with defaults specified
120
- * in Rust, in the {@link bdk_ffi} crate.
121
- */
122
119
  new: create,
123
- /**
124
- * Defaults specified in the {@link bdk_ffi} crate.
125
- */
126
120
  defaults: () => Object.freeze(defaults())
127
121
  });
128
122
  })();
@@ -146,12 +140,6 @@ const FfiConverterTypeAddressInfo = (() => {
146
140
  }
147
141
  return new FFIConverter();
148
142
  })();
149
-
150
- /**
151
- * Wallet balance split into categories. All values in satoshis.
152
- * Mirrors bdk_wallet::Balance (re-exported from bdk_chain).
153
- */
154
-
155
143
  /**
156
144
  * Generated factory for {@link Balance} record objects.
157
145
  */
@@ -161,19 +149,8 @@ const Balance = exports.Balance = (() => {
161
149
  return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
162
150
  })();
163
151
  return Object.freeze({
164
- /**
165
- * Create a frozen instance of {@link Balance}, with defaults specified
166
- * in Rust, in the {@link bdk_ffi} crate.
167
- */
168
152
  create,
169
- /**
170
- * Create a frozen instance of {@link Balance}, with defaults specified
171
- * in Rust, in the {@link bdk_ffi} crate.
172
- */
173
153
  new: create,
174
- /**
175
- * Defaults specified in the {@link bdk_ffi} crate.
176
- */
177
154
  defaults: () => Object.freeze(defaults())
178
155
  });
179
156
  })();
@@ -203,11 +180,6 @@ const FfiConverterTypeBalance = (() => {
203
180
  }
204
181
  return new FFIConverter();
205
182
  })();
206
-
207
- /**
208
- * A block identifier (height + hash). Mirrors bdk_chain::BlockId.
209
- */
210
-
211
183
  /**
212
184
  * Generated factory for {@link BlockId} record objects.
213
185
  */
@@ -217,19 +189,8 @@ const BlockId = exports.BlockId = (() => {
217
189
  return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
218
190
  })();
219
191
  return Object.freeze({
220
- /**
221
- * Create a frozen instance of {@link BlockId}, with defaults specified
222
- * in Rust, in the {@link bdk_ffi} crate.
223
- */
224
192
  create,
225
- /**
226
- * Create a frozen instance of {@link BlockId}, with defaults specified
227
- * in Rust, in the {@link bdk_ffi} crate.
228
- */
229
193
  new: create,
230
- /**
231
- * Defaults specified in the {@link bdk_ffi} crate.
232
- */
233
194
  defaults: () => Object.freeze(defaults())
234
195
  });
235
196
  })();
@@ -251,12 +212,6 @@ const FfiConverterTypeBlockId = (() => {
251
212
  }
252
213
  return new FFIConverter();
253
214
  })();
254
-
255
- /**
256
- * Block position for a confirmed transaction/output.
257
- * Mirrors bdk_chain::ConfirmationBlockTime.
258
- */
259
-
260
215
  /**
261
216
  * Generated factory for {@link ConfirmationBlockTime} record objects.
262
217
  */
@@ -266,19 +221,8 @@ const ConfirmationBlockTime = exports.ConfirmationBlockTime = (() => {
266
221
  return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
267
222
  })();
268
223
  return Object.freeze({
269
- /**
270
- * Create a frozen instance of {@link ConfirmationBlockTime}, with defaults specified
271
- * in Rust, in the {@link bdk_ffi} crate.
272
- */
273
224
  create,
274
- /**
275
- * Create a frozen instance of {@link ConfirmationBlockTime}, with defaults specified
276
- * in Rust, in the {@link bdk_ffi} crate.
277
- */
278
225
  new: create,
279
- /**
280
- * Defaults specified in the {@link bdk_ffi} crate.
281
- */
282
226
  defaults: () => Object.freeze(defaults())
283
227
  });
284
228
  })();
@@ -302,11 +246,6 @@ const FfiConverterTypeConfirmationBlockTime = (() => {
302
246
  }
303
247
  return new FFIConverter();
304
248
  })();
305
-
306
- /**
307
- * Derivation info for a scriptPubKey belonging to the wallet.
308
- */
309
-
310
249
  /**
311
250
  * Generated factory for {@link DerivationInfo} record objects.
312
251
  */
@@ -316,19 +255,8 @@ const DerivationInfo = exports.DerivationInfo = (() => {
316
255
  return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
317
256
  })();
318
257
  return Object.freeze({
319
- /**
320
- * Create a frozen instance of {@link DerivationInfo}, with defaults specified
321
- * in Rust, in the {@link bdk_ffi} crate.
322
- */
323
258
  create,
324
- /**
325
- * Create a frozen instance of {@link DerivationInfo}, with defaults specified
326
- * in Rust, in the {@link bdk_ffi} crate.
327
- */
328
259
  new: create,
329
- /**
330
- * Defaults specified in the {@link bdk_ffi} crate.
331
- */
332
260
  defaults: () => Object.freeze(defaults())
333
261
  });
334
262
  })();
@@ -350,11 +278,6 @@ const FfiConverterTypeDerivationInfo = (() => {
350
278
  }
351
279
  return new FFIConverter();
352
280
  })();
353
-
354
- /**
355
- * Info about a keychain and its associated descriptor.
356
- */
357
-
358
281
  /**
359
282
  * Generated factory for {@link KeychainInfo} record objects.
360
283
  */
@@ -364,19 +287,8 @@ const KeychainInfo = exports.KeychainInfo = (() => {
364
287
  return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
365
288
  })();
366
289
  return Object.freeze({
367
- /**
368
- * Create a frozen instance of {@link KeychainInfo}, with defaults specified
369
- * in Rust, in the {@link bdk_ffi} crate.
370
- */
371
290
  create,
372
- /**
373
- * Create a frozen instance of {@link KeychainInfo}, with defaults specified
374
- * in Rust, in the {@link bdk_ffi} crate.
375
- */
376
291
  new: create,
377
- /**
378
- * Defaults specified in the {@link bdk_ffi} crate.
379
- */
380
292
  defaults: () => Object.freeze(defaults())
381
293
  });
382
294
  })();
@@ -398,11 +310,6 @@ const FfiConverterTypeKeychainInfo = (() => {
398
310
  }
399
311
  return new FFIConverter();
400
312
  })();
401
-
402
- /**
403
- * A wallet-owned output (spent or unspent). Mirrors bdk_wallet::LocalOutput.
404
- */
405
-
406
313
  /**
407
314
  * Generated factory for {@link LocalOutput} record objects.
408
315
  */
@@ -412,19 +319,8 @@ const LocalOutput = exports.LocalOutput = (() => {
412
319
  return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
413
320
  })();
414
321
  return Object.freeze({
415
- /**
416
- * Create a frozen instance of {@link LocalOutput}, with defaults specified
417
- * in Rust, in the {@link bdk_ffi} crate.
418
- */
419
322
  create,
420
- /**
421
- * Create a frozen instance of {@link LocalOutput}, with defaults specified
422
- * in Rust, in the {@link bdk_ffi} crate.
423
- */
424
323
  new: create,
425
- /**
426
- * Defaults specified in the {@link bdk_ffi} crate.
427
- */
428
324
  defaults: () => Object.freeze(defaults())
429
325
  });
430
326
  })();
@@ -454,11 +350,6 @@ const FfiConverterTypeLocalOutput = (() => {
454
350
  }
455
351
  return new FFIConverter();
456
352
  })();
457
-
458
- /**
459
- * Reference to a specific transaction output. Mirrors bitcoin::OutPoint.
460
- */
461
-
462
353
  /**
463
354
  * Generated factory for {@link OutPoint} record objects.
464
355
  */
@@ -468,19 +359,8 @@ const OutPoint = exports.OutPoint = (() => {
468
359
  return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
469
360
  })();
470
361
  return Object.freeze({
471
- /**
472
- * Create a frozen instance of {@link OutPoint}, with defaults specified
473
- * in Rust, in the {@link bdk_ffi} crate.
474
- */
475
362
  create,
476
- /**
477
- * Create a frozen instance of {@link OutPoint}, with defaults specified
478
- * in Rust, in the {@link bdk_ffi} crate.
479
- */
480
363
  new: create,
481
- /**
482
- * Defaults specified in the {@link bdk_ffi} crate.
483
- */
484
364
  defaults: () => Object.freeze(defaults())
485
365
  });
486
366
  })();
@@ -502,11 +382,6 @@ const FfiConverterTypeOutPoint = (() => {
502
382
  }
503
383
  return new FFIConverter();
504
384
  })();
505
-
506
- /**
507
- * A single payment recipient.
508
- */
509
-
510
385
  /**
511
386
  * Generated factory for {@link Recipient} record objects.
512
387
  */
@@ -516,19 +391,8 @@ const Recipient = exports.Recipient = (() => {
516
391
  return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
517
392
  })();
518
393
  return Object.freeze({
519
- /**
520
- * Create a frozen instance of {@link Recipient}, with defaults specified
521
- * in Rust, in the {@link bdk_ffi} crate.
522
- */
523
394
  create,
524
- /**
525
- * Create a frozen instance of {@link Recipient}, with defaults specified
526
- * in Rust, in the {@link bdk_ffi} crate.
527
- */
528
395
  new: create,
529
- /**
530
- * Defaults specified in the {@link bdk_ffi} crate.
531
- */
532
396
  defaults: () => Object.freeze(defaults())
533
397
  });
534
398
  })();
@@ -550,11 +414,6 @@ const FfiConverterTypeRecipient = (() => {
550
414
  }
551
415
  return new FFIConverter();
552
416
  })();
553
-
554
- /**
555
- * How much was sent from / received into the wallet for a given transaction.
556
- */
557
-
558
417
  /**
559
418
  * Generated factory for {@link SentAndReceived} record objects.
560
419
  */
@@ -564,19 +423,8 @@ const SentAndReceived = exports.SentAndReceived = (() => {
564
423
  return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
565
424
  })();
566
425
  return Object.freeze({
567
- /**
568
- * Create a frozen instance of {@link SentAndReceived}, with defaults specified
569
- * in Rust, in the {@link bdk_ffi} crate.
570
- */
571
426
  create,
572
- /**
573
- * Create a frozen instance of {@link SentAndReceived}, with defaults specified
574
- * in Rust, in the {@link bdk_ffi} crate.
575
- */
576
427
  new: create,
577
- /**
578
- * Defaults specified in the {@link bdk_ffi} crate.
579
- */
580
428
  defaults: () => Object.freeze(defaults())
581
429
  });
582
430
  })();
@@ -598,11 +446,6 @@ const FfiConverterTypeSentAndReceived = (() => {
598
446
  }
599
447
  return new FFIConverter();
600
448
  })();
601
-
602
- /**
603
- * Full details of a wallet-relevant transaction. Mirrors bdk_wallet::TxDetails.
604
- */
605
-
606
449
  /**
607
450
  * Generated factory for {@link TxDetails} record objects.
608
451
  */
@@ -612,19 +455,8 @@ const TxDetails = exports.TxDetails = (() => {
612
455
  return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
613
456
  })();
614
457
  return Object.freeze({
615
- /**
616
- * Create a frozen instance of {@link TxDetails}, with defaults specified
617
- * in Rust, in the {@link bdk_ffi} crate.
618
- */
619
458
  create,
620
- /**
621
- * Create a frozen instance of {@link TxDetails}, with defaults specified
622
- * in Rust, in the {@link bdk_ffi} crate.
623
- */
624
459
  new: create,
625
- /**
626
- * Defaults specified in the {@link bdk_ffi} crate.
627
- */
628
460
  defaults: () => Object.freeze(defaults())
629
461
  });
630
462
  })();
@@ -658,11 +490,6 @@ const FfiConverterTypeTxDetails = (() => {
658
490
  }
659
491
  return new FFIConverter();
660
492
  })();
661
-
662
- /**
663
- * A transaction output (value + locking script). Mirrors bitcoin::TxOut.
664
- */
665
-
666
493
  /**
667
494
  * Generated factory for {@link TxOut} record objects.
668
495
  */
@@ -672,19 +499,8 @@ const TxOut = exports.TxOut = (() => {
672
499
  return (0, _uniffiBindgenReactNative.uniffiCreateRecord)(defaults);
673
500
  })();
674
501
  return Object.freeze({
675
- /**
676
- * Create a frozen instance of {@link TxOut}, with defaults specified
677
- * in Rust, in the {@link bdk_ffi} crate.
678
- */
679
502
  create,
680
- /**
681
- * Create a frozen instance of {@link TxOut}, with defaults specified
682
- * in Rust, in the {@link bdk_ffi} crate.
683
- */
684
503
  new: create,
685
- /**
686
- * Defaults specified in the {@link bdk_ffi} crate.
687
- */
688
504
  defaults: () => Object.freeze(defaults())
689
505
  });
690
506
  })();
@@ -713,7 +529,9 @@ const stringConverter = {
713
529
  };
714
530
  const FfiConverterString = (0, _uniffiBindgenReactNative.uniffiCreateFfiConverterString)(stringConverter);
715
531
 
716
- // Flat error type: BdkError
532
+ // Error type: BdkError
533
+
534
+ // Enum: BdkError
717
535
  let BdkError_Tags = exports.BdkError_Tags = /*#__PURE__*/function (BdkError_Tags) {
718
536
  BdkError_Tags["InvalidDescriptor"] = "InvalidDescriptor";
719
537
  BdkError_Tags["WalletCreationFailed"] = "WalletCreationFailed";
@@ -766,1110 +584,2106 @@ let BdkError_Tags = exports.BdkError_Tags = /*#__PURE__*/function (BdkError_Tags
766
584
  return BdkError_Tags;
767
585
  }({});
768
586
  const BdkError = exports.BdkError = (() => {
769
- class InvalidDescriptor extends _uniffiBindgenReactNative.UniffiError {
587
+ class InvalidDescriptor_ extends _uniffiBindgenReactNative.UniffiError {
770
588
  /**
771
589
  * @private
772
- * This field is private and should not be used.
590
+ * This field is private and should not be used, use `tag` instead.
773
591
  */
774
592
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
775
- /**
776
- * @private
777
- * This field is private and should not be used.
778
- */
779
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 1;
780
593
  tag = BdkError_Tags.InvalidDescriptor;
781
- constructor(message) {
782
- super("BdkError", "InvalidDescriptor", message);
594
+ constructor(inner) {
595
+ super("BdkError", "InvalidDescriptor");
596
+ this.inner = Object.freeze(inner);
597
+ }
598
+ static new(inner) {
599
+ return new InvalidDescriptor_(inner);
600
+ }
601
+ static instanceOf(obj) {
602
+ return obj.tag === BdkError_Tags.InvalidDescriptor;
603
+ }
604
+ static hasInner(obj) {
605
+ return InvalidDescriptor_.instanceOf(obj);
783
606
  }
784
- static instanceOf(e) {
785
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 1;
607
+ static getInner(obj) {
608
+ return obj.inner;
786
609
  }
787
610
  }
788
- class WalletCreationFailed extends _uniffiBindgenReactNative.UniffiError {
611
+ class WalletCreationFailed_ extends _uniffiBindgenReactNative.UniffiError {
789
612
  /**
790
613
  * @private
791
- * This field is private and should not be used.
614
+ * This field is private and should not be used, use `tag` instead.
792
615
  */
793
616
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
794
- /**
795
- * @private
796
- * This field is private and should not be used.
797
- */
798
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 2;
799
617
  tag = BdkError_Tags.WalletCreationFailed;
800
- constructor(message) {
801
- super("BdkError", "WalletCreationFailed", message);
618
+ constructor(inner) {
619
+ super("BdkError", "WalletCreationFailed");
620
+ this.inner = Object.freeze(inner);
621
+ }
622
+ static new(inner) {
623
+ return new WalletCreationFailed_(inner);
802
624
  }
803
- static instanceOf(e) {
804
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 2;
625
+ static instanceOf(obj) {
626
+ return obj.tag === BdkError_Tags.WalletCreationFailed;
627
+ }
628
+ static hasInner(obj) {
629
+ return WalletCreationFailed_.instanceOf(obj);
630
+ }
631
+ static getInner(obj) {
632
+ return obj.inner;
805
633
  }
806
634
  }
807
- class WalletLoadFailed extends _uniffiBindgenReactNative.UniffiError {
635
+ class WalletLoadFailed_ extends _uniffiBindgenReactNative.UniffiError {
808
636
  /**
809
637
  * @private
810
- * This field is private and should not be used.
638
+ * This field is private and should not be used, use `tag` instead.
811
639
  */
812
640
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
813
- /**
814
- * @private
815
- * This field is private and should not be used.
816
- */
817
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 3;
818
641
  tag = BdkError_Tags.WalletLoadFailed;
819
- constructor(message) {
820
- super("BdkError", "WalletLoadFailed", message);
642
+ constructor(inner) {
643
+ super("BdkError", "WalletLoadFailed");
644
+ this.inner = Object.freeze(inner);
645
+ }
646
+ static new(inner) {
647
+ return new WalletLoadFailed_(inner);
648
+ }
649
+ static instanceOf(obj) {
650
+ return obj.tag === BdkError_Tags.WalletLoadFailed;
651
+ }
652
+ static hasInner(obj) {
653
+ return WalletLoadFailed_.instanceOf(obj);
821
654
  }
822
- static instanceOf(e) {
823
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 3;
655
+ static getInner(obj) {
656
+ return obj.inner;
824
657
  }
825
658
  }
826
- class WalletLoadMismatch extends _uniffiBindgenReactNative.UniffiError {
659
+ class WalletLoadMismatch_ extends _uniffiBindgenReactNative.UniffiError {
827
660
  /**
828
661
  * @private
829
- * This field is private and should not be used.
662
+ * This field is private and should not be used, use `tag` instead.
830
663
  */
831
664
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
832
- /**
833
- * @private
834
- * This field is private and should not be used.
835
- */
836
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 4;
837
665
  tag = BdkError_Tags.WalletLoadMismatch;
838
- constructor(message) {
839
- super("BdkError", "WalletLoadMismatch", message);
666
+ constructor(inner) {
667
+ super("BdkError", "WalletLoadMismatch");
668
+ this.inner = Object.freeze(inner);
669
+ }
670
+ static new(inner) {
671
+ return new WalletLoadMismatch_(inner);
672
+ }
673
+ static instanceOf(obj) {
674
+ return obj.tag === BdkError_Tags.WalletLoadMismatch;
840
675
  }
841
- static instanceOf(e) {
842
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 4;
676
+ static hasInner(obj) {
677
+ return WalletLoadMismatch_.instanceOf(obj);
678
+ }
679
+ static getInner(obj) {
680
+ return obj.inner;
843
681
  }
844
682
  }
845
- class PersistError extends _uniffiBindgenReactNative.UniffiError {
683
+ class PersistError_ extends _uniffiBindgenReactNative.UniffiError {
846
684
  /**
847
685
  * @private
848
- * This field is private and should not be used.
686
+ * This field is private and should not be used, use `tag` instead.
849
687
  */
850
688
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
851
- /**
852
- * @private
853
- * This field is private and should not be used.
854
- */
855
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 5;
856
689
  tag = BdkError_Tags.PersistError;
857
- constructor(message) {
858
- super("BdkError", "PersistError", message);
690
+ constructor(inner) {
691
+ super("BdkError", "PersistError");
692
+ this.inner = Object.freeze(inner);
693
+ }
694
+ static new(inner) {
695
+ return new PersistError_(inner);
696
+ }
697
+ static instanceOf(obj) {
698
+ return obj.tag === BdkError_Tags.PersistError;
699
+ }
700
+ static hasInner(obj) {
701
+ return PersistError_.instanceOf(obj);
859
702
  }
860
- static instanceOf(e) {
861
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 5;
703
+ static getInner(obj) {
704
+ return obj.inner;
862
705
  }
863
706
  }
864
- class InvalidAddress extends _uniffiBindgenReactNative.UniffiError {
707
+ class InvalidAddress_ extends _uniffiBindgenReactNative.UniffiError {
865
708
  /**
866
709
  * @private
867
- * This field is private and should not be used.
710
+ * This field is private and should not be used, use `tag` instead.
868
711
  */
869
712
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
870
- /**
871
- * @private
872
- * This field is private and should not be used.
873
- */
874
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 6;
875
713
  tag = BdkError_Tags.InvalidAddress;
876
- constructor(message) {
877
- super("BdkError", "InvalidAddress", message);
714
+ constructor(inner) {
715
+ super("BdkError", "InvalidAddress");
716
+ this.inner = Object.freeze(inner);
717
+ }
718
+ static new(inner) {
719
+ return new InvalidAddress_(inner);
878
720
  }
879
- static instanceOf(e) {
880
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 6;
721
+ static instanceOf(obj) {
722
+ return obj.tag === BdkError_Tags.InvalidAddress;
723
+ }
724
+ static hasInner(obj) {
725
+ return InvalidAddress_.instanceOf(obj);
726
+ }
727
+ static getInner(obj) {
728
+ return obj.inner;
881
729
  }
882
730
  }
883
- class InvalidScript extends _uniffiBindgenReactNative.UniffiError {
731
+ class InvalidScript_ extends _uniffiBindgenReactNative.UniffiError {
884
732
  /**
885
733
  * @private
886
- * This field is private and should not be used.
734
+ * This field is private and should not be used, use `tag` instead.
887
735
  */
888
736
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
889
- /**
890
- * @private
891
- * This field is private and should not be used.
892
- */
893
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 7;
894
737
  tag = BdkError_Tags.InvalidScript;
895
- constructor(message) {
896
- super("BdkError", "InvalidScript", message);
738
+ constructor(inner) {
739
+ super("BdkError", "InvalidScript");
740
+ this.inner = Object.freeze(inner);
741
+ }
742
+ static new(inner) {
743
+ return new InvalidScript_(inner);
744
+ }
745
+ static instanceOf(obj) {
746
+ return obj.tag === BdkError_Tags.InvalidScript;
747
+ }
748
+ static hasInner(obj) {
749
+ return InvalidScript_.instanceOf(obj);
897
750
  }
898
- static instanceOf(e) {
899
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 7;
751
+ static getInner(obj) {
752
+ return obj.inner;
900
753
  }
901
754
  }
902
- class TransactionBuildFailed extends _uniffiBindgenReactNative.UniffiError {
755
+ class TransactionBuildFailed_ extends _uniffiBindgenReactNative.UniffiError {
903
756
  /**
904
757
  * @private
905
- * This field is private and should not be used.
758
+ * This field is private and should not be used, use `tag` instead.
906
759
  */
907
760
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
908
- /**
909
- * @private
910
- * This field is private and should not be used.
911
- */
912
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 8;
913
761
  tag = BdkError_Tags.TransactionBuildFailed;
914
- constructor(message) {
915
- super("BdkError", "TransactionBuildFailed", message);
762
+ constructor(inner) {
763
+ super("BdkError", "TransactionBuildFailed");
764
+ this.inner = Object.freeze(inner);
916
765
  }
917
- static instanceOf(e) {
918
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 8;
766
+ static new(inner) {
767
+ return new TransactionBuildFailed_(inner);
768
+ }
769
+ static instanceOf(obj) {
770
+ return obj.tag === BdkError_Tags.TransactionBuildFailed;
771
+ }
772
+ static hasInner(obj) {
773
+ return TransactionBuildFailed_.instanceOf(obj);
774
+ }
775
+ static getInner(obj) {
776
+ return obj.inner;
919
777
  }
920
778
  }
921
- class NoRecipients extends _uniffiBindgenReactNative.UniffiError {
779
+ class NoRecipients_ extends _uniffiBindgenReactNative.UniffiError {
922
780
  /**
923
781
  * @private
924
- * This field is private and should not be used.
782
+ * This field is private and should not be used, use `tag` instead.
925
783
  */
926
784
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
927
- /**
928
- * @private
929
- * This field is private and should not be used.
930
- */
931
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 9;
932
785
  tag = BdkError_Tags.NoRecipients;
933
- constructor(message) {
934
- super("BdkError", "NoRecipients", message);
786
+ constructor(inner) {
787
+ super("BdkError", "NoRecipients");
788
+ this.inner = Object.freeze(inner);
789
+ }
790
+ static new(inner) {
791
+ return new NoRecipients_(inner);
792
+ }
793
+ static instanceOf(obj) {
794
+ return obj.tag === BdkError_Tags.NoRecipients;
795
+ }
796
+ static hasInner(obj) {
797
+ return NoRecipients_.instanceOf(obj);
935
798
  }
936
- static instanceOf(e) {
937
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 9;
799
+ static getInner(obj) {
800
+ return obj.inner;
938
801
  }
939
802
  }
940
- class NoUtxosSelected extends _uniffiBindgenReactNative.UniffiError {
803
+ class NoUtxosSelected_ extends _uniffiBindgenReactNative.UniffiError {
941
804
  /**
942
805
  * @private
943
- * This field is private and should not be used.
806
+ * This field is private and should not be used, use `tag` instead.
944
807
  */
945
808
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
946
- /**
947
- * @private
948
- * This field is private and should not be used.
949
- */
950
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 10;
951
809
  tag = BdkError_Tags.NoUtxosSelected;
952
- constructor(message) {
953
- super("BdkError", "NoUtxosSelected", message);
810
+ constructor(inner) {
811
+ super("BdkError", "NoUtxosSelected");
812
+ this.inner = Object.freeze(inner);
813
+ }
814
+ static new(inner) {
815
+ return new NoUtxosSelected_(inner);
954
816
  }
955
- static instanceOf(e) {
956
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 10;
817
+ static instanceOf(obj) {
818
+ return obj.tag === BdkError_Tags.NoUtxosSelected;
819
+ }
820
+ static hasInner(obj) {
821
+ return NoUtxosSelected_.instanceOf(obj);
822
+ }
823
+ static getInner(obj) {
824
+ return obj.inner;
957
825
  }
958
826
  }
959
- class OutputBelowDustLimit extends _uniffiBindgenReactNative.UniffiError {
827
+ class OutputBelowDustLimit_ extends _uniffiBindgenReactNative.UniffiError {
960
828
  /**
961
829
  * @private
962
- * This field is private and should not be used.
830
+ * This field is private and should not be used, use `tag` instead.
963
831
  */
964
832
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
965
- /**
966
- * @private
967
- * This field is private and should not be used.
968
- */
969
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 11;
970
833
  tag = BdkError_Tags.OutputBelowDustLimit;
971
- constructor(message) {
972
- super("BdkError", "OutputBelowDustLimit", message);
834
+ constructor(inner) {
835
+ super("BdkError", "OutputBelowDustLimit");
836
+ this.inner = Object.freeze(inner);
837
+ }
838
+ static new(inner) {
839
+ return new OutputBelowDustLimit_(inner);
840
+ }
841
+ static instanceOf(obj) {
842
+ return obj.tag === BdkError_Tags.OutputBelowDustLimit;
843
+ }
844
+ static hasInner(obj) {
845
+ return OutputBelowDustLimit_.instanceOf(obj);
973
846
  }
974
- static instanceOf(e) {
975
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 11;
847
+ static getInner(obj) {
848
+ return obj.inner;
976
849
  }
977
850
  }
978
- class InsufficientFunds extends _uniffiBindgenReactNative.UniffiError {
851
+ class InsufficientFunds_ extends _uniffiBindgenReactNative.UniffiError {
979
852
  /**
980
853
  * @private
981
- * This field is private and should not be used.
854
+ * This field is private and should not be used, use `tag` instead.
982
855
  */
983
856
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
984
- /**
985
- * @private
986
- * This field is private and should not be used.
987
- */
988
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 12;
989
857
  tag = BdkError_Tags.InsufficientFunds;
990
- constructor(message) {
991
- super("BdkError", "InsufficientFunds", message);
858
+ constructor(inner) {
859
+ super("BdkError", "InsufficientFunds");
860
+ this.inner = Object.freeze(inner);
992
861
  }
993
- static instanceOf(e) {
994
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 12;
862
+ static new(inner) {
863
+ return new InsufficientFunds_(inner);
995
864
  }
996
- }
997
- class FeeRateTooLow extends _uniffiBindgenReactNative.UniffiError {
998
- /**
999
- * @private
1000
- * This field is private and should not be used.
1001
- */
1002
- [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
865
+ static instanceOf(obj) {
866
+ return obj.tag === BdkError_Tags.InsufficientFunds;
867
+ }
868
+ static hasInner(obj) {
869
+ return InsufficientFunds_.instanceOf(obj);
870
+ }
871
+ static getInner(obj) {
872
+ return obj.inner;
873
+ }
874
+ }
875
+ class FeeRateTooLow_ extends _uniffiBindgenReactNative.UniffiError {
1003
876
  /**
1004
877
  * @private
1005
- * This field is private and should not be used.
878
+ * This field is private and should not be used, use `tag` instead.
1006
879
  */
1007
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 13;
880
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1008
881
  tag = BdkError_Tags.FeeRateTooLow;
1009
- constructor(message) {
1010
- super("BdkError", "FeeRateTooLow", message);
882
+ constructor(inner) {
883
+ super("BdkError", "FeeRateTooLow");
884
+ this.inner = Object.freeze(inner);
885
+ }
886
+ static new(inner) {
887
+ return new FeeRateTooLow_(inner);
888
+ }
889
+ static instanceOf(obj) {
890
+ return obj.tag === BdkError_Tags.FeeRateTooLow;
891
+ }
892
+ static hasInner(obj) {
893
+ return FeeRateTooLow_.instanceOf(obj);
1011
894
  }
1012
- static instanceOf(e) {
1013
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 13;
895
+ static getInner(obj) {
896
+ return obj.inner;
1014
897
  }
1015
898
  }
1016
- class FeeTooLow extends _uniffiBindgenReactNative.UniffiError {
899
+ class FeeTooLow_ extends _uniffiBindgenReactNative.UniffiError {
1017
900
  /**
1018
901
  * @private
1019
- * This field is private and should not be used.
902
+ * This field is private and should not be used, use `tag` instead.
1020
903
  */
1021
904
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1022
- /**
1023
- * @private
1024
- * This field is private and should not be used.
1025
- */
1026
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 14;
1027
905
  tag = BdkError_Tags.FeeTooLow;
1028
- constructor(message) {
1029
- super("BdkError", "FeeTooLow", message);
906
+ constructor(inner) {
907
+ super("BdkError", "FeeTooLow");
908
+ this.inner = Object.freeze(inner);
909
+ }
910
+ static new(inner) {
911
+ return new FeeTooLow_(inner);
1030
912
  }
1031
- static instanceOf(e) {
1032
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 14;
913
+ static instanceOf(obj) {
914
+ return obj.tag === BdkError_Tags.FeeTooLow;
915
+ }
916
+ static hasInner(obj) {
917
+ return FeeTooLow_.instanceOf(obj);
918
+ }
919
+ static getInner(obj) {
920
+ return obj.inner;
1033
921
  }
1034
922
  }
1035
- class LockTimeConflict extends _uniffiBindgenReactNative.UniffiError {
923
+ class LockTimeConflict_ extends _uniffiBindgenReactNative.UniffiError {
1036
924
  /**
1037
925
  * @private
1038
- * This field is private and should not be used.
926
+ * This field is private and should not be used, use `tag` instead.
1039
927
  */
1040
928
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1041
- /**
1042
- * @private
1043
- * This field is private and should not be used.
1044
- */
1045
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 15;
1046
929
  tag = BdkError_Tags.LockTimeConflict;
1047
- constructor(message) {
1048
- super("BdkError", "LockTimeConflict", message);
930
+ constructor(inner) {
931
+ super("BdkError", "LockTimeConflict");
932
+ this.inner = Object.freeze(inner);
933
+ }
934
+ static new(inner) {
935
+ return new LockTimeConflict_(inner);
936
+ }
937
+ static instanceOf(obj) {
938
+ return obj.tag === BdkError_Tags.LockTimeConflict;
939
+ }
940
+ static hasInner(obj) {
941
+ return LockTimeConflict_.instanceOf(obj);
1049
942
  }
1050
- static instanceOf(e) {
1051
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 15;
943
+ static getInner(obj) {
944
+ return obj.inner;
1052
945
  }
1053
946
  }
1054
- class RbfSequenceConflict extends _uniffiBindgenReactNative.UniffiError {
947
+ class RbfSequenceConflict_ extends _uniffiBindgenReactNative.UniffiError {
1055
948
  /**
1056
949
  * @private
1057
- * This field is private and should not be used.
950
+ * This field is private and should not be used, use `tag` instead.
1058
951
  */
1059
952
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1060
- /**
1061
- * @private
1062
- * This field is private and should not be used.
1063
- */
1064
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 16;
1065
953
  tag = BdkError_Tags.RbfSequenceConflict;
1066
- constructor(message) {
1067
- super("BdkError", "RbfSequenceConflict", message);
954
+ constructor(inner) {
955
+ super("BdkError", "RbfSequenceConflict");
956
+ this.inner = Object.freeze(inner);
957
+ }
958
+ static new(inner) {
959
+ return new RbfSequenceConflict_(inner);
960
+ }
961
+ static instanceOf(obj) {
962
+ return obj.tag === BdkError_Tags.RbfSequenceConflict;
1068
963
  }
1069
- static instanceOf(e) {
1070
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 16;
964
+ static hasInner(obj) {
965
+ return RbfSequenceConflict_.instanceOf(obj);
966
+ }
967
+ static getInner(obj) {
968
+ return obj.inner;
1071
969
  }
1072
970
  }
1073
- class VersionZero extends _uniffiBindgenReactNative.UniffiError {
971
+ class VersionZero_ extends _uniffiBindgenReactNative.UniffiError {
1074
972
  /**
1075
973
  * @private
1076
- * This field is private and should not be used.
974
+ * This field is private and should not be used, use `tag` instead.
1077
975
  */
1078
976
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1079
- /**
1080
- * @private
1081
- * This field is private and should not be used.
1082
- */
1083
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 17;
1084
977
  tag = BdkError_Tags.VersionZero;
1085
- constructor(message) {
1086
- super("BdkError", "VersionZero", message);
978
+ constructor(inner) {
979
+ super("BdkError", "VersionZero");
980
+ this.inner = Object.freeze(inner);
981
+ }
982
+ static new(inner) {
983
+ return new VersionZero_(inner);
984
+ }
985
+ static instanceOf(obj) {
986
+ return obj.tag === BdkError_Tags.VersionZero;
987
+ }
988
+ static hasInner(obj) {
989
+ return VersionZero_.instanceOf(obj);
1087
990
  }
1088
- static instanceOf(e) {
1089
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 17;
991
+ static getInner(obj) {
992
+ return obj.inner;
1090
993
  }
1091
994
  }
1092
- class VersionOneCsv extends _uniffiBindgenReactNative.UniffiError {
995
+ class VersionOneCsv_ extends _uniffiBindgenReactNative.UniffiError {
1093
996
  /**
1094
997
  * @private
1095
- * This field is private and should not be used.
998
+ * This field is private and should not be used, use `tag` instead.
1096
999
  */
1097
1000
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1098
- /**
1099
- * @private
1100
- * This field is private and should not be used.
1101
- */
1102
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 18;
1103
1001
  tag = BdkError_Tags.VersionOneCsv;
1104
- constructor(message) {
1105
- super("BdkError", "VersionOneCsv", message);
1002
+ constructor(inner) {
1003
+ super("BdkError", "VersionOneCsv");
1004
+ this.inner = Object.freeze(inner);
1005
+ }
1006
+ static new(inner) {
1007
+ return new VersionOneCsv_(inner);
1106
1008
  }
1107
- static instanceOf(e) {
1108
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 18;
1009
+ static instanceOf(obj) {
1010
+ return obj.tag === BdkError_Tags.VersionOneCsv;
1011
+ }
1012
+ static hasInner(obj) {
1013
+ return VersionOneCsv_.instanceOf(obj);
1014
+ }
1015
+ static getInner(obj) {
1016
+ return obj.inner;
1109
1017
  }
1110
1018
  }
1111
- class SpendingPolicyRequired extends _uniffiBindgenReactNative.UniffiError {
1019
+ class SpendingPolicyRequired_ extends _uniffiBindgenReactNative.UniffiError {
1112
1020
  /**
1113
1021
  * @private
1114
- * This field is private and should not be used.
1022
+ * This field is private and should not be used, use `tag` instead.
1115
1023
  */
1116
1024
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1117
- /**
1118
- * @private
1119
- * This field is private and should not be used.
1120
- */
1121
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 19;
1122
1025
  tag = BdkError_Tags.SpendingPolicyRequired;
1123
- constructor(message) {
1124
- super("BdkError", "SpendingPolicyRequired", message);
1026
+ constructor(inner) {
1027
+ super("BdkError", "SpendingPolicyRequired");
1028
+ this.inner = Object.freeze(inner);
1029
+ }
1030
+ static new(inner) {
1031
+ return new SpendingPolicyRequired_(inner);
1032
+ }
1033
+ static instanceOf(obj) {
1034
+ return obj.tag === BdkError_Tags.SpendingPolicyRequired;
1035
+ }
1036
+ static hasInner(obj) {
1037
+ return SpendingPolicyRequired_.instanceOf(obj);
1125
1038
  }
1126
- static instanceOf(e) {
1127
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 19;
1039
+ static getInner(obj) {
1040
+ return obj.inner;
1128
1041
  }
1129
1042
  }
1130
- class MissingKeyOrigin extends _uniffiBindgenReactNative.UniffiError {
1043
+ class MissingKeyOrigin_ extends _uniffiBindgenReactNative.UniffiError {
1131
1044
  /**
1132
1045
  * @private
1133
- * This field is private and should not be used.
1046
+ * This field is private and should not be used, use `tag` instead.
1134
1047
  */
1135
1048
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1136
- /**
1137
- * @private
1138
- * This field is private and should not be used.
1139
- */
1140
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 20;
1141
1049
  tag = BdkError_Tags.MissingKeyOrigin;
1142
- constructor(message) {
1143
- super("BdkError", "MissingKeyOrigin", message);
1050
+ constructor(inner) {
1051
+ super("BdkError", "MissingKeyOrigin");
1052
+ this.inner = Object.freeze(inner);
1144
1053
  }
1145
- static instanceOf(e) {
1146
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 20;
1054
+ static new(inner) {
1055
+ return new MissingKeyOrigin_(inner);
1056
+ }
1057
+ static instanceOf(obj) {
1058
+ return obj.tag === BdkError_Tags.MissingKeyOrigin;
1059
+ }
1060
+ static hasInner(obj) {
1061
+ return MissingKeyOrigin_.instanceOf(obj);
1062
+ }
1063
+ static getInner(obj) {
1064
+ return obj.inner;
1147
1065
  }
1148
1066
  }
1149
- class MissingNonWitnessUtxo extends _uniffiBindgenReactNative.UniffiError {
1067
+ class MissingNonWitnessUtxo_ extends _uniffiBindgenReactNative.UniffiError {
1150
1068
  /**
1151
1069
  * @private
1152
- * This field is private and should not be used.
1070
+ * This field is private and should not be used, use `tag` instead.
1153
1071
  */
1154
1072
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1155
- /**
1156
- * @private
1157
- * This field is private and should not be used.
1158
- */
1159
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 21;
1160
1073
  tag = BdkError_Tags.MissingNonWitnessUtxo;
1161
- constructor(message) {
1162
- super("BdkError", "MissingNonWitnessUtxo", message);
1074
+ constructor(inner) {
1075
+ super("BdkError", "MissingNonWitnessUtxo");
1076
+ this.inner = Object.freeze(inner);
1077
+ }
1078
+ static new(inner) {
1079
+ return new MissingNonWitnessUtxo_(inner);
1080
+ }
1081
+ static instanceOf(obj) {
1082
+ return obj.tag === BdkError_Tags.MissingNonWitnessUtxo;
1083
+ }
1084
+ static hasInner(obj) {
1085
+ return MissingNonWitnessUtxo_.instanceOf(obj);
1163
1086
  }
1164
- static instanceOf(e) {
1165
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 21;
1087
+ static getInner(obj) {
1088
+ return obj.inner;
1166
1089
  }
1167
1090
  }
1168
- class OutpointNotFound extends _uniffiBindgenReactNative.UniffiError {
1091
+ class OutpointNotFound_ extends _uniffiBindgenReactNative.UniffiError {
1169
1092
  /**
1170
1093
  * @private
1171
- * This field is private and should not be used.
1094
+ * This field is private and should not be used, use `tag` instead.
1172
1095
  */
1173
1096
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1174
- /**
1175
- * @private
1176
- * This field is private and should not be used.
1177
- */
1178
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 22;
1179
1097
  tag = BdkError_Tags.OutpointNotFound;
1180
- constructor(message) {
1181
- super("BdkError", "OutpointNotFound", message);
1098
+ constructor(inner) {
1099
+ super("BdkError", "OutpointNotFound");
1100
+ this.inner = Object.freeze(inner);
1101
+ }
1102
+ static new(inner) {
1103
+ return new OutpointNotFound_(inner);
1182
1104
  }
1183
- static instanceOf(e) {
1184
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 22;
1105
+ static instanceOf(obj) {
1106
+ return obj.tag === BdkError_Tags.OutpointNotFound;
1107
+ }
1108
+ static hasInner(obj) {
1109
+ return OutpointNotFound_.instanceOf(obj);
1110
+ }
1111
+ static getInner(obj) {
1112
+ return obj.inner;
1185
1113
  }
1186
1114
  }
1187
- class FeeBumpTargetNotFound extends _uniffiBindgenReactNative.UniffiError {
1115
+ class FeeBumpTargetNotFound_ extends _uniffiBindgenReactNative.UniffiError {
1188
1116
  /**
1189
1117
  * @private
1190
- * This field is private and should not be used.
1118
+ * This field is private and should not be used, use `tag` instead.
1191
1119
  */
1192
1120
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1193
- /**
1194
- * @private
1195
- * This field is private and should not be used.
1196
- */
1197
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 23;
1198
1121
  tag = BdkError_Tags.FeeBumpTargetNotFound;
1199
- constructor(message) {
1200
- super("BdkError", "FeeBumpTargetNotFound", message);
1122
+ constructor(inner) {
1123
+ super("BdkError", "FeeBumpTargetNotFound");
1124
+ this.inner = Object.freeze(inner);
1125
+ }
1126
+ static new(inner) {
1127
+ return new FeeBumpTargetNotFound_(inner);
1128
+ }
1129
+ static instanceOf(obj) {
1130
+ return obj.tag === BdkError_Tags.FeeBumpTargetNotFound;
1131
+ }
1132
+ static hasInner(obj) {
1133
+ return FeeBumpTargetNotFound_.instanceOf(obj);
1201
1134
  }
1202
- static instanceOf(e) {
1203
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 23;
1135
+ static getInner(obj) {
1136
+ return obj.inner;
1204
1137
  }
1205
1138
  }
1206
- class FeeBumpAlreadyConfirmed extends _uniffiBindgenReactNative.UniffiError {
1139
+ class FeeBumpAlreadyConfirmed_ extends _uniffiBindgenReactNative.UniffiError {
1207
1140
  /**
1208
1141
  * @private
1209
- * This field is private and should not be used.
1142
+ * This field is private and should not be used, use `tag` instead.
1210
1143
  */
1211
1144
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1212
- /**
1213
- * @private
1214
- * This field is private and should not be used.
1215
- */
1216
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 24;
1217
1145
  tag = BdkError_Tags.FeeBumpAlreadyConfirmed;
1218
- constructor(message) {
1219
- super("BdkError", "FeeBumpAlreadyConfirmed", message);
1146
+ constructor(inner) {
1147
+ super("BdkError", "FeeBumpAlreadyConfirmed");
1148
+ this.inner = Object.freeze(inner);
1149
+ }
1150
+ static new(inner) {
1151
+ return new FeeBumpAlreadyConfirmed_(inner);
1152
+ }
1153
+ static instanceOf(obj) {
1154
+ return obj.tag === BdkError_Tags.FeeBumpAlreadyConfirmed;
1220
1155
  }
1221
- static instanceOf(e) {
1222
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 24;
1156
+ static hasInner(obj) {
1157
+ return FeeBumpAlreadyConfirmed_.instanceOf(obj);
1158
+ }
1159
+ static getInner(obj) {
1160
+ return obj.inner;
1223
1161
  }
1224
1162
  }
1225
- class FeeBumpIrreplaceable extends _uniffiBindgenReactNative.UniffiError {
1163
+ class FeeBumpIrreplaceable_ extends _uniffiBindgenReactNative.UniffiError {
1226
1164
  /**
1227
1165
  * @private
1228
- * This field is private and should not be used.
1166
+ * This field is private and should not be used, use `tag` instead.
1229
1167
  */
1230
1168
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1231
- /**
1232
- * @private
1233
- * This field is private and should not be used.
1234
- */
1235
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 25;
1236
1169
  tag = BdkError_Tags.FeeBumpIrreplaceable;
1237
- constructor(message) {
1238
- super("BdkError", "FeeBumpIrreplaceable", message);
1170
+ constructor(inner) {
1171
+ super("BdkError", "FeeBumpIrreplaceable");
1172
+ this.inner = Object.freeze(inner);
1173
+ }
1174
+ static new(inner) {
1175
+ return new FeeBumpIrreplaceable_(inner);
1176
+ }
1177
+ static instanceOf(obj) {
1178
+ return obj.tag === BdkError_Tags.FeeBumpIrreplaceable;
1179
+ }
1180
+ static hasInner(obj) {
1181
+ return FeeBumpIrreplaceable_.instanceOf(obj);
1239
1182
  }
1240
- static instanceOf(e) {
1241
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 25;
1183
+ static getInner(obj) {
1184
+ return obj.inner;
1242
1185
  }
1243
1186
  }
1244
- class FeeBumpFeeRateUnavailable extends _uniffiBindgenReactNative.UniffiError {
1187
+ class FeeBumpFeeRateUnavailable_ extends _uniffiBindgenReactNative.UniffiError {
1245
1188
  /**
1246
1189
  * @private
1247
- * This field is private and should not be used.
1190
+ * This field is private and should not be used, use `tag` instead.
1248
1191
  */
1249
1192
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1250
- /**
1251
- * @private
1252
- * This field is private and should not be used.
1253
- */
1254
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 26;
1255
1193
  tag = BdkError_Tags.FeeBumpFeeRateUnavailable;
1256
- constructor(message) {
1257
- super("BdkError", "FeeBumpFeeRateUnavailable", message);
1194
+ constructor(inner) {
1195
+ super("BdkError", "FeeBumpFeeRateUnavailable");
1196
+ this.inner = Object.freeze(inner);
1197
+ }
1198
+ static new(inner) {
1199
+ return new FeeBumpFeeRateUnavailable_(inner);
1258
1200
  }
1259
- static instanceOf(e) {
1260
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 26;
1201
+ static instanceOf(obj) {
1202
+ return obj.tag === BdkError_Tags.FeeBumpFeeRateUnavailable;
1203
+ }
1204
+ static hasInner(obj) {
1205
+ return FeeBumpFeeRateUnavailable_.instanceOf(obj);
1206
+ }
1207
+ static getInner(obj) {
1208
+ return obj.inner;
1261
1209
  }
1262
1210
  }
1263
- class FeeBumpInvalidOutputIndex extends _uniffiBindgenReactNative.UniffiError {
1211
+ class FeeBumpInvalidOutputIndex_ extends _uniffiBindgenReactNative.UniffiError {
1264
1212
  /**
1265
1213
  * @private
1266
- * This field is private and should not be used.
1214
+ * This field is private and should not be used, use `tag` instead.
1267
1215
  */
1268
1216
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1269
- /**
1270
- * @private
1271
- * This field is private and should not be used.
1272
- */
1273
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 27;
1274
1217
  tag = BdkError_Tags.FeeBumpInvalidOutputIndex;
1275
- constructor(message) {
1276
- super("BdkError", "FeeBumpInvalidOutputIndex", message);
1218
+ constructor(inner) {
1219
+ super("BdkError", "FeeBumpInvalidOutputIndex");
1220
+ this.inner = Object.freeze(inner);
1221
+ }
1222
+ static new(inner) {
1223
+ return new FeeBumpInvalidOutputIndex_(inner);
1224
+ }
1225
+ static instanceOf(obj) {
1226
+ return obj.tag === BdkError_Tags.FeeBumpInvalidOutputIndex;
1227
+ }
1228
+ static hasInner(obj) {
1229
+ return FeeBumpInvalidOutputIndex_.instanceOf(obj);
1277
1230
  }
1278
- static instanceOf(e) {
1279
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 27;
1231
+ static getInner(obj) {
1232
+ return obj.inner;
1280
1233
  }
1281
1234
  }
1282
- class InvalidPsbt extends _uniffiBindgenReactNative.UniffiError {
1235
+ class InvalidPsbt_ extends _uniffiBindgenReactNative.UniffiError {
1283
1236
  /**
1284
1237
  * @private
1285
- * This field is private and should not be used.
1238
+ * This field is private and should not be used, use `tag` instead.
1286
1239
  */
1287
1240
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1288
- /**
1289
- * @private
1290
- * This field is private and should not be used.
1291
- */
1292
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 28;
1293
1241
  tag = BdkError_Tags.InvalidPsbt;
1294
- constructor(message) {
1295
- super("BdkError", "InvalidPsbt", message);
1242
+ constructor(inner) {
1243
+ super("BdkError", "InvalidPsbt");
1244
+ this.inner = Object.freeze(inner);
1296
1245
  }
1297
- static instanceOf(e) {
1298
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 28;
1246
+ static new(inner) {
1247
+ return new InvalidPsbt_(inner);
1248
+ }
1249
+ static instanceOf(obj) {
1250
+ return obj.tag === BdkError_Tags.InvalidPsbt;
1251
+ }
1252
+ static hasInner(obj) {
1253
+ return InvalidPsbt_.instanceOf(obj);
1254
+ }
1255
+ static getInner(obj) {
1256
+ return obj.inner;
1299
1257
  }
1300
1258
  }
1301
- class SignFailed extends _uniffiBindgenReactNative.UniffiError {
1259
+ class SignFailed_ extends _uniffiBindgenReactNative.UniffiError {
1302
1260
  /**
1303
1261
  * @private
1304
- * This field is private and should not be used.
1262
+ * This field is private and should not be used, use `tag` instead.
1305
1263
  */
1306
1264
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1307
- /**
1308
- * @private
1309
- * This field is private and should not be used.
1310
- */
1311
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 29;
1312
1265
  tag = BdkError_Tags.SignFailed;
1313
- constructor(message) {
1314
- super("BdkError", "SignFailed", message);
1266
+ constructor(inner) {
1267
+ super("BdkError", "SignFailed");
1268
+ this.inner = Object.freeze(inner);
1269
+ }
1270
+ static new(inner) {
1271
+ return new SignFailed_(inner);
1272
+ }
1273
+ static instanceOf(obj) {
1274
+ return obj.tag === BdkError_Tags.SignFailed;
1275
+ }
1276
+ static hasInner(obj) {
1277
+ return SignFailed_.instanceOf(obj);
1315
1278
  }
1316
- static instanceOf(e) {
1317
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 29;
1279
+ static getInner(obj) {
1280
+ return obj.inner;
1318
1281
  }
1319
1282
  }
1320
- class SignerMissingKey extends _uniffiBindgenReactNative.UniffiError {
1283
+ class SignerMissingKey_ extends _uniffiBindgenReactNative.UniffiError {
1321
1284
  /**
1322
1285
  * @private
1323
- * This field is private and should not be used.
1286
+ * This field is private and should not be used, use `tag` instead.
1324
1287
  */
1325
1288
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1326
- /**
1327
- * @private
1328
- * This field is private and should not be used.
1329
- */
1330
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 30;
1331
1289
  tag = BdkError_Tags.SignerMissingKey;
1332
- constructor(message) {
1333
- super("BdkError", "SignerMissingKey", message);
1290
+ constructor(inner) {
1291
+ super("BdkError", "SignerMissingKey");
1292
+ this.inner = Object.freeze(inner);
1293
+ }
1294
+ static new(inner) {
1295
+ return new SignerMissingKey_(inner);
1334
1296
  }
1335
- static instanceOf(e) {
1336
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 30;
1297
+ static instanceOf(obj) {
1298
+ return obj.tag === BdkError_Tags.SignerMissingKey;
1299
+ }
1300
+ static hasInner(obj) {
1301
+ return SignerMissingKey_.instanceOf(obj);
1302
+ }
1303
+ static getInner(obj) {
1304
+ return obj.inner;
1337
1305
  }
1338
1306
  }
1339
- class SignerInvalidKey extends _uniffiBindgenReactNative.UniffiError {
1307
+ class SignerInvalidKey_ extends _uniffiBindgenReactNative.UniffiError {
1340
1308
  /**
1341
1309
  * @private
1342
- * This field is private and should not be used.
1310
+ * This field is private and should not be used, use `tag` instead.
1343
1311
  */
1344
1312
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1345
- /**
1346
- * @private
1347
- * This field is private and should not be used.
1348
- */
1349
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 31;
1350
1313
  tag = BdkError_Tags.SignerInvalidKey;
1351
- constructor(message) {
1352
- super("BdkError", "SignerInvalidKey", message);
1314
+ constructor(inner) {
1315
+ super("BdkError", "SignerInvalidKey");
1316
+ this.inner = Object.freeze(inner);
1317
+ }
1318
+ static new(inner) {
1319
+ return new SignerInvalidKey_(inner);
1320
+ }
1321
+ static instanceOf(obj) {
1322
+ return obj.tag === BdkError_Tags.SignerInvalidKey;
1323
+ }
1324
+ static hasInner(obj) {
1325
+ return SignerInvalidKey_.instanceOf(obj);
1353
1326
  }
1354
- static instanceOf(e) {
1355
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 31;
1327
+ static getInner(obj) {
1328
+ return obj.inner;
1356
1329
  }
1357
1330
  }
1358
- class SignerUserCanceled extends _uniffiBindgenReactNative.UniffiError {
1331
+ class SignerUserCanceled_ extends _uniffiBindgenReactNative.UniffiError {
1359
1332
  /**
1360
1333
  * @private
1361
- * This field is private and should not be used.
1334
+ * This field is private and should not be used, use `tag` instead.
1362
1335
  */
1363
1336
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1364
- /**
1365
- * @private
1366
- * This field is private and should not be used.
1367
- */
1368
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 32;
1369
1337
  tag = BdkError_Tags.SignerUserCanceled;
1370
- constructor(message) {
1371
- super("BdkError", "SignerUserCanceled", message);
1338
+ constructor(inner) {
1339
+ super("BdkError", "SignerUserCanceled");
1340
+ this.inner = Object.freeze(inner);
1341
+ }
1342
+ static new(inner) {
1343
+ return new SignerUserCanceled_(inner);
1344
+ }
1345
+ static instanceOf(obj) {
1346
+ return obj.tag === BdkError_Tags.SignerUserCanceled;
1372
1347
  }
1373
- static instanceOf(e) {
1374
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 32;
1348
+ static hasInner(obj) {
1349
+ return SignerUserCanceled_.instanceOf(obj);
1350
+ }
1351
+ static getInner(obj) {
1352
+ return obj.inner;
1375
1353
  }
1376
1354
  }
1377
- class SignerInputIndexOutOfRange extends _uniffiBindgenReactNative.UniffiError {
1355
+ class SignerInputIndexOutOfRange_ extends _uniffiBindgenReactNative.UniffiError {
1378
1356
  /**
1379
1357
  * @private
1380
- * This field is private and should not be used.
1358
+ * This field is private and should not be used, use `tag` instead.
1381
1359
  */
1382
1360
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1383
- /**
1384
- * @private
1385
- * This field is private and should not be used.
1386
- */
1387
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 33;
1388
1361
  tag = BdkError_Tags.SignerInputIndexOutOfRange;
1389
- constructor(message) {
1390
- super("BdkError", "SignerInputIndexOutOfRange", message);
1362
+ constructor(inner) {
1363
+ super("BdkError", "SignerInputIndexOutOfRange");
1364
+ this.inner = Object.freeze(inner);
1365
+ }
1366
+ static new(inner) {
1367
+ return new SignerInputIndexOutOfRange_(inner);
1368
+ }
1369
+ static instanceOf(obj) {
1370
+ return obj.tag === BdkError_Tags.SignerInputIndexOutOfRange;
1371
+ }
1372
+ static hasInner(obj) {
1373
+ return SignerInputIndexOutOfRange_.instanceOf(obj);
1391
1374
  }
1392
- static instanceOf(e) {
1393
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 33;
1375
+ static getInner(obj) {
1376
+ return obj.inner;
1394
1377
  }
1395
1378
  }
1396
- class SignerMissingNonWitnessUtxo extends _uniffiBindgenReactNative.UniffiError {
1379
+ class SignerMissingNonWitnessUtxo_ extends _uniffiBindgenReactNative.UniffiError {
1397
1380
  /**
1398
1381
  * @private
1399
- * This field is private and should not be used.
1382
+ * This field is private and should not be used, use `tag` instead.
1400
1383
  */
1401
1384
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1402
- /**
1403
- * @private
1404
- * This field is private and should not be used.
1405
- */
1406
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 34;
1407
1385
  tag = BdkError_Tags.SignerMissingNonWitnessUtxo;
1408
- constructor(message) {
1409
- super("BdkError", "SignerMissingNonWitnessUtxo", message);
1386
+ constructor(inner) {
1387
+ super("BdkError", "SignerMissingNonWitnessUtxo");
1388
+ this.inner = Object.freeze(inner);
1389
+ }
1390
+ static new(inner) {
1391
+ return new SignerMissingNonWitnessUtxo_(inner);
1410
1392
  }
1411
- static instanceOf(e) {
1412
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 34;
1393
+ static instanceOf(obj) {
1394
+ return obj.tag === BdkError_Tags.SignerMissingNonWitnessUtxo;
1395
+ }
1396
+ static hasInner(obj) {
1397
+ return SignerMissingNonWitnessUtxo_.instanceOf(obj);
1398
+ }
1399
+ static getInner(obj) {
1400
+ return obj.inner;
1413
1401
  }
1414
1402
  }
1415
- class SignerMissingWitnessUtxo extends _uniffiBindgenReactNative.UniffiError {
1403
+ class SignerMissingWitnessUtxo_ extends _uniffiBindgenReactNative.UniffiError {
1416
1404
  /**
1417
1405
  * @private
1418
- * This field is private and should not be used.
1406
+ * This field is private and should not be used, use `tag` instead.
1419
1407
  */
1420
1408
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1421
- /**
1422
- * @private
1423
- * This field is private and should not be used.
1424
- */
1425
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 35;
1426
1409
  tag = BdkError_Tags.SignerMissingWitnessUtxo;
1427
- constructor(message) {
1428
- super("BdkError", "SignerMissingWitnessUtxo", message);
1410
+ constructor(inner) {
1411
+ super("BdkError", "SignerMissingWitnessUtxo");
1412
+ this.inner = Object.freeze(inner);
1429
1413
  }
1430
- static instanceOf(e) {
1431
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 35;
1414
+ static new(inner) {
1415
+ return new SignerMissingWitnessUtxo_(inner);
1432
1416
  }
1433
- }
1434
- class SignerMissingWitnessScript extends _uniffiBindgenReactNative.UniffiError {
1435
- /**
1436
- * @private
1437
- * This field is private and should not be used.
1438
- */
1439
- [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1417
+ static instanceOf(obj) {
1418
+ return obj.tag === BdkError_Tags.SignerMissingWitnessUtxo;
1419
+ }
1420
+ static hasInner(obj) {
1421
+ return SignerMissingWitnessUtxo_.instanceOf(obj);
1422
+ }
1423
+ static getInner(obj) {
1424
+ return obj.inner;
1425
+ }
1426
+ }
1427
+ class SignerMissingWitnessScript_ extends _uniffiBindgenReactNative.UniffiError {
1440
1428
  /**
1441
1429
  * @private
1442
- * This field is private and should not be used.
1430
+ * This field is private and should not be used, use `tag` instead.
1443
1431
  */
1444
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 36;
1432
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1445
1433
  tag = BdkError_Tags.SignerMissingWitnessScript;
1446
- constructor(message) {
1447
- super("BdkError", "SignerMissingWitnessScript", message);
1434
+ constructor(inner) {
1435
+ super("BdkError", "SignerMissingWitnessScript");
1436
+ this.inner = Object.freeze(inner);
1437
+ }
1438
+ static new(inner) {
1439
+ return new SignerMissingWitnessScript_(inner);
1440
+ }
1441
+ static instanceOf(obj) {
1442
+ return obj.tag === BdkError_Tags.SignerMissingWitnessScript;
1448
1443
  }
1449
- static instanceOf(e) {
1450
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 36;
1444
+ static hasInner(obj) {
1445
+ return SignerMissingWitnessScript_.instanceOf(obj);
1446
+ }
1447
+ static getInner(obj) {
1448
+ return obj.inner;
1451
1449
  }
1452
1450
  }
1453
- class SignerNonStandardSighash extends _uniffiBindgenReactNative.UniffiError {
1451
+ class SignerNonStandardSighash_ extends _uniffiBindgenReactNative.UniffiError {
1454
1452
  /**
1455
1453
  * @private
1456
- * This field is private and should not be used.
1454
+ * This field is private and should not be used, use `tag` instead.
1457
1455
  */
1458
1456
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1459
- /**
1460
- * @private
1461
- * This field is private and should not be used.
1462
- */
1463
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 37;
1464
1457
  tag = BdkError_Tags.SignerNonStandardSighash;
1465
- constructor(message) {
1466
- super("BdkError", "SignerNonStandardSighash", message);
1458
+ constructor(inner) {
1459
+ super("BdkError", "SignerNonStandardSighash");
1460
+ this.inner = Object.freeze(inner);
1461
+ }
1462
+ static new(inner) {
1463
+ return new SignerNonStandardSighash_(inner);
1464
+ }
1465
+ static instanceOf(obj) {
1466
+ return obj.tag === BdkError_Tags.SignerNonStandardSighash;
1467
+ }
1468
+ static hasInner(obj) {
1469
+ return SignerNonStandardSighash_.instanceOf(obj);
1467
1470
  }
1468
- static instanceOf(e) {
1469
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 37;
1471
+ static getInner(obj) {
1472
+ return obj.inner;
1470
1473
  }
1471
1474
  }
1472
- class SignerInvalidSighash extends _uniffiBindgenReactNative.UniffiError {
1475
+ class SignerInvalidSighash_ extends _uniffiBindgenReactNative.UniffiError {
1473
1476
  /**
1474
1477
  * @private
1475
- * This field is private and should not be used.
1478
+ * This field is private and should not be used, use `tag` instead.
1476
1479
  */
1477
1480
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1478
- /**
1479
- * @private
1480
- * This field is private and should not be used.
1481
- */
1482
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 38;
1483
1481
  tag = BdkError_Tags.SignerInvalidSighash;
1484
- constructor(message) {
1485
- super("BdkError", "SignerInvalidSighash", message);
1482
+ constructor(inner) {
1483
+ super("BdkError", "SignerInvalidSighash");
1484
+ this.inner = Object.freeze(inner);
1485
+ }
1486
+ static new(inner) {
1487
+ return new SignerInvalidSighash_(inner);
1486
1488
  }
1487
- static instanceOf(e) {
1488
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 38;
1489
+ static instanceOf(obj) {
1490
+ return obj.tag === BdkError_Tags.SignerInvalidSighash;
1491
+ }
1492
+ static hasInner(obj) {
1493
+ return SignerInvalidSighash_.instanceOf(obj);
1494
+ }
1495
+ static getInner(obj) {
1496
+ return obj.inner;
1489
1497
  }
1490
1498
  }
1491
- class SyncFailed extends _uniffiBindgenReactNative.UniffiError {
1499
+ class SyncFailed_ extends _uniffiBindgenReactNative.UniffiError {
1492
1500
  /**
1493
1501
  * @private
1494
- * This field is private and should not be used.
1502
+ * This field is private and should not be used, use `tag` instead.
1495
1503
  */
1496
1504
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1497
- /**
1498
- * @private
1499
- * This field is private and should not be used.
1500
- */
1501
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 39;
1502
1505
  tag = BdkError_Tags.SyncFailed;
1503
- constructor(message) {
1504
- super("BdkError", "SyncFailed", message);
1506
+ constructor(inner) {
1507
+ super("BdkError", "SyncFailed");
1508
+ this.inner = Object.freeze(inner);
1509
+ }
1510
+ static new(inner) {
1511
+ return new SyncFailed_(inner);
1512
+ }
1513
+ static instanceOf(obj) {
1514
+ return obj.tag === BdkError_Tags.SyncFailed;
1515
+ }
1516
+ static hasInner(obj) {
1517
+ return SyncFailed_.instanceOf(obj);
1505
1518
  }
1506
- static instanceOf(e) {
1507
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 39;
1519
+ static getInner(obj) {
1520
+ return obj.inner;
1508
1521
  }
1509
1522
  }
1510
- class BroadcastFailed extends _uniffiBindgenReactNative.UniffiError {
1523
+ class BroadcastFailed_ extends _uniffiBindgenReactNative.UniffiError {
1511
1524
  /**
1512
1525
  * @private
1513
- * This field is private and should not be used.
1526
+ * This field is private and should not be used, use `tag` instead.
1514
1527
  */
1515
1528
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1516
- /**
1517
- * @private
1518
- * This field is private and should not be used.
1519
- */
1520
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 40;
1521
1529
  tag = BdkError_Tags.BroadcastFailed;
1522
- constructor(message) {
1523
- super("BdkError", "BroadcastFailed", message);
1530
+ constructor(inner) {
1531
+ super("BdkError", "BroadcastFailed");
1532
+ this.inner = Object.freeze(inner);
1524
1533
  }
1525
- static instanceOf(e) {
1526
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 40;
1534
+ static new(inner) {
1535
+ return new BroadcastFailed_(inner);
1536
+ }
1537
+ static instanceOf(obj) {
1538
+ return obj.tag === BdkError_Tags.BroadcastFailed;
1539
+ }
1540
+ static hasInner(obj) {
1541
+ return BroadcastFailed_.instanceOf(obj);
1542
+ }
1543
+ static getInner(obj) {
1544
+ return obj.inner;
1527
1545
  }
1528
1546
  }
1529
- class InvalidTransaction extends _uniffiBindgenReactNative.UniffiError {
1547
+ class InvalidTransaction_ extends _uniffiBindgenReactNative.UniffiError {
1530
1548
  /**
1531
1549
  * @private
1532
- * This field is private and should not be used.
1550
+ * This field is private and should not be used, use `tag` instead.
1533
1551
  */
1534
1552
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1535
- /**
1536
- * @private
1537
- * This field is private and should not be used.
1538
- */
1539
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 41;
1540
1553
  tag = BdkError_Tags.InvalidTransaction;
1541
- constructor(message) {
1542
- super("BdkError", "InvalidTransaction", message);
1554
+ constructor(inner) {
1555
+ super("BdkError", "InvalidTransaction");
1556
+ this.inner = Object.freeze(inner);
1557
+ }
1558
+ static new(inner) {
1559
+ return new InvalidTransaction_(inner);
1560
+ }
1561
+ static instanceOf(obj) {
1562
+ return obj.tag === BdkError_Tags.InvalidTransaction;
1563
+ }
1564
+ static hasInner(obj) {
1565
+ return InvalidTransaction_.instanceOf(obj);
1543
1566
  }
1544
- static instanceOf(e) {
1545
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 41;
1567
+ static getInner(obj) {
1568
+ return obj.inner;
1546
1569
  }
1547
1570
  }
1548
- class TransactionNotFound extends _uniffiBindgenReactNative.UniffiError {
1571
+ class TransactionNotFound_ extends _uniffiBindgenReactNative.UniffiError {
1549
1572
  /**
1550
1573
  * @private
1551
- * This field is private and should not be used.
1574
+ * This field is private and should not be used, use `tag` instead.
1552
1575
  */
1553
1576
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1554
- /**
1555
- * @private
1556
- * This field is private and should not be used.
1557
- */
1558
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 42;
1559
1577
  tag = BdkError_Tags.TransactionNotFound;
1560
- constructor(message) {
1561
- super("BdkError", "TransactionNotFound", message);
1578
+ constructor(inner) {
1579
+ super("BdkError", "TransactionNotFound");
1580
+ this.inner = Object.freeze(inner);
1581
+ }
1582
+ static new(inner) {
1583
+ return new TransactionNotFound_(inner);
1562
1584
  }
1563
- static instanceOf(e) {
1564
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 42;
1585
+ static instanceOf(obj) {
1586
+ return obj.tag === BdkError_Tags.TransactionNotFound;
1587
+ }
1588
+ static hasInner(obj) {
1589
+ return TransactionNotFound_.instanceOf(obj);
1590
+ }
1591
+ static getInner(obj) {
1592
+ return obj.inner;
1565
1593
  }
1566
1594
  }
1567
- class CannotConnect extends _uniffiBindgenReactNative.UniffiError {
1595
+ class CannotConnect_ extends _uniffiBindgenReactNative.UniffiError {
1568
1596
  /**
1569
1597
  * @private
1570
- * This field is private and should not be used.
1598
+ * This field is private and should not be used, use `tag` instead.
1571
1599
  */
1572
1600
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1573
- /**
1574
- * @private
1575
- * This field is private and should not be used.
1576
- */
1577
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 43;
1578
1601
  tag = BdkError_Tags.CannotConnect;
1579
- constructor(message) {
1580
- super("BdkError", "CannotConnect", message);
1602
+ constructor(inner) {
1603
+ super("BdkError", "CannotConnect");
1604
+ this.inner = Object.freeze(inner);
1605
+ }
1606
+ static new(inner) {
1607
+ return new CannotConnect_(inner);
1608
+ }
1609
+ static instanceOf(obj) {
1610
+ return obj.tag === BdkError_Tags.CannotConnect;
1611
+ }
1612
+ static hasInner(obj) {
1613
+ return CannotConnect_.instanceOf(obj);
1581
1614
  }
1582
- static instanceOf(e) {
1583
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 43;
1615
+ static getInner(obj) {
1616
+ return obj.inner;
1584
1617
  }
1585
1618
  }
1586
- class CalculateFeeError extends _uniffiBindgenReactNative.UniffiError {
1619
+ class CalculateFeeError_ extends _uniffiBindgenReactNative.UniffiError {
1587
1620
  /**
1588
1621
  * @private
1589
- * This field is private and should not be used.
1622
+ * This field is private and should not be used, use `tag` instead.
1590
1623
  */
1591
1624
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1592
- /**
1593
- * @private
1594
- * This field is private and should not be used.
1595
- */
1596
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 44;
1597
1625
  tag = BdkError_Tags.CalculateFeeError;
1598
- constructor(message) {
1599
- super("BdkError", "CalculateFeeError", message);
1626
+ constructor(inner) {
1627
+ super("BdkError", "CalculateFeeError");
1628
+ this.inner = Object.freeze(inner);
1629
+ }
1630
+ static new(inner) {
1631
+ return new CalculateFeeError_(inner);
1632
+ }
1633
+ static instanceOf(obj) {
1634
+ return obj.tag === BdkError_Tags.CalculateFeeError;
1600
1635
  }
1601
- static instanceOf(e) {
1602
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 44;
1636
+ static hasInner(obj) {
1637
+ return CalculateFeeError_.instanceOf(obj);
1638
+ }
1639
+ static getInner(obj) {
1640
+ return obj.inner;
1603
1641
  }
1604
1642
  }
1605
- class InvalidMnemonic extends _uniffiBindgenReactNative.UniffiError {
1643
+ class InvalidMnemonic_ extends _uniffiBindgenReactNative.UniffiError {
1606
1644
  /**
1607
1645
  * @private
1608
- * This field is private and should not be used.
1646
+ * This field is private and should not be used, use `tag` instead.
1609
1647
  */
1610
1648
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1611
- /**
1612
- * @private
1613
- * This field is private and should not be used.
1614
- */
1615
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 45;
1616
1649
  tag = BdkError_Tags.InvalidMnemonic;
1617
- constructor(message) {
1618
- super("BdkError", "InvalidMnemonic", message);
1650
+ constructor(inner) {
1651
+ super("BdkError", "InvalidMnemonic");
1652
+ this.inner = Object.freeze(inner);
1653
+ }
1654
+ static new(inner) {
1655
+ return new InvalidMnemonic_(inner);
1656
+ }
1657
+ static instanceOf(obj) {
1658
+ return obj.tag === BdkError_Tags.InvalidMnemonic;
1659
+ }
1660
+ static hasInner(obj) {
1661
+ return InvalidMnemonic_.instanceOf(obj);
1619
1662
  }
1620
- static instanceOf(e) {
1621
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 45;
1663
+ static getInner(obj) {
1664
+ return obj.inner;
1622
1665
  }
1623
1666
  }
1624
- class InvalidEntropy extends _uniffiBindgenReactNative.UniffiError {
1667
+ class InvalidEntropy_ extends _uniffiBindgenReactNative.UniffiError {
1625
1668
  /**
1626
1669
  * @private
1627
- * This field is private and should not be used.
1670
+ * This field is private and should not be used, use `tag` instead.
1628
1671
  */
1629
1672
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1630
- /**
1631
- * @private
1632
- * This field is private and should not be used.
1633
- */
1634
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 46;
1635
1673
  tag = BdkError_Tags.InvalidEntropy;
1636
- constructor(message) {
1637
- super("BdkError", "InvalidEntropy", message);
1674
+ constructor(inner) {
1675
+ super("BdkError", "InvalidEntropy");
1676
+ this.inner = Object.freeze(inner);
1677
+ }
1678
+ static new(inner) {
1679
+ return new InvalidEntropy_(inner);
1638
1680
  }
1639
- static instanceOf(e) {
1640
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 46;
1681
+ static instanceOf(obj) {
1682
+ return obj.tag === BdkError_Tags.InvalidEntropy;
1683
+ }
1684
+ static hasInner(obj) {
1685
+ return InvalidEntropy_.instanceOf(obj);
1686
+ }
1687
+ static getInner(obj) {
1688
+ return obj.inner;
1641
1689
  }
1642
1690
  }
1643
- class KeyError extends _uniffiBindgenReactNative.UniffiError {
1691
+ class KeyError_ extends _uniffiBindgenReactNative.UniffiError {
1644
1692
  /**
1645
1693
  * @private
1646
- * This field is private and should not be used.
1694
+ * This field is private and should not be used, use `tag` instead.
1647
1695
  */
1648
1696
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1649
- /**
1650
- * @private
1651
- * This field is private and should not be used.
1652
- */
1653
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 47;
1654
1697
  tag = BdkError_Tags.KeyError;
1655
- constructor(message) {
1656
- super("BdkError", "KeyError", message);
1698
+ constructor(inner) {
1699
+ super("BdkError", "KeyError");
1700
+ this.inner = Object.freeze(inner);
1701
+ }
1702
+ static new(inner) {
1703
+ return new KeyError_(inner);
1704
+ }
1705
+ static instanceOf(obj) {
1706
+ return obj.tag === BdkError_Tags.KeyError;
1707
+ }
1708
+ static hasInner(obj) {
1709
+ return KeyError_.instanceOf(obj);
1657
1710
  }
1658
- static instanceOf(e) {
1659
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 47;
1711
+ static getInner(obj) {
1712
+ return obj.inner;
1660
1713
  }
1661
1714
  }
1662
- class Generic extends _uniffiBindgenReactNative.UniffiError {
1715
+ class Generic_ extends _uniffiBindgenReactNative.UniffiError {
1663
1716
  /**
1664
1717
  * @private
1665
- * This field is private and should not be used.
1718
+ * This field is private and should not be used, use `tag` instead.
1666
1719
  */
1667
1720
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
1668
- /**
1669
- * @private
1670
- * This field is private and should not be used.
1671
- */
1672
- [_uniffiBindgenReactNative.variantOrdinalSymbol] = 48;
1673
1721
  tag = BdkError_Tags.Generic;
1674
- constructor(message) {
1675
- super("BdkError", "Generic", message);
1722
+ constructor(inner) {
1723
+ super("BdkError", "Generic");
1724
+ this.inner = Object.freeze(inner);
1676
1725
  }
1677
- static instanceOf(e) {
1678
- return instanceOf(e) && e[_uniffiBindgenReactNative.variantOrdinalSymbol] === 48;
1726
+ static new(inner) {
1727
+ return new Generic_(inner);
1728
+ }
1729
+ static instanceOf(obj) {
1730
+ return obj.tag === BdkError_Tags.Generic;
1731
+ }
1732
+ static hasInner(obj) {
1733
+ return Generic_.instanceOf(obj);
1734
+ }
1735
+ static getInner(obj) {
1736
+ return obj.inner;
1679
1737
  }
1680
1738
  }
1681
-
1682
- // Utility function which does not rely on instanceof.
1683
- function instanceOf(e) {
1684
- return e[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "BdkError";
1739
+ function instanceOf(obj) {
1740
+ return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "BdkError";
1685
1741
  }
1686
- return {
1687
- InvalidDescriptor,
1688
- WalletCreationFailed,
1689
- WalletLoadFailed,
1690
- WalletLoadMismatch,
1691
- PersistError,
1692
- InvalidAddress,
1693
- InvalidScript,
1694
- TransactionBuildFailed,
1695
- NoRecipients,
1696
- NoUtxosSelected,
1697
- OutputBelowDustLimit,
1698
- InsufficientFunds,
1699
- FeeRateTooLow,
1700
- FeeTooLow,
1701
- LockTimeConflict,
1702
- RbfSequenceConflict,
1703
- VersionZero,
1704
- VersionOneCsv,
1705
- SpendingPolicyRequired,
1706
- MissingKeyOrigin,
1707
- MissingNonWitnessUtxo,
1708
- OutpointNotFound,
1709
- FeeBumpTargetNotFound,
1710
- FeeBumpAlreadyConfirmed,
1711
- FeeBumpIrreplaceable,
1712
- FeeBumpFeeRateUnavailable,
1713
- FeeBumpInvalidOutputIndex,
1714
- InvalidPsbt,
1715
- SignFailed,
1716
- SignerMissingKey,
1717
- SignerInvalidKey,
1718
- SignerUserCanceled,
1719
- SignerInputIndexOutOfRange,
1720
- SignerMissingNonWitnessUtxo,
1721
- SignerMissingWitnessUtxo,
1722
- SignerMissingWitnessScript,
1723
- SignerNonStandardSighash,
1724
- SignerInvalidSighash,
1725
- SyncFailed,
1726
- BroadcastFailed,
1727
- InvalidTransaction,
1728
- TransactionNotFound,
1729
- CannotConnect,
1730
- CalculateFeeError,
1731
- InvalidMnemonic,
1732
- InvalidEntropy,
1733
- KeyError,
1734
- Generic,
1735
- instanceOf
1736
- };
1742
+ return Object.freeze({
1743
+ instanceOf,
1744
+ InvalidDescriptor: InvalidDescriptor_,
1745
+ WalletCreationFailed: WalletCreationFailed_,
1746
+ WalletLoadFailed: WalletLoadFailed_,
1747
+ WalletLoadMismatch: WalletLoadMismatch_,
1748
+ PersistError: PersistError_,
1749
+ InvalidAddress: InvalidAddress_,
1750
+ InvalidScript: InvalidScript_,
1751
+ TransactionBuildFailed: TransactionBuildFailed_,
1752
+ NoRecipients: NoRecipients_,
1753
+ NoUtxosSelected: NoUtxosSelected_,
1754
+ OutputBelowDustLimit: OutputBelowDustLimit_,
1755
+ InsufficientFunds: InsufficientFunds_,
1756
+ FeeRateTooLow: FeeRateTooLow_,
1757
+ FeeTooLow: FeeTooLow_,
1758
+ LockTimeConflict: LockTimeConflict_,
1759
+ RbfSequenceConflict: RbfSequenceConflict_,
1760
+ VersionZero: VersionZero_,
1761
+ VersionOneCsv: VersionOneCsv_,
1762
+ SpendingPolicyRequired: SpendingPolicyRequired_,
1763
+ MissingKeyOrigin: MissingKeyOrigin_,
1764
+ MissingNonWitnessUtxo: MissingNonWitnessUtxo_,
1765
+ OutpointNotFound: OutpointNotFound_,
1766
+ FeeBumpTargetNotFound: FeeBumpTargetNotFound_,
1767
+ FeeBumpAlreadyConfirmed: FeeBumpAlreadyConfirmed_,
1768
+ FeeBumpIrreplaceable: FeeBumpIrreplaceable_,
1769
+ FeeBumpFeeRateUnavailable: FeeBumpFeeRateUnavailable_,
1770
+ FeeBumpInvalidOutputIndex: FeeBumpInvalidOutputIndex_,
1771
+ InvalidPsbt: InvalidPsbt_,
1772
+ SignFailed: SignFailed_,
1773
+ SignerMissingKey: SignerMissingKey_,
1774
+ SignerInvalidKey: SignerInvalidKey_,
1775
+ SignerUserCanceled: SignerUserCanceled_,
1776
+ SignerInputIndexOutOfRange: SignerInputIndexOutOfRange_,
1777
+ SignerMissingNonWitnessUtxo: SignerMissingNonWitnessUtxo_,
1778
+ SignerMissingWitnessUtxo: SignerMissingWitnessUtxo_,
1779
+ SignerMissingWitnessScript: SignerMissingWitnessScript_,
1780
+ SignerNonStandardSighash: SignerNonStandardSighash_,
1781
+ SignerInvalidSighash: SignerInvalidSighash_,
1782
+ SyncFailed: SyncFailed_,
1783
+ BroadcastFailed: BroadcastFailed_,
1784
+ InvalidTransaction: InvalidTransaction_,
1785
+ TransactionNotFound: TransactionNotFound_,
1786
+ CannotConnect: CannotConnect_,
1787
+ CalculateFeeError: CalculateFeeError_,
1788
+ InvalidMnemonic: InvalidMnemonic_,
1789
+ InvalidEntropy: InvalidEntropy_,
1790
+ KeyError: KeyError_,
1791
+ Generic: Generic_
1792
+ });
1737
1793
  })();
1738
-
1739
- // Union type for BdkError error type.
1740
-
1794
+ // FfiConverter for enum BdkError
1741
1795
  const FfiConverterTypeBdkError = (() => {
1742
- const intConverter = _uniffiBindgenReactNative.FfiConverterInt32;
1743
- class FfiConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
1796
+ const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
1797
+ class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
1744
1798
  read(from) {
1745
- switch (intConverter.read(from)) {
1799
+ switch (ordinalConverter.read(from)) {
1746
1800
  case 1:
1747
- return new BdkError.InvalidDescriptor(FfiConverterString.read(from));
1801
+ return new BdkError.InvalidDescriptor({
1802
+ message: FfiConverterString.read(from)
1803
+ });
1748
1804
  case 2:
1749
- return new BdkError.WalletCreationFailed(FfiConverterString.read(from));
1805
+ return new BdkError.WalletCreationFailed({
1806
+ message: FfiConverterString.read(from)
1807
+ });
1750
1808
  case 3:
1751
- return new BdkError.WalletLoadFailed(FfiConverterString.read(from));
1809
+ return new BdkError.WalletLoadFailed({
1810
+ message: FfiConverterString.read(from)
1811
+ });
1752
1812
  case 4:
1753
- return new BdkError.WalletLoadMismatch(FfiConverterString.read(from));
1813
+ return new BdkError.WalletLoadMismatch({
1814
+ message: FfiConverterString.read(from)
1815
+ });
1754
1816
  case 5:
1755
- return new BdkError.PersistError(FfiConverterString.read(from));
1817
+ return new BdkError.PersistError({
1818
+ message: FfiConverterString.read(from)
1819
+ });
1756
1820
  case 6:
1757
- return new BdkError.InvalidAddress(FfiConverterString.read(from));
1821
+ return new BdkError.InvalidAddress({
1822
+ message: FfiConverterString.read(from)
1823
+ });
1758
1824
  case 7:
1759
- return new BdkError.InvalidScript(FfiConverterString.read(from));
1825
+ return new BdkError.InvalidScript({
1826
+ message: FfiConverterString.read(from)
1827
+ });
1760
1828
  case 8:
1761
- return new BdkError.TransactionBuildFailed(FfiConverterString.read(from));
1829
+ return new BdkError.TransactionBuildFailed({
1830
+ message: FfiConverterString.read(from)
1831
+ });
1762
1832
  case 9:
1763
- return new BdkError.NoRecipients(FfiConverterString.read(from));
1833
+ return new BdkError.NoRecipients({
1834
+ message: FfiConverterString.read(from)
1835
+ });
1764
1836
  case 10:
1765
- return new BdkError.NoUtxosSelected(FfiConverterString.read(from));
1837
+ return new BdkError.NoUtxosSelected({
1838
+ message: FfiConverterString.read(from)
1839
+ });
1766
1840
  case 11:
1767
- return new BdkError.OutputBelowDustLimit(FfiConverterString.read(from));
1841
+ return new BdkError.OutputBelowDustLimit({
1842
+ message: FfiConverterString.read(from)
1843
+ });
1768
1844
  case 12:
1769
- return new BdkError.InsufficientFunds(FfiConverterString.read(from));
1845
+ return new BdkError.InsufficientFunds({
1846
+ message: FfiConverterString.read(from)
1847
+ });
1770
1848
  case 13:
1771
- return new BdkError.FeeRateTooLow(FfiConverterString.read(from));
1849
+ return new BdkError.FeeRateTooLow({
1850
+ message: FfiConverterString.read(from)
1851
+ });
1772
1852
  case 14:
1773
- return new BdkError.FeeTooLow(FfiConverterString.read(from));
1853
+ return new BdkError.FeeTooLow({
1854
+ message: FfiConverterString.read(from)
1855
+ });
1774
1856
  case 15:
1775
- return new BdkError.LockTimeConflict(FfiConverterString.read(from));
1857
+ return new BdkError.LockTimeConflict({
1858
+ message: FfiConverterString.read(from)
1859
+ });
1776
1860
  case 16:
1777
- return new BdkError.RbfSequenceConflict(FfiConverterString.read(from));
1861
+ return new BdkError.RbfSequenceConflict({
1862
+ message: FfiConverterString.read(from)
1863
+ });
1778
1864
  case 17:
1779
- return new BdkError.VersionZero(FfiConverterString.read(from));
1865
+ return new BdkError.VersionZero({
1866
+ message: FfiConverterString.read(from)
1867
+ });
1780
1868
  case 18:
1781
- return new BdkError.VersionOneCsv(FfiConverterString.read(from));
1869
+ return new BdkError.VersionOneCsv({
1870
+ message: FfiConverterString.read(from)
1871
+ });
1782
1872
  case 19:
1783
- return new BdkError.SpendingPolicyRequired(FfiConverterString.read(from));
1873
+ return new BdkError.SpendingPolicyRequired({
1874
+ message: FfiConverterString.read(from)
1875
+ });
1784
1876
  case 20:
1785
- return new BdkError.MissingKeyOrigin(FfiConverterString.read(from));
1877
+ return new BdkError.MissingKeyOrigin({
1878
+ message: FfiConverterString.read(from)
1879
+ });
1786
1880
  case 21:
1787
- return new BdkError.MissingNonWitnessUtxo(FfiConverterString.read(from));
1881
+ return new BdkError.MissingNonWitnessUtxo({
1882
+ message: FfiConverterString.read(from)
1883
+ });
1788
1884
  case 22:
1789
- return new BdkError.OutpointNotFound(FfiConverterString.read(from));
1885
+ return new BdkError.OutpointNotFound({
1886
+ message: FfiConverterString.read(from)
1887
+ });
1790
1888
  case 23:
1791
- return new BdkError.FeeBumpTargetNotFound(FfiConverterString.read(from));
1889
+ return new BdkError.FeeBumpTargetNotFound({
1890
+ message: FfiConverterString.read(from)
1891
+ });
1792
1892
  case 24:
1793
- return new BdkError.FeeBumpAlreadyConfirmed(FfiConverterString.read(from));
1893
+ return new BdkError.FeeBumpAlreadyConfirmed({
1894
+ message: FfiConverterString.read(from)
1895
+ });
1794
1896
  case 25:
1795
- return new BdkError.FeeBumpIrreplaceable(FfiConverterString.read(from));
1897
+ return new BdkError.FeeBumpIrreplaceable({
1898
+ message: FfiConverterString.read(from)
1899
+ });
1796
1900
  case 26:
1797
- return new BdkError.FeeBumpFeeRateUnavailable(FfiConverterString.read(from));
1901
+ return new BdkError.FeeBumpFeeRateUnavailable({
1902
+ message: FfiConverterString.read(from)
1903
+ });
1798
1904
  case 27:
1799
- return new BdkError.FeeBumpInvalidOutputIndex(FfiConverterString.read(from));
1905
+ return new BdkError.FeeBumpInvalidOutputIndex({
1906
+ message: FfiConverterString.read(from)
1907
+ });
1800
1908
  case 28:
1801
- return new BdkError.InvalidPsbt(FfiConverterString.read(from));
1909
+ return new BdkError.InvalidPsbt({
1910
+ message: FfiConverterString.read(from)
1911
+ });
1802
1912
  case 29:
1803
- return new BdkError.SignFailed(FfiConverterString.read(from));
1913
+ return new BdkError.SignFailed({
1914
+ message: FfiConverterString.read(from)
1915
+ });
1804
1916
  case 30:
1805
- return new BdkError.SignerMissingKey(FfiConverterString.read(from));
1917
+ return new BdkError.SignerMissingKey({
1918
+ message: FfiConverterString.read(from)
1919
+ });
1806
1920
  case 31:
1807
- return new BdkError.SignerInvalidKey(FfiConverterString.read(from));
1921
+ return new BdkError.SignerInvalidKey({
1922
+ message: FfiConverterString.read(from)
1923
+ });
1808
1924
  case 32:
1809
- return new BdkError.SignerUserCanceled(FfiConverterString.read(from));
1925
+ return new BdkError.SignerUserCanceled({
1926
+ message: FfiConverterString.read(from)
1927
+ });
1810
1928
  case 33:
1811
- return new BdkError.SignerInputIndexOutOfRange(FfiConverterString.read(from));
1929
+ return new BdkError.SignerInputIndexOutOfRange({
1930
+ message: FfiConverterString.read(from)
1931
+ });
1812
1932
  case 34:
1813
- return new BdkError.SignerMissingNonWitnessUtxo(FfiConverterString.read(from));
1933
+ return new BdkError.SignerMissingNonWitnessUtxo({
1934
+ message: FfiConverterString.read(from)
1935
+ });
1814
1936
  case 35:
1815
- return new BdkError.SignerMissingWitnessUtxo(FfiConverterString.read(from));
1937
+ return new BdkError.SignerMissingWitnessUtxo({
1938
+ message: FfiConverterString.read(from)
1939
+ });
1816
1940
  case 36:
1817
- return new BdkError.SignerMissingWitnessScript(FfiConverterString.read(from));
1941
+ return new BdkError.SignerMissingWitnessScript({
1942
+ message: FfiConverterString.read(from)
1943
+ });
1818
1944
  case 37:
1819
- return new BdkError.SignerNonStandardSighash(FfiConverterString.read(from));
1945
+ return new BdkError.SignerNonStandardSighash({
1946
+ message: FfiConverterString.read(from)
1947
+ });
1820
1948
  case 38:
1821
- return new BdkError.SignerInvalidSighash(FfiConverterString.read(from));
1949
+ return new BdkError.SignerInvalidSighash({
1950
+ message: FfiConverterString.read(from)
1951
+ });
1822
1952
  case 39:
1823
- return new BdkError.SyncFailed(FfiConverterString.read(from));
1953
+ return new BdkError.SyncFailed({
1954
+ message: FfiConverterString.read(from)
1955
+ });
1824
1956
  case 40:
1825
- return new BdkError.BroadcastFailed(FfiConverterString.read(from));
1957
+ return new BdkError.BroadcastFailed({
1958
+ message: FfiConverterString.read(from)
1959
+ });
1826
1960
  case 41:
1827
- return new BdkError.InvalidTransaction(FfiConverterString.read(from));
1961
+ return new BdkError.InvalidTransaction({
1962
+ message: FfiConverterString.read(from)
1963
+ });
1828
1964
  case 42:
1829
- return new BdkError.TransactionNotFound(FfiConverterString.read(from));
1965
+ return new BdkError.TransactionNotFound({
1966
+ message: FfiConverterString.read(from)
1967
+ });
1830
1968
  case 43:
1831
- return new BdkError.CannotConnect(FfiConverterString.read(from));
1969
+ return new BdkError.CannotConnect({
1970
+ message: FfiConverterString.read(from)
1971
+ });
1832
1972
  case 44:
1833
- return new BdkError.CalculateFeeError(FfiConverterString.read(from));
1973
+ return new BdkError.CalculateFeeError({
1974
+ message: FfiConverterString.read(from)
1975
+ });
1834
1976
  case 45:
1835
- return new BdkError.InvalidMnemonic(FfiConverterString.read(from));
1977
+ return new BdkError.InvalidMnemonic({
1978
+ message: FfiConverterString.read(from)
1979
+ });
1836
1980
  case 46:
1837
- return new BdkError.InvalidEntropy(FfiConverterString.read(from));
1981
+ return new BdkError.InvalidEntropy({
1982
+ message: FfiConverterString.read(from)
1983
+ });
1838
1984
  case 47:
1839
- return new BdkError.KeyError(FfiConverterString.read(from));
1985
+ return new BdkError.KeyError({
1986
+ message: FfiConverterString.read(from)
1987
+ });
1840
1988
  case 48:
1841
- return new BdkError.Generic(FfiConverterString.read(from));
1989
+ return new BdkError.Generic({
1990
+ message: FfiConverterString.read(from)
1991
+ });
1992
+ default:
1993
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
1994
+ }
1995
+ }
1996
+ write(value, into) {
1997
+ switch (value.tag) {
1998
+ case BdkError_Tags.InvalidDescriptor:
1999
+ {
2000
+ ordinalConverter.write(1, into);
2001
+ const inner = value.inner;
2002
+ FfiConverterString.write(inner.message, into);
2003
+ return;
2004
+ }
2005
+ case BdkError_Tags.WalletCreationFailed:
2006
+ {
2007
+ ordinalConverter.write(2, into);
2008
+ const inner = value.inner;
2009
+ FfiConverterString.write(inner.message, into);
2010
+ return;
2011
+ }
2012
+ case BdkError_Tags.WalletLoadFailed:
2013
+ {
2014
+ ordinalConverter.write(3, into);
2015
+ const inner = value.inner;
2016
+ FfiConverterString.write(inner.message, into);
2017
+ return;
2018
+ }
2019
+ case BdkError_Tags.WalletLoadMismatch:
2020
+ {
2021
+ ordinalConverter.write(4, into);
2022
+ const inner = value.inner;
2023
+ FfiConverterString.write(inner.message, into);
2024
+ return;
2025
+ }
2026
+ case BdkError_Tags.PersistError:
2027
+ {
2028
+ ordinalConverter.write(5, into);
2029
+ const inner = value.inner;
2030
+ FfiConverterString.write(inner.message, into);
2031
+ return;
2032
+ }
2033
+ case BdkError_Tags.InvalidAddress:
2034
+ {
2035
+ ordinalConverter.write(6, into);
2036
+ const inner = value.inner;
2037
+ FfiConverterString.write(inner.message, into);
2038
+ return;
2039
+ }
2040
+ case BdkError_Tags.InvalidScript:
2041
+ {
2042
+ ordinalConverter.write(7, into);
2043
+ const inner = value.inner;
2044
+ FfiConverterString.write(inner.message, into);
2045
+ return;
2046
+ }
2047
+ case BdkError_Tags.TransactionBuildFailed:
2048
+ {
2049
+ ordinalConverter.write(8, into);
2050
+ const inner = value.inner;
2051
+ FfiConverterString.write(inner.message, into);
2052
+ return;
2053
+ }
2054
+ case BdkError_Tags.NoRecipients:
2055
+ {
2056
+ ordinalConverter.write(9, into);
2057
+ const inner = value.inner;
2058
+ FfiConverterString.write(inner.message, into);
2059
+ return;
2060
+ }
2061
+ case BdkError_Tags.NoUtxosSelected:
2062
+ {
2063
+ ordinalConverter.write(10, into);
2064
+ const inner = value.inner;
2065
+ FfiConverterString.write(inner.message, into);
2066
+ return;
2067
+ }
2068
+ case BdkError_Tags.OutputBelowDustLimit:
2069
+ {
2070
+ ordinalConverter.write(11, into);
2071
+ const inner = value.inner;
2072
+ FfiConverterString.write(inner.message, into);
2073
+ return;
2074
+ }
2075
+ case BdkError_Tags.InsufficientFunds:
2076
+ {
2077
+ ordinalConverter.write(12, into);
2078
+ const inner = value.inner;
2079
+ FfiConverterString.write(inner.message, into);
2080
+ return;
2081
+ }
2082
+ case BdkError_Tags.FeeRateTooLow:
2083
+ {
2084
+ ordinalConverter.write(13, into);
2085
+ const inner = value.inner;
2086
+ FfiConverterString.write(inner.message, into);
2087
+ return;
2088
+ }
2089
+ case BdkError_Tags.FeeTooLow:
2090
+ {
2091
+ ordinalConverter.write(14, into);
2092
+ const inner = value.inner;
2093
+ FfiConverterString.write(inner.message, into);
2094
+ return;
2095
+ }
2096
+ case BdkError_Tags.LockTimeConflict:
2097
+ {
2098
+ ordinalConverter.write(15, into);
2099
+ const inner = value.inner;
2100
+ FfiConverterString.write(inner.message, into);
2101
+ return;
2102
+ }
2103
+ case BdkError_Tags.RbfSequenceConflict:
2104
+ {
2105
+ ordinalConverter.write(16, into);
2106
+ const inner = value.inner;
2107
+ FfiConverterString.write(inner.message, into);
2108
+ return;
2109
+ }
2110
+ case BdkError_Tags.VersionZero:
2111
+ {
2112
+ ordinalConverter.write(17, into);
2113
+ const inner = value.inner;
2114
+ FfiConverterString.write(inner.message, into);
2115
+ return;
2116
+ }
2117
+ case BdkError_Tags.VersionOneCsv:
2118
+ {
2119
+ ordinalConverter.write(18, into);
2120
+ const inner = value.inner;
2121
+ FfiConverterString.write(inner.message, into);
2122
+ return;
2123
+ }
2124
+ case BdkError_Tags.SpendingPolicyRequired:
2125
+ {
2126
+ ordinalConverter.write(19, into);
2127
+ const inner = value.inner;
2128
+ FfiConverterString.write(inner.message, into);
2129
+ return;
2130
+ }
2131
+ case BdkError_Tags.MissingKeyOrigin:
2132
+ {
2133
+ ordinalConverter.write(20, into);
2134
+ const inner = value.inner;
2135
+ FfiConverterString.write(inner.message, into);
2136
+ return;
2137
+ }
2138
+ case BdkError_Tags.MissingNonWitnessUtxo:
2139
+ {
2140
+ ordinalConverter.write(21, into);
2141
+ const inner = value.inner;
2142
+ FfiConverterString.write(inner.message, into);
2143
+ return;
2144
+ }
2145
+ case BdkError_Tags.OutpointNotFound:
2146
+ {
2147
+ ordinalConverter.write(22, into);
2148
+ const inner = value.inner;
2149
+ FfiConverterString.write(inner.message, into);
2150
+ return;
2151
+ }
2152
+ case BdkError_Tags.FeeBumpTargetNotFound:
2153
+ {
2154
+ ordinalConverter.write(23, into);
2155
+ const inner = value.inner;
2156
+ FfiConverterString.write(inner.message, into);
2157
+ return;
2158
+ }
2159
+ case BdkError_Tags.FeeBumpAlreadyConfirmed:
2160
+ {
2161
+ ordinalConverter.write(24, into);
2162
+ const inner = value.inner;
2163
+ FfiConverterString.write(inner.message, into);
2164
+ return;
2165
+ }
2166
+ case BdkError_Tags.FeeBumpIrreplaceable:
2167
+ {
2168
+ ordinalConverter.write(25, into);
2169
+ const inner = value.inner;
2170
+ FfiConverterString.write(inner.message, into);
2171
+ return;
2172
+ }
2173
+ case BdkError_Tags.FeeBumpFeeRateUnavailable:
2174
+ {
2175
+ ordinalConverter.write(26, into);
2176
+ const inner = value.inner;
2177
+ FfiConverterString.write(inner.message, into);
2178
+ return;
2179
+ }
2180
+ case BdkError_Tags.FeeBumpInvalidOutputIndex:
2181
+ {
2182
+ ordinalConverter.write(27, into);
2183
+ const inner = value.inner;
2184
+ FfiConverterString.write(inner.message, into);
2185
+ return;
2186
+ }
2187
+ case BdkError_Tags.InvalidPsbt:
2188
+ {
2189
+ ordinalConverter.write(28, into);
2190
+ const inner = value.inner;
2191
+ FfiConverterString.write(inner.message, into);
2192
+ return;
2193
+ }
2194
+ case BdkError_Tags.SignFailed:
2195
+ {
2196
+ ordinalConverter.write(29, into);
2197
+ const inner = value.inner;
2198
+ FfiConverterString.write(inner.message, into);
2199
+ return;
2200
+ }
2201
+ case BdkError_Tags.SignerMissingKey:
2202
+ {
2203
+ ordinalConverter.write(30, into);
2204
+ const inner = value.inner;
2205
+ FfiConverterString.write(inner.message, into);
2206
+ return;
2207
+ }
2208
+ case BdkError_Tags.SignerInvalidKey:
2209
+ {
2210
+ ordinalConverter.write(31, into);
2211
+ const inner = value.inner;
2212
+ FfiConverterString.write(inner.message, into);
2213
+ return;
2214
+ }
2215
+ case BdkError_Tags.SignerUserCanceled:
2216
+ {
2217
+ ordinalConverter.write(32, into);
2218
+ const inner = value.inner;
2219
+ FfiConverterString.write(inner.message, into);
2220
+ return;
2221
+ }
2222
+ case BdkError_Tags.SignerInputIndexOutOfRange:
2223
+ {
2224
+ ordinalConverter.write(33, into);
2225
+ const inner = value.inner;
2226
+ FfiConverterString.write(inner.message, into);
2227
+ return;
2228
+ }
2229
+ case BdkError_Tags.SignerMissingNonWitnessUtxo:
2230
+ {
2231
+ ordinalConverter.write(34, into);
2232
+ const inner = value.inner;
2233
+ FfiConverterString.write(inner.message, into);
2234
+ return;
2235
+ }
2236
+ case BdkError_Tags.SignerMissingWitnessUtxo:
2237
+ {
2238
+ ordinalConverter.write(35, into);
2239
+ const inner = value.inner;
2240
+ FfiConverterString.write(inner.message, into);
2241
+ return;
2242
+ }
2243
+ case BdkError_Tags.SignerMissingWitnessScript:
2244
+ {
2245
+ ordinalConverter.write(36, into);
2246
+ const inner = value.inner;
2247
+ FfiConverterString.write(inner.message, into);
2248
+ return;
2249
+ }
2250
+ case BdkError_Tags.SignerNonStandardSighash:
2251
+ {
2252
+ ordinalConverter.write(37, into);
2253
+ const inner = value.inner;
2254
+ FfiConverterString.write(inner.message, into);
2255
+ return;
2256
+ }
2257
+ case BdkError_Tags.SignerInvalidSighash:
2258
+ {
2259
+ ordinalConverter.write(38, into);
2260
+ const inner = value.inner;
2261
+ FfiConverterString.write(inner.message, into);
2262
+ return;
2263
+ }
2264
+ case BdkError_Tags.SyncFailed:
2265
+ {
2266
+ ordinalConverter.write(39, into);
2267
+ const inner = value.inner;
2268
+ FfiConverterString.write(inner.message, into);
2269
+ return;
2270
+ }
2271
+ case BdkError_Tags.BroadcastFailed:
2272
+ {
2273
+ ordinalConverter.write(40, into);
2274
+ const inner = value.inner;
2275
+ FfiConverterString.write(inner.message, into);
2276
+ return;
2277
+ }
2278
+ case BdkError_Tags.InvalidTransaction:
2279
+ {
2280
+ ordinalConverter.write(41, into);
2281
+ const inner = value.inner;
2282
+ FfiConverterString.write(inner.message, into);
2283
+ return;
2284
+ }
2285
+ case BdkError_Tags.TransactionNotFound:
2286
+ {
2287
+ ordinalConverter.write(42, into);
2288
+ const inner = value.inner;
2289
+ FfiConverterString.write(inner.message, into);
2290
+ return;
2291
+ }
2292
+ case BdkError_Tags.CannotConnect:
2293
+ {
2294
+ ordinalConverter.write(43, into);
2295
+ const inner = value.inner;
2296
+ FfiConverterString.write(inner.message, into);
2297
+ return;
2298
+ }
2299
+ case BdkError_Tags.CalculateFeeError:
2300
+ {
2301
+ ordinalConverter.write(44, into);
2302
+ const inner = value.inner;
2303
+ FfiConverterString.write(inner.message, into);
2304
+ return;
2305
+ }
2306
+ case BdkError_Tags.InvalidMnemonic:
2307
+ {
2308
+ ordinalConverter.write(45, into);
2309
+ const inner = value.inner;
2310
+ FfiConverterString.write(inner.message, into);
2311
+ return;
2312
+ }
2313
+ case BdkError_Tags.InvalidEntropy:
2314
+ {
2315
+ ordinalConverter.write(46, into);
2316
+ const inner = value.inner;
2317
+ FfiConverterString.write(inner.message, into);
2318
+ return;
2319
+ }
2320
+ case BdkError_Tags.KeyError:
2321
+ {
2322
+ ordinalConverter.write(47, into);
2323
+ const inner = value.inner;
2324
+ FfiConverterString.write(inner.message, into);
2325
+ return;
2326
+ }
2327
+ case BdkError_Tags.Generic:
2328
+ {
2329
+ ordinalConverter.write(48, into);
2330
+ const inner = value.inner;
2331
+ FfiConverterString.write(inner.message, into);
2332
+ return;
2333
+ }
2334
+ default:
2335
+ // Throwing from here means that BdkError_Tags hasn't matched an ordinal.
2336
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
2337
+ }
2338
+ }
2339
+ allocationSize(value) {
2340
+ switch (value.tag) {
2341
+ case BdkError_Tags.InvalidDescriptor:
2342
+ {
2343
+ const inner = value.inner;
2344
+ let size = ordinalConverter.allocationSize(1);
2345
+ size += FfiConverterString.allocationSize(inner.message);
2346
+ return size;
2347
+ }
2348
+ case BdkError_Tags.WalletCreationFailed:
2349
+ {
2350
+ const inner = value.inner;
2351
+ let size = ordinalConverter.allocationSize(2);
2352
+ size += FfiConverterString.allocationSize(inner.message);
2353
+ return size;
2354
+ }
2355
+ case BdkError_Tags.WalletLoadFailed:
2356
+ {
2357
+ const inner = value.inner;
2358
+ let size = ordinalConverter.allocationSize(3);
2359
+ size += FfiConverterString.allocationSize(inner.message);
2360
+ return size;
2361
+ }
2362
+ case BdkError_Tags.WalletLoadMismatch:
2363
+ {
2364
+ const inner = value.inner;
2365
+ let size = ordinalConverter.allocationSize(4);
2366
+ size += FfiConverterString.allocationSize(inner.message);
2367
+ return size;
2368
+ }
2369
+ case BdkError_Tags.PersistError:
2370
+ {
2371
+ const inner = value.inner;
2372
+ let size = ordinalConverter.allocationSize(5);
2373
+ size += FfiConverterString.allocationSize(inner.message);
2374
+ return size;
2375
+ }
2376
+ case BdkError_Tags.InvalidAddress:
2377
+ {
2378
+ const inner = value.inner;
2379
+ let size = ordinalConverter.allocationSize(6);
2380
+ size += FfiConverterString.allocationSize(inner.message);
2381
+ return size;
2382
+ }
2383
+ case BdkError_Tags.InvalidScript:
2384
+ {
2385
+ const inner = value.inner;
2386
+ let size = ordinalConverter.allocationSize(7);
2387
+ size += FfiConverterString.allocationSize(inner.message);
2388
+ return size;
2389
+ }
2390
+ case BdkError_Tags.TransactionBuildFailed:
2391
+ {
2392
+ const inner = value.inner;
2393
+ let size = ordinalConverter.allocationSize(8);
2394
+ size += FfiConverterString.allocationSize(inner.message);
2395
+ return size;
2396
+ }
2397
+ case BdkError_Tags.NoRecipients:
2398
+ {
2399
+ const inner = value.inner;
2400
+ let size = ordinalConverter.allocationSize(9);
2401
+ size += FfiConverterString.allocationSize(inner.message);
2402
+ return size;
2403
+ }
2404
+ case BdkError_Tags.NoUtxosSelected:
2405
+ {
2406
+ const inner = value.inner;
2407
+ let size = ordinalConverter.allocationSize(10);
2408
+ size += FfiConverterString.allocationSize(inner.message);
2409
+ return size;
2410
+ }
2411
+ case BdkError_Tags.OutputBelowDustLimit:
2412
+ {
2413
+ const inner = value.inner;
2414
+ let size = ordinalConverter.allocationSize(11);
2415
+ size += FfiConverterString.allocationSize(inner.message);
2416
+ return size;
2417
+ }
2418
+ case BdkError_Tags.InsufficientFunds:
2419
+ {
2420
+ const inner = value.inner;
2421
+ let size = ordinalConverter.allocationSize(12);
2422
+ size += FfiConverterString.allocationSize(inner.message);
2423
+ return size;
2424
+ }
2425
+ case BdkError_Tags.FeeRateTooLow:
2426
+ {
2427
+ const inner = value.inner;
2428
+ let size = ordinalConverter.allocationSize(13);
2429
+ size += FfiConverterString.allocationSize(inner.message);
2430
+ return size;
2431
+ }
2432
+ case BdkError_Tags.FeeTooLow:
2433
+ {
2434
+ const inner = value.inner;
2435
+ let size = ordinalConverter.allocationSize(14);
2436
+ size += FfiConverterString.allocationSize(inner.message);
2437
+ return size;
2438
+ }
2439
+ case BdkError_Tags.LockTimeConflict:
2440
+ {
2441
+ const inner = value.inner;
2442
+ let size = ordinalConverter.allocationSize(15);
2443
+ size += FfiConverterString.allocationSize(inner.message);
2444
+ return size;
2445
+ }
2446
+ case BdkError_Tags.RbfSequenceConflict:
2447
+ {
2448
+ const inner = value.inner;
2449
+ let size = ordinalConverter.allocationSize(16);
2450
+ size += FfiConverterString.allocationSize(inner.message);
2451
+ return size;
2452
+ }
2453
+ case BdkError_Tags.VersionZero:
2454
+ {
2455
+ const inner = value.inner;
2456
+ let size = ordinalConverter.allocationSize(17);
2457
+ size += FfiConverterString.allocationSize(inner.message);
2458
+ return size;
2459
+ }
2460
+ case BdkError_Tags.VersionOneCsv:
2461
+ {
2462
+ const inner = value.inner;
2463
+ let size = ordinalConverter.allocationSize(18);
2464
+ size += FfiConverterString.allocationSize(inner.message);
2465
+ return size;
2466
+ }
2467
+ case BdkError_Tags.SpendingPolicyRequired:
2468
+ {
2469
+ const inner = value.inner;
2470
+ let size = ordinalConverter.allocationSize(19);
2471
+ size += FfiConverterString.allocationSize(inner.message);
2472
+ return size;
2473
+ }
2474
+ case BdkError_Tags.MissingKeyOrigin:
2475
+ {
2476
+ const inner = value.inner;
2477
+ let size = ordinalConverter.allocationSize(20);
2478
+ size += FfiConverterString.allocationSize(inner.message);
2479
+ return size;
2480
+ }
2481
+ case BdkError_Tags.MissingNonWitnessUtxo:
2482
+ {
2483
+ const inner = value.inner;
2484
+ let size = ordinalConverter.allocationSize(21);
2485
+ size += FfiConverterString.allocationSize(inner.message);
2486
+ return size;
2487
+ }
2488
+ case BdkError_Tags.OutpointNotFound:
2489
+ {
2490
+ const inner = value.inner;
2491
+ let size = ordinalConverter.allocationSize(22);
2492
+ size += FfiConverterString.allocationSize(inner.message);
2493
+ return size;
2494
+ }
2495
+ case BdkError_Tags.FeeBumpTargetNotFound:
2496
+ {
2497
+ const inner = value.inner;
2498
+ let size = ordinalConverter.allocationSize(23);
2499
+ size += FfiConverterString.allocationSize(inner.message);
2500
+ return size;
2501
+ }
2502
+ case BdkError_Tags.FeeBumpAlreadyConfirmed:
2503
+ {
2504
+ const inner = value.inner;
2505
+ let size = ordinalConverter.allocationSize(24);
2506
+ size += FfiConverterString.allocationSize(inner.message);
2507
+ return size;
2508
+ }
2509
+ case BdkError_Tags.FeeBumpIrreplaceable:
2510
+ {
2511
+ const inner = value.inner;
2512
+ let size = ordinalConverter.allocationSize(25);
2513
+ size += FfiConverterString.allocationSize(inner.message);
2514
+ return size;
2515
+ }
2516
+ case BdkError_Tags.FeeBumpFeeRateUnavailable:
2517
+ {
2518
+ const inner = value.inner;
2519
+ let size = ordinalConverter.allocationSize(26);
2520
+ size += FfiConverterString.allocationSize(inner.message);
2521
+ return size;
2522
+ }
2523
+ case BdkError_Tags.FeeBumpInvalidOutputIndex:
2524
+ {
2525
+ const inner = value.inner;
2526
+ let size = ordinalConverter.allocationSize(27);
2527
+ size += FfiConverterString.allocationSize(inner.message);
2528
+ return size;
2529
+ }
2530
+ case BdkError_Tags.InvalidPsbt:
2531
+ {
2532
+ const inner = value.inner;
2533
+ let size = ordinalConverter.allocationSize(28);
2534
+ size += FfiConverterString.allocationSize(inner.message);
2535
+ return size;
2536
+ }
2537
+ case BdkError_Tags.SignFailed:
2538
+ {
2539
+ const inner = value.inner;
2540
+ let size = ordinalConverter.allocationSize(29);
2541
+ size += FfiConverterString.allocationSize(inner.message);
2542
+ return size;
2543
+ }
2544
+ case BdkError_Tags.SignerMissingKey:
2545
+ {
2546
+ const inner = value.inner;
2547
+ let size = ordinalConverter.allocationSize(30);
2548
+ size += FfiConverterString.allocationSize(inner.message);
2549
+ return size;
2550
+ }
2551
+ case BdkError_Tags.SignerInvalidKey:
2552
+ {
2553
+ const inner = value.inner;
2554
+ let size = ordinalConverter.allocationSize(31);
2555
+ size += FfiConverterString.allocationSize(inner.message);
2556
+ return size;
2557
+ }
2558
+ case BdkError_Tags.SignerUserCanceled:
2559
+ {
2560
+ const inner = value.inner;
2561
+ let size = ordinalConverter.allocationSize(32);
2562
+ size += FfiConverterString.allocationSize(inner.message);
2563
+ return size;
2564
+ }
2565
+ case BdkError_Tags.SignerInputIndexOutOfRange:
2566
+ {
2567
+ const inner = value.inner;
2568
+ let size = ordinalConverter.allocationSize(33);
2569
+ size += FfiConverterString.allocationSize(inner.message);
2570
+ return size;
2571
+ }
2572
+ case BdkError_Tags.SignerMissingNonWitnessUtxo:
2573
+ {
2574
+ const inner = value.inner;
2575
+ let size = ordinalConverter.allocationSize(34);
2576
+ size += FfiConverterString.allocationSize(inner.message);
2577
+ return size;
2578
+ }
2579
+ case BdkError_Tags.SignerMissingWitnessUtxo:
2580
+ {
2581
+ const inner = value.inner;
2582
+ let size = ordinalConverter.allocationSize(35);
2583
+ size += FfiConverterString.allocationSize(inner.message);
2584
+ return size;
2585
+ }
2586
+ case BdkError_Tags.SignerMissingWitnessScript:
2587
+ {
2588
+ const inner = value.inner;
2589
+ let size = ordinalConverter.allocationSize(36);
2590
+ size += FfiConverterString.allocationSize(inner.message);
2591
+ return size;
2592
+ }
2593
+ case BdkError_Tags.SignerNonStandardSighash:
2594
+ {
2595
+ const inner = value.inner;
2596
+ let size = ordinalConverter.allocationSize(37);
2597
+ size += FfiConverterString.allocationSize(inner.message);
2598
+ return size;
2599
+ }
2600
+ case BdkError_Tags.SignerInvalidSighash:
2601
+ {
2602
+ const inner = value.inner;
2603
+ let size = ordinalConverter.allocationSize(38);
2604
+ size += FfiConverterString.allocationSize(inner.message);
2605
+ return size;
2606
+ }
2607
+ case BdkError_Tags.SyncFailed:
2608
+ {
2609
+ const inner = value.inner;
2610
+ let size = ordinalConverter.allocationSize(39);
2611
+ size += FfiConverterString.allocationSize(inner.message);
2612
+ return size;
2613
+ }
2614
+ case BdkError_Tags.BroadcastFailed:
2615
+ {
2616
+ const inner = value.inner;
2617
+ let size = ordinalConverter.allocationSize(40);
2618
+ size += FfiConverterString.allocationSize(inner.message);
2619
+ return size;
2620
+ }
2621
+ case BdkError_Tags.InvalidTransaction:
2622
+ {
2623
+ const inner = value.inner;
2624
+ let size = ordinalConverter.allocationSize(41);
2625
+ size += FfiConverterString.allocationSize(inner.message);
2626
+ return size;
2627
+ }
2628
+ case BdkError_Tags.TransactionNotFound:
2629
+ {
2630
+ const inner = value.inner;
2631
+ let size = ordinalConverter.allocationSize(42);
2632
+ size += FfiConverterString.allocationSize(inner.message);
2633
+ return size;
2634
+ }
2635
+ case BdkError_Tags.CannotConnect:
2636
+ {
2637
+ const inner = value.inner;
2638
+ let size = ordinalConverter.allocationSize(43);
2639
+ size += FfiConverterString.allocationSize(inner.message);
2640
+ return size;
2641
+ }
2642
+ case BdkError_Tags.CalculateFeeError:
2643
+ {
2644
+ const inner = value.inner;
2645
+ let size = ordinalConverter.allocationSize(44);
2646
+ size += FfiConverterString.allocationSize(inner.message);
2647
+ return size;
2648
+ }
2649
+ case BdkError_Tags.InvalidMnemonic:
2650
+ {
2651
+ const inner = value.inner;
2652
+ let size = ordinalConverter.allocationSize(45);
2653
+ size += FfiConverterString.allocationSize(inner.message);
2654
+ return size;
2655
+ }
2656
+ case BdkError_Tags.InvalidEntropy:
2657
+ {
2658
+ const inner = value.inner;
2659
+ let size = ordinalConverter.allocationSize(46);
2660
+ size += FfiConverterString.allocationSize(inner.message);
2661
+ return size;
2662
+ }
2663
+ case BdkError_Tags.KeyError:
2664
+ {
2665
+ const inner = value.inner;
2666
+ let size = ordinalConverter.allocationSize(47);
2667
+ size += FfiConverterString.allocationSize(inner.message);
2668
+ return size;
2669
+ }
2670
+ case BdkError_Tags.Generic:
2671
+ {
2672
+ const inner = value.inner;
2673
+ let size = ordinalConverter.allocationSize(48);
2674
+ size += FfiConverterString.allocationSize(inner.message);
2675
+ return size;
2676
+ }
1842
2677
  default:
1843
2678
  throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
1844
2679
  }
1845
2680
  }
1846
- write(value, into) {
1847
- const obj = value;
1848
- const index = obj[_uniffiBindgenReactNative.variantOrdinalSymbol];
1849
- intConverter.write(index, into);
1850
- }
1851
- allocationSize(value) {
1852
- return intConverter.allocationSize(0);
1853
- }
1854
2681
  }
1855
- return new FfiConverter();
2682
+ return new FFIConverter();
1856
2683
  })();
1857
-
1858
- /**
1859
- * Controls which UTXOs the wallet may spend as change inputs.
1860
- */
1861
2684
  let ChangeSpendPolicy = exports.ChangeSpendPolicy = /*#__PURE__*/function (ChangeSpendPolicy) {
1862
- /**
1863
- * Both change and non-change outputs may be spent (default).
1864
- */
1865
2685
  ChangeSpendPolicy[ChangeSpendPolicy["ChangeAllowed"] = 0] = "ChangeAllowed";
1866
- /**
1867
- * Only change outputs may be spent as inputs.
1868
- */
1869
2686
  ChangeSpendPolicy[ChangeSpendPolicy["OnlyChange"] = 1] = "OnlyChange";
1870
- /**
1871
- * Only non-change outputs may be spent as inputs.
1872
- */
1873
2687
  ChangeSpendPolicy[ChangeSpendPolicy["ChangeForbidden"] = 2] = "ChangeForbidden";
1874
2688
  return ChangeSpendPolicy;
1875
2689
  }({});
@@ -1904,28 +2718,10 @@ const FfiConverterTypeChangeSpendPolicy = (() => {
1904
2718
  }
1905
2719
  return new FFIConverter();
1906
2720
  })();
1907
-
1908
- /**
1909
- * Standard BIP descriptor templates for generating wallet descriptors
1910
- * from a mnemonic/xprv (also usable for xpub via create_public_descriptor).
1911
- * Mirrors descriptor::template::{Bip44, Bip49, Bip84, Bip86}.
1912
- */
1913
2721
  let DescriptorTemplate = exports.DescriptorTemplate = /*#__PURE__*/function (DescriptorTemplate) {
1914
- /**
1915
- * BIP44 — Legacy P2PKH (1…)
1916
- */
1917
2722
  DescriptorTemplate[DescriptorTemplate["Bip44"] = 0] = "Bip44";
1918
- /**
1919
- * BIP49 — Nested SegWit P2SH-P2WPKH (3…)
1920
- */
1921
2723
  DescriptorTemplate[DescriptorTemplate["Bip49"] = 1] = "Bip49";
1922
- /**
1923
- * BIP84 — Native SegWit P2WPKH (bc1q…)
1924
- */
1925
2724
  DescriptorTemplate[DescriptorTemplate["Bip84"] = 2] = "Bip84";
1926
- /**
1927
- * BIP86 — Taproot P2TR (bc1p…)
1928
- */
1929
2725
  DescriptorTemplate[DescriptorTemplate["Bip86"] = 3] = "Bip86";
1930
2726
  return DescriptorTemplate;
1931
2727
  }({});
@@ -1965,13 +2761,7 @@ const FfiConverterTypeDescriptorTemplate = (() => {
1965
2761
  return new FFIConverter();
1966
2762
  })();
1967
2763
  let KeychainKind = exports.KeychainKind = /*#__PURE__*/function (KeychainKind) {
1968
- /**
1969
- * External keychain — used for deriving recipient addresses.
1970
- */
1971
2764
  KeychainKind[KeychainKind["External"] = 0] = "External";
1972
- /**
1973
- * Internal keychain — used for deriving change addresses.
1974
- */
1975
2765
  KeychainKind[KeychainKind["Internal"] = 1] = "Internal";
1976
2766
  return KeychainKind;
1977
2767
  }({});
@@ -2002,11 +2792,6 @@ const FfiConverterTypeKeychainKind = (() => {
2002
2792
  }
2003
2793
  return new FFIConverter();
2004
2794
  })();
2005
-
2006
- /**
2007
- * BIP-39 mnemonic language. Mirrors bip39::Language.
2008
- * Requires `all-languages` feature on the bip39 crate.
2009
- */
2010
2795
  let Language = exports.Language = /*#__PURE__*/function (Language) {
2011
2796
  Language[Language["English"] = 0] = "English";
2012
2797
  Language[Language["SimplifiedChinese"] = 1] = "SimplifiedChinese";
@@ -2121,27 +2906,10 @@ const FfiConverterTypeNetwork = (() => {
2121
2906
  }
2122
2907
  return new FFIConverter();
2123
2908
  })();
2124
-
2125
- /**
2126
- * Single-key descriptor templates.
2127
- * Mirrors descriptor::template::{P2Pkh, P2Wpkh, P2Wpkh_P2Sh, P2TR}.
2128
- */
2129
2909
  let SingleKeyDescriptorTemplate = exports.SingleKeyDescriptorTemplate = /*#__PURE__*/function (SingleKeyDescriptorTemplate) {
2130
- /**
2131
- * Pay-to-PubKey-Hash — Legacy (1…)
2132
- */
2133
2910
  SingleKeyDescriptorTemplate[SingleKeyDescriptorTemplate["P2Pkh"] = 0] = "P2Pkh";
2134
- /**
2135
- * Pay-to-Witness-PubKey-Hash — Native SegWit (bc1q…)
2136
- */
2137
2911
  SingleKeyDescriptorTemplate[SingleKeyDescriptorTemplate["P2Wpkh"] = 1] = "P2Wpkh";
2138
- /**
2139
- * P2Wpkh wrapped in P2SH — Nested SegWit (3…)
2140
- */
2141
2912
  SingleKeyDescriptorTemplate[SingleKeyDescriptorTemplate["P2WpkhP2Sh"] = 2] = "P2WpkhP2Sh";
2142
- /**
2143
- * Pay-to-Taproot (bc1p…)
2144
- */
2145
2913
  SingleKeyDescriptorTemplate[SingleKeyDescriptorTemplate["P2tr"] = 3] = "P2tr";
2146
2914
  return SingleKeyDescriptorTemplate;
2147
2915
  }({});
@@ -2180,19 +2948,8 @@ const FfiConverterTypeSingleKeyDescriptorTemplate = (() => {
2180
2948
  }
2181
2949
  return new FFIConverter();
2182
2950
  })();
2183
-
2184
- /**
2185
- * Ordering applied to inputs and outputs when building a transaction.
2186
- * Note: bdk_wallet also has a Custom variant (with closures) that cannot cross FFI.
2187
- */
2188
2951
  let TxOrdering = exports.TxOrdering = /*#__PURE__*/function (TxOrdering) {
2189
- /**
2190
- * Randomise input and output order (default, good for privacy).
2191
- */
2192
2952
  TxOrdering[TxOrdering["Shuffle"] = 0] = "Shuffle";
2193
- /**
2194
- * Preserve insertion order of recipients and manually added UTXOs.
2195
- */
2196
2953
  TxOrdering[TxOrdering["Untouched"] = 1] = "Untouched";
2197
2954
  return TxOrdering;
2198
2955
  }({});
@@ -2233,14 +2990,7 @@ let WalletEvent_Tags = exports.WalletEvent_Tags = /*#__PURE__*/function (WalletE
2233
2990
  WalletEvent_Tags["TxDropped"] = "TxDropped";
2234
2991
  return WalletEvent_Tags;
2235
2992
  }({});
2236
- /**
2237
- * Events emitted when applying chain updates to the wallet.
2238
- * Mirrors bdk_wallet::event::WalletEvent (non-exhaustive in upstream).
2239
- */
2240
2993
  const WalletEvent = exports.WalletEvent = (() => {
2241
- /**
2242
- * The local chain tip has changed.
2243
- */
2244
2994
  class ChainTipChanged_ extends _uniffiBindgenReactNative.UniffiEnum {
2245
2995
  /**
2246
2996
  * @private
@@ -2259,9 +3009,6 @@ const WalletEvent = exports.WalletEvent = (() => {
2259
3009
  return obj.tag === WalletEvent_Tags.ChainTipChanged;
2260
3010
  }
2261
3011
  }
2262
- /**
2263
- * A transaction has been confirmed.
2264
- */
2265
3012
  class TxConfirmed_ extends _uniffiBindgenReactNative.UniffiEnum {
2266
3013
  /**
2267
3014
  * @private
@@ -2280,9 +3027,6 @@ const WalletEvent = exports.WalletEvent = (() => {
2280
3027
  return obj.tag === WalletEvent_Tags.TxConfirmed;
2281
3028
  }
2282
3029
  }
2283
- /**
2284
- * A previously confirmed transaction has been unconfirmed (reorg).
2285
- */
2286
3030
  class TxUnconfirmed_ extends _uniffiBindgenReactNative.UniffiEnum {
2287
3031
  /**
2288
3032
  * @private
@@ -2301,9 +3045,6 @@ const WalletEvent = exports.WalletEvent = (() => {
2301
3045
  return obj.tag === WalletEvent_Tags.TxUnconfirmed;
2302
3046
  }
2303
3047
  }
2304
- /**
2305
- * A transaction has been replaced (RBF or conflict).
2306
- */
2307
3048
  class TxReplaced_ extends _uniffiBindgenReactNative.UniffiEnum {
2308
3049
  /**
2309
3050
  * @private
@@ -2322,9 +3063,6 @@ const WalletEvent = exports.WalletEvent = (() => {
2322
3063
  return obj.tag === WalletEvent_Tags.TxReplaced;
2323
3064
  }
2324
3065
  }
2325
- /**
2326
- * A transaction has been dropped from the mempool / evicted.
2327
- */
2328
3066
  class TxDropped_ extends _uniffiBindgenReactNative.UniffiEnum {
2329
3067
  /**
2330
3068
  * @private
@@ -2355,12 +3093,6 @@ const WalletEvent = exports.WalletEvent = (() => {
2355
3093
  TxDropped: TxDropped_
2356
3094
  });
2357
3095
  })();
2358
-
2359
- /**
2360
- * Events emitted when applying chain updates to the wallet.
2361
- * Mirrors bdk_wallet::event::WalletEvent (non-exhaustive in upstream).
2362
- */
2363
-
2364
3096
  // FfiConverter for enum WalletEvent
2365
3097
  const FfiConverterTypeWalletEvent = (() => {
2366
3098
  const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
@@ -2486,10 +3218,6 @@ const FfiConverterTypeWalletEvent = (() => {
2486
3218
  }
2487
3219
  return new FFIConverter();
2488
3220
  })();
2489
-
2490
- /**
2491
- * BIP-39 mnemonic word count (determines entropy length).
2492
- */
2493
3221
  let WordCount = exports.WordCount = /*#__PURE__*/function (WordCount) {
2494
3222
  WordCount[WordCount["Words12"] = 0] = "Words12";
2495
3223
  WordCount[WordCount["Words15"] = 1] = "Words15";
@@ -2539,103 +3267,137 @@ const FfiConverterTypeWordCount = (() => {
2539
3267
  })();
2540
3268
 
2541
3269
  /**
2542
- * BIP-39 mnemonic phrase for key generation.
2543
- * Backed by bdk_wallet::keys::bip39::Mnemonic (requires `keys-bip39` feature).
3270
+ * A reusable Electrum client that holds a persistent TCP/TLS connection.
2544
3271
  */
2545
3272
 
2546
3273
  /**
2547
- * BIP-39 mnemonic phrase for key generation.
2548
- * Backed by bdk_wallet::keys::bip39::Mnemonic (requires `keys-bip39` feature).
3274
+ * @deprecated Use `ElectrumClientLike` instead.
2549
3275
  */
2550
- class Mnemonic extends _uniffiBindgenReactNative.UniffiAbstractObject {
2551
- [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "Mnemonic";
3276
+
3277
+ /**
3278
+ * A reusable Electrum client that holds a persistent TCP/TLS connection.
3279
+ */
3280
+ class ElectrumClient extends _uniffiBindgenReactNative.UniffiAbstractObject {
3281
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ElectrumClient";
2552
3282
  /**
2553
- * Generate a new random mnemonic with the given word count (English).
3283
+ * Connect to an Electrum server.
2554
3284
  */
2555
- constructor(wordCount) /*throws*/{
3285
+ constructor(url) /*throws*/{
2556
3286
  super();
2557
3287
  const pointer = uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2558
- return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_mnemonic_new(FfiConverterTypeWordCount.lower(wordCount), callStatus);
3288
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_electrumclient_new(FfiConverterString.lower(url), callStatus);
2559
3289
  }, /*liftString:*/FfiConverterString.lift);
2560
3290
  this[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
2561
- this[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypeMnemonicObjectFactory.bless(pointer);
3291
+ this[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypeElectrumClientObjectFactory.bless(pointer);
2562
3292
  }
2563
3293
 
2564
3294
  /**
2565
- * Create a mnemonic from raw entropy bytes (16–32 bytes).
3295
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
2566
3296
  */
3297
+ uniffiDestroy() {
3298
+ const ptr = this[_uniffiBindgenReactNative.destructorGuardSymbol];
3299
+ if (ptr !== undefined) {
3300
+ const pointer = uniffiTypeElectrumClientObjectFactory.pointer(this);
3301
+ uniffiTypeElectrumClientObjectFactory.freePointer(pointer);
3302
+ uniffiTypeElectrumClientObjectFactory.unbless(ptr);
3303
+ delete this[_uniffiBindgenReactNative.destructorGuardSymbol];
3304
+ }
3305
+ }
3306
+ static instanceOf(obj) {
3307
+ return uniffiTypeElectrumClientObjectFactory.isConcreteType(obj);
3308
+ }
3309
+ }
3310
+ exports.ElectrumClient = ElectrumClient;
3311
+ const uniffiTypeElectrumClientObjectFactory = (() => {
3312
+ return {
3313
+ create(pointer) {
3314
+ const instance = Object.create(ElectrumClient.prototype);
3315
+ instance[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
3316
+ instance[_uniffiBindgenReactNative.destructorGuardSymbol] = this.bless(pointer);
3317
+ instance[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ElectrumClient";
3318
+ return instance;
3319
+ },
3320
+ bless(p) {
3321
+ return uniffiCaller.rustCall(/*caller:*/status => (0, _bdk_ffiFfi.default)().ubrn_uniffi_internal_fn_method_electrumclient_ffi__bless_pointer(p, status), /*liftString:*/FfiConverterString.lift);
3322
+ },
3323
+ unbless(ptr) {
3324
+ ptr.markDestroyed();
3325
+ },
3326
+ pointer(obj) {
3327
+ if (obj[_uniffiBindgenReactNative.destructorGuardSymbol] === undefined) {
3328
+ throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedNullPointer();
3329
+ }
3330
+ return obj[_uniffiBindgenReactNative.pointerLiteralSymbol];
3331
+ },
3332
+ clonePointer(obj) {
3333
+ const pointer = this.pointer(obj);
3334
+ return uniffiCaller.rustCall(/*caller:*/callStatus => (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_clone_electrumclient(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
3335
+ },
3336
+ freePointer(pointer) {
3337
+ uniffiCaller.rustCall(/*caller:*/callStatus => (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_free_electrumclient(pointer, callStatus), /*liftString:*/FfiConverterString.lift);
3338
+ },
3339
+ isConcreteType(obj) {
3340
+ return obj[_uniffiBindgenReactNative.destructorGuardSymbol] && obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "ElectrumClient";
3341
+ }
3342
+ };
3343
+ })();
3344
+ // FfiConverter for ElectrumClientLike
3345
+ const FfiConverterTypeElectrumClient = new _uniffiBindgenReactNative.FfiConverterObject(uniffiTypeElectrumClientObjectFactory);
3346
+
3347
+ /**
3348
+ * @deprecated Use `MnemonicLike` instead.
3349
+ */
3350
+
3351
+ class Mnemonic extends _uniffiBindgenReactNative.UniffiAbstractObject {
3352
+ [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "Mnemonic";
3353
+ constructor(wordCount) /*throws*/{
3354
+ super();
3355
+ const pointer = uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3356
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_mnemonic_new(FfiConverterTypeWordCount.lower(wordCount), callStatus);
3357
+ }, /*liftString:*/FfiConverterString.lift);
3358
+ this[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
3359
+ this[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypeMnemonicObjectFactory.bless(pointer);
3360
+ }
2567
3361
  static fromEntropy(entropy) /*throws*/{
2568
3362
  return FfiConverterTypeMnemonic.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2569
3363
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_mnemonic_from_entropy(FfiConverterArrayUInt8.lower(entropy), callStatus);
2570
3364
  }, /*liftString:*/FfiConverterString.lift));
2571
3365
  }
2572
-
2573
- /**
2574
- * Create a mnemonic from raw entropy bytes in a specific language.
2575
- */
2576
3366
  static fromEntropyIn(entropy, language) /*throws*/{
2577
3367
  return FfiConverterTypeMnemonic.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2578
3368
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_mnemonic_from_entropy_in(FfiConverterArrayUInt8.lower(entropy), FfiConverterTypeLanguage.lower(language), callStatus);
2579
3369
  }, /*liftString:*/FfiConverterString.lift));
2580
3370
  }
2581
-
2582
- /**
2583
- * Parse an existing mnemonic string (auto-detects language).
2584
- */
2585
3371
  static fromString(mnemonic) /*throws*/{
2586
3372
  return FfiConverterTypeMnemonic.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2587
3373
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_mnemonic_from_string(FfiConverterString.lower(mnemonic), callStatus);
2588
3374
  }, /*liftString:*/FfiConverterString.lift));
2589
3375
  }
2590
-
2591
- /**
2592
- * Parse a mnemonic string in a specific language.
2593
- */
2594
3376
  static fromStringIn(mnemonic, language) /*throws*/{
2595
3377
  return FfiConverterTypeMnemonic.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2596
3378
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_mnemonic_from_string_in(FfiConverterString.lower(mnemonic), FfiConverterTypeLanguage.lower(language), callStatus);
2597
3379
  }, /*liftString:*/FfiConverterString.lift));
2598
3380
  }
2599
-
2600
- /**
2601
- * The language of this mnemonic.
2602
- */
2603
3381
  language() {
2604
3382
  return FfiConverterTypeLanguage.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
2605
3383
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_mnemonic_language(uniffiTypeMnemonicObjectFactory.clonePointer(this), callStatus);
2606
3384
  }, /*liftString:*/FfiConverterString.lift));
2607
3385
  }
2608
-
2609
- /**
2610
- * Derive the 64-byte seed as hex. Pass an empty string for no passphrase.
2611
- */
2612
3386
  toSeedHex(passphrase) {
2613
3387
  return FfiConverterString.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
2614
3388
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_mnemonic_to_seed_hex(uniffiTypeMnemonicObjectFactory.clonePointer(this), FfiConverterString.lower(passphrase), callStatus);
2615
3389
  }, /*liftString:*/FfiConverterString.lift));
2616
3390
  }
2617
-
2618
- /**
2619
- * The mnemonic as a space-separated word string.
2620
- */
2621
3391
  toString() {
2622
3392
  return FfiConverterString.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
2623
3393
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_mnemonic_to_string(uniffiTypeMnemonicObjectFactory.clonePointer(this), callStatus);
2624
3394
  }, /*liftString:*/FfiConverterString.lift));
2625
3395
  }
2626
-
2627
- /**
2628
- * Number of words (12, 15, 18, 21, or 24).
2629
- */
2630
3396
  wordCount() {
2631
3397
  return _uniffiBindgenReactNative.FfiConverterUInt32.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
2632
3398
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_mnemonic_word_count(uniffiTypeMnemonicObjectFactory.clonePointer(this), callStatus);
2633
3399
  }, /*liftString:*/FfiConverterString.lift));
2634
3400
  }
2635
-
2636
- /**
2637
- * List the individual words.
2638
- */
2639
3401
  words() {
2640
3402
  return FfiConverterArrayString.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
2641
3403
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_mnemonic_words(uniffiTypeMnemonicObjectFactory.clonePointer(this), callStatus);
@@ -2692,23 +3454,15 @@ const uniffiTypeMnemonicObjectFactory = (() => {
2692
3454
  }
2693
3455
  };
2694
3456
  })();
2695
- // FfiConverter for MnemonicInterface
3457
+ // FfiConverter for MnemonicLike
2696
3458
  const FfiConverterTypeMnemonic = new _uniffiBindgenReactNative.FfiConverterObject(uniffiTypeMnemonicObjectFactory);
2697
3459
 
2698
3460
  /**
2699
- * A Partially Signed Bitcoin Transaction (BIP-174 / BIP-370).
2700
- * Mirrors bitcoin::Psbt with added PsbtUtils trait methods.
3461
+ * @deprecated Use `PsbtLike` instead.
2701
3462
  */
2702
3463
 
2703
- /**
2704
- * A Partially Signed Bitcoin Transaction (BIP-174 / BIP-370).
2705
- * Mirrors bitcoin::Psbt with added PsbtUtils trait methods.
2706
- */
2707
3464
  class Psbt extends _uniffiBindgenReactNative.UniffiAbstractObject {
2708
3465
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "Psbt";
2709
- /**
2710
- * Deserialize from a base64-encoded string.
2711
- */
2712
3466
  constructor(psbtBase64) /*throws*/{
2713
3467
  super();
2714
3468
  const pointer = uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
@@ -2717,59 +3471,31 @@ class Psbt extends _uniffiBindgenReactNative.UniffiAbstractObject {
2717
3471
  this[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
2718
3472
  this[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypePsbtObjectFactory.bless(pointer);
2719
3473
  }
2720
-
2721
- /**
2722
- * Extract the fully-signed transaction as raw hex.
2723
- * Only valid after all inputs are finalized.
2724
- */
2725
3474
  extractTxHex() /*throws*/{
2726
3475
  return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2727
3476
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_psbt_extract_tx_hex(uniffiTypePsbtObjectFactory.clonePointer(this), callStatus);
2728
3477
  }, /*liftString:*/FfiConverterString.lift));
2729
3478
  }
2730
-
2731
- /**
2732
- * Total fee in satoshis. None if any input UTXO value is unknown.
2733
- * From PsbtUtils::fee_amount().
2734
- */
2735
3479
  feeAmount() {
2736
3480
  return FfiConverterOptionalUInt64.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
2737
3481
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_psbt_fee_amount(uniffiTypePsbtObjectFactory.clonePointer(this), callStatus);
2738
3482
  }, /*liftString:*/FfiConverterString.lift));
2739
3483
  }
2740
-
2741
- /**
2742
- * Fee rate in sat/vbyte. None if any input UTXO value is unknown.
2743
- * From PsbtUtils::fee_rate().
2744
- */
2745
3484
  feeRate() {
2746
3485
  return FfiConverterOptionalFloat64.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
2747
3486
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_psbt_fee_rate(uniffiTypePsbtObjectFactory.clonePointer(this), callStatus);
2748
3487
  }, /*liftString:*/FfiConverterString.lift));
2749
3488
  }
2750
-
2751
- /**
2752
- * Retrieve the UTXO for a given input index. Returns None if unavailable.
2753
- * From PsbtUtils::get_utxo_for().
2754
- */
2755
3489
  getUtxoFor(inputIndex) {
2756
3490
  return FfiConverterOptionalTypeTxOut.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
2757
3491
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_psbt_get_utxo_for(uniffiTypePsbtObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt64.lower(inputIndex), callStatus);
2758
3492
  }, /*liftString:*/FfiConverterString.lift));
2759
3493
  }
2760
-
2761
- /**
2762
- * Serialize to a base64-encoded string.
2763
- */
2764
3494
  toBase64() {
2765
3495
  return FfiConverterString.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
2766
3496
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_psbt_to_base64(uniffiTypePsbtObjectFactory.clonePointer(this), callStatus);
2767
3497
  }, /*liftString:*/FfiConverterString.lift));
2768
3498
  }
2769
-
2770
- /**
2771
- * The unsigned txid (available before finalization).
2772
- */
2773
3499
  txid() /*throws*/{
2774
3500
  return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2775
3501
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_psbt_txid(uniffiTypePsbtObjectFactory.clonePointer(this), callStatus);
@@ -2826,20 +3552,13 @@ const uniffiTypePsbtObjectFactory = (() => {
2826
3552
  }
2827
3553
  };
2828
3554
  })();
2829
- // FfiConverter for PsbtInterface
3555
+ // FfiConverter for PsbtLike
2830
3556
  const FfiConverterTypePsbt = new _uniffiBindgenReactNative.FfiConverterObject(uniffiTypePsbtObjectFactory);
2831
3557
 
2832
3558
  /**
2833
- * Fluent builder for constructing Bitcoin transactions.
2834
- * Create one, configure it, then call finish(wallet) to produce a PSBT.
2835
- * Mirrors bdk_wallet::TxBuilder (without lifetime / generic coin selection).
3559
+ * @deprecated Use `TxBuilderLike` instead.
2836
3560
  */
2837
3561
 
2838
- /**
2839
- * Fluent builder for constructing Bitcoin transactions.
2840
- * Create one, configure it, then call finish(wallet) to produce a PSBT.
2841
- * Mirrors bdk_wallet::TxBuilder (without lifetime / generic coin selection).
2842
- */
2843
3562
  class TxBuilder extends _uniffiBindgenReactNative.UniffiAbstractObject {
2844
3563
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "TxBuilder";
2845
3564
  constructor() {
@@ -2850,163 +3569,91 @@ class TxBuilder extends _uniffiBindgenReactNative.UniffiAbstractObject {
2850
3569
  this[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
2851
3570
  this[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypeTxBuilderObjectFactory.bless(pointer);
2852
3571
  }
2853
-
2854
- /**
2855
- * Attach OP_RETURN data to the transaction.
2856
- */
2857
3572
  addData(data) {
2858
3573
  uniffiCaller.rustCall(/*caller:*/callStatus => {
2859
3574
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_add_data(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterArrayUInt8.lower(data), callStatus);
2860
3575
  }, /*liftString:*/FfiConverterString.lift);
2861
3576
  }
2862
-
2863
- /**
2864
- * Include BIP-32 global xpubs in the PSBT.
2865
- */
2866
3577
  addGlobalXpubs() {
2867
3578
  uniffiCaller.rustCall(/*caller:*/callStatus => {
2868
3579
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_add_global_xpubs(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
2869
3580
  }, /*liftString:*/FfiConverterString.lift);
2870
3581
  }
2871
-
2872
- /**
2873
- * Add a single recipient (address + amount).
2874
- */
2875
3582
  addRecipient(address, amountSats) {
2876
3583
  uniffiCaller.rustCall(/*caller:*/callStatus => {
2877
3584
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_add_recipient(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterString.lower(address), _uniffiBindgenReactNative.FfiConverterUInt64.lower(amountSats), callStatus);
2878
3585
  }, /*liftString:*/FfiConverterString.lift);
2879
3586
  }
2880
-
2881
- /**
2882
- * Mark a single UTXO as unspendable.
2883
- */
2884
3587
  addUnspendable(outpoint) {
2885
3588
  uniffiCaller.rustCall(/*caller:*/callStatus => {
2886
3589
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_add_unspendable(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterTypeOutPoint.lower(outpoint), callStatus);
2887
3590
  }, /*liftString:*/FfiConverterString.lift);
2888
3591
  }
2889
-
2890
- /**
2891
- * Add a specific UTXO to spend.
2892
- */
2893
3592
  addUtxo(outpoint) /*throws*/{
2894
3593
  uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2895
3594
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_add_utxo(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterTypeOutPoint.lower(outpoint), callStatus);
2896
3595
  }, /*liftString:*/FfiConverterString.lift);
2897
3596
  }
2898
-
2899
- /**
2900
- * Add multiple specific UTXOs to spend.
2901
- */
2902
3597
  addUtxos(outpoints) /*throws*/{
2903
3598
  uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2904
3599
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_add_utxos(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterArrayTypeOutPoint.lower(outpoints), callStatus);
2905
3600
  }, /*liftString:*/FfiConverterString.lift);
2906
3601
  }
2907
-
2908
- /**
2909
- * Allow outputs below the dust threshold.
2910
- */
2911
3602
  allowDust(allow) {
2912
3603
  uniffiCaller.rustCall(/*caller:*/callStatus => {
2913
3604
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_allow_dust(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterBool.lower(allow), callStatus);
2914
3605
  }, /*liftString:*/FfiConverterString.lift);
2915
3606
  }
2916
-
2917
- /**
2918
- * Set the change spend policy explicitly.
2919
- */
2920
3607
  changePolicy(policy) {
2921
3608
  uniffiCaller.rustCall(/*caller:*/callStatus => {
2922
3609
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_change_policy(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterTypeChangeSpendPolicy.lower(policy), callStatus);
2923
3610
  }, /*liftString:*/FfiConverterString.lift);
2924
3611
  }
2925
-
2926
- /**
2927
- * Set the assumed current block height (for relative timelock evaluation).
2928
- */
2929
3612
  currentHeight(height) {
2930
3613
  uniffiCaller.rustCall(/*caller:*/callStatus => {
2931
3614
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_current_height(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(height), callStatus);
2932
3615
  }, /*liftString:*/FfiConverterString.lift);
2933
3616
  }
2934
-
2935
- /**
2936
- * Forbid spending from change outputs.
2937
- */
2938
3617
  doNotSpendChange() {
2939
3618
  uniffiCaller.rustCall(/*caller:*/callStatus => {
2940
3619
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_do_not_spend_change(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
2941
3620
  }, /*liftString:*/FfiConverterString.lift);
2942
3621
  }
2943
-
2944
- /**
2945
- * Set the script to receive the remaining change (use with drain_wallet).
2946
- */
2947
3622
  drainTo(address) /*throws*/{
2948
3623
  uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
2949
3624
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_drain_to(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterString.lower(address), callStatus);
2950
3625
  }, /*liftString:*/FfiConverterString.lift);
2951
3626
  }
2952
-
2953
- /**
2954
- * Spend all spendable UTXOs (send remaining to the drain_to address).
2955
- */
2956
3627
  drainWallet() {
2957
3628
  uniffiCaller.rustCall(/*caller:*/callStatus => {
2958
3629
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_drain_wallet(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
2959
- }, /*liftString:*/FfiConverterString.lift);
2960
- }
2961
-
2962
- /**
2963
- * Enable RBF signalling with the default nSequence (0xFFFFFFFD).
2964
- */
3630
+ }, /*liftString:*/FfiConverterString.lift);
3631
+ }
2965
3632
  enableRbf() {
2966
3633
  uniffiCaller.rustCall(/*caller:*/callStatus => {
2967
3634
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_enable_rbf(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
2968
3635
  }, /*liftString:*/FfiConverterString.lift);
2969
3636
  }
2970
-
2971
- /**
2972
- * Enable RBF signalling with a specific nSequence value (must be < 0xFFFFFFFE).
2973
- */
2974
3637
  enableRbfWithSequence(nsequence) {
2975
3638
  uniffiCaller.rustCall(/*caller:*/callStatus => {
2976
3639
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_enable_rbf_with_sequence(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(nsequence), callStatus);
2977
3640
  }, /*liftString:*/FfiConverterString.lift);
2978
3641
  }
2979
-
2980
- /**
2981
- * Exclude UTXOs with fewer than min_confirms confirmations.
2982
- */
2983
3642
  excludeBelowConfirmations(minConfirms) {
2984
3643
  uniffiCaller.rustCall(/*caller:*/callStatus => {
2985
3644
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_exclude_below_confirmations(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(minConfirms), callStatus);
2986
3645
  }, /*liftString:*/FfiConverterString.lift);
2987
3646
  }
2988
-
2989
- /**
2990
- * Exclude all unconfirmed UTXOs.
2991
- */
2992
3647
  excludeUnconfirmed() {
2993
3648
  uniffiCaller.rustCall(/*caller:*/callStatus => {
2994
3649
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_exclude_unconfirmed(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
2995
3650
  }, /*liftString:*/FfiConverterString.lift);
2996
3651
  }
2997
-
2998
- /**
2999
- * Set an absolute fee in satoshis (overrides fee_rate).
3000
- */
3001
3652
  feeAbsolute(feeSats) {
3002
3653
  uniffiCaller.rustCall(/*caller:*/callStatus => {
3003
3654
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_fee_absolute(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt64.lower(feeSats), callStatus);
3004
3655
  }, /*liftString:*/FfiConverterString.lift);
3005
3656
  }
3006
-
3007
- /**
3008
- * Set a fee rate target in sat/vbyte.
3009
- */
3010
3657
  feeRate(satPerVbyte) {
3011
3658
  uniffiCaller.rustCall(/*caller:*/callStatus => {
3012
3659
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_fee_rate(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterFloat64.lower(satPerVbyte), callStatus);
@@ -3014,118 +3661,76 @@ class TxBuilder extends _uniffiBindgenReactNative.UniffiAbstractObject {
3014
3661
  }
3015
3662
 
3016
3663
  /**
3017
- * Build the transaction into a PSBT. The wallet is used for coin
3018
- * selection and script resolution — the PSBT is NOT signed here.
3664
+ * Build the transaction into a PSBT (async runs on background thread).
3019
3665
  */
3020
- finish(wallet) /*throws*/{
3021
- return FfiConverterTypePsbt.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3022
- return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_finish(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterTypeWallet.lower(wallet), callStatus);
3023
- }, /*liftString:*/FfiConverterString.lift));
3666
+ async finish(wallet, asyncOpts_) /*throws*/{
3667
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
3668
+ try {
3669
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3670
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_finish(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterTypeWallet.lower(wallet));
3671
+ }, /*pollFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_poll_u64, /*cancelFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_cancel_u64, /*completeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_complete_u64, /*freeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_free_u64, /*liftFunc:*/FfiConverterTypePsbt.lift.bind(FfiConverterTypePsbt), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError));
3672
+ } catch (__error) {
3673
+ if (uniffiIsDebug && __error instanceof Error) {
3674
+ __error.stack = __stack;
3675
+ }
3676
+ throw __error;
3677
+ }
3024
3678
  }
3025
-
3026
- /**
3027
- * Include the redeemScript / witnessScript in PSBT outputs.
3028
- */
3029
3679
  includeOutputRedeemWitnessScript() {
3030
3680
  uniffiCaller.rustCall(/*caller:*/callStatus => {
3031
3681
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_include_output_redeem_witness_script(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
3032
3682
  }, /*liftString:*/FfiConverterString.lift);
3033
3683
  }
3034
-
3035
- /**
3036
- * Only use the UTXOs explicitly added with add_utxo / add_utxos.
3037
- */
3038
3684
  manuallySelectedOnly() {
3039
3685
  uniffiCaller.rustCall(/*caller:*/callStatus => {
3040
3686
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_manually_selected_only(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
3041
3687
  }, /*liftString:*/FfiConverterString.lift);
3042
3688
  }
3043
-
3044
- /**
3045
- * Set an explicit nLockTime (as a block height).
3046
- */
3047
3689
  nlocktime(lockHeight) {
3048
3690
  uniffiCaller.rustCall(/*caller:*/callStatus => {
3049
3691
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_nlocktime(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(lockHeight), callStatus);
3050
3692
  }, /*liftString:*/FfiConverterString.lift);
3051
3693
  }
3052
-
3053
- /**
3054
- * Only spend from change outputs.
3055
- */
3056
3694
  onlySpendChange() {
3057
3695
  uniffiCaller.rustCall(/*caller:*/callStatus => {
3058
3696
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_only_spend_change(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
3059
3697
  }, /*liftString:*/FfiConverterString.lift);
3060
3698
  }
3061
-
3062
- /**
3063
- * Include only witness UTXO in PSBT inputs (reduced size, less validation).
3064
- */
3065
3699
  onlyWitnessUtxo() {
3066
3700
  uniffiCaller.rustCall(/*caller:*/callStatus => {
3067
3701
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_only_witness_utxo(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
3068
3702
  }, /*liftString:*/FfiConverterString.lift);
3069
3703
  }
3070
-
3071
- /**
3072
- * Set the input/output ordering strategy.
3073
- */
3074
3704
  ordering(ordering) {
3075
3705
  uniffiCaller.rustCall(/*caller:*/callStatus => {
3076
3706
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_ordering(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterTypeTxOrdering.lower(ordering), callStatus);
3077
3707
  }, /*liftString:*/FfiConverterString.lift);
3078
3708
  }
3079
-
3080
- /**
3081
- * Supply a policy path for complex descriptors (multisig, timelocks).
3082
- * path_map is a JSON-encoded BTreeMap<String, Vec<usize>>.
3083
- */
3084
3709
  policyPath(pathMapJson, keychain) {
3085
3710
  uniffiCaller.rustCall(/*caller:*/callStatus => {
3086
3711
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_policy_path(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterString.lower(pathMapJson), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
3087
3712
  }, /*liftString:*/FfiConverterString.lift);
3088
3713
  }
3089
-
3090
- /**
3091
- * Set an exact nSequence value for all inputs.
3092
- */
3093
3714
  setExactSequence(nsequence) {
3094
3715
  uniffiCaller.rustCall(/*caller:*/callStatus => {
3095
3716
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_set_exact_sequence(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(nsequence), callStatus);
3096
3717
  }, /*liftString:*/FfiConverterString.lift);
3097
3718
  }
3098
-
3099
- /**
3100
- * Replace the entire recipient list.
3101
- */
3102
3719
  setRecipients(recipients) {
3103
3720
  uniffiCaller.rustCall(/*caller:*/callStatus => {
3104
3721
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_set_recipients(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterArrayTypeRecipient.lower(recipients), callStatus);
3105
3722
  }, /*liftString:*/FfiConverterString.lift);
3106
3723
  }
3107
-
3108
- /**
3109
- * Set the sighash type for all inputs.
3110
- */
3111
3724
  sighash(sighashType) {
3112
3725
  uniffiCaller.rustCall(/*caller:*/callStatus => {
3113
3726
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_sighash(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(sighashType), callStatus);
3114
3727
  }, /*liftString:*/FfiConverterString.lift);
3115
3728
  }
3116
-
3117
- /**
3118
- * Set the transaction version (1 or 2).
3119
- */
3120
3729
  txVersion(version) {
3121
3730
  uniffiCaller.rustCall(/*caller:*/callStatus => {
3122
3731
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_tx_version(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterInt32.lower(version), callStatus);
3123
3732
  }, /*liftString:*/FfiConverterString.lift);
3124
3733
  }
3125
-
3126
- /**
3127
- * Mark UTXOs as unspendable (excluded from coin selection).
3128
- */
3129
3734
  unspendable(outpoints) {
3130
3735
  uniffiCaller.rustCall(/*caller:*/callStatus => {
3131
3736
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_unspendable(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterArrayTypeOutPoint.lower(outpoints), callStatus);
@@ -3182,14 +3787,17 @@ const uniffiTypeTxBuilderObjectFactory = (() => {
3182
3787
  }
3183
3788
  };
3184
3789
  })();
3185
- // FfiConverter for TxBuilderInterface
3790
+ // FfiConverter for TxBuilderLike
3186
3791
  const FfiConverterTypeTxBuilder = new _uniffiBindgenReactNative.FfiConverterObject(uniffiTypeTxBuilderObjectFactory);
3792
+
3793
+ /**
3794
+ * @deprecated Use `WalletLike` instead.
3795
+ */
3796
+
3187
3797
  class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
3188
3798
  [_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "Wallet";
3189
3799
  /**
3190
- * Create or load a persisted wallet.
3191
- * descriptor / change_descriptor: output descriptor strings (e.g. "wpkh(tprv…/84'/1'/0'/0/*)")
3192
- * db_path: file path for the SQLite persistence database.
3800
+ * Create or load a persisted wallet (sync — for async use create_wallet()).
3193
3801
  */
3194
3802
  constructor(descriptor, changeDescriptor, network, dbPath) /*throws*/{
3195
3803
  super();
@@ -3199,19 +3807,19 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
3199
3807
  this[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
3200
3808
  this[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypeWalletObjectFactory.bless(pointer);
3201
3809
  }
3202
-
3203
- /**
3204
- * Broadcast a finalized PSBT via Electrum. Returns the txid.
3205
- */
3206
- broadcastWithElectrum(url, psbt) /*throws*/{
3207
- return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3208
- return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_broadcast_with_electrum(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(url), FfiConverterTypePsbt.lower(psbt), callStatus);
3209
- }, /*liftString:*/FfiConverterString.lift));
3810
+ async broadcastWithElectrum(client, psbt, asyncOpts_) /*throws*/{
3811
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
3812
+ try {
3813
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3814
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_broadcast_with_electrum(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeElectrumClient.lower(client), FfiConverterTypePsbt.lower(psbt));
3815
+ }, /*pollFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterString.lift.bind(FfiConverterString), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError));
3816
+ } catch (__error) {
3817
+ if (uniffiIsDebug && __error instanceof Error) {
3818
+ __error.stack = __stack;
3819
+ }
3820
+ throw __error;
3821
+ }
3210
3822
  }
3211
-
3212
- /**
3213
- * Broadcast a finalized PSBT via Esplora. Returns the txid.
3214
- */
3215
3823
  async broadcastWithEsplora(url, psbt, asyncOpts_) /*throws*/{
3216
3824
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
3217
3825
  try {
@@ -3225,91 +3833,46 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
3225
3833
  throw __error;
3226
3834
  }
3227
3835
  }
3228
-
3229
- /**
3230
- * Build an RBF fee-bump PSBT for an unconfirmed transaction.
3231
- * Mirrors Wallet::build_fee_bump().
3232
- */
3233
3836
  buildFeeBump(txid, newFeeRate) /*throws*/{
3234
3837
  return FfiConverterTypePsbt.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3235
3838
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_build_fee_bump(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txid), _uniffiBindgenReactNative.FfiConverterFloat64.lower(newFeeRate), callStatus);
3236
3839
  }, /*liftString:*/FfiConverterString.lift));
3237
3840
  }
3238
-
3239
- /**
3240
- * Calculate the fee paid by a raw transaction (hex). Returns satoshis.
3241
- * Mirrors Wallet::calculate_fee().
3242
- */
3243
3841
  calculateFee(txHex) /*throws*/{
3244
3842
  return _uniffiBindgenReactNative.FfiConverterUInt64.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3245
3843
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_calculate_fee(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txHex), callStatus);
3246
3844
  }, /*liftString:*/FfiConverterString.lift));
3247
3845
  }
3248
-
3249
- /**
3250
- * Calculate the fee rate for a raw transaction (hex). Returns sat/vbyte.
3251
- * Mirrors Wallet::calculate_fee_rate().
3252
- */
3253
3846
  calculateFeeRate(txHex) /*throws*/{
3254
3847
  return _uniffiBindgenReactNative.FfiConverterFloat64.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3255
3848
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_calculate_fee_rate(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txHex), callStatus);
3256
3849
  }, /*liftString:*/FfiConverterString.lift));
3257
3850
  }
3258
-
3259
- /**
3260
- * Cancel (evict) a transaction from the wallet's view.
3261
- * Mirrors Wallet::cancel_tx().
3262
- */
3263
3851
  cancelTx(txHex) /*throws*/{
3264
3852
  uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3265
3853
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_cancel_tx(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txHex), callStatus);
3266
3854
  }, /*liftString:*/FfiConverterString.lift);
3267
3855
  }
3268
-
3269
- /**
3270
- * All checkpoints in the local chain, ordered by height descending.
3271
- * Mirrors Wallet::checkpoints().
3272
- */
3273
3856
  checkpoints() {
3274
3857
  return FfiConverterArrayTypeBlockId.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3275
3858
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_checkpoints(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
3276
3859
  }, /*liftString:*/FfiConverterString.lift));
3277
3860
  }
3278
-
3279
- /**
3280
- * The highest derivation index that has been revealed, or null if none.
3281
- * Mirrors Wallet::derivation_index().
3282
- */
3283
3861
  derivationIndex(keychain) {
3284
3862
  return FfiConverterOptionalUInt32.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3285
3863
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_derivation_index(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
3286
3864
  }, /*liftString:*/FfiConverterString.lift));
3287
3865
  }
3288
-
3289
- /**
3290
- * Find the keychain and derivation index for a scriptPubKey (hex).
3291
- * Returns null if the script does not belong to this wallet.
3292
- * Mirrors Wallet::derivation_of_spk().
3293
- */
3294
3866
  derivationOfSpk(scriptHex) {
3295
3867
  return FfiConverterOptionalTypeDerivationInfo.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3296
3868
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_derivation_of_spk(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(scriptHex), callStatus);
3297
3869
  }, /*liftString:*/FfiConverterString.lift));
3298
3870
  }
3299
-
3300
- /**
3301
- * The descriptor checksum for the given keychain.
3302
- * Mirrors Wallet::descriptor_checksum().
3303
- */
3304
3871
  descriptorChecksum(keychain) /*throws*/{
3305
3872
  return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3306
3873
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_descriptor_checksum(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
3307
3874
  }, /*liftString:*/FfiConverterString.lift));
3308
3875
  }
3309
-
3310
- /**
3311
- * Drain the entire wallet to an address. Returns txid.
3312
- */
3313
3876
  async drain(address, feeRate, esploraUrl, asyncOpts_) /*throws*/{
3314
3877
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
3315
3878
  try {
@@ -3323,32 +3886,37 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
3323
3886
  throw __error;
3324
3887
  }
3325
3888
  }
3326
-
3327
- /**
3328
- * Sign and attempt to finalize all inputs.
3329
- * Returns true if fully finalized.
3330
- * Mirrors Wallet::finalize_psbt() with default SignOptions.
3331
- */
3889
+ async drainWithElectrum(address, feeRate, client, asyncOpts_) /*throws*/{
3890
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
3891
+ try {
3892
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3893
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_drain_with_electrum(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(address), _uniffiBindgenReactNative.FfiConverterFloat64.lower(feeRate), FfiConverterTypeElectrumClient.lower(client));
3894
+ }, /*pollFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterString.lift.bind(FfiConverterString), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError));
3895
+ } catch (__error) {
3896
+ if (uniffiIsDebug && __error instanceof Error) {
3897
+ __error.stack = __stack;
3898
+ }
3899
+ throw __error;
3900
+ }
3901
+ }
3332
3902
  finalizePsbt(psbt) /*throws*/{
3333
3903
  return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3334
3904
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_finalize_psbt(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypePsbt.lower(psbt), callStatus);
3335
3905
  }, /*liftString:*/FfiConverterString.lift));
3336
3906
  }
3337
-
3338
- /**
3339
- * Full scan via an Electrum TCP/TLS server.
3340
- */
3341
- fullScanWithElectrum(url, stopGap) /*throws*/{
3342
- uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3343
- (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_full_scan_with_electrum(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(url), _uniffiBindgenReactNative.FfiConverterUInt64.lower(stopGap), callStatus);
3344
- }, /*liftString:*/FfiConverterString.lift);
3907
+ async fullScanWithElectrum(client, stopGap, asyncOpts_) /*throws*/{
3908
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
3909
+ try {
3910
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
3911
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_full_scan_with_electrum(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeElectrumClient.lower(client), _uniffiBindgenReactNative.FfiConverterUInt64.lower(stopGap));
3912
+ }, /*pollFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_poll_void, /*cancelFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_cancel_void, /*completeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_complete_void, /*freeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError));
3913
+ } catch (__error) {
3914
+ if (uniffiIsDebug && __error instanceof Error) {
3915
+ __error.stack = __stack;
3916
+ }
3917
+ throw __error;
3918
+ }
3345
3919
  }
3346
-
3347
- /**
3348
- * Full scan via an Esplora HTTP server (discovers all used addresses).
3349
- * Uses Wallet::start_full_scan() + bdk_esplora client internally.
3350
- * stop_gap: how many consecutive unused addresses to scan before stopping.
3351
- */
3352
3920
  async fullScanWithEsplora(url, stopGap, asyncOpts_) /*throws*/{
3353
3921
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
3354
3922
  try {
@@ -3362,209 +3930,106 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
3362
3930
  throw __error;
3363
3931
  }
3364
3932
  }
3365
-
3366
- /**
3367
- * Get the wallet balance. Mirrors Wallet::balance().
3368
- */
3369
3933
  getBalance() /*throws*/{
3370
3934
  return FfiConverterTypeBalance.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3371
3935
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_get_balance(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
3372
3936
  }, /*liftString:*/FfiConverterString.lift));
3373
3937
  }
3374
-
3375
- /**
3376
- * Returns the raw transaction hex for a given txid. Null if not found.
3377
- * Mirrors Wallet::get_tx().
3378
- */
3379
3938
  getTx(txid) /*throws*/{
3380
3939
  return FfiConverterOptionalString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3381
3940
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_get_tx(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txid), callStatus);
3382
3941
  }, /*liftString:*/FfiConverterString.lift));
3383
3942
  }
3384
-
3385
- /**
3386
- * Get a specific UTXO. Returns null if not found. Mirrors Wallet::get_utxo().
3387
- */
3388
3943
  getUtxo(outpoint) /*throws*/{
3389
3944
  return FfiConverterOptionalTypeLocalOutput.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3390
3945
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_get_utxo(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeOutPoint.lower(outpoint), callStatus);
3391
3946
  }, /*liftString:*/FfiConverterString.lift));
3392
3947
  }
3393
-
3394
- /**
3395
- * Manually insert a TxOut (e.g. for tracking external outputs).
3396
- * Mirrors Wallet::insert_txout().
3397
- */
3398
3948
  insertTxout(outpoint, txout) {
3399
3949
  uniffiCaller.rustCall(/*caller:*/callStatus => {
3400
3950
  (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_insert_txout(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeOutPoint.lower(outpoint), FfiConverterTypeTxOut.lower(txout), callStatus);
3401
3951
  }, /*liftString:*/FfiConverterString.lift);
3402
3952
  }
3403
-
3404
- /**
3405
- * Return true if the given scriptPubKey (hex) belongs to this wallet.
3406
- * Mirrors Wallet::is_mine().
3407
- */
3408
3953
  isMine(scriptHex) {
3409
3954
  return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3410
3955
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_is_mine(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(scriptHex), callStatus);
3411
3956
  }, /*liftString:*/FfiConverterString.lift));
3412
3957
  }
3413
-
3414
- /**
3415
- * List all keychains and their public descriptors.
3416
- * Mirrors Wallet::keychains().
3417
- */
3418
3958
  keychains() {
3419
3959
  return FfiConverterArrayTypeKeychainInfo.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3420
3960
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_keychains(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
3421
3961
  }, /*liftString:*/FfiConverterString.lift));
3422
3962
  }
3423
-
3424
- /**
3425
- * The latest checkpoint (tip of the local chain). Null if no blocks applied yet.
3426
- * Mirrors Wallet::latest_checkpoint().
3427
- */
3428
3963
  latestCheckpoint() {
3429
3964
  return FfiConverterOptionalTypeBlockId.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3430
3965
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_latest_checkpoint(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
3431
3966
  }, /*liftString:*/FfiConverterString.lift));
3432
3967
  }
3433
-
3434
- /**
3435
- * List all wallet outputs (spent and unspent). Mirrors Wallet::list_output().
3436
- */
3437
3968
  listOutput() /*throws*/{
3438
3969
  return FfiConverterArrayTypeLocalOutput.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3439
3970
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_list_output(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
3440
3971
  }, /*liftString:*/FfiConverterString.lift));
3441
3972
  }
3442
-
3443
- /**
3444
- * List all unspent wallet outputs. Mirrors Wallet::list_unspent().
3445
- */
3446
3973
  listUnspent() /*throws*/{
3447
3974
  return FfiConverterArrayTypeLocalOutput.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3448
3975
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_list_unspent(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
3449
3976
  }, /*liftString:*/FfiConverterString.lift));
3450
3977
  }
3451
-
3452
- /**
3453
- * List all addresses that have been revealed but not yet received funds.
3454
- * Mirrors Wallet::list_unused_addresses().
3455
- */
3456
3978
  listUnusedAddresses(keychain) /*throws*/{
3457
3979
  return FfiConverterArrayTypeAddressInfo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3458
3980
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_list_unused_addresses(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
3459
3981
  }, /*liftString:*/FfiConverterString.lift));
3460
3982
  }
3461
-
3462
- /**
3463
- * Mark an address index as used (returns true if previously unused).
3464
- * Mirrors Wallet::mark_used().
3465
- */
3466
3983
  markUsed(keychain, index) {
3467
3984
  return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3468
3985
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_mark_used(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), _uniffiBindgenReactNative.FfiConverterUInt32.lower(index), callStatus);
3469
3986
  }, /*liftString:*/FfiConverterString.lift));
3470
3987
  }
3471
-
3472
- /**
3473
- * The network this wallet is configured for.
3474
- * Mirrors Wallet::network().
3475
- */
3476
3988
  network() {
3477
3989
  return FfiConverterTypeNetwork.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3478
3990
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_network(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
3479
3991
  }, /*liftString:*/FfiConverterString.lift));
3480
3992
  }
3481
-
3482
- /**
3483
- * The next derivation index that will be revealed.
3484
- * Mirrors Wallet::next_derivation_index().
3485
- */
3486
3993
  nextDerivationIndex(keychain) {
3487
3994
  return _uniffiBindgenReactNative.FfiConverterUInt32.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3488
3995
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_next_derivation_index(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
3489
3996
  }, /*liftString:*/FfiConverterString.lift));
3490
3997
  }
3491
-
3492
- /**
3493
- * Return the next address that has not yet received funds.
3494
- * Mirrors Wallet::next_unused_address().
3495
- */
3496
3998
  nextUnusedAddress(keychain) /*throws*/{
3497
3999
  return FfiConverterTypeAddressInfo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3498
4000
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_next_unused_address(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
3499
4001
  }, /*liftString:*/FfiConverterString.lift));
3500
4002
  }
3501
-
3502
- /**
3503
- * Peek at a specific derivation index without advancing the counter.
3504
- * Mirrors Wallet::peek_address().
3505
- */
3506
4003
  peekAddress(keychain, index) /*throws*/{
3507
4004
  return FfiConverterTypeAddressInfo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3508
4005
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_peek_address(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), _uniffiBindgenReactNative.FfiConverterUInt32.lower(index), callStatus);
3509
4006
  }, /*liftString:*/FfiConverterString.lift));
3510
4007
  }
3511
-
3512
- /**
3513
- * Persist any staged changes to the database.
3514
- * Our FFI wraps PersistedWallet; this calls persist() internally.
3515
- */
3516
4008
  persist() /*throws*/{
3517
4009
  return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3518
4010
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_persist(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
3519
4011
  }, /*liftString:*/FfiConverterString.lift));
3520
4012
  }
3521
-
3522
- /**
3523
- * Spending policies for a given keychain, returned as a JSON string.
3524
- * Returns null if the descriptor has no policy.
3525
- * Mirrors Wallet::policies() — serialized because the Policy tree is complex.
3526
- */
3527
4013
  policies(keychain) /*throws*/{
3528
4014
  return FfiConverterOptionalString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3529
4015
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_policies(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
3530
4016
  }, /*liftString:*/FfiConverterString.lift));
3531
4017
  }
3532
-
3533
- /**
3534
- * The public-only descriptor for the given keychain as a string.
3535
- * Mirrors Wallet::public_descriptor().
3536
- */
3537
4018
  publicDescriptor(keychain) /*throws*/{
3538
4019
  return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3539
4020
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_public_descriptor(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
3540
4021
  }, /*liftString:*/FfiConverterString.lift));
3541
4022
  }
3542
-
3543
- /**
3544
- * Reveal all addresses up to and including the given derivation index.
3545
- * Mirrors Wallet::reveal_addresses_to().
3546
- */
3547
4023
  revealAddressesTo(keychain, index) /*throws*/{
3548
4024
  return FfiConverterArrayTypeAddressInfo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3549
4025
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_reveal_addresses_to(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), _uniffiBindgenReactNative.FfiConverterUInt32.lower(index), callStatus);
3550
4026
  }, /*liftString:*/FfiConverterString.lift));
3551
4027
  }
3552
-
3553
- /**
3554
- * Reveal and return the next address at the next derivation index,
3555
- * incrementing the index even if previous addresses are unused.
3556
- * Mirrors Wallet::reveal_next_address().
3557
- */
3558
4028
  revealNextAddress(keychain) /*throws*/{
3559
4029
  return FfiConverterTypeAddressInfo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3560
4030
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_reveal_next_address(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
3561
4031
  }, /*liftString:*/FfiConverterString.lift));
3562
4032
  }
3563
-
3564
- /**
3565
- * Build, sign, and broadcast a simple payment in one call. Returns txid.
3566
- * Combines build_tx → sign → broadcast via Esplora.
3567
- */
3568
4033
  async send(address, amountSats, feeRate, esploraUrl, asyncOpts_) /*throws*/{
3569
4034
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
3570
4035
  try {
@@ -3578,41 +4043,42 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
3578
4043
  throw __error;
3579
4044
  }
3580
4045
  }
3581
-
3582
- /**
3583
- * How much was sent from / received into the wallet for a raw tx (hex).
3584
- * Mirrors Wallet::sent_and_received().
3585
- */
4046
+ async sendWithElectrum(address, amountSats, feeRate, client, asyncOpts_) /*throws*/{
4047
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
4048
+ try {
4049
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
4050
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_send_with_electrum(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(address), _uniffiBindgenReactNative.FfiConverterUInt64.lower(amountSats), _uniffiBindgenReactNative.FfiConverterFloat64.lower(feeRate), FfiConverterTypeElectrumClient.lower(client));
4051
+ }, /*pollFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_poll_rust_buffer, /*cancelFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_cancel_rust_buffer, /*completeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_complete_rust_buffer, /*freeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterString.lift.bind(FfiConverterString), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError));
4052
+ } catch (__error) {
4053
+ if (uniffiIsDebug && __error instanceof Error) {
4054
+ __error.stack = __stack;
4055
+ }
4056
+ throw __error;
4057
+ }
4058
+ }
3586
4059
  sentAndReceived(txHex) /*throws*/{
3587
4060
  return FfiConverterTypeSentAndReceived.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3588
4061
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_sent_and_received(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txHex), callStatus);
3589
4062
  }, /*liftString:*/FfiConverterString.lift));
3590
4063
  }
3591
-
3592
- /**
3593
- * Sign all inputs in the PSBT that this wallet can sign.
3594
- * Returns true if the PSBT is fully finalized after signing.
3595
- * Mirrors Wallet::sign() with default SignOptions.
3596
- */
3597
4064
  sign(psbt) /*throws*/{
3598
4065
  return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3599
4066
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_sign(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypePsbt.lower(psbt), callStatus);
3600
4067
  }, /*liftString:*/FfiConverterString.lift));
3601
4068
  }
3602
-
3603
- /**
3604
- * Incremental sync via Electrum.
3605
- */
3606
- syncWithElectrum(url, stopGap) /*throws*/{
3607
- uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3608
- (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_sync_with_electrum(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(url), _uniffiBindgenReactNative.FfiConverterUInt64.lower(stopGap), callStatus);
3609
- }, /*liftString:*/FfiConverterString.lift);
4069
+ async syncWithElectrum(client, stopGap, asyncOpts_) /*throws*/{
4070
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
4071
+ try {
4072
+ return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
4073
+ return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_sync_with_electrum(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeElectrumClient.lower(client), _uniffiBindgenReactNative.FfiConverterUInt64.lower(stopGap));
4074
+ }, /*pollFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_poll_void, /*cancelFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_cancel_void, /*completeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_complete_void, /*freeFunc:*/(0, _bdk_ffiFfi.default)().ubrn_ffi_bdk_ffi_rust_future_free_void, /*liftFunc:*/_v => {}, /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError));
4075
+ } catch (__error) {
4076
+ if (uniffiIsDebug && __error instanceof Error) {
4077
+ __error.stack = __stack;
4078
+ }
4079
+ throw __error;
4080
+ }
3610
4081
  }
3611
-
3612
- /**
3613
- * Incremental sync via Esplora (only checks revealed SPKs + UTXOs + unconfirmed).
3614
- * Uses Wallet::start_sync_with_revealed_spks() + bdk_esplora client internally.
3615
- */
3616
4082
  async syncWithEsplora(url, stopGap, asyncOpts_) /*throws*/{
3617
4083
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
3618
4084
  try {
@@ -3626,31 +4092,16 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
3626
4092
  throw __error;
3627
4093
  }
3628
4094
  }
3629
-
3630
- /**
3631
- * All wallet-relevant canonical transactions.
3632
- * Mirrors Wallet::transactions() → mapped to TxDetails.
3633
- */
3634
4095
  transactions() /*throws*/{
3635
4096
  return FfiConverterArrayTypeTxDetails.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3636
4097
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_transactions(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
3637
4098
  }, /*liftString:*/FfiConverterString.lift));
3638
4099
  }
3639
-
3640
- /**
3641
- * Details for a single transaction. Returns null if not found.
3642
- * Mirrors Wallet::tx_details().
3643
- */
3644
4100
  txDetails(txid) /*throws*/{
3645
4101
  return FfiConverterOptionalTypeTxDetails.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
3646
4102
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_tx_details(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txid), callStatus);
3647
4103
  }, /*liftString:*/FfiConverterString.lift));
3648
4104
  }
3649
-
3650
- /**
3651
- * Mark an address index as unused (returns true if previously used).
3652
- * Mirrors Wallet::unmark_used().
3653
- */
3654
4105
  unmarkUsed(keychain, index) {
3655
4106
  return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
3656
4107
  return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_unmark_used(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), _uniffiBindgenReactNative.FfiConverterUInt32.lower(index), callStatus);
@@ -3707,7 +4158,7 @@ const uniffiTypeWalletObjectFactory = (() => {
3707
4158
  }
3708
4159
  };
3709
4160
  })();
3710
- // FfiConverter for WalletInterface
4161
+ // FfiConverter for WalletLike
3711
4162
  const FfiConverterTypeWallet = new _uniffiBindgenReactNative.FfiConverterObject(uniffiTypeWalletObjectFactory);
3712
4163
 
3713
4164
  // FfiConverter for /*f64*/number | undefined
@@ -3794,6 +4245,9 @@ function uniffiEnsureInitialized() {
3794
4245
  if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_func_create_single_key_descriptor() !== 56046) {
3795
4246
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_func_create_single_key_descriptor");
3796
4247
  }
4248
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_func_create_wallet() !== 63339) {
4249
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_func_create_wallet");
4250
+ }
3797
4251
  if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_func_export_wallet() !== 53701) {
3798
4252
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_func_export_wallet");
3799
4253
  }
@@ -3806,258 +4260,267 @@ function uniffiEnsureInitialized() {
3806
4260
  if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_func_wallet_name_from_descriptor() !== 14974) {
3807
4261
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_func_wallet_name_from_descriptor");
3808
4262
  }
3809
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_mnemonic_language() !== 21218) {
4263
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_mnemonic_language() !== 59902) {
3810
4264
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_mnemonic_language");
3811
4265
  }
3812
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_mnemonic_to_seed_hex() !== 4827) {
4266
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_mnemonic_to_seed_hex() !== 33743) {
3813
4267
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_mnemonic_to_seed_hex");
3814
4268
  }
3815
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_mnemonic_to_string() !== 9706) {
4269
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_mnemonic_to_string() !== 8571) {
3816
4270
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_mnemonic_to_string");
3817
4271
  }
3818
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_mnemonic_word_count() !== 43660) {
4272
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_mnemonic_word_count() !== 23669) {
3819
4273
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_mnemonic_word_count");
3820
4274
  }
3821
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_mnemonic_words() !== 43060) {
4275
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_mnemonic_words() !== 27352) {
3822
4276
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_mnemonic_words");
3823
4277
  }
3824
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_psbt_extract_tx_hex() !== 55644) {
4278
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_psbt_extract_tx_hex() !== 11167) {
3825
4279
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_psbt_extract_tx_hex");
3826
4280
  }
3827
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_psbt_fee_amount() !== 56607) {
4281
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_psbt_fee_amount() !== 44530) {
3828
4282
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_psbt_fee_amount");
3829
4283
  }
3830
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_psbt_fee_rate() !== 60372) {
4284
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_psbt_fee_rate() !== 7329) {
3831
4285
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_psbt_fee_rate");
3832
4286
  }
3833
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_psbt_get_utxo_for() !== 21092) {
4287
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_psbt_get_utxo_for() !== 1731) {
3834
4288
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_psbt_get_utxo_for");
3835
4289
  }
3836
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_psbt_to_base64() !== 51389) {
4290
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_psbt_to_base64() !== 47613) {
3837
4291
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_psbt_to_base64");
3838
4292
  }
3839
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_psbt_txid() !== 48234) {
4293
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_psbt_txid() !== 56652) {
3840
4294
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_psbt_txid");
3841
4295
  }
3842
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_add_data() !== 24171) {
4296
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_add_data() !== 57070) {
3843
4297
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_add_data");
3844
4298
  }
3845
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_add_global_xpubs() !== 49750) {
4299
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_add_global_xpubs() !== 53720) {
3846
4300
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_add_global_xpubs");
3847
4301
  }
3848
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_add_recipient() !== 4691) {
4302
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_add_recipient() !== 55150) {
3849
4303
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_add_recipient");
3850
4304
  }
3851
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_add_unspendable() !== 34998) {
4305
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_add_unspendable() !== 56609) {
3852
4306
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_add_unspendable");
3853
4307
  }
3854
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_add_utxo() !== 20705) {
4308
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_add_utxo() !== 10770) {
3855
4309
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_add_utxo");
3856
4310
  }
3857
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_add_utxos() !== 35571) {
4311
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_add_utxos() !== 8534) {
3858
4312
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_add_utxos");
3859
4313
  }
3860
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_allow_dust() !== 56022) {
4314
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_allow_dust() !== 43752) {
3861
4315
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_allow_dust");
3862
4316
  }
3863
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_change_policy() !== 46342) {
4317
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_change_policy() !== 6977) {
3864
4318
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_change_policy");
3865
4319
  }
3866
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_current_height() !== 46986) {
4320
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_current_height() !== 62295) {
3867
4321
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_current_height");
3868
4322
  }
3869
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_do_not_spend_change() !== 50138) {
4323
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_do_not_spend_change() !== 13462) {
3870
4324
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_do_not_spend_change");
3871
4325
  }
3872
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_drain_to() !== 33757) {
4326
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_drain_to() !== 33773) {
3873
4327
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_drain_to");
3874
4328
  }
3875
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_drain_wallet() !== 46414) {
4329
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_drain_wallet() !== 48711) {
3876
4330
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_drain_wallet");
3877
4331
  }
3878
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_enable_rbf() !== 16464) {
4332
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_enable_rbf() !== 31683) {
3879
4333
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_enable_rbf");
3880
4334
  }
3881
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_enable_rbf_with_sequence() !== 21779) {
4335
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_enable_rbf_with_sequence() !== 7301) {
3882
4336
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_enable_rbf_with_sequence");
3883
4337
  }
3884
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_exclude_below_confirmations() !== 8223) {
4338
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_exclude_below_confirmations() !== 61197) {
3885
4339
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_exclude_below_confirmations");
3886
4340
  }
3887
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_exclude_unconfirmed() !== 63153) {
4341
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_exclude_unconfirmed() !== 59334) {
3888
4342
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_exclude_unconfirmed");
3889
4343
  }
3890
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_fee_absolute() !== 18715) {
4344
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_fee_absolute() !== 38654) {
3891
4345
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_fee_absolute");
3892
4346
  }
3893
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_fee_rate() !== 61803) {
4347
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_fee_rate() !== 2789) {
3894
4348
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_fee_rate");
3895
4349
  }
3896
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_finish() !== 34471) {
4350
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_finish() !== 23648) {
3897
4351
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_finish");
3898
4352
  }
3899
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_include_output_redeem_witness_script() !== 41756) {
4353
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_include_output_redeem_witness_script() !== 1428) {
3900
4354
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_include_output_redeem_witness_script");
3901
4355
  }
3902
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_manually_selected_only() !== 61274) {
4356
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_manually_selected_only() !== 15817) {
3903
4357
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_manually_selected_only");
3904
4358
  }
3905
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_nlocktime() !== 33063) {
4359
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_nlocktime() !== 5541) {
3906
4360
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_nlocktime");
3907
4361
  }
3908
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_only_spend_change() !== 4190) {
4362
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_only_spend_change() !== 34933) {
3909
4363
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_only_spend_change");
3910
4364
  }
3911
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_only_witness_utxo() !== 16994) {
4365
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_only_witness_utxo() !== 50325) {
3912
4366
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_only_witness_utxo");
3913
4367
  }
3914
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_ordering() !== 46942) {
4368
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_ordering() !== 27106) {
3915
4369
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_ordering");
3916
4370
  }
3917
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_policy_path() !== 3595) {
4371
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_policy_path() !== 18350) {
3918
4372
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_policy_path");
3919
4373
  }
3920
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_set_exact_sequence() !== 63261) {
4374
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_set_exact_sequence() !== 25054) {
3921
4375
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_set_exact_sequence");
3922
4376
  }
3923
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_set_recipients() !== 28721) {
4377
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_set_recipients() !== 45616) {
3924
4378
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_set_recipients");
3925
4379
  }
3926
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_sighash() !== 22878) {
4380
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_sighash() !== 56408) {
3927
4381
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_sighash");
3928
4382
  }
3929
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_tx_version() !== 13770) {
4383
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_tx_version() !== 32700) {
3930
4384
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_tx_version");
3931
4385
  }
3932
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_unspendable() !== 28900) {
4386
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_unspendable() !== 10665) {
3933
4387
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_unspendable");
3934
4388
  }
3935
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_broadcast_with_electrum() !== 14979) {
4389
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_broadcast_with_electrum() !== 26438) {
3936
4390
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_broadcast_with_electrum");
3937
4391
  }
3938
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_broadcast_with_esplora() !== 28791) {
4392
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_broadcast_with_esplora() !== 37423) {
3939
4393
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_broadcast_with_esplora");
3940
4394
  }
3941
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_build_fee_bump() !== 47809) {
4395
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_build_fee_bump() !== 36133) {
3942
4396
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_build_fee_bump");
3943
4397
  }
3944
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_calculate_fee() !== 46069) {
4398
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_calculate_fee() !== 47950) {
3945
4399
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_calculate_fee");
3946
4400
  }
3947
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_calculate_fee_rate() !== 23249) {
4401
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_calculate_fee_rate() !== 64903) {
3948
4402
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_calculate_fee_rate");
3949
4403
  }
3950
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_cancel_tx() !== 58967) {
4404
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_cancel_tx() !== 39828) {
3951
4405
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_cancel_tx");
3952
4406
  }
3953
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_checkpoints() !== 55082) {
4407
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_checkpoints() !== 44342) {
3954
4408
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_checkpoints");
3955
4409
  }
3956
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_derivation_index() !== 63256) {
4410
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_derivation_index() !== 14373) {
3957
4411
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_derivation_index");
3958
4412
  }
3959
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_derivation_of_spk() !== 22939) {
4413
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_derivation_of_spk() !== 44475) {
3960
4414
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_derivation_of_spk");
3961
4415
  }
3962
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_descriptor_checksum() !== 64735) {
4416
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_descriptor_checksum() !== 25926) {
3963
4417
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_descriptor_checksum");
3964
4418
  }
3965
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_drain() !== 24840) {
4419
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_drain() !== 47076) {
3966
4420
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_drain");
3967
4421
  }
3968
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_finalize_psbt() !== 22273) {
4422
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_drain_with_electrum() !== 42924) {
4423
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_drain_with_electrum");
4424
+ }
4425
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_finalize_psbt() !== 43414) {
3969
4426
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_finalize_psbt");
3970
4427
  }
3971
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_full_scan_with_electrum() !== 15611) {
4428
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_full_scan_with_electrum() !== 40837) {
3972
4429
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_full_scan_with_electrum");
3973
4430
  }
3974
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_full_scan_with_esplora() !== 43655) {
4431
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_full_scan_with_esplora() !== 39717) {
3975
4432
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_full_scan_with_esplora");
3976
4433
  }
3977
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_get_balance() !== 18605) {
4434
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_get_balance() !== 22733) {
3978
4435
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_get_balance");
3979
4436
  }
3980
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_get_tx() !== 58042) {
4437
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_get_tx() !== 59477) {
3981
4438
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_get_tx");
3982
4439
  }
3983
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_get_utxo() !== 47916) {
4440
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_get_utxo() !== 35239) {
3984
4441
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_get_utxo");
3985
4442
  }
3986
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_insert_txout() !== 33605) {
4443
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_insert_txout() !== 32676) {
3987
4444
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_insert_txout");
3988
4445
  }
3989
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_is_mine() !== 27949) {
4446
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_is_mine() !== 45210) {
3990
4447
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_is_mine");
3991
4448
  }
3992
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_keychains() !== 1009) {
4449
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_keychains() !== 22099) {
3993
4450
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_keychains");
3994
4451
  }
3995
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_latest_checkpoint() !== 5951) {
4452
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_latest_checkpoint() !== 37521) {
3996
4453
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_latest_checkpoint");
3997
4454
  }
3998
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_list_output() !== 35186) {
4455
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_list_output() !== 21768) {
3999
4456
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_list_output");
4000
4457
  }
4001
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_list_unspent() !== 590) {
4458
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_list_unspent() !== 13240) {
4002
4459
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_list_unspent");
4003
4460
  }
4004
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_list_unused_addresses() !== 63031) {
4461
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_list_unused_addresses() !== 11229) {
4005
4462
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_list_unused_addresses");
4006
4463
  }
4007
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_mark_used() !== 53427) {
4464
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_mark_used() !== 63278) {
4008
4465
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_mark_used");
4009
4466
  }
4010
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_network() !== 18889) {
4467
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_network() !== 50311) {
4011
4468
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_network");
4012
4469
  }
4013
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_next_derivation_index() !== 28145) {
4470
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_next_derivation_index() !== 50867) {
4014
4471
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_next_derivation_index");
4015
4472
  }
4016
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_next_unused_address() !== 58812) {
4473
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_next_unused_address() !== 51015) {
4017
4474
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_next_unused_address");
4018
4475
  }
4019
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_peek_address() !== 56579) {
4476
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_peek_address() !== 10883) {
4020
4477
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_peek_address");
4021
4478
  }
4022
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_persist() !== 18685) {
4479
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_persist() !== 34809) {
4023
4480
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_persist");
4024
4481
  }
4025
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_policies() !== 64896) {
4482
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_policies() !== 31626) {
4026
4483
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_policies");
4027
4484
  }
4028
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_public_descriptor() !== 19031) {
4485
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_public_descriptor() !== 58604) {
4029
4486
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_public_descriptor");
4030
4487
  }
4031
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_reveal_addresses_to() !== 55968) {
4488
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_reveal_addresses_to() !== 12682) {
4032
4489
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_reveal_addresses_to");
4033
4490
  }
4034
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_reveal_next_address() !== 61535) {
4491
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_reveal_next_address() !== 25820) {
4035
4492
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_reveal_next_address");
4036
4493
  }
4037
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_send() !== 51484) {
4494
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_send() !== 4457) {
4038
4495
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_send");
4039
4496
  }
4040
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_sent_and_received() !== 31024) {
4497
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_send_with_electrum() !== 23570) {
4498
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_send_with_electrum");
4499
+ }
4500
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_sent_and_received() !== 949) {
4041
4501
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_sent_and_received");
4042
4502
  }
4043
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_sign() !== 49926) {
4503
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_sign() !== 32193) {
4044
4504
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_sign");
4045
4505
  }
4046
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_sync_with_electrum() !== 58815) {
4506
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_sync_with_electrum() !== 17015) {
4047
4507
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_sync_with_electrum");
4048
4508
  }
4049
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_sync_with_esplora() !== 55793) {
4509
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_sync_with_esplora() !== 28111) {
4050
4510
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_sync_with_esplora");
4051
4511
  }
4052
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_transactions() !== 13072) {
4512
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_transactions() !== 33179) {
4053
4513
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_transactions");
4054
4514
  }
4055
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_tx_details() !== 60609) {
4515
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_tx_details() !== 15355) {
4056
4516
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_tx_details");
4057
4517
  }
4058
- if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_unmark_used() !== 25591) {
4518
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_unmark_used() !== 46731) {
4059
4519
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_unmark_used");
4060
4520
  }
4521
+ if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_constructor_electrumclient_new() !== 63288) {
4522
+ throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_constructor_electrumclient_new");
4523
+ }
4061
4524
  if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_constructor_mnemonic_from_entropy() !== 37039) {
4062
4525
  throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_constructor_mnemonic_from_entropy");
4063
4526
  }
@@ -4094,6 +4557,7 @@ var _default = exports.default = Object.freeze({
4094
4557
  FfiConverterTypeConfirmationBlockTime,
4095
4558
  FfiConverterTypeDerivationInfo,
4096
4559
  FfiConverterTypeDescriptorTemplate,
4560
+ FfiConverterTypeElectrumClient,
4097
4561
  FfiConverterTypeKeychainInfo,
4098
4562
  FfiConverterTypeKeychainKind,
4099
4563
  FfiConverterTypeLanguage,