@bennyblader/ddk-rn 0.3.30 → 0.3.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cpp/ddk_ffi.cpp +40 -0
- package/cpp/ddk_ffi.hpp +2 -0
- package/ddk-ffi/Cargo.lock +109 -222
- package/ddk-ffi/Cargo.toml +2 -2
- package/ddk-ffi/src/ddk_ffi.udl +6 -0
- package/ddk-ffi/src/lib.rs +184 -6
- package/lib/commonjs/ddk_ffi-ffi.js.map +1 -1
- package/lib/commonjs/ddk_ffi.js +12 -0
- 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 +11 -0
- package/lib/module/ddk_ffi.js.map +1 -1
- package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts +2 -0
- package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ddk_ffi.d.ts +1 -0
- package/lib/typescript/commonjs/src/ddk_ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/ddk_ffi-ffi.d.ts +2 -0
- package/lib/typescript/module/src/ddk_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/ddk_ffi.d.ts +1 -0
- package/lib/typescript/module/src/ddk_ffi.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ddk_ffi-ffi.ts +6 -0
- package/src/ddk_ffi.ts +34 -0
package/cpp/ddk_ffi.cpp
CHANGED
|
@@ -243,6 +243,11 @@ extern "C" {
|
|
|
243
243
|
RustBuffer path,
|
|
244
244
|
RustCallStatus *uniffi_out_err
|
|
245
245
|
);
|
|
246
|
+
RustBuffer uniffi_ddk_ffi_fn_func_extract_ecdsa_signature_from_oracle_signatures(
|
|
247
|
+
RustBuffer oracle_signatures,
|
|
248
|
+
RustBuffer adaptor_signature,
|
|
249
|
+
RustCallStatus *uniffi_out_err
|
|
250
|
+
);
|
|
246
251
|
RustBuffer uniffi_ddk_ffi_fn_func_get_change_output_and_fees(
|
|
247
252
|
RustBuffer params,
|
|
248
253
|
uint64_t fee_rate,
|
|
@@ -570,6 +575,8 @@ extern "C" {
|
|
|
570
575
|
);
|
|
571
576
|
uint16_t uniffi_ddk_ffi_checksum_func_create_xpriv_from_parent_path(
|
|
572
577
|
);
|
|
578
|
+
uint16_t uniffi_ddk_ffi_checksum_func_extract_ecdsa_signature_from_oracle_signatures(
|
|
579
|
+
);
|
|
573
580
|
uint16_t uniffi_ddk_ffi_checksum_func_get_change_output_and_fees(
|
|
574
581
|
);
|
|
575
582
|
uint16_t uniffi_ddk_ffi_checksum_func_get_pubkey_from_extkey(
|
|
@@ -2252,6 +2259,14 @@ NativeDdkFfi::NativeDdkFfi(
|
|
|
2252
2259
|
return this->cpp_uniffi_ddk_ffi_fn_func_create_xpriv_from_parent_path(rt, thisVal, args, count);
|
|
2253
2260
|
}
|
|
2254
2261
|
);
|
|
2262
|
+
props["ubrn_uniffi_ddk_ffi_fn_func_extract_ecdsa_signature_from_oracle_signatures"] = jsi::Function::createFromHostFunction(
|
|
2263
|
+
rt,
|
|
2264
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_fn_func_extract_ecdsa_signature_from_oracle_signatures"),
|
|
2265
|
+
2,
|
|
2266
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2267
|
+
return this->cpp_uniffi_ddk_ffi_fn_func_extract_ecdsa_signature_from_oracle_signatures(rt, thisVal, args, count);
|
|
2268
|
+
}
|
|
2269
|
+
);
|
|
2255
2270
|
props["ubrn_uniffi_ddk_ffi_fn_func_get_change_output_and_fees"] = jsi::Function::createFromHostFunction(
|
|
2256
2271
|
rt,
|
|
2257
2272
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_fn_func_get_change_output_and_fees"),
|
|
@@ -2468,6 +2483,14 @@ NativeDdkFfi::NativeDdkFfi(
|
|
|
2468
2483
|
return this->cpp_uniffi_ddk_ffi_checksum_func_create_xpriv_from_parent_path(rt, thisVal, args, count);
|
|
2469
2484
|
}
|
|
2470
2485
|
);
|
|
2486
|
+
props["ubrn_uniffi_ddk_ffi_checksum_func_extract_ecdsa_signature_from_oracle_signatures"] = jsi::Function::createFromHostFunction(
|
|
2487
|
+
rt,
|
|
2488
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_checksum_func_extract_ecdsa_signature_from_oracle_signatures"),
|
|
2489
|
+
0,
|
|
2490
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2491
|
+
return this->cpp_uniffi_ddk_ffi_checksum_func_extract_ecdsa_signature_from_oracle_signatures(rt, thisVal, args, count);
|
|
2492
|
+
}
|
|
2493
|
+
);
|
|
2471
2494
|
props["ubrn_uniffi_ddk_ffi_checksum_func_get_change_output_and_fees"] = jsi::Function::createFromHostFunction(
|
|
2472
2495
|
rt,
|
|
2473
2496
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_checksum_func_get_change_output_and_fees"),
|
|
@@ -2773,6 +2796,16 @@ jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_create_xpriv_from_parent_pat
|
|
|
2773
2796
|
uniffi::ddk_ffi::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2774
2797
|
|
|
2775
2798
|
|
|
2799
|
+
return uniffi::ddk_ffi::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2800
|
+
}
|
|
2801
|
+
jsi::Value NativeDdkFfi::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) {
|
|
2802
|
+
RustCallStatus status = uniffi::ddk_ffi::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2803
|
+
auto value = uniffi_ddk_ffi_fn_func_extract_ecdsa_signature_from_oracle_signatures(uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
|
|
2804
|
+
&status
|
|
2805
|
+
);
|
|
2806
|
+
uniffi::ddk_ffi::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2807
|
+
|
|
2808
|
+
|
|
2776
2809
|
return uniffi::ddk_ffi::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2777
2810
|
}
|
|
2778
2811
|
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_get_change_output_and_fees(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
@@ -3000,6 +3033,13 @@ jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_create_xpriv_from_pare
|
|
|
3000
3033
|
);
|
|
3001
3034
|
|
|
3002
3035
|
|
|
3036
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3037
|
+
}
|
|
3038
|
+
jsi::Value NativeDdkFfi::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) {
|
|
3039
|
+
auto value = uniffi_ddk_ffi_checksum_func_extract_ecdsa_signature_from_oracle_signatures(
|
|
3040
|
+
);
|
|
3041
|
+
|
|
3042
|
+
|
|
3003
3043
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3004
3044
|
}
|
|
3005
3045
|
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_get_change_output_and_fees(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
package/cpp/ddk_ffi.hpp
CHANGED
|
@@ -35,6 +35,7 @@ class NativeDdkFfi : public jsi::HostObject {
|
|
|
35
35
|
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);
|
|
36
36
|
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);
|
|
37
37
|
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);
|
|
38
|
+
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);
|
|
38
39
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_get_change_output_and_fees(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
39
40
|
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);
|
|
40
41
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_get_raw_funding_transaction_input_signature(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
@@ -62,6 +63,7 @@ class NativeDdkFfi : public jsi::HostObject {
|
|
|
62
63
|
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);
|
|
63
64
|
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);
|
|
64
65
|
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);
|
|
66
|
+
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);
|
|
65
67
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_get_change_output_and_fees(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
66
68
|
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);
|
|
67
69
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_get_raw_funding_transaction_input_signature(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|