react-native-bdk-sdk 0.1.4 → 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.
- package/cpp/generated/bdk_ffi.cpp +223 -12
- package/cpp/generated/bdk_ffi.hpp +11 -0
- package/lib/commonjs/generated/bdk_ffi-ffi.js.map +1 -1
- package/lib/commonjs/generated/bdk_ffi.js +1817 -1262
- package/lib/commonjs/generated/bdk_ffi.js.map +1 -1
- package/lib/module/generated/bdk_ffi-ffi.js.map +1 -1
- package/lib/module/generated/bdk_ffi.js +1815 -1262
- package/lib/module/generated/bdk_ffi.js.map +1 -1
- package/lib/typescript/commonjs/src/generated/bdk_ffi-ffi.d.ts +15 -4
- package/lib/typescript/commonjs/src/generated/bdk_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/generated/bdk_ffi.d.ts +3308 -1824
- package/lib/typescript/commonjs/src/generated/bdk_ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bdk_ffi-ffi.d.ts +15 -4
- package/lib/typescript/module/src/generated/bdk_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/generated/bdk_ffi.d.ts +3308 -1824
- package/lib/typescript/module/src/generated/bdk_ffi.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/generated/bdk_ffi-ffi.ts +43 -5
- package/src/generated/bdk_ffi.ts +2522 -1696
|
@@ -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
|
|
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
|
|
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
|
*/
|
|
@@ -135,12 +140,6 @@ const FfiConverterTypeAddressInfo = (() => {
|
|
|
135
140
|
}
|
|
136
141
|
return new FFIConverter();
|
|
137
142
|
})();
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Wallet balance split into categories. All values in satoshis.
|
|
141
|
-
* Mirrors bdk_wallet::Balance (re-exported from bdk_chain).
|
|
142
|
-
*/
|
|
143
|
-
|
|
144
143
|
/**
|
|
145
144
|
* Generated factory for {@link Balance} record objects.
|
|
146
145
|
*/
|
|
@@ -181,11 +180,6 @@ const FfiConverterTypeBalance = (() => {
|
|
|
181
180
|
}
|
|
182
181
|
return new FFIConverter();
|
|
183
182
|
})();
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* A block identifier (height + hash). Mirrors bdk_chain::BlockId.
|
|
187
|
-
*/
|
|
188
|
-
|
|
189
183
|
/**
|
|
190
184
|
* Generated factory for {@link BlockId} record objects.
|
|
191
185
|
*/
|
|
@@ -218,12 +212,6 @@ const FfiConverterTypeBlockId = (() => {
|
|
|
218
212
|
}
|
|
219
213
|
return new FFIConverter();
|
|
220
214
|
})();
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Block position for a confirmed transaction/output.
|
|
224
|
-
* Mirrors bdk_chain::ConfirmationBlockTime.
|
|
225
|
-
*/
|
|
226
|
-
|
|
227
215
|
/**
|
|
228
216
|
* Generated factory for {@link ConfirmationBlockTime} record objects.
|
|
229
217
|
*/
|
|
@@ -258,11 +246,6 @@ const FfiConverterTypeConfirmationBlockTime = (() => {
|
|
|
258
246
|
}
|
|
259
247
|
return new FFIConverter();
|
|
260
248
|
})();
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* Derivation info for a scriptPubKey belonging to the wallet.
|
|
264
|
-
*/
|
|
265
|
-
|
|
266
249
|
/**
|
|
267
250
|
* Generated factory for {@link DerivationInfo} record objects.
|
|
268
251
|
*/
|
|
@@ -295,11 +278,6 @@ const FfiConverterTypeDerivationInfo = (() => {
|
|
|
295
278
|
}
|
|
296
279
|
return new FFIConverter();
|
|
297
280
|
})();
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Info about a keychain and its associated descriptor.
|
|
301
|
-
*/
|
|
302
|
-
|
|
303
281
|
/**
|
|
304
282
|
* Generated factory for {@link KeychainInfo} record objects.
|
|
305
283
|
*/
|
|
@@ -332,11 +310,6 @@ const FfiConverterTypeKeychainInfo = (() => {
|
|
|
332
310
|
}
|
|
333
311
|
return new FFIConverter();
|
|
334
312
|
})();
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* A wallet-owned output (spent or unspent). Mirrors bdk_wallet::LocalOutput.
|
|
338
|
-
*/
|
|
339
|
-
|
|
340
313
|
/**
|
|
341
314
|
* Generated factory for {@link LocalOutput} record objects.
|
|
342
315
|
*/
|
|
@@ -377,11 +350,6 @@ const FfiConverterTypeLocalOutput = (() => {
|
|
|
377
350
|
}
|
|
378
351
|
return new FFIConverter();
|
|
379
352
|
})();
|
|
380
|
-
|
|
381
|
-
/**
|
|
382
|
-
* Reference to a specific transaction output. Mirrors bitcoin::OutPoint.
|
|
383
|
-
*/
|
|
384
|
-
|
|
385
353
|
/**
|
|
386
354
|
* Generated factory for {@link OutPoint} record objects.
|
|
387
355
|
*/
|
|
@@ -414,11 +382,6 @@ const FfiConverterTypeOutPoint = (() => {
|
|
|
414
382
|
}
|
|
415
383
|
return new FFIConverter();
|
|
416
384
|
})();
|
|
417
|
-
|
|
418
|
-
/**
|
|
419
|
-
* A single payment recipient.
|
|
420
|
-
*/
|
|
421
|
-
|
|
422
385
|
/**
|
|
423
386
|
* Generated factory for {@link Recipient} record objects.
|
|
424
387
|
*/
|
|
@@ -451,11 +414,6 @@ const FfiConverterTypeRecipient = (() => {
|
|
|
451
414
|
}
|
|
452
415
|
return new FFIConverter();
|
|
453
416
|
})();
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* How much was sent from / received into the wallet for a given transaction.
|
|
457
|
-
*/
|
|
458
|
-
|
|
459
417
|
/**
|
|
460
418
|
* Generated factory for {@link SentAndReceived} record objects.
|
|
461
419
|
*/
|
|
@@ -488,11 +446,6 @@ const FfiConverterTypeSentAndReceived = (() => {
|
|
|
488
446
|
}
|
|
489
447
|
return new FFIConverter();
|
|
490
448
|
})();
|
|
491
|
-
|
|
492
|
-
/**
|
|
493
|
-
* Full details of a wallet-relevant transaction. Mirrors bdk_wallet::TxDetails.
|
|
494
|
-
*/
|
|
495
|
-
|
|
496
449
|
/**
|
|
497
450
|
* Generated factory for {@link TxDetails} record objects.
|
|
498
451
|
*/
|
|
@@ -537,11 +490,6 @@ const FfiConverterTypeTxDetails = (() => {
|
|
|
537
490
|
}
|
|
538
491
|
return new FFIConverter();
|
|
539
492
|
})();
|
|
540
|
-
|
|
541
|
-
/**
|
|
542
|
-
* A transaction output (value + locking script). Mirrors bitcoin::TxOut.
|
|
543
|
-
*/
|
|
544
|
-
|
|
545
493
|
/**
|
|
546
494
|
* Generated factory for {@link TxOut} record objects.
|
|
547
495
|
*/
|
|
@@ -581,7 +529,9 @@ const stringConverter = {
|
|
|
581
529
|
};
|
|
582
530
|
const FfiConverterString = (0, _uniffiBindgenReactNative.uniffiCreateFfiConverterString)(stringConverter);
|
|
583
531
|
|
|
584
|
-
//
|
|
532
|
+
// Error type: BdkError
|
|
533
|
+
|
|
534
|
+
// Enum: BdkError
|
|
585
535
|
let BdkError_Tags = exports.BdkError_Tags = /*#__PURE__*/function (BdkError_Tags) {
|
|
586
536
|
BdkError_Tags["InvalidDescriptor"] = "InvalidDescriptor";
|
|
587
537
|
BdkError_Tags["WalletCreationFailed"] = "WalletCreationFailed";
|
|
@@ -634,1110 +584,2106 @@ let BdkError_Tags = exports.BdkError_Tags = /*#__PURE__*/function (BdkError_Tags
|
|
|
634
584
|
return BdkError_Tags;
|
|
635
585
|
}({});
|
|
636
586
|
const BdkError = exports.BdkError = (() => {
|
|
637
|
-
class
|
|
587
|
+
class InvalidDescriptor_ extends _uniffiBindgenReactNative.UniffiError {
|
|
638
588
|
/**
|
|
639
589
|
* @private
|
|
640
|
-
* This field is private and should not be used.
|
|
590
|
+
* This field is private and should not be used, use `tag` instead.
|
|
641
591
|
*/
|
|
642
592
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
643
|
-
/**
|
|
644
|
-
* @private
|
|
645
|
-
* This field is private and should not be used.
|
|
646
|
-
*/
|
|
647
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 1;
|
|
648
593
|
tag = BdkError_Tags.InvalidDescriptor;
|
|
649
|
-
constructor(
|
|
650
|
-
super("BdkError", "InvalidDescriptor"
|
|
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);
|
|
651
606
|
}
|
|
652
|
-
static
|
|
653
|
-
return
|
|
607
|
+
static getInner(obj) {
|
|
608
|
+
return obj.inner;
|
|
654
609
|
}
|
|
655
610
|
}
|
|
656
|
-
class
|
|
611
|
+
class WalletCreationFailed_ extends _uniffiBindgenReactNative.UniffiError {
|
|
657
612
|
/**
|
|
658
613
|
* @private
|
|
659
|
-
* This field is private and should not be used.
|
|
614
|
+
* This field is private and should not be used, use `tag` instead.
|
|
660
615
|
*/
|
|
661
616
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
662
|
-
/**
|
|
663
|
-
* @private
|
|
664
|
-
* This field is private and should not be used.
|
|
665
|
-
*/
|
|
666
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 2;
|
|
667
617
|
tag = BdkError_Tags.WalletCreationFailed;
|
|
668
|
-
constructor(
|
|
669
|
-
super("BdkError", "WalletCreationFailed"
|
|
618
|
+
constructor(inner) {
|
|
619
|
+
super("BdkError", "WalletCreationFailed");
|
|
620
|
+
this.inner = Object.freeze(inner);
|
|
621
|
+
}
|
|
622
|
+
static new(inner) {
|
|
623
|
+
return new WalletCreationFailed_(inner);
|
|
670
624
|
}
|
|
671
|
-
static instanceOf(
|
|
672
|
-
return
|
|
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;
|
|
673
633
|
}
|
|
674
634
|
}
|
|
675
|
-
class
|
|
635
|
+
class WalletLoadFailed_ extends _uniffiBindgenReactNative.UniffiError {
|
|
676
636
|
/**
|
|
677
637
|
* @private
|
|
678
|
-
* This field is private and should not be used.
|
|
638
|
+
* This field is private and should not be used, use `tag` instead.
|
|
679
639
|
*/
|
|
680
640
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
681
|
-
/**
|
|
682
|
-
* @private
|
|
683
|
-
* This field is private and should not be used.
|
|
684
|
-
*/
|
|
685
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 3;
|
|
686
641
|
tag = BdkError_Tags.WalletLoadFailed;
|
|
687
|
-
constructor(
|
|
688
|
-
super("BdkError", "WalletLoadFailed"
|
|
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);
|
|
689
654
|
}
|
|
690
|
-
static
|
|
691
|
-
return
|
|
655
|
+
static getInner(obj) {
|
|
656
|
+
return obj.inner;
|
|
692
657
|
}
|
|
693
658
|
}
|
|
694
|
-
class
|
|
659
|
+
class WalletLoadMismatch_ extends _uniffiBindgenReactNative.UniffiError {
|
|
695
660
|
/**
|
|
696
661
|
* @private
|
|
697
|
-
* This field is private and should not be used.
|
|
662
|
+
* This field is private and should not be used, use `tag` instead.
|
|
698
663
|
*/
|
|
699
664
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
700
|
-
/**
|
|
701
|
-
* @private
|
|
702
|
-
* This field is private and should not be used.
|
|
703
|
-
*/
|
|
704
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 4;
|
|
705
665
|
tag = BdkError_Tags.WalletLoadMismatch;
|
|
706
|
-
constructor(
|
|
707
|
-
super("BdkError", "WalletLoadMismatch"
|
|
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;
|
|
708
675
|
}
|
|
709
|
-
static
|
|
710
|
-
return instanceOf(
|
|
676
|
+
static hasInner(obj) {
|
|
677
|
+
return WalletLoadMismatch_.instanceOf(obj);
|
|
678
|
+
}
|
|
679
|
+
static getInner(obj) {
|
|
680
|
+
return obj.inner;
|
|
711
681
|
}
|
|
712
682
|
}
|
|
713
|
-
class
|
|
683
|
+
class PersistError_ extends _uniffiBindgenReactNative.UniffiError {
|
|
714
684
|
/**
|
|
715
685
|
* @private
|
|
716
|
-
* This field is private and should not be used.
|
|
686
|
+
* This field is private and should not be used, use `tag` instead.
|
|
717
687
|
*/
|
|
718
688
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
719
|
-
/**
|
|
720
|
-
* @private
|
|
721
|
-
* This field is private and should not be used.
|
|
722
|
-
*/
|
|
723
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 5;
|
|
724
689
|
tag = BdkError_Tags.PersistError;
|
|
725
|
-
constructor(
|
|
726
|
-
super("BdkError", "PersistError"
|
|
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);
|
|
727
702
|
}
|
|
728
|
-
static
|
|
729
|
-
return
|
|
703
|
+
static getInner(obj) {
|
|
704
|
+
return obj.inner;
|
|
730
705
|
}
|
|
731
706
|
}
|
|
732
|
-
class
|
|
707
|
+
class InvalidAddress_ extends _uniffiBindgenReactNative.UniffiError {
|
|
733
708
|
/**
|
|
734
709
|
* @private
|
|
735
|
-
* This field is private and should not be used.
|
|
710
|
+
* This field is private and should not be used, use `tag` instead.
|
|
736
711
|
*/
|
|
737
712
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
738
|
-
/**
|
|
739
|
-
* @private
|
|
740
|
-
* This field is private and should not be used.
|
|
741
|
-
*/
|
|
742
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 6;
|
|
743
713
|
tag = BdkError_Tags.InvalidAddress;
|
|
744
|
-
constructor(
|
|
745
|
-
super("BdkError", "InvalidAddress"
|
|
714
|
+
constructor(inner) {
|
|
715
|
+
super("BdkError", "InvalidAddress");
|
|
716
|
+
this.inner = Object.freeze(inner);
|
|
717
|
+
}
|
|
718
|
+
static new(inner) {
|
|
719
|
+
return new InvalidAddress_(inner);
|
|
746
720
|
}
|
|
747
|
-
static instanceOf(
|
|
748
|
-
return
|
|
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;
|
|
749
729
|
}
|
|
750
730
|
}
|
|
751
|
-
class
|
|
731
|
+
class InvalidScript_ extends _uniffiBindgenReactNative.UniffiError {
|
|
752
732
|
/**
|
|
753
733
|
* @private
|
|
754
|
-
* This field is private and should not be used.
|
|
734
|
+
* This field is private and should not be used, use `tag` instead.
|
|
755
735
|
*/
|
|
756
736
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
757
|
-
/**
|
|
758
|
-
* @private
|
|
759
|
-
* This field is private and should not be used.
|
|
760
|
-
*/
|
|
761
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 7;
|
|
762
737
|
tag = BdkError_Tags.InvalidScript;
|
|
763
|
-
constructor(
|
|
764
|
-
super("BdkError", "InvalidScript"
|
|
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);
|
|
765
750
|
}
|
|
766
|
-
static
|
|
767
|
-
return
|
|
751
|
+
static getInner(obj) {
|
|
752
|
+
return obj.inner;
|
|
768
753
|
}
|
|
769
754
|
}
|
|
770
|
-
class
|
|
755
|
+
class TransactionBuildFailed_ extends _uniffiBindgenReactNative.UniffiError {
|
|
771
756
|
/**
|
|
772
757
|
* @private
|
|
773
|
-
* This field is private and should not be used.
|
|
758
|
+
* This field is private and should not be used, use `tag` instead.
|
|
774
759
|
*/
|
|
775
760
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
776
|
-
/**
|
|
777
|
-
* @private
|
|
778
|
-
* This field is private and should not be used.
|
|
779
|
-
*/
|
|
780
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 8;
|
|
781
761
|
tag = BdkError_Tags.TransactionBuildFailed;
|
|
782
|
-
constructor(
|
|
783
|
-
super("BdkError", "TransactionBuildFailed"
|
|
762
|
+
constructor(inner) {
|
|
763
|
+
super("BdkError", "TransactionBuildFailed");
|
|
764
|
+
this.inner = Object.freeze(inner);
|
|
784
765
|
}
|
|
785
|
-
static
|
|
786
|
-
return
|
|
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;
|
|
787
777
|
}
|
|
788
778
|
}
|
|
789
|
-
class
|
|
779
|
+
class NoRecipients_ extends _uniffiBindgenReactNative.UniffiError {
|
|
790
780
|
/**
|
|
791
781
|
* @private
|
|
792
|
-
* This field is private and should not be used.
|
|
782
|
+
* This field is private and should not be used, use `tag` instead.
|
|
793
783
|
*/
|
|
794
784
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
795
|
-
/**
|
|
796
|
-
* @private
|
|
797
|
-
* This field is private and should not be used.
|
|
798
|
-
*/
|
|
799
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 9;
|
|
800
785
|
tag = BdkError_Tags.NoRecipients;
|
|
801
|
-
constructor(
|
|
802
|
-
super("BdkError", "NoRecipients"
|
|
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);
|
|
803
798
|
}
|
|
804
|
-
static
|
|
805
|
-
return
|
|
799
|
+
static getInner(obj) {
|
|
800
|
+
return obj.inner;
|
|
806
801
|
}
|
|
807
802
|
}
|
|
808
|
-
class
|
|
803
|
+
class NoUtxosSelected_ extends _uniffiBindgenReactNative.UniffiError {
|
|
809
804
|
/**
|
|
810
805
|
* @private
|
|
811
|
-
* This field is private and should not be used.
|
|
806
|
+
* This field is private and should not be used, use `tag` instead.
|
|
812
807
|
*/
|
|
813
808
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
814
|
-
/**
|
|
815
|
-
* @private
|
|
816
|
-
* This field is private and should not be used.
|
|
817
|
-
*/
|
|
818
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 10;
|
|
819
809
|
tag = BdkError_Tags.NoUtxosSelected;
|
|
820
|
-
constructor(
|
|
821
|
-
super("BdkError", "NoUtxosSelected"
|
|
810
|
+
constructor(inner) {
|
|
811
|
+
super("BdkError", "NoUtxosSelected");
|
|
812
|
+
this.inner = Object.freeze(inner);
|
|
813
|
+
}
|
|
814
|
+
static new(inner) {
|
|
815
|
+
return new NoUtxosSelected_(inner);
|
|
822
816
|
}
|
|
823
|
-
static instanceOf(
|
|
824
|
-
return
|
|
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;
|
|
825
825
|
}
|
|
826
826
|
}
|
|
827
|
-
class
|
|
827
|
+
class OutputBelowDustLimit_ extends _uniffiBindgenReactNative.UniffiError {
|
|
828
828
|
/**
|
|
829
829
|
* @private
|
|
830
|
-
* This field is private and should not be used.
|
|
830
|
+
* This field is private and should not be used, use `tag` instead.
|
|
831
831
|
*/
|
|
832
832
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
833
|
-
/**
|
|
834
|
-
* @private
|
|
835
|
-
* This field is private and should not be used.
|
|
836
|
-
*/
|
|
837
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 11;
|
|
838
833
|
tag = BdkError_Tags.OutputBelowDustLimit;
|
|
839
|
-
constructor(
|
|
840
|
-
super("BdkError", "OutputBelowDustLimit"
|
|
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);
|
|
841
846
|
}
|
|
842
|
-
static
|
|
843
|
-
return
|
|
847
|
+
static getInner(obj) {
|
|
848
|
+
return obj.inner;
|
|
844
849
|
}
|
|
845
850
|
}
|
|
846
|
-
class
|
|
851
|
+
class InsufficientFunds_ extends _uniffiBindgenReactNative.UniffiError {
|
|
847
852
|
/**
|
|
848
853
|
* @private
|
|
849
|
-
* This field is private and should not be used.
|
|
854
|
+
* This field is private and should not be used, use `tag` instead.
|
|
850
855
|
*/
|
|
851
856
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
852
|
-
/**
|
|
853
|
-
* @private
|
|
854
|
-
* This field is private and should not be used.
|
|
855
|
-
*/
|
|
856
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 12;
|
|
857
857
|
tag = BdkError_Tags.InsufficientFunds;
|
|
858
|
-
constructor(
|
|
859
|
-
super("BdkError", "InsufficientFunds"
|
|
858
|
+
constructor(inner) {
|
|
859
|
+
super("BdkError", "InsufficientFunds");
|
|
860
|
+
this.inner = Object.freeze(inner);
|
|
861
|
+
}
|
|
862
|
+
static new(inner) {
|
|
863
|
+
return new InsufficientFunds_(inner);
|
|
864
|
+
}
|
|
865
|
+
static instanceOf(obj) {
|
|
866
|
+
return obj.tag === BdkError_Tags.InsufficientFunds;
|
|
860
867
|
}
|
|
861
|
-
static
|
|
862
|
-
return instanceOf(
|
|
868
|
+
static hasInner(obj) {
|
|
869
|
+
return InsufficientFunds_.instanceOf(obj);
|
|
870
|
+
}
|
|
871
|
+
static getInner(obj) {
|
|
872
|
+
return obj.inner;
|
|
863
873
|
}
|
|
864
874
|
}
|
|
865
|
-
class
|
|
875
|
+
class FeeRateTooLow_ extends _uniffiBindgenReactNative.UniffiError {
|
|
866
876
|
/**
|
|
867
877
|
* @private
|
|
868
|
-
* This field is private and should not be used.
|
|
878
|
+
* This field is private and should not be used, use `tag` instead.
|
|
869
879
|
*/
|
|
870
880
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
871
|
-
/**
|
|
872
|
-
* @private
|
|
873
|
-
* This field is private and should not be used.
|
|
874
|
-
*/
|
|
875
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 13;
|
|
876
881
|
tag = BdkError_Tags.FeeRateTooLow;
|
|
877
|
-
constructor(
|
|
878
|
-
super("BdkError", "FeeRateTooLow"
|
|
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);
|
|
879
894
|
}
|
|
880
|
-
static
|
|
881
|
-
return
|
|
895
|
+
static getInner(obj) {
|
|
896
|
+
return obj.inner;
|
|
882
897
|
}
|
|
883
898
|
}
|
|
884
|
-
class
|
|
899
|
+
class FeeTooLow_ extends _uniffiBindgenReactNative.UniffiError {
|
|
885
900
|
/**
|
|
886
901
|
* @private
|
|
887
|
-
* This field is private and should not be used.
|
|
902
|
+
* This field is private and should not be used, use `tag` instead.
|
|
888
903
|
*/
|
|
889
904
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
890
|
-
/**
|
|
891
|
-
* @private
|
|
892
|
-
* This field is private and should not be used.
|
|
893
|
-
*/
|
|
894
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 14;
|
|
895
905
|
tag = BdkError_Tags.FeeTooLow;
|
|
896
|
-
constructor(
|
|
897
|
-
super("BdkError", "FeeTooLow"
|
|
906
|
+
constructor(inner) {
|
|
907
|
+
super("BdkError", "FeeTooLow");
|
|
908
|
+
this.inner = Object.freeze(inner);
|
|
909
|
+
}
|
|
910
|
+
static new(inner) {
|
|
911
|
+
return new FeeTooLow_(inner);
|
|
898
912
|
}
|
|
899
|
-
static instanceOf(
|
|
900
|
-
return
|
|
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;
|
|
901
921
|
}
|
|
902
922
|
}
|
|
903
|
-
class
|
|
923
|
+
class LockTimeConflict_ extends _uniffiBindgenReactNative.UniffiError {
|
|
904
924
|
/**
|
|
905
925
|
* @private
|
|
906
|
-
* This field is private and should not be used.
|
|
926
|
+
* This field is private and should not be used, use `tag` instead.
|
|
907
927
|
*/
|
|
908
928
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
909
|
-
/**
|
|
910
|
-
* @private
|
|
911
|
-
* This field is private and should not be used.
|
|
912
|
-
*/
|
|
913
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 15;
|
|
914
929
|
tag = BdkError_Tags.LockTimeConflict;
|
|
915
|
-
constructor(
|
|
916
|
-
super("BdkError", "LockTimeConflict"
|
|
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);
|
|
917
942
|
}
|
|
918
|
-
static
|
|
919
|
-
return
|
|
943
|
+
static getInner(obj) {
|
|
944
|
+
return obj.inner;
|
|
920
945
|
}
|
|
921
946
|
}
|
|
922
|
-
class
|
|
947
|
+
class RbfSequenceConflict_ extends _uniffiBindgenReactNative.UniffiError {
|
|
923
948
|
/**
|
|
924
949
|
* @private
|
|
925
|
-
* This field is private and should not be used.
|
|
950
|
+
* This field is private and should not be used, use `tag` instead.
|
|
926
951
|
*/
|
|
927
952
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
928
|
-
/**
|
|
929
|
-
* @private
|
|
930
|
-
* This field is private and should not be used.
|
|
931
|
-
*/
|
|
932
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 16;
|
|
933
953
|
tag = BdkError_Tags.RbfSequenceConflict;
|
|
934
|
-
constructor(
|
|
935
|
-
super("BdkError", "RbfSequenceConflict"
|
|
954
|
+
constructor(inner) {
|
|
955
|
+
super("BdkError", "RbfSequenceConflict");
|
|
956
|
+
this.inner = Object.freeze(inner);
|
|
936
957
|
}
|
|
937
|
-
static
|
|
938
|
-
return
|
|
958
|
+
static new(inner) {
|
|
959
|
+
return new RbfSequenceConflict_(inner);
|
|
960
|
+
}
|
|
961
|
+
static instanceOf(obj) {
|
|
962
|
+
return obj.tag === BdkError_Tags.RbfSequenceConflict;
|
|
963
|
+
}
|
|
964
|
+
static hasInner(obj) {
|
|
965
|
+
return RbfSequenceConflict_.instanceOf(obj);
|
|
966
|
+
}
|
|
967
|
+
static getInner(obj) {
|
|
968
|
+
return obj.inner;
|
|
939
969
|
}
|
|
940
970
|
}
|
|
941
|
-
class
|
|
971
|
+
class VersionZero_ extends _uniffiBindgenReactNative.UniffiError {
|
|
942
972
|
/**
|
|
943
973
|
* @private
|
|
944
|
-
* This field is private and should not be used.
|
|
974
|
+
* This field is private and should not be used, use `tag` instead.
|
|
945
975
|
*/
|
|
946
976
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
947
|
-
/**
|
|
948
|
-
* @private
|
|
949
|
-
* This field is private and should not be used.
|
|
950
|
-
*/
|
|
951
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 17;
|
|
952
977
|
tag = BdkError_Tags.VersionZero;
|
|
953
|
-
constructor(
|
|
954
|
-
super("BdkError", "VersionZero"
|
|
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);
|
|
955
990
|
}
|
|
956
|
-
static
|
|
957
|
-
return
|
|
991
|
+
static getInner(obj) {
|
|
992
|
+
return obj.inner;
|
|
958
993
|
}
|
|
959
994
|
}
|
|
960
|
-
class
|
|
995
|
+
class VersionOneCsv_ extends _uniffiBindgenReactNative.UniffiError {
|
|
961
996
|
/**
|
|
962
997
|
* @private
|
|
963
|
-
* This field is private and should not be used.
|
|
998
|
+
* This field is private and should not be used, use `tag` instead.
|
|
964
999
|
*/
|
|
965
1000
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
966
|
-
/**
|
|
967
|
-
* @private
|
|
968
|
-
* This field is private and should not be used.
|
|
969
|
-
*/
|
|
970
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 18;
|
|
971
1001
|
tag = BdkError_Tags.VersionOneCsv;
|
|
972
|
-
constructor(
|
|
973
|
-
super("BdkError", "VersionOneCsv"
|
|
1002
|
+
constructor(inner) {
|
|
1003
|
+
super("BdkError", "VersionOneCsv");
|
|
1004
|
+
this.inner = Object.freeze(inner);
|
|
1005
|
+
}
|
|
1006
|
+
static new(inner) {
|
|
1007
|
+
return new VersionOneCsv_(inner);
|
|
974
1008
|
}
|
|
975
|
-
static instanceOf(
|
|
976
|
-
return
|
|
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;
|
|
977
1017
|
}
|
|
978
1018
|
}
|
|
979
|
-
class
|
|
1019
|
+
class SpendingPolicyRequired_ extends _uniffiBindgenReactNative.UniffiError {
|
|
980
1020
|
/**
|
|
981
1021
|
* @private
|
|
982
|
-
* This field is private and should not be used.
|
|
1022
|
+
* This field is private and should not be used, use `tag` instead.
|
|
983
1023
|
*/
|
|
984
1024
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
985
|
-
/**
|
|
986
|
-
* @private
|
|
987
|
-
* This field is private and should not be used.
|
|
988
|
-
*/
|
|
989
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 19;
|
|
990
1025
|
tag = BdkError_Tags.SpendingPolicyRequired;
|
|
991
|
-
constructor(
|
|
992
|
-
super("BdkError", "SpendingPolicyRequired"
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
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);
|
|
1038
|
+
}
|
|
1039
|
+
static getInner(obj) {
|
|
1040
|
+
return obj.inner;
|
|
996
1041
|
}
|
|
997
1042
|
}
|
|
998
|
-
class
|
|
1043
|
+
class MissingKeyOrigin_ extends _uniffiBindgenReactNative.UniffiError {
|
|
999
1044
|
/**
|
|
1000
1045
|
* @private
|
|
1001
|
-
* This field is private and should not be used.
|
|
1046
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1002
1047
|
*/
|
|
1003
1048
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1004
|
-
/**
|
|
1005
|
-
* @private
|
|
1006
|
-
* This field is private and should not be used.
|
|
1007
|
-
*/
|
|
1008
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 20;
|
|
1009
1049
|
tag = BdkError_Tags.MissingKeyOrigin;
|
|
1010
|
-
constructor(
|
|
1011
|
-
super("BdkError", "MissingKeyOrigin"
|
|
1050
|
+
constructor(inner) {
|
|
1051
|
+
super("BdkError", "MissingKeyOrigin");
|
|
1052
|
+
this.inner = Object.freeze(inner);
|
|
1053
|
+
}
|
|
1054
|
+
static new(inner) {
|
|
1055
|
+
return new MissingKeyOrigin_(inner);
|
|
1012
1056
|
}
|
|
1013
|
-
static instanceOf(
|
|
1014
|
-
return
|
|
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;
|
|
1015
1065
|
}
|
|
1016
1066
|
}
|
|
1017
|
-
class
|
|
1067
|
+
class MissingNonWitnessUtxo_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1018
1068
|
/**
|
|
1019
1069
|
* @private
|
|
1020
|
-
* This field is private and should not be used.
|
|
1070
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1021
1071
|
*/
|
|
1022
1072
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1023
|
-
/**
|
|
1024
|
-
* @private
|
|
1025
|
-
* This field is private and should not be used.
|
|
1026
|
-
*/
|
|
1027
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 21;
|
|
1028
1073
|
tag = BdkError_Tags.MissingNonWitnessUtxo;
|
|
1029
|
-
constructor(
|
|
1030
|
-
super("BdkError", "MissingNonWitnessUtxo"
|
|
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);
|
|
1031
1086
|
}
|
|
1032
|
-
static
|
|
1033
|
-
return
|
|
1087
|
+
static getInner(obj) {
|
|
1088
|
+
return obj.inner;
|
|
1034
1089
|
}
|
|
1035
1090
|
}
|
|
1036
|
-
class
|
|
1091
|
+
class OutpointNotFound_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1037
1092
|
/**
|
|
1038
1093
|
* @private
|
|
1039
|
-
* This field is private and should not be used.
|
|
1094
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1040
1095
|
*/
|
|
1041
1096
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1042
|
-
/**
|
|
1043
|
-
* @private
|
|
1044
|
-
* This field is private and should not be used.
|
|
1045
|
-
*/
|
|
1046
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 22;
|
|
1047
1097
|
tag = BdkError_Tags.OutpointNotFound;
|
|
1048
|
-
constructor(
|
|
1049
|
-
super("BdkError", "OutpointNotFound"
|
|
1098
|
+
constructor(inner) {
|
|
1099
|
+
super("BdkError", "OutpointNotFound");
|
|
1100
|
+
this.inner = Object.freeze(inner);
|
|
1101
|
+
}
|
|
1102
|
+
static new(inner) {
|
|
1103
|
+
return new OutpointNotFound_(inner);
|
|
1104
|
+
}
|
|
1105
|
+
static instanceOf(obj) {
|
|
1106
|
+
return obj.tag === BdkError_Tags.OutpointNotFound;
|
|
1050
1107
|
}
|
|
1051
|
-
static
|
|
1052
|
-
return instanceOf(
|
|
1108
|
+
static hasInner(obj) {
|
|
1109
|
+
return OutpointNotFound_.instanceOf(obj);
|
|
1110
|
+
}
|
|
1111
|
+
static getInner(obj) {
|
|
1112
|
+
return obj.inner;
|
|
1053
1113
|
}
|
|
1054
1114
|
}
|
|
1055
|
-
class
|
|
1115
|
+
class FeeBumpTargetNotFound_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1056
1116
|
/**
|
|
1057
1117
|
* @private
|
|
1058
|
-
* This field is private and should not be used.
|
|
1118
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1059
1119
|
*/
|
|
1060
1120
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1061
|
-
/**
|
|
1062
|
-
* @private
|
|
1063
|
-
* This field is private and should not be used.
|
|
1064
|
-
*/
|
|
1065
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 23;
|
|
1066
1121
|
tag = BdkError_Tags.FeeBumpTargetNotFound;
|
|
1067
|
-
constructor(
|
|
1068
|
-
super("BdkError", "FeeBumpTargetNotFound"
|
|
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);
|
|
1069
1134
|
}
|
|
1070
|
-
static
|
|
1071
|
-
return
|
|
1135
|
+
static getInner(obj) {
|
|
1136
|
+
return obj.inner;
|
|
1072
1137
|
}
|
|
1073
1138
|
}
|
|
1074
|
-
class
|
|
1139
|
+
class FeeBumpAlreadyConfirmed_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1075
1140
|
/**
|
|
1076
1141
|
* @private
|
|
1077
|
-
* This field is private and should not be used.
|
|
1142
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1078
1143
|
*/
|
|
1079
1144
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1080
|
-
/**
|
|
1081
|
-
* @private
|
|
1082
|
-
* This field is private and should not be used.
|
|
1083
|
-
*/
|
|
1084
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 24;
|
|
1085
1145
|
tag = BdkError_Tags.FeeBumpAlreadyConfirmed;
|
|
1086
|
-
constructor(
|
|
1087
|
-
super("BdkError", "FeeBumpAlreadyConfirmed"
|
|
1146
|
+
constructor(inner) {
|
|
1147
|
+
super("BdkError", "FeeBumpAlreadyConfirmed");
|
|
1148
|
+
this.inner = Object.freeze(inner);
|
|
1149
|
+
}
|
|
1150
|
+
static new(inner) {
|
|
1151
|
+
return new FeeBumpAlreadyConfirmed_(inner);
|
|
1088
1152
|
}
|
|
1089
|
-
static instanceOf(
|
|
1090
|
-
return
|
|
1153
|
+
static instanceOf(obj) {
|
|
1154
|
+
return obj.tag === BdkError_Tags.FeeBumpAlreadyConfirmed;
|
|
1155
|
+
}
|
|
1156
|
+
static hasInner(obj) {
|
|
1157
|
+
return FeeBumpAlreadyConfirmed_.instanceOf(obj);
|
|
1158
|
+
}
|
|
1159
|
+
static getInner(obj) {
|
|
1160
|
+
return obj.inner;
|
|
1091
1161
|
}
|
|
1092
1162
|
}
|
|
1093
|
-
class
|
|
1163
|
+
class FeeBumpIrreplaceable_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1094
1164
|
/**
|
|
1095
1165
|
* @private
|
|
1096
|
-
* This field is private and should not be used.
|
|
1166
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1097
1167
|
*/
|
|
1098
1168
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1099
|
-
/**
|
|
1100
|
-
* @private
|
|
1101
|
-
* This field is private and should not be used.
|
|
1102
|
-
*/
|
|
1103
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 25;
|
|
1104
1169
|
tag = BdkError_Tags.FeeBumpIrreplaceable;
|
|
1105
|
-
constructor(
|
|
1106
|
-
super("BdkError", "FeeBumpIrreplaceable"
|
|
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);
|
|
1107
1182
|
}
|
|
1108
|
-
static
|
|
1109
|
-
return
|
|
1183
|
+
static getInner(obj) {
|
|
1184
|
+
return obj.inner;
|
|
1110
1185
|
}
|
|
1111
1186
|
}
|
|
1112
|
-
class
|
|
1187
|
+
class FeeBumpFeeRateUnavailable_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1113
1188
|
/**
|
|
1114
1189
|
* @private
|
|
1115
|
-
* This field is private and should not be used.
|
|
1190
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1116
1191
|
*/
|
|
1117
1192
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1118
|
-
/**
|
|
1119
|
-
* @private
|
|
1120
|
-
* This field is private and should not be used.
|
|
1121
|
-
*/
|
|
1122
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 26;
|
|
1123
1193
|
tag = BdkError_Tags.FeeBumpFeeRateUnavailable;
|
|
1124
|
-
constructor(
|
|
1125
|
-
super("BdkError", "FeeBumpFeeRateUnavailable"
|
|
1194
|
+
constructor(inner) {
|
|
1195
|
+
super("BdkError", "FeeBumpFeeRateUnavailable");
|
|
1196
|
+
this.inner = Object.freeze(inner);
|
|
1126
1197
|
}
|
|
1127
|
-
static
|
|
1128
|
-
return
|
|
1198
|
+
static new(inner) {
|
|
1199
|
+
return new FeeBumpFeeRateUnavailable_(inner);
|
|
1200
|
+
}
|
|
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;
|
|
1129
1209
|
}
|
|
1130
1210
|
}
|
|
1131
|
-
class
|
|
1211
|
+
class FeeBumpInvalidOutputIndex_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1132
1212
|
/**
|
|
1133
1213
|
* @private
|
|
1134
|
-
* This field is private and should not be used.
|
|
1214
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1135
1215
|
*/
|
|
1136
1216
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1137
|
-
/**
|
|
1138
|
-
* @private
|
|
1139
|
-
* This field is private and should not be used.
|
|
1140
|
-
*/
|
|
1141
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 27;
|
|
1142
1217
|
tag = BdkError_Tags.FeeBumpInvalidOutputIndex;
|
|
1143
|
-
constructor(
|
|
1144
|
-
super("BdkError", "FeeBumpInvalidOutputIndex"
|
|
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);
|
|
1145
1230
|
}
|
|
1146
|
-
static
|
|
1147
|
-
return
|
|
1231
|
+
static getInner(obj) {
|
|
1232
|
+
return obj.inner;
|
|
1148
1233
|
}
|
|
1149
1234
|
}
|
|
1150
|
-
class
|
|
1235
|
+
class InvalidPsbt_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1151
1236
|
/**
|
|
1152
1237
|
* @private
|
|
1153
|
-
* This field is private and should not be used.
|
|
1238
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1154
1239
|
*/
|
|
1155
1240
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1156
|
-
/**
|
|
1157
|
-
* @private
|
|
1158
|
-
* This field is private and should not be used.
|
|
1159
|
-
*/
|
|
1160
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 28;
|
|
1161
1241
|
tag = BdkError_Tags.InvalidPsbt;
|
|
1162
|
-
constructor(
|
|
1163
|
-
super("BdkError", "InvalidPsbt"
|
|
1242
|
+
constructor(inner) {
|
|
1243
|
+
super("BdkError", "InvalidPsbt");
|
|
1244
|
+
this.inner = Object.freeze(inner);
|
|
1245
|
+
}
|
|
1246
|
+
static new(inner) {
|
|
1247
|
+
return new InvalidPsbt_(inner);
|
|
1164
1248
|
}
|
|
1165
|
-
static instanceOf(
|
|
1166
|
-
return
|
|
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;
|
|
1167
1257
|
}
|
|
1168
1258
|
}
|
|
1169
|
-
class
|
|
1259
|
+
class SignFailed_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1170
1260
|
/**
|
|
1171
1261
|
* @private
|
|
1172
|
-
* This field is private and should not be used.
|
|
1262
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1173
1263
|
*/
|
|
1174
1264
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1175
|
-
/**
|
|
1176
|
-
* @private
|
|
1177
|
-
* This field is private and should not be used.
|
|
1178
|
-
*/
|
|
1179
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 29;
|
|
1180
1265
|
tag = BdkError_Tags.SignFailed;
|
|
1181
|
-
constructor(
|
|
1182
|
-
super("BdkError", "SignFailed"
|
|
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);
|
|
1183
1278
|
}
|
|
1184
|
-
static
|
|
1185
|
-
return
|
|
1279
|
+
static getInner(obj) {
|
|
1280
|
+
return obj.inner;
|
|
1186
1281
|
}
|
|
1187
1282
|
}
|
|
1188
|
-
class
|
|
1283
|
+
class SignerMissingKey_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1189
1284
|
/**
|
|
1190
1285
|
* @private
|
|
1191
|
-
* This field is private and should not be used.
|
|
1286
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1192
1287
|
*/
|
|
1193
1288
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1194
|
-
/**
|
|
1195
|
-
* @private
|
|
1196
|
-
* This field is private and should not be used.
|
|
1197
|
-
*/
|
|
1198
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 30;
|
|
1199
1289
|
tag = BdkError_Tags.SignerMissingKey;
|
|
1200
|
-
constructor(
|
|
1201
|
-
super("BdkError", "SignerMissingKey"
|
|
1290
|
+
constructor(inner) {
|
|
1291
|
+
super("BdkError", "SignerMissingKey");
|
|
1292
|
+
this.inner = Object.freeze(inner);
|
|
1293
|
+
}
|
|
1294
|
+
static new(inner) {
|
|
1295
|
+
return new SignerMissingKey_(inner);
|
|
1296
|
+
}
|
|
1297
|
+
static instanceOf(obj) {
|
|
1298
|
+
return obj.tag === BdkError_Tags.SignerMissingKey;
|
|
1202
1299
|
}
|
|
1203
|
-
static
|
|
1204
|
-
return instanceOf(
|
|
1300
|
+
static hasInner(obj) {
|
|
1301
|
+
return SignerMissingKey_.instanceOf(obj);
|
|
1302
|
+
}
|
|
1303
|
+
static getInner(obj) {
|
|
1304
|
+
return obj.inner;
|
|
1205
1305
|
}
|
|
1206
1306
|
}
|
|
1207
|
-
class
|
|
1307
|
+
class SignerInvalidKey_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1208
1308
|
/**
|
|
1209
1309
|
* @private
|
|
1210
|
-
* This field is private and should not be used.
|
|
1310
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1211
1311
|
*/
|
|
1212
1312
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1213
|
-
/**
|
|
1214
|
-
* @private
|
|
1215
|
-
* This field is private and should not be used.
|
|
1216
|
-
*/
|
|
1217
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 31;
|
|
1218
1313
|
tag = BdkError_Tags.SignerInvalidKey;
|
|
1219
|
-
constructor(
|
|
1220
|
-
super("BdkError", "SignerInvalidKey"
|
|
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);
|
|
1221
1326
|
}
|
|
1222
|
-
static
|
|
1223
|
-
return
|
|
1327
|
+
static getInner(obj) {
|
|
1328
|
+
return obj.inner;
|
|
1224
1329
|
}
|
|
1225
1330
|
}
|
|
1226
|
-
class
|
|
1331
|
+
class SignerUserCanceled_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1227
1332
|
/**
|
|
1228
1333
|
* @private
|
|
1229
|
-
* This field is private and should not be used.
|
|
1334
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1230
1335
|
*/
|
|
1231
1336
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1232
|
-
/**
|
|
1233
|
-
* @private
|
|
1234
|
-
* This field is private and should not be used.
|
|
1235
|
-
*/
|
|
1236
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 32;
|
|
1237
1337
|
tag = BdkError_Tags.SignerUserCanceled;
|
|
1238
|
-
constructor(
|
|
1239
|
-
super("BdkError", "SignerUserCanceled"
|
|
1338
|
+
constructor(inner) {
|
|
1339
|
+
super("BdkError", "SignerUserCanceled");
|
|
1340
|
+
this.inner = Object.freeze(inner);
|
|
1341
|
+
}
|
|
1342
|
+
static new(inner) {
|
|
1343
|
+
return new SignerUserCanceled_(inner);
|
|
1240
1344
|
}
|
|
1241
|
-
static instanceOf(
|
|
1242
|
-
return
|
|
1345
|
+
static instanceOf(obj) {
|
|
1346
|
+
return obj.tag === BdkError_Tags.SignerUserCanceled;
|
|
1347
|
+
}
|
|
1348
|
+
static hasInner(obj) {
|
|
1349
|
+
return SignerUserCanceled_.instanceOf(obj);
|
|
1350
|
+
}
|
|
1351
|
+
static getInner(obj) {
|
|
1352
|
+
return obj.inner;
|
|
1243
1353
|
}
|
|
1244
1354
|
}
|
|
1245
|
-
class
|
|
1355
|
+
class SignerInputIndexOutOfRange_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1246
1356
|
/**
|
|
1247
1357
|
* @private
|
|
1248
|
-
* This field is private and should not be used.
|
|
1358
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1249
1359
|
*/
|
|
1250
1360
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1251
|
-
/**
|
|
1252
|
-
* @private
|
|
1253
|
-
* This field is private and should not be used.
|
|
1254
|
-
*/
|
|
1255
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 33;
|
|
1256
1361
|
tag = BdkError_Tags.SignerInputIndexOutOfRange;
|
|
1257
|
-
constructor(
|
|
1258
|
-
super("BdkError", "SignerInputIndexOutOfRange"
|
|
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);
|
|
1259
1374
|
}
|
|
1260
|
-
static
|
|
1261
|
-
return
|
|
1375
|
+
static getInner(obj) {
|
|
1376
|
+
return obj.inner;
|
|
1262
1377
|
}
|
|
1263
1378
|
}
|
|
1264
|
-
class
|
|
1379
|
+
class SignerMissingNonWitnessUtxo_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1265
1380
|
/**
|
|
1266
1381
|
* @private
|
|
1267
|
-
* This field is private and should not be used.
|
|
1382
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1268
1383
|
*/
|
|
1269
1384
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1270
|
-
/**
|
|
1271
|
-
* @private
|
|
1272
|
-
* This field is private and should not be used.
|
|
1273
|
-
*/
|
|
1274
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 34;
|
|
1275
1385
|
tag = BdkError_Tags.SignerMissingNonWitnessUtxo;
|
|
1276
|
-
constructor(
|
|
1277
|
-
super("BdkError", "SignerMissingNonWitnessUtxo"
|
|
1386
|
+
constructor(inner) {
|
|
1387
|
+
super("BdkError", "SignerMissingNonWitnessUtxo");
|
|
1388
|
+
this.inner = Object.freeze(inner);
|
|
1278
1389
|
}
|
|
1279
|
-
static
|
|
1280
|
-
return
|
|
1390
|
+
static new(inner) {
|
|
1391
|
+
return new SignerMissingNonWitnessUtxo_(inner);
|
|
1392
|
+
}
|
|
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;
|
|
1281
1401
|
}
|
|
1282
1402
|
}
|
|
1283
|
-
class
|
|
1403
|
+
class SignerMissingWitnessUtxo_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1284
1404
|
/**
|
|
1285
1405
|
* @private
|
|
1286
|
-
* This field is private and should not be used.
|
|
1406
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1287
1407
|
*/
|
|
1288
1408
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1289
|
-
/**
|
|
1290
|
-
* @private
|
|
1291
|
-
* This field is private and should not be used.
|
|
1292
|
-
*/
|
|
1293
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 35;
|
|
1294
1409
|
tag = BdkError_Tags.SignerMissingWitnessUtxo;
|
|
1295
|
-
constructor(
|
|
1296
|
-
super("BdkError", "SignerMissingWitnessUtxo"
|
|
1410
|
+
constructor(inner) {
|
|
1411
|
+
super("BdkError", "SignerMissingWitnessUtxo");
|
|
1412
|
+
this.inner = Object.freeze(inner);
|
|
1413
|
+
}
|
|
1414
|
+
static new(inner) {
|
|
1415
|
+
return new SignerMissingWitnessUtxo_(inner);
|
|
1416
|
+
}
|
|
1417
|
+
static instanceOf(obj) {
|
|
1418
|
+
return obj.tag === BdkError_Tags.SignerMissingWitnessUtxo;
|
|
1419
|
+
}
|
|
1420
|
+
static hasInner(obj) {
|
|
1421
|
+
return SignerMissingWitnessUtxo_.instanceOf(obj);
|
|
1297
1422
|
}
|
|
1298
|
-
static
|
|
1299
|
-
return
|
|
1423
|
+
static getInner(obj) {
|
|
1424
|
+
return obj.inner;
|
|
1300
1425
|
}
|
|
1301
1426
|
}
|
|
1302
|
-
class
|
|
1427
|
+
class SignerMissingWitnessScript_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1303
1428
|
/**
|
|
1304
1429
|
* @private
|
|
1305
|
-
* This field is private and should not be used.
|
|
1430
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1306
1431
|
*/
|
|
1307
1432
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1308
|
-
/**
|
|
1309
|
-
* @private
|
|
1310
|
-
* This field is private and should not be used.
|
|
1311
|
-
*/
|
|
1312
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 36;
|
|
1313
1433
|
tag = BdkError_Tags.SignerMissingWitnessScript;
|
|
1314
|
-
constructor(
|
|
1315
|
-
super("BdkError", "SignerMissingWitnessScript"
|
|
1434
|
+
constructor(inner) {
|
|
1435
|
+
super("BdkError", "SignerMissingWitnessScript");
|
|
1436
|
+
this.inner = Object.freeze(inner);
|
|
1437
|
+
}
|
|
1438
|
+
static new(inner) {
|
|
1439
|
+
return new SignerMissingWitnessScript_(inner);
|
|
1316
1440
|
}
|
|
1317
|
-
static instanceOf(
|
|
1318
|
-
return
|
|
1441
|
+
static instanceOf(obj) {
|
|
1442
|
+
return obj.tag === BdkError_Tags.SignerMissingWitnessScript;
|
|
1443
|
+
}
|
|
1444
|
+
static hasInner(obj) {
|
|
1445
|
+
return SignerMissingWitnessScript_.instanceOf(obj);
|
|
1446
|
+
}
|
|
1447
|
+
static getInner(obj) {
|
|
1448
|
+
return obj.inner;
|
|
1319
1449
|
}
|
|
1320
1450
|
}
|
|
1321
|
-
class
|
|
1451
|
+
class SignerNonStandardSighash_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1322
1452
|
/**
|
|
1323
1453
|
* @private
|
|
1324
|
-
* This field is private and should not be used.
|
|
1454
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1325
1455
|
*/
|
|
1326
1456
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1327
|
-
/**
|
|
1328
|
-
* @private
|
|
1329
|
-
* This field is private and should not be used.
|
|
1330
|
-
*/
|
|
1331
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 37;
|
|
1332
1457
|
tag = BdkError_Tags.SignerNonStandardSighash;
|
|
1333
|
-
constructor(
|
|
1334
|
-
super("BdkError", "SignerNonStandardSighash"
|
|
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);
|
|
1335
1470
|
}
|
|
1336
|
-
static
|
|
1337
|
-
return
|
|
1471
|
+
static getInner(obj) {
|
|
1472
|
+
return obj.inner;
|
|
1338
1473
|
}
|
|
1339
1474
|
}
|
|
1340
|
-
class
|
|
1475
|
+
class SignerInvalidSighash_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1341
1476
|
/**
|
|
1342
1477
|
* @private
|
|
1343
|
-
* This field is private and should not be used.
|
|
1478
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1344
1479
|
*/
|
|
1345
1480
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1346
|
-
/**
|
|
1347
|
-
* @private
|
|
1348
|
-
* This field is private and should not be used.
|
|
1349
|
-
*/
|
|
1350
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 38;
|
|
1351
1481
|
tag = BdkError_Tags.SignerInvalidSighash;
|
|
1352
|
-
constructor(
|
|
1353
|
-
super("BdkError", "SignerInvalidSighash"
|
|
1482
|
+
constructor(inner) {
|
|
1483
|
+
super("BdkError", "SignerInvalidSighash");
|
|
1484
|
+
this.inner = Object.freeze(inner);
|
|
1485
|
+
}
|
|
1486
|
+
static new(inner) {
|
|
1487
|
+
return new SignerInvalidSighash_(inner);
|
|
1488
|
+
}
|
|
1489
|
+
static instanceOf(obj) {
|
|
1490
|
+
return obj.tag === BdkError_Tags.SignerInvalidSighash;
|
|
1354
1491
|
}
|
|
1355
|
-
static
|
|
1356
|
-
return instanceOf(
|
|
1492
|
+
static hasInner(obj) {
|
|
1493
|
+
return SignerInvalidSighash_.instanceOf(obj);
|
|
1494
|
+
}
|
|
1495
|
+
static getInner(obj) {
|
|
1496
|
+
return obj.inner;
|
|
1357
1497
|
}
|
|
1358
1498
|
}
|
|
1359
|
-
class
|
|
1499
|
+
class SyncFailed_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1360
1500
|
/**
|
|
1361
1501
|
* @private
|
|
1362
|
-
* This field is private and should not be used.
|
|
1502
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1363
1503
|
*/
|
|
1364
1504
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1365
|
-
/**
|
|
1366
|
-
* @private
|
|
1367
|
-
* This field is private and should not be used.
|
|
1368
|
-
*/
|
|
1369
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 39;
|
|
1370
1505
|
tag = BdkError_Tags.SyncFailed;
|
|
1371
|
-
constructor(
|
|
1372
|
-
super("BdkError", "SyncFailed"
|
|
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);
|
|
1373
1518
|
}
|
|
1374
|
-
static
|
|
1375
|
-
return
|
|
1519
|
+
static getInner(obj) {
|
|
1520
|
+
return obj.inner;
|
|
1376
1521
|
}
|
|
1377
1522
|
}
|
|
1378
|
-
class
|
|
1523
|
+
class BroadcastFailed_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1379
1524
|
/**
|
|
1380
1525
|
* @private
|
|
1381
|
-
* This field is private and should not be used.
|
|
1526
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1382
1527
|
*/
|
|
1383
1528
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1384
|
-
/**
|
|
1385
|
-
* @private
|
|
1386
|
-
* This field is private and should not be used.
|
|
1387
|
-
*/
|
|
1388
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 40;
|
|
1389
1529
|
tag = BdkError_Tags.BroadcastFailed;
|
|
1390
|
-
constructor(
|
|
1391
|
-
super("BdkError", "BroadcastFailed"
|
|
1530
|
+
constructor(inner) {
|
|
1531
|
+
super("BdkError", "BroadcastFailed");
|
|
1532
|
+
this.inner = Object.freeze(inner);
|
|
1533
|
+
}
|
|
1534
|
+
static new(inner) {
|
|
1535
|
+
return new BroadcastFailed_(inner);
|
|
1392
1536
|
}
|
|
1393
|
-
static instanceOf(
|
|
1394
|
-
return
|
|
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;
|
|
1395
1545
|
}
|
|
1396
1546
|
}
|
|
1397
|
-
class
|
|
1547
|
+
class InvalidTransaction_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1398
1548
|
/**
|
|
1399
1549
|
* @private
|
|
1400
|
-
* This field is private and should not be used.
|
|
1550
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1401
1551
|
*/
|
|
1402
1552
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1403
|
-
/**
|
|
1404
|
-
* @private
|
|
1405
|
-
* This field is private and should not be used.
|
|
1406
|
-
*/
|
|
1407
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 41;
|
|
1408
1553
|
tag = BdkError_Tags.InvalidTransaction;
|
|
1409
|
-
constructor(
|
|
1410
|
-
super("BdkError", "InvalidTransaction"
|
|
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);
|
|
1411
1566
|
}
|
|
1412
|
-
static
|
|
1413
|
-
return
|
|
1567
|
+
static getInner(obj) {
|
|
1568
|
+
return obj.inner;
|
|
1414
1569
|
}
|
|
1415
1570
|
}
|
|
1416
|
-
class
|
|
1571
|
+
class TransactionNotFound_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1417
1572
|
/**
|
|
1418
1573
|
* @private
|
|
1419
|
-
* This field is private and should not be used.
|
|
1574
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1420
1575
|
*/
|
|
1421
1576
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1422
|
-
/**
|
|
1423
|
-
* @private
|
|
1424
|
-
* This field is private and should not be used.
|
|
1425
|
-
*/
|
|
1426
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 42;
|
|
1427
1577
|
tag = BdkError_Tags.TransactionNotFound;
|
|
1428
|
-
constructor(
|
|
1429
|
-
super("BdkError", "TransactionNotFound"
|
|
1578
|
+
constructor(inner) {
|
|
1579
|
+
super("BdkError", "TransactionNotFound");
|
|
1580
|
+
this.inner = Object.freeze(inner);
|
|
1430
1581
|
}
|
|
1431
|
-
static
|
|
1432
|
-
return
|
|
1582
|
+
static new(inner) {
|
|
1583
|
+
return new TransactionNotFound_(inner);
|
|
1584
|
+
}
|
|
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;
|
|
1433
1593
|
}
|
|
1434
1594
|
}
|
|
1435
|
-
class
|
|
1595
|
+
class CannotConnect_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1436
1596
|
/**
|
|
1437
1597
|
* @private
|
|
1438
|
-
* This field is private and should not be used.
|
|
1598
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1439
1599
|
*/
|
|
1440
1600
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1441
|
-
/**
|
|
1442
|
-
* @private
|
|
1443
|
-
* This field is private and should not be used.
|
|
1444
|
-
*/
|
|
1445
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 43;
|
|
1446
1601
|
tag = BdkError_Tags.CannotConnect;
|
|
1447
|
-
constructor(
|
|
1448
|
-
super("BdkError", "CannotConnect"
|
|
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;
|
|
1449
1611
|
}
|
|
1450
|
-
static
|
|
1451
|
-
return instanceOf(
|
|
1612
|
+
static hasInner(obj) {
|
|
1613
|
+
return CannotConnect_.instanceOf(obj);
|
|
1614
|
+
}
|
|
1615
|
+
static getInner(obj) {
|
|
1616
|
+
return obj.inner;
|
|
1452
1617
|
}
|
|
1453
1618
|
}
|
|
1454
|
-
class
|
|
1619
|
+
class CalculateFeeError_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1455
1620
|
/**
|
|
1456
1621
|
* @private
|
|
1457
|
-
* This field is private and should not be used.
|
|
1622
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1458
1623
|
*/
|
|
1459
1624
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1460
|
-
/**
|
|
1461
|
-
* @private
|
|
1462
|
-
* This field is private and should not be used.
|
|
1463
|
-
*/
|
|
1464
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 44;
|
|
1465
1625
|
tag = BdkError_Tags.CalculateFeeError;
|
|
1466
|
-
constructor(
|
|
1467
|
-
super("BdkError", "CalculateFeeError"
|
|
1626
|
+
constructor(inner) {
|
|
1627
|
+
super("BdkError", "CalculateFeeError");
|
|
1628
|
+
this.inner = Object.freeze(inner);
|
|
1468
1629
|
}
|
|
1469
|
-
static
|
|
1470
|
-
return
|
|
1630
|
+
static new(inner) {
|
|
1631
|
+
return new CalculateFeeError_(inner);
|
|
1632
|
+
}
|
|
1633
|
+
static instanceOf(obj) {
|
|
1634
|
+
return obj.tag === BdkError_Tags.CalculateFeeError;
|
|
1635
|
+
}
|
|
1636
|
+
static hasInner(obj) {
|
|
1637
|
+
return CalculateFeeError_.instanceOf(obj);
|
|
1638
|
+
}
|
|
1639
|
+
static getInner(obj) {
|
|
1640
|
+
return obj.inner;
|
|
1471
1641
|
}
|
|
1472
1642
|
}
|
|
1473
|
-
class
|
|
1643
|
+
class InvalidMnemonic_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1474
1644
|
/**
|
|
1475
1645
|
* @private
|
|
1476
|
-
* This field is private and should not be used.
|
|
1646
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1477
1647
|
*/
|
|
1478
1648
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1479
|
-
/**
|
|
1480
|
-
* @private
|
|
1481
|
-
* This field is private and should not be used.
|
|
1482
|
-
*/
|
|
1483
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 45;
|
|
1484
1649
|
tag = BdkError_Tags.InvalidMnemonic;
|
|
1485
|
-
constructor(
|
|
1486
|
-
super("BdkError", "InvalidMnemonic"
|
|
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;
|
|
1487
1659
|
}
|
|
1488
|
-
static
|
|
1489
|
-
return instanceOf(
|
|
1660
|
+
static hasInner(obj) {
|
|
1661
|
+
return InvalidMnemonic_.instanceOf(obj);
|
|
1662
|
+
}
|
|
1663
|
+
static getInner(obj) {
|
|
1664
|
+
return obj.inner;
|
|
1490
1665
|
}
|
|
1491
1666
|
}
|
|
1492
|
-
class
|
|
1667
|
+
class InvalidEntropy_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1493
1668
|
/**
|
|
1494
1669
|
* @private
|
|
1495
|
-
* This field is private and should not be used.
|
|
1670
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1496
1671
|
*/
|
|
1497
1672
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1498
|
-
/**
|
|
1499
|
-
* @private
|
|
1500
|
-
* This field is private and should not be used.
|
|
1501
|
-
*/
|
|
1502
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 46;
|
|
1503
1673
|
tag = BdkError_Tags.InvalidEntropy;
|
|
1504
|
-
constructor(
|
|
1505
|
-
super("BdkError", "InvalidEntropy"
|
|
1674
|
+
constructor(inner) {
|
|
1675
|
+
super("BdkError", "InvalidEntropy");
|
|
1676
|
+
this.inner = Object.freeze(inner);
|
|
1506
1677
|
}
|
|
1507
|
-
static
|
|
1508
|
-
return
|
|
1678
|
+
static new(inner) {
|
|
1679
|
+
return new InvalidEntropy_(inner);
|
|
1680
|
+
}
|
|
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;
|
|
1509
1689
|
}
|
|
1510
1690
|
}
|
|
1511
|
-
class
|
|
1691
|
+
class KeyError_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1512
1692
|
/**
|
|
1513
1693
|
* @private
|
|
1514
|
-
* This field is private and should not be used.
|
|
1694
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1515
1695
|
*/
|
|
1516
1696
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1517
|
-
/**
|
|
1518
|
-
* @private
|
|
1519
|
-
* This field is private and should not be used.
|
|
1520
|
-
*/
|
|
1521
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 47;
|
|
1522
1697
|
tag = BdkError_Tags.KeyError;
|
|
1523
|
-
constructor(
|
|
1524
|
-
super("BdkError", "KeyError"
|
|
1698
|
+
constructor(inner) {
|
|
1699
|
+
super("BdkError", "KeyError");
|
|
1700
|
+
this.inner = Object.freeze(inner);
|
|
1525
1701
|
}
|
|
1526
|
-
static
|
|
1527
|
-
return
|
|
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);
|
|
1710
|
+
}
|
|
1711
|
+
static getInner(obj) {
|
|
1712
|
+
return obj.inner;
|
|
1528
1713
|
}
|
|
1529
1714
|
}
|
|
1530
|
-
class
|
|
1715
|
+
class Generic_ extends _uniffiBindgenReactNative.UniffiError {
|
|
1531
1716
|
/**
|
|
1532
1717
|
* @private
|
|
1533
|
-
* This field is private and should not be used.
|
|
1718
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1534
1719
|
*/
|
|
1535
1720
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "BdkError";
|
|
1536
|
-
/**
|
|
1537
|
-
* @private
|
|
1538
|
-
* This field is private and should not be used.
|
|
1539
|
-
*/
|
|
1540
|
-
[_uniffiBindgenReactNative.variantOrdinalSymbol] = 48;
|
|
1541
1721
|
tag = BdkError_Tags.Generic;
|
|
1542
|
-
constructor(
|
|
1543
|
-
super("BdkError", "Generic"
|
|
1722
|
+
constructor(inner) {
|
|
1723
|
+
super("BdkError", "Generic");
|
|
1724
|
+
this.inner = Object.freeze(inner);
|
|
1544
1725
|
}
|
|
1545
|
-
static
|
|
1546
|
-
return
|
|
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;
|
|
1547
1737
|
}
|
|
1548
1738
|
}
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
function instanceOf(e) {
|
|
1552
|
-
return e[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "BdkError";
|
|
1739
|
+
function instanceOf(obj) {
|
|
1740
|
+
return obj[_uniffiBindgenReactNative.uniffiTypeNameSymbol] === "BdkError";
|
|
1553
1741
|
}
|
|
1554
|
-
return {
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
};
|
|
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
|
+
});
|
|
1605
1793
|
})();
|
|
1606
|
-
|
|
1607
|
-
// Union type for BdkError error type.
|
|
1608
|
-
|
|
1794
|
+
// FfiConverter for enum BdkError
|
|
1609
1795
|
const FfiConverterTypeBdkError = (() => {
|
|
1610
|
-
const
|
|
1611
|
-
class
|
|
1796
|
+
const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
1797
|
+
class FFIConverter extends _uniffiBindgenReactNative.AbstractFfiConverterByteArray {
|
|
1612
1798
|
read(from) {
|
|
1613
|
-
switch (
|
|
1799
|
+
switch (ordinalConverter.read(from)) {
|
|
1614
1800
|
case 1:
|
|
1615
|
-
return new BdkError.InvalidDescriptor(
|
|
1801
|
+
return new BdkError.InvalidDescriptor({
|
|
1802
|
+
message: FfiConverterString.read(from)
|
|
1803
|
+
});
|
|
1616
1804
|
case 2:
|
|
1617
|
-
return new BdkError.WalletCreationFailed(
|
|
1805
|
+
return new BdkError.WalletCreationFailed({
|
|
1806
|
+
message: FfiConverterString.read(from)
|
|
1807
|
+
});
|
|
1618
1808
|
case 3:
|
|
1619
|
-
return new BdkError.WalletLoadFailed(
|
|
1809
|
+
return new BdkError.WalletLoadFailed({
|
|
1810
|
+
message: FfiConverterString.read(from)
|
|
1811
|
+
});
|
|
1620
1812
|
case 4:
|
|
1621
|
-
return new BdkError.WalletLoadMismatch(
|
|
1813
|
+
return new BdkError.WalletLoadMismatch({
|
|
1814
|
+
message: FfiConverterString.read(from)
|
|
1815
|
+
});
|
|
1622
1816
|
case 5:
|
|
1623
|
-
return new BdkError.PersistError(
|
|
1817
|
+
return new BdkError.PersistError({
|
|
1818
|
+
message: FfiConverterString.read(from)
|
|
1819
|
+
});
|
|
1624
1820
|
case 6:
|
|
1625
|
-
return new BdkError.InvalidAddress(
|
|
1821
|
+
return new BdkError.InvalidAddress({
|
|
1822
|
+
message: FfiConverterString.read(from)
|
|
1823
|
+
});
|
|
1626
1824
|
case 7:
|
|
1627
|
-
return new BdkError.InvalidScript(
|
|
1825
|
+
return new BdkError.InvalidScript({
|
|
1826
|
+
message: FfiConverterString.read(from)
|
|
1827
|
+
});
|
|
1628
1828
|
case 8:
|
|
1629
|
-
return new BdkError.TransactionBuildFailed(
|
|
1829
|
+
return new BdkError.TransactionBuildFailed({
|
|
1830
|
+
message: FfiConverterString.read(from)
|
|
1831
|
+
});
|
|
1630
1832
|
case 9:
|
|
1631
|
-
return new BdkError.NoRecipients(
|
|
1833
|
+
return new BdkError.NoRecipients({
|
|
1834
|
+
message: FfiConverterString.read(from)
|
|
1835
|
+
});
|
|
1632
1836
|
case 10:
|
|
1633
|
-
return new BdkError.NoUtxosSelected(
|
|
1837
|
+
return new BdkError.NoUtxosSelected({
|
|
1838
|
+
message: FfiConverterString.read(from)
|
|
1839
|
+
});
|
|
1634
1840
|
case 11:
|
|
1635
|
-
return new BdkError.OutputBelowDustLimit(
|
|
1841
|
+
return new BdkError.OutputBelowDustLimit({
|
|
1842
|
+
message: FfiConverterString.read(from)
|
|
1843
|
+
});
|
|
1636
1844
|
case 12:
|
|
1637
|
-
return new BdkError.InsufficientFunds(
|
|
1845
|
+
return new BdkError.InsufficientFunds({
|
|
1846
|
+
message: FfiConverterString.read(from)
|
|
1847
|
+
});
|
|
1638
1848
|
case 13:
|
|
1639
|
-
return new BdkError.FeeRateTooLow(
|
|
1849
|
+
return new BdkError.FeeRateTooLow({
|
|
1850
|
+
message: FfiConverterString.read(from)
|
|
1851
|
+
});
|
|
1640
1852
|
case 14:
|
|
1641
|
-
return new BdkError.FeeTooLow(
|
|
1853
|
+
return new BdkError.FeeTooLow({
|
|
1854
|
+
message: FfiConverterString.read(from)
|
|
1855
|
+
});
|
|
1642
1856
|
case 15:
|
|
1643
|
-
return new BdkError.LockTimeConflict(
|
|
1857
|
+
return new BdkError.LockTimeConflict({
|
|
1858
|
+
message: FfiConverterString.read(from)
|
|
1859
|
+
});
|
|
1644
1860
|
case 16:
|
|
1645
|
-
return new BdkError.RbfSequenceConflict(
|
|
1861
|
+
return new BdkError.RbfSequenceConflict({
|
|
1862
|
+
message: FfiConverterString.read(from)
|
|
1863
|
+
});
|
|
1646
1864
|
case 17:
|
|
1647
|
-
return new BdkError.VersionZero(
|
|
1865
|
+
return new BdkError.VersionZero({
|
|
1866
|
+
message: FfiConverterString.read(from)
|
|
1867
|
+
});
|
|
1648
1868
|
case 18:
|
|
1649
|
-
return new BdkError.VersionOneCsv(
|
|
1869
|
+
return new BdkError.VersionOneCsv({
|
|
1870
|
+
message: FfiConverterString.read(from)
|
|
1871
|
+
});
|
|
1650
1872
|
case 19:
|
|
1651
|
-
return new BdkError.SpendingPolicyRequired(
|
|
1873
|
+
return new BdkError.SpendingPolicyRequired({
|
|
1874
|
+
message: FfiConverterString.read(from)
|
|
1875
|
+
});
|
|
1652
1876
|
case 20:
|
|
1653
|
-
return new BdkError.MissingKeyOrigin(
|
|
1877
|
+
return new BdkError.MissingKeyOrigin({
|
|
1878
|
+
message: FfiConverterString.read(from)
|
|
1879
|
+
});
|
|
1654
1880
|
case 21:
|
|
1655
|
-
return new BdkError.MissingNonWitnessUtxo(
|
|
1881
|
+
return new BdkError.MissingNonWitnessUtxo({
|
|
1882
|
+
message: FfiConverterString.read(from)
|
|
1883
|
+
});
|
|
1656
1884
|
case 22:
|
|
1657
|
-
return new BdkError.OutpointNotFound(
|
|
1885
|
+
return new BdkError.OutpointNotFound({
|
|
1886
|
+
message: FfiConverterString.read(from)
|
|
1887
|
+
});
|
|
1658
1888
|
case 23:
|
|
1659
|
-
return new BdkError.FeeBumpTargetNotFound(
|
|
1889
|
+
return new BdkError.FeeBumpTargetNotFound({
|
|
1890
|
+
message: FfiConverterString.read(from)
|
|
1891
|
+
});
|
|
1660
1892
|
case 24:
|
|
1661
|
-
return new BdkError.FeeBumpAlreadyConfirmed(
|
|
1893
|
+
return new BdkError.FeeBumpAlreadyConfirmed({
|
|
1894
|
+
message: FfiConverterString.read(from)
|
|
1895
|
+
});
|
|
1662
1896
|
case 25:
|
|
1663
|
-
return new BdkError.FeeBumpIrreplaceable(
|
|
1897
|
+
return new BdkError.FeeBumpIrreplaceable({
|
|
1898
|
+
message: FfiConverterString.read(from)
|
|
1899
|
+
});
|
|
1664
1900
|
case 26:
|
|
1665
|
-
return new BdkError.FeeBumpFeeRateUnavailable(
|
|
1901
|
+
return new BdkError.FeeBumpFeeRateUnavailable({
|
|
1902
|
+
message: FfiConverterString.read(from)
|
|
1903
|
+
});
|
|
1666
1904
|
case 27:
|
|
1667
|
-
return new BdkError.FeeBumpInvalidOutputIndex(
|
|
1905
|
+
return new BdkError.FeeBumpInvalidOutputIndex({
|
|
1906
|
+
message: FfiConverterString.read(from)
|
|
1907
|
+
});
|
|
1668
1908
|
case 28:
|
|
1669
|
-
return new BdkError.InvalidPsbt(
|
|
1909
|
+
return new BdkError.InvalidPsbt({
|
|
1910
|
+
message: FfiConverterString.read(from)
|
|
1911
|
+
});
|
|
1670
1912
|
case 29:
|
|
1671
|
-
return new BdkError.SignFailed(
|
|
1913
|
+
return new BdkError.SignFailed({
|
|
1914
|
+
message: FfiConverterString.read(from)
|
|
1915
|
+
});
|
|
1672
1916
|
case 30:
|
|
1673
|
-
return new BdkError.SignerMissingKey(
|
|
1917
|
+
return new BdkError.SignerMissingKey({
|
|
1918
|
+
message: FfiConverterString.read(from)
|
|
1919
|
+
});
|
|
1674
1920
|
case 31:
|
|
1675
|
-
return new BdkError.SignerInvalidKey(
|
|
1921
|
+
return new BdkError.SignerInvalidKey({
|
|
1922
|
+
message: FfiConverterString.read(from)
|
|
1923
|
+
});
|
|
1676
1924
|
case 32:
|
|
1677
|
-
return new BdkError.SignerUserCanceled(
|
|
1925
|
+
return new BdkError.SignerUserCanceled({
|
|
1926
|
+
message: FfiConverterString.read(from)
|
|
1927
|
+
});
|
|
1678
1928
|
case 33:
|
|
1679
|
-
return new BdkError.SignerInputIndexOutOfRange(
|
|
1929
|
+
return new BdkError.SignerInputIndexOutOfRange({
|
|
1930
|
+
message: FfiConverterString.read(from)
|
|
1931
|
+
});
|
|
1680
1932
|
case 34:
|
|
1681
|
-
return new BdkError.SignerMissingNonWitnessUtxo(
|
|
1933
|
+
return new BdkError.SignerMissingNonWitnessUtxo({
|
|
1934
|
+
message: FfiConverterString.read(from)
|
|
1935
|
+
});
|
|
1682
1936
|
case 35:
|
|
1683
|
-
return new BdkError.SignerMissingWitnessUtxo(
|
|
1937
|
+
return new BdkError.SignerMissingWitnessUtxo({
|
|
1938
|
+
message: FfiConverterString.read(from)
|
|
1939
|
+
});
|
|
1684
1940
|
case 36:
|
|
1685
|
-
return new BdkError.SignerMissingWitnessScript(
|
|
1941
|
+
return new BdkError.SignerMissingWitnessScript({
|
|
1942
|
+
message: FfiConverterString.read(from)
|
|
1943
|
+
});
|
|
1686
1944
|
case 37:
|
|
1687
|
-
return new BdkError.SignerNonStandardSighash(
|
|
1945
|
+
return new BdkError.SignerNonStandardSighash({
|
|
1946
|
+
message: FfiConverterString.read(from)
|
|
1947
|
+
});
|
|
1688
1948
|
case 38:
|
|
1689
|
-
return new BdkError.SignerInvalidSighash(
|
|
1949
|
+
return new BdkError.SignerInvalidSighash({
|
|
1950
|
+
message: FfiConverterString.read(from)
|
|
1951
|
+
});
|
|
1690
1952
|
case 39:
|
|
1691
|
-
return new BdkError.SyncFailed(
|
|
1953
|
+
return new BdkError.SyncFailed({
|
|
1954
|
+
message: FfiConverterString.read(from)
|
|
1955
|
+
});
|
|
1692
1956
|
case 40:
|
|
1693
|
-
return new BdkError.BroadcastFailed(
|
|
1957
|
+
return new BdkError.BroadcastFailed({
|
|
1958
|
+
message: FfiConverterString.read(from)
|
|
1959
|
+
});
|
|
1694
1960
|
case 41:
|
|
1695
|
-
return new BdkError.InvalidTransaction(
|
|
1961
|
+
return new BdkError.InvalidTransaction({
|
|
1962
|
+
message: FfiConverterString.read(from)
|
|
1963
|
+
});
|
|
1696
1964
|
case 42:
|
|
1697
|
-
return new BdkError.TransactionNotFound(
|
|
1965
|
+
return new BdkError.TransactionNotFound({
|
|
1966
|
+
message: FfiConverterString.read(from)
|
|
1967
|
+
});
|
|
1698
1968
|
case 43:
|
|
1699
|
-
return new BdkError.CannotConnect(
|
|
1969
|
+
return new BdkError.CannotConnect({
|
|
1970
|
+
message: FfiConverterString.read(from)
|
|
1971
|
+
});
|
|
1700
1972
|
case 44:
|
|
1701
|
-
return new BdkError.CalculateFeeError(
|
|
1973
|
+
return new BdkError.CalculateFeeError({
|
|
1974
|
+
message: FfiConverterString.read(from)
|
|
1975
|
+
});
|
|
1702
1976
|
case 45:
|
|
1703
|
-
return new BdkError.InvalidMnemonic(
|
|
1977
|
+
return new BdkError.InvalidMnemonic({
|
|
1978
|
+
message: FfiConverterString.read(from)
|
|
1979
|
+
});
|
|
1704
1980
|
case 46:
|
|
1705
|
-
return new BdkError.InvalidEntropy(
|
|
1981
|
+
return new BdkError.InvalidEntropy({
|
|
1982
|
+
message: FfiConverterString.read(from)
|
|
1983
|
+
});
|
|
1706
1984
|
case 47:
|
|
1707
|
-
return new BdkError.KeyError(
|
|
1985
|
+
return new BdkError.KeyError({
|
|
1986
|
+
message: FfiConverterString.read(from)
|
|
1987
|
+
});
|
|
1708
1988
|
case 48:
|
|
1709
|
-
return new BdkError.Generic(
|
|
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
|
+
}
|
|
1710
2677
|
default:
|
|
1711
2678
|
throw new _uniffiBindgenReactNative.UniffiInternalError.UnexpectedEnumCase();
|
|
1712
2679
|
}
|
|
1713
2680
|
}
|
|
1714
|
-
write(value, into) {
|
|
1715
|
-
const obj = value;
|
|
1716
|
-
const index = obj[_uniffiBindgenReactNative.variantOrdinalSymbol];
|
|
1717
|
-
intConverter.write(index, into);
|
|
1718
|
-
}
|
|
1719
|
-
allocationSize(value) {
|
|
1720
|
-
return intConverter.allocationSize(0);
|
|
1721
|
-
}
|
|
1722
2681
|
}
|
|
1723
|
-
return new
|
|
2682
|
+
return new FFIConverter();
|
|
1724
2683
|
})();
|
|
1725
|
-
|
|
1726
|
-
/**
|
|
1727
|
-
* Controls which UTXOs the wallet may spend as change inputs.
|
|
1728
|
-
*/
|
|
1729
2684
|
let ChangeSpendPolicy = exports.ChangeSpendPolicy = /*#__PURE__*/function (ChangeSpendPolicy) {
|
|
1730
|
-
/**
|
|
1731
|
-
* Both change and non-change outputs may be spent (default).
|
|
1732
|
-
*/
|
|
1733
2685
|
ChangeSpendPolicy[ChangeSpendPolicy["ChangeAllowed"] = 0] = "ChangeAllowed";
|
|
1734
|
-
/**
|
|
1735
|
-
* Only change outputs may be spent as inputs.
|
|
1736
|
-
*/
|
|
1737
2686
|
ChangeSpendPolicy[ChangeSpendPolicy["OnlyChange"] = 1] = "OnlyChange";
|
|
1738
|
-
/**
|
|
1739
|
-
* Only non-change outputs may be spent as inputs.
|
|
1740
|
-
*/
|
|
1741
2687
|
ChangeSpendPolicy[ChangeSpendPolicy["ChangeForbidden"] = 2] = "ChangeForbidden";
|
|
1742
2688
|
return ChangeSpendPolicy;
|
|
1743
2689
|
}({});
|
|
@@ -1772,28 +2718,10 @@ const FfiConverterTypeChangeSpendPolicy = (() => {
|
|
|
1772
2718
|
}
|
|
1773
2719
|
return new FFIConverter();
|
|
1774
2720
|
})();
|
|
1775
|
-
|
|
1776
|
-
/**
|
|
1777
|
-
* Standard BIP descriptor templates for generating wallet descriptors
|
|
1778
|
-
* from a mnemonic/xprv (also usable for xpub via create_public_descriptor).
|
|
1779
|
-
* Mirrors descriptor::template::{Bip44, Bip49, Bip84, Bip86}.
|
|
1780
|
-
*/
|
|
1781
2721
|
let DescriptorTemplate = exports.DescriptorTemplate = /*#__PURE__*/function (DescriptorTemplate) {
|
|
1782
|
-
/**
|
|
1783
|
-
* BIP44 — Legacy P2PKH (1…)
|
|
1784
|
-
*/
|
|
1785
2722
|
DescriptorTemplate[DescriptorTemplate["Bip44"] = 0] = "Bip44";
|
|
1786
|
-
/**
|
|
1787
|
-
* BIP49 — Nested SegWit P2SH-P2WPKH (3…)
|
|
1788
|
-
*/
|
|
1789
2723
|
DescriptorTemplate[DescriptorTemplate["Bip49"] = 1] = "Bip49";
|
|
1790
|
-
/**
|
|
1791
|
-
* BIP84 — Native SegWit P2WPKH (bc1q…)
|
|
1792
|
-
*/
|
|
1793
2724
|
DescriptorTemplate[DescriptorTemplate["Bip84"] = 2] = "Bip84";
|
|
1794
|
-
/**
|
|
1795
|
-
* BIP86 — Taproot P2TR (bc1p…)
|
|
1796
|
-
*/
|
|
1797
2725
|
DescriptorTemplate[DescriptorTemplate["Bip86"] = 3] = "Bip86";
|
|
1798
2726
|
return DescriptorTemplate;
|
|
1799
2727
|
}({});
|
|
@@ -1833,13 +2761,7 @@ const FfiConverterTypeDescriptorTemplate = (() => {
|
|
|
1833
2761
|
return new FFIConverter();
|
|
1834
2762
|
})();
|
|
1835
2763
|
let KeychainKind = exports.KeychainKind = /*#__PURE__*/function (KeychainKind) {
|
|
1836
|
-
/**
|
|
1837
|
-
* External keychain — used for deriving recipient addresses.
|
|
1838
|
-
*/
|
|
1839
2764
|
KeychainKind[KeychainKind["External"] = 0] = "External";
|
|
1840
|
-
/**
|
|
1841
|
-
* Internal keychain — used for deriving change addresses.
|
|
1842
|
-
*/
|
|
1843
2765
|
KeychainKind[KeychainKind["Internal"] = 1] = "Internal";
|
|
1844
2766
|
return KeychainKind;
|
|
1845
2767
|
}({});
|
|
@@ -1870,11 +2792,6 @@ const FfiConverterTypeKeychainKind = (() => {
|
|
|
1870
2792
|
}
|
|
1871
2793
|
return new FFIConverter();
|
|
1872
2794
|
})();
|
|
1873
|
-
|
|
1874
|
-
/**
|
|
1875
|
-
* BIP-39 mnemonic language. Mirrors bip39::Language.
|
|
1876
|
-
* Requires `all-languages` feature on the bip39 crate.
|
|
1877
|
-
*/
|
|
1878
2795
|
let Language = exports.Language = /*#__PURE__*/function (Language) {
|
|
1879
2796
|
Language[Language["English"] = 0] = "English";
|
|
1880
2797
|
Language[Language["SimplifiedChinese"] = 1] = "SimplifiedChinese";
|
|
@@ -1989,27 +2906,10 @@ const FfiConverterTypeNetwork = (() => {
|
|
|
1989
2906
|
}
|
|
1990
2907
|
return new FFIConverter();
|
|
1991
2908
|
})();
|
|
1992
|
-
|
|
1993
|
-
/**
|
|
1994
|
-
* Single-key descriptor templates.
|
|
1995
|
-
* Mirrors descriptor::template::{P2Pkh, P2Wpkh, P2Wpkh_P2Sh, P2TR}.
|
|
1996
|
-
*/
|
|
1997
2909
|
let SingleKeyDescriptorTemplate = exports.SingleKeyDescriptorTemplate = /*#__PURE__*/function (SingleKeyDescriptorTemplate) {
|
|
1998
|
-
/**
|
|
1999
|
-
* Pay-to-PubKey-Hash — Legacy (1…)
|
|
2000
|
-
*/
|
|
2001
2910
|
SingleKeyDescriptorTemplate[SingleKeyDescriptorTemplate["P2Pkh"] = 0] = "P2Pkh";
|
|
2002
|
-
/**
|
|
2003
|
-
* Pay-to-Witness-PubKey-Hash — Native SegWit (bc1q…)
|
|
2004
|
-
*/
|
|
2005
2911
|
SingleKeyDescriptorTemplate[SingleKeyDescriptorTemplate["P2Wpkh"] = 1] = "P2Wpkh";
|
|
2006
|
-
/**
|
|
2007
|
-
* P2Wpkh wrapped in P2SH — Nested SegWit (3…)
|
|
2008
|
-
*/
|
|
2009
2912
|
SingleKeyDescriptorTemplate[SingleKeyDescriptorTemplate["P2WpkhP2Sh"] = 2] = "P2WpkhP2Sh";
|
|
2010
|
-
/**
|
|
2011
|
-
* Pay-to-Taproot (bc1p…)
|
|
2012
|
-
*/
|
|
2013
2913
|
SingleKeyDescriptorTemplate[SingleKeyDescriptorTemplate["P2tr"] = 3] = "P2tr";
|
|
2014
2914
|
return SingleKeyDescriptorTemplate;
|
|
2015
2915
|
}({});
|
|
@@ -2048,19 +2948,8 @@ const FfiConverterTypeSingleKeyDescriptorTemplate = (() => {
|
|
|
2048
2948
|
}
|
|
2049
2949
|
return new FFIConverter();
|
|
2050
2950
|
})();
|
|
2051
|
-
|
|
2052
|
-
/**
|
|
2053
|
-
* Ordering applied to inputs and outputs when building a transaction.
|
|
2054
|
-
* Note: bdk_wallet also has a Custom variant (with closures) that cannot cross FFI.
|
|
2055
|
-
*/
|
|
2056
2951
|
let TxOrdering = exports.TxOrdering = /*#__PURE__*/function (TxOrdering) {
|
|
2057
|
-
/**
|
|
2058
|
-
* Randomise input and output order (default, good for privacy).
|
|
2059
|
-
*/
|
|
2060
2952
|
TxOrdering[TxOrdering["Shuffle"] = 0] = "Shuffle";
|
|
2061
|
-
/**
|
|
2062
|
-
* Preserve insertion order of recipients and manually added UTXOs.
|
|
2063
|
-
*/
|
|
2064
2953
|
TxOrdering[TxOrdering["Untouched"] = 1] = "Untouched";
|
|
2065
2954
|
return TxOrdering;
|
|
2066
2955
|
}({});
|
|
@@ -2101,14 +2990,7 @@ let WalletEvent_Tags = exports.WalletEvent_Tags = /*#__PURE__*/function (WalletE
|
|
|
2101
2990
|
WalletEvent_Tags["TxDropped"] = "TxDropped";
|
|
2102
2991
|
return WalletEvent_Tags;
|
|
2103
2992
|
}({});
|
|
2104
|
-
/**
|
|
2105
|
-
* Events emitted when applying chain updates to the wallet.
|
|
2106
|
-
* Mirrors bdk_wallet::event::WalletEvent (non-exhaustive in upstream).
|
|
2107
|
-
*/
|
|
2108
2993
|
const WalletEvent = exports.WalletEvent = (() => {
|
|
2109
|
-
/**
|
|
2110
|
-
* The local chain tip has changed.
|
|
2111
|
-
*/
|
|
2112
2994
|
class ChainTipChanged_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2113
2995
|
/**
|
|
2114
2996
|
* @private
|
|
@@ -2127,9 +3009,6 @@ const WalletEvent = exports.WalletEvent = (() => {
|
|
|
2127
3009
|
return obj.tag === WalletEvent_Tags.ChainTipChanged;
|
|
2128
3010
|
}
|
|
2129
3011
|
}
|
|
2130
|
-
/**
|
|
2131
|
-
* A transaction has been confirmed.
|
|
2132
|
-
*/
|
|
2133
3012
|
class TxConfirmed_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2134
3013
|
/**
|
|
2135
3014
|
* @private
|
|
@@ -2148,9 +3027,6 @@ const WalletEvent = exports.WalletEvent = (() => {
|
|
|
2148
3027
|
return obj.tag === WalletEvent_Tags.TxConfirmed;
|
|
2149
3028
|
}
|
|
2150
3029
|
}
|
|
2151
|
-
/**
|
|
2152
|
-
* A previously confirmed transaction has been unconfirmed (reorg).
|
|
2153
|
-
*/
|
|
2154
3030
|
class TxUnconfirmed_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2155
3031
|
/**
|
|
2156
3032
|
* @private
|
|
@@ -2169,9 +3045,6 @@ const WalletEvent = exports.WalletEvent = (() => {
|
|
|
2169
3045
|
return obj.tag === WalletEvent_Tags.TxUnconfirmed;
|
|
2170
3046
|
}
|
|
2171
3047
|
}
|
|
2172
|
-
/**
|
|
2173
|
-
* A transaction has been replaced (RBF or conflict).
|
|
2174
|
-
*/
|
|
2175
3048
|
class TxReplaced_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2176
3049
|
/**
|
|
2177
3050
|
* @private
|
|
@@ -2190,9 +3063,6 @@ const WalletEvent = exports.WalletEvent = (() => {
|
|
|
2190
3063
|
return obj.tag === WalletEvent_Tags.TxReplaced;
|
|
2191
3064
|
}
|
|
2192
3065
|
}
|
|
2193
|
-
/**
|
|
2194
|
-
* A transaction has been dropped from the mempool / evicted.
|
|
2195
|
-
*/
|
|
2196
3066
|
class TxDropped_ extends _uniffiBindgenReactNative.UniffiEnum {
|
|
2197
3067
|
/**
|
|
2198
3068
|
* @private
|
|
@@ -2223,12 +3093,6 @@ const WalletEvent = exports.WalletEvent = (() => {
|
|
|
2223
3093
|
TxDropped: TxDropped_
|
|
2224
3094
|
});
|
|
2225
3095
|
})();
|
|
2226
|
-
|
|
2227
|
-
/**
|
|
2228
|
-
* Events emitted when applying chain updates to the wallet.
|
|
2229
|
-
* Mirrors bdk_wallet::event::WalletEvent (non-exhaustive in upstream).
|
|
2230
|
-
*/
|
|
2231
|
-
|
|
2232
3096
|
// FfiConverter for enum WalletEvent
|
|
2233
3097
|
const FfiConverterTypeWalletEvent = (() => {
|
|
2234
3098
|
const ordinalConverter = _uniffiBindgenReactNative.FfiConverterInt32;
|
|
@@ -2354,10 +3218,6 @@ const FfiConverterTypeWalletEvent = (() => {
|
|
|
2354
3218
|
}
|
|
2355
3219
|
return new FFIConverter();
|
|
2356
3220
|
})();
|
|
2357
|
-
|
|
2358
|
-
/**
|
|
2359
|
-
* BIP-39 mnemonic word count (determines entropy length).
|
|
2360
|
-
*/
|
|
2361
3221
|
let WordCount = exports.WordCount = /*#__PURE__*/function (WordCount) {
|
|
2362
3222
|
WordCount[WordCount["Words12"] = 0] = "Words12";
|
|
2363
3223
|
WordCount[WordCount["Words15"] = 1] = "Words15";
|
|
@@ -2407,107 +3267,137 @@ const FfiConverterTypeWordCount = (() => {
|
|
|
2407
3267
|
})();
|
|
2408
3268
|
|
|
2409
3269
|
/**
|
|
2410
|
-
*
|
|
2411
|
-
* Backed by bdk_wallet::keys::bip39::Mnemonic (requires `keys-bip39` feature).
|
|
3270
|
+
* A reusable Electrum client that holds a persistent TCP/TLS connection.
|
|
2412
3271
|
*/
|
|
2413
3272
|
|
|
2414
3273
|
/**
|
|
2415
|
-
* @deprecated Use `
|
|
3274
|
+
* @deprecated Use `ElectrumClientLike` instead.
|
|
2416
3275
|
*/
|
|
2417
3276
|
|
|
2418
3277
|
/**
|
|
2419
|
-
*
|
|
2420
|
-
* Backed by bdk_wallet::keys::bip39::Mnemonic (requires `keys-bip39` feature).
|
|
3278
|
+
* A reusable Electrum client that holds a persistent TCP/TLS connection.
|
|
2421
3279
|
*/
|
|
2422
|
-
class
|
|
2423
|
-
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "
|
|
3280
|
+
class ElectrumClient extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
3281
|
+
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "ElectrumClient";
|
|
2424
3282
|
/**
|
|
2425
|
-
*
|
|
3283
|
+
* Connect to an Electrum server.
|
|
2426
3284
|
*/
|
|
2427
|
-
constructor(
|
|
3285
|
+
constructor(url) /*throws*/{
|
|
2428
3286
|
super();
|
|
2429
3287
|
const pointer = uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
2430
|
-
return (0, _bdk_ffiFfi.default)().
|
|
3288
|
+
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_electrumclient_new(FfiConverterString.lower(url), callStatus);
|
|
2431
3289
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2432
3290
|
this[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
|
|
2433
|
-
this[_uniffiBindgenReactNative.destructorGuardSymbol] =
|
|
3291
|
+
this[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypeElectrumClientObjectFactory.bless(pointer);
|
|
2434
3292
|
}
|
|
2435
3293
|
|
|
2436
3294
|
/**
|
|
2437
|
-
*
|
|
3295
|
+
* {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
|
|
2438
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
|
+
}
|
|
2439
3361
|
static fromEntropy(entropy) /*throws*/{
|
|
2440
3362
|
return FfiConverterTypeMnemonic.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
2441
3363
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_mnemonic_from_entropy(FfiConverterArrayUInt8.lower(entropy), callStatus);
|
|
2442
3364
|
}, /*liftString:*/FfiConverterString.lift));
|
|
2443
3365
|
}
|
|
2444
|
-
|
|
2445
|
-
/**
|
|
2446
|
-
* Create a mnemonic from raw entropy bytes in a specific language.
|
|
2447
|
-
*/
|
|
2448
3366
|
static fromEntropyIn(entropy, language) /*throws*/{
|
|
2449
3367
|
return FfiConverterTypeMnemonic.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
2450
3368
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_mnemonic_from_entropy_in(FfiConverterArrayUInt8.lower(entropy), FfiConverterTypeLanguage.lower(language), callStatus);
|
|
2451
3369
|
}, /*liftString:*/FfiConverterString.lift));
|
|
2452
3370
|
}
|
|
2453
|
-
|
|
2454
|
-
/**
|
|
2455
|
-
* Parse an existing mnemonic string (auto-detects language).
|
|
2456
|
-
*/
|
|
2457
3371
|
static fromString(mnemonic) /*throws*/{
|
|
2458
3372
|
return FfiConverterTypeMnemonic.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
2459
3373
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_mnemonic_from_string(FfiConverterString.lower(mnemonic), callStatus);
|
|
2460
3374
|
}, /*liftString:*/FfiConverterString.lift));
|
|
2461
3375
|
}
|
|
2462
|
-
|
|
2463
|
-
/**
|
|
2464
|
-
* Parse a mnemonic string in a specific language.
|
|
2465
|
-
*/
|
|
2466
3376
|
static fromStringIn(mnemonic, language) /*throws*/{
|
|
2467
3377
|
return FfiConverterTypeMnemonic.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
2468
3378
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_constructor_mnemonic_from_string_in(FfiConverterString.lower(mnemonic), FfiConverterTypeLanguage.lower(language), callStatus);
|
|
2469
3379
|
}, /*liftString:*/FfiConverterString.lift));
|
|
2470
3380
|
}
|
|
2471
|
-
|
|
2472
|
-
/**
|
|
2473
|
-
* The language of this mnemonic.
|
|
2474
|
-
*/
|
|
2475
3381
|
language() {
|
|
2476
3382
|
return FfiConverterTypeLanguage.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2477
3383
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_mnemonic_language(uniffiTypeMnemonicObjectFactory.clonePointer(this), callStatus);
|
|
2478
3384
|
}, /*liftString:*/FfiConverterString.lift));
|
|
2479
3385
|
}
|
|
2480
|
-
|
|
2481
|
-
/**
|
|
2482
|
-
* Derive the 64-byte seed as hex. Pass an empty string for no passphrase.
|
|
2483
|
-
*/
|
|
2484
3386
|
toSeedHex(passphrase) {
|
|
2485
3387
|
return FfiConverterString.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2486
3388
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_mnemonic_to_seed_hex(uniffiTypeMnemonicObjectFactory.clonePointer(this), FfiConverterString.lower(passphrase), callStatus);
|
|
2487
3389
|
}, /*liftString:*/FfiConverterString.lift));
|
|
2488
3390
|
}
|
|
2489
|
-
|
|
2490
|
-
/**
|
|
2491
|
-
* The mnemonic as a space-separated word string.
|
|
2492
|
-
*/
|
|
2493
3391
|
toString() {
|
|
2494
3392
|
return FfiConverterString.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2495
3393
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_mnemonic_to_string(uniffiTypeMnemonicObjectFactory.clonePointer(this), callStatus);
|
|
2496
3394
|
}, /*liftString:*/FfiConverterString.lift));
|
|
2497
3395
|
}
|
|
2498
|
-
|
|
2499
|
-
/**
|
|
2500
|
-
* Number of words (12, 15, 18, 21, or 24).
|
|
2501
|
-
*/
|
|
2502
3396
|
wordCount() {
|
|
2503
3397
|
return _uniffiBindgenReactNative.FfiConverterUInt32.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2504
3398
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_mnemonic_word_count(uniffiTypeMnemonicObjectFactory.clonePointer(this), callStatus);
|
|
2505
3399
|
}, /*liftString:*/FfiConverterString.lift));
|
|
2506
3400
|
}
|
|
2507
|
-
|
|
2508
|
-
/**
|
|
2509
|
-
* List the individual words.
|
|
2510
|
-
*/
|
|
2511
3401
|
words() {
|
|
2512
3402
|
return FfiConverterArrayString.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2513
3403
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_mnemonic_words(uniffiTypeMnemonicObjectFactory.clonePointer(this), callStatus);
|
|
@@ -2567,24 +3457,12 @@ const uniffiTypeMnemonicObjectFactory = (() => {
|
|
|
2567
3457
|
// FfiConverter for MnemonicLike
|
|
2568
3458
|
const FfiConverterTypeMnemonic = new _uniffiBindgenReactNative.FfiConverterObject(uniffiTypeMnemonicObjectFactory);
|
|
2569
3459
|
|
|
2570
|
-
/**
|
|
2571
|
-
* A Partially Signed Bitcoin Transaction (BIP-174 / BIP-370).
|
|
2572
|
-
* Mirrors bitcoin::Psbt with added PsbtUtils trait methods.
|
|
2573
|
-
*/
|
|
2574
|
-
|
|
2575
3460
|
/**
|
|
2576
3461
|
* @deprecated Use `PsbtLike` instead.
|
|
2577
3462
|
*/
|
|
2578
3463
|
|
|
2579
|
-
/**
|
|
2580
|
-
* A Partially Signed Bitcoin Transaction (BIP-174 / BIP-370).
|
|
2581
|
-
* Mirrors bitcoin::Psbt with added PsbtUtils trait methods.
|
|
2582
|
-
*/
|
|
2583
3464
|
class Psbt extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
2584
3465
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "Psbt";
|
|
2585
|
-
/**
|
|
2586
|
-
* Deserialize from a base64-encoded string.
|
|
2587
|
-
*/
|
|
2588
3466
|
constructor(psbtBase64) /*throws*/{
|
|
2589
3467
|
super();
|
|
2590
3468
|
const pointer = uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
@@ -2593,59 +3471,31 @@ class Psbt extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
2593
3471
|
this[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
|
|
2594
3472
|
this[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypePsbtObjectFactory.bless(pointer);
|
|
2595
3473
|
}
|
|
2596
|
-
|
|
2597
|
-
/**
|
|
2598
|
-
* Extract the fully-signed transaction as raw hex.
|
|
2599
|
-
* Only valid after all inputs are finalized.
|
|
2600
|
-
*/
|
|
2601
3474
|
extractTxHex() /*throws*/{
|
|
2602
3475
|
return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
2603
3476
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_psbt_extract_tx_hex(uniffiTypePsbtObjectFactory.clonePointer(this), callStatus);
|
|
2604
3477
|
}, /*liftString:*/FfiConverterString.lift));
|
|
2605
3478
|
}
|
|
2606
|
-
|
|
2607
|
-
/**
|
|
2608
|
-
* Total fee in satoshis. None if any input UTXO value is unknown.
|
|
2609
|
-
* From PsbtUtils::fee_amount().
|
|
2610
|
-
*/
|
|
2611
3479
|
feeAmount() {
|
|
2612
3480
|
return FfiConverterOptionalUInt64.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2613
3481
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_psbt_fee_amount(uniffiTypePsbtObjectFactory.clonePointer(this), callStatus);
|
|
2614
3482
|
}, /*liftString:*/FfiConverterString.lift));
|
|
2615
3483
|
}
|
|
2616
|
-
|
|
2617
|
-
/**
|
|
2618
|
-
* Fee rate in sat/vbyte. None if any input UTXO value is unknown.
|
|
2619
|
-
* From PsbtUtils::fee_rate().
|
|
2620
|
-
*/
|
|
2621
3484
|
feeRate() {
|
|
2622
3485
|
return FfiConverterOptionalFloat64.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2623
3486
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_psbt_fee_rate(uniffiTypePsbtObjectFactory.clonePointer(this), callStatus);
|
|
2624
3487
|
}, /*liftString:*/FfiConverterString.lift));
|
|
2625
3488
|
}
|
|
2626
|
-
|
|
2627
|
-
/**
|
|
2628
|
-
* Retrieve the UTXO for a given input index. Returns None if unavailable.
|
|
2629
|
-
* From PsbtUtils::get_utxo_for().
|
|
2630
|
-
*/
|
|
2631
3489
|
getUtxoFor(inputIndex) {
|
|
2632
3490
|
return FfiConverterOptionalTypeTxOut.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2633
3491
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_psbt_get_utxo_for(uniffiTypePsbtObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt64.lower(inputIndex), callStatus);
|
|
2634
3492
|
}, /*liftString:*/FfiConverterString.lift));
|
|
2635
3493
|
}
|
|
2636
|
-
|
|
2637
|
-
/**
|
|
2638
|
-
* Serialize to a base64-encoded string.
|
|
2639
|
-
*/
|
|
2640
3494
|
toBase64() {
|
|
2641
3495
|
return FfiConverterString.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2642
3496
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_psbt_to_base64(uniffiTypePsbtObjectFactory.clonePointer(this), callStatus);
|
|
2643
3497
|
}, /*liftString:*/FfiConverterString.lift));
|
|
2644
3498
|
}
|
|
2645
|
-
|
|
2646
|
-
/**
|
|
2647
|
-
* The unsigned txid (available before finalization).
|
|
2648
|
-
*/
|
|
2649
3499
|
txid() /*throws*/{
|
|
2650
3500
|
return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
2651
3501
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_psbt_txid(uniffiTypePsbtObjectFactory.clonePointer(this), callStatus);
|
|
@@ -2703,23 +3553,12 @@ const uniffiTypePsbtObjectFactory = (() => {
|
|
|
2703
3553
|
};
|
|
2704
3554
|
})();
|
|
2705
3555
|
// FfiConverter for PsbtLike
|
|
2706
|
-
const FfiConverterTypePsbt = new _uniffiBindgenReactNative.FfiConverterObject(uniffiTypePsbtObjectFactory);
|
|
2707
|
-
|
|
2708
|
-
/**
|
|
2709
|
-
* Fluent builder for constructing Bitcoin transactions.
|
|
2710
|
-
* Create one, configure it, then call finish(wallet) to produce a PSBT.
|
|
2711
|
-
* Mirrors bdk_wallet::TxBuilder (without lifetime / generic coin selection).
|
|
2712
|
-
*/
|
|
3556
|
+
const FfiConverterTypePsbt = new _uniffiBindgenReactNative.FfiConverterObject(uniffiTypePsbtObjectFactory);
|
|
2713
3557
|
|
|
2714
3558
|
/**
|
|
2715
3559
|
* @deprecated Use `TxBuilderLike` instead.
|
|
2716
3560
|
*/
|
|
2717
3561
|
|
|
2718
|
-
/**
|
|
2719
|
-
* Fluent builder for constructing Bitcoin transactions.
|
|
2720
|
-
* Create one, configure it, then call finish(wallet) to produce a PSBT.
|
|
2721
|
-
* Mirrors bdk_wallet::TxBuilder (without lifetime / generic coin selection).
|
|
2722
|
-
*/
|
|
2723
3562
|
class TxBuilder extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
2724
3563
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "TxBuilder";
|
|
2725
3564
|
constructor() {
|
|
@@ -2730,163 +3569,91 @@ class TxBuilder extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
2730
3569
|
this[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
|
|
2731
3570
|
this[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypeTxBuilderObjectFactory.bless(pointer);
|
|
2732
3571
|
}
|
|
2733
|
-
|
|
2734
|
-
/**
|
|
2735
|
-
* Attach OP_RETURN data to the transaction.
|
|
2736
|
-
*/
|
|
2737
3572
|
addData(data) {
|
|
2738
3573
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2739
3574
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_add_data(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterArrayUInt8.lower(data), callStatus);
|
|
2740
3575
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2741
3576
|
}
|
|
2742
|
-
|
|
2743
|
-
/**
|
|
2744
|
-
* Include BIP-32 global xpubs in the PSBT.
|
|
2745
|
-
*/
|
|
2746
3577
|
addGlobalXpubs() {
|
|
2747
3578
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2748
3579
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_add_global_xpubs(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
|
|
2749
3580
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2750
3581
|
}
|
|
2751
|
-
|
|
2752
|
-
/**
|
|
2753
|
-
* Add a single recipient (address + amount).
|
|
2754
|
-
*/
|
|
2755
3582
|
addRecipient(address, amountSats) {
|
|
2756
3583
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2757
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);
|
|
2758
3585
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2759
3586
|
}
|
|
2760
|
-
|
|
2761
|
-
/**
|
|
2762
|
-
* Mark a single UTXO as unspendable.
|
|
2763
|
-
*/
|
|
2764
3587
|
addUnspendable(outpoint) {
|
|
2765
3588
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2766
3589
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_add_unspendable(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterTypeOutPoint.lower(outpoint), callStatus);
|
|
2767
3590
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2768
3591
|
}
|
|
2769
|
-
|
|
2770
|
-
/**
|
|
2771
|
-
* Add a specific UTXO to spend.
|
|
2772
|
-
*/
|
|
2773
3592
|
addUtxo(outpoint) /*throws*/{
|
|
2774
3593
|
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
2775
3594
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_add_utxo(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterTypeOutPoint.lower(outpoint), callStatus);
|
|
2776
3595
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2777
3596
|
}
|
|
2778
|
-
|
|
2779
|
-
/**
|
|
2780
|
-
* Add multiple specific UTXOs to spend.
|
|
2781
|
-
*/
|
|
2782
3597
|
addUtxos(outpoints) /*throws*/{
|
|
2783
3598
|
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
2784
3599
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_add_utxos(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterArrayTypeOutPoint.lower(outpoints), callStatus);
|
|
2785
3600
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2786
3601
|
}
|
|
2787
|
-
|
|
2788
|
-
/**
|
|
2789
|
-
* Allow outputs below the dust threshold.
|
|
2790
|
-
*/
|
|
2791
3602
|
allowDust(allow) {
|
|
2792
3603
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2793
3604
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_allow_dust(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterBool.lower(allow), callStatus);
|
|
2794
3605
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2795
3606
|
}
|
|
2796
|
-
|
|
2797
|
-
/**
|
|
2798
|
-
* Set the change spend policy explicitly.
|
|
2799
|
-
*/
|
|
2800
3607
|
changePolicy(policy) {
|
|
2801
3608
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2802
3609
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_change_policy(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterTypeChangeSpendPolicy.lower(policy), callStatus);
|
|
2803
3610
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2804
3611
|
}
|
|
2805
|
-
|
|
2806
|
-
/**
|
|
2807
|
-
* Set the assumed current block height (for relative timelock evaluation).
|
|
2808
|
-
*/
|
|
2809
3612
|
currentHeight(height) {
|
|
2810
3613
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2811
3614
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_current_height(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(height), callStatus);
|
|
2812
3615
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2813
3616
|
}
|
|
2814
|
-
|
|
2815
|
-
/**
|
|
2816
|
-
* Forbid spending from change outputs.
|
|
2817
|
-
*/
|
|
2818
3617
|
doNotSpendChange() {
|
|
2819
3618
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2820
3619
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_do_not_spend_change(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
|
|
2821
3620
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2822
3621
|
}
|
|
2823
|
-
|
|
2824
|
-
/**
|
|
2825
|
-
* Set the script to receive the remaining change (use with drain_wallet).
|
|
2826
|
-
*/
|
|
2827
3622
|
drainTo(address) /*throws*/{
|
|
2828
3623
|
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
2829
3624
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_drain_to(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterString.lower(address), callStatus);
|
|
2830
3625
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2831
3626
|
}
|
|
2832
|
-
|
|
2833
|
-
/**
|
|
2834
|
-
* Spend all spendable UTXOs (send remaining to the drain_to address).
|
|
2835
|
-
*/
|
|
2836
3627
|
drainWallet() {
|
|
2837
3628
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2838
3629
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_drain_wallet(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
|
|
2839
3630
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2840
3631
|
}
|
|
2841
|
-
|
|
2842
|
-
/**
|
|
2843
|
-
* Enable RBF signalling with the default nSequence (0xFFFFFFFD).
|
|
2844
|
-
*/
|
|
2845
3632
|
enableRbf() {
|
|
2846
3633
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2847
3634
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_enable_rbf(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
|
|
2848
3635
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2849
3636
|
}
|
|
2850
|
-
|
|
2851
|
-
/**
|
|
2852
|
-
* Enable RBF signalling with a specific nSequence value (must be < 0xFFFFFFFE).
|
|
2853
|
-
*/
|
|
2854
3637
|
enableRbfWithSequence(nsequence) {
|
|
2855
3638
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2856
3639
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_enable_rbf_with_sequence(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(nsequence), callStatus);
|
|
2857
3640
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2858
3641
|
}
|
|
2859
|
-
|
|
2860
|
-
/**
|
|
2861
|
-
* Exclude UTXOs with fewer than min_confirms confirmations.
|
|
2862
|
-
*/
|
|
2863
3642
|
excludeBelowConfirmations(minConfirms) {
|
|
2864
3643
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2865
3644
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_exclude_below_confirmations(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(minConfirms), callStatus);
|
|
2866
3645
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2867
3646
|
}
|
|
2868
|
-
|
|
2869
|
-
/**
|
|
2870
|
-
* Exclude all unconfirmed UTXOs.
|
|
2871
|
-
*/
|
|
2872
3647
|
excludeUnconfirmed() {
|
|
2873
3648
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2874
3649
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_exclude_unconfirmed(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
|
|
2875
3650
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2876
3651
|
}
|
|
2877
|
-
|
|
2878
|
-
/**
|
|
2879
|
-
* Set an absolute fee in satoshis (overrides fee_rate).
|
|
2880
|
-
*/
|
|
2881
3652
|
feeAbsolute(feeSats) {
|
|
2882
3653
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2883
3654
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_fee_absolute(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt64.lower(feeSats), callStatus);
|
|
2884
3655
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2885
3656
|
}
|
|
2886
|
-
|
|
2887
|
-
/**
|
|
2888
|
-
* Set a fee rate target in sat/vbyte.
|
|
2889
|
-
*/
|
|
2890
3657
|
feeRate(satPerVbyte) {
|
|
2891
3658
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2892
3659
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_fee_rate(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterFloat64.lower(satPerVbyte), callStatus);
|
|
@@ -2894,118 +3661,76 @@ class TxBuilder extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
2894
3661
|
}
|
|
2895
3662
|
|
|
2896
3663
|
/**
|
|
2897
|
-
* Build the transaction into a PSBT
|
|
2898
|
-
* selection and script resolution — the PSBT is NOT signed here.
|
|
3664
|
+
* Build the transaction into a PSBT (async — runs on background thread).
|
|
2899
3665
|
*/
|
|
2900
|
-
finish(wallet) /*throws*/{
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
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
|
+
}
|
|
2904
3678
|
}
|
|
2905
|
-
|
|
2906
|
-
/**
|
|
2907
|
-
* Include the redeemScript / witnessScript in PSBT outputs.
|
|
2908
|
-
*/
|
|
2909
3679
|
includeOutputRedeemWitnessScript() {
|
|
2910
3680
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2911
3681
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_include_output_redeem_witness_script(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
|
|
2912
3682
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2913
3683
|
}
|
|
2914
|
-
|
|
2915
|
-
/**
|
|
2916
|
-
* Only use the UTXOs explicitly added with add_utxo / add_utxos.
|
|
2917
|
-
*/
|
|
2918
3684
|
manuallySelectedOnly() {
|
|
2919
3685
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2920
3686
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_manually_selected_only(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
|
|
2921
3687
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2922
3688
|
}
|
|
2923
|
-
|
|
2924
|
-
/**
|
|
2925
|
-
* Set an explicit nLockTime (as a block height).
|
|
2926
|
-
*/
|
|
2927
3689
|
nlocktime(lockHeight) {
|
|
2928
3690
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2929
3691
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_nlocktime(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(lockHeight), callStatus);
|
|
2930
3692
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2931
3693
|
}
|
|
2932
|
-
|
|
2933
|
-
/**
|
|
2934
|
-
* Only spend from change outputs.
|
|
2935
|
-
*/
|
|
2936
3694
|
onlySpendChange() {
|
|
2937
3695
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2938
3696
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_only_spend_change(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
|
|
2939
3697
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2940
3698
|
}
|
|
2941
|
-
|
|
2942
|
-
/**
|
|
2943
|
-
* Include only witness UTXO in PSBT inputs (reduced size, less validation).
|
|
2944
|
-
*/
|
|
2945
3699
|
onlyWitnessUtxo() {
|
|
2946
3700
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2947
3701
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_only_witness_utxo(uniffiTypeTxBuilderObjectFactory.clonePointer(this), callStatus);
|
|
2948
3702
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2949
3703
|
}
|
|
2950
|
-
|
|
2951
|
-
/**
|
|
2952
|
-
* Set the input/output ordering strategy.
|
|
2953
|
-
*/
|
|
2954
3704
|
ordering(ordering) {
|
|
2955
3705
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2956
3706
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_ordering(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterTypeTxOrdering.lower(ordering), callStatus);
|
|
2957
3707
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2958
3708
|
}
|
|
2959
|
-
|
|
2960
|
-
/**
|
|
2961
|
-
* Supply a policy path for complex descriptors (multisig, timelocks).
|
|
2962
|
-
* path_map is a JSON-encoded BTreeMap<String, Vec<usize>>.
|
|
2963
|
-
*/
|
|
2964
3709
|
policyPath(pathMapJson, keychain) {
|
|
2965
3710
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2966
3711
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_policy_path(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterString.lower(pathMapJson), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
|
|
2967
3712
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2968
3713
|
}
|
|
2969
|
-
|
|
2970
|
-
/**
|
|
2971
|
-
* Set an exact nSequence value for all inputs.
|
|
2972
|
-
*/
|
|
2973
3714
|
setExactSequence(nsequence) {
|
|
2974
3715
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2975
3716
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_set_exact_sequence(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(nsequence), callStatus);
|
|
2976
3717
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2977
3718
|
}
|
|
2978
|
-
|
|
2979
|
-
/**
|
|
2980
|
-
* Replace the entire recipient list.
|
|
2981
|
-
*/
|
|
2982
3719
|
setRecipients(recipients) {
|
|
2983
3720
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2984
3721
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_set_recipients(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterArrayTypeRecipient.lower(recipients), callStatus);
|
|
2985
3722
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2986
3723
|
}
|
|
2987
|
-
|
|
2988
|
-
/**
|
|
2989
|
-
* Set the sighash type for all inputs.
|
|
2990
|
-
*/
|
|
2991
3724
|
sighash(sighashType) {
|
|
2992
3725
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
2993
3726
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_sighash(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterUInt32.lower(sighashType), callStatus);
|
|
2994
3727
|
}, /*liftString:*/FfiConverterString.lift);
|
|
2995
3728
|
}
|
|
2996
|
-
|
|
2997
|
-
/**
|
|
2998
|
-
* Set the transaction version (1 or 2).
|
|
2999
|
-
*/
|
|
3000
3729
|
txVersion(version) {
|
|
3001
3730
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
3002
3731
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_tx_version(uniffiTypeTxBuilderObjectFactory.clonePointer(this), _uniffiBindgenReactNative.FfiConverterInt32.lower(version), callStatus);
|
|
3003
3732
|
}, /*liftString:*/FfiConverterString.lift);
|
|
3004
3733
|
}
|
|
3005
|
-
|
|
3006
|
-
/**
|
|
3007
|
-
* Mark UTXOs as unspendable (excluded from coin selection).
|
|
3008
|
-
*/
|
|
3009
3734
|
unspendable(outpoints) {
|
|
3010
3735
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
3011
3736
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_txbuilder_unspendable(uniffiTypeTxBuilderObjectFactory.clonePointer(this), FfiConverterArrayTypeOutPoint.lower(outpoints), callStatus);
|
|
@@ -3072,9 +3797,7 @@ const FfiConverterTypeTxBuilder = new _uniffiBindgenReactNative.FfiConverterObje
|
|
|
3072
3797
|
class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
3073
3798
|
[_uniffiBindgenReactNative.uniffiTypeNameSymbol] = "Wallet";
|
|
3074
3799
|
/**
|
|
3075
|
-
* Create or load a persisted wallet.
|
|
3076
|
-
* descriptor / change_descriptor: output descriptor strings (e.g. "wpkh(tprv…/84'/1'/0'/0/*)")
|
|
3077
|
-
* db_path: file path for the SQLite persistence database.
|
|
3800
|
+
* Create or load a persisted wallet (sync — for async use create_wallet()).
|
|
3078
3801
|
*/
|
|
3079
3802
|
constructor(descriptor, changeDescriptor, network, dbPath) /*throws*/{
|
|
3080
3803
|
super();
|
|
@@ -3084,15 +3807,11 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
3084
3807
|
this[_uniffiBindgenReactNative.pointerLiteralSymbol] = pointer;
|
|
3085
3808
|
this[_uniffiBindgenReactNative.destructorGuardSymbol] = uniffiTypeWalletObjectFactory.bless(pointer);
|
|
3086
3809
|
}
|
|
3087
|
-
|
|
3088
|
-
/**
|
|
3089
|
-
* Broadcast a finalized PSBT via Electrum. Returns the txid.
|
|
3090
|
-
*/
|
|
3091
|
-
async broadcastWithElectrum(url, psbt, asyncOpts_) /*throws*/{
|
|
3810
|
+
async broadcastWithElectrum(client, psbt, asyncOpts_) /*throws*/{
|
|
3092
3811
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3093
3812
|
try {
|
|
3094
3813
|
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
3095
|
-
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_broadcast_with_electrum(uniffiTypeWalletObjectFactory.clonePointer(this),
|
|
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));
|
|
3096
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));
|
|
3097
3816
|
} catch (__error) {
|
|
3098
3817
|
if (uniffiIsDebug && __error instanceof Error) {
|
|
@@ -3101,10 +3820,6 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
3101
3820
|
throw __error;
|
|
3102
3821
|
}
|
|
3103
3822
|
}
|
|
3104
|
-
|
|
3105
|
-
/**
|
|
3106
|
-
* Broadcast a finalized PSBT via Esplora. Returns the txid.
|
|
3107
|
-
*/
|
|
3108
3823
|
async broadcastWithEsplora(url, psbt, asyncOpts_) /*throws*/{
|
|
3109
3824
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3110
3825
|
try {
|
|
@@ -3118,91 +3833,46 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
3118
3833
|
throw __error;
|
|
3119
3834
|
}
|
|
3120
3835
|
}
|
|
3121
|
-
|
|
3122
|
-
/**
|
|
3123
|
-
* Build an RBF fee-bump PSBT for an unconfirmed transaction.
|
|
3124
|
-
* Mirrors Wallet::build_fee_bump().
|
|
3125
|
-
*/
|
|
3126
3836
|
buildFeeBump(txid, newFeeRate) /*throws*/{
|
|
3127
3837
|
return FfiConverterTypePsbt.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3128
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);
|
|
3129
3839
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3130
3840
|
}
|
|
3131
|
-
|
|
3132
|
-
/**
|
|
3133
|
-
* Calculate the fee paid by a raw transaction (hex). Returns satoshis.
|
|
3134
|
-
* Mirrors Wallet::calculate_fee().
|
|
3135
|
-
*/
|
|
3136
3841
|
calculateFee(txHex) /*throws*/{
|
|
3137
3842
|
return _uniffiBindgenReactNative.FfiConverterUInt64.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3138
3843
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_calculate_fee(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txHex), callStatus);
|
|
3139
3844
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3140
3845
|
}
|
|
3141
|
-
|
|
3142
|
-
/**
|
|
3143
|
-
* Calculate the fee rate for a raw transaction (hex). Returns sat/vbyte.
|
|
3144
|
-
* Mirrors Wallet::calculate_fee_rate().
|
|
3145
|
-
*/
|
|
3146
3846
|
calculateFeeRate(txHex) /*throws*/{
|
|
3147
3847
|
return _uniffiBindgenReactNative.FfiConverterFloat64.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3148
3848
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_calculate_fee_rate(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txHex), callStatus);
|
|
3149
3849
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3150
3850
|
}
|
|
3151
|
-
|
|
3152
|
-
/**
|
|
3153
|
-
* Cancel (evict) a transaction from the wallet's view.
|
|
3154
|
-
* Mirrors Wallet::cancel_tx().
|
|
3155
|
-
*/
|
|
3156
3851
|
cancelTx(txHex) /*throws*/{
|
|
3157
3852
|
uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3158
3853
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_cancel_tx(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txHex), callStatus);
|
|
3159
3854
|
}, /*liftString:*/FfiConverterString.lift);
|
|
3160
3855
|
}
|
|
3161
|
-
|
|
3162
|
-
/**
|
|
3163
|
-
* All checkpoints in the local chain, ordered by height descending.
|
|
3164
|
-
* Mirrors Wallet::checkpoints().
|
|
3165
|
-
*/
|
|
3166
3856
|
checkpoints() {
|
|
3167
3857
|
return FfiConverterArrayTypeBlockId.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
3168
3858
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_checkpoints(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
3169
3859
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3170
3860
|
}
|
|
3171
|
-
|
|
3172
|
-
/**
|
|
3173
|
-
* The highest derivation index that has been revealed, or null if none.
|
|
3174
|
-
* Mirrors Wallet::derivation_index().
|
|
3175
|
-
*/
|
|
3176
3861
|
derivationIndex(keychain) {
|
|
3177
3862
|
return FfiConverterOptionalUInt32.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
3178
3863
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_derivation_index(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
|
|
3179
3864
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3180
3865
|
}
|
|
3181
|
-
|
|
3182
|
-
/**
|
|
3183
|
-
* Find the keychain and derivation index for a scriptPubKey (hex).
|
|
3184
|
-
* Returns null if the script does not belong to this wallet.
|
|
3185
|
-
* Mirrors Wallet::derivation_of_spk().
|
|
3186
|
-
*/
|
|
3187
3866
|
derivationOfSpk(scriptHex) {
|
|
3188
3867
|
return FfiConverterOptionalTypeDerivationInfo.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
3189
3868
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_derivation_of_spk(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(scriptHex), callStatus);
|
|
3190
3869
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3191
3870
|
}
|
|
3192
|
-
|
|
3193
|
-
/**
|
|
3194
|
-
* The descriptor checksum for the given keychain.
|
|
3195
|
-
* Mirrors Wallet::descriptor_checksum().
|
|
3196
|
-
*/
|
|
3197
3871
|
descriptorChecksum(keychain) /*throws*/{
|
|
3198
3872
|
return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3199
3873
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_descriptor_checksum(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
|
|
3200
3874
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3201
3875
|
}
|
|
3202
|
-
|
|
3203
|
-
/**
|
|
3204
|
-
* Drain the entire wallet to an address. Returns txid.
|
|
3205
|
-
*/
|
|
3206
3876
|
async drain(address, feeRate, esploraUrl, asyncOpts_) /*throws*/{
|
|
3207
3877
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3208
3878
|
try {
|
|
@@ -3216,26 +3886,29 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
3216
3886
|
throw __error;
|
|
3217
3887
|
}
|
|
3218
3888
|
}
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
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
|
+
}
|
|
3225
3902
|
finalizePsbt(psbt) /*throws*/{
|
|
3226
3903
|
return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3227
3904
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_finalize_psbt(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypePsbt.lower(psbt), callStatus);
|
|
3228
3905
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3229
3906
|
}
|
|
3230
|
-
|
|
3231
|
-
/**
|
|
3232
|
-
* Full scan via an Electrum TCP/TLS server.
|
|
3233
|
-
*/
|
|
3234
|
-
async fullScanWithElectrum(url, stopGap, asyncOpts_) /*throws*/{
|
|
3907
|
+
async fullScanWithElectrum(client, stopGap, asyncOpts_) /*throws*/{
|
|
3235
3908
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3236
3909
|
try {
|
|
3237
3910
|
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
3238
|
-
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_full_scan_with_electrum(uniffiTypeWalletObjectFactory.clonePointer(this),
|
|
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));
|
|
3239
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));
|
|
3240
3913
|
} catch (__error) {
|
|
3241
3914
|
if (uniffiIsDebug && __error instanceof Error) {
|
|
@@ -3244,12 +3917,6 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
3244
3917
|
throw __error;
|
|
3245
3918
|
}
|
|
3246
3919
|
}
|
|
3247
|
-
|
|
3248
|
-
/**
|
|
3249
|
-
* Full scan via an Esplora HTTP server (discovers all used addresses).
|
|
3250
|
-
* Uses Wallet::start_full_scan() + bdk_esplora client internally.
|
|
3251
|
-
* stop_gap: how many consecutive unused addresses to scan before stopping.
|
|
3252
|
-
*/
|
|
3253
3920
|
async fullScanWithEsplora(url, stopGap, asyncOpts_) /*throws*/{
|
|
3254
3921
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3255
3922
|
try {
|
|
@@ -3263,209 +3930,106 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
3263
3930
|
throw __error;
|
|
3264
3931
|
}
|
|
3265
3932
|
}
|
|
3266
|
-
|
|
3267
|
-
/**
|
|
3268
|
-
* Get the wallet balance. Mirrors Wallet::balance().
|
|
3269
|
-
*/
|
|
3270
3933
|
getBalance() /*throws*/{
|
|
3271
3934
|
return FfiConverterTypeBalance.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3272
3935
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_get_balance(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
3273
3936
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3274
3937
|
}
|
|
3275
|
-
|
|
3276
|
-
/**
|
|
3277
|
-
* Returns the raw transaction hex for a given txid. Null if not found.
|
|
3278
|
-
* Mirrors Wallet::get_tx().
|
|
3279
|
-
*/
|
|
3280
3938
|
getTx(txid) /*throws*/{
|
|
3281
3939
|
return FfiConverterOptionalString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3282
3940
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_get_tx(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txid), callStatus);
|
|
3283
3941
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3284
3942
|
}
|
|
3285
|
-
|
|
3286
|
-
/**
|
|
3287
|
-
* Get a specific UTXO. Returns null if not found. Mirrors Wallet::get_utxo().
|
|
3288
|
-
*/
|
|
3289
3943
|
getUtxo(outpoint) /*throws*/{
|
|
3290
3944
|
return FfiConverterOptionalTypeLocalOutput.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3291
3945
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_get_utxo(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeOutPoint.lower(outpoint), callStatus);
|
|
3292
3946
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3293
3947
|
}
|
|
3294
|
-
|
|
3295
|
-
/**
|
|
3296
|
-
* Manually insert a TxOut (e.g. for tracking external outputs).
|
|
3297
|
-
* Mirrors Wallet::insert_txout().
|
|
3298
|
-
*/
|
|
3299
3948
|
insertTxout(outpoint, txout) {
|
|
3300
3949
|
uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
3301
3950
|
(0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_insert_txout(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeOutPoint.lower(outpoint), FfiConverterTypeTxOut.lower(txout), callStatus);
|
|
3302
3951
|
}, /*liftString:*/FfiConverterString.lift);
|
|
3303
3952
|
}
|
|
3304
|
-
|
|
3305
|
-
/**
|
|
3306
|
-
* Return true if the given scriptPubKey (hex) belongs to this wallet.
|
|
3307
|
-
* Mirrors Wallet::is_mine().
|
|
3308
|
-
*/
|
|
3309
3953
|
isMine(scriptHex) {
|
|
3310
3954
|
return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
3311
3955
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_is_mine(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(scriptHex), callStatus);
|
|
3312
3956
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3313
3957
|
}
|
|
3314
|
-
|
|
3315
|
-
/**
|
|
3316
|
-
* List all keychains and their public descriptors.
|
|
3317
|
-
* Mirrors Wallet::keychains().
|
|
3318
|
-
*/
|
|
3319
3958
|
keychains() {
|
|
3320
3959
|
return FfiConverterArrayTypeKeychainInfo.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
3321
3960
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_keychains(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
3322
3961
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3323
3962
|
}
|
|
3324
|
-
|
|
3325
|
-
/**
|
|
3326
|
-
* The latest checkpoint (tip of the local chain). Null if no blocks applied yet.
|
|
3327
|
-
* Mirrors Wallet::latest_checkpoint().
|
|
3328
|
-
*/
|
|
3329
3963
|
latestCheckpoint() {
|
|
3330
3964
|
return FfiConverterOptionalTypeBlockId.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
3331
3965
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_latest_checkpoint(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
3332
3966
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3333
3967
|
}
|
|
3334
|
-
|
|
3335
|
-
/**
|
|
3336
|
-
* List all wallet outputs (spent and unspent). Mirrors Wallet::list_output().
|
|
3337
|
-
*/
|
|
3338
3968
|
listOutput() /*throws*/{
|
|
3339
3969
|
return FfiConverterArrayTypeLocalOutput.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3340
3970
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_list_output(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
3341
3971
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3342
3972
|
}
|
|
3343
|
-
|
|
3344
|
-
/**
|
|
3345
|
-
* List all unspent wallet outputs. Mirrors Wallet::list_unspent().
|
|
3346
|
-
*/
|
|
3347
3973
|
listUnspent() /*throws*/{
|
|
3348
3974
|
return FfiConverterArrayTypeLocalOutput.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3349
3975
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_list_unspent(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
3350
3976
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3351
3977
|
}
|
|
3352
|
-
|
|
3353
|
-
/**
|
|
3354
|
-
* List all addresses that have been revealed but not yet received funds.
|
|
3355
|
-
* Mirrors Wallet::list_unused_addresses().
|
|
3356
|
-
*/
|
|
3357
3978
|
listUnusedAddresses(keychain) /*throws*/{
|
|
3358
3979
|
return FfiConverterArrayTypeAddressInfo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3359
3980
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_list_unused_addresses(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
|
|
3360
3981
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3361
3982
|
}
|
|
3362
|
-
|
|
3363
|
-
/**
|
|
3364
|
-
* Mark an address index as used (returns true if previously unused).
|
|
3365
|
-
* Mirrors Wallet::mark_used().
|
|
3366
|
-
*/
|
|
3367
3983
|
markUsed(keychain, index) {
|
|
3368
3984
|
return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
3369
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);
|
|
3370
3986
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3371
3987
|
}
|
|
3372
|
-
|
|
3373
|
-
/**
|
|
3374
|
-
* The network this wallet is configured for.
|
|
3375
|
-
* Mirrors Wallet::network().
|
|
3376
|
-
*/
|
|
3377
3988
|
network() {
|
|
3378
3989
|
return FfiConverterTypeNetwork.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
3379
3990
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_network(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
3380
3991
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3381
3992
|
}
|
|
3382
|
-
|
|
3383
|
-
/**
|
|
3384
|
-
* The next derivation index that will be revealed.
|
|
3385
|
-
* Mirrors Wallet::next_derivation_index().
|
|
3386
|
-
*/
|
|
3387
3993
|
nextDerivationIndex(keychain) {
|
|
3388
3994
|
return _uniffiBindgenReactNative.FfiConverterUInt32.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
3389
3995
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_next_derivation_index(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
|
|
3390
3996
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3391
3997
|
}
|
|
3392
|
-
|
|
3393
|
-
/**
|
|
3394
|
-
* Return the next address that has not yet received funds.
|
|
3395
|
-
* Mirrors Wallet::next_unused_address().
|
|
3396
|
-
*/
|
|
3397
3998
|
nextUnusedAddress(keychain) /*throws*/{
|
|
3398
3999
|
return FfiConverterTypeAddressInfo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3399
4000
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_next_unused_address(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
|
|
3400
4001
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3401
4002
|
}
|
|
3402
|
-
|
|
3403
|
-
/**
|
|
3404
|
-
* Peek at a specific derivation index without advancing the counter.
|
|
3405
|
-
* Mirrors Wallet::peek_address().
|
|
3406
|
-
*/
|
|
3407
4003
|
peekAddress(keychain, index) /*throws*/{
|
|
3408
4004
|
return FfiConverterTypeAddressInfo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3409
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);
|
|
3410
4006
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3411
4007
|
}
|
|
3412
|
-
|
|
3413
|
-
/**
|
|
3414
|
-
* Persist any staged changes to the database.
|
|
3415
|
-
* Our FFI wraps PersistedWallet; this calls persist() internally.
|
|
3416
|
-
*/
|
|
3417
4008
|
persist() /*throws*/{
|
|
3418
4009
|
return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3419
4010
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_persist(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
3420
4011
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3421
4012
|
}
|
|
3422
|
-
|
|
3423
|
-
/**
|
|
3424
|
-
* Spending policies for a given keychain, returned as a JSON string.
|
|
3425
|
-
* Returns null if the descriptor has no policy.
|
|
3426
|
-
* Mirrors Wallet::policies() — serialized because the Policy tree is complex.
|
|
3427
|
-
*/
|
|
3428
4013
|
policies(keychain) /*throws*/{
|
|
3429
4014
|
return FfiConverterOptionalString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3430
4015
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_policies(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
|
|
3431
4016
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3432
4017
|
}
|
|
3433
|
-
|
|
3434
|
-
/**
|
|
3435
|
-
* The public-only descriptor for the given keychain as a string.
|
|
3436
|
-
* Mirrors Wallet::public_descriptor().
|
|
3437
|
-
*/
|
|
3438
4018
|
publicDescriptor(keychain) /*throws*/{
|
|
3439
4019
|
return FfiConverterString.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3440
4020
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_public_descriptor(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
|
|
3441
4021
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3442
4022
|
}
|
|
3443
|
-
|
|
3444
|
-
/**
|
|
3445
|
-
* Reveal all addresses up to and including the given derivation index.
|
|
3446
|
-
* Mirrors Wallet::reveal_addresses_to().
|
|
3447
|
-
*/
|
|
3448
4023
|
revealAddressesTo(keychain, index) /*throws*/{
|
|
3449
4024
|
return FfiConverterArrayTypeAddressInfo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3450
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);
|
|
3451
4026
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3452
4027
|
}
|
|
3453
|
-
|
|
3454
|
-
/**
|
|
3455
|
-
* Reveal and return the next address at the next derivation index,
|
|
3456
|
-
* incrementing the index even if previous addresses are unused.
|
|
3457
|
-
* Mirrors Wallet::reveal_next_address().
|
|
3458
|
-
*/
|
|
3459
4028
|
revealNextAddress(keychain) /*throws*/{
|
|
3460
4029
|
return FfiConverterTypeAddressInfo.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3461
4030
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_reveal_next_address(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypeKeychainKind.lower(keychain), callStatus);
|
|
3462
4031
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3463
4032
|
}
|
|
3464
|
-
|
|
3465
|
-
/**
|
|
3466
|
-
* Build, sign, and broadcast a simple payment in one call. Returns txid.
|
|
3467
|
-
* Combines build_tx → sign → broadcast via Esplora.
|
|
3468
|
-
*/
|
|
3469
4033
|
async send(address, amountSats, feeRate, esploraUrl, asyncOpts_) /*throws*/{
|
|
3470
4034
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3471
4035
|
try {
|
|
@@ -3479,36 +4043,34 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
3479
4043
|
throw __error;
|
|
3480
4044
|
}
|
|
3481
4045
|
}
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
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
|
+
}
|
|
3487
4059
|
sentAndReceived(txHex) /*throws*/{
|
|
3488
4060
|
return FfiConverterTypeSentAndReceived.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3489
4061
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_sent_and_received(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txHex), callStatus);
|
|
3490
4062
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3491
4063
|
}
|
|
3492
|
-
|
|
3493
|
-
/**
|
|
3494
|
-
* Sign all inputs in the PSBT that this wallet can sign.
|
|
3495
|
-
* Returns true if the PSBT is fully finalized after signing.
|
|
3496
|
-
* Mirrors Wallet::sign() with default SignOptions.
|
|
3497
|
-
*/
|
|
3498
4064
|
sign(psbt) /*throws*/{
|
|
3499
4065
|
return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3500
4066
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_sign(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterTypePsbt.lower(psbt), callStatus);
|
|
3501
4067
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3502
4068
|
}
|
|
3503
|
-
|
|
3504
|
-
/**
|
|
3505
|
-
* Incremental sync via Electrum.
|
|
3506
|
-
*/
|
|
3507
|
-
async syncWithElectrum(url, stopGap, asyncOpts_) /*throws*/{
|
|
4069
|
+
async syncWithElectrum(client, stopGap, asyncOpts_) /*throws*/{
|
|
3508
4070
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3509
4071
|
try {
|
|
3510
4072
|
return await (0, _uniffiBindgenReactNative.uniffiRustCallAsync)(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
|
|
3511
|
-
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_sync_with_electrum(uniffiTypeWalletObjectFactory.clonePointer(this),
|
|
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));
|
|
3512
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));
|
|
3513
4075
|
} catch (__error) {
|
|
3514
4076
|
if (uniffiIsDebug && __error instanceof Error) {
|
|
@@ -3517,11 +4079,6 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
3517
4079
|
throw __error;
|
|
3518
4080
|
}
|
|
3519
4081
|
}
|
|
3520
|
-
|
|
3521
|
-
/**
|
|
3522
|
-
* Incremental sync via Esplora (only checks revealed SPKs + UTXOs + unconfirmed).
|
|
3523
|
-
* Uses Wallet::start_sync_with_revealed_spks() + bdk_esplora client internally.
|
|
3524
|
-
*/
|
|
3525
4082
|
async syncWithEsplora(url, stopGap, asyncOpts_) /*throws*/{
|
|
3526
4083
|
const __stack = uniffiIsDebug ? new Error().stack : undefined;
|
|
3527
4084
|
try {
|
|
@@ -3535,31 +4092,16 @@ class Wallet extends _uniffiBindgenReactNative.UniffiAbstractObject {
|
|
|
3535
4092
|
throw __error;
|
|
3536
4093
|
}
|
|
3537
4094
|
}
|
|
3538
|
-
|
|
3539
|
-
/**
|
|
3540
|
-
* All wallet-relevant canonical transactions.
|
|
3541
|
-
* Mirrors Wallet::transactions() → mapped to TxDetails.
|
|
3542
|
-
*/
|
|
3543
4095
|
transactions() /*throws*/{
|
|
3544
4096
|
return FfiConverterArrayTypeTxDetails.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3545
4097
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_transactions(uniffiTypeWalletObjectFactory.clonePointer(this), callStatus);
|
|
3546
4098
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3547
4099
|
}
|
|
3548
|
-
|
|
3549
|
-
/**
|
|
3550
|
-
* Details for a single transaction. Returns null if not found.
|
|
3551
|
-
* Mirrors Wallet::tx_details().
|
|
3552
|
-
*/
|
|
3553
4100
|
txDetails(txid) /*throws*/{
|
|
3554
4101
|
return FfiConverterOptionalTypeTxDetails.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeBdkError.lift.bind(FfiConverterTypeBdkError), /*caller:*/callStatus => {
|
|
3555
4102
|
return (0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_fn_method_wallet_tx_details(uniffiTypeWalletObjectFactory.clonePointer(this), FfiConverterString.lower(txid), callStatus);
|
|
3556
4103
|
}, /*liftString:*/FfiConverterString.lift));
|
|
3557
4104
|
}
|
|
3558
|
-
|
|
3559
|
-
/**
|
|
3560
|
-
* Mark an address index as unused (returns true if previously used).
|
|
3561
|
-
* Mirrors Wallet::unmark_used().
|
|
3562
|
-
*/
|
|
3563
4105
|
unmarkUsed(keychain, index) {
|
|
3564
4106
|
return _uniffiBindgenReactNative.FfiConverterBool.lift(uniffiCaller.rustCall(/*caller:*/callStatus => {
|
|
3565
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);
|
|
@@ -3703,6 +4245,9 @@ function uniffiEnsureInitialized() {
|
|
|
3703
4245
|
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_func_create_single_key_descriptor() !== 56046) {
|
|
3704
4246
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_func_create_single_key_descriptor");
|
|
3705
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
|
+
}
|
|
3706
4251
|
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_func_export_wallet() !== 53701) {
|
|
3707
4252
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_func_export_wallet");
|
|
3708
4253
|
}
|
|
@@ -3802,7 +4347,7 @@ function uniffiEnsureInitialized() {
|
|
|
3802
4347
|
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_fee_rate() !== 2789) {
|
|
3803
4348
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_fee_rate");
|
|
3804
4349
|
}
|
|
3805
|
-
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_finish() !==
|
|
4350
|
+
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_finish() !== 23648) {
|
|
3806
4351
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_finish");
|
|
3807
4352
|
}
|
|
3808
4353
|
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_include_output_redeem_witness_script() !== 1428) {
|
|
@@ -3841,7 +4386,7 @@ function uniffiEnsureInitialized() {
|
|
|
3841
4386
|
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_txbuilder_unspendable() !== 10665) {
|
|
3842
4387
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_txbuilder_unspendable");
|
|
3843
4388
|
}
|
|
3844
|
-
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_broadcast_with_electrum() !==
|
|
4389
|
+
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_broadcast_with_electrum() !== 26438) {
|
|
3845
4390
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_broadcast_with_electrum");
|
|
3846
4391
|
}
|
|
3847
4392
|
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_broadcast_with_esplora() !== 37423) {
|
|
@@ -3874,10 +4419,13 @@ function uniffiEnsureInitialized() {
|
|
|
3874
4419
|
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_drain() !== 47076) {
|
|
3875
4420
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_drain");
|
|
3876
4421
|
}
|
|
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
|
+
}
|
|
3877
4425
|
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_finalize_psbt() !== 43414) {
|
|
3878
4426
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_finalize_psbt");
|
|
3879
4427
|
}
|
|
3880
|
-
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_full_scan_with_electrum() !==
|
|
4428
|
+
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_full_scan_with_electrum() !== 40837) {
|
|
3881
4429
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_full_scan_with_electrum");
|
|
3882
4430
|
}
|
|
3883
4431
|
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_full_scan_with_esplora() !== 39717) {
|
|
@@ -3946,13 +4494,16 @@ function uniffiEnsureInitialized() {
|
|
|
3946
4494
|
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_send() !== 4457) {
|
|
3947
4495
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_send");
|
|
3948
4496
|
}
|
|
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
|
+
}
|
|
3949
4500
|
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_sent_and_received() !== 949) {
|
|
3950
4501
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_sent_and_received");
|
|
3951
4502
|
}
|
|
3952
4503
|
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_sign() !== 32193) {
|
|
3953
4504
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_sign");
|
|
3954
4505
|
}
|
|
3955
|
-
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_sync_with_electrum() !==
|
|
4506
|
+
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_sync_with_electrum() !== 17015) {
|
|
3956
4507
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_sync_with_electrum");
|
|
3957
4508
|
}
|
|
3958
4509
|
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_sync_with_esplora() !== 28111) {
|
|
@@ -3967,6 +4518,9 @@ function uniffiEnsureInitialized() {
|
|
|
3967
4518
|
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_method_wallet_unmark_used() !== 46731) {
|
|
3968
4519
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_method_wallet_unmark_used");
|
|
3969
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
|
+
}
|
|
3970
4524
|
if ((0, _bdk_ffiFfi.default)().ubrn_uniffi_bdk_ffi_checksum_constructor_mnemonic_from_entropy() !== 37039) {
|
|
3971
4525
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch("uniffi_bdk_ffi_checksum_constructor_mnemonic_from_entropy");
|
|
3972
4526
|
}
|
|
@@ -4003,6 +4557,7 @@ var _default = exports.default = Object.freeze({
|
|
|
4003
4557
|
FfiConverterTypeConfirmationBlockTime,
|
|
4004
4558
|
FfiConverterTypeDerivationInfo,
|
|
4005
4559
|
FfiConverterTypeDescriptorTemplate,
|
|
4560
|
+
FfiConverterTypeElectrumClient,
|
|
4006
4561
|
FfiConverterTypeKeychainInfo,
|
|
4007
4562
|
FfiConverterTypeKeychainKind,
|
|
4008
4563
|
FfiConverterTypeLanguage,
|