@bennyblader/ddk-rn 0.3.37 → 0.3.39
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 +3 -0
- package/cpp/bennyblader-ddk-rn.cpp +1 -1
- package/cpp/ddk_ffi.cpp +2485 -2573
- package/cpp/ddk_ffi.hpp +97 -255
- package/ddk-ffi/Cargo.lock +3 -3
- package/ddk-ffi/Cargo.toml +2 -2
- package/ddk-ffi/src/ddk_ffi.udl +5 -3
- package/ddk-ffi/src/lib.rs +11 -1
- package/lib/commonjs/ddk_ffi-ffi.js.map +1 -1
- package/lib/commonjs/ddk_ffi.js +69 -81
- 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 +70 -82
- package/lib/module/ddk_ffi.js.map +1 -1
- package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts +2 -2
- package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ddk_ffi.d.ts +5 -5
- package/lib/typescript/commonjs/src/ddk_ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/ddk_ffi-ffi.d.ts +2 -2
- package/lib/typescript/module/src/ddk_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/ddk_ffi.d.ts +5 -5
- package/lib/typescript/module/src/ddk_ffi.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ddk_ffi-ffi.ts +331 -83
- package/src/ddk_ffi.ts +2317 -1883
package/cpp/ddk_ffi.hpp
CHANGED
|
@@ -1,270 +1,112 @@
|
|
|
1
|
-
// This file was autogenerated by some hot garbage in the
|
|
2
|
-
//
|
|
3
|
-
// it!
|
|
1
|
+
// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
|
|
2
|
+
// Trust me, you don't want to mess with it!
|
|
4
3
|
#pragma once
|
|
5
|
-
#include "UniffiCallInvoker.h"
|
|
6
|
-
#include <ReactCommon/CallInvoker.h>
|
|
7
|
-
#include <iostream>
|
|
8
4
|
#include <jsi/jsi.h>
|
|
5
|
+
#include <iostream>
|
|
9
6
|
#include <map>
|
|
10
7
|
#include <memory>
|
|
8
|
+
#include <ReactCommon/CallInvoker.h>
|
|
9
|
+
#include "UniffiCallInvoker.h"
|
|
11
10
|
|
|
12
11
|
namespace react = facebook::react;
|
|
13
12
|
namespace jsi = facebook::jsi;
|
|
14
13
|
|
|
15
14
|
class NativeDdkFfi : public jsi::HostObject {
|
|
16
|
-
private:
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
private:
|
|
16
|
+
// For calling back into JS from Rust.
|
|
17
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker;
|
|
19
18
|
|
|
20
|
-
protected:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
jsi::Value cpp_uniffi_ddk_ffi_fn_func_get_cet_sighash(
|
|
89
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
90
|
-
size_t count);
|
|
91
|
-
jsi::Value cpp_uniffi_ddk_ffi_fn_func_get_change_output_and_fees(
|
|
92
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
93
|
-
size_t count);
|
|
94
|
-
jsi::Value cpp_uniffi_ddk_ffi_fn_func_get_pubkey_from_extkey(
|
|
95
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
96
|
-
size_t count);
|
|
97
|
-
jsi::Value
|
|
98
|
-
cpp_uniffi_ddk_ffi_fn_func_get_raw_funding_transaction_input_signature(
|
|
99
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
100
|
-
size_t count);
|
|
101
|
-
jsi::Value cpp_uniffi_ddk_ffi_fn_func_get_total_input_vsize(
|
|
102
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
103
|
-
size_t count);
|
|
104
|
-
jsi::Value cpp_uniffi_ddk_ffi_fn_func_get_xpub_from_xpriv(
|
|
105
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
106
|
-
size_t count);
|
|
107
|
-
jsi::Value cpp_uniffi_ddk_ffi_fn_func_is_dust_output(
|
|
108
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
109
|
-
size_t count);
|
|
110
|
-
jsi::Value cpp_uniffi_ddk_ffi_fn_func_sign_cet(jsi::Runtime &rt,
|
|
111
|
-
const jsi::Value &thisVal,
|
|
112
|
-
const jsi::Value *args,
|
|
113
|
-
size_t count);
|
|
114
|
-
jsi::Value cpp_uniffi_ddk_ffi_fn_func_sign_fund_transaction_input(
|
|
115
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
116
|
-
size_t count);
|
|
117
|
-
jsi::Value cpp_uniffi_ddk_ffi_fn_func_sign_multi_sig_input(
|
|
118
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
119
|
-
size_t count);
|
|
120
|
-
jsi::Value cpp_uniffi_ddk_ffi_fn_func_verify_cet_adaptor_sig_from_oracle_info(
|
|
121
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
122
|
-
size_t count);
|
|
123
|
-
jsi::Value
|
|
124
|
-
cpp_uniffi_ddk_ffi_fn_func_verify_cet_adaptor_sigs_from_oracle_info(
|
|
125
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
126
|
-
size_t count);
|
|
127
|
-
jsi::Value cpp_uniffi_ddk_ffi_fn_func_verify_fund_tx_signature(
|
|
128
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
129
|
-
size_t count);
|
|
130
|
-
jsi::Value cpp_uniffi_ddk_ffi_fn_func_version(jsi::Runtime &rt,
|
|
131
|
-
const jsi::Value &thisVal,
|
|
132
|
-
const jsi::Value *args,
|
|
133
|
-
size_t count);
|
|
134
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_add_signature_to_transaction(
|
|
135
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
136
|
-
size_t count);
|
|
137
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_convert_mnemonic_to_seed(
|
|
138
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
139
|
-
size_t count);
|
|
140
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_cet(
|
|
141
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
142
|
-
size_t count);
|
|
143
|
-
jsi::Value
|
|
144
|
-
cpp_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_points_from_oracle_info(
|
|
145
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
146
|
-
size_t count);
|
|
147
|
-
jsi::Value
|
|
148
|
-
cpp_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_signature_from_oracle_info(
|
|
149
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
150
|
-
size_t count);
|
|
151
|
-
jsi::Value
|
|
152
|
-
cpp_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info(
|
|
153
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
154
|
-
size_t count);
|
|
155
|
-
jsi::Value
|
|
156
|
-
cpp_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_points(
|
|
157
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
158
|
-
size_t count);
|
|
159
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_cets(
|
|
160
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
161
|
-
size_t count);
|
|
162
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_dlc_transactions(
|
|
163
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
164
|
-
size_t count);
|
|
165
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_extkey_from_parent_path(
|
|
166
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
167
|
-
size_t count);
|
|
168
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_extkey_from_seed(
|
|
169
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
170
|
-
size_t count);
|
|
171
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_fund_tx_locking_script(
|
|
172
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
173
|
-
size_t count);
|
|
174
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_refund_transaction(
|
|
175
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
176
|
-
size_t count);
|
|
177
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions(
|
|
178
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
179
|
-
size_t count);
|
|
180
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_xpriv_from_parent_path(
|
|
181
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
182
|
-
size_t count);
|
|
183
|
-
jsi::Value
|
|
184
|
-
cpp_uniffi_ddk_ffi_checksum_func_extract_ecdsa_signature_from_oracle_signatures(
|
|
185
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
186
|
-
size_t count);
|
|
187
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_get_cet_adaptor_signature_inputs(
|
|
188
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
189
|
-
size_t count);
|
|
190
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_get_cet_sighash(
|
|
191
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
192
|
-
size_t count);
|
|
193
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_get_change_output_and_fees(
|
|
194
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
195
|
-
size_t count);
|
|
196
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_get_pubkey_from_extkey(
|
|
197
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
198
|
-
size_t count);
|
|
199
|
-
jsi::Value
|
|
200
|
-
cpp_uniffi_ddk_ffi_checksum_func_get_raw_funding_transaction_input_signature(
|
|
201
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
202
|
-
size_t count);
|
|
203
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_get_total_input_vsize(
|
|
204
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
205
|
-
size_t count);
|
|
206
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_get_xpub_from_xpriv(
|
|
207
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
208
|
-
size_t count);
|
|
209
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_is_dust_output(
|
|
210
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
211
|
-
size_t count);
|
|
212
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_sign_cet(
|
|
213
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
214
|
-
size_t count);
|
|
215
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_sign_fund_transaction_input(
|
|
216
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
217
|
-
size_t count);
|
|
218
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_sign_multi_sig_input(
|
|
219
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
220
|
-
size_t count);
|
|
221
|
-
jsi::Value
|
|
222
|
-
cpp_uniffi_ddk_ffi_checksum_func_verify_cet_adaptor_sig_from_oracle_info(
|
|
223
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
224
|
-
size_t count);
|
|
225
|
-
jsi::Value
|
|
226
|
-
cpp_uniffi_ddk_ffi_checksum_func_verify_cet_adaptor_sigs_from_oracle_info(
|
|
227
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
228
|
-
size_t count);
|
|
229
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_verify_fund_tx_signature(
|
|
230
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
231
|
-
size_t count);
|
|
232
|
-
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_version(jsi::Runtime &rt,
|
|
233
|
-
const jsi::Value &thisVal,
|
|
234
|
-
const jsi::Value *args,
|
|
235
|
-
size_t count);
|
|
236
|
-
jsi::Value cpp_ffi_ddk_ffi_uniffi_contract_version(jsi::Runtime &rt,
|
|
237
|
-
const jsi::Value &thisVal,
|
|
238
|
-
const jsi::Value *args,
|
|
239
|
-
size_t count);
|
|
19
|
+
protected:
|
|
20
|
+
std::map<std::string,jsi::Value> props;
|
|
21
|
+
jsi::Value cpp_uniffi_internal_fn_func_ffi__string_to_byte_length(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
22
|
+
jsi::Value cpp_uniffi_internal_fn_func_ffi__string_to_arraybuffer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
23
|
+
jsi::Value cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
24
|
+
jsi::Value cpp_uniffi_ddk_ffi_fn_func_add_signature_to_transaction(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
25
|
+
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);
|
|
26
|
+
jsi::Value cpp_uniffi_ddk_ffi_fn_func_create_cet(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_points_from_oracle_info(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
28
|
+
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);
|
|
29
|
+
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);
|
|
30
|
+
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);
|
|
31
|
+
jsi::Value cpp_uniffi_ddk_ffi_fn_func_create_cets(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
32
|
+
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);
|
|
33
|
+
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);
|
|
34
|
+
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);
|
|
35
|
+
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);
|
|
36
|
+
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);
|
|
37
|
+
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);
|
|
38
|
+
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);
|
|
39
|
+
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);
|
|
40
|
+
jsi::Value cpp_uniffi_ddk_ffi_fn_func_get_cet_adaptor_signature_inputs(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
41
|
+
jsi::Value cpp_uniffi_ddk_ffi_fn_func_get_cet_sighash(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
42
|
+
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);
|
|
43
|
+
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);
|
|
44
|
+
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);
|
|
45
|
+
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);
|
|
46
|
+
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);
|
|
47
|
+
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);
|
|
48
|
+
jsi::Value cpp_uniffi_ddk_ffi_fn_func_sign_cet(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
49
|
+
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);
|
|
50
|
+
jsi::Value cpp_uniffi_ddk_ffi_fn_func_sign_multi_sig_input(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
51
|
+
jsi::Value cpp_uniffi_ddk_ffi_fn_func_verify_cet_adaptor_sig_from_oracle_info(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
52
|
+
jsi::Value cpp_uniffi_ddk_ffi_fn_func_verify_cet_adaptor_sigs_from_oracle_info(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
53
|
+
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);
|
|
54
|
+
jsi::Value cpp_uniffi_ddk_ffi_fn_func_version(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
55
|
+
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_add_signature_to_transaction(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
56
|
+
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);
|
|
57
|
+
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_cet(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
58
|
+
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_points_from_oracle_info(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
59
|
+
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);
|
|
60
|
+
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);
|
|
61
|
+
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);
|
|
62
|
+
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_create_cets(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
63
|
+
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);
|
|
64
|
+
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);
|
|
65
|
+
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);
|
|
66
|
+
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);
|
|
67
|
+
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);
|
|
68
|
+
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);
|
|
69
|
+
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);
|
|
70
|
+
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);
|
|
71
|
+
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_get_cet_adaptor_signature_inputs(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
72
|
+
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_get_cet_sighash(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
73
|
+
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);
|
|
74
|
+
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);
|
|
75
|
+
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);
|
|
76
|
+
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);
|
|
77
|
+
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);
|
|
78
|
+
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);
|
|
79
|
+
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_sign_cet(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
80
|
+
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);
|
|
81
|
+
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_sign_multi_sig_input(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
82
|
+
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_verify_cet_adaptor_sig_from_oracle_info(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
83
|
+
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_verify_cet_adaptor_sigs_from_oracle_info(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
84
|
+
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);
|
|
85
|
+
jsi::Value cpp_uniffi_ddk_ffi_checksum_func_version(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
86
|
+
jsi::Value cpp_ffi_ddk_ffi_uniffi_contract_version(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count);
|
|
240
87
|
|
|
241
|
-
public:
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
virtual ~NativeDdkFfi();
|
|
88
|
+
public:
|
|
89
|
+
NativeDdkFfi(jsi::Runtime &rt, std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker);
|
|
90
|
+
virtual ~NativeDdkFfi();
|
|
245
91
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
std::shared_ptr<react::CallInvoker> callInvoker);
|
|
92
|
+
/**
|
|
93
|
+
* The entry point into the crate.
|
|
94
|
+
*
|
|
95
|
+
* React Native must call `NativeDdkFfi.registerModule(rt, callInvoker)` before using
|
|
96
|
+
* the Javascript interface.
|
|
97
|
+
*/
|
|
98
|
+
static void registerModule(jsi::Runtime &rt, std::shared_ptr<react::CallInvoker> callInvoker);
|
|
254
99
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
*/
|
|
264
|
-
static void unregisterModule(jsi::Runtime &rt);
|
|
100
|
+
/**
|
|
101
|
+
* Some cleanup into the crate goes here.
|
|
102
|
+
*
|
|
103
|
+
* Current implementation is empty, however, this is not guaranteed to always be the case.
|
|
104
|
+
*
|
|
105
|
+
* Clients should call `NativeDdkFfi.unregisterModule(rt)` after final use where possible.
|
|
106
|
+
*/
|
|
107
|
+
static void unregisterModule(jsi::Runtime &rt);
|
|
265
108
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
virtual std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime &rt);
|
|
109
|
+
virtual jsi::Value get(jsi::Runtime& rt, const jsi::PropNameID& name);
|
|
110
|
+
virtual void set(jsi::Runtime& rt,const jsi::PropNameID& name,const jsi::Value& value);
|
|
111
|
+
virtual std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& rt);
|
|
270
112
|
};
|
package/ddk-ffi/Cargo.lock
CHANGED
|
@@ -267,9 +267,9 @@ checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32"
|
|
|
267
267
|
|
|
268
268
|
[[package]]
|
|
269
269
|
name = "ddk-dlc"
|
|
270
|
-
version = "1.0
|
|
270
|
+
version = "1.1.0"
|
|
271
271
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
272
|
-
checksum = "
|
|
272
|
+
checksum = "b84a9a9946895deaf49097d808bdafbaf9998323f20691aa4227161c13b32bc2"
|
|
273
273
|
dependencies = [
|
|
274
274
|
"bitcoin",
|
|
275
275
|
"miniscript",
|
|
@@ -280,7 +280,7 @@ dependencies = [
|
|
|
280
280
|
|
|
281
281
|
[[package]]
|
|
282
282
|
name = "ddk_ffi"
|
|
283
|
-
version = "0.3.
|
|
283
|
+
version = "0.3.39"
|
|
284
284
|
dependencies = [
|
|
285
285
|
"bip39",
|
|
286
286
|
"bitcoin",
|
package/ddk-ffi/Cargo.toml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "ddk_ffi"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.39"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
license = "MIT"
|
|
6
6
|
description = "rust-dlc language bindings"
|
|
@@ -16,7 +16,7 @@ crate-type = ["cdylib", "staticlib", "rlib"]
|
|
|
16
16
|
uniffi = { version = "0.29.4", features = ["cli"] }
|
|
17
17
|
# ddk-dlc = { path = "../../../ernest/dlcdevkit/dlc", features = ["use-serde"] }
|
|
18
18
|
# ddk-dlc = { git = "https://github.com/bennyhodl/dlcdevkit.git", branch = "master", features = ["use-serde"] }
|
|
19
|
-
ddk-dlc = { version = "1.0
|
|
19
|
+
ddk-dlc = { version = "1.1.0", features = ["use-serde"] }
|
|
20
20
|
bitcoin = "0.32.7"
|
|
21
21
|
thiserror = "2.0.12"
|
|
22
22
|
secp256k1-zkp = "0.11.0"
|
package/ddk-ffi/src/ddk_ffi.udl
CHANGED
|
@@ -43,9 +43,10 @@ namespace ddk_ffi {
|
|
|
43
43
|
u64 fee_rate,
|
|
44
44
|
u32 fund_lock_time,
|
|
45
45
|
u32 cet_lock_time,
|
|
46
|
-
u64 fund_output_serial_id
|
|
46
|
+
u64 fund_output_serial_id,
|
|
47
|
+
u8 contract_flags
|
|
47
48
|
);
|
|
48
|
-
|
|
49
|
+
|
|
49
50
|
[Throws=DLCError]
|
|
50
51
|
DlcTransactions create_spliced_dlc_transactions(
|
|
51
52
|
sequence<Payout> outcomes,
|
|
@@ -55,7 +56,8 @@ namespace ddk_ffi {
|
|
|
55
56
|
u64 fee_rate,
|
|
56
57
|
u32 fund_lock_time,
|
|
57
58
|
u32 cet_lock_time,
|
|
58
|
-
u64 fund_output_serial_id
|
|
59
|
+
u64 fund_output_serial_id,
|
|
60
|
+
u8 contract_flags
|
|
59
61
|
);
|
|
60
62
|
|
|
61
63
|
[Throws=DLCError]
|
package/ddk-ffi/src/lib.rs
CHANGED
|
@@ -385,6 +385,7 @@ pub fn create_dlc_transactions(
|
|
|
385
385
|
fund_lock_time: u32,
|
|
386
386
|
cet_lock_time: u32,
|
|
387
387
|
fund_output_serial_id: u64,
|
|
388
|
+
contract_flags: u8,
|
|
388
389
|
) -> Result<DlcTransactions, DLCError> {
|
|
389
390
|
// Convert UniFFI types to rust-dlc types
|
|
390
391
|
let rust_local_params = party_params_to_rust(&local_params)?;
|
|
@@ -409,6 +410,7 @@ pub fn create_dlc_transactions(
|
|
|
409
410
|
fund_lock_time,
|
|
410
411
|
cet_lock_time,
|
|
411
412
|
fund_output_serial_id,
|
|
413
|
+
contract_flags,
|
|
412
414
|
)
|
|
413
415
|
.map_err(DLCError::from)?;
|
|
414
416
|
|
|
@@ -426,6 +428,7 @@ pub fn create_spliced_dlc_transactions(
|
|
|
426
428
|
fund_lock_time: u32,
|
|
427
429
|
cet_lock_time: u32,
|
|
428
430
|
fund_output_serial_id: u64,
|
|
431
|
+
contract_flags: u8,
|
|
429
432
|
) -> Result<DlcTransactions, DLCError> {
|
|
430
433
|
// Convert UniFFI types to rust-dlc types
|
|
431
434
|
let rust_local_params = party_params_to_rust(&local_params)?;
|
|
@@ -450,6 +453,7 @@ pub fn create_spliced_dlc_transactions(
|
|
|
450
453
|
fund_lock_time,
|
|
451
454
|
cet_lock_time,
|
|
452
455
|
fund_output_serial_id,
|
|
456
|
+
contract_flags,
|
|
453
457
|
)
|
|
454
458
|
.map_err(DLCError::from)?;
|
|
455
459
|
|
|
@@ -1665,6 +1669,7 @@ mod tests {
|
|
|
1665
1669
|
10, // fund lock time
|
|
1666
1670
|
10, // cet lock time
|
|
1667
1671
|
0, // fund output serial id
|
|
1672
|
+
0, // contract flags
|
|
1668
1673
|
);
|
|
1669
1674
|
|
|
1670
1675
|
assert!(result.is_ok());
|
|
@@ -1993,6 +1998,7 @@ mod tests {
|
|
|
1993
1998
|
10,
|
|
1994
1999
|
10,
|
|
1995
2000
|
0,
|
|
2001
|
+
0,
|
|
1996
2002
|
)
|
|
1997
2003
|
.unwrap();
|
|
1998
2004
|
|
|
@@ -2151,7 +2157,8 @@ mod tests {
|
|
|
2151
2157
|
4,
|
|
2152
2158
|
10,
|
|
2153
2159
|
10,
|
|
2154
|
-
0,
|
|
2160
|
+
0,
|
|
2161
|
+
0,
|
|
2155
2162
|
)
|
|
2156
2163
|
.unwrap();
|
|
2157
2164
|
|
|
@@ -2276,6 +2283,7 @@ mod tests {
|
|
|
2276
2283
|
10,
|
|
2277
2284
|
10,
|
|
2278
2285
|
0,
|
|
2286
|
+
0,
|
|
2279
2287
|
)
|
|
2280
2288
|
.unwrap();
|
|
2281
2289
|
|
|
@@ -2334,6 +2342,7 @@ mod tests {
|
|
|
2334
2342
|
10,
|
|
2335
2343
|
10,
|
|
2336
2344
|
0,
|
|
2345
|
+
0,
|
|
2337
2346
|
)
|
|
2338
2347
|
.unwrap();
|
|
2339
2348
|
|
|
@@ -2466,6 +2475,7 @@ mod tests {
|
|
|
2466
2475
|
10,
|
|
2467
2476
|
10,
|
|
2468
2477
|
0,
|
|
2478
|
+
0,
|
|
2469
2479
|
)
|
|
2470
2480
|
.unwrap();
|
|
2471
2481
|
|
|
@@ -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;;AA6RA;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":[]}
|