@bennyblader/ddk-rn 0.3.0 → 0.3.2
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 +89 -0
- package/cpp/ddk_ffi.hpp +4 -0
- package/ddk-ffi/Cargo.lock +1 -1
- package/ddk-ffi/Cargo.toml +1 -1
- package/ddk-ffi/src/ddk_ffi.udl +21 -0
- package/ddk-ffi/src/lib.rs +120 -10
- package/lib/commonjs/ddk_ffi-ffi.js.map +1 -1
- package/lib/commonjs/ddk_ffi.js +33 -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 +31 -0
- package/lib/module/ddk_ffi.js.map +1 -1
- package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts +4 -0
- package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ddk_ffi.d.ts +2 -0
- package/lib/typescript/commonjs/src/ddk_ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/ddk_ffi-ffi.d.ts +4 -0
- package/lib/typescript/module/src/ddk_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/ddk_ffi.d.ts +2 -0
- package/lib/typescript/module/src/ddk_ffi.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ddk_ffi-ffi.ts +21 -0
- package/src/ddk_ffi.ts +95 -0
package/cpp/ddk_ffi.cpp
CHANGED
|
@@ -157,6 +157,15 @@ extern "C" {
|
|
|
157
157
|
RustBuffer msgs,
|
|
158
158
|
RustCallStatus *uniffi_out_err
|
|
159
159
|
);
|
|
160
|
+
RustBuffer uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_oracle_info(
|
|
161
|
+
RustBuffer cets,
|
|
162
|
+
RustBuffer oracle_info,
|
|
163
|
+
RustBuffer funding_secret_key,
|
|
164
|
+
RustBuffer funding_script_pubkey,
|
|
165
|
+
uint64_t fund_output_value,
|
|
166
|
+
RustBuffer msgs,
|
|
167
|
+
RustCallStatus *uniffi_out_err
|
|
168
|
+
);
|
|
160
169
|
RustBuffer uniffi_ddk_ffi_fn_func_create_cets(
|
|
161
170
|
RustBuffer fund_tx_id,
|
|
162
171
|
uint32_t fund_vout,
|
|
@@ -238,6 +247,16 @@ extern "C" {
|
|
|
238
247
|
RustBuffer output,
|
|
239
248
|
RustCallStatus *uniffi_out_err
|
|
240
249
|
);
|
|
250
|
+
RustBuffer uniffi_ddk_ffi_fn_func_sign_cet(
|
|
251
|
+
RustBuffer cet,
|
|
252
|
+
RustBuffer adaptor_signature,
|
|
253
|
+
RustBuffer oracle_signatures,
|
|
254
|
+
RustBuffer funding_secret_key,
|
|
255
|
+
RustBuffer other_pubkey,
|
|
256
|
+
RustBuffer funding_script_pubkey,
|
|
257
|
+
uint64_t fund_output_value,
|
|
258
|
+
RustCallStatus *uniffi_out_err
|
|
259
|
+
);
|
|
241
260
|
RustBuffer uniffi_ddk_ffi_fn_func_sign_fund_transaction_input(
|
|
242
261
|
RustBuffer fund_transaction,
|
|
243
262
|
RustBuffer privkey,
|
|
@@ -475,6 +494,8 @@ extern "C" {
|
|
|
475
494
|
);
|
|
476
495
|
uint16_t uniffi_ddk_ffi_checksum_func_create_cet_adaptor_signature_from_oracle_info(
|
|
477
496
|
);
|
|
497
|
+
uint16_t uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info(
|
|
498
|
+
);
|
|
478
499
|
uint16_t uniffi_ddk_ffi_checksum_func_create_cets(
|
|
479
500
|
);
|
|
480
501
|
uint16_t uniffi_ddk_ffi_checksum_func_create_dlc_transactions(
|
|
@@ -497,6 +518,8 @@ extern "C" {
|
|
|
497
518
|
);
|
|
498
519
|
uint16_t uniffi_ddk_ffi_checksum_func_is_dust_output(
|
|
499
520
|
);
|
|
521
|
+
uint16_t uniffi_ddk_ffi_checksum_func_sign_cet(
|
|
522
|
+
);
|
|
500
523
|
uint16_t uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input(
|
|
501
524
|
);
|
|
502
525
|
uint16_t uniffi_ddk_ffi_checksum_func_verify_fund_tx_signature(
|
|
@@ -2071,6 +2094,14 @@ NativeDdkFfi::NativeDdkFfi(
|
|
|
2071
2094
|
return this->cpp_uniffi_ddk_ffi_fn_func_create_cet_adaptor_signature_from_oracle_info(rt, thisVal, args, count);
|
|
2072
2095
|
}
|
|
2073
2096
|
);
|
|
2097
|
+
props["ubrn_uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_oracle_info"] = jsi::Function::createFromHostFunction(
|
|
2098
|
+
rt,
|
|
2099
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_oracle_info"),
|
|
2100
|
+
6,
|
|
2101
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2102
|
+
return this->cpp_uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_oracle_info(rt, thisVal, args, count);
|
|
2103
|
+
}
|
|
2104
|
+
);
|
|
2074
2105
|
props["ubrn_uniffi_ddk_ffi_fn_func_create_cets"] = jsi::Function::createFromHostFunction(
|
|
2075
2106
|
rt,
|
|
2076
2107
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_fn_func_create_cets"),
|
|
@@ -2159,6 +2190,14 @@ NativeDdkFfi::NativeDdkFfi(
|
|
|
2159
2190
|
return this->cpp_uniffi_ddk_ffi_fn_func_is_dust_output(rt, thisVal, args, count);
|
|
2160
2191
|
}
|
|
2161
2192
|
);
|
|
2193
|
+
props["ubrn_uniffi_ddk_ffi_fn_func_sign_cet"] = jsi::Function::createFromHostFunction(
|
|
2194
|
+
rt,
|
|
2195
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_fn_func_sign_cet"),
|
|
2196
|
+
7,
|
|
2197
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2198
|
+
return this->cpp_uniffi_ddk_ffi_fn_func_sign_cet(rt, thisVal, args, count);
|
|
2199
|
+
}
|
|
2200
|
+
);
|
|
2162
2201
|
props["ubrn_uniffi_ddk_ffi_fn_func_sign_fund_transaction_input"] = jsi::Function::createFromHostFunction(
|
|
2163
2202
|
rt,
|
|
2164
2203
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_fn_func_sign_fund_transaction_input"),
|
|
@@ -2207,6 +2246,14 @@ NativeDdkFfi::NativeDdkFfi(
|
|
|
2207
2246
|
return this->cpp_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_signature_from_oracle_info(rt, thisVal, args, count);
|
|
2208
2247
|
}
|
|
2209
2248
|
);
|
|
2249
|
+
props["ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info"] = jsi::Function::createFromHostFunction(
|
|
2250
|
+
rt,
|
|
2251
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info"),
|
|
2252
|
+
0,
|
|
2253
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2254
|
+
return this->cpp_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info(rt, thisVal, args, count);
|
|
2255
|
+
}
|
|
2256
|
+
);
|
|
2210
2257
|
props["ubrn_uniffi_ddk_ffi_checksum_func_create_cets"] = jsi::Function::createFromHostFunction(
|
|
2211
2258
|
rt,
|
|
2212
2259
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_checksum_func_create_cets"),
|
|
@@ -2295,6 +2342,14 @@ NativeDdkFfi::NativeDdkFfi(
|
|
|
2295
2342
|
return this->cpp_uniffi_ddk_ffi_checksum_func_is_dust_output(rt, thisVal, args, count);
|
|
2296
2343
|
}
|
|
2297
2344
|
);
|
|
2345
|
+
props["ubrn_uniffi_ddk_ffi_checksum_func_sign_cet"] = jsi::Function::createFromHostFunction(
|
|
2346
|
+
rt,
|
|
2347
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_checksum_func_sign_cet"),
|
|
2348
|
+
0,
|
|
2349
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2350
|
+
return this->cpp_uniffi_ddk_ffi_checksum_func_sign_cet(rt, thisVal, args, count);
|
|
2351
|
+
}
|
|
2352
|
+
);
|
|
2298
2353
|
props["ubrn_uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input"] = jsi::Function::createFromHostFunction(
|
|
2299
2354
|
rt,
|
|
2300
2355
|
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input"),
|
|
@@ -2410,6 +2465,16 @@ jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_create_cet_adaptor_signature
|
|
|
2410
2465
|
uniffi::ddk_ffi::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2411
2466
|
|
|
2412
2467
|
|
|
2468
|
+
return uniffi::ddk_ffi::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2469
|
+
}
|
|
2470
|
+
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_oracle_info(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2471
|
+
RustCallStatus status = uniffi::ddk_ffi::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2472
|
+
auto value = uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_oracle_info(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<uint64_t>::fromJs(rt, callInvoker, args[4]), uniffi::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[5]),
|
|
2473
|
+
&status
|
|
2474
|
+
);
|
|
2475
|
+
uniffi::ddk_ffi::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2476
|
+
|
|
2477
|
+
|
|
2413
2478
|
return uniffi::ddk_ffi::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2414
2479
|
}
|
|
2415
2480
|
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_create_cets(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
@@ -2522,6 +2587,16 @@ jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_is_dust_output(jsi::Runtime&
|
|
|
2522
2587
|
|
|
2523
2588
|
return uniffi_jsi::Bridging<int8_t>::toJs(rt, callInvoker, value);
|
|
2524
2589
|
}
|
|
2590
|
+
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_sign_cet(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2591
|
+
RustCallStatus status = uniffi::ddk_ffi::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2592
|
+
auto value = uniffi_ddk_ffi_fn_func_sign_cet(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::ddk_ffi::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[5]), uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[6]),
|
|
2593
|
+
&status
|
|
2594
|
+
);
|
|
2595
|
+
uniffi::ddk_ffi::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2596
|
+
|
|
2597
|
+
|
|
2598
|
+
return uniffi::ddk_ffi::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2599
|
+
}
|
|
2525
2600
|
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_fn_func_sign_fund_transaction_input(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2526
2601
|
RustCallStatus status = uniffi::ddk_ffi::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2527
2602
|
auto value = uniffi_ddk_ffi_fn_func_sign_fund_transaction_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_jsi::Bridging<uint32_t>::fromJs(rt, callInvoker, args[3]), uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[4]),
|
|
@@ -2570,6 +2645,13 @@ jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sig
|
|
|
2570
2645
|
);
|
|
2571
2646
|
|
|
2572
2647
|
|
|
2648
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2649
|
+
}
|
|
2650
|
+
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2651
|
+
auto value = uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info(
|
|
2652
|
+
);
|
|
2653
|
+
|
|
2654
|
+
|
|
2573
2655
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2574
2656
|
}
|
|
2575
2657
|
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_create_cets(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
@@ -2647,6 +2729,13 @@ jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_is_dust_output(jsi::Ru
|
|
|
2647
2729
|
);
|
|
2648
2730
|
|
|
2649
2731
|
|
|
2732
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2733
|
+
}
|
|
2734
|
+
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_sign_cet(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2735
|
+
auto value = uniffi_ddk_ffi_checksum_func_sign_cet(
|
|
2736
|
+
);
|
|
2737
|
+
|
|
2738
|
+
|
|
2650
2739
|
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2651
2740
|
}
|
|
2652
2741
|
jsi::Value NativeDdkFfi::cpp_uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
package/cpp/ddk_ffi.hpp
CHANGED
|
@@ -24,6 +24,7 @@ class NativeDdkFfi : public jsi::HostObject {
|
|
|
24
24
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_convert_mnemonic_to_seed(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
25
25
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_create_cet(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
26
26
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_create_cet_adaptor_signature_from_oracle_info(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
27
|
+
jsi::Value cpp_uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_oracle_info(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
27
28
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_create_cets(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
28
29
|
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);
|
|
29
30
|
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);
|
|
@@ -35,12 +36,14 @@ class NativeDdkFfi : public jsi::HostObject {
|
|
|
35
36
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_get_total_input_vsize(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
36
37
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_get_xpub_from_xpriv(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
37
38
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_is_dust_output(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
39
|
+
jsi::Value cpp_uniffi_ddk_ffi_fn_func_sign_cet(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
38
40
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_sign_fund_transaction_input(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
39
41
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_verify_fund_tx_signature(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
40
42
|
jsi::Value cpp_uniffi_ddk_ffi_fn_func_version(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
41
43
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_convert_mnemonic_to_seed(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
42
44
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_cet(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
43
45
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_signature_from_oracle_info(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
46
|
+
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
44
47
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_cets(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
45
48
|
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);
|
|
46
49
|
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);
|
|
@@ -52,6 +55,7 @@ class NativeDdkFfi : public jsi::HostObject {
|
|
|
52
55
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_get_total_input_vsize(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
53
56
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_get_xpub_from_xpriv(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
54
57
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_is_dust_output(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
58
|
+
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_sign_cet(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
55
59
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
56
60
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_verify_fund_tx_signature(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
57
61
|
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_version(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
package/ddk-ffi/Cargo.lock
CHANGED
package/ddk-ffi/Cargo.toml
CHANGED
package/ddk-ffi/src/ddk_ffi.udl
CHANGED
|
@@ -98,6 +98,27 @@ namespace ddk_ffi {
|
|
|
98
98
|
u32 vout,
|
|
99
99
|
u64 input_amount
|
|
100
100
|
);
|
|
101
|
+
|
|
102
|
+
[Throws=DLCError]
|
|
103
|
+
Transaction sign_cet(
|
|
104
|
+
Transaction cet,
|
|
105
|
+
sequence<u8> adaptor_signature,
|
|
106
|
+
sequence<sequence<u8>> oracle_signatures,
|
|
107
|
+
sequence<u8> funding_secret_key,
|
|
108
|
+
sequence<u8> other_pubkey,
|
|
109
|
+
sequence<u8> funding_script_pubkey,
|
|
110
|
+
u64 fund_output_value
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
[Throws=DLCError]
|
|
114
|
+
sequence<AdaptorSignature> create_cet_adaptor_sigs_from_oracle_info(
|
|
115
|
+
sequence<Transaction> cets,
|
|
116
|
+
sequence<OracleInfo> oracle_info,
|
|
117
|
+
sequence<u8> funding_secret_key,
|
|
118
|
+
sequence<u8> funding_script_pubkey,
|
|
119
|
+
u64 fund_output_value,
|
|
120
|
+
sequence<sequence<sequence<u8>>> msgs
|
|
121
|
+
);
|
|
101
122
|
|
|
102
123
|
// Signing Functions
|
|
103
124
|
[Throws=DLCError]
|
package/ddk-ffi/src/lib.rs
CHANGED
|
@@ -3,20 +3,20 @@ use bip39::{Language, Mnemonic};
|
|
|
3
3
|
use bitcoin::bip32::{DerivationPath, IntoDerivationPath, Xpriv, Xpub};
|
|
4
4
|
use bitcoin::hashes::Hash;
|
|
5
5
|
use bitcoin::sighash::EcdsaSighashType;
|
|
6
|
-
use bitcoin::WPubkeyHash;
|
|
7
6
|
use bitcoin::{
|
|
8
7
|
Amount, Network, OutPoint, ScriptBuf, Sequence, Transaction as BtcTransaction, TxIn,
|
|
9
8
|
TxOut as BtcTxOut, Txid, Witness,
|
|
10
9
|
};
|
|
10
|
+
use bitcoin::{Script, WPubkeyHash};
|
|
11
11
|
use dlc::{
|
|
12
12
|
self, dlc_input::DlcInputInfo as RustDlcInputInfo, DlcTransactions as RustDlcTransactions,
|
|
13
13
|
OracleInfo as DlcOracleInfo, PartyParams as DlcPartyParams, Payout as DlcPayout,
|
|
14
14
|
TxInputInfo as DlcTxInputInfo,
|
|
15
15
|
};
|
|
16
|
-
use secp256k1_zkp::All;
|
|
17
16
|
use secp256k1_zkp::{
|
|
18
17
|
ecdsa::Signature as EcdsaSignature, Message, PublicKey, Secp256k1, SecretKey, XOnlyPublicKey,
|
|
19
18
|
};
|
|
19
|
+
use secp256k1_zkp::{schnorr::Signature as SchnorrSignature, All, EcdsaAdaptorSignature};
|
|
20
20
|
use std::str::FromStr;
|
|
21
21
|
use std::sync::OnceLock;
|
|
22
22
|
|
|
@@ -25,7 +25,7 @@ uniffi::include_scaffolding!("ddk_ffi");
|
|
|
25
25
|
static SECP_CONTEXT: OnceLock<Secp256k1<All>> = OnceLock::new();
|
|
26
26
|
|
|
27
27
|
pub fn get_secp_context() -> &'static Secp256k1<All> {
|
|
28
|
-
SECP_CONTEXT.get_or_init(
|
|
28
|
+
SECP_CONTEXT.get_or_init(Secp256k1::new)
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
pub fn version() -> String {
|
|
@@ -472,8 +472,8 @@ pub fn create_cets(
|
|
|
472
472
|
witness: Witness::new(),
|
|
473
473
|
};
|
|
474
474
|
|
|
475
|
-
let local_script =
|
|
476
|
-
let remote_script =
|
|
475
|
+
let local_script = Script::from_bytes(&local_final_script_pubkey);
|
|
476
|
+
let remote_script = Script::from_bytes(&remote_final_script_pubkey);
|
|
477
477
|
|
|
478
478
|
let payouts: Vec<DlcPayout> = outcomes
|
|
479
479
|
.iter()
|
|
@@ -651,7 +651,7 @@ pub fn get_raw_funding_transaction_input_signature(
|
|
|
651
651
|
let script = bitcoin::ScriptBuf::new_p2wpkh(&wpkh);
|
|
652
652
|
|
|
653
653
|
let sig = dlc::util::get_raw_sig_for_tx_input(
|
|
654
|
-
|
|
654
|
+
secp,
|
|
655
655
|
&btc_tx,
|
|
656
656
|
input_index,
|
|
657
657
|
&script,
|
|
@@ -698,6 +698,116 @@ pub fn sign_fund_transaction_input(
|
|
|
698
698
|
Ok(btc_tx_to_transaction(&btc_tx))
|
|
699
699
|
}
|
|
700
700
|
|
|
701
|
+
pub fn sign_cet(
|
|
702
|
+
cet: Transaction,
|
|
703
|
+
adaptor_signature: Vec<u8>,
|
|
704
|
+
oracle_signatures: Vec<Vec<u8>>,
|
|
705
|
+
funding_secret_key: Vec<u8>,
|
|
706
|
+
other_pubkey: Vec<u8>,
|
|
707
|
+
funding_script_pubkey: Vec<u8>,
|
|
708
|
+
fund_output_value: u64,
|
|
709
|
+
) -> Result<Transaction, DLCError> {
|
|
710
|
+
let mut btc_tx = transaction_to_btc_tx(&cet)?;
|
|
711
|
+
let adaptor_sig = vec_to_ecdsa_adaptor_signature(adaptor_signature)?;
|
|
712
|
+
let oracle_sigs = oracle_signatures
|
|
713
|
+
.iter()
|
|
714
|
+
.map(|sig| vec_to_schnorr_signature(sig))
|
|
715
|
+
.collect::<Result<Vec<_>, _>>()?;
|
|
716
|
+
let funding_sk =
|
|
717
|
+
SecretKey::from_slice(&funding_secret_key).map_err(|_| DLCError::InvalidArgument)?;
|
|
718
|
+
let other_pk = PublicKey::from_slice(&other_pubkey).map_err(|_| DLCError::InvalidPublicKey)?;
|
|
719
|
+
let funding_script = Script::from_bytes(&funding_script_pubkey);
|
|
720
|
+
let secp = get_secp_context();
|
|
721
|
+
|
|
722
|
+
dlc::sign_cet(
|
|
723
|
+
secp,
|
|
724
|
+
&mut btc_tx,
|
|
725
|
+
&adaptor_sig,
|
|
726
|
+
&[oracle_sigs],
|
|
727
|
+
&funding_sk,
|
|
728
|
+
&other_pk,
|
|
729
|
+
&funding_script,
|
|
730
|
+
Amount::from_sat(fund_output_value),
|
|
731
|
+
)
|
|
732
|
+
.map_err(|e| DLCError::Secp256k1Error(e.to_string()))?;
|
|
733
|
+
|
|
734
|
+
Ok(btc_tx_to_transaction(&btc_tx))
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
fn vec_to_schnorr_signature(signature: &Vec<u8>) -> Result<SchnorrSignature, DLCError> {
|
|
738
|
+
let sig = SchnorrSignature::from_slice(signature).map_err(|_| DLCError::InvalidSignature)?;
|
|
739
|
+
Ok(sig)
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
fn vec_to_ecdsa_adaptor_signature(signature: Vec<u8>) -> Result<EcdsaAdaptorSignature, DLCError> {
|
|
743
|
+
EcdsaAdaptorSignature::from_slice(&signature).map_err(|_| DLCError::InvalidSignature)
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
pub fn create_cet_adaptor_sigs_from_oracle_info(
|
|
747
|
+
cets: Vec<Transaction>,
|
|
748
|
+
oracle_info: Vec<OracleInfo>,
|
|
749
|
+
funding_secret_key: Vec<u8>,
|
|
750
|
+
funding_script_pubkey: Vec<u8>,
|
|
751
|
+
fund_output_value: u64,
|
|
752
|
+
msgs: Vec<Vec<Vec<u8>>>,
|
|
753
|
+
) -> Result<Vec<AdaptorSignature>, DLCError> {
|
|
754
|
+
if msgs.len() != cets.len() {
|
|
755
|
+
return Err(DLCError::InvalidArgument);
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
let cets = cets
|
|
759
|
+
.iter()
|
|
760
|
+
.map(|cet| transaction_to_btc_tx(cet))
|
|
761
|
+
.collect::<Result<Vec<_>, _>>()?;
|
|
762
|
+
let oracle_infos = oracle_info
|
|
763
|
+
.iter()
|
|
764
|
+
.map(|info| {
|
|
765
|
+
let public_key = XOnlyPublicKey::from_slice(&info.public_key)?;
|
|
766
|
+
let nonces = info
|
|
767
|
+
.nonces
|
|
768
|
+
.iter()
|
|
769
|
+
.map(|nonce| XOnlyPublicKey::from_slice(nonce))
|
|
770
|
+
.collect::<Result<Vec<_>, _>>()?;
|
|
771
|
+
Ok(DlcOracleInfo { public_key, nonces })
|
|
772
|
+
})
|
|
773
|
+
.collect::<Result<Vec<_>, dlc::Error>>()
|
|
774
|
+
.map_err(|_| DLCError::InvalidArgument)?;
|
|
775
|
+
|
|
776
|
+
let funding_sk =
|
|
777
|
+
SecretKey::from_slice(&funding_secret_key).map_err(|_| DLCError::InvalidArgument)?;
|
|
778
|
+
let funding_script = Script::from_bytes(&funding_script_pubkey);
|
|
779
|
+
let msgs = msgs
|
|
780
|
+
.iter()
|
|
781
|
+
.map(|msg| {
|
|
782
|
+
msg.iter()
|
|
783
|
+
.map(|m| Message::from_digest_slice(m).map_err(|_| DLCError::InvalidArgument))
|
|
784
|
+
.collect::<Result<Vec<_>, _>>()
|
|
785
|
+
})
|
|
786
|
+
.collect::<Result<Vec<_>, _>>()?;
|
|
787
|
+
let secp = get_secp_context();
|
|
788
|
+
|
|
789
|
+
let adaptor_sigs = dlc::create_cet_adaptor_sigs_from_oracle_info(
|
|
790
|
+
secp,
|
|
791
|
+
&cets,
|
|
792
|
+
&oracle_infos,
|
|
793
|
+
&funding_sk,
|
|
794
|
+
&funding_script,
|
|
795
|
+
Amount::from_sat(fund_output_value),
|
|
796
|
+
&[msgs],
|
|
797
|
+
)
|
|
798
|
+
.map_err(|_| DLCError::InvalidSignature)?;
|
|
799
|
+
|
|
800
|
+
let adaptor_sigs = adaptor_sigs
|
|
801
|
+
.iter()
|
|
802
|
+
.map(|sig| AdaptorSignature {
|
|
803
|
+
signature: sig.as_ref().to_vec(),
|
|
804
|
+
proof: Vec::new(),
|
|
805
|
+
})
|
|
806
|
+
.collect::<Vec<_>>();
|
|
807
|
+
|
|
808
|
+
Ok(adaptor_sigs)
|
|
809
|
+
}
|
|
810
|
+
|
|
701
811
|
/// Create CET adaptor signature from oracle info
|
|
702
812
|
pub fn create_cet_adaptor_signature_from_oracle_info(
|
|
703
813
|
cet: Transaction,
|
|
@@ -709,7 +819,7 @@ pub fn create_cet_adaptor_signature_from_oracle_info(
|
|
|
709
819
|
) -> Result<AdaptorSignature, DLCError> {
|
|
710
820
|
let btc_tx = transaction_to_btc_tx(&cet)?;
|
|
711
821
|
let sk = SecretKey::from_slice(&funding_sk).map_err(|_| DLCError::InvalidArgument)?;
|
|
712
|
-
let funding_script =
|
|
822
|
+
let funding_script = Script::from_bytes(&funding_script_pubkey);
|
|
713
823
|
|
|
714
824
|
// Convert oracle info
|
|
715
825
|
let oracle_pk = XOnlyPublicKey::from_slice(&oracle_info.public_key)
|
|
@@ -736,7 +846,7 @@ pub fn create_cet_adaptor_signature_from_oracle_info(
|
|
|
736
846
|
|
|
737
847
|
let secp = get_secp_context();
|
|
738
848
|
let adaptor_sig = dlc::create_cet_adaptor_sig_from_oracle_info(
|
|
739
|
-
|
|
849
|
+
secp,
|
|
740
850
|
&btc_tx,
|
|
741
851
|
&[dlc_oracle_info],
|
|
742
852
|
&sk,
|
|
@@ -788,7 +898,7 @@ pub fn create_xpriv_from_parent_path(
|
|
|
788
898
|
let full_path = base_path.extend(app_path);
|
|
789
899
|
|
|
790
900
|
let derived_xpriv = xpriv
|
|
791
|
-
.derive_priv(
|
|
901
|
+
.derive_priv(secp, &full_path)
|
|
792
902
|
.map_err(|_| DLCError::KeyError(ExtendedKey::InvalidXpriv))?;
|
|
793
903
|
|
|
794
904
|
Ok(derived_xpriv.encode().to_vec())
|
|
@@ -799,7 +909,7 @@ pub fn get_xpub_from_xpriv(xpriv: Vec<u8>, network: String) -> Result<Vec<u8>, D
|
|
|
799
909
|
let network = Network::from_str(&network).map_err(|_| DLCError::InvalidNetwork)?;
|
|
800
910
|
let xpriv = Xpriv::new_master(network, &xpriv)
|
|
801
911
|
.map_err(|_| DLCError::KeyError(ExtendedKey::InvalidXpriv))?;
|
|
802
|
-
let xpub = Xpub::from_priv(
|
|
912
|
+
let xpub = Xpub::from_priv(secp, &xpriv);
|
|
803
913
|
Ok(xpub.encode().to_vec())
|
|
804
914
|
}
|
|
805
915
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getter","globalThis","NativeDdkFfi","_default","exports","default","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../src","sources":["ddk_ffi-ffi.ts"],"mappings":";;;;;;AAAA;AACA;;
|
|
1
|
+
{"version":3,"names":["getter","globalThis","NativeDdkFfi","_default","exports","default","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../src","sources":["ddk_ffi-ffi.ts"],"mappings":";;;;;;AAAA;AACA;;AA8LA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,YAAY;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GACpBL,MAAM,EAErB;AAmHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,8CAGL,GAAG,IAAI;AACR,MAAMC,mCAGL,GAAG,IAAI","ignoreList":[]}
|
package/lib/commonjs/ddk_ffi.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.TxOutput = exports.TxInputInfo = exports.TxInput = exports.Transaction =
|
|
|
7
7
|
exports.convertMnemonicToSeed = convertMnemonicToSeed;
|
|
8
8
|
exports.createCet = createCet;
|
|
9
9
|
exports.createCetAdaptorSignatureFromOracleInfo = createCetAdaptorSignatureFromOracleInfo;
|
|
10
|
+
exports.createCetAdaptorSigsFromOracleInfo = createCetAdaptorSigsFromOracleInfo;
|
|
10
11
|
exports.createCets = createCets;
|
|
11
12
|
exports.createDlcTransactions = createDlcTransactions;
|
|
12
13
|
exports.createFundTxLockingScript = createFundTxLockingScript;
|
|
@@ -19,6 +20,7 @@ exports.getRawFundingTransactionInputSignature = getRawFundingTransactionInputSi
|
|
|
19
20
|
exports.getTotalInputVsize = getTotalInputVsize;
|
|
20
21
|
exports.getXpubFromXpriv = getXpubFromXpriv;
|
|
21
22
|
exports.isDustOutput = isDustOutput;
|
|
23
|
+
exports.signCet = signCet;
|
|
22
24
|
exports.signFundTransactionInput = signFundTransactionInput;
|
|
23
25
|
exports.verifyFundTxSignature = verifyFundTxSignature;
|
|
24
26
|
exports.version = version;
|
|
@@ -63,6 +65,14 @@ function createCetAdaptorSignatureFromOracleInfo(cet, oracleInfo, fundingSk, fun
|
|
|
63
65
|
})()(FfiConverterTypeTransaction.lower(cet), FfiConverterTypeOracleInfo.lower(oracleInfo), FfiConverterArrayUInt8.lower(fundingSk), FfiConverterArrayUInt8.lower(fundingScriptPubkey), _uniffiBindgenReactNative.FfiConverterUInt64.lower(totalCollateral), FfiConverterArrayArrayUInt8.lower(msgs), callStatus);
|
|
64
66
|
}, /*liftString:*/FfiConverterString.lift));
|
|
65
67
|
}
|
|
68
|
+
function createCetAdaptorSigsFromOracleInfo(cets, oracleInfo, fundingSecretKey, fundingScriptPubkey, fundOutputValue, msgs) /*throws*/{
|
|
69
|
+
return FfiConverterArrayTypeAdaptorSignature.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
70
|
+
return (() => {
|
|
71
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_oracle_info`);
|
|
72
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_oracle_info;
|
|
73
|
+
})()(FfiConverterArrayTypeTransaction.lower(cets), FfiConverterArrayTypeOracleInfo.lower(oracleInfo), FfiConverterArrayUInt8.lower(fundingSecretKey), FfiConverterArrayUInt8.lower(fundingScriptPubkey), _uniffiBindgenReactNative.FfiConverterUInt64.lower(fundOutputValue), FfiConverterArrayArrayArrayUInt8.lower(msgs), callStatus);
|
|
74
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
75
|
+
}
|
|
66
76
|
function createCets(fundTxId, fundVout, localFinalScriptPubkey, remoteFinalScriptPubkey, outcomes, lockTime, localSerialId, remoteSerialId) /*throws*/{
|
|
67
77
|
return FfiConverterArrayTypeTransaction.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
68
78
|
return (() => {
|
|
@@ -151,6 +161,14 @@ function isDustOutput(output) {
|
|
|
151
161
|
})()(FfiConverterTypeTxOutput.lower(output), callStatus);
|
|
152
162
|
}, /*liftString:*/FfiConverterString.lift));
|
|
153
163
|
}
|
|
164
|
+
function signCet(cet, adaptorSignature, oracleSignatures, fundingSecretKey, otherPubkey, fundingScriptPubkey, fundOutputValue) /*throws*/{
|
|
165
|
+
return FfiConverterTypeTransaction.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
166
|
+
return (() => {
|
|
167
|
+
console.debug(`-- uniffi_ddk_ffi_fn_func_sign_cet`);
|
|
168
|
+
return (0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_fn_func_sign_cet;
|
|
169
|
+
})()(FfiConverterTypeTransaction.lower(cet), FfiConverterArrayUInt8.lower(adaptorSignature), FfiConverterArrayArrayUInt8.lower(oracleSignatures), FfiConverterArrayUInt8.lower(fundingSecretKey), FfiConverterArrayUInt8.lower(otherPubkey), FfiConverterArrayUInt8.lower(fundingScriptPubkey), _uniffiBindgenReactNative.FfiConverterUInt64.lower(fundOutputValue), callStatus);
|
|
170
|
+
}, /*liftString:*/FfiConverterString.lift));
|
|
171
|
+
}
|
|
154
172
|
function signFundTransactionInput(fundTransaction, privkey, prevTxId, prevTxVout, value) /*throws*/{
|
|
155
173
|
return FfiConverterTypeTransaction.lift(uniffiCaller.rustCallWithError(/*liftError:*/FfiConverterTypeDLCError.lift.bind(FfiConverterTypeDLCError), /*caller:*/callStatus => {
|
|
156
174
|
return (() => {
|
|
@@ -1149,12 +1167,18 @@ const FfiConverterTypeExtendedKey = (() => {
|
|
|
1149
1167
|
// FfiConverter for string | undefined
|
|
1150
1168
|
const FfiConverterOptionalString = new _uniffiBindgenReactNative.FfiConverterOptional(FfiConverterString);
|
|
1151
1169
|
|
|
1170
|
+
// FfiConverter for Array<AdaptorSignature>
|
|
1171
|
+
const FfiConverterArrayTypeAdaptorSignature = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeAdaptorSignature);
|
|
1172
|
+
|
|
1152
1173
|
// FfiConverter for Array<DlcInputInfo>
|
|
1153
1174
|
const FfiConverterArrayTypeDlcInputInfo = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeDlcInputInfo);
|
|
1154
1175
|
|
|
1155
1176
|
// FfiConverter for Array<DlcOutcome>
|
|
1156
1177
|
const FfiConverterArrayTypeDlcOutcome = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeDlcOutcome);
|
|
1157
1178
|
|
|
1179
|
+
// FfiConverter for Array<OracleInfo>
|
|
1180
|
+
const FfiConverterArrayTypeOracleInfo = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeOracleInfo);
|
|
1181
|
+
|
|
1158
1182
|
// FfiConverter for Array<Transaction>
|
|
1159
1183
|
const FfiConverterArrayTypeTransaction = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterTypeTransaction);
|
|
1160
1184
|
|
|
@@ -1173,6 +1197,9 @@ const FfiConverterArrayUInt8 = new _uniffiBindgenReactNative.FfiConverterArray(_
|
|
|
1173
1197
|
// FfiConverter for Array<Array</*u8*/number>>
|
|
1174
1198
|
const FfiConverterArrayArrayUInt8 = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterArrayUInt8);
|
|
1175
1199
|
|
|
1200
|
+
// FfiConverter for Array<Array<Array</*u8*/number>>>
|
|
1201
|
+
const FfiConverterArrayArrayArrayUInt8 = new _uniffiBindgenReactNative.FfiConverterArray(FfiConverterArrayArrayUInt8);
|
|
1202
|
+
|
|
1176
1203
|
/**
|
|
1177
1204
|
* This should be called before anything else.
|
|
1178
1205
|
*
|
|
@@ -1200,6 +1227,9 @@ function uniffiEnsureInitialized() {
|
|
|
1200
1227
|
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_signature_from_oracle_info() !== 65174) {
|
|
1201
1228
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_cet_adaptor_signature_from_oracle_info');
|
|
1202
1229
|
}
|
|
1230
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info() !== 59405) {
|
|
1231
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info');
|
|
1232
|
+
}
|
|
1203
1233
|
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_create_cets() !== 45293) {
|
|
1204
1234
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_create_cets');
|
|
1205
1235
|
}
|
|
@@ -1233,6 +1263,9 @@ function uniffiEnsureInitialized() {
|
|
|
1233
1263
|
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_is_dust_output() !== 64174) {
|
|
1234
1264
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_is_dust_output');
|
|
1235
1265
|
}
|
|
1266
|
+
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_sign_cet() !== 43957) {
|
|
1267
|
+
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_sign_cet');
|
|
1268
|
+
}
|
|
1236
1269
|
if ((0, _ddk_ffiFfi.default)().ubrn_uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input() !== 50531) {
|
|
1237
1270
|
throw new _uniffiBindgenReactNative.UniffiInternalError.ApiChecksumMismatch('uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input');
|
|
1238
1271
|
}
|