@bennyblader/ddk-rn 0.3.39 → 0.3.40
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/DdkRn.podspec +0 -3
- package/cpp/bennyblader-ddk-rn.cpp +1 -1
- package/cpp/ddk_ffi.cpp +2573 -2485
- package/cpp/ddk_ffi.hpp +255 -97
- package/ddk-ffi/Cargo.lock +1 -1
- package/ddk-ffi/Cargo.toml +1 -1
- package/lib/commonjs/ddk_ffi-ffi.js.map +1 -1
- package/lib/commonjs/ddk_ffi.js +75 -63
- package/lib/commonjs/ddk_ffi.js.map +1 -1
- package/lib/module/ddk_ffi-ffi.js.map +1 -1
- package/lib/module/ddk_ffi.js +76 -64
- package/lib/module/ddk_ffi.js.map +1 -1
- package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ddk_ffi.d.ts +3 -3
- package/lib/typescript/commonjs/src/ddk_ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/ddk_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/ddk_ffi.d.ts +3 -3
- package/lib/typescript/module/src/ddk_ffi.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ddk_ffi-ffi.ts +83 -331
- package/src/ddk_ffi.ts +1885 -2317
package/src/ddk_ffi.ts
CHANGED
|
@@ -29,2283 +29,1997 @@ import nativeModule, {
|
|
|
29
29
|
type UniffiForeignFutureCompleteRustBuffer,
|
|
30
30
|
type UniffiForeignFutureStructVoid,
|
|
31
31
|
type UniffiForeignFutureCompleteVoid,
|
|
32
|
-
} from
|
|
32
|
+
} from "./ddk_ffi-ffi";
|
|
33
33
|
import {
|
|
34
|
-
type UniffiByteArray,
|
|
35
|
-
AbstractFfiConverterByteArray,
|
|
36
|
-
FfiConverterArray,
|
|
37
|
-
FfiConverterBool,
|
|
38
|
-
FfiConverterInt32,
|
|
39
|
-
FfiConverterOptional,
|
|
40
|
-
FfiConverterUInt32,
|
|
41
|
-
FfiConverterUInt64,
|
|
42
|
-
FfiConverterUInt8,
|
|
43
|
-
RustBuffer,
|
|
44
|
-
UniffiError,
|
|
45
|
-
UniffiInternalError,
|
|
46
|
-
UniffiRustCaller,
|
|
47
|
-
uniffiCreateFfiConverterString,
|
|
48
|
-
uniffiCreateRecord,
|
|
49
|
-
uniffiTypeNameSymbol,
|
|
50
|
-
variantOrdinalSymbol
|
|
51
|
-
} from 'uniffi-bindgen-react-native';
|
|
34
|
+
type UniffiByteArray,
|
|
35
|
+
AbstractFfiConverterByteArray,
|
|
36
|
+
FfiConverterArray,
|
|
37
|
+
FfiConverterBool,
|
|
38
|
+
FfiConverterInt32,
|
|
39
|
+
FfiConverterOptional,
|
|
40
|
+
FfiConverterUInt32,
|
|
41
|
+
FfiConverterUInt64,
|
|
42
|
+
FfiConverterUInt8,
|
|
43
|
+
RustBuffer,
|
|
44
|
+
UniffiError,
|
|
45
|
+
UniffiInternalError,
|
|
46
|
+
UniffiRustCaller,
|
|
47
|
+
uniffiCreateFfiConverterString,
|
|
48
|
+
uniffiCreateRecord,
|
|
49
|
+
uniffiTypeNameSymbol,
|
|
50
|
+
variantOrdinalSymbol } from "uniffi-bindgen-react-native";
|
|
52
51
|
|
|
53
52
|
// Get converters from the other files, if any.
|
|
54
53
|
const uniffiCaller = new UniffiRustCaller(() => ({ code: 0 }));
|
|
55
54
|
|
|
56
55
|
const uniffiIsDebug =
|
|
57
56
|
// @ts-ignore -- The process global might not be defined
|
|
58
|
-
typeof process !==
|
|
57
|
+
typeof process !== "object" ||
|
|
59
58
|
// @ts-ignore -- The process global might not be defined
|
|
60
|
-
process?.env?.NODE_ENV !==
|
|
59
|
+
process?.env?.NODE_ENV !== "production" ||
|
|
61
60
|
true;
|
|
62
61
|
// Public interface members begin here.
|
|
63
62
|
|
|
64
|
-
export function addSignatureToTransaction(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
)
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
)
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
)
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
)
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
)
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
)
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
)
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
)
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
)
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
)
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
)
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
)
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
path: string
|
|
505
|
-
): Array</*u8*/ number> /*throws*/ {
|
|
506
|
-
return FfiConverterArrayUInt8.lift(
|
|
507
|
-
uniffiCaller.rustCallWithError(
|
|
508
|
-
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(
|
|
509
|
-
FfiConverterTypeDLCError
|
|
510
|
-
),
|
|
511
|
-
/*caller:*/ (callStatus) => {
|
|
512
|
-
return (() => {
|
|
513
|
-
console.debug(
|
|
514
|
-
`-- uniffi_ddk_ffi_fn_func_create_xpriv_from_parent_path`
|
|
515
|
-
);
|
|
516
|
-
return nativeModule()
|
|
517
|
-
.ubrn_uniffi_ddk_ffi_fn_func_create_xpriv_from_parent_path;
|
|
518
|
-
})()(
|
|
519
|
-
FfiConverterArrayUInt8.lower(seedOrXpriv),
|
|
520
|
-
FfiConverterString.lower(baseDerivationPath),
|
|
521
|
-
FfiConverterString.lower(network),
|
|
522
|
-
FfiConverterString.lower(path),
|
|
523
|
-
callStatus
|
|
524
|
-
);
|
|
525
|
-
},
|
|
526
|
-
/*liftString:*/ FfiConverterString.lift
|
|
527
|
-
)
|
|
528
|
-
);
|
|
529
|
-
}
|
|
530
|
-
export function extractEcdsaSignatureFromOracleSignatures(
|
|
531
|
-
oracleSignatures: Array<Array</*u8*/ number>>,
|
|
532
|
-
adaptorSignature: Array</*u8*/ number>
|
|
533
|
-
): Array</*u8*/ number> /*throws*/ {
|
|
534
|
-
return FfiConverterArrayUInt8.lift(
|
|
535
|
-
uniffiCaller.rustCallWithError(
|
|
536
|
-
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(
|
|
537
|
-
FfiConverterTypeDLCError
|
|
538
|
-
),
|
|
539
|
-
/*caller:*/ (callStatus) => {
|
|
540
|
-
return (() => {
|
|
541
|
-
console.debug(
|
|
542
|
-
`-- uniffi_ddk_ffi_fn_func_extract_ecdsa_signature_from_oracle_signatures`
|
|
543
|
-
);
|
|
544
|
-
return nativeModule()
|
|
545
|
-
.ubrn_uniffi_ddk_ffi_fn_func_extract_ecdsa_signature_from_oracle_signatures;
|
|
546
|
-
})()(
|
|
547
|
-
FfiConverterArrayArrayUInt8.lower(oracleSignatures),
|
|
548
|
-
FfiConverterArrayUInt8.lower(adaptorSignature),
|
|
549
|
-
callStatus
|
|
550
|
-
);
|
|
551
|
-
},
|
|
552
|
-
/*liftString:*/ FfiConverterString.lift
|
|
553
|
-
)
|
|
554
|
-
);
|
|
555
|
-
}
|
|
556
|
-
export function getCetAdaptorSignatureInputs(
|
|
557
|
-
cet: Transaction,
|
|
558
|
-
oracleInfo: Array<OracleInfo>,
|
|
559
|
-
fundingScriptPubkey: Array</*u8*/ number>,
|
|
560
|
-
fundOutputValue: /*u64*/ bigint,
|
|
561
|
-
msgs: Array<Array<Array</*u8*/ number>>>
|
|
562
|
-
): CetAdaptorSignatureDebugInfo /*throws*/ {
|
|
563
|
-
return FfiConverterTypeCetAdaptorSignatureDebugInfo.lift(
|
|
564
|
-
uniffiCaller.rustCallWithError(
|
|
565
|
-
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(
|
|
566
|
-
FfiConverterTypeDLCError
|
|
567
|
-
),
|
|
568
|
-
/*caller:*/ (callStatus) => {
|
|
569
|
-
return (() => {
|
|
570
|
-
console.debug(
|
|
571
|
-
`-- uniffi_ddk_ffi_fn_func_get_cet_adaptor_signature_inputs`
|
|
572
|
-
);
|
|
573
|
-
return nativeModule()
|
|
574
|
-
.ubrn_uniffi_ddk_ffi_fn_func_get_cet_adaptor_signature_inputs;
|
|
575
|
-
})()(
|
|
576
|
-
FfiConverterTypeTransaction.lower(cet),
|
|
577
|
-
FfiConverterArrayTypeOracleInfo.lower(oracleInfo),
|
|
578
|
-
FfiConverterArrayUInt8.lower(fundingScriptPubkey),
|
|
579
|
-
FfiConverterUInt64.lower(fundOutputValue),
|
|
580
|
-
FfiConverterArrayArrayArrayUInt8.lower(msgs),
|
|
581
|
-
callStatus
|
|
582
|
-
);
|
|
583
|
-
},
|
|
584
|
-
/*liftString:*/ FfiConverterString.lift
|
|
585
|
-
)
|
|
586
|
-
);
|
|
587
|
-
}
|
|
588
|
-
export function getCetSighash(
|
|
589
|
-
cet: Transaction,
|
|
590
|
-
fundingScriptPubkey: Array</*u8*/ number>,
|
|
591
|
-
fundOutputValue: /*u64*/ bigint
|
|
592
|
-
): Array</*u8*/ number> /*throws*/ {
|
|
593
|
-
return FfiConverterArrayUInt8.lift(
|
|
594
|
-
uniffiCaller.rustCallWithError(
|
|
595
|
-
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(
|
|
596
|
-
FfiConverterTypeDLCError
|
|
597
|
-
),
|
|
598
|
-
/*caller:*/ (callStatus) => {
|
|
599
|
-
return (() => {
|
|
600
|
-
console.debug(`-- uniffi_ddk_ffi_fn_func_get_cet_sighash`);
|
|
601
|
-
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_get_cet_sighash;
|
|
602
|
-
})()(
|
|
603
|
-
FfiConverterTypeTransaction.lower(cet),
|
|
604
|
-
FfiConverterArrayUInt8.lower(fundingScriptPubkey),
|
|
605
|
-
FfiConverterUInt64.lower(fundOutputValue),
|
|
606
|
-
callStatus
|
|
607
|
-
);
|
|
608
|
-
},
|
|
609
|
-
/*liftString:*/ FfiConverterString.lift
|
|
610
|
-
)
|
|
611
|
-
);
|
|
612
|
-
}
|
|
613
|
-
export function getChangeOutputAndFees(
|
|
614
|
-
params: PartyParams,
|
|
615
|
-
feeRate: /*u64*/ bigint
|
|
616
|
-
): ChangeOutputAndFees /*throws*/ {
|
|
617
|
-
return FfiConverterTypeChangeOutputAndFees.lift(
|
|
618
|
-
uniffiCaller.rustCallWithError(
|
|
619
|
-
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(
|
|
620
|
-
FfiConverterTypeDLCError
|
|
621
|
-
),
|
|
622
|
-
/*caller:*/ (callStatus) => {
|
|
623
|
-
return (() => {
|
|
624
|
-
console.debug(`-- uniffi_ddk_ffi_fn_func_get_change_output_and_fees`);
|
|
625
|
-
return nativeModule()
|
|
626
|
-
.ubrn_uniffi_ddk_ffi_fn_func_get_change_output_and_fees;
|
|
627
|
-
})()(
|
|
628
|
-
FfiConverterTypePartyParams.lower(params),
|
|
629
|
-
FfiConverterUInt64.lower(feeRate),
|
|
630
|
-
callStatus
|
|
631
|
-
);
|
|
632
|
-
},
|
|
633
|
-
/*liftString:*/ FfiConverterString.lift
|
|
634
|
-
)
|
|
635
|
-
);
|
|
636
|
-
}
|
|
637
|
-
export function getPubkeyFromExtkey(
|
|
638
|
-
extkey: Array</*u8*/ number>,
|
|
639
|
-
network: string
|
|
640
|
-
): Array</*u8*/ number> /*throws*/ {
|
|
641
|
-
return FfiConverterArrayUInt8.lift(
|
|
642
|
-
uniffiCaller.rustCallWithError(
|
|
643
|
-
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(
|
|
644
|
-
FfiConverterTypeDLCError
|
|
645
|
-
),
|
|
646
|
-
/*caller:*/ (callStatus) => {
|
|
647
|
-
return (() => {
|
|
648
|
-
console.debug(`-- uniffi_ddk_ffi_fn_func_get_pubkey_from_extkey`);
|
|
649
|
-
return nativeModule()
|
|
650
|
-
.ubrn_uniffi_ddk_ffi_fn_func_get_pubkey_from_extkey;
|
|
651
|
-
})()(
|
|
652
|
-
FfiConverterArrayUInt8.lower(extkey),
|
|
653
|
-
FfiConverterString.lower(network),
|
|
654
|
-
callStatus
|
|
655
|
-
);
|
|
656
|
-
},
|
|
657
|
-
/*liftString:*/ FfiConverterString.lift
|
|
658
|
-
)
|
|
659
|
-
);
|
|
660
|
-
}
|
|
661
|
-
export function getRawFundingTransactionInputSignature(
|
|
662
|
-
fundingTransaction: Transaction,
|
|
663
|
-
privkey: Array</*u8*/ number>,
|
|
664
|
-
prevTxId: string,
|
|
665
|
-
prevTxVout: /*u32*/ number,
|
|
666
|
-
value: /*u64*/ bigint
|
|
667
|
-
): Array</*u8*/ number> /*throws*/ {
|
|
668
|
-
return FfiConverterArrayUInt8.lift(
|
|
669
|
-
uniffiCaller.rustCallWithError(
|
|
670
|
-
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(
|
|
671
|
-
FfiConverterTypeDLCError
|
|
672
|
-
),
|
|
673
|
-
/*caller:*/ (callStatus) => {
|
|
674
|
-
return (() => {
|
|
675
|
-
console.debug(
|
|
676
|
-
`-- uniffi_ddk_ffi_fn_func_get_raw_funding_transaction_input_signature`
|
|
677
|
-
);
|
|
678
|
-
return nativeModule()
|
|
679
|
-
.ubrn_uniffi_ddk_ffi_fn_func_get_raw_funding_transaction_input_signature;
|
|
680
|
-
})()(
|
|
681
|
-
FfiConverterTypeTransaction.lower(fundingTransaction),
|
|
682
|
-
FfiConverterArrayUInt8.lower(privkey),
|
|
683
|
-
FfiConverterString.lower(prevTxId),
|
|
684
|
-
FfiConverterUInt32.lower(prevTxVout),
|
|
685
|
-
FfiConverterUInt64.lower(value),
|
|
686
|
-
callStatus
|
|
687
|
-
);
|
|
688
|
-
},
|
|
689
|
-
/*liftString:*/ FfiConverterString.lift
|
|
690
|
-
)
|
|
691
|
-
);
|
|
692
|
-
}
|
|
693
|
-
export function getTotalInputVsize(inputs: Array<TxInputInfo>): /*u32*/ number {
|
|
694
|
-
return FfiConverterUInt32.lift(
|
|
695
|
-
uniffiCaller.rustCall(
|
|
696
|
-
/*caller:*/ (callStatus) => {
|
|
697
|
-
return (() => {
|
|
698
|
-
console.debug(`-- uniffi_ddk_ffi_fn_func_get_total_input_vsize`);
|
|
699
|
-
return nativeModule()
|
|
700
|
-
.ubrn_uniffi_ddk_ffi_fn_func_get_total_input_vsize;
|
|
701
|
-
})()(FfiConverterArrayTypeTxInputInfo.lower(inputs), callStatus);
|
|
702
|
-
},
|
|
703
|
-
/*liftString:*/ FfiConverterString.lift
|
|
704
|
-
)
|
|
705
|
-
);
|
|
706
|
-
}
|
|
707
|
-
export function getXpubFromXpriv(
|
|
708
|
-
xpriv: Array</*u8*/ number>,
|
|
709
|
-
network: string
|
|
710
|
-
): Array</*u8*/ number> /*throws*/ {
|
|
711
|
-
return FfiConverterArrayUInt8.lift(
|
|
712
|
-
uniffiCaller.rustCallWithError(
|
|
713
|
-
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(
|
|
714
|
-
FfiConverterTypeDLCError
|
|
715
|
-
),
|
|
716
|
-
/*caller:*/ (callStatus) => {
|
|
717
|
-
return (() => {
|
|
718
|
-
console.debug(`-- uniffi_ddk_ffi_fn_func_get_xpub_from_xpriv`);
|
|
719
|
-
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_get_xpub_from_xpriv;
|
|
720
|
-
})()(
|
|
721
|
-
FfiConverterArrayUInt8.lower(xpriv),
|
|
722
|
-
FfiConverterString.lower(network),
|
|
723
|
-
callStatus
|
|
724
|
-
);
|
|
725
|
-
},
|
|
726
|
-
/*liftString:*/ FfiConverterString.lift
|
|
727
|
-
)
|
|
728
|
-
);
|
|
729
|
-
}
|
|
63
|
+
export function addSignatureToTransaction(tx: Transaction, signature: Array</*u8*/number>, pubkey: Array</*u8*/number>, inputIndex: /*u32*/number): Transaction /*throws*/ {
|
|
64
|
+
return FfiConverterTypeTransaction.lift(
|
|
65
|
+
uniffiCaller.rustCallWithError(
|
|
66
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
67
|
+
/*caller:*/ (callStatus) => {
|
|
68
|
+
return (() => {
|
|
69
|
+
|
|
70
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_add_signature_to_transaction`);
|
|
71
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_add_signature_to_transaction;
|
|
72
|
+
})()(
|
|
73
|
+
FfiConverterTypeTransaction.lower(tx),
|
|
74
|
+
FfiConverterArrayUInt8.lower(signature),
|
|
75
|
+
FfiConverterArrayUInt8.lower(pubkey),
|
|
76
|
+
FfiConverterUInt32.lower(inputIndex),
|
|
77
|
+
callStatus);
|
|
78
|
+
},
|
|
79
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
80
|
+
));
|
|
81
|
+
}
|
|
82
|
+
export function convertMnemonicToSeed(mnemonic: string, passphrase: string | undefined): Array</*u8*/number> /*throws*/ {
|
|
83
|
+
return FfiConverterArrayUInt8.lift(
|
|
84
|
+
uniffiCaller.rustCallWithError(
|
|
85
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
86
|
+
/*caller:*/ (callStatus) => {
|
|
87
|
+
return (() => {
|
|
88
|
+
|
|
89
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_convert_mnemonic_to_seed`);
|
|
90
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_convert_mnemonic_to_seed;
|
|
91
|
+
})()(
|
|
92
|
+
FfiConverterString.lower(mnemonic),
|
|
93
|
+
FfiConverterOptionalString.lower(passphrase),
|
|
94
|
+
callStatus);
|
|
95
|
+
},
|
|
96
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
97
|
+
));
|
|
98
|
+
}
|
|
99
|
+
export function createCet(localOutput: TxOutput, localPayoutSerialId: /*u64*/bigint, remoteOutput: TxOutput, remotePayoutSerialId: /*u64*/bigint, fundTxId: string, fundVout: /*u32*/number, lockTime: /*u32*/number): Transaction /*throws*/ {
|
|
100
|
+
return FfiConverterTypeTransaction.lift(
|
|
101
|
+
uniffiCaller.rustCallWithError(
|
|
102
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
103
|
+
/*caller:*/ (callStatus) => {
|
|
104
|
+
return (() => {
|
|
105
|
+
|
|
106
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_create_cet`);
|
|
107
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_create_cet;
|
|
108
|
+
})()(
|
|
109
|
+
FfiConverterTypeTxOutput.lower(localOutput),
|
|
110
|
+
FfiConverterUInt64.lower(localPayoutSerialId),
|
|
111
|
+
FfiConverterTypeTxOutput.lower(remoteOutput),
|
|
112
|
+
FfiConverterUInt64.lower(remotePayoutSerialId),
|
|
113
|
+
FfiConverterString.lower(fundTxId),
|
|
114
|
+
FfiConverterUInt32.lower(fundVout),
|
|
115
|
+
FfiConverterUInt32.lower(lockTime),
|
|
116
|
+
callStatus);
|
|
117
|
+
},
|
|
118
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
119
|
+
));
|
|
120
|
+
}
|
|
121
|
+
export function createCetAdaptorPointsFromOracleInfo(oracleInfo: Array<OracleInfo>, msgs: Array<Array<Array<Array</*u8*/number>>>>): Array<Array</*u8*/number>> /*throws*/ {
|
|
122
|
+
return FfiConverterArrayArrayUInt8.lift(
|
|
123
|
+
uniffiCaller.rustCallWithError(
|
|
124
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
125
|
+
/*caller:*/ (callStatus) => {
|
|
126
|
+
return (() => {
|
|
127
|
+
|
|
128
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_create_cet_adaptor_points_from_oracle_info`);
|
|
129
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_create_cet_adaptor_points_from_oracle_info;
|
|
130
|
+
})()(
|
|
131
|
+
FfiConverterArrayTypeOracleInfo.lower(oracleInfo),
|
|
132
|
+
FfiConverterArrayArrayArrayArrayUInt8.lower(msgs),
|
|
133
|
+
callStatus);
|
|
134
|
+
},
|
|
135
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
136
|
+
));
|
|
137
|
+
}
|
|
138
|
+
export function createCetAdaptorSignatureFromOracleInfo(cet: Transaction, oracleInfo: OracleInfo, fundingSk: Array</*u8*/number>, fundingScriptPubkey: Array</*u8*/number>, totalCollateral: /*u64*/bigint, msgs: Array<Array</*u8*/number>>): AdaptorSignature /*throws*/ {
|
|
139
|
+
return FfiConverterTypeAdaptorSignature.lift(
|
|
140
|
+
uniffiCaller.rustCallWithError(
|
|
141
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
142
|
+
/*caller:*/ (callStatus) => {
|
|
143
|
+
return (() => {
|
|
144
|
+
|
|
145
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_create_cet_adaptor_signature_from_oracle_info`);
|
|
146
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_create_cet_adaptor_signature_from_oracle_info;
|
|
147
|
+
})()(
|
|
148
|
+
FfiConverterTypeTransaction.lower(cet),
|
|
149
|
+
FfiConverterTypeOracleInfo.lower(oracleInfo),
|
|
150
|
+
FfiConverterArrayUInt8.lower(fundingSk),
|
|
151
|
+
FfiConverterArrayUInt8.lower(fundingScriptPubkey),
|
|
152
|
+
FfiConverterUInt64.lower(totalCollateral),
|
|
153
|
+
FfiConverterArrayArrayUInt8.lower(msgs),
|
|
154
|
+
callStatus);
|
|
155
|
+
},
|
|
156
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
157
|
+
));
|
|
158
|
+
}
|
|
159
|
+
export function createCetAdaptorSigsFromOracleInfo(cets: Array<Transaction>, oracleInfo: Array<OracleInfo>, fundingSecretKey: Array</*u8*/number>, fundingScriptPubkey: Array</*u8*/number>, fundOutputValue: /*u64*/bigint, msgs: Array<Array<Array<Array</*u8*/number>>>>): Array<AdaptorSignature> /*throws*/ {
|
|
160
|
+
return FfiConverterArrayTypeAdaptorSignature.lift(
|
|
161
|
+
uniffiCaller.rustCallWithError(
|
|
162
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
163
|
+
/*caller:*/ (callStatus) => {
|
|
164
|
+
return (() => {
|
|
165
|
+
|
|
166
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_oracle_info`);
|
|
167
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_oracle_info;
|
|
168
|
+
})()(
|
|
169
|
+
FfiConverterArrayTypeTransaction.lower(cets),
|
|
170
|
+
FfiConverterArrayTypeOracleInfo.lower(oracleInfo),
|
|
171
|
+
FfiConverterArrayUInt8.lower(fundingSecretKey),
|
|
172
|
+
FfiConverterArrayUInt8.lower(fundingScriptPubkey),
|
|
173
|
+
FfiConverterUInt64.lower(fundOutputValue),
|
|
174
|
+
FfiConverterArrayArrayArrayArrayUInt8.lower(msgs),
|
|
175
|
+
callStatus);
|
|
176
|
+
},
|
|
177
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
178
|
+
));
|
|
179
|
+
}
|
|
180
|
+
export function createCetAdaptorSigsFromPoints(cets: Array<Transaction>, adaptorPoints: Array<Array</*u8*/number>>, fundingSecretKey: Array</*u8*/number>, fundingScriptPubkey: Array</*u8*/number>, fundOutputValue: /*u64*/bigint): Array<AdaptorSignature> /*throws*/ {
|
|
181
|
+
return FfiConverterArrayTypeAdaptorSignature.lift(
|
|
182
|
+
uniffiCaller.rustCallWithError(
|
|
183
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
184
|
+
/*caller:*/ (callStatus) => {
|
|
185
|
+
return (() => {
|
|
186
|
+
|
|
187
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_points`);
|
|
188
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_points;
|
|
189
|
+
})()(
|
|
190
|
+
FfiConverterArrayTypeTransaction.lower(cets),
|
|
191
|
+
FfiConverterArrayArrayUInt8.lower(adaptorPoints),
|
|
192
|
+
FfiConverterArrayUInt8.lower(fundingSecretKey),
|
|
193
|
+
FfiConverterArrayUInt8.lower(fundingScriptPubkey),
|
|
194
|
+
FfiConverterUInt64.lower(fundOutputValue),
|
|
195
|
+
callStatus);
|
|
196
|
+
},
|
|
197
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
198
|
+
));
|
|
199
|
+
}
|
|
200
|
+
export function createCets(fundTxId: string, fundVout: /*u32*/number, localFinalScriptPubkey: Array</*u8*/number>, remoteFinalScriptPubkey: Array</*u8*/number>, outcomes: Array<Payout>, lockTime: /*u32*/number, localSerialId: /*u64*/bigint, remoteSerialId: /*u64*/bigint): Array<Transaction> /*throws*/ {
|
|
201
|
+
return FfiConverterArrayTypeTransaction.lift(
|
|
202
|
+
uniffiCaller.rustCallWithError(
|
|
203
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
204
|
+
/*caller:*/ (callStatus) => {
|
|
205
|
+
return (() => {
|
|
206
|
+
|
|
207
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_create_cets`);
|
|
208
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_create_cets;
|
|
209
|
+
})()(
|
|
210
|
+
FfiConverterString.lower(fundTxId),
|
|
211
|
+
FfiConverterUInt32.lower(fundVout),
|
|
212
|
+
FfiConverterArrayUInt8.lower(localFinalScriptPubkey),
|
|
213
|
+
FfiConverterArrayUInt8.lower(remoteFinalScriptPubkey),
|
|
214
|
+
FfiConverterArrayTypePayout.lower(outcomes),
|
|
215
|
+
FfiConverterUInt32.lower(lockTime),
|
|
216
|
+
FfiConverterUInt64.lower(localSerialId),
|
|
217
|
+
FfiConverterUInt64.lower(remoteSerialId),
|
|
218
|
+
callStatus);
|
|
219
|
+
},
|
|
220
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
221
|
+
));
|
|
222
|
+
}
|
|
223
|
+
export function createDlcTransactions(outcomes: Array<Payout>, localParams: PartyParams, remoteParams: PartyParams, refundLocktime: /*u32*/number, feeRate: /*u64*/bigint, fundLockTime: /*u32*/number, cetLockTime: /*u32*/number, fundOutputSerialId: /*u64*/bigint, contractFlags: /*u8*/number): DlcTransactions /*throws*/ {
|
|
224
|
+
return FfiConverterTypeDlcTransactions.lift(
|
|
225
|
+
uniffiCaller.rustCallWithError(
|
|
226
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
227
|
+
/*caller:*/ (callStatus) => {
|
|
228
|
+
return (() => {
|
|
229
|
+
|
|
230
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_create_dlc_transactions`);
|
|
231
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_create_dlc_transactions;
|
|
232
|
+
})()(
|
|
233
|
+
FfiConverterArrayTypePayout.lower(outcomes),
|
|
234
|
+
FfiConverterTypePartyParams.lower(localParams),
|
|
235
|
+
FfiConverterTypePartyParams.lower(remoteParams),
|
|
236
|
+
FfiConverterUInt32.lower(refundLocktime),
|
|
237
|
+
FfiConverterUInt64.lower(feeRate),
|
|
238
|
+
FfiConverterUInt32.lower(fundLockTime),
|
|
239
|
+
FfiConverterUInt32.lower(cetLockTime),
|
|
240
|
+
FfiConverterUInt64.lower(fundOutputSerialId),
|
|
241
|
+
FfiConverterUInt8.lower(contractFlags),
|
|
242
|
+
callStatus);
|
|
243
|
+
},
|
|
244
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
245
|
+
));
|
|
246
|
+
}
|
|
247
|
+
export function createExtkeyFromParentPath(extkey: Array</*u8*/number>, path: string): Array</*u8*/number> /*throws*/ {
|
|
248
|
+
return FfiConverterArrayUInt8.lift(
|
|
249
|
+
uniffiCaller.rustCallWithError(
|
|
250
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
251
|
+
/*caller:*/ (callStatus) => {
|
|
252
|
+
return (() => {
|
|
253
|
+
|
|
254
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_create_extkey_from_parent_path`);
|
|
255
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_create_extkey_from_parent_path;
|
|
256
|
+
})()(
|
|
257
|
+
FfiConverterArrayUInt8.lower(extkey),
|
|
258
|
+
FfiConverterString.lower(path),
|
|
259
|
+
callStatus);
|
|
260
|
+
},
|
|
261
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
262
|
+
));
|
|
263
|
+
}
|
|
264
|
+
export function createExtkeyFromSeed(seed: Array</*u8*/number>, network: string): Array</*u8*/number> /*throws*/ {
|
|
265
|
+
return FfiConverterArrayUInt8.lift(
|
|
266
|
+
uniffiCaller.rustCallWithError(
|
|
267
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
268
|
+
/*caller:*/ (callStatus) => {
|
|
269
|
+
return (() => {
|
|
270
|
+
|
|
271
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_create_extkey_from_seed`);
|
|
272
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_create_extkey_from_seed;
|
|
273
|
+
})()(
|
|
274
|
+
FfiConverterArrayUInt8.lower(seed),
|
|
275
|
+
FfiConverterString.lower(network),
|
|
276
|
+
callStatus);
|
|
277
|
+
},
|
|
278
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
279
|
+
));
|
|
280
|
+
}
|
|
281
|
+
export function createFundTxLockingScript(localFundPubkey: Array</*u8*/number>, remoteFundPubkey: Array</*u8*/number>): Array</*u8*/number> /*throws*/ {
|
|
282
|
+
return FfiConverterArrayUInt8.lift(
|
|
283
|
+
uniffiCaller.rustCallWithError(
|
|
284
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
285
|
+
/*caller:*/ (callStatus) => {
|
|
286
|
+
return (() => {
|
|
287
|
+
|
|
288
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_create_fund_tx_locking_script`);
|
|
289
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_create_fund_tx_locking_script;
|
|
290
|
+
})()(
|
|
291
|
+
FfiConverterArrayUInt8.lower(localFundPubkey),
|
|
292
|
+
FfiConverterArrayUInt8.lower(remoteFundPubkey),
|
|
293
|
+
callStatus);
|
|
294
|
+
},
|
|
295
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
296
|
+
));
|
|
297
|
+
}
|
|
298
|
+
export function createRefundTransaction(localFinalScriptPubkey: Array</*u8*/number>, remoteFinalScriptPubkey: Array</*u8*/number>, localAmount: /*u64*/bigint, remoteAmount: /*u64*/bigint, lockTime: /*u32*/number, fundTxId: string, fundVout: /*u32*/number): Transaction /*throws*/ {
|
|
299
|
+
return FfiConverterTypeTransaction.lift(
|
|
300
|
+
uniffiCaller.rustCallWithError(
|
|
301
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
302
|
+
/*caller:*/ (callStatus) => {
|
|
303
|
+
return (() => {
|
|
304
|
+
|
|
305
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_create_refund_transaction`);
|
|
306
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_create_refund_transaction;
|
|
307
|
+
})()(
|
|
308
|
+
FfiConverterArrayUInt8.lower(localFinalScriptPubkey),
|
|
309
|
+
FfiConverterArrayUInt8.lower(remoteFinalScriptPubkey),
|
|
310
|
+
FfiConverterUInt64.lower(localAmount),
|
|
311
|
+
FfiConverterUInt64.lower(remoteAmount),
|
|
312
|
+
FfiConverterUInt32.lower(lockTime),
|
|
313
|
+
FfiConverterString.lower(fundTxId),
|
|
314
|
+
FfiConverterUInt32.lower(fundVout),
|
|
315
|
+
callStatus);
|
|
316
|
+
},
|
|
317
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
318
|
+
));
|
|
319
|
+
}
|
|
320
|
+
export function createSplicedDlcTransactions(outcomes: Array<Payout>, localParams: PartyParams, remoteParams: PartyParams, refundLocktime: /*u32*/number, feeRate: /*u64*/bigint, fundLockTime: /*u32*/number, cetLockTime: /*u32*/number, fundOutputSerialId: /*u64*/bigint, contractFlags: /*u8*/number): DlcTransactions /*throws*/ {
|
|
321
|
+
return FfiConverterTypeDlcTransactions.lift(
|
|
322
|
+
uniffiCaller.rustCallWithError(
|
|
323
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
324
|
+
/*caller:*/ (callStatus) => {
|
|
325
|
+
return (() => {
|
|
326
|
+
|
|
327
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_create_spliced_dlc_transactions`);
|
|
328
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_create_spliced_dlc_transactions;
|
|
329
|
+
})()(
|
|
330
|
+
FfiConverterArrayTypePayout.lower(outcomes),
|
|
331
|
+
FfiConverterTypePartyParams.lower(localParams),
|
|
332
|
+
FfiConverterTypePartyParams.lower(remoteParams),
|
|
333
|
+
FfiConverterUInt32.lower(refundLocktime),
|
|
334
|
+
FfiConverterUInt64.lower(feeRate),
|
|
335
|
+
FfiConverterUInt32.lower(fundLockTime),
|
|
336
|
+
FfiConverterUInt32.lower(cetLockTime),
|
|
337
|
+
FfiConverterUInt64.lower(fundOutputSerialId),
|
|
338
|
+
FfiConverterUInt8.lower(contractFlags),
|
|
339
|
+
callStatus);
|
|
340
|
+
},
|
|
341
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
342
|
+
));
|
|
343
|
+
}
|
|
344
|
+
export function createXprivFromParentPath(seedOrXpriv: Array</*u8*/number>, baseDerivationPath: string, network: string, path: string): Array</*u8*/number> /*throws*/ {
|
|
345
|
+
return FfiConverterArrayUInt8.lift(
|
|
346
|
+
uniffiCaller.rustCallWithError(
|
|
347
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
348
|
+
/*caller:*/ (callStatus) => {
|
|
349
|
+
return (() => {
|
|
350
|
+
|
|
351
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_create_xpriv_from_parent_path`);
|
|
352
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_create_xpriv_from_parent_path;
|
|
353
|
+
})()(
|
|
354
|
+
FfiConverterArrayUInt8.lower(seedOrXpriv),
|
|
355
|
+
FfiConverterString.lower(baseDerivationPath),
|
|
356
|
+
FfiConverterString.lower(network),
|
|
357
|
+
FfiConverterString.lower(path),
|
|
358
|
+
callStatus);
|
|
359
|
+
},
|
|
360
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
361
|
+
));
|
|
362
|
+
}
|
|
363
|
+
export function extractEcdsaSignatureFromOracleSignatures(oracleSignatures: Array<Array</*u8*/number>>, adaptorSignature: Array</*u8*/number>): Array</*u8*/number> /*throws*/ {
|
|
364
|
+
return FfiConverterArrayUInt8.lift(
|
|
365
|
+
uniffiCaller.rustCallWithError(
|
|
366
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
367
|
+
/*caller:*/ (callStatus) => {
|
|
368
|
+
return (() => {
|
|
369
|
+
|
|
370
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_extract_ecdsa_signature_from_oracle_signatures`);
|
|
371
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_extract_ecdsa_signature_from_oracle_signatures;
|
|
372
|
+
})()(
|
|
373
|
+
FfiConverterArrayArrayUInt8.lower(oracleSignatures),
|
|
374
|
+
FfiConverterArrayUInt8.lower(adaptorSignature),
|
|
375
|
+
callStatus);
|
|
376
|
+
},
|
|
377
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
378
|
+
));
|
|
379
|
+
}
|
|
380
|
+
export function getCetAdaptorSignatureInputs(cet: Transaction, oracleInfo: Array<OracleInfo>, fundingScriptPubkey: Array</*u8*/number>, fundOutputValue: /*u64*/bigint, msgs: Array<Array<Array</*u8*/number>>>): CetAdaptorSignatureDebugInfo /*throws*/ {
|
|
381
|
+
return FfiConverterTypeCetAdaptorSignatureDebugInfo.lift(
|
|
382
|
+
uniffiCaller.rustCallWithError(
|
|
383
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
384
|
+
/*caller:*/ (callStatus) => {
|
|
385
|
+
return (() => {
|
|
386
|
+
|
|
387
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_get_cet_adaptor_signature_inputs`);
|
|
388
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_get_cet_adaptor_signature_inputs;
|
|
389
|
+
})()(
|
|
390
|
+
FfiConverterTypeTransaction.lower(cet),
|
|
391
|
+
FfiConverterArrayTypeOracleInfo.lower(oracleInfo),
|
|
392
|
+
FfiConverterArrayUInt8.lower(fundingScriptPubkey),
|
|
393
|
+
FfiConverterUInt64.lower(fundOutputValue),
|
|
394
|
+
FfiConverterArrayArrayArrayUInt8.lower(msgs),
|
|
395
|
+
callStatus);
|
|
396
|
+
},
|
|
397
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
398
|
+
));
|
|
399
|
+
}
|
|
400
|
+
export function getCetSighash(cet: Transaction, fundingScriptPubkey: Array</*u8*/number>, fundOutputValue: /*u64*/bigint): Array</*u8*/number> /*throws*/ {
|
|
401
|
+
return FfiConverterArrayUInt8.lift(
|
|
402
|
+
uniffiCaller.rustCallWithError(
|
|
403
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
404
|
+
/*caller:*/ (callStatus) => {
|
|
405
|
+
return (() => {
|
|
406
|
+
|
|
407
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_get_cet_sighash`);
|
|
408
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_get_cet_sighash;
|
|
409
|
+
})()(
|
|
410
|
+
FfiConverterTypeTransaction.lower(cet),
|
|
411
|
+
FfiConverterArrayUInt8.lower(fundingScriptPubkey),
|
|
412
|
+
FfiConverterUInt64.lower(fundOutputValue),
|
|
413
|
+
callStatus);
|
|
414
|
+
},
|
|
415
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
416
|
+
));
|
|
417
|
+
}
|
|
418
|
+
export function getChangeOutputAndFees(params: PartyParams, feeRate: /*u64*/bigint): ChangeOutputAndFees /*throws*/ {
|
|
419
|
+
return FfiConverterTypeChangeOutputAndFees.lift(
|
|
420
|
+
uniffiCaller.rustCallWithError(
|
|
421
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
422
|
+
/*caller:*/ (callStatus) => {
|
|
423
|
+
return (() => {
|
|
424
|
+
|
|
425
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_get_change_output_and_fees`);
|
|
426
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_get_change_output_and_fees;
|
|
427
|
+
})()(
|
|
428
|
+
FfiConverterTypePartyParams.lower(params),
|
|
429
|
+
FfiConverterUInt64.lower(feeRate),
|
|
430
|
+
callStatus);
|
|
431
|
+
},
|
|
432
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
433
|
+
));
|
|
434
|
+
}
|
|
435
|
+
export function getPubkeyFromExtkey(extkey: Array</*u8*/number>, network: string): Array</*u8*/number> /*throws*/ {
|
|
436
|
+
return FfiConverterArrayUInt8.lift(
|
|
437
|
+
uniffiCaller.rustCallWithError(
|
|
438
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
439
|
+
/*caller:*/ (callStatus) => {
|
|
440
|
+
return (() => {
|
|
441
|
+
|
|
442
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_get_pubkey_from_extkey`);
|
|
443
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_get_pubkey_from_extkey;
|
|
444
|
+
})()(
|
|
445
|
+
FfiConverterArrayUInt8.lower(extkey),
|
|
446
|
+
FfiConverterString.lower(network),
|
|
447
|
+
callStatus);
|
|
448
|
+
},
|
|
449
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
450
|
+
));
|
|
451
|
+
}
|
|
452
|
+
export function getRawFundingTransactionInputSignature(fundingTransaction: Transaction, privkey: Array</*u8*/number>, prevTxId: string, prevTxVout: /*u32*/number, value: /*u64*/bigint): Array</*u8*/number> /*throws*/ {
|
|
453
|
+
return FfiConverterArrayUInt8.lift(
|
|
454
|
+
uniffiCaller.rustCallWithError(
|
|
455
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
456
|
+
/*caller:*/ (callStatus) => {
|
|
457
|
+
return (() => {
|
|
458
|
+
|
|
459
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_get_raw_funding_transaction_input_signature`);
|
|
460
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_get_raw_funding_transaction_input_signature;
|
|
461
|
+
})()(
|
|
462
|
+
FfiConverterTypeTransaction.lower(fundingTransaction),
|
|
463
|
+
FfiConverterArrayUInt8.lower(privkey),
|
|
464
|
+
FfiConverterString.lower(prevTxId),
|
|
465
|
+
FfiConverterUInt32.lower(prevTxVout),
|
|
466
|
+
FfiConverterUInt64.lower(value),
|
|
467
|
+
callStatus);
|
|
468
|
+
},
|
|
469
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
470
|
+
));
|
|
471
|
+
}
|
|
472
|
+
export function getTotalInputVsize(inputs: Array<TxInputInfo>): /*u32*/number {
|
|
473
|
+
return FfiConverterUInt32.lift(uniffiCaller.rustCall(
|
|
474
|
+
/*caller:*/ (callStatus) => {
|
|
475
|
+
return (() => {
|
|
476
|
+
|
|
477
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_get_total_input_vsize`);
|
|
478
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_get_total_input_vsize;
|
|
479
|
+
})()(
|
|
480
|
+
FfiConverterArrayTypeTxInputInfo.lower(inputs),
|
|
481
|
+
callStatus);
|
|
482
|
+
},
|
|
483
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
484
|
+
));
|
|
485
|
+
}
|
|
486
|
+
export function getXpubFromXpriv(xpriv: Array</*u8*/number>, network: string): Array</*u8*/number> /*throws*/ {
|
|
487
|
+
return FfiConverterArrayUInt8.lift(
|
|
488
|
+
uniffiCaller.rustCallWithError(
|
|
489
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
490
|
+
/*caller:*/ (callStatus) => {
|
|
491
|
+
return (() => {
|
|
492
|
+
|
|
493
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_get_xpub_from_xpriv`);
|
|
494
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_get_xpub_from_xpriv;
|
|
495
|
+
})()(
|
|
496
|
+
FfiConverterArrayUInt8.lower(xpriv),
|
|
497
|
+
FfiConverterString.lower(network),
|
|
498
|
+
callStatus);
|
|
499
|
+
},
|
|
500
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
501
|
+
));
|
|
502
|
+
}
|
|
730
503
|
export function isDustOutput(output: TxOutput): boolean {
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
)
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
)
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
)
|
|
867
|
-
);
|
|
868
|
-
}
|
|
869
|
-
export function verifyCetAdaptorSigsFromOracleInfo(
|
|
870
|
-
adaptorSigs: Array<AdaptorSignature>,
|
|
871
|
-
cets: Array<Transaction>,
|
|
872
|
-
oracleInfo: Array<OracleInfo>,
|
|
873
|
-
pubkey: Array</*u8*/ number>,
|
|
874
|
-
fundingScriptPubkey: Array</*u8*/ number>,
|
|
875
|
-
totalCollateral: /*u64*/ bigint,
|
|
876
|
-
msgs: Array<Array<Array<Array</*u8*/ number>>>>
|
|
877
|
-
): boolean {
|
|
878
|
-
return FfiConverterBool.lift(
|
|
879
|
-
uniffiCaller.rustCall(
|
|
880
|
-
/*caller:*/ (callStatus) => {
|
|
881
|
-
return (() => {
|
|
882
|
-
console.debug(
|
|
883
|
-
`-- uniffi_ddk_ffi_fn_func_verify_cet_adaptor_sigs_from_oracle_info`
|
|
884
|
-
);
|
|
885
|
-
return nativeModule()
|
|
886
|
-
.ubrn_uniffi_ddk_ffi_fn_func_verify_cet_adaptor_sigs_from_oracle_info;
|
|
887
|
-
})()(
|
|
888
|
-
FfiConverterArrayTypeAdaptorSignature.lower(adaptorSigs),
|
|
889
|
-
FfiConverterArrayTypeTransaction.lower(cets),
|
|
890
|
-
FfiConverterArrayTypeOracleInfo.lower(oracleInfo),
|
|
891
|
-
FfiConverterArrayUInt8.lower(pubkey),
|
|
892
|
-
FfiConverterArrayUInt8.lower(fundingScriptPubkey),
|
|
893
|
-
FfiConverterUInt64.lower(totalCollateral),
|
|
894
|
-
FfiConverterArrayArrayArrayArrayUInt8.lower(msgs),
|
|
895
|
-
callStatus
|
|
896
|
-
);
|
|
897
|
-
},
|
|
898
|
-
/*liftString:*/ FfiConverterString.lift
|
|
899
|
-
)
|
|
900
|
-
);
|
|
901
|
-
}
|
|
902
|
-
export function verifyFundTxSignature(
|
|
903
|
-
fundTx: Transaction,
|
|
904
|
-
signature: Array</*u8*/ number>,
|
|
905
|
-
pubkey: Array</*u8*/ number>,
|
|
906
|
-
txid: string,
|
|
907
|
-
vout: /*u32*/ number,
|
|
908
|
-
inputAmount: /*u64*/ bigint
|
|
909
|
-
): boolean /*throws*/ {
|
|
910
|
-
return FfiConverterBool.lift(
|
|
911
|
-
uniffiCaller.rustCallWithError(
|
|
912
|
-
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(
|
|
913
|
-
FfiConverterTypeDLCError
|
|
914
|
-
),
|
|
915
|
-
/*caller:*/ (callStatus) => {
|
|
916
|
-
return (() => {
|
|
917
|
-
console.debug(`-- uniffi_ddk_ffi_fn_func_verify_fund_tx_signature`);
|
|
918
|
-
return nativeModule()
|
|
919
|
-
.ubrn_uniffi_ddk_ffi_fn_func_verify_fund_tx_signature;
|
|
920
|
-
})()(
|
|
921
|
-
FfiConverterTypeTransaction.lower(fundTx),
|
|
922
|
-
FfiConverterArrayUInt8.lower(signature),
|
|
923
|
-
FfiConverterArrayUInt8.lower(pubkey),
|
|
924
|
-
FfiConverterString.lower(txid),
|
|
925
|
-
FfiConverterUInt32.lower(vout),
|
|
926
|
-
FfiConverterUInt64.lower(inputAmount),
|
|
927
|
-
callStatus
|
|
928
|
-
);
|
|
929
|
-
},
|
|
930
|
-
/*liftString:*/ FfiConverterString.lift
|
|
931
|
-
)
|
|
932
|
-
);
|
|
933
|
-
}
|
|
504
|
+
return FfiConverterBool.lift(uniffiCaller.rustCall(
|
|
505
|
+
/*caller:*/ (callStatus) => {
|
|
506
|
+
return (() => {
|
|
507
|
+
|
|
508
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_is_dust_output`);
|
|
509
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_is_dust_output;
|
|
510
|
+
})()(
|
|
511
|
+
FfiConverterTypeTxOutput.lower(output),
|
|
512
|
+
callStatus);
|
|
513
|
+
},
|
|
514
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
515
|
+
));
|
|
516
|
+
}
|
|
517
|
+
export function signCet(cet: Transaction, adaptorSignature: Array</*u8*/number>, oracleSignatures: Array<Array</*u8*/number>>, fundingSecretKey: Array</*u8*/number>, otherPubkey: Array</*u8*/number>, fundingScriptPubkey: Array</*u8*/number>, fundOutputValue: /*u64*/bigint): Transaction /*throws*/ {
|
|
518
|
+
return FfiConverterTypeTransaction.lift(
|
|
519
|
+
uniffiCaller.rustCallWithError(
|
|
520
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
521
|
+
/*caller:*/ (callStatus) => {
|
|
522
|
+
return (() => {
|
|
523
|
+
|
|
524
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_sign_cet`);
|
|
525
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_sign_cet;
|
|
526
|
+
})()(
|
|
527
|
+
FfiConverterTypeTransaction.lower(cet),
|
|
528
|
+
FfiConverterArrayUInt8.lower(adaptorSignature),
|
|
529
|
+
FfiConverterArrayArrayUInt8.lower(oracleSignatures),
|
|
530
|
+
FfiConverterArrayUInt8.lower(fundingSecretKey),
|
|
531
|
+
FfiConverterArrayUInt8.lower(otherPubkey),
|
|
532
|
+
FfiConverterArrayUInt8.lower(fundingScriptPubkey),
|
|
533
|
+
FfiConverterUInt64.lower(fundOutputValue),
|
|
534
|
+
callStatus);
|
|
535
|
+
},
|
|
536
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
537
|
+
));
|
|
538
|
+
}
|
|
539
|
+
export function signFundTransactionInput(fundTransaction: Transaction, privkey: Array</*u8*/number>, prevTxId: string, prevTxVout: /*u32*/number, value: /*u64*/bigint): Transaction /*throws*/ {
|
|
540
|
+
return FfiConverterTypeTransaction.lift(
|
|
541
|
+
uniffiCaller.rustCallWithError(
|
|
542
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
543
|
+
/*caller:*/ (callStatus) => {
|
|
544
|
+
return (() => {
|
|
545
|
+
|
|
546
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_sign_fund_transaction_input`);
|
|
547
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_sign_fund_transaction_input;
|
|
548
|
+
})()(
|
|
549
|
+
FfiConverterTypeTransaction.lower(fundTransaction),
|
|
550
|
+
FfiConverterArrayUInt8.lower(privkey),
|
|
551
|
+
FfiConverterString.lower(prevTxId),
|
|
552
|
+
FfiConverterUInt32.lower(prevTxVout),
|
|
553
|
+
FfiConverterUInt64.lower(value),
|
|
554
|
+
callStatus);
|
|
555
|
+
},
|
|
556
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
557
|
+
));
|
|
558
|
+
}
|
|
559
|
+
export function signMultiSigInput(tx: Transaction, dlcInput: DlcInputInfo, localPrivkey: Array</*u8*/number>, remoteSignature: Array</*u8*/number>): Transaction /*throws*/ {
|
|
560
|
+
return FfiConverterTypeTransaction.lift(
|
|
561
|
+
uniffiCaller.rustCallWithError(
|
|
562
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
563
|
+
/*caller:*/ (callStatus) => {
|
|
564
|
+
return (() => {
|
|
565
|
+
|
|
566
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_sign_multi_sig_input`);
|
|
567
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_sign_multi_sig_input;
|
|
568
|
+
})()(
|
|
569
|
+
FfiConverterTypeTransaction.lower(tx),
|
|
570
|
+
FfiConverterTypeDlcInputInfo.lower(dlcInput),
|
|
571
|
+
FfiConverterArrayUInt8.lower(localPrivkey),
|
|
572
|
+
FfiConverterArrayUInt8.lower(remoteSignature),
|
|
573
|
+
callStatus);
|
|
574
|
+
},
|
|
575
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
576
|
+
));
|
|
577
|
+
}
|
|
578
|
+
export function verifyCetAdaptorSigFromOracleInfo(adaptorSig: AdaptorSignature, cet: Transaction, oracleInfo: Array<OracleInfo>, pubkey: Array</*u8*/number>, fundingScriptPubkey: Array</*u8*/number>, totalCollateral: /*u64*/bigint, msgs: Array<Array<Array</*u8*/number>>>): boolean {
|
|
579
|
+
return FfiConverterBool.lift(uniffiCaller.rustCall(
|
|
580
|
+
/*caller:*/ (callStatus) => {
|
|
581
|
+
return (() => {
|
|
582
|
+
|
|
583
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_verify_cet_adaptor_sig_from_oracle_info`);
|
|
584
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_verify_cet_adaptor_sig_from_oracle_info;
|
|
585
|
+
})()(
|
|
586
|
+
FfiConverterTypeAdaptorSignature.lower(adaptorSig),
|
|
587
|
+
FfiConverterTypeTransaction.lower(cet),
|
|
588
|
+
FfiConverterArrayTypeOracleInfo.lower(oracleInfo),
|
|
589
|
+
FfiConverterArrayUInt8.lower(pubkey),
|
|
590
|
+
FfiConverterArrayUInt8.lower(fundingScriptPubkey),
|
|
591
|
+
FfiConverterUInt64.lower(totalCollateral),
|
|
592
|
+
FfiConverterArrayArrayArrayUInt8.lower(msgs),
|
|
593
|
+
callStatus);
|
|
594
|
+
},
|
|
595
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
596
|
+
));
|
|
597
|
+
}
|
|
598
|
+
export function verifyCetAdaptorSigsFromOracleInfo(adaptorSigs: Array<AdaptorSignature>, cets: Array<Transaction>, oracleInfo: Array<OracleInfo>, pubkey: Array</*u8*/number>, fundingScriptPubkey: Array</*u8*/number>, totalCollateral: /*u64*/bigint, msgs: Array<Array<Array<Array</*u8*/number>>>>): boolean {
|
|
599
|
+
return FfiConverterBool.lift(uniffiCaller.rustCall(
|
|
600
|
+
/*caller:*/ (callStatus) => {
|
|
601
|
+
return (() => {
|
|
602
|
+
|
|
603
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_verify_cet_adaptor_sigs_from_oracle_info`);
|
|
604
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_verify_cet_adaptor_sigs_from_oracle_info;
|
|
605
|
+
})()(
|
|
606
|
+
FfiConverterArrayTypeAdaptorSignature.lower(adaptorSigs),
|
|
607
|
+
FfiConverterArrayTypeTransaction.lower(cets),
|
|
608
|
+
FfiConverterArrayTypeOracleInfo.lower(oracleInfo),
|
|
609
|
+
FfiConverterArrayUInt8.lower(pubkey),
|
|
610
|
+
FfiConverterArrayUInt8.lower(fundingScriptPubkey),
|
|
611
|
+
FfiConverterUInt64.lower(totalCollateral),
|
|
612
|
+
FfiConverterArrayArrayArrayArrayUInt8.lower(msgs),
|
|
613
|
+
callStatus);
|
|
614
|
+
},
|
|
615
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
616
|
+
));
|
|
617
|
+
}
|
|
618
|
+
export function verifyFundTxSignature(fundTx: Transaction, signature: Array</*u8*/number>, pubkey: Array</*u8*/number>, txid: string, vout: /*u32*/number, inputAmount: /*u64*/bigint): boolean /*throws*/ {
|
|
619
|
+
return FfiConverterBool.lift(
|
|
620
|
+
uniffiCaller.rustCallWithError(
|
|
621
|
+
/*liftError:*/ FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError),
|
|
622
|
+
/*caller:*/ (callStatus) => {
|
|
623
|
+
return (() => {
|
|
624
|
+
|
|
625
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_verify_fund_tx_signature`);
|
|
626
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_verify_fund_tx_signature;
|
|
627
|
+
})()(
|
|
628
|
+
FfiConverterTypeTransaction.lower(fundTx),
|
|
629
|
+
FfiConverterArrayUInt8.lower(signature),
|
|
630
|
+
FfiConverterArrayUInt8.lower(pubkey),
|
|
631
|
+
FfiConverterString.lower(txid),
|
|
632
|
+
FfiConverterUInt32.lower(vout),
|
|
633
|
+
FfiConverterUInt64.lower(inputAmount),
|
|
634
|
+
callStatus);
|
|
635
|
+
},
|
|
636
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
637
|
+
));
|
|
638
|
+
}
|
|
934
639
|
export function version(): string {
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
}
|
|
640
|
+
return FfiConverterString.lift(uniffiCaller.rustCall(
|
|
641
|
+
/*caller:*/ (callStatus) => {
|
|
642
|
+
return (() => {
|
|
643
|
+
|
|
644
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_version`);
|
|
645
|
+
return nativeModule().ubrn_uniffi_ddk_ffi_fn_func_version;
|
|
646
|
+
})()(
|
|
647
|
+
callStatus);
|
|
648
|
+
},
|
|
649
|
+
/*liftString:*/ FfiConverterString.lift,
|
|
650
|
+
));
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
|
|
947
657
|
|
|
948
658
|
export type AdaptorSignature = {
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
}
|
|
659
|
+
signature: Array</*u8*/number>,
|
|
660
|
+
proof: Array</*u8*/number>
|
|
661
|
+
}
|
|
952
662
|
|
|
953
663
|
/**
|
|
954
664
|
* Generated factory for {@link AdaptorSignature} record objects.
|
|
955
665
|
*/
|
|
956
666
|
export const AdaptorSignature = (() => {
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
);
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
});
|
|
667
|
+
const defaults = () => ({
|
|
668
|
+
});
|
|
669
|
+
const create = (() => {
|
|
670
|
+
return uniffiCreateRecord<AdaptorSignature, ReturnType<typeof defaults>>(defaults);
|
|
671
|
+
})();
|
|
672
|
+
return Object.freeze({
|
|
673
|
+
/**
|
|
674
|
+
* Create a frozen instance of {@link AdaptorSignature}, with defaults specified
|
|
675
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
676
|
+
*/
|
|
677
|
+
create,
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* Create a frozen instance of {@link AdaptorSignature}, with defaults specified
|
|
681
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
682
|
+
*/
|
|
683
|
+
new: create,
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Defaults specified in the {@link ddk_ffi} crate.
|
|
687
|
+
*/
|
|
688
|
+
defaults: () => Object.freeze(defaults()) as Partial<AdaptorSignature>,
|
|
689
|
+
});
|
|
981
690
|
})();
|
|
982
691
|
|
|
983
692
|
const FfiConverterTypeAdaptorSignature = (() => {
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
return new FFIConverter();
|
|
693
|
+
type TypeName = AdaptorSignature;
|
|
694
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
695
|
+
read(from: RustBuffer): TypeName {
|
|
696
|
+
return {
|
|
697
|
+
signature: FfiConverterArrayUInt8.read(from),
|
|
698
|
+
proof: FfiConverterArrayUInt8.read(from)
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
702
|
+
FfiConverterArrayUInt8.write(value.signature, into);
|
|
703
|
+
FfiConverterArrayUInt8.write(value.proof, into);
|
|
704
|
+
}
|
|
705
|
+
allocationSize(value: TypeName): number {
|
|
706
|
+
return FfiConverterArrayUInt8.allocationSize(value.signature) +
|
|
707
|
+
FfiConverterArrayUInt8.allocationSize(value.proof);
|
|
708
|
+
|
|
709
|
+
}
|
|
710
|
+
};
|
|
711
|
+
return new FFIConverter();
|
|
1004
712
|
})();
|
|
1005
713
|
|
|
714
|
+
|
|
1006
715
|
export type CetAdaptorSignatureDebugInfo = {
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
}
|
|
716
|
+
sighash: Array</*u8*/number>,
|
|
717
|
+
adaptorPoint: Array</*u8*/number>,
|
|
718
|
+
inputIndex: /*u32*/number,
|
|
719
|
+
scriptPubkey: Array</*u8*/number>,
|
|
720
|
+
value: /*u64*/bigint,
|
|
721
|
+
cetTxid: string,
|
|
722
|
+
cetRaw: Array</*u8*/number>
|
|
723
|
+
}
|
|
1015
724
|
|
|
1016
725
|
/**
|
|
1017
726
|
* Generated factory for {@link CetAdaptorSignatureDebugInfo} record objects.
|
|
1018
727
|
*/
|
|
1019
728
|
export const CetAdaptorSignatureDebugInfo = (() => {
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
defaults: () =>
|
|
1044
|
-
Object.freeze(defaults()) as Partial<CetAdaptorSignatureDebugInfo>,
|
|
1045
|
-
});
|
|
729
|
+
const defaults = () => ({
|
|
730
|
+
});
|
|
731
|
+
const create = (() => {
|
|
732
|
+
return uniffiCreateRecord<CetAdaptorSignatureDebugInfo, ReturnType<typeof defaults>>(defaults);
|
|
733
|
+
})();
|
|
734
|
+
return Object.freeze({
|
|
735
|
+
/**
|
|
736
|
+
* Create a frozen instance of {@link CetAdaptorSignatureDebugInfo}, with defaults specified
|
|
737
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
738
|
+
*/
|
|
739
|
+
create,
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Create a frozen instance of {@link CetAdaptorSignatureDebugInfo}, with defaults specified
|
|
743
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
744
|
+
*/
|
|
745
|
+
new: create,
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* Defaults specified in the {@link ddk_ffi} crate.
|
|
749
|
+
*/
|
|
750
|
+
defaults: () => Object.freeze(defaults()) as Partial<CetAdaptorSignatureDebugInfo>,
|
|
751
|
+
});
|
|
1046
752
|
})();
|
|
1047
753
|
|
|
1048
754
|
const FfiConverterTypeCetAdaptorSignatureDebugInfo = (() => {
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
return new FFIConverter();
|
|
755
|
+
type TypeName = CetAdaptorSignatureDebugInfo;
|
|
756
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
757
|
+
read(from: RustBuffer): TypeName {
|
|
758
|
+
return {
|
|
759
|
+
sighash: FfiConverterArrayUInt8.read(from),
|
|
760
|
+
adaptorPoint: FfiConverterArrayUInt8.read(from),
|
|
761
|
+
inputIndex: FfiConverterUInt32.read(from),
|
|
762
|
+
scriptPubkey: FfiConverterArrayUInt8.read(from),
|
|
763
|
+
value: FfiConverterUInt64.read(from),
|
|
764
|
+
cetTxid: FfiConverterString.read(from),
|
|
765
|
+
cetRaw: FfiConverterArrayUInt8.read(from)
|
|
766
|
+
};
|
|
767
|
+
}
|
|
768
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
769
|
+
FfiConverterArrayUInt8.write(value.sighash, into);
|
|
770
|
+
FfiConverterArrayUInt8.write(value.adaptorPoint, into);
|
|
771
|
+
FfiConverterUInt32.write(value.inputIndex, into);
|
|
772
|
+
FfiConverterArrayUInt8.write(value.scriptPubkey, into);
|
|
773
|
+
FfiConverterUInt64.write(value.value, into);
|
|
774
|
+
FfiConverterString.write(value.cetTxid, into);
|
|
775
|
+
FfiConverterArrayUInt8.write(value.cetRaw, into);
|
|
776
|
+
}
|
|
777
|
+
allocationSize(value: TypeName): number {
|
|
778
|
+
return FfiConverterArrayUInt8.allocationSize(value.sighash) +
|
|
779
|
+
FfiConverterArrayUInt8.allocationSize(value.adaptorPoint) +
|
|
780
|
+
FfiConverterUInt32.allocationSize(value.inputIndex) +
|
|
781
|
+
FfiConverterArrayUInt8.allocationSize(value.scriptPubkey) +
|
|
782
|
+
FfiConverterUInt64.allocationSize(value.value) +
|
|
783
|
+
FfiConverterString.allocationSize(value.cetTxid) +
|
|
784
|
+
FfiConverterArrayUInt8.allocationSize(value.cetRaw);
|
|
785
|
+
|
|
786
|
+
}
|
|
787
|
+
};
|
|
788
|
+
return new FFIConverter();
|
|
1084
789
|
})();
|
|
1085
790
|
|
|
791
|
+
|
|
1086
792
|
export type ChangeOutputAndFees = {
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
}
|
|
793
|
+
changeOutput: TxOutput,
|
|
794
|
+
fundFee: /*u64*/bigint,
|
|
795
|
+
cetFee: /*u64*/bigint
|
|
796
|
+
}
|
|
1091
797
|
|
|
1092
798
|
/**
|
|
1093
799
|
* Generated factory for {@link ChangeOutputAndFees} record objects.
|
|
1094
800
|
*/
|
|
1095
801
|
export const ChangeOutputAndFees = (() => {
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
);
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
});
|
|
802
|
+
const defaults = () => ({
|
|
803
|
+
});
|
|
804
|
+
const create = (() => {
|
|
805
|
+
return uniffiCreateRecord<ChangeOutputAndFees, ReturnType<typeof defaults>>(defaults);
|
|
806
|
+
})();
|
|
807
|
+
return Object.freeze({
|
|
808
|
+
/**
|
|
809
|
+
* Create a frozen instance of {@link ChangeOutputAndFees}, with defaults specified
|
|
810
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
811
|
+
*/
|
|
812
|
+
create,
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* Create a frozen instance of {@link ChangeOutputAndFees}, with defaults specified
|
|
816
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
817
|
+
*/
|
|
818
|
+
new: create,
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* Defaults specified in the {@link ddk_ffi} crate.
|
|
822
|
+
*/
|
|
823
|
+
defaults: () => Object.freeze(defaults()) as Partial<ChangeOutputAndFees>,
|
|
824
|
+
});
|
|
1120
825
|
})();
|
|
1121
826
|
|
|
1122
827
|
const FfiConverterTypeChangeOutputAndFees = (() => {
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
return new FFIConverter();
|
|
828
|
+
type TypeName = ChangeOutputAndFees;
|
|
829
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
830
|
+
read(from: RustBuffer): TypeName {
|
|
831
|
+
return {
|
|
832
|
+
changeOutput: FfiConverterTypeTxOutput.read(from),
|
|
833
|
+
fundFee: FfiConverterUInt64.read(from),
|
|
834
|
+
cetFee: FfiConverterUInt64.read(from)
|
|
835
|
+
};
|
|
836
|
+
}
|
|
837
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
838
|
+
FfiConverterTypeTxOutput.write(value.changeOutput, into);
|
|
839
|
+
FfiConverterUInt64.write(value.fundFee, into);
|
|
840
|
+
FfiConverterUInt64.write(value.cetFee, into);
|
|
841
|
+
}
|
|
842
|
+
allocationSize(value: TypeName): number {
|
|
843
|
+
return FfiConverterTypeTxOutput.allocationSize(value.changeOutput) +
|
|
844
|
+
FfiConverterUInt64.allocationSize(value.fundFee) +
|
|
845
|
+
FfiConverterUInt64.allocationSize(value.cetFee);
|
|
846
|
+
|
|
847
|
+
}
|
|
848
|
+
};
|
|
849
|
+
return new FFIConverter();
|
|
1146
850
|
})();
|
|
1147
851
|
|
|
852
|
+
|
|
1148
853
|
export type DlcInputInfo = {
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
}
|
|
854
|
+
fundTx: Transaction,
|
|
855
|
+
fundVout: /*u32*/number,
|
|
856
|
+
localFundPubkey: Array</*u8*/number>,
|
|
857
|
+
remoteFundPubkey: Array</*u8*/number>,
|
|
858
|
+
fundAmount: /*u64*/bigint,
|
|
859
|
+
maxWitnessLen: /*u32*/number,
|
|
860
|
+
inputSerialId: /*u64*/bigint,
|
|
861
|
+
contractId: Array</*u8*/number>
|
|
862
|
+
}
|
|
1158
863
|
|
|
1159
864
|
/**
|
|
1160
865
|
* Generated factory for {@link DlcInputInfo} record objects.
|
|
1161
866
|
*/
|
|
1162
867
|
export const DlcInputInfo = (() => {
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
);
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
});
|
|
868
|
+
const defaults = () => ({
|
|
869
|
+
});
|
|
870
|
+
const create = (() => {
|
|
871
|
+
return uniffiCreateRecord<DlcInputInfo, ReturnType<typeof defaults>>(defaults);
|
|
872
|
+
})();
|
|
873
|
+
return Object.freeze({
|
|
874
|
+
/**
|
|
875
|
+
* Create a frozen instance of {@link DlcInputInfo}, with defaults specified
|
|
876
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
877
|
+
*/
|
|
878
|
+
create,
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* Create a frozen instance of {@link DlcInputInfo}, with defaults specified
|
|
882
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
883
|
+
*/
|
|
884
|
+
new: create,
|
|
885
|
+
|
|
886
|
+
/**
|
|
887
|
+
* Defaults specified in the {@link ddk_ffi} crate.
|
|
888
|
+
*/
|
|
889
|
+
defaults: () => Object.freeze(defaults()) as Partial<DlcInputInfo>,
|
|
890
|
+
});
|
|
1187
891
|
})();
|
|
1188
892
|
|
|
1189
893
|
const FfiConverterTypeDlcInputInfo = (() => {
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
return new FFIConverter();
|
|
894
|
+
type TypeName = DlcInputInfo;
|
|
895
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
896
|
+
read(from: RustBuffer): TypeName {
|
|
897
|
+
return {
|
|
898
|
+
fundTx: FfiConverterTypeTransaction.read(from),
|
|
899
|
+
fundVout: FfiConverterUInt32.read(from),
|
|
900
|
+
localFundPubkey: FfiConverterArrayUInt8.read(from),
|
|
901
|
+
remoteFundPubkey: FfiConverterArrayUInt8.read(from),
|
|
902
|
+
fundAmount: FfiConverterUInt64.read(from),
|
|
903
|
+
maxWitnessLen: FfiConverterUInt32.read(from),
|
|
904
|
+
inputSerialId: FfiConverterUInt64.read(from),
|
|
905
|
+
contractId: FfiConverterArrayUInt8.read(from)
|
|
906
|
+
};
|
|
907
|
+
}
|
|
908
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
909
|
+
FfiConverterTypeTransaction.write(value.fundTx, into);
|
|
910
|
+
FfiConverterUInt32.write(value.fundVout, into);
|
|
911
|
+
FfiConverterArrayUInt8.write(value.localFundPubkey, into);
|
|
912
|
+
FfiConverterArrayUInt8.write(value.remoteFundPubkey, into);
|
|
913
|
+
FfiConverterUInt64.write(value.fundAmount, into);
|
|
914
|
+
FfiConverterUInt32.write(value.maxWitnessLen, into);
|
|
915
|
+
FfiConverterUInt64.write(value.inputSerialId, into);
|
|
916
|
+
FfiConverterArrayUInt8.write(value.contractId, into);
|
|
917
|
+
}
|
|
918
|
+
allocationSize(value: TypeName): number {
|
|
919
|
+
return FfiConverterTypeTransaction.allocationSize(value.fundTx) +
|
|
920
|
+
FfiConverterUInt32.allocationSize(value.fundVout) +
|
|
921
|
+
FfiConverterArrayUInt8.allocationSize(value.localFundPubkey) +
|
|
922
|
+
FfiConverterArrayUInt8.allocationSize(value.remoteFundPubkey) +
|
|
923
|
+
FfiConverterUInt64.allocationSize(value.fundAmount) +
|
|
924
|
+
FfiConverterUInt32.allocationSize(value.maxWitnessLen) +
|
|
925
|
+
FfiConverterUInt64.allocationSize(value.inputSerialId) +
|
|
926
|
+
FfiConverterArrayUInt8.allocationSize(value.contractId);
|
|
927
|
+
|
|
928
|
+
}
|
|
929
|
+
};
|
|
930
|
+
return new FFIConverter();
|
|
1228
931
|
})();
|
|
1229
932
|
|
|
933
|
+
|
|
1230
934
|
export type DlcTransactions = {
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
}
|
|
935
|
+
fund: Transaction,
|
|
936
|
+
cets: Array<Transaction>,
|
|
937
|
+
refund: Transaction,
|
|
938
|
+
fundingScriptPubkey: Array</*u8*/number>
|
|
939
|
+
}
|
|
1236
940
|
|
|
1237
941
|
/**
|
|
1238
942
|
* Generated factory for {@link DlcTransactions} record objects.
|
|
1239
943
|
*/
|
|
1240
944
|
export const DlcTransactions = (() => {
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
);
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
});
|
|
945
|
+
const defaults = () => ({
|
|
946
|
+
});
|
|
947
|
+
const create = (() => {
|
|
948
|
+
return uniffiCreateRecord<DlcTransactions, ReturnType<typeof defaults>>(defaults);
|
|
949
|
+
})();
|
|
950
|
+
return Object.freeze({
|
|
951
|
+
/**
|
|
952
|
+
* Create a frozen instance of {@link DlcTransactions}, with defaults specified
|
|
953
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
954
|
+
*/
|
|
955
|
+
create,
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* Create a frozen instance of {@link DlcTransactions}, with defaults specified
|
|
959
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
960
|
+
*/
|
|
961
|
+
new: create,
|
|
962
|
+
|
|
963
|
+
/**
|
|
964
|
+
* Defaults specified in the {@link ddk_ffi} crate.
|
|
965
|
+
*/
|
|
966
|
+
defaults: () => Object.freeze(defaults()) as Partial<DlcTransactions>,
|
|
967
|
+
});
|
|
1265
968
|
})();
|
|
1266
969
|
|
|
1267
970
|
const FfiConverterTypeDlcTransactions = (() => {
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
return new FFIConverter();
|
|
971
|
+
type TypeName = DlcTransactions;
|
|
972
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
973
|
+
read(from: RustBuffer): TypeName {
|
|
974
|
+
return {
|
|
975
|
+
fund: FfiConverterTypeTransaction.read(from),
|
|
976
|
+
cets: FfiConverterArrayTypeTransaction.read(from),
|
|
977
|
+
refund: FfiConverterTypeTransaction.read(from),
|
|
978
|
+
fundingScriptPubkey: FfiConverterArrayUInt8.read(from)
|
|
979
|
+
};
|
|
980
|
+
}
|
|
981
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
982
|
+
FfiConverterTypeTransaction.write(value.fund, into);
|
|
983
|
+
FfiConverterArrayTypeTransaction.write(value.cets, into);
|
|
984
|
+
FfiConverterTypeTransaction.write(value.refund, into);
|
|
985
|
+
FfiConverterArrayUInt8.write(value.fundingScriptPubkey, into);
|
|
986
|
+
}
|
|
987
|
+
allocationSize(value: TypeName): number {
|
|
988
|
+
return FfiConverterTypeTransaction.allocationSize(value.fund) +
|
|
989
|
+
FfiConverterArrayTypeTransaction.allocationSize(value.cets) +
|
|
990
|
+
FfiConverterTypeTransaction.allocationSize(value.refund) +
|
|
991
|
+
FfiConverterArrayUInt8.allocationSize(value.fundingScriptPubkey);
|
|
992
|
+
|
|
993
|
+
}
|
|
994
|
+
};
|
|
995
|
+
return new FFIConverter();
|
|
1294
996
|
})();
|
|
1295
997
|
|
|
998
|
+
|
|
1296
999
|
export type OracleInfo = {
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
}
|
|
1000
|
+
publicKey: Array</*u8*/number>,
|
|
1001
|
+
nonces: Array<Array</*u8*/number>>
|
|
1002
|
+
}
|
|
1300
1003
|
|
|
1301
1004
|
/**
|
|
1302
1005
|
* Generated factory for {@link OracleInfo} record objects.
|
|
1303
1006
|
*/
|
|
1304
1007
|
export const OracleInfo = (() => {
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
);
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
});
|
|
1008
|
+
const defaults = () => ({
|
|
1009
|
+
});
|
|
1010
|
+
const create = (() => {
|
|
1011
|
+
return uniffiCreateRecord<OracleInfo, ReturnType<typeof defaults>>(defaults);
|
|
1012
|
+
})();
|
|
1013
|
+
return Object.freeze({
|
|
1014
|
+
/**
|
|
1015
|
+
* Create a frozen instance of {@link OracleInfo}, with defaults specified
|
|
1016
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
1017
|
+
*/
|
|
1018
|
+
create,
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* Create a frozen instance of {@link OracleInfo}, with defaults specified
|
|
1022
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
1023
|
+
*/
|
|
1024
|
+
new: create,
|
|
1025
|
+
|
|
1026
|
+
/**
|
|
1027
|
+
* Defaults specified in the {@link ddk_ffi} crate.
|
|
1028
|
+
*/
|
|
1029
|
+
defaults: () => Object.freeze(defaults()) as Partial<OracleInfo>,
|
|
1030
|
+
});
|
|
1329
1031
|
})();
|
|
1330
1032
|
|
|
1331
1033
|
const FfiConverterTypeOracleInfo = (() => {
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
return new FFIConverter();
|
|
1034
|
+
type TypeName = OracleInfo;
|
|
1035
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
1036
|
+
read(from: RustBuffer): TypeName {
|
|
1037
|
+
return {
|
|
1038
|
+
publicKey: FfiConverterArrayUInt8.read(from),
|
|
1039
|
+
nonces: FfiConverterArrayArrayUInt8.read(from)
|
|
1040
|
+
};
|
|
1041
|
+
}
|
|
1042
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
1043
|
+
FfiConverterArrayUInt8.write(value.publicKey, into);
|
|
1044
|
+
FfiConverterArrayArrayUInt8.write(value.nonces, into);
|
|
1045
|
+
}
|
|
1046
|
+
allocationSize(value: TypeName): number {
|
|
1047
|
+
return FfiConverterArrayUInt8.allocationSize(value.publicKey) +
|
|
1048
|
+
FfiConverterArrayArrayUInt8.allocationSize(value.nonces);
|
|
1049
|
+
|
|
1050
|
+
}
|
|
1051
|
+
};
|
|
1052
|
+
return new FFIConverter();
|
|
1352
1053
|
})();
|
|
1353
1054
|
|
|
1055
|
+
|
|
1354
1056
|
export type PartyParams = {
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
}
|
|
1057
|
+
fundPubkey: Array</*u8*/number>,
|
|
1058
|
+
changeScriptPubkey: Array</*u8*/number>,
|
|
1059
|
+
changeSerialId: /*u64*/bigint,
|
|
1060
|
+
payoutScriptPubkey: Array</*u8*/number>,
|
|
1061
|
+
payoutSerialId: /*u64*/bigint,
|
|
1062
|
+
inputs: Array<TxInputInfo>,
|
|
1063
|
+
inputAmount: /*u64*/bigint,
|
|
1064
|
+
collateral: /*u64*/bigint,
|
|
1065
|
+
dlcInputs: Array<DlcInputInfo>
|
|
1066
|
+
}
|
|
1365
1067
|
|
|
1366
1068
|
/**
|
|
1367
1069
|
* Generated factory for {@link PartyParams} record objects.
|
|
1368
1070
|
*/
|
|
1369
1071
|
export const PartyParams = (() => {
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
);
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
});
|
|
1072
|
+
const defaults = () => ({
|
|
1073
|
+
});
|
|
1074
|
+
const create = (() => {
|
|
1075
|
+
return uniffiCreateRecord<PartyParams, ReturnType<typeof defaults>>(defaults);
|
|
1076
|
+
})();
|
|
1077
|
+
return Object.freeze({
|
|
1078
|
+
/**
|
|
1079
|
+
* Create a frozen instance of {@link PartyParams}, with defaults specified
|
|
1080
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
1081
|
+
*/
|
|
1082
|
+
create,
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* Create a frozen instance of {@link PartyParams}, with defaults specified
|
|
1086
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
1087
|
+
*/
|
|
1088
|
+
new: create,
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* Defaults specified in the {@link ddk_ffi} crate.
|
|
1092
|
+
*/
|
|
1093
|
+
defaults: () => Object.freeze(defaults()) as Partial<PartyParams>,
|
|
1094
|
+
});
|
|
1394
1095
|
})();
|
|
1395
1096
|
|
|
1396
1097
|
const FfiConverterTypePartyParams = (() => {
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
}
|
|
1436
|
-
|
|
1437
|
-
return new FFIConverter();
|
|
1098
|
+
type TypeName = PartyParams;
|
|
1099
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
1100
|
+
read(from: RustBuffer): TypeName {
|
|
1101
|
+
return {
|
|
1102
|
+
fundPubkey: FfiConverterArrayUInt8.read(from),
|
|
1103
|
+
changeScriptPubkey: FfiConverterArrayUInt8.read(from),
|
|
1104
|
+
changeSerialId: FfiConverterUInt64.read(from),
|
|
1105
|
+
payoutScriptPubkey: FfiConverterArrayUInt8.read(from),
|
|
1106
|
+
payoutSerialId: FfiConverterUInt64.read(from),
|
|
1107
|
+
inputs: FfiConverterArrayTypeTxInputInfo.read(from),
|
|
1108
|
+
inputAmount: FfiConverterUInt64.read(from),
|
|
1109
|
+
collateral: FfiConverterUInt64.read(from),
|
|
1110
|
+
dlcInputs: FfiConverterArrayTypeDlcInputInfo.read(from)
|
|
1111
|
+
};
|
|
1112
|
+
}
|
|
1113
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
1114
|
+
FfiConverterArrayUInt8.write(value.fundPubkey, into);
|
|
1115
|
+
FfiConverterArrayUInt8.write(value.changeScriptPubkey, into);
|
|
1116
|
+
FfiConverterUInt64.write(value.changeSerialId, into);
|
|
1117
|
+
FfiConverterArrayUInt8.write(value.payoutScriptPubkey, into);
|
|
1118
|
+
FfiConverterUInt64.write(value.payoutSerialId, into);
|
|
1119
|
+
FfiConverterArrayTypeTxInputInfo.write(value.inputs, into);
|
|
1120
|
+
FfiConverterUInt64.write(value.inputAmount, into);
|
|
1121
|
+
FfiConverterUInt64.write(value.collateral, into);
|
|
1122
|
+
FfiConverterArrayTypeDlcInputInfo.write(value.dlcInputs, into);
|
|
1123
|
+
}
|
|
1124
|
+
allocationSize(value: TypeName): number {
|
|
1125
|
+
return FfiConverterArrayUInt8.allocationSize(value.fundPubkey) +
|
|
1126
|
+
FfiConverterArrayUInt8.allocationSize(value.changeScriptPubkey) +
|
|
1127
|
+
FfiConverterUInt64.allocationSize(value.changeSerialId) +
|
|
1128
|
+
FfiConverterArrayUInt8.allocationSize(value.payoutScriptPubkey) +
|
|
1129
|
+
FfiConverterUInt64.allocationSize(value.payoutSerialId) +
|
|
1130
|
+
FfiConverterArrayTypeTxInputInfo.allocationSize(value.inputs) +
|
|
1131
|
+
FfiConverterUInt64.allocationSize(value.inputAmount) +
|
|
1132
|
+
FfiConverterUInt64.allocationSize(value.collateral) +
|
|
1133
|
+
FfiConverterArrayTypeDlcInputInfo.allocationSize(value.dlcInputs);
|
|
1134
|
+
|
|
1135
|
+
}
|
|
1136
|
+
};
|
|
1137
|
+
return new FFIConverter();
|
|
1438
1138
|
})();
|
|
1439
1139
|
|
|
1140
|
+
|
|
1440
1141
|
export type Payout = {
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
}
|
|
1142
|
+
offer: /*u64*/bigint,
|
|
1143
|
+
accept: /*u64*/bigint
|
|
1144
|
+
}
|
|
1444
1145
|
|
|
1445
1146
|
/**
|
|
1446
1147
|
* Generated factory for {@link Payout} record objects.
|
|
1447
1148
|
*/
|
|
1448
1149
|
export const Payout = (() => {
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1150
|
+
const defaults = () => ({
|
|
1151
|
+
});
|
|
1152
|
+
const create = (() => {
|
|
1153
|
+
return uniffiCreateRecord<Payout, ReturnType<typeof defaults>>(defaults);
|
|
1154
|
+
})();
|
|
1155
|
+
return Object.freeze({
|
|
1156
|
+
/**
|
|
1157
|
+
* Create a frozen instance of {@link Payout}, with defaults specified
|
|
1158
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
1159
|
+
*/
|
|
1160
|
+
create,
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* Create a frozen instance of {@link Payout}, with defaults specified
|
|
1164
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
1165
|
+
*/
|
|
1166
|
+
new: create,
|
|
1167
|
+
|
|
1168
|
+
/**
|
|
1169
|
+
* Defaults specified in the {@link ddk_ffi} crate.
|
|
1170
|
+
*/
|
|
1171
|
+
defaults: () => Object.freeze(defaults()) as Partial<Payout>,
|
|
1172
|
+
});
|
|
1471
1173
|
})();
|
|
1472
1174
|
|
|
1473
1175
|
const FfiConverterTypePayout = (() => {
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
}
|
|
1492
|
-
|
|
1493
|
-
return new FFIConverter();
|
|
1176
|
+
type TypeName = Payout;
|
|
1177
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
1178
|
+
read(from: RustBuffer): TypeName {
|
|
1179
|
+
return {
|
|
1180
|
+
offer: FfiConverterUInt64.read(from),
|
|
1181
|
+
accept: FfiConverterUInt64.read(from)
|
|
1182
|
+
};
|
|
1183
|
+
}
|
|
1184
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
1185
|
+
FfiConverterUInt64.write(value.offer, into);
|
|
1186
|
+
FfiConverterUInt64.write(value.accept, into);
|
|
1187
|
+
}
|
|
1188
|
+
allocationSize(value: TypeName): number {
|
|
1189
|
+
return FfiConverterUInt64.allocationSize(value.offer) +
|
|
1190
|
+
FfiConverterUInt64.allocationSize(value.accept);
|
|
1191
|
+
|
|
1192
|
+
}
|
|
1193
|
+
};
|
|
1194
|
+
return new FFIConverter();
|
|
1494
1195
|
})();
|
|
1495
1196
|
|
|
1197
|
+
|
|
1496
1198
|
export type Transaction = {
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
}
|
|
1199
|
+
version: /*i32*/number,
|
|
1200
|
+
lockTime: /*u32*/number,
|
|
1201
|
+
inputs: Array<TxInput>,
|
|
1202
|
+
outputs: Array<TxOutput>,
|
|
1203
|
+
rawBytes: Array</*u8*/number>
|
|
1204
|
+
}
|
|
1503
1205
|
|
|
1504
1206
|
/**
|
|
1505
1207
|
* Generated factory for {@link Transaction} record objects.
|
|
1506
1208
|
*/
|
|
1507
1209
|
export const Transaction = (() => {
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
);
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
});
|
|
1210
|
+
const defaults = () => ({
|
|
1211
|
+
});
|
|
1212
|
+
const create = (() => {
|
|
1213
|
+
return uniffiCreateRecord<Transaction, ReturnType<typeof defaults>>(defaults);
|
|
1214
|
+
})();
|
|
1215
|
+
return Object.freeze({
|
|
1216
|
+
/**
|
|
1217
|
+
* Create a frozen instance of {@link Transaction}, with defaults specified
|
|
1218
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
1219
|
+
*/
|
|
1220
|
+
create,
|
|
1221
|
+
|
|
1222
|
+
/**
|
|
1223
|
+
* Create a frozen instance of {@link Transaction}, with defaults specified
|
|
1224
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
1225
|
+
*/
|
|
1226
|
+
new: create,
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* Defaults specified in the {@link ddk_ffi} crate.
|
|
1230
|
+
*/
|
|
1231
|
+
defaults: () => Object.freeze(defaults()) as Partial<Transaction>,
|
|
1232
|
+
});
|
|
1532
1233
|
})();
|
|
1533
1234
|
|
|
1534
1235
|
const FfiConverterTypeTransaction = (() => {
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
return new FFIConverter();
|
|
1236
|
+
type TypeName = Transaction;
|
|
1237
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
1238
|
+
read(from: RustBuffer): TypeName {
|
|
1239
|
+
return {
|
|
1240
|
+
version: FfiConverterInt32.read(from),
|
|
1241
|
+
lockTime: FfiConverterUInt32.read(from),
|
|
1242
|
+
inputs: FfiConverterArrayTypeTxInput.read(from),
|
|
1243
|
+
outputs: FfiConverterArrayTypeTxOutput.read(from),
|
|
1244
|
+
rawBytes: FfiConverterArrayUInt8.read(from)
|
|
1245
|
+
};
|
|
1246
|
+
}
|
|
1247
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
1248
|
+
FfiConverterInt32.write(value.version, into);
|
|
1249
|
+
FfiConverterUInt32.write(value.lockTime, into);
|
|
1250
|
+
FfiConverterArrayTypeTxInput.write(value.inputs, into);
|
|
1251
|
+
FfiConverterArrayTypeTxOutput.write(value.outputs, into);
|
|
1252
|
+
FfiConverterArrayUInt8.write(value.rawBytes, into);
|
|
1253
|
+
}
|
|
1254
|
+
allocationSize(value: TypeName): number {
|
|
1255
|
+
return FfiConverterInt32.allocationSize(value.version) +
|
|
1256
|
+
FfiConverterUInt32.allocationSize(value.lockTime) +
|
|
1257
|
+
FfiConverterArrayTypeTxInput.allocationSize(value.inputs) +
|
|
1258
|
+
FfiConverterArrayTypeTxOutput.allocationSize(value.outputs) +
|
|
1259
|
+
FfiConverterArrayUInt8.allocationSize(value.rawBytes);
|
|
1260
|
+
|
|
1261
|
+
}
|
|
1262
|
+
};
|
|
1263
|
+
return new FFIConverter();
|
|
1564
1264
|
})();
|
|
1565
1265
|
|
|
1266
|
+
|
|
1566
1267
|
export type TxInput = {
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
}
|
|
1268
|
+
txid: string,
|
|
1269
|
+
vout: /*u32*/number,
|
|
1270
|
+
scriptSig: Array</*u8*/number>,
|
|
1271
|
+
sequence: /*u32*/number,
|
|
1272
|
+
witness: Array<Array</*u8*/number>>
|
|
1273
|
+
}
|
|
1573
1274
|
|
|
1574
1275
|
/**
|
|
1575
1276
|
* Generated factory for {@link TxInput} record objects.
|
|
1576
1277
|
*/
|
|
1577
1278
|
export const TxInput = (() => {
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1279
|
+
const defaults = () => ({
|
|
1280
|
+
});
|
|
1281
|
+
const create = (() => {
|
|
1282
|
+
return uniffiCreateRecord<TxInput, ReturnType<typeof defaults>>(defaults);
|
|
1283
|
+
})();
|
|
1284
|
+
return Object.freeze({
|
|
1285
|
+
/**
|
|
1286
|
+
* Create a frozen instance of {@link TxInput}, with defaults specified
|
|
1287
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
1288
|
+
*/
|
|
1289
|
+
create,
|
|
1290
|
+
|
|
1291
|
+
/**
|
|
1292
|
+
* Create a frozen instance of {@link TxInput}, with defaults specified
|
|
1293
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
1294
|
+
*/
|
|
1295
|
+
new: create,
|
|
1296
|
+
|
|
1297
|
+
/**
|
|
1298
|
+
* Defaults specified in the {@link ddk_ffi} crate.
|
|
1299
|
+
*/
|
|
1300
|
+
defaults: () => Object.freeze(defaults()) as Partial<TxInput>,
|
|
1301
|
+
});
|
|
1600
1302
|
})();
|
|
1601
1303
|
|
|
1602
1304
|
const FfiConverterTypeTxInput = (() => {
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
return new FFIConverter();
|
|
1305
|
+
type TypeName = TxInput;
|
|
1306
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
1307
|
+
read(from: RustBuffer): TypeName {
|
|
1308
|
+
return {
|
|
1309
|
+
txid: FfiConverterString.read(from),
|
|
1310
|
+
vout: FfiConverterUInt32.read(from),
|
|
1311
|
+
scriptSig: FfiConverterArrayUInt8.read(from),
|
|
1312
|
+
sequence: FfiConverterUInt32.read(from),
|
|
1313
|
+
witness: FfiConverterArrayArrayUInt8.read(from)
|
|
1314
|
+
};
|
|
1315
|
+
}
|
|
1316
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
1317
|
+
FfiConverterString.write(value.txid, into);
|
|
1318
|
+
FfiConverterUInt32.write(value.vout, into);
|
|
1319
|
+
FfiConverterArrayUInt8.write(value.scriptSig, into);
|
|
1320
|
+
FfiConverterUInt32.write(value.sequence, into);
|
|
1321
|
+
FfiConverterArrayArrayUInt8.write(value.witness, into);
|
|
1322
|
+
}
|
|
1323
|
+
allocationSize(value: TypeName): number {
|
|
1324
|
+
return FfiConverterString.allocationSize(value.txid) +
|
|
1325
|
+
FfiConverterUInt32.allocationSize(value.vout) +
|
|
1326
|
+
FfiConverterArrayUInt8.allocationSize(value.scriptSig) +
|
|
1327
|
+
FfiConverterUInt32.allocationSize(value.sequence) +
|
|
1328
|
+
FfiConverterArrayArrayUInt8.allocationSize(value.witness);
|
|
1329
|
+
|
|
1330
|
+
}
|
|
1331
|
+
};
|
|
1332
|
+
return new FFIConverter();
|
|
1632
1333
|
})();
|
|
1633
1334
|
|
|
1335
|
+
|
|
1634
1336
|
export type TxInputInfo = {
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
}
|
|
1337
|
+
txid: string,
|
|
1338
|
+
vout: /*u32*/number,
|
|
1339
|
+
scriptSig: Array</*u8*/number>,
|
|
1340
|
+
maxWitnessLength: /*u32*/number,
|
|
1341
|
+
serialId: /*u64*/bigint
|
|
1342
|
+
}
|
|
1641
1343
|
|
|
1642
1344
|
/**
|
|
1643
1345
|
* Generated factory for {@link TxInputInfo} record objects.
|
|
1644
1346
|
*/
|
|
1645
1347
|
export const TxInputInfo = (() => {
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
);
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
});
|
|
1348
|
+
const defaults = () => ({
|
|
1349
|
+
});
|
|
1350
|
+
const create = (() => {
|
|
1351
|
+
return uniffiCreateRecord<TxInputInfo, ReturnType<typeof defaults>>(defaults);
|
|
1352
|
+
})();
|
|
1353
|
+
return Object.freeze({
|
|
1354
|
+
/**
|
|
1355
|
+
* Create a frozen instance of {@link TxInputInfo}, with defaults specified
|
|
1356
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
1357
|
+
*/
|
|
1358
|
+
create,
|
|
1359
|
+
|
|
1360
|
+
/**
|
|
1361
|
+
* Create a frozen instance of {@link TxInputInfo}, with defaults specified
|
|
1362
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
1363
|
+
*/
|
|
1364
|
+
new: create,
|
|
1365
|
+
|
|
1366
|
+
/**
|
|
1367
|
+
* Defaults specified in the {@link ddk_ffi} crate.
|
|
1368
|
+
*/
|
|
1369
|
+
defaults: () => Object.freeze(defaults()) as Partial<TxInputInfo>,
|
|
1370
|
+
});
|
|
1670
1371
|
})();
|
|
1671
1372
|
|
|
1672
1373
|
const FfiConverterTypeTxInputInfo = (() => {
|
|
1673
|
-
|
|
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
|
-
return new FFIConverter();
|
|
1374
|
+
type TypeName = TxInputInfo;
|
|
1375
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
1376
|
+
read(from: RustBuffer): TypeName {
|
|
1377
|
+
return {
|
|
1378
|
+
txid: FfiConverterString.read(from),
|
|
1379
|
+
vout: FfiConverterUInt32.read(from),
|
|
1380
|
+
scriptSig: FfiConverterArrayUInt8.read(from),
|
|
1381
|
+
maxWitnessLength: FfiConverterUInt32.read(from),
|
|
1382
|
+
serialId: FfiConverterUInt64.read(from)
|
|
1383
|
+
};
|
|
1384
|
+
}
|
|
1385
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
1386
|
+
FfiConverterString.write(value.txid, into);
|
|
1387
|
+
FfiConverterUInt32.write(value.vout, into);
|
|
1388
|
+
FfiConverterArrayUInt8.write(value.scriptSig, into);
|
|
1389
|
+
FfiConverterUInt32.write(value.maxWitnessLength, into);
|
|
1390
|
+
FfiConverterUInt64.write(value.serialId, into);
|
|
1391
|
+
}
|
|
1392
|
+
allocationSize(value: TypeName): number {
|
|
1393
|
+
return FfiConverterString.allocationSize(value.txid) +
|
|
1394
|
+
FfiConverterUInt32.allocationSize(value.vout) +
|
|
1395
|
+
FfiConverterArrayUInt8.allocationSize(value.scriptSig) +
|
|
1396
|
+
FfiConverterUInt32.allocationSize(value.maxWitnessLength) +
|
|
1397
|
+
FfiConverterUInt64.allocationSize(value.serialId);
|
|
1398
|
+
|
|
1399
|
+
}
|
|
1400
|
+
};
|
|
1401
|
+
return new FFIConverter();
|
|
1702
1402
|
})();
|
|
1703
1403
|
|
|
1404
|
+
|
|
1704
1405
|
export type TxOutput = {
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
}
|
|
1406
|
+
value: /*u64*/bigint,
|
|
1407
|
+
scriptPubkey: Array</*u8*/number>
|
|
1408
|
+
}
|
|
1708
1409
|
|
|
1709
1410
|
/**
|
|
1710
1411
|
* Generated factory for {@link TxOutput} record objects.
|
|
1711
1412
|
*/
|
|
1712
1413
|
export const TxOutput = (() => {
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1414
|
+
const defaults = () => ({
|
|
1415
|
+
});
|
|
1416
|
+
const create = (() => {
|
|
1417
|
+
return uniffiCreateRecord<TxOutput, ReturnType<typeof defaults>>(defaults);
|
|
1418
|
+
})();
|
|
1419
|
+
return Object.freeze({
|
|
1420
|
+
/**
|
|
1421
|
+
* Create a frozen instance of {@link TxOutput}, with defaults specified
|
|
1422
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
1423
|
+
*/
|
|
1424
|
+
create,
|
|
1425
|
+
|
|
1426
|
+
/**
|
|
1427
|
+
* Create a frozen instance of {@link TxOutput}, with defaults specified
|
|
1428
|
+
* in Rust, in the {@link ddk_ffi} crate.
|
|
1429
|
+
*/
|
|
1430
|
+
new: create,
|
|
1431
|
+
|
|
1432
|
+
/**
|
|
1433
|
+
* Defaults specified in the {@link ddk_ffi} crate.
|
|
1434
|
+
*/
|
|
1435
|
+
defaults: () => Object.freeze(defaults()) as Partial<TxOutput>,
|
|
1436
|
+
});
|
|
1735
1437
|
})();
|
|
1736
1438
|
|
|
1737
1439
|
const FfiConverterTypeTxOutput = (() => {
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
}
|
|
1756
|
-
|
|
1757
|
-
return new FFIConverter();
|
|
1440
|
+
type TypeName = TxOutput;
|
|
1441
|
+
class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
1442
|
+
read(from: RustBuffer): TypeName {
|
|
1443
|
+
return {
|
|
1444
|
+
value: FfiConverterUInt64.read(from),
|
|
1445
|
+
scriptPubkey: FfiConverterArrayUInt8.read(from)
|
|
1446
|
+
};
|
|
1447
|
+
}
|
|
1448
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
1449
|
+
FfiConverterUInt64.write(value.value, into);
|
|
1450
|
+
FfiConverterArrayUInt8.write(value.scriptPubkey, into);
|
|
1451
|
+
}
|
|
1452
|
+
allocationSize(value: TypeName): number {
|
|
1453
|
+
return FfiConverterUInt64.allocationSize(value.value) +
|
|
1454
|
+
FfiConverterArrayUInt8.allocationSize(value.scriptPubkey);
|
|
1455
|
+
|
|
1456
|
+
}
|
|
1457
|
+
};
|
|
1458
|
+
return new FFIConverter();
|
|
1758
1459
|
})();
|
|
1759
1460
|
|
|
1461
|
+
|
|
1760
1462
|
const stringConverter = {
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
),
|
|
1768
|
-
bytesToString: (ab: UniffiByteArray) =>
|
|
1769
|
-
uniffiCaller.rustCall((status) =>
|
|
1770
|
-
nativeModule().ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string(
|
|
1771
|
-
ab,
|
|
1772
|
-
status
|
|
1773
|
-
)
|
|
1774
|
-
),
|
|
1775
|
-
stringByteLength: (s: string) =>
|
|
1776
|
-
uniffiCaller.rustCall((status) =>
|
|
1777
|
-
nativeModule().ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length(
|
|
1778
|
-
s,
|
|
1779
|
-
status
|
|
1780
|
-
)
|
|
1781
|
-
),
|
|
1463
|
+
stringToBytes: (s: string) =>
|
|
1464
|
+
uniffiCaller.rustCall((status) => nativeModule().ubrn_uniffi_internal_fn_func_ffi__string_to_arraybuffer(s, status)),
|
|
1465
|
+
bytesToString: (ab: UniffiByteArray) =>
|
|
1466
|
+
uniffiCaller.rustCall((status) => nativeModule().ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string(ab, status)),
|
|
1467
|
+
stringByteLength: (s: string) =>
|
|
1468
|
+
uniffiCaller.rustCall((status) => nativeModule().ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length(s, status)),
|
|
1782
1469
|
};
|
|
1783
1470
|
const FfiConverterString = uniffiCreateFfiConverterString(stringConverter);
|
|
1784
1471
|
|
|
1785
|
-
// Flat error type: DlcError
|
|
1786
|
-
export enum DlcError_Tags {
|
|
1787
|
-
InvalidSignature = 'InvalidSignature',
|
|
1788
|
-
InvalidPublicKey = 'InvalidPublicKey',
|
|
1789
|
-
InvalidTransaction = 'InvalidTransaction',
|
|
1790
|
-
InsufficientFunds = 'InsufficientFunds',
|
|
1791
|
-
InvalidArgument = 'InvalidArgument',
|
|
1792
|
-
SerializationError = 'SerializationError',
|
|
1793
|
-
Secp256k1Error = 'Secp256k1Error',
|
|
1794
|
-
MiniscriptError = 'MiniscriptError',
|
|
1795
|
-
InvalidNetwork = 'InvalidNetwork',
|
|
1796
|
-
KeyError = 'KeyError',
|
|
1797
|
-
}
|
|
1798
|
-
export const DlcError = (() => {
|
|
1799
|
-
class InvalidSignature extends UniffiError {
|
|
1800
|
-
/**
|
|
1801
|
-
* @private
|
|
1802
|
-
* This field is private and should not be used.
|
|
1803
|
-
*/
|
|
1804
|
-
readonly [uniffiTypeNameSymbol]: string = 'DlcError';
|
|
1805
|
-
/**
|
|
1806
|
-
* @private
|
|
1807
|
-
* This field is private and should not be used.
|
|
1808
|
-
*/
|
|
1809
|
-
readonly [variantOrdinalSymbol] = 1;
|
|
1810
|
-
|
|
1811
|
-
public readonly tag = DlcError_Tags.InvalidSignature;
|
|
1812
|
-
|
|
1813
|
-
constructor(message: string) {
|
|
1814
|
-
super('DlcError', 'InvalidSignature', message);
|
|
1815
|
-
}
|
|
1816
|
-
|
|
1817
|
-
static instanceOf(e: any): e is InvalidSignature {
|
|
1818
|
-
return instanceOf(e) && (e as any)[variantOrdinalSymbol] === 1;
|
|
1819
|
-
}
|
|
1820
|
-
}
|
|
1821
|
-
class InvalidPublicKey extends UniffiError {
|
|
1822
|
-
/**
|
|
1823
|
-
* @private
|
|
1824
|
-
* This field is private and should not be used.
|
|
1825
|
-
*/
|
|
1826
|
-
readonly [uniffiTypeNameSymbol]: string = 'DlcError';
|
|
1827
|
-
/**
|
|
1828
|
-
* @private
|
|
1829
|
-
* This field is private and should not be used.
|
|
1830
|
-
*/
|
|
1831
|
-
readonly [variantOrdinalSymbol] = 2;
|
|
1832
|
-
|
|
1833
|
-
public readonly tag = DlcError_Tags.InvalidPublicKey;
|
|
1834
|
-
|
|
1835
|
-
constructor(message: string) {
|
|
1836
|
-
super('DlcError', 'InvalidPublicKey', message);
|
|
1837
|
-
}
|
|
1838
|
-
|
|
1839
|
-
static instanceOf(e: any): e is InvalidPublicKey {
|
|
1840
|
-
return instanceOf(e) && (e as any)[variantOrdinalSymbol] === 2;
|
|
1841
|
-
}
|
|
1842
|
-
}
|
|
1843
|
-
class InvalidTransaction extends UniffiError {
|
|
1844
|
-
/**
|
|
1845
|
-
* @private
|
|
1846
|
-
* This field is private and should not be used.
|
|
1847
|
-
*/
|
|
1848
|
-
readonly [uniffiTypeNameSymbol]: string = 'DlcError';
|
|
1849
|
-
/**
|
|
1850
|
-
* @private
|
|
1851
|
-
* This field is private and should not be used.
|
|
1852
|
-
*/
|
|
1853
|
-
readonly [variantOrdinalSymbol] = 3;
|
|
1854
|
-
|
|
1855
|
-
public readonly tag = DlcError_Tags.InvalidTransaction;
|
|
1856
|
-
|
|
1857
|
-
constructor(message: string) {
|
|
1858
|
-
super('DlcError', 'InvalidTransaction', message);
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
static instanceOf(e: any): e is InvalidTransaction {
|
|
1862
|
-
return instanceOf(e) && (e as any)[variantOrdinalSymbol] === 3;
|
|
1863
|
-
}
|
|
1864
|
-
}
|
|
1865
|
-
class InsufficientFunds extends UniffiError {
|
|
1866
|
-
/**
|
|
1867
|
-
* @private
|
|
1868
|
-
* This field is private and should not be used.
|
|
1869
|
-
*/
|
|
1870
|
-
readonly [uniffiTypeNameSymbol]: string = 'DlcError';
|
|
1871
|
-
/**
|
|
1872
|
-
* @private
|
|
1873
|
-
* This field is private and should not be used.
|
|
1874
|
-
*/
|
|
1875
|
-
readonly [variantOrdinalSymbol] = 4;
|
|
1876
|
-
|
|
1877
|
-
public readonly tag = DlcError_Tags.InsufficientFunds;
|
|
1878
|
-
|
|
1879
|
-
constructor(message: string) {
|
|
1880
|
-
super('DlcError', 'InsufficientFunds', message);
|
|
1881
|
-
}
|
|
1882
|
-
|
|
1883
|
-
static instanceOf(e: any): e is InsufficientFunds {
|
|
1884
|
-
return instanceOf(e) && (e as any)[variantOrdinalSymbol] === 4;
|
|
1885
|
-
}
|
|
1886
|
-
}
|
|
1887
|
-
class InvalidArgument extends UniffiError {
|
|
1888
|
-
/**
|
|
1889
|
-
* @private
|
|
1890
|
-
* This field is private and should not be used.
|
|
1891
|
-
*/
|
|
1892
|
-
readonly [uniffiTypeNameSymbol]: string = 'DlcError';
|
|
1893
|
-
/**
|
|
1894
|
-
* @private
|
|
1895
|
-
* This field is private and should not be used.
|
|
1896
|
-
*/
|
|
1897
|
-
readonly [variantOrdinalSymbol] = 5;
|
|
1898
|
-
|
|
1899
|
-
public readonly tag = DlcError_Tags.InvalidArgument;
|
|
1900
|
-
|
|
1901
|
-
constructor(message: string) {
|
|
1902
|
-
super('DlcError', 'InvalidArgument', message);
|
|
1903
|
-
}
|
|
1904
|
-
|
|
1905
|
-
static instanceOf(e: any): e is InvalidArgument {
|
|
1906
|
-
return instanceOf(e) && (e as any)[variantOrdinalSymbol] === 5;
|
|
1907
|
-
}
|
|
1908
|
-
}
|
|
1909
|
-
class SerializationError extends UniffiError {
|
|
1910
|
-
/**
|
|
1911
|
-
* @private
|
|
1912
|
-
* This field is private and should not be used.
|
|
1913
|
-
*/
|
|
1914
|
-
readonly [uniffiTypeNameSymbol]: string = 'DlcError';
|
|
1915
|
-
/**
|
|
1916
|
-
* @private
|
|
1917
|
-
* This field is private and should not be used.
|
|
1918
|
-
*/
|
|
1919
|
-
readonly [variantOrdinalSymbol] = 6;
|
|
1920
|
-
|
|
1921
|
-
public readonly tag = DlcError_Tags.SerializationError;
|
|
1922
|
-
|
|
1923
|
-
constructor(message: string) {
|
|
1924
|
-
super('DlcError', 'SerializationError', message);
|
|
1925
|
-
}
|
|
1926
|
-
|
|
1927
|
-
static instanceOf(e: any): e is SerializationError {
|
|
1928
|
-
return instanceOf(e) && (e as any)[variantOrdinalSymbol] === 6;
|
|
1929
|
-
}
|
|
1930
|
-
}
|
|
1931
|
-
class Secp256k1Error extends UniffiError {
|
|
1932
|
-
/**
|
|
1933
|
-
* @private
|
|
1934
|
-
* This field is private and should not be used.
|
|
1935
|
-
*/
|
|
1936
|
-
readonly [uniffiTypeNameSymbol]: string = 'DlcError';
|
|
1937
|
-
/**
|
|
1938
|
-
* @private
|
|
1939
|
-
* This field is private and should not be used.
|
|
1940
|
-
*/
|
|
1941
|
-
readonly [variantOrdinalSymbol] = 7;
|
|
1942
|
-
|
|
1943
|
-
public readonly tag = DlcError_Tags.Secp256k1Error;
|
|
1944
|
-
|
|
1945
|
-
constructor(message: string) {
|
|
1946
|
-
super('DlcError', 'Secp256k1Error', message);
|
|
1947
|
-
}
|
|
1948
|
-
|
|
1949
|
-
static instanceOf(e: any): e is Secp256k1Error {
|
|
1950
|
-
return instanceOf(e) && (e as any)[variantOrdinalSymbol] === 7;
|
|
1951
|
-
}
|
|
1952
|
-
}
|
|
1953
|
-
class MiniscriptError extends UniffiError {
|
|
1954
|
-
/**
|
|
1955
|
-
* @private
|
|
1956
|
-
* This field is private and should not be used.
|
|
1957
|
-
*/
|
|
1958
|
-
readonly [uniffiTypeNameSymbol]: string = 'DlcError';
|
|
1959
|
-
/**
|
|
1960
|
-
* @private
|
|
1961
|
-
* This field is private and should not be used.
|
|
1962
|
-
*/
|
|
1963
|
-
readonly [variantOrdinalSymbol] = 8;
|
|
1964
|
-
|
|
1965
|
-
public readonly tag = DlcError_Tags.MiniscriptError;
|
|
1966
1472
|
|
|
1967
|
-
constructor(message: string) {
|
|
1968
|
-
super('DlcError', 'MiniscriptError', message);
|
|
1969
|
-
}
|
|
1970
1473
|
|
|
1971
|
-
static instanceOf(e: any): e is MiniscriptError {
|
|
1972
|
-
return instanceOf(e) && (e as any)[variantOrdinalSymbol] === 8;
|
|
1973
|
-
}
|
|
1974
|
-
}
|
|
1975
|
-
class InvalidNetwork extends UniffiError {
|
|
1976
|
-
/**
|
|
1977
|
-
* @private
|
|
1978
|
-
* This field is private and should not be used.
|
|
1979
|
-
*/
|
|
1980
|
-
readonly [uniffiTypeNameSymbol]: string = 'DlcError';
|
|
1981
|
-
/**
|
|
1982
|
-
* @private
|
|
1983
|
-
* This field is private and should not be used.
|
|
1984
|
-
*/
|
|
1985
|
-
readonly [variantOrdinalSymbol] = 9;
|
|
1986
1474
|
|
|
1987
|
-
public readonly tag = DlcError_Tags.InvalidNetwork;
|
|
1988
|
-
|
|
1989
|
-
constructor(message: string) {
|
|
1990
|
-
super('DlcError', 'InvalidNetwork', message);
|
|
1991
|
-
}
|
|
1992
1475
|
|
|
1993
|
-
static instanceOf(e: any): e is InvalidNetwork {
|
|
1994
|
-
return instanceOf(e) && (e as any)[variantOrdinalSymbol] === 9;
|
|
1995
|
-
}
|
|
1996
|
-
}
|
|
1997
|
-
class KeyError extends UniffiError {
|
|
1998
|
-
/**
|
|
1999
|
-
* @private
|
|
2000
|
-
* This field is private and should not be used.
|
|
2001
|
-
*/
|
|
2002
|
-
readonly [uniffiTypeNameSymbol]: string = 'DlcError';
|
|
2003
|
-
/**
|
|
2004
|
-
* @private
|
|
2005
|
-
* This field is private and should not be used.
|
|
2006
|
-
*/
|
|
2007
|
-
readonly [variantOrdinalSymbol] = 10;
|
|
2008
1476
|
|
|
2009
|
-
public readonly tag = DlcError_Tags.KeyError;
|
|
2010
1477
|
|
|
2011
|
-
constructor(message: string) {
|
|
2012
|
-
super('DlcError', 'KeyError', message);
|
|
2013
|
-
}
|
|
2014
1478
|
|
|
2015
|
-
static instanceOf(e: any): e is KeyError {
|
|
2016
|
-
return instanceOf(e) && (e as any)[variantOrdinalSymbol] === 10;
|
|
2017
|
-
}
|
|
2018
|
-
}
|
|
2019
1479
|
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
1480
|
+
// Flat error type: DlcError
|
|
1481
|
+
export enum DlcError_Tags {
|
|
1482
|
+
InvalidSignature = "InvalidSignature",
|
|
1483
|
+
InvalidPublicKey = "InvalidPublicKey",
|
|
1484
|
+
InvalidTransaction = "InvalidTransaction",
|
|
1485
|
+
InsufficientFunds = "InsufficientFunds",
|
|
1486
|
+
InvalidArgument = "InvalidArgument",
|
|
1487
|
+
SerializationError = "SerializationError",
|
|
1488
|
+
Secp256k1Error = "Secp256k1Error",
|
|
1489
|
+
MiniscriptError = "MiniscriptError",
|
|
1490
|
+
InvalidNetwork = "InvalidNetwork",
|
|
1491
|
+
KeyError = "KeyError"
|
|
1492
|
+
}
|
|
1493
|
+
export const DlcError = (() => {
|
|
1494
|
+
class InvalidSignature extends UniffiError {
|
|
1495
|
+
/**
|
|
1496
|
+
* @private
|
|
1497
|
+
* This field is private and should not be used.
|
|
1498
|
+
*/
|
|
1499
|
+
readonly [uniffiTypeNameSymbol]: string = "DlcError";
|
|
1500
|
+
/**
|
|
1501
|
+
* @private
|
|
1502
|
+
* This field is private and should not be used.
|
|
1503
|
+
*/
|
|
1504
|
+
readonly [variantOrdinalSymbol] = 1;
|
|
1505
|
+
|
|
1506
|
+
public readonly tag = DlcError_Tags.InvalidSignature;
|
|
1507
|
+
|
|
1508
|
+
constructor(message: string) {
|
|
1509
|
+
super("DlcError", "InvalidSignature", message);
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
static instanceOf(e: any): e is InvalidSignature {
|
|
1513
|
+
return (
|
|
1514
|
+
instanceOf(e) && (e as any)[variantOrdinalSymbol] === 1
|
|
1515
|
+
);
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
class InvalidPublicKey extends UniffiError {
|
|
1519
|
+
/**
|
|
1520
|
+
* @private
|
|
1521
|
+
* This field is private and should not be used.
|
|
1522
|
+
*/
|
|
1523
|
+
readonly [uniffiTypeNameSymbol]: string = "DlcError";
|
|
1524
|
+
/**
|
|
1525
|
+
* @private
|
|
1526
|
+
* This field is private and should not be used.
|
|
1527
|
+
*/
|
|
1528
|
+
readonly [variantOrdinalSymbol] = 2;
|
|
1529
|
+
|
|
1530
|
+
public readonly tag = DlcError_Tags.InvalidPublicKey;
|
|
1531
|
+
|
|
1532
|
+
constructor(message: string) {
|
|
1533
|
+
super("DlcError", "InvalidPublicKey", message);
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
static instanceOf(e: any): e is InvalidPublicKey {
|
|
1537
|
+
return (
|
|
1538
|
+
instanceOf(e) && (e as any)[variantOrdinalSymbol] === 2
|
|
1539
|
+
);
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
class InvalidTransaction extends UniffiError {
|
|
1543
|
+
/**
|
|
1544
|
+
* @private
|
|
1545
|
+
* This field is private and should not be used.
|
|
1546
|
+
*/
|
|
1547
|
+
readonly [uniffiTypeNameSymbol]: string = "DlcError";
|
|
1548
|
+
/**
|
|
1549
|
+
* @private
|
|
1550
|
+
* This field is private and should not be used.
|
|
1551
|
+
*/
|
|
1552
|
+
readonly [variantOrdinalSymbol] = 3;
|
|
1553
|
+
|
|
1554
|
+
public readonly tag = DlcError_Tags.InvalidTransaction;
|
|
1555
|
+
|
|
1556
|
+
constructor(message: string) {
|
|
1557
|
+
super("DlcError", "InvalidTransaction", message);
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
static instanceOf(e: any): e is InvalidTransaction {
|
|
1561
|
+
return (
|
|
1562
|
+
instanceOf(e) && (e as any)[variantOrdinalSymbol] === 3
|
|
1563
|
+
);
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
class InsufficientFunds extends UniffiError {
|
|
1567
|
+
/**
|
|
1568
|
+
* @private
|
|
1569
|
+
* This field is private and should not be used.
|
|
1570
|
+
*/
|
|
1571
|
+
readonly [uniffiTypeNameSymbol]: string = "DlcError";
|
|
1572
|
+
/**
|
|
1573
|
+
* @private
|
|
1574
|
+
* This field is private and should not be used.
|
|
1575
|
+
*/
|
|
1576
|
+
readonly [variantOrdinalSymbol] = 4;
|
|
1577
|
+
|
|
1578
|
+
public readonly tag = DlcError_Tags.InsufficientFunds;
|
|
1579
|
+
|
|
1580
|
+
constructor(message: string) {
|
|
1581
|
+
super("DlcError", "InsufficientFunds", message);
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
static instanceOf(e: any): e is InsufficientFunds {
|
|
1585
|
+
return (
|
|
1586
|
+
instanceOf(e) && (e as any)[variantOrdinalSymbol] === 4
|
|
1587
|
+
);
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
class InvalidArgument extends UniffiError {
|
|
1591
|
+
/**
|
|
1592
|
+
* @private
|
|
1593
|
+
* This field is private and should not be used.
|
|
1594
|
+
*/
|
|
1595
|
+
readonly [uniffiTypeNameSymbol]: string = "DlcError";
|
|
1596
|
+
/**
|
|
1597
|
+
* @private
|
|
1598
|
+
* This field is private and should not be used.
|
|
1599
|
+
*/
|
|
1600
|
+
readonly [variantOrdinalSymbol] = 5;
|
|
1601
|
+
|
|
1602
|
+
public readonly tag = DlcError_Tags.InvalidArgument;
|
|
1603
|
+
|
|
1604
|
+
constructor(message: string) {
|
|
1605
|
+
super("DlcError", "InvalidArgument", message);
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
static instanceOf(e: any): e is InvalidArgument {
|
|
1609
|
+
return (
|
|
1610
|
+
instanceOf(e) && (e as any)[variantOrdinalSymbol] === 5
|
|
1611
|
+
);
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
class SerializationError extends UniffiError {
|
|
1615
|
+
/**
|
|
1616
|
+
* @private
|
|
1617
|
+
* This field is private and should not be used.
|
|
1618
|
+
*/
|
|
1619
|
+
readonly [uniffiTypeNameSymbol]: string = "DlcError";
|
|
1620
|
+
/**
|
|
1621
|
+
* @private
|
|
1622
|
+
* This field is private and should not be used.
|
|
1623
|
+
*/
|
|
1624
|
+
readonly [variantOrdinalSymbol] = 6;
|
|
1625
|
+
|
|
1626
|
+
public readonly tag = DlcError_Tags.SerializationError;
|
|
1627
|
+
|
|
1628
|
+
constructor(message: string) {
|
|
1629
|
+
super("DlcError", "SerializationError", message);
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
static instanceOf(e: any): e is SerializationError {
|
|
1633
|
+
return (
|
|
1634
|
+
instanceOf(e) && (e as any)[variantOrdinalSymbol] === 6
|
|
1635
|
+
);
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
class Secp256k1Error extends UniffiError {
|
|
1639
|
+
/**
|
|
1640
|
+
* @private
|
|
1641
|
+
* This field is private and should not be used.
|
|
1642
|
+
*/
|
|
1643
|
+
readonly [uniffiTypeNameSymbol]: string = "DlcError";
|
|
1644
|
+
/**
|
|
1645
|
+
* @private
|
|
1646
|
+
* This field is private and should not be used.
|
|
1647
|
+
*/
|
|
1648
|
+
readonly [variantOrdinalSymbol] = 7;
|
|
1649
|
+
|
|
1650
|
+
public readonly tag = DlcError_Tags.Secp256k1Error;
|
|
1651
|
+
|
|
1652
|
+
constructor(message: string) {
|
|
1653
|
+
super("DlcError", "Secp256k1Error", message);
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
static instanceOf(e: any): e is Secp256k1Error {
|
|
1657
|
+
return (
|
|
1658
|
+
instanceOf(e) && (e as any)[variantOrdinalSymbol] === 7
|
|
1659
|
+
);
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
class MiniscriptError extends UniffiError {
|
|
1663
|
+
/**
|
|
1664
|
+
* @private
|
|
1665
|
+
* This field is private and should not be used.
|
|
1666
|
+
*/
|
|
1667
|
+
readonly [uniffiTypeNameSymbol]: string = "DlcError";
|
|
1668
|
+
/**
|
|
1669
|
+
* @private
|
|
1670
|
+
* This field is private and should not be used.
|
|
1671
|
+
*/
|
|
1672
|
+
readonly [variantOrdinalSymbol] = 8;
|
|
1673
|
+
|
|
1674
|
+
public readonly tag = DlcError_Tags.MiniscriptError;
|
|
1675
|
+
|
|
1676
|
+
constructor(message: string) {
|
|
1677
|
+
super("DlcError", "MiniscriptError", message);
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
static instanceOf(e: any): e is MiniscriptError {
|
|
1681
|
+
return (
|
|
1682
|
+
instanceOf(e) && (e as any)[variantOrdinalSymbol] === 8
|
|
1683
|
+
);
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
class InvalidNetwork extends UniffiError {
|
|
1687
|
+
/**
|
|
1688
|
+
* @private
|
|
1689
|
+
* This field is private and should not be used.
|
|
1690
|
+
*/
|
|
1691
|
+
readonly [uniffiTypeNameSymbol]: string = "DlcError";
|
|
1692
|
+
/**
|
|
1693
|
+
* @private
|
|
1694
|
+
* This field is private and should not be used.
|
|
1695
|
+
*/
|
|
1696
|
+
readonly [variantOrdinalSymbol] = 9;
|
|
1697
|
+
|
|
1698
|
+
public readonly tag = DlcError_Tags.InvalidNetwork;
|
|
1699
|
+
|
|
1700
|
+
constructor(message: string) {
|
|
1701
|
+
super("DlcError", "InvalidNetwork", message);
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
static instanceOf(e: any): e is InvalidNetwork {
|
|
1705
|
+
return (
|
|
1706
|
+
instanceOf(e) && (e as any)[variantOrdinalSymbol] === 9
|
|
1707
|
+
);
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
class KeyError extends UniffiError {
|
|
1711
|
+
/**
|
|
1712
|
+
* @private
|
|
1713
|
+
* This field is private and should not be used.
|
|
1714
|
+
*/
|
|
1715
|
+
readonly [uniffiTypeNameSymbol]: string = "DlcError";
|
|
1716
|
+
/**
|
|
1717
|
+
* @private
|
|
1718
|
+
* This field is private and should not be used.
|
|
1719
|
+
*/
|
|
1720
|
+
readonly [variantOrdinalSymbol] = 10;
|
|
1721
|
+
|
|
1722
|
+
public readonly tag = DlcError_Tags.KeyError;
|
|
1723
|
+
|
|
1724
|
+
constructor(message: string) {
|
|
1725
|
+
super("DlcError", "KeyError", message);
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
static instanceOf(e: any): e is KeyError {
|
|
1729
|
+
return (
|
|
1730
|
+
instanceOf(e) && (e as any)[variantOrdinalSymbol] === 10
|
|
1731
|
+
);
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
// Utility function which does not rely on instanceof.
|
|
1736
|
+
function instanceOf(e: any): e is DlcError {
|
|
1737
|
+
return (e as any)[uniffiTypeNameSymbol] === "DlcError";
|
|
1738
|
+
}
|
|
1739
|
+
return {
|
|
1740
|
+
InvalidSignature,
|
|
1741
|
+
InvalidPublicKey,
|
|
1742
|
+
InvalidTransaction,
|
|
1743
|
+
InsufficientFunds,
|
|
1744
|
+
InvalidArgument,
|
|
1745
|
+
SerializationError,
|
|
1746
|
+
Secp256k1Error,
|
|
1747
|
+
MiniscriptError,
|
|
1748
|
+
InvalidNetwork,
|
|
1749
|
+
KeyError,
|
|
1750
|
+
instanceOf,
|
|
1751
|
+
};
|
|
2037
1752
|
})();
|
|
2038
1753
|
|
|
2039
1754
|
// Union type for DlcError error type.
|
|
2040
1755
|
|
|
1756
|
+
|
|
2041
1757
|
export type DlcError = InstanceType<
|
|
2042
|
-
|
|
1758
|
+
typeof DlcError[keyof Omit<typeof DlcError, 'instanceOf'>]
|
|
2043
1759
|
>;
|
|
2044
1760
|
|
|
2045
1761
|
const FfiConverterTypeDLCError = (() => {
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
1762
|
+
const intConverter = FfiConverterInt32;
|
|
1763
|
+
type TypeName = DlcError;
|
|
1764
|
+
class FfiConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
1765
|
+
read(from: RustBuffer): TypeName {
|
|
1766
|
+
switch (intConverter.read(from)) {
|
|
1767
|
+
case 1: return new DlcError.InvalidSignature(FfiConverterString.read(from)
|
|
1768
|
+
);
|
|
1769
|
+
|
|
1770
|
+
case 2: return new DlcError.InvalidPublicKey(FfiConverterString.read(from)
|
|
1771
|
+
);
|
|
1772
|
+
|
|
1773
|
+
case 3: return new DlcError.InvalidTransaction(FfiConverterString.read(from)
|
|
1774
|
+
);
|
|
1775
|
+
|
|
1776
|
+
case 4: return new DlcError.InsufficientFunds(FfiConverterString.read(from)
|
|
1777
|
+
);
|
|
1778
|
+
|
|
1779
|
+
case 5: return new DlcError.InvalidArgument(FfiConverterString.read(from)
|
|
1780
|
+
);
|
|
1781
|
+
|
|
1782
|
+
case 6: return new DlcError.SerializationError(FfiConverterString.read(from)
|
|
1783
|
+
);
|
|
1784
|
+
|
|
1785
|
+
case 7: return new DlcError.Secp256k1Error(FfiConverterString.read(from)
|
|
1786
|
+
);
|
|
1787
|
+
|
|
1788
|
+
case 8: return new DlcError.MiniscriptError(FfiConverterString.read(from)
|
|
1789
|
+
);
|
|
1790
|
+
|
|
1791
|
+
case 9: return new DlcError.InvalidNetwork(FfiConverterString.read(from)
|
|
1792
|
+
);
|
|
1793
|
+
|
|
1794
|
+
case 10: return new DlcError.KeyError(FfiConverterString.read(from)
|
|
1795
|
+
);
|
|
1796
|
+
|
|
1797
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
1801
|
+
const obj = value as any;
|
|
1802
|
+
const index = obj[variantOrdinalSymbol] as number;
|
|
1803
|
+
intConverter.write(index, into);
|
|
1804
|
+
}
|
|
1805
|
+
allocationSize(value: TypeName): number {
|
|
1806
|
+
return intConverter.allocationSize(0);
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
return new FfiConverter();
|
|
1810
|
+
})();
|
|
2077
1811
|
|
|
2078
|
-
case 10:
|
|
2079
|
-
return new DlcError.KeyError(FfiConverterString.read(from));
|
|
2080
1812
|
|
|
2081
|
-
default:
|
|
2082
|
-
throw new UniffiInternalError.UnexpectedEnumCase();
|
|
2083
|
-
}
|
|
2084
|
-
}
|
|
2085
|
-
write(value: TypeName, into: RustBuffer): void {
|
|
2086
|
-
const obj = value as any;
|
|
2087
|
-
const index = obj[variantOrdinalSymbol] as number;
|
|
2088
|
-
intConverter.write(index, into);
|
|
2089
|
-
}
|
|
2090
|
-
allocationSize(value: TypeName): number {
|
|
2091
|
-
return intConverter.allocationSize(0);
|
|
2092
|
-
}
|
|
2093
|
-
}
|
|
2094
|
-
return new FfiConverter();
|
|
2095
|
-
})();
|
|
2096
1813
|
|
|
2097
1814
|
// Flat error type: ExtendedKey
|
|
2098
1815
|
export enum ExtendedKey_Tags {
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
1816
|
+
InvalidMnemonic = "InvalidMnemonic",
|
|
1817
|
+
InvalidXpriv = "InvalidXpriv",
|
|
1818
|
+
InvalidXpub = "InvalidXpub",
|
|
1819
|
+
InvalidDerivationPath = "InvalidDerivationPath"
|
|
2103
1820
|
}
|
|
2104
1821
|
export const ExtendedKey = (() => {
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
instanceOf
|
|
2204
|
-
|
|
1822
|
+
class InvalidMnemonic extends UniffiError {
|
|
1823
|
+
/**
|
|
1824
|
+
* @private
|
|
1825
|
+
* This field is private and should not be used.
|
|
1826
|
+
*/
|
|
1827
|
+
readonly [uniffiTypeNameSymbol]: string = "ExtendedKey";
|
|
1828
|
+
/**
|
|
1829
|
+
* @private
|
|
1830
|
+
* This field is private and should not be used.
|
|
1831
|
+
*/
|
|
1832
|
+
readonly [variantOrdinalSymbol] = 1;
|
|
1833
|
+
|
|
1834
|
+
public readonly tag = ExtendedKey_Tags.InvalidMnemonic;
|
|
1835
|
+
|
|
1836
|
+
constructor(message: string) {
|
|
1837
|
+
super("ExtendedKey", "InvalidMnemonic", message);
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
static instanceOf(e: any): e is InvalidMnemonic {
|
|
1841
|
+
return (
|
|
1842
|
+
instanceOf(e) && (e as any)[variantOrdinalSymbol] === 1
|
|
1843
|
+
);
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
class InvalidXpriv extends UniffiError {
|
|
1847
|
+
/**
|
|
1848
|
+
* @private
|
|
1849
|
+
* This field is private and should not be used.
|
|
1850
|
+
*/
|
|
1851
|
+
readonly [uniffiTypeNameSymbol]: string = "ExtendedKey";
|
|
1852
|
+
/**
|
|
1853
|
+
* @private
|
|
1854
|
+
* This field is private and should not be used.
|
|
1855
|
+
*/
|
|
1856
|
+
readonly [variantOrdinalSymbol] = 2;
|
|
1857
|
+
|
|
1858
|
+
public readonly tag = ExtendedKey_Tags.InvalidXpriv;
|
|
1859
|
+
|
|
1860
|
+
constructor(message: string) {
|
|
1861
|
+
super("ExtendedKey", "InvalidXpriv", message);
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
static instanceOf(e: any): e is InvalidXpriv {
|
|
1865
|
+
return (
|
|
1866
|
+
instanceOf(e) && (e as any)[variantOrdinalSymbol] === 2
|
|
1867
|
+
);
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
class InvalidXpub extends UniffiError {
|
|
1871
|
+
/**
|
|
1872
|
+
* @private
|
|
1873
|
+
* This field is private and should not be used.
|
|
1874
|
+
*/
|
|
1875
|
+
readonly [uniffiTypeNameSymbol]: string = "ExtendedKey";
|
|
1876
|
+
/**
|
|
1877
|
+
* @private
|
|
1878
|
+
* This field is private and should not be used.
|
|
1879
|
+
*/
|
|
1880
|
+
readonly [variantOrdinalSymbol] = 3;
|
|
1881
|
+
|
|
1882
|
+
public readonly tag = ExtendedKey_Tags.InvalidXpub;
|
|
1883
|
+
|
|
1884
|
+
constructor(message: string) {
|
|
1885
|
+
super("ExtendedKey", "InvalidXpub", message);
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
static instanceOf(e: any): e is InvalidXpub {
|
|
1889
|
+
return (
|
|
1890
|
+
instanceOf(e) && (e as any)[variantOrdinalSymbol] === 3
|
|
1891
|
+
);
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
class InvalidDerivationPath extends UniffiError {
|
|
1895
|
+
/**
|
|
1896
|
+
* @private
|
|
1897
|
+
* This field is private and should not be used.
|
|
1898
|
+
*/
|
|
1899
|
+
readonly [uniffiTypeNameSymbol]: string = "ExtendedKey";
|
|
1900
|
+
/**
|
|
1901
|
+
* @private
|
|
1902
|
+
* This field is private and should not be used.
|
|
1903
|
+
*/
|
|
1904
|
+
readonly [variantOrdinalSymbol] = 4;
|
|
1905
|
+
|
|
1906
|
+
public readonly tag = ExtendedKey_Tags.InvalidDerivationPath;
|
|
1907
|
+
|
|
1908
|
+
constructor(message: string) {
|
|
1909
|
+
super("ExtendedKey", "InvalidDerivationPath", message);
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
static instanceOf(e: any): e is InvalidDerivationPath {
|
|
1913
|
+
return (
|
|
1914
|
+
instanceOf(e) && (e as any)[variantOrdinalSymbol] === 4
|
|
1915
|
+
);
|
|
1916
|
+
}
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
// Utility function which does not rely on instanceof.
|
|
1920
|
+
function instanceOf(e: any): e is ExtendedKey {
|
|
1921
|
+
return (e as any)[uniffiTypeNameSymbol] === "ExtendedKey";
|
|
1922
|
+
}
|
|
1923
|
+
return {
|
|
1924
|
+
InvalidMnemonic,
|
|
1925
|
+
InvalidXpriv,
|
|
1926
|
+
InvalidXpub,
|
|
1927
|
+
InvalidDerivationPath,
|
|
1928
|
+
instanceOf,
|
|
1929
|
+
};
|
|
2205
1930
|
})();
|
|
2206
1931
|
|
|
2207
1932
|
// Union type for ExtendedKey error type.
|
|
2208
1933
|
|
|
1934
|
+
|
|
2209
1935
|
export type ExtendedKey = InstanceType<
|
|
2210
|
-
|
|
1936
|
+
typeof ExtendedKey[keyof Omit<typeof ExtendedKey, 'instanceOf'>]
|
|
2211
1937
|
>;
|
|
2212
1938
|
|
|
2213
1939
|
const FfiConverterTypeExtendedKey = (() => {
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
}
|
|
2245
|
-
}
|
|
2246
|
-
return new FfiConverter();
|
|
1940
|
+
const intConverter = FfiConverterInt32;
|
|
1941
|
+
type TypeName = ExtendedKey;
|
|
1942
|
+
class FfiConverter extends AbstractFfiConverterByteArray<TypeName> {
|
|
1943
|
+
read(from: RustBuffer): TypeName {
|
|
1944
|
+
switch (intConverter.read(from)) {
|
|
1945
|
+
case 1: return new ExtendedKey.InvalidMnemonic(FfiConverterString.read(from)
|
|
1946
|
+
);
|
|
1947
|
+
|
|
1948
|
+
case 2: return new ExtendedKey.InvalidXpriv(FfiConverterString.read(from)
|
|
1949
|
+
);
|
|
1950
|
+
|
|
1951
|
+
case 3: return new ExtendedKey.InvalidXpub(FfiConverterString.read(from)
|
|
1952
|
+
);
|
|
1953
|
+
|
|
1954
|
+
case 4: return new ExtendedKey.InvalidDerivationPath(FfiConverterString.read(from)
|
|
1955
|
+
);
|
|
1956
|
+
|
|
1957
|
+
default: throw new UniffiInternalError.UnexpectedEnumCase();
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
write(value: TypeName, into: RustBuffer): void {
|
|
1961
|
+
const obj = value as any;
|
|
1962
|
+
const index = obj[variantOrdinalSymbol] as number;
|
|
1963
|
+
intConverter.write(index, into);
|
|
1964
|
+
}
|
|
1965
|
+
allocationSize(value: TypeName): number {
|
|
1966
|
+
return intConverter.allocationSize(0);
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
return new FfiConverter();
|
|
2247
1970
|
})();
|
|
2248
1971
|
|
|
1972
|
+
|
|
2249
1973
|
// FfiConverter for string | undefined
|
|
2250
1974
|
const FfiConverterOptionalString = new FfiConverterOptional(FfiConverterString);
|
|
2251
1975
|
|
|
1976
|
+
|
|
2252
1977
|
// FfiConverter for Array<AdaptorSignature>
|
|
2253
|
-
const FfiConverterArrayTypeAdaptorSignature = new FfiConverterArray(
|
|
2254
|
-
|
|
2255
|
-
);
|
|
1978
|
+
const FfiConverterArrayTypeAdaptorSignature = new FfiConverterArray(FfiConverterTypeAdaptorSignature);
|
|
1979
|
+
|
|
2256
1980
|
|
|
2257
1981
|
// FfiConverter for Array<DlcInputInfo>
|
|
2258
|
-
const FfiConverterArrayTypeDlcInputInfo = new FfiConverterArray(
|
|
2259
|
-
|
|
2260
|
-
);
|
|
1982
|
+
const FfiConverterArrayTypeDlcInputInfo = new FfiConverterArray(FfiConverterTypeDlcInputInfo);
|
|
1983
|
+
|
|
2261
1984
|
|
|
2262
1985
|
// FfiConverter for Array<OracleInfo>
|
|
2263
|
-
const FfiConverterArrayTypeOracleInfo = new FfiConverterArray(
|
|
2264
|
-
|
|
2265
|
-
);
|
|
1986
|
+
const FfiConverterArrayTypeOracleInfo = new FfiConverterArray(FfiConverterTypeOracleInfo);
|
|
1987
|
+
|
|
2266
1988
|
|
|
2267
1989
|
// FfiConverter for Array<Payout>
|
|
2268
|
-
const FfiConverterArrayTypePayout = new FfiConverterArray(
|
|
2269
|
-
|
|
2270
|
-
);
|
|
1990
|
+
const FfiConverterArrayTypePayout = new FfiConverterArray(FfiConverterTypePayout);
|
|
1991
|
+
|
|
2271
1992
|
|
|
2272
1993
|
// FfiConverter for Array<Transaction>
|
|
2273
|
-
const FfiConverterArrayTypeTransaction = new FfiConverterArray(
|
|
2274
|
-
|
|
2275
|
-
);
|
|
1994
|
+
const FfiConverterArrayTypeTransaction = new FfiConverterArray(FfiConverterTypeTransaction);
|
|
1995
|
+
|
|
2276
1996
|
|
|
2277
1997
|
// FfiConverter for Array<TxInput>
|
|
2278
|
-
const FfiConverterArrayTypeTxInput = new FfiConverterArray(
|
|
2279
|
-
|
|
2280
|
-
);
|
|
1998
|
+
const FfiConverterArrayTypeTxInput = new FfiConverterArray(FfiConverterTypeTxInput);
|
|
1999
|
+
|
|
2281
2000
|
|
|
2282
2001
|
// FfiConverter for Array<TxInputInfo>
|
|
2283
|
-
const FfiConverterArrayTypeTxInputInfo = new FfiConverterArray(
|
|
2284
|
-
|
|
2285
|
-
);
|
|
2002
|
+
const FfiConverterArrayTypeTxInputInfo = new FfiConverterArray(FfiConverterTypeTxInputInfo);
|
|
2003
|
+
|
|
2286
2004
|
|
|
2287
2005
|
// FfiConverter for Array<TxOutput>
|
|
2288
|
-
const FfiConverterArrayTypeTxOutput = new FfiConverterArray(
|
|
2289
|
-
|
|
2290
|
-
);
|
|
2006
|
+
const FfiConverterArrayTypeTxOutput = new FfiConverterArray(FfiConverterTypeTxOutput);
|
|
2007
|
+
|
|
2291
2008
|
|
|
2292
2009
|
// FfiConverter for Array</*u8*/number>
|
|
2293
2010
|
const FfiConverterArrayUInt8 = new FfiConverterArray(FfiConverterUInt8);
|
|
2294
2011
|
|
|
2012
|
+
|
|
2295
2013
|
// FfiConverter for Array<Array</*u8*/number>>
|
|
2296
|
-
const FfiConverterArrayArrayUInt8 = new FfiConverterArray(
|
|
2297
|
-
|
|
2298
|
-
);
|
|
2014
|
+
const FfiConverterArrayArrayUInt8 = new FfiConverterArray(FfiConverterArrayUInt8);
|
|
2015
|
+
|
|
2299
2016
|
|
|
2300
2017
|
// FfiConverter for Array<Array<Array</*u8*/number>>>
|
|
2301
|
-
const FfiConverterArrayArrayArrayUInt8 = new FfiConverterArray(
|
|
2302
|
-
|
|
2303
|
-
);
|
|
2018
|
+
const FfiConverterArrayArrayArrayUInt8 = new FfiConverterArray(FfiConverterArrayArrayUInt8);
|
|
2019
|
+
|
|
2304
2020
|
|
|
2305
2021
|
// FfiConverter for Array<Array<Array<Array</*u8*/number>>>>
|
|
2306
|
-
const FfiConverterArrayArrayArrayArrayUInt8 = new FfiConverterArray(
|
|
2307
|
-
FfiConverterArrayArrayArrayUInt8
|
|
2308
|
-
);
|
|
2022
|
+
const FfiConverterArrayArrayArrayArrayUInt8 = new FfiConverterArray(FfiConverterArrayArrayArrayUInt8);
|
|
2309
2023
|
|
|
2310
2024
|
/**
|
|
2311
2025
|
* This should be called before anything else.
|
|
@@ -2318,254 +2032,108 @@ const FfiConverterArrayArrayArrayArrayUInt8 = new FfiConverterArray(
|
|
|
2318
2032
|
* It also initializes the machinery to enable Rust to talk back to Javascript.
|
|
2319
2033
|
*/
|
|
2320
2034
|
function uniffiEnsureInitialized() {
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
)
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
)
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
nativeModule().
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
)
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
nativeModule().
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
}
|
|
2424
|
-
if (
|
|
2425
|
-
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_create_refund_transaction() !==
|
|
2426
|
-
57261
|
|
2427
|
-
) {
|
|
2428
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2429
|
-
'uniffi_ddk_ffi_checksum_func_create_refund_transaction'
|
|
2430
|
-
);
|
|
2431
|
-
}
|
|
2432
|
-
if (
|
|
2433
|
-
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions() !==
|
|
2434
|
-
31130
|
|
2435
|
-
) {
|
|
2436
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2437
|
-
'uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions'
|
|
2438
|
-
);
|
|
2439
|
-
}
|
|
2440
|
-
if (
|
|
2441
|
-
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_create_xpriv_from_parent_path() !==
|
|
2442
|
-
34808
|
|
2443
|
-
) {
|
|
2444
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2445
|
-
'uniffi_ddk_ffi_checksum_func_create_xpriv_from_parent_path'
|
|
2446
|
-
);
|
|
2447
|
-
}
|
|
2448
|
-
if (
|
|
2449
|
-
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_extract_ecdsa_signature_from_oracle_signatures() !==
|
|
2450
|
-
8006
|
|
2451
|
-
) {
|
|
2452
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2453
|
-
'uniffi_ddk_ffi_checksum_func_extract_ecdsa_signature_from_oracle_signatures'
|
|
2454
|
-
);
|
|
2455
|
-
}
|
|
2456
|
-
if (
|
|
2457
|
-
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_get_cet_adaptor_signature_inputs() !==
|
|
2458
|
-
14595
|
|
2459
|
-
) {
|
|
2460
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2461
|
-
'uniffi_ddk_ffi_checksum_func_get_cet_adaptor_signature_inputs'
|
|
2462
|
-
);
|
|
2463
|
-
}
|
|
2464
|
-
if (
|
|
2465
|
-
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_get_cet_sighash() !== 10643
|
|
2466
|
-
) {
|
|
2467
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2468
|
-
'uniffi_ddk_ffi_checksum_func_get_cet_sighash'
|
|
2469
|
-
);
|
|
2470
|
-
}
|
|
2471
|
-
if (
|
|
2472
|
-
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_get_change_output_and_fees() !==
|
|
2473
|
-
44150
|
|
2474
|
-
) {
|
|
2475
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2476
|
-
'uniffi_ddk_ffi_checksum_func_get_change_output_and_fees'
|
|
2477
|
-
);
|
|
2478
|
-
}
|
|
2479
|
-
if (
|
|
2480
|
-
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_get_pubkey_from_extkey() !==
|
|
2481
|
-
64637
|
|
2482
|
-
) {
|
|
2483
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2484
|
-
'uniffi_ddk_ffi_checksum_func_get_pubkey_from_extkey'
|
|
2485
|
-
);
|
|
2486
|
-
}
|
|
2487
|
-
if (
|
|
2488
|
-
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_get_raw_funding_transaction_input_signature() !==
|
|
2489
|
-
35708
|
|
2490
|
-
) {
|
|
2491
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2492
|
-
'uniffi_ddk_ffi_checksum_func_get_raw_funding_transaction_input_signature'
|
|
2493
|
-
);
|
|
2494
|
-
}
|
|
2495
|
-
if (
|
|
2496
|
-
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_get_total_input_vsize() !==
|
|
2497
|
-
38213
|
|
2498
|
-
) {
|
|
2499
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2500
|
-
'uniffi_ddk_ffi_checksum_func_get_total_input_vsize'
|
|
2501
|
-
);
|
|
2502
|
-
}
|
|
2503
|
-
if (
|
|
2504
|
-
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_get_xpub_from_xpriv() !==
|
|
2505
|
-
44344
|
|
2506
|
-
) {
|
|
2507
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2508
|
-
'uniffi_ddk_ffi_checksum_func_get_xpub_from_xpriv'
|
|
2509
|
-
);
|
|
2510
|
-
}
|
|
2511
|
-
if (
|
|
2512
|
-
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_is_dust_output() !== 64174
|
|
2513
|
-
) {
|
|
2514
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2515
|
-
'uniffi_ddk_ffi_checksum_func_is_dust_output'
|
|
2516
|
-
);
|
|
2517
|
-
}
|
|
2518
|
-
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_sign_cet() !== 43957) {
|
|
2519
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2520
|
-
'uniffi_ddk_ffi_checksum_func_sign_cet'
|
|
2521
|
-
);
|
|
2522
|
-
}
|
|
2523
|
-
if (
|
|
2524
|
-
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input() !==
|
|
2525
|
-
50531
|
|
2526
|
-
) {
|
|
2527
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2528
|
-
'uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input'
|
|
2529
|
-
);
|
|
2530
|
-
}
|
|
2531
|
-
if (
|
|
2532
|
-
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_sign_multi_sig_input() !==
|
|
2533
|
-
14569
|
|
2534
|
-
) {
|
|
2535
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2536
|
-
'uniffi_ddk_ffi_checksum_func_sign_multi_sig_input'
|
|
2537
|
-
);
|
|
2538
|
-
}
|
|
2539
|
-
if (
|
|
2540
|
-
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_verify_cet_adaptor_sig_from_oracle_info() !==
|
|
2541
|
-
52232
|
|
2542
|
-
) {
|
|
2543
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2544
|
-
'uniffi_ddk_ffi_checksum_func_verify_cet_adaptor_sig_from_oracle_info'
|
|
2545
|
-
);
|
|
2546
|
-
}
|
|
2547
|
-
if (
|
|
2548
|
-
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_verify_cet_adaptor_sigs_from_oracle_info() !==
|
|
2549
|
-
14181
|
|
2550
|
-
) {
|
|
2551
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2552
|
-
'uniffi_ddk_ffi_checksum_func_verify_cet_adaptor_sigs_from_oracle_info'
|
|
2553
|
-
);
|
|
2554
|
-
}
|
|
2555
|
-
if (
|
|
2556
|
-
nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_verify_fund_tx_signature() !==
|
|
2557
|
-
27316
|
|
2558
|
-
) {
|
|
2559
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2560
|
-
'uniffi_ddk_ffi_checksum_func_verify_fund_tx_signature'
|
|
2561
|
-
);
|
|
2562
|
-
}
|
|
2563
|
-
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_version() !== 22317) {
|
|
2564
|
-
throw new UniffiInternalError.ApiChecksumMismatch(
|
|
2565
|
-
'uniffi_ddk_ffi_checksum_func_version'
|
|
2566
|
-
);
|
|
2567
|
-
}
|
|
2568
|
-
}
|
|
2035
|
+
// Get the bindings contract version from our ComponentInterface
|
|
2036
|
+
const bindingsContractVersion = 29;
|
|
2037
|
+
// Get the scaffolding contract version by calling the into the dylib
|
|
2038
|
+
const scaffoldingContractVersion = nativeModule().ubrn_ffi_ddk_ffi_uniffi_contract_version();
|
|
2039
|
+
if (bindingsContractVersion !== scaffoldingContractVersion) {
|
|
2040
|
+
throw new UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);
|
|
2041
|
+
}
|
|
2042
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_add_signature_to_transaction() !== 1337) {
|
|
2043
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_add_signature_to_transaction");
|
|
2044
|
+
}
|
|
2045
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_convert_mnemonic_to_seed() !== 65049) {
|
|
2046
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_convert_mnemonic_to_seed");
|
|
2047
|
+
}
|
|
2048
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_create_cet() !== 23081) {
|
|
2049
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_cet");
|
|
2050
|
+
}
|
|
2051
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_points_from_oracle_info() !== 6552) {
|
|
2052
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_cet_adaptor_points_from_oracle_info");
|
|
2053
|
+
}
|
|
2054
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_signature_from_oracle_info() !== 65174) {
|
|
2055
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_cet_adaptor_signature_from_oracle_info");
|
|
2056
|
+
}
|
|
2057
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info() !== 15699) {
|
|
2058
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info");
|
|
2059
|
+
}
|
|
2060
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_points() !== 33705) {
|
|
2061
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_points");
|
|
2062
|
+
}
|
|
2063
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_create_cets() !== 50529) {
|
|
2064
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_cets");
|
|
2065
|
+
}
|
|
2066
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_create_dlc_transactions() !== 51134) {
|
|
2067
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_dlc_transactions");
|
|
2068
|
+
}
|
|
2069
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_create_extkey_from_parent_path() !== 26671) {
|
|
2070
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_extkey_from_parent_path");
|
|
2071
|
+
}
|
|
2072
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_create_extkey_from_seed() !== 12526) {
|
|
2073
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_extkey_from_seed");
|
|
2074
|
+
}
|
|
2075
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_create_fund_tx_locking_script() !== 2761) {
|
|
2076
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_fund_tx_locking_script");
|
|
2077
|
+
}
|
|
2078
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_create_refund_transaction() !== 57261) {
|
|
2079
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_refund_transaction");
|
|
2080
|
+
}
|
|
2081
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions() !== 31130) {
|
|
2082
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions");
|
|
2083
|
+
}
|
|
2084
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_create_xpriv_from_parent_path() !== 34808) {
|
|
2085
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_create_xpriv_from_parent_path");
|
|
2086
|
+
}
|
|
2087
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_extract_ecdsa_signature_from_oracle_signatures() !== 8006) {
|
|
2088
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_extract_ecdsa_signature_from_oracle_signatures");
|
|
2089
|
+
}
|
|
2090
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_get_cet_adaptor_signature_inputs() !== 14595) {
|
|
2091
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_get_cet_adaptor_signature_inputs");
|
|
2092
|
+
}
|
|
2093
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_get_cet_sighash() !== 10643) {
|
|
2094
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_get_cet_sighash");
|
|
2095
|
+
}
|
|
2096
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_get_change_output_and_fees() !== 44150) {
|
|
2097
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_get_change_output_and_fees");
|
|
2098
|
+
}
|
|
2099
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_get_pubkey_from_extkey() !== 64637) {
|
|
2100
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_get_pubkey_from_extkey");
|
|
2101
|
+
}
|
|
2102
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_get_raw_funding_transaction_input_signature() !== 35708) {
|
|
2103
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_get_raw_funding_transaction_input_signature");
|
|
2104
|
+
}
|
|
2105
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_get_total_input_vsize() !== 38213) {
|
|
2106
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_get_total_input_vsize");
|
|
2107
|
+
}
|
|
2108
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_get_xpub_from_xpriv() !== 44344) {
|
|
2109
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_get_xpub_from_xpriv");
|
|
2110
|
+
}
|
|
2111
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_is_dust_output() !== 64174) {
|
|
2112
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_is_dust_output");
|
|
2113
|
+
}
|
|
2114
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_sign_cet() !== 43957) {
|
|
2115
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_sign_cet");
|
|
2116
|
+
}
|
|
2117
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input() !== 50531) {
|
|
2118
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input");
|
|
2119
|
+
}
|
|
2120
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_sign_multi_sig_input() !== 14569) {
|
|
2121
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_sign_multi_sig_input");
|
|
2122
|
+
}
|
|
2123
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_verify_cet_adaptor_sig_from_oracle_info() !== 52232) {
|
|
2124
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_verify_cet_adaptor_sig_from_oracle_info");
|
|
2125
|
+
}
|
|
2126
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_verify_cet_adaptor_sigs_from_oracle_info() !== 14181) {
|
|
2127
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_verify_cet_adaptor_sigs_from_oracle_info");
|
|
2128
|
+
}
|
|
2129
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_verify_fund_tx_signature() !== 27316) {
|
|
2130
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_verify_fund_tx_signature");
|
|
2131
|
+
}
|
|
2132
|
+
if (nativeModule().ubrn_uniffi_ddk_ffi_checksum_func_version() !== 22317) {
|
|
2133
|
+
throw new UniffiInternalError.ApiChecksumMismatch("uniffi_ddk_ffi_checksum_func_version");
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
}
|
|
2569
2137
|
|
|
2570
2138
|
export default Object.freeze({
|
|
2571
2139
|
initialize: uniffiEnsureInitialized,
|
|
@@ -2584,5 +2152,5 @@ export default Object.freeze({
|
|
|
2584
2152
|
FfiConverterTypeTxInput,
|
|
2585
2153
|
FfiConverterTypeTxInputInfo,
|
|
2586
2154
|
FfiConverterTypeTxOutput,
|
|
2587
|
-
}
|
|
2588
|
-
});
|
|
2155
|
+
}
|
|
2156
|
+
});
|