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