@bennyblader/ddk-rn 1.0.0-rc5 → 1.0.0-rc6
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/README.md +10 -11
- package/android/src/main/jniLibs/arm64-v8a/libddk_ffi.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libddk_ffi.so +0 -0
- package/android/src/main/jniLibs/x86/libddk_ffi.so +0 -0
- package/android/src/main/jniLibs/x86_64/libddk_ffi.so +0 -0
- package/cpp/ddk_ffi.cpp +143 -4
- package/cpp/ddk_ffi.hpp +6 -0
- package/ios/DdkRn.xcframework/ios-arm64/libddk_ffi.a +0 -0
- package/ios/DdkRn.xcframework/ios-arm64-simulator/libddk_ffi.a +0 -0
- package/lib/commonjs/ddk_ffi-ffi.js.map +1 -1
- package/lib/commonjs/ddk_ffi.js +133 -16
- 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 +129 -15
- package/lib/module/ddk_ffi.js.map +1 -1
- package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts +8 -2
- package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ddk_ffi.d.ts +65 -7
- package/lib/typescript/commonjs/src/ddk_ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/ddk_ffi-ffi.d.ts +8 -2
- package/lib/typescript/module/src/ddk_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/ddk_ffi.d.ts +65 -7
- package/lib/typescript/module/src/ddk_ffi.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ddk_ffi-ffi.ts +37 -0
- package/src/ddk_ffi.ts +252 -11
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@ const offer = createOffer({
|
|
|
74
74
|
// signContractCet / signContractRefund
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
Bytes cross the JSI boundary as `
|
|
77
|
+
Bytes cross the JSI boundary as `Uint8Array`, as they do in `@bennyblader/ddk`.
|
|
78
78
|
|
|
79
79
|
`example/src/App.tsx` runs the complete flow on device — offline, deterministic,
|
|
80
80
|
and asserted by the Maestro E2E.
|
|
@@ -112,7 +112,7 @@ just build
|
|
|
112
112
|
### Just Commands
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
|
-
# JSI + TurboModule bindings, the iOS XCFramework, and ddk-
|
|
115
|
+
# JSI + TurboModule bindings, the iOS XCFramework, and @bennyblader/ddk (N-API)
|
|
116
116
|
just build
|
|
117
117
|
|
|
118
118
|
# Generate JSI bindings only (TypeScript + C++)
|
|
@@ -192,8 +192,8 @@ bindings can't execute under Node, so it asserts instead that generation was
|
|
|
192
192
|
complete — every function, record, and constructor present in both the
|
|
193
193
|
TypeScript surface and the native symbol layer. It catches the classic
|
|
194
194
|
regression where `ddk-ffi` changed but `ddk-rn` wasn't regenerated. Runtime
|
|
195
|
-
behavior is covered by the shared Rust (`ddk-ffi` unit tests and the `ddk
|
|
196
|
-
|
|
195
|
+
behavior is covered by the shared Rust (`ddk-ffi` unit tests and the `ddk`
|
|
196
|
+
suites exercise the same functions).
|
|
197
197
|
|
|
198
198
|
### End-to-end, on a device
|
|
199
199
|
|
|
@@ -255,7 +255,7 @@ npx react-native run-android
|
|
|
255
255
|
|
|
256
256
|
### Release Process
|
|
257
257
|
|
|
258
|
-
`ddk
|
|
258
|
+
`ddk` and `ddk-rn` are versioned and released together, from the repo root:
|
|
259
259
|
|
|
260
260
|
```bash
|
|
261
261
|
just release 0.5.0
|
|
@@ -264,7 +264,7 @@ just release 0.5.0
|
|
|
264
264
|
This will:
|
|
265
265
|
|
|
266
266
|
1. Check the working directory is clean
|
|
267
|
-
2. Set the version in `
|
|
267
|
+
2. Set the version in `typescript/package.json`, `ddk-rn/package.json` and `ddk-ffi/Cargo.toml`
|
|
268
268
|
3. Commit, tag as `v0.5.0` and push
|
|
269
269
|
|
|
270
270
|
Publishing happens in CI — pushing the tag is what publishes. The iOS
|
|
@@ -284,11 +284,10 @@ All bindings are generated from the compiled `ddk-ffi` library, whose Rust
|
|
|
284
284
|
source — annotated with UniFFI proc-macros, with no `.udl` file — is the single
|
|
285
285
|
source of truth for the interface.
|
|
286
286
|
|
|
287
|
-
`@bennyblader/ddk
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
[comparison table](../README.md#where-the-two-packages-differ).
|
|
287
|
+
`@bennyblader/ddk` (Node and browsers) is generated from the same library by the
|
|
288
|
+
same bindgen, so it has the same names, the same argument lists and the same
|
|
289
|
+
`Uint8Array` byte type. The one difference: its browser build needs
|
|
290
|
+
`await init()` before the first call.
|
|
292
291
|
|
|
293
292
|
### Known Issues
|
|
294
293
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/cpp/ddk_ffi.cpp
CHANGED
|
@@ -312,6 +312,19 @@ extern "C" {
|
|
|
312
312
|
uint8_t contract_flags,
|
|
313
313
|
RustCallStatus *uniffi_out_err
|
|
314
314
|
);
|
|
315
|
+
RustBuffer uniffi_ddk_ffi_fn_func_create_dlc_transactions_with_fee_rule(
|
|
316
|
+
RustBuffer outcomes,
|
|
317
|
+
RustBuffer local_params,
|
|
318
|
+
RustBuffer remote_params,
|
|
319
|
+
uint32_t refund_locktime,
|
|
320
|
+
uint64_t fee_rate,
|
|
321
|
+
uint32_t fund_lock_time,
|
|
322
|
+
uint32_t cet_lock_time,
|
|
323
|
+
uint64_t fund_output_serial_id,
|
|
324
|
+
uint8_t contract_flags,
|
|
325
|
+
RustBuffer fee_rule,
|
|
326
|
+
RustCallStatus *uniffi_out_err
|
|
327
|
+
);
|
|
315
328
|
RustBuffer uniffi_ddk_ffi_fn_func_create_extkey_from_parent_path(
|
|
316
329
|
RustBuffer extkey,
|
|
317
330
|
RustBuffer path,
|
|
@@ -349,6 +362,19 @@ extern "C" {
|
|
|
349
362
|
uint8_t contract_flags,
|
|
350
363
|
RustCallStatus *uniffi_out_err
|
|
351
364
|
);
|
|
365
|
+
RustBuffer uniffi_ddk_ffi_fn_func_create_spliced_dlc_transactions_with_fee_rule(
|
|
366
|
+
RustBuffer outcomes,
|
|
367
|
+
RustBuffer local_params,
|
|
368
|
+
RustBuffer remote_params,
|
|
369
|
+
uint32_t refund_locktime,
|
|
370
|
+
uint64_t fee_rate,
|
|
371
|
+
uint32_t fund_lock_time,
|
|
372
|
+
uint32_t cet_lock_time,
|
|
373
|
+
uint64_t fund_output_serial_id,
|
|
374
|
+
uint8_t contract_flags,
|
|
375
|
+
RustBuffer fee_rule,
|
|
376
|
+
RustCallStatus *uniffi_out_err
|
|
377
|
+
);
|
|
352
378
|
RustBuffer uniffi_ddk_ffi_fn_func_create_xpriv_from_parent_path(
|
|
353
379
|
RustBuffer seed_or_xpriv,
|
|
354
380
|
RustBuffer base_derivation_path,
|
|
@@ -410,6 +436,7 @@ extern "C" {
|
|
|
410
436
|
RustBuffer uniffi_ddk_ffi_fn_func_create_dlc_splice_input(
|
|
411
437
|
RustBuffer prev_offer,
|
|
412
438
|
RustBuffer prev_accept,
|
|
439
|
+
RustBuffer prev_sign,
|
|
413
440
|
RustBuffer local_party,
|
|
414
441
|
RustBuffer input_serial_id,
|
|
415
442
|
uint16_t max_witness_len,
|
|
@@ -431,6 +458,12 @@ extern "C" {
|
|
|
431
458
|
RustBuffer accept,
|
|
432
459
|
RustCallStatus *uniffi_out_err
|
|
433
460
|
);
|
|
461
|
+
RustBuffer uniffi_ddk_ffi_fn_func_dlc_transactions_from_signed_messages(
|
|
462
|
+
RustBuffer offer,
|
|
463
|
+
RustBuffer accept,
|
|
464
|
+
RustBuffer sign,
|
|
465
|
+
RustCallStatus *uniffi_out_err
|
|
466
|
+
);
|
|
434
467
|
RustBuffer uniffi_ddk_ffi_fn_func_finalize_sign(
|
|
435
468
|
RustBuffer offer,
|
|
436
469
|
RustBuffer accept,
|
|
@@ -507,6 +540,7 @@ extern "C" {
|
|
|
507
540
|
RustBuffer offer,
|
|
508
541
|
uint32_t min_timeout_interval,
|
|
509
542
|
uint32_t max_timeout_interval,
|
|
543
|
+
uint64_t now_unix,
|
|
510
544
|
RustCallStatus *uniffi_out_err
|
|
511
545
|
);
|
|
512
546
|
void uniffi_ddk_ffi_fn_func_validate_sign(
|
|
@@ -726,6 +760,8 @@ extern "C" {
|
|
|
726
760
|
);
|
|
727
761
|
uint16_t uniffi_ddk_ffi_checksum_func_create_dlc_transactions(
|
|
728
762
|
);
|
|
763
|
+
uint16_t uniffi_ddk_ffi_checksum_func_create_dlc_transactions_with_fee_rule(
|
|
764
|
+
);
|
|
729
765
|
uint16_t uniffi_ddk_ffi_checksum_func_create_extkey_from_parent_path(
|
|
730
766
|
);
|
|
731
767
|
uint16_t uniffi_ddk_ffi_checksum_func_create_extkey_from_seed(
|
|
@@ -736,6 +772,8 @@ extern "C" {
|
|
|
736
772
|
);
|
|
737
773
|
uint16_t uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions(
|
|
738
774
|
);
|
|
775
|
+
uint16_t uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions_with_fee_rule(
|
|
776
|
+
);
|
|
739
777
|
uint16_t uniffi_ddk_ffi_checksum_func_create_xpriv_from_parent_path(
|
|
740
778
|
);
|
|
741
779
|
uint16_t uniffi_ddk_ffi_checksum_func_extract_ecdsa_signature_from_oracle_signatures(
|
|
@@ -768,6 +806,8 @@ extern "C" {
|
|
|
768
806
|
);
|
|
769
807
|
uint16_t uniffi_ddk_ffi_checksum_func_dlc_transactions_from_messages(
|
|
770
808
|
);
|
|
809
|
+
uint16_t uniffi_ddk_ffi_checksum_func_dlc_transactions_from_signed_messages(
|
|
810
|
+
);
|
|
771
811
|
uint16_t uniffi_ddk_ffi_checksum_func_finalize_sign(
|
|
772
812
|
);
|
|
773
813
|
uint16_t uniffi_ddk_ffi_checksum_func_finalize_sign_spliced(
|
|
@@ -2508,6 +2548,14 @@ NativeDdkFfi::NativeDdkFfi(
|
|
|
2508
2548
|
return this->cpp_uniffi_ddk_ffi_fn_func_create_dlc_transactions(rt, thisVal, args, count);
|
|
2509
2549
|
}
|
|
2510
2550
|
);
|
|
2551
|
+
props["ubrn_uniffi_ddk_ffi_fn_func_create_dlc_transactions_with_fee_rule"] = jsi::Function::createFromHostFunction(
|
|
2552
|
+
rt,
|
|
2553
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_fn_func_create_dlc_transactions_with_fee_rule"),
|
|
2554
|
+
10,
|
|
2555
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2556
|
+
return this->cpp_uniffi_ddk_ffi_fn_func_create_dlc_transactions_with_fee_rule(rt, thisVal, args, count);
|
|
2557
|
+
}
|
|
2558
|
+
);
|
|
2511
2559
|
props["ubrn_uniffi_ddk_ffi_fn_func_create_extkey_from_parent_path"] = jsi::Function::createFromHostFunction(
|
|
2512
2560
|
rt,
|
|
2513
2561
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_fn_func_create_extkey_from_parent_path"),
|
|
@@ -2548,6 +2596,14 @@ NativeDdkFfi::NativeDdkFfi(
|
|
|
2548
2596
|
return this->cpp_uniffi_ddk_ffi_fn_func_create_spliced_dlc_transactions(rt, thisVal, args, count);
|
|
2549
2597
|
}
|
|
2550
2598
|
);
|
|
2599
|
+
props["ubrn_uniffi_ddk_ffi_fn_func_create_spliced_dlc_transactions_with_fee_rule"] = jsi::Function::createFromHostFunction(
|
|
2600
|
+
rt,
|
|
2601
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_fn_func_create_spliced_dlc_transactions_with_fee_rule"),
|
|
2602
|
+
10,
|
|
2603
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2604
|
+
return this->cpp_uniffi_ddk_ffi_fn_func_create_spliced_dlc_transactions_with_fee_rule(rt, thisVal, args, count);
|
|
2605
|
+
}
|
|
2606
|
+
);
|
|
2551
2607
|
props["ubrn_uniffi_ddk_ffi_fn_func_create_xpriv_from_parent_path"] = jsi::Function::createFromHostFunction(
|
|
2552
2608
|
rt,
|
|
2553
2609
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_fn_func_create_xpriv_from_parent_path"),
|
|
@@ -2639,7 +2695,7 @@ NativeDdkFfi::NativeDdkFfi(
|
|
|
2639
2695
|
props["ubrn_uniffi_ddk_ffi_fn_func_create_dlc_splice_input"] = jsi::Function::createFromHostFunction(
|
|
2640
2696
|
rt,
|
|
2641
2697
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_fn_func_create_dlc_splice_input"),
|
|
2642
|
-
|
|
2698
|
+
6,
|
|
2643
2699
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2644
2700
|
return this->cpp_uniffi_ddk_ffi_fn_func_create_dlc_splice_input(rt, thisVal, args, count);
|
|
2645
2701
|
}
|
|
@@ -2676,6 +2732,14 @@ NativeDdkFfi::NativeDdkFfi(
|
|
|
2676
2732
|
return this->cpp_uniffi_ddk_ffi_fn_func_dlc_transactions_from_messages(rt, thisVal, args, count);
|
|
2677
2733
|
}
|
|
2678
2734
|
);
|
|
2735
|
+
props["ubrn_uniffi_ddk_ffi_fn_func_dlc_transactions_from_signed_messages"] = jsi::Function::createFromHostFunction(
|
|
2736
|
+
rt,
|
|
2737
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_fn_func_dlc_transactions_from_signed_messages"),
|
|
2738
|
+
3,
|
|
2739
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2740
|
+
return this->cpp_uniffi_ddk_ffi_fn_func_dlc_transactions_from_signed_messages(rt, thisVal, args, count);
|
|
2741
|
+
}
|
|
2742
|
+
);
|
|
2679
2743
|
props["ubrn_uniffi_ddk_ffi_fn_func_finalize_sign"] = jsi::Function::createFromHostFunction(
|
|
2680
2744
|
rt,
|
|
2681
2745
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_fn_func_finalize_sign"),
|
|
@@ -2751,7 +2815,7 @@ NativeDdkFfi::NativeDdkFfi(
|
|
|
2751
2815
|
props["ubrn_uniffi_ddk_ffi_fn_func_validate_offer"] = jsi::Function::createFromHostFunction(
|
|
2752
2816
|
rt,
|
|
2753
2817
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_fn_func_validate_offer"),
|
|
2754
|
-
|
|
2818
|
+
4,
|
|
2755
2819
|
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2756
2820
|
return this->cpp_uniffi_ddk_ffi_fn_func_validate_offer(rt, thisVal, args, count);
|
|
2757
2821
|
}
|
|
@@ -2820,6 +2884,14 @@ NativeDdkFfi::NativeDdkFfi(
|
|
|
2820
2884
|
return this->cpp_uniffi_ddk_ffi_checksum_func_create_dlc_transactions(rt, thisVal, args, count);
|
|
2821
2885
|
}
|
|
2822
2886
|
);
|
|
2887
|
+
props["ubrn_uniffi_ddk_ffi_checksum_func_create_dlc_transactions_with_fee_rule"] = jsi::Function::createFromHostFunction(
|
|
2888
|
+
rt,
|
|
2889
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_checksum_func_create_dlc_transactions_with_fee_rule"),
|
|
2890
|
+
0,
|
|
2891
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2892
|
+
return this->cpp_uniffi_ddk_ffi_checksum_func_create_dlc_transactions_with_fee_rule(rt, thisVal, args, count);
|
|
2893
|
+
}
|
|
2894
|
+
);
|
|
2823
2895
|
props["ubrn_uniffi_ddk_ffi_checksum_func_create_extkey_from_parent_path"] = jsi::Function::createFromHostFunction(
|
|
2824
2896
|
rt,
|
|
2825
2897
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_checksum_func_create_extkey_from_parent_path"),
|
|
@@ -2860,6 +2932,14 @@ NativeDdkFfi::NativeDdkFfi(
|
|
|
2860
2932
|
return this->cpp_uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions(rt, thisVal, args, count);
|
|
2861
2933
|
}
|
|
2862
2934
|
);
|
|
2935
|
+
props["ubrn_uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions_with_fee_rule"] = jsi::Function::createFromHostFunction(
|
|
2936
|
+
rt,
|
|
2937
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions_with_fee_rule"),
|
|
2938
|
+
0,
|
|
2939
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2940
|
+
return this->cpp_uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions_with_fee_rule(rt, thisVal, args, count);
|
|
2941
|
+
}
|
|
2942
|
+
);
|
|
2863
2943
|
props["ubrn_uniffi_ddk_ffi_checksum_func_create_xpriv_from_parent_path"] = jsi::Function::createFromHostFunction(
|
|
2864
2944
|
rt,
|
|
2865
2945
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_checksum_func_create_xpriv_from_parent_path"),
|
|
@@ -2988,6 +3068,14 @@ NativeDdkFfi::NativeDdkFfi(
|
|
|
2988
3068
|
return this->cpp_uniffi_ddk_ffi_checksum_func_dlc_transactions_from_messages(rt, thisVal, args, count);
|
|
2989
3069
|
}
|
|
2990
3070
|
);
|
|
3071
|
+
props["ubrn_uniffi_ddk_ffi_checksum_func_dlc_transactions_from_signed_messages"] = jsi::Function::createFromHostFunction(
|
|
3072
|
+
rt,
|
|
3073
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_checksum_func_dlc_transactions_from_signed_messages"),
|
|
3074
|
+
0,
|
|
3075
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
3076
|
+
return this->cpp_uniffi_ddk_ffi_checksum_func_dlc_transactions_from_signed_messages(rt, thisVal, args, count);
|
|
3077
|
+
}
|
|
3078
|
+
);
|
|
2991
3079
|
props["ubrn_uniffi_ddk_ffi_checksum_func_finalize_sign"] = jsi::Function::createFromHostFunction(
|
|
2992
3080
|
rt,
|
|
2993
3081
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_checksum_func_finalize_sign"),
|
|
@@ -3555,6 +3643,16 @@ jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_create_dlc_transactions(jsi:
|
|
|
3555
3643
|
uniffi::ddk_ffi::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3556
3644
|
|
|
3557
3645
|
|
|
3646
|
+
return uniffi::ddk_ffi::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3647
|
+
}
|
|
3648
|
+
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_create_dlc_transactions_with_fee_rule(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3649
|
+
RustCallStatus status = uniffi::ddk_ffi::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3650
|
+
auto value = uniffi_ddk_ffi_fn_func_create_dlc_transactions_with_fee_rule(uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]), uniffi_jsi::Bridging<uint32_t>::fromJs(rt, callInvoker, args[3]), uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[4]), uniffi_jsi::Bridging<uint32_t>::fromJs(rt, callInvoker, args[5]), uniffi_jsi::Bridging<uint32_t>::fromJs(rt, callInvoker, args[6]), uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[7]), uniffi_jsi::Bridging<uint8_t>::fromJs(rt, callInvoker, args[8]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[9]),
|
|
3651
|
+
&status
|
|
3652
|
+
);
|
|
3653
|
+
uniffi::ddk_ffi::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3654
|
+
|
|
3655
|
+
|
|
3558
3656
|
return uniffi::ddk_ffi::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3559
3657
|
}
|
|
3560
3658
|
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_create_extkey_from_parent_path(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
@@ -3605,6 +3703,16 @@ jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_create_spliced_dlc_transacti
|
|
|
3605
3703
|
uniffi::ddk_ffi::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3606
3704
|
|
|
3607
3705
|
|
|
3706
|
+
return uniffi::ddk_ffi::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3707
|
+
}
|
|
3708
|
+
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_create_spliced_dlc_transactions_with_fee_rule(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3709
|
+
RustCallStatus status = uniffi::ddk_ffi::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3710
|
+
auto value = uniffi_ddk_ffi_fn_func_create_spliced_dlc_transactions_with_fee_rule(uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]), uniffi_jsi::Bridging<uint32_t>::fromJs(rt, callInvoker, args[3]), uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[4]), uniffi_jsi::Bridging<uint32_t>::fromJs(rt, callInvoker, args[5]), uniffi_jsi::Bridging<uint32_t>::fromJs(rt, callInvoker, args[6]), uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[7]), uniffi_jsi::Bridging<uint8_t>::fromJs(rt, callInvoker, args[8]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[9]),
|
|
3711
|
+
&status
|
|
3712
|
+
);
|
|
3713
|
+
uniffi::ddk_ffi::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3714
|
+
|
|
3715
|
+
|
|
3608
3716
|
return uniffi::ddk_ffi::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3609
3717
|
}
|
|
3610
3718
|
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_create_xpriv_from_parent_path(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
@@ -3718,7 +3826,7 @@ jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_contract_info_payouts(jsi::R
|
|
|
3718
3826
|
}
|
|
3719
3827
|
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_create_dlc_splice_input(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3720
3828
|
RustCallStatus status = uniffi::ddk_ffi::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3721
|
-
auto value = uniffi_ddk_ffi_fn_func_create_dlc_splice_input(uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[3]), uniffi_jsi::Bridging<uint16_t>::fromJs(rt, callInvoker, args[
|
|
3829
|
+
auto value = uniffi_ddk_ffi_fn_func_create_dlc_splice_input(uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[3]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[4]), uniffi_jsi::Bridging<uint16_t>::fromJs(rt, callInvoker, args[5]),
|
|
3722
3830
|
&status
|
|
3723
3831
|
);
|
|
3724
3832
|
uniffi::ddk_ffi::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
@@ -3763,6 +3871,16 @@ jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_dlc_transactions_from_messag
|
|
|
3763
3871
|
uniffi::ddk_ffi::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3764
3872
|
|
|
3765
3873
|
|
|
3874
|
+
return uniffi::ddk_ffi::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3875
|
+
}
|
|
3876
|
+
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_dlc_transactions_from_signed_messages(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3877
|
+
RustCallStatus status = uniffi::ddk_ffi::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3878
|
+
auto value = uniffi_ddk_ffi_fn_func_dlc_transactions_from_signed_messages(uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]),
|
|
3879
|
+
&status
|
|
3880
|
+
);
|
|
3881
|
+
uniffi::ddk_ffi::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3882
|
+
|
|
3883
|
+
|
|
3766
3884
|
return uniffi::ddk_ffi::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3767
3885
|
}
|
|
3768
3886
|
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_finalize_sign(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
@@ -3857,7 +3975,7 @@ jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_validate_accept(jsi::Runtime
|
|
|
3857
3975
|
}
|
|
3858
3976
|
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_validate_offer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3859
3977
|
RustCallStatus status = uniffi::ddk_ffi::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3860
|
-
uniffi_ddk_ffi_fn_func_validate_offer(uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi_jsi::Bridging<uint32_t>::fromJs(rt, callInvoker, args[1]), uniffi_jsi::Bridging<uint32_t>::fromJs(rt, callInvoker, args[2]),
|
|
3978
|
+
uniffi_ddk_ffi_fn_func_validate_offer(uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi_jsi::Bridging<uint32_t>::fromJs(rt, callInvoker, args[1]), uniffi_jsi::Bridging<uint32_t>::fromJs(rt, callInvoker, args[2]), uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[3]),
|
|
3861
3979
|
&status
|
|
3862
3980
|
);
|
|
3863
3981
|
uniffi::ddk_ffi::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
@@ -3922,6 +4040,13 @@ jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_create_dlc_transaction
|
|
|
3922
4040
|
);
|
|
3923
4041
|
|
|
3924
4042
|
|
|
4043
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
4044
|
+
}
|
|
4045
|
+
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_create_dlc_transactions_with_fee_rule(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
4046
|
+
auto value = uniffi_ddk_ffi_checksum_func_create_dlc_transactions_with_fee_rule(
|
|
4047
|
+
);
|
|
4048
|
+
|
|
4049
|
+
|
|
3925
4050
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3926
4051
|
}
|
|
3927
4052
|
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_create_extkey_from_parent_path(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
@@ -3957,6 +4082,13 @@ jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_create_spliced_dlc_tra
|
|
|
3957
4082
|
);
|
|
3958
4083
|
|
|
3959
4084
|
|
|
4085
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
4086
|
+
}
|
|
4087
|
+
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions_with_fee_rule(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
4088
|
+
auto value = uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions_with_fee_rule(
|
|
4089
|
+
);
|
|
4090
|
+
|
|
4091
|
+
|
|
3960
4092
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3961
4093
|
}
|
|
3962
4094
|
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_create_xpriv_from_parent_path(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
@@ -4069,6 +4201,13 @@ jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_dlc_transactions_from_
|
|
|
4069
4201
|
);
|
|
4070
4202
|
|
|
4071
4203
|
|
|
4204
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
4205
|
+
}
|
|
4206
|
+
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_dlc_transactions_from_signed_messages(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
4207
|
+
auto value = uniffi_ddk_ffi_checksum_func_dlc_transactions_from_signed_messages(
|
|
4208
|
+
);
|
|
4209
|
+
|
|
4210
|
+
|
|
4072
4211
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
4073
4212
|
}
|
|
4074
4213
|
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_finalize_sign(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
package/cpp/ddk_ffi.hpp
CHANGED
|
@@ -48,11 +48,13 @@ class NativeDdkFfi : public jsi::HostObject {
|
|
|
48
48
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_points(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
49
49
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_create_cets(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
50
50
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_create_dlc_transactions(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
51
|
+
jsi::Value cpp_uniffi_ddk_ffi_fn_func_create_dlc_transactions_with_fee_rule(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
51
52
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_create_extkey_from_parent_path(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
52
53
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_create_extkey_from_seed(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
53
54
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_create_fund_tx_locking_script(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
54
55
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_create_refund_transaction(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
55
56
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_create_spliced_dlc_transactions(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
57
|
+
jsi::Value cpp_uniffi_ddk_ffi_fn_func_create_spliced_dlc_transactions_with_fee_rule(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
56
58
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_create_xpriv_from_parent_path(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
57
59
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_extract_ecdsa_signature_from_oracle_signatures(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
58
60
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_get_pubkey_from_extkey(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -69,6 +71,7 @@ class NativeDdkFfi : public jsi::HostObject {
|
|
|
69
71
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_create_offer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
70
72
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_dlc_input_max_witness_len(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
71
73
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_dlc_transactions_from_messages(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
74
|
+
jsi::Value cpp_uniffi_ddk_ffi_fn_func_dlc_transactions_from_signed_messages(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
72
75
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_finalize_sign(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
73
76
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_finalize_sign_spliced(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
74
77
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_funding_input(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -87,11 +90,13 @@ class NativeDdkFfi : public jsi::HostObject {
|
|
|
87
90
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_points(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
88
91
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_cets(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
89
92
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_dlc_transactions(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
93
|
+
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_dlc_transactions_with_fee_rule(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
90
94
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_extkey_from_parent_path(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
91
95
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_extkey_from_seed(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
92
96
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_fund_tx_locking_script(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
93
97
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_refund_transaction(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
94
98
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
99
|
+
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions_with_fee_rule(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
95
100
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_xpriv_from_parent_path(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
96
101
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_extract_ecdsa_signature_from_oracle_signatures(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
97
102
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_get_pubkey_from_extkey(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -108,6 +113,7 @@ class NativeDdkFfi : public jsi::HostObject {
|
|
|
108
113
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_offer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
109
114
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_dlc_input_max_witness_len(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
110
115
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_dlc_transactions_from_messages(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
116
|
+
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_dlc_transactions_from_signed_messages(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
111
117
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_finalize_sign(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
112
118
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_finalize_sign_spliced(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
113
119
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_funding_input(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getter","globalThis","NativeDdkFfi","_default","exports","default","isRustFutureContinuationCallbackTypeCompatible"],"sourceRoot":"../../src","sources":["ddk_ffi-ffi.ts"],"mappings":";;;;;;AAAA;AACA;;AAEA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["getter","globalThis","NativeDdkFfi","_default","exports","default","isRustFutureContinuationCallbackTypeCompatible"],"sourceRoot":"../../src","sources":["ddk_ffi-ffi.ts"],"mappings":";;;;;;AAAA;AACA;;AAEA;AACA;AACA;;AAmoBA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,YAAY;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GACpBL,MAAM,EAErB;AAWA;AACA;AACA;AACA;AACA,MAAMM,8CAGL,GAAG,IAAI","ignoreList":[]}
|