cojson-core-rn 0.19.10
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/CojsonCoreRn.podspec +44 -0
- package/CojsonCoreRnFramework.xcframework/Info.plist +43 -0
- package/CojsonCoreRnFramework.xcframework/ios-arm64/libcojson_core_rn.a +0 -0
- package/CojsonCoreRnFramework.xcframework/ios-arm64-simulator/libcojson_core_rn.a +0 -0
- package/LICENSE.txt +19 -0
- package/README.md +50 -0
- package/android/CMakeLists.txt +76 -0
- package/android/build.gradle +144 -0
- package/android/cpp-adapter.cpp +43 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +5 -0
- package/android/src/main/java/com/cojsoncorern/CojsonCoreRnModule.kt +43 -0
- package/android/src/main/java/com/cojsoncorern/CojsonCoreRnPackage.kt +34 -0
- package/android/src/main/jniLibs/arm64-v8a/libcojson_core_rn.a +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libcojson_core_rn.a +0 -0
- package/android/src/main/jniLibs/x86/libcojson_core_rn.a +0 -0
- package/android/src/main/jniLibs/x86_64/libcojson_core_rn.a +0 -0
- package/cpp/cojson-core-rn.cpp +16 -0
- package/cpp/cojson-core-rn.h +15 -0
- package/cpp/generated/cojson_core_rn.cpp +3523 -0
- package/cpp/generated/cojson_core_rn.hpp +128 -0
- package/ios/CojsonCoreRn.h +16 -0
- package/ios/CojsonCoreRn.mm +66 -0
- package/lib/module/NativeCojsonCoreRn.js +7 -0
- package/lib/module/NativeCojsonCoreRn.js.map +1 -0
- package/lib/module/generated/cojson_core_rn-ffi.js +43 -0
- package/lib/module/generated/cojson_core_rn-ffi.js.map +1 -0
- package/lib/module/generated/cojson_core_rn.js +1311 -0
- package/lib/module/generated/cojson_core_rn.js.map +1 -0
- package/lib/module/index.js +43 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/NativeCojsonCoreRn.d.ts +8 -0
- package/lib/typescript/src/NativeCojsonCoreRn.d.ts.map +1 -0
- package/lib/typescript/src/generated/cojson_core_rn-ffi.d.ts +158 -0
- package/lib/typescript/src/generated/cojson_core_rn-ffi.d.ts.map +1 -0
- package/lib/typescript/src/generated/cojson_core_rn.d.ts +1299 -0
- package/lib/typescript/src/generated/cojson_core_rn.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +8 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/package.json +167 -0
- package/src/NativeCojsonCoreRn.ts +10 -0
- package/src/generated/cojson_core_rn-ffi.ts +429 -0
- package/src/generated/cojson_core_rn.ts +2342 -0
- package/src/index.tsx +41 -0
|
@@ -0,0 +1,3523 @@
|
|
|
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!
|
|
3
|
+
#include "cojson_core_rn.hpp"
|
|
4
|
+
|
|
5
|
+
#include "UniffiJsiTypes.h"
|
|
6
|
+
#include <stdexcept>
|
|
7
|
+
#include <map>
|
|
8
|
+
#include <utility>
|
|
9
|
+
#include <iostream>
|
|
10
|
+
#include <thread>
|
|
11
|
+
|
|
12
|
+
namespace react = facebook::react;
|
|
13
|
+
namespace jsi = facebook::jsi;
|
|
14
|
+
|
|
15
|
+
// Calling into Rust.
|
|
16
|
+
extern "C" {
|
|
17
|
+
typedef void
|
|
18
|
+
(*UniffiRustFutureContinuationCallback)(
|
|
19
|
+
uint64_t data,
|
|
20
|
+
int8_t poll_result
|
|
21
|
+
);
|
|
22
|
+
typedef void
|
|
23
|
+
(*UniffiForeignFutureFree)(
|
|
24
|
+
uint64_t handle
|
|
25
|
+
);
|
|
26
|
+
typedef void
|
|
27
|
+
(*UniffiCallbackInterfaceFree)(
|
|
28
|
+
uint64_t handle
|
|
29
|
+
);typedef struct UniffiForeignFuture {
|
|
30
|
+
uint64_t handle;
|
|
31
|
+
UniffiForeignFutureFree free;
|
|
32
|
+
} UniffiForeignFuture;typedef struct UniffiForeignFutureStructU8 {
|
|
33
|
+
uint8_t return_value;
|
|
34
|
+
RustCallStatus call_status;
|
|
35
|
+
} UniffiForeignFutureStructU8;
|
|
36
|
+
typedef void
|
|
37
|
+
(*UniffiForeignFutureCompleteU8)(
|
|
38
|
+
uint64_t callback_data,
|
|
39
|
+
UniffiForeignFutureStructU8 result
|
|
40
|
+
);typedef struct UniffiForeignFutureStructI8 {
|
|
41
|
+
int8_t return_value;
|
|
42
|
+
RustCallStatus call_status;
|
|
43
|
+
} UniffiForeignFutureStructI8;
|
|
44
|
+
typedef void
|
|
45
|
+
(*UniffiForeignFutureCompleteI8)(
|
|
46
|
+
uint64_t callback_data,
|
|
47
|
+
UniffiForeignFutureStructI8 result
|
|
48
|
+
);typedef struct UniffiForeignFutureStructU16 {
|
|
49
|
+
uint16_t return_value;
|
|
50
|
+
RustCallStatus call_status;
|
|
51
|
+
} UniffiForeignFutureStructU16;
|
|
52
|
+
typedef void
|
|
53
|
+
(*UniffiForeignFutureCompleteU16)(
|
|
54
|
+
uint64_t callback_data,
|
|
55
|
+
UniffiForeignFutureStructU16 result
|
|
56
|
+
);typedef struct UniffiForeignFutureStructI16 {
|
|
57
|
+
int16_t return_value;
|
|
58
|
+
RustCallStatus call_status;
|
|
59
|
+
} UniffiForeignFutureStructI16;
|
|
60
|
+
typedef void
|
|
61
|
+
(*UniffiForeignFutureCompleteI16)(
|
|
62
|
+
uint64_t callback_data,
|
|
63
|
+
UniffiForeignFutureStructI16 result
|
|
64
|
+
);typedef struct UniffiForeignFutureStructU32 {
|
|
65
|
+
uint32_t return_value;
|
|
66
|
+
RustCallStatus call_status;
|
|
67
|
+
} UniffiForeignFutureStructU32;
|
|
68
|
+
typedef void
|
|
69
|
+
(*UniffiForeignFutureCompleteU32)(
|
|
70
|
+
uint64_t callback_data,
|
|
71
|
+
UniffiForeignFutureStructU32 result
|
|
72
|
+
);typedef struct UniffiForeignFutureStructI32 {
|
|
73
|
+
int32_t return_value;
|
|
74
|
+
RustCallStatus call_status;
|
|
75
|
+
} UniffiForeignFutureStructI32;
|
|
76
|
+
typedef void
|
|
77
|
+
(*UniffiForeignFutureCompleteI32)(
|
|
78
|
+
uint64_t callback_data,
|
|
79
|
+
UniffiForeignFutureStructI32 result
|
|
80
|
+
);typedef struct UniffiForeignFutureStructU64 {
|
|
81
|
+
uint64_t return_value;
|
|
82
|
+
RustCallStatus call_status;
|
|
83
|
+
} UniffiForeignFutureStructU64;
|
|
84
|
+
typedef void
|
|
85
|
+
(*UniffiForeignFutureCompleteU64)(
|
|
86
|
+
uint64_t callback_data,
|
|
87
|
+
UniffiForeignFutureStructU64 result
|
|
88
|
+
);typedef struct UniffiForeignFutureStructI64 {
|
|
89
|
+
int64_t return_value;
|
|
90
|
+
RustCallStatus call_status;
|
|
91
|
+
} UniffiForeignFutureStructI64;
|
|
92
|
+
typedef void
|
|
93
|
+
(*UniffiForeignFutureCompleteI64)(
|
|
94
|
+
uint64_t callback_data,
|
|
95
|
+
UniffiForeignFutureStructI64 result
|
|
96
|
+
);typedef struct UniffiForeignFutureStructF32 {
|
|
97
|
+
float return_value;
|
|
98
|
+
RustCallStatus call_status;
|
|
99
|
+
} UniffiForeignFutureStructF32;
|
|
100
|
+
typedef void
|
|
101
|
+
(*UniffiForeignFutureCompleteF32)(
|
|
102
|
+
uint64_t callback_data,
|
|
103
|
+
UniffiForeignFutureStructF32 result
|
|
104
|
+
);typedef struct UniffiForeignFutureStructF64 {
|
|
105
|
+
double return_value;
|
|
106
|
+
RustCallStatus call_status;
|
|
107
|
+
} UniffiForeignFutureStructF64;
|
|
108
|
+
typedef void
|
|
109
|
+
(*UniffiForeignFutureCompleteF64)(
|
|
110
|
+
uint64_t callback_data,
|
|
111
|
+
UniffiForeignFutureStructF64 result
|
|
112
|
+
);typedef struct UniffiForeignFutureStructPointer {
|
|
113
|
+
void * return_value;
|
|
114
|
+
RustCallStatus call_status;
|
|
115
|
+
} UniffiForeignFutureStructPointer;
|
|
116
|
+
typedef void
|
|
117
|
+
(*UniffiForeignFutureCompletePointer)(
|
|
118
|
+
uint64_t callback_data,
|
|
119
|
+
UniffiForeignFutureStructPointer result
|
|
120
|
+
);typedef struct UniffiForeignFutureStructRustBuffer {
|
|
121
|
+
RustBuffer return_value;
|
|
122
|
+
RustCallStatus call_status;
|
|
123
|
+
} UniffiForeignFutureStructRustBuffer;
|
|
124
|
+
typedef void
|
|
125
|
+
(*UniffiForeignFutureCompleteRustBuffer)(
|
|
126
|
+
uint64_t callback_data,
|
|
127
|
+
UniffiForeignFutureStructRustBuffer result
|
|
128
|
+
);typedef struct UniffiForeignFutureStructVoid {
|
|
129
|
+
RustCallStatus call_status;
|
|
130
|
+
} UniffiForeignFutureStructVoid;
|
|
131
|
+
typedef void
|
|
132
|
+
(*UniffiForeignFutureCompleteVoid)(
|
|
133
|
+
uint64_t callback_data,
|
|
134
|
+
UniffiForeignFutureStructVoid result
|
|
135
|
+
);
|
|
136
|
+
void * uniffi_cojson_core_rn_fn_clone_blake3hasher(
|
|
137
|
+
void * ptr,
|
|
138
|
+
RustCallStatus *uniffi_out_err
|
|
139
|
+
);
|
|
140
|
+
void uniffi_cojson_core_rn_fn_free_blake3hasher(
|
|
141
|
+
void * ptr,
|
|
142
|
+
RustCallStatus *uniffi_out_err
|
|
143
|
+
);
|
|
144
|
+
void * uniffi_cojson_core_rn_fn_constructor_blake3hasher_new(RustCallStatus *uniffi_out_err
|
|
145
|
+
);
|
|
146
|
+
void * uniffi_cojson_core_rn_fn_method_blake3hasher_clone_hasher(
|
|
147
|
+
void * ptr,
|
|
148
|
+
RustCallStatus *uniffi_out_err
|
|
149
|
+
);
|
|
150
|
+
RustBuffer uniffi_cojson_core_rn_fn_method_blake3hasher_finalize(
|
|
151
|
+
void * ptr,
|
|
152
|
+
RustCallStatus *uniffi_out_err
|
|
153
|
+
);
|
|
154
|
+
void uniffi_cojson_core_rn_fn_method_blake3hasher_update(
|
|
155
|
+
void * ptr,
|
|
156
|
+
RustBuffer data,
|
|
157
|
+
RustCallStatus *uniffi_out_err
|
|
158
|
+
);
|
|
159
|
+
void * uniffi_cojson_core_rn_fn_clone_sessionlog(
|
|
160
|
+
void * ptr,
|
|
161
|
+
RustCallStatus *uniffi_out_err
|
|
162
|
+
);
|
|
163
|
+
void uniffi_cojson_core_rn_fn_free_sessionlog(
|
|
164
|
+
void * ptr,
|
|
165
|
+
RustCallStatus *uniffi_out_err
|
|
166
|
+
);
|
|
167
|
+
void * uniffi_cojson_core_rn_fn_constructor_sessionlog_new(
|
|
168
|
+
RustBuffer co_id,
|
|
169
|
+
RustBuffer session_id,
|
|
170
|
+
RustBuffer signer_id,
|
|
171
|
+
RustCallStatus *uniffi_out_err
|
|
172
|
+
);
|
|
173
|
+
RustBuffer uniffi_cojson_core_rn_fn_method_sessionlog_add_new_private_transaction(
|
|
174
|
+
void * ptr,
|
|
175
|
+
RustBuffer changes_json,
|
|
176
|
+
RustBuffer signer_secret,
|
|
177
|
+
RustBuffer encryption_key,
|
|
178
|
+
RustBuffer key_id,
|
|
179
|
+
double made_at,
|
|
180
|
+
RustBuffer meta,
|
|
181
|
+
RustCallStatus *uniffi_out_err
|
|
182
|
+
);
|
|
183
|
+
RustBuffer uniffi_cojson_core_rn_fn_method_sessionlog_add_new_trusting_transaction(
|
|
184
|
+
void * ptr,
|
|
185
|
+
RustBuffer changes_json,
|
|
186
|
+
RustBuffer signer_secret,
|
|
187
|
+
double made_at,
|
|
188
|
+
RustBuffer meta,
|
|
189
|
+
RustCallStatus *uniffi_out_err
|
|
190
|
+
);
|
|
191
|
+
void * uniffi_cojson_core_rn_fn_method_sessionlog_clone_session_log(
|
|
192
|
+
void * ptr,
|
|
193
|
+
RustCallStatus *uniffi_out_err
|
|
194
|
+
);
|
|
195
|
+
RustBuffer uniffi_cojson_core_rn_fn_method_sessionlog_decrypt_next_transaction_changes_json(
|
|
196
|
+
void * ptr,
|
|
197
|
+
uint32_t tx_index,
|
|
198
|
+
RustBuffer encryption_key,
|
|
199
|
+
RustCallStatus *uniffi_out_err
|
|
200
|
+
);
|
|
201
|
+
RustBuffer uniffi_cojson_core_rn_fn_method_sessionlog_decrypt_next_transaction_meta_json(
|
|
202
|
+
void * ptr,
|
|
203
|
+
uint32_t tx_index,
|
|
204
|
+
RustBuffer encryption_key,
|
|
205
|
+
RustCallStatus *uniffi_out_err
|
|
206
|
+
);
|
|
207
|
+
void uniffi_cojson_core_rn_fn_method_sessionlog_try_add(
|
|
208
|
+
void * ptr,
|
|
209
|
+
RustBuffer transactions_json,
|
|
210
|
+
RustBuffer new_signature_str,
|
|
211
|
+
int8_t skip_verify,
|
|
212
|
+
RustCallStatus *uniffi_out_err
|
|
213
|
+
);
|
|
214
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_blake3_hash_once(
|
|
215
|
+
RustBuffer data,
|
|
216
|
+
RustCallStatus *uniffi_out_err
|
|
217
|
+
);
|
|
218
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_blake3_hash_once_with_context(
|
|
219
|
+
RustBuffer data,
|
|
220
|
+
RustBuffer context,
|
|
221
|
+
RustCallStatus *uniffi_out_err
|
|
222
|
+
);
|
|
223
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_decrypt(
|
|
224
|
+
RustBuffer ciphertext,
|
|
225
|
+
RustBuffer key_secret,
|
|
226
|
+
RustBuffer nonce_material,
|
|
227
|
+
RustCallStatus *uniffi_out_err
|
|
228
|
+
);
|
|
229
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_decrypt_xsalsa20(
|
|
230
|
+
RustBuffer key,
|
|
231
|
+
RustBuffer nonce_material,
|
|
232
|
+
RustBuffer ciphertext,
|
|
233
|
+
RustCallStatus *uniffi_out_err
|
|
234
|
+
);
|
|
235
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_ed25519_sign(
|
|
236
|
+
RustBuffer signing_key,
|
|
237
|
+
RustBuffer message,
|
|
238
|
+
RustCallStatus *uniffi_out_err
|
|
239
|
+
);
|
|
240
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_ed25519_signature_from_bytes(
|
|
241
|
+
RustBuffer bytes,
|
|
242
|
+
RustCallStatus *uniffi_out_err
|
|
243
|
+
);
|
|
244
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_ed25519_signing_key_from_bytes(
|
|
245
|
+
RustBuffer bytes,
|
|
246
|
+
RustCallStatus *uniffi_out_err
|
|
247
|
+
);
|
|
248
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_ed25519_signing_key_sign(
|
|
249
|
+
RustBuffer signing_key,
|
|
250
|
+
RustBuffer message,
|
|
251
|
+
RustCallStatus *uniffi_out_err
|
|
252
|
+
);
|
|
253
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_ed25519_signing_key_to_public(
|
|
254
|
+
RustBuffer signing_key,
|
|
255
|
+
RustCallStatus *uniffi_out_err
|
|
256
|
+
);
|
|
257
|
+
int8_t uniffi_cojson_core_rn_fn_func_ed25519_verify(
|
|
258
|
+
RustBuffer verifying_key,
|
|
259
|
+
RustBuffer message,
|
|
260
|
+
RustBuffer signature,
|
|
261
|
+
RustCallStatus *uniffi_out_err
|
|
262
|
+
);
|
|
263
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_ed25519_verifying_key(
|
|
264
|
+
RustBuffer signing_key,
|
|
265
|
+
RustCallStatus *uniffi_out_err
|
|
266
|
+
);
|
|
267
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_ed25519_verifying_key_from_bytes(
|
|
268
|
+
RustBuffer bytes,
|
|
269
|
+
RustCallStatus *uniffi_out_err
|
|
270
|
+
);
|
|
271
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_encrypt(
|
|
272
|
+
RustBuffer value,
|
|
273
|
+
RustBuffer key_secret,
|
|
274
|
+
RustBuffer nonce_material,
|
|
275
|
+
RustCallStatus *uniffi_out_err
|
|
276
|
+
);
|
|
277
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_encrypt_xsalsa20(
|
|
278
|
+
RustBuffer key,
|
|
279
|
+
RustBuffer nonce_material,
|
|
280
|
+
RustBuffer plaintext,
|
|
281
|
+
RustCallStatus *uniffi_out_err
|
|
282
|
+
);
|
|
283
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_generate_nonce(
|
|
284
|
+
RustBuffer nonce_material,
|
|
285
|
+
RustCallStatus *uniffi_out_err
|
|
286
|
+
);
|
|
287
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_get_sealer_id(
|
|
288
|
+
RustBuffer secret,
|
|
289
|
+
RustCallStatus *uniffi_out_err
|
|
290
|
+
);
|
|
291
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_get_signer_id(
|
|
292
|
+
RustBuffer secret,
|
|
293
|
+
RustCallStatus *uniffi_out_err
|
|
294
|
+
);
|
|
295
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_new_ed25519_signing_key(RustCallStatus *uniffi_out_err
|
|
296
|
+
);
|
|
297
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_new_x25519_private_key(RustCallStatus *uniffi_out_err
|
|
298
|
+
);
|
|
299
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_seal(
|
|
300
|
+
RustBuffer message,
|
|
301
|
+
RustBuffer sender_secret,
|
|
302
|
+
RustBuffer recipient_id,
|
|
303
|
+
RustBuffer nonce_material,
|
|
304
|
+
RustCallStatus *uniffi_out_err
|
|
305
|
+
);
|
|
306
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_sign(
|
|
307
|
+
RustBuffer message,
|
|
308
|
+
RustBuffer secret,
|
|
309
|
+
RustCallStatus *uniffi_out_err
|
|
310
|
+
);
|
|
311
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_unseal(
|
|
312
|
+
RustBuffer sealed_message,
|
|
313
|
+
RustBuffer recipient_secret,
|
|
314
|
+
RustBuffer sender_id,
|
|
315
|
+
RustBuffer nonce_material,
|
|
316
|
+
RustCallStatus *uniffi_out_err
|
|
317
|
+
);
|
|
318
|
+
int8_t uniffi_cojson_core_rn_fn_func_verify(
|
|
319
|
+
RustBuffer signature,
|
|
320
|
+
RustBuffer message,
|
|
321
|
+
RustBuffer id,
|
|
322
|
+
RustCallStatus *uniffi_out_err
|
|
323
|
+
);
|
|
324
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_x25519_diffie_hellman(
|
|
325
|
+
RustBuffer private_key,
|
|
326
|
+
RustBuffer public_key,
|
|
327
|
+
RustCallStatus *uniffi_out_err
|
|
328
|
+
);
|
|
329
|
+
RustBuffer uniffi_cojson_core_rn_fn_func_x25519_public_key(
|
|
330
|
+
RustBuffer private_key,
|
|
331
|
+
RustCallStatus *uniffi_out_err
|
|
332
|
+
);
|
|
333
|
+
RustBuffer ffi_cojson_core_rn_rustbuffer_alloc(
|
|
334
|
+
uint64_t size,
|
|
335
|
+
RustCallStatus *uniffi_out_err
|
|
336
|
+
);
|
|
337
|
+
RustBuffer ffi_cojson_core_rn_rustbuffer_from_bytes(
|
|
338
|
+
ForeignBytes bytes,
|
|
339
|
+
RustCallStatus *uniffi_out_err
|
|
340
|
+
);
|
|
341
|
+
void ffi_cojson_core_rn_rustbuffer_free(
|
|
342
|
+
RustBuffer buf,
|
|
343
|
+
RustCallStatus *uniffi_out_err
|
|
344
|
+
);
|
|
345
|
+
RustBuffer ffi_cojson_core_rn_rustbuffer_reserve(
|
|
346
|
+
RustBuffer buf,
|
|
347
|
+
uint64_t additional,
|
|
348
|
+
RustCallStatus *uniffi_out_err
|
|
349
|
+
);
|
|
350
|
+
void ffi_cojson_core_rn_rust_future_poll_u8(
|
|
351
|
+
/*handle*/ uint64_t handle,
|
|
352
|
+
UniffiRustFutureContinuationCallback callback,
|
|
353
|
+
/*handle*/ uint64_t callback_data
|
|
354
|
+
);
|
|
355
|
+
void ffi_cojson_core_rn_rust_future_cancel_u8(
|
|
356
|
+
/*handle*/ uint64_t handle
|
|
357
|
+
);
|
|
358
|
+
void ffi_cojson_core_rn_rust_future_free_u8(
|
|
359
|
+
/*handle*/ uint64_t handle
|
|
360
|
+
);
|
|
361
|
+
uint8_t ffi_cojson_core_rn_rust_future_complete_u8(
|
|
362
|
+
/*handle*/ uint64_t handle,
|
|
363
|
+
RustCallStatus *uniffi_out_err
|
|
364
|
+
);
|
|
365
|
+
void ffi_cojson_core_rn_rust_future_poll_i8(
|
|
366
|
+
/*handle*/ uint64_t handle,
|
|
367
|
+
UniffiRustFutureContinuationCallback callback,
|
|
368
|
+
/*handle*/ uint64_t callback_data
|
|
369
|
+
);
|
|
370
|
+
void ffi_cojson_core_rn_rust_future_cancel_i8(
|
|
371
|
+
/*handle*/ uint64_t handle
|
|
372
|
+
);
|
|
373
|
+
void ffi_cojson_core_rn_rust_future_free_i8(
|
|
374
|
+
/*handle*/ uint64_t handle
|
|
375
|
+
);
|
|
376
|
+
int8_t ffi_cojson_core_rn_rust_future_complete_i8(
|
|
377
|
+
/*handle*/ uint64_t handle,
|
|
378
|
+
RustCallStatus *uniffi_out_err
|
|
379
|
+
);
|
|
380
|
+
void ffi_cojson_core_rn_rust_future_poll_u16(
|
|
381
|
+
/*handle*/ uint64_t handle,
|
|
382
|
+
UniffiRustFutureContinuationCallback callback,
|
|
383
|
+
/*handle*/ uint64_t callback_data
|
|
384
|
+
);
|
|
385
|
+
void ffi_cojson_core_rn_rust_future_cancel_u16(
|
|
386
|
+
/*handle*/ uint64_t handle
|
|
387
|
+
);
|
|
388
|
+
void ffi_cojson_core_rn_rust_future_free_u16(
|
|
389
|
+
/*handle*/ uint64_t handle
|
|
390
|
+
);
|
|
391
|
+
uint16_t ffi_cojson_core_rn_rust_future_complete_u16(
|
|
392
|
+
/*handle*/ uint64_t handle,
|
|
393
|
+
RustCallStatus *uniffi_out_err
|
|
394
|
+
);
|
|
395
|
+
void ffi_cojson_core_rn_rust_future_poll_i16(
|
|
396
|
+
/*handle*/ uint64_t handle,
|
|
397
|
+
UniffiRustFutureContinuationCallback callback,
|
|
398
|
+
/*handle*/ uint64_t callback_data
|
|
399
|
+
);
|
|
400
|
+
void ffi_cojson_core_rn_rust_future_cancel_i16(
|
|
401
|
+
/*handle*/ uint64_t handle
|
|
402
|
+
);
|
|
403
|
+
void ffi_cojson_core_rn_rust_future_free_i16(
|
|
404
|
+
/*handle*/ uint64_t handle
|
|
405
|
+
);
|
|
406
|
+
int16_t ffi_cojson_core_rn_rust_future_complete_i16(
|
|
407
|
+
/*handle*/ uint64_t handle,
|
|
408
|
+
RustCallStatus *uniffi_out_err
|
|
409
|
+
);
|
|
410
|
+
void ffi_cojson_core_rn_rust_future_poll_u32(
|
|
411
|
+
/*handle*/ uint64_t handle,
|
|
412
|
+
UniffiRustFutureContinuationCallback callback,
|
|
413
|
+
/*handle*/ uint64_t callback_data
|
|
414
|
+
);
|
|
415
|
+
void ffi_cojson_core_rn_rust_future_cancel_u32(
|
|
416
|
+
/*handle*/ uint64_t handle
|
|
417
|
+
);
|
|
418
|
+
void ffi_cojson_core_rn_rust_future_free_u32(
|
|
419
|
+
/*handle*/ uint64_t handle
|
|
420
|
+
);
|
|
421
|
+
uint32_t ffi_cojson_core_rn_rust_future_complete_u32(
|
|
422
|
+
/*handle*/ uint64_t handle,
|
|
423
|
+
RustCallStatus *uniffi_out_err
|
|
424
|
+
);
|
|
425
|
+
void ffi_cojson_core_rn_rust_future_poll_i32(
|
|
426
|
+
/*handle*/ uint64_t handle,
|
|
427
|
+
UniffiRustFutureContinuationCallback callback,
|
|
428
|
+
/*handle*/ uint64_t callback_data
|
|
429
|
+
);
|
|
430
|
+
void ffi_cojson_core_rn_rust_future_cancel_i32(
|
|
431
|
+
/*handle*/ uint64_t handle
|
|
432
|
+
);
|
|
433
|
+
void ffi_cojson_core_rn_rust_future_free_i32(
|
|
434
|
+
/*handle*/ uint64_t handle
|
|
435
|
+
);
|
|
436
|
+
int32_t ffi_cojson_core_rn_rust_future_complete_i32(
|
|
437
|
+
/*handle*/ uint64_t handle,
|
|
438
|
+
RustCallStatus *uniffi_out_err
|
|
439
|
+
);
|
|
440
|
+
void ffi_cojson_core_rn_rust_future_poll_u64(
|
|
441
|
+
/*handle*/ uint64_t handle,
|
|
442
|
+
UniffiRustFutureContinuationCallback callback,
|
|
443
|
+
/*handle*/ uint64_t callback_data
|
|
444
|
+
);
|
|
445
|
+
void ffi_cojson_core_rn_rust_future_cancel_u64(
|
|
446
|
+
/*handle*/ uint64_t handle
|
|
447
|
+
);
|
|
448
|
+
void ffi_cojson_core_rn_rust_future_free_u64(
|
|
449
|
+
/*handle*/ uint64_t handle
|
|
450
|
+
);
|
|
451
|
+
uint64_t ffi_cojson_core_rn_rust_future_complete_u64(
|
|
452
|
+
/*handle*/ uint64_t handle,
|
|
453
|
+
RustCallStatus *uniffi_out_err
|
|
454
|
+
);
|
|
455
|
+
void ffi_cojson_core_rn_rust_future_poll_i64(
|
|
456
|
+
/*handle*/ uint64_t handle,
|
|
457
|
+
UniffiRustFutureContinuationCallback callback,
|
|
458
|
+
/*handle*/ uint64_t callback_data
|
|
459
|
+
);
|
|
460
|
+
void ffi_cojson_core_rn_rust_future_cancel_i64(
|
|
461
|
+
/*handle*/ uint64_t handle
|
|
462
|
+
);
|
|
463
|
+
void ffi_cojson_core_rn_rust_future_free_i64(
|
|
464
|
+
/*handle*/ uint64_t handle
|
|
465
|
+
);
|
|
466
|
+
int64_t ffi_cojson_core_rn_rust_future_complete_i64(
|
|
467
|
+
/*handle*/ uint64_t handle,
|
|
468
|
+
RustCallStatus *uniffi_out_err
|
|
469
|
+
);
|
|
470
|
+
void ffi_cojson_core_rn_rust_future_poll_f32(
|
|
471
|
+
/*handle*/ uint64_t handle,
|
|
472
|
+
UniffiRustFutureContinuationCallback callback,
|
|
473
|
+
/*handle*/ uint64_t callback_data
|
|
474
|
+
);
|
|
475
|
+
void ffi_cojson_core_rn_rust_future_cancel_f32(
|
|
476
|
+
/*handle*/ uint64_t handle
|
|
477
|
+
);
|
|
478
|
+
void ffi_cojson_core_rn_rust_future_free_f32(
|
|
479
|
+
/*handle*/ uint64_t handle
|
|
480
|
+
);
|
|
481
|
+
float ffi_cojson_core_rn_rust_future_complete_f32(
|
|
482
|
+
/*handle*/ uint64_t handle,
|
|
483
|
+
RustCallStatus *uniffi_out_err
|
|
484
|
+
);
|
|
485
|
+
void ffi_cojson_core_rn_rust_future_poll_f64(
|
|
486
|
+
/*handle*/ uint64_t handle,
|
|
487
|
+
UniffiRustFutureContinuationCallback callback,
|
|
488
|
+
/*handle*/ uint64_t callback_data
|
|
489
|
+
);
|
|
490
|
+
void ffi_cojson_core_rn_rust_future_cancel_f64(
|
|
491
|
+
/*handle*/ uint64_t handle
|
|
492
|
+
);
|
|
493
|
+
void ffi_cojson_core_rn_rust_future_free_f64(
|
|
494
|
+
/*handle*/ uint64_t handle
|
|
495
|
+
);
|
|
496
|
+
double ffi_cojson_core_rn_rust_future_complete_f64(
|
|
497
|
+
/*handle*/ uint64_t handle,
|
|
498
|
+
RustCallStatus *uniffi_out_err
|
|
499
|
+
);
|
|
500
|
+
void ffi_cojson_core_rn_rust_future_poll_pointer(
|
|
501
|
+
/*handle*/ uint64_t handle,
|
|
502
|
+
UniffiRustFutureContinuationCallback callback,
|
|
503
|
+
/*handle*/ uint64_t callback_data
|
|
504
|
+
);
|
|
505
|
+
void ffi_cojson_core_rn_rust_future_cancel_pointer(
|
|
506
|
+
/*handle*/ uint64_t handle
|
|
507
|
+
);
|
|
508
|
+
void ffi_cojson_core_rn_rust_future_free_pointer(
|
|
509
|
+
/*handle*/ uint64_t handle
|
|
510
|
+
);
|
|
511
|
+
void * ffi_cojson_core_rn_rust_future_complete_pointer(
|
|
512
|
+
/*handle*/ uint64_t handle,
|
|
513
|
+
RustCallStatus *uniffi_out_err
|
|
514
|
+
);
|
|
515
|
+
void ffi_cojson_core_rn_rust_future_poll_rust_buffer(
|
|
516
|
+
/*handle*/ uint64_t handle,
|
|
517
|
+
UniffiRustFutureContinuationCallback callback,
|
|
518
|
+
/*handle*/ uint64_t callback_data
|
|
519
|
+
);
|
|
520
|
+
void ffi_cojson_core_rn_rust_future_cancel_rust_buffer(
|
|
521
|
+
/*handle*/ uint64_t handle
|
|
522
|
+
);
|
|
523
|
+
void ffi_cojson_core_rn_rust_future_free_rust_buffer(
|
|
524
|
+
/*handle*/ uint64_t handle
|
|
525
|
+
);
|
|
526
|
+
RustBuffer ffi_cojson_core_rn_rust_future_complete_rust_buffer(
|
|
527
|
+
/*handle*/ uint64_t handle,
|
|
528
|
+
RustCallStatus *uniffi_out_err
|
|
529
|
+
);
|
|
530
|
+
void ffi_cojson_core_rn_rust_future_poll_void(
|
|
531
|
+
/*handle*/ uint64_t handle,
|
|
532
|
+
UniffiRustFutureContinuationCallback callback,
|
|
533
|
+
/*handle*/ uint64_t callback_data
|
|
534
|
+
);
|
|
535
|
+
void ffi_cojson_core_rn_rust_future_cancel_void(
|
|
536
|
+
/*handle*/ uint64_t handle
|
|
537
|
+
);
|
|
538
|
+
void ffi_cojson_core_rn_rust_future_free_void(
|
|
539
|
+
/*handle*/ uint64_t handle
|
|
540
|
+
);
|
|
541
|
+
void ffi_cojson_core_rn_rust_future_complete_void(
|
|
542
|
+
/*handle*/ uint64_t handle,
|
|
543
|
+
RustCallStatus *uniffi_out_err
|
|
544
|
+
);
|
|
545
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_blake3_hash_once(
|
|
546
|
+
);
|
|
547
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_blake3_hash_once_with_context(
|
|
548
|
+
);
|
|
549
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_decrypt(
|
|
550
|
+
);
|
|
551
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_decrypt_xsalsa20(
|
|
552
|
+
);
|
|
553
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_ed25519_sign(
|
|
554
|
+
);
|
|
555
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_ed25519_signature_from_bytes(
|
|
556
|
+
);
|
|
557
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_ed25519_signing_key_from_bytes(
|
|
558
|
+
);
|
|
559
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_ed25519_signing_key_sign(
|
|
560
|
+
);
|
|
561
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_ed25519_signing_key_to_public(
|
|
562
|
+
);
|
|
563
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_ed25519_verify(
|
|
564
|
+
);
|
|
565
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_ed25519_verifying_key(
|
|
566
|
+
);
|
|
567
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_ed25519_verifying_key_from_bytes(
|
|
568
|
+
);
|
|
569
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_encrypt(
|
|
570
|
+
);
|
|
571
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_encrypt_xsalsa20(
|
|
572
|
+
);
|
|
573
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_generate_nonce(
|
|
574
|
+
);
|
|
575
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_get_sealer_id(
|
|
576
|
+
);
|
|
577
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_get_signer_id(
|
|
578
|
+
);
|
|
579
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_new_ed25519_signing_key(
|
|
580
|
+
);
|
|
581
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_new_x25519_private_key(
|
|
582
|
+
);
|
|
583
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_seal(
|
|
584
|
+
);
|
|
585
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_sign(
|
|
586
|
+
);
|
|
587
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_unseal(
|
|
588
|
+
);
|
|
589
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_verify(
|
|
590
|
+
);
|
|
591
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_x25519_diffie_hellman(
|
|
592
|
+
);
|
|
593
|
+
uint16_t uniffi_cojson_core_rn_checksum_func_x25519_public_key(
|
|
594
|
+
);
|
|
595
|
+
uint16_t uniffi_cojson_core_rn_checksum_method_blake3hasher_clone_hasher(
|
|
596
|
+
);
|
|
597
|
+
uint16_t uniffi_cojson_core_rn_checksum_method_blake3hasher_finalize(
|
|
598
|
+
);
|
|
599
|
+
uint16_t uniffi_cojson_core_rn_checksum_method_blake3hasher_update(
|
|
600
|
+
);
|
|
601
|
+
uint16_t uniffi_cojson_core_rn_checksum_method_sessionlog_add_new_private_transaction(
|
|
602
|
+
);
|
|
603
|
+
uint16_t uniffi_cojson_core_rn_checksum_method_sessionlog_add_new_trusting_transaction(
|
|
604
|
+
);
|
|
605
|
+
uint16_t uniffi_cojson_core_rn_checksum_method_sessionlog_clone_session_log(
|
|
606
|
+
);
|
|
607
|
+
uint16_t uniffi_cojson_core_rn_checksum_method_sessionlog_decrypt_next_transaction_changes_json(
|
|
608
|
+
);
|
|
609
|
+
uint16_t uniffi_cojson_core_rn_checksum_method_sessionlog_decrypt_next_transaction_meta_json(
|
|
610
|
+
);
|
|
611
|
+
uint16_t uniffi_cojson_core_rn_checksum_method_sessionlog_try_add(
|
|
612
|
+
);
|
|
613
|
+
uint16_t uniffi_cojson_core_rn_checksum_constructor_blake3hasher_new(
|
|
614
|
+
);
|
|
615
|
+
uint16_t uniffi_cojson_core_rn_checksum_constructor_sessionlog_new(
|
|
616
|
+
);
|
|
617
|
+
uint32_t ffi_cojson_core_rn_uniffi_contract_version(
|
|
618
|
+
);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
namespace uniffi::cojson_core_rn {
|
|
623
|
+
template <typename T> struct Bridging;
|
|
624
|
+
|
|
625
|
+
using namespace facebook;
|
|
626
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
627
|
+
|
|
628
|
+
template <typename T> struct Bridging<ReferenceHolder<T>> {
|
|
629
|
+
static jsi::Value jsNew(jsi::Runtime &rt) {
|
|
630
|
+
auto holder = jsi::Object(rt);
|
|
631
|
+
return holder;
|
|
632
|
+
}
|
|
633
|
+
static T fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
|
|
634
|
+
const jsi::Value &value) {
|
|
635
|
+
auto obj = value.asObject(rt);
|
|
636
|
+
if (obj.hasProperty(rt, "pointee")) {
|
|
637
|
+
auto pointee = obj.getProperty(rt, "pointee");
|
|
638
|
+
return uniffi::cojson_core_rn::Bridging<T>::fromJs(rt, callInvoker, pointee);
|
|
639
|
+
}
|
|
640
|
+
throw jsi::JSError(
|
|
641
|
+
rt,
|
|
642
|
+
"Expected ReferenceHolder to have a pointee property. This is likely a bug in uniffi-bindgen-react-native"
|
|
643
|
+
);
|
|
644
|
+
}
|
|
645
|
+
};
|
|
646
|
+
} // namespace uniffi::cojson_core_rn
|
|
647
|
+
namespace uniffi::cojson_core_rn {
|
|
648
|
+
using namespace facebook;
|
|
649
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
650
|
+
|
|
651
|
+
template <> struct Bridging<RustBuffer> {
|
|
652
|
+
static RustBuffer rustbuffer_alloc(int32_t size) {
|
|
653
|
+
RustCallStatus status = { UNIFFI_CALL_STATUS_OK };
|
|
654
|
+
return ffi_cojson_core_rn_rustbuffer_alloc(
|
|
655
|
+
size,
|
|
656
|
+
&status
|
|
657
|
+
);
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
static void rustbuffer_free(RustBuffer buf) {
|
|
661
|
+
RustCallStatus status = { UNIFFI_CALL_STATUS_OK };
|
|
662
|
+
ffi_cojson_core_rn_rustbuffer_free(
|
|
663
|
+
buf,
|
|
664
|
+
&status
|
|
665
|
+
);
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
static RustBuffer rustbuffer_from_bytes(ForeignBytes bytes) {
|
|
669
|
+
RustCallStatus status = { UNIFFI_CALL_STATUS_OK };
|
|
670
|
+
return ffi_cojson_core_rn_rustbuffer_from_bytes(
|
|
671
|
+
bytes,
|
|
672
|
+
&status
|
|
673
|
+
);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
static RustBuffer fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker>,
|
|
677
|
+
const jsi::Value &value) {
|
|
678
|
+
try {
|
|
679
|
+
auto buffer = uniffi_jsi::Bridging<jsi::ArrayBuffer>::value_to_arraybuffer(rt, value);
|
|
680
|
+
auto bytes = ForeignBytes{
|
|
681
|
+
.len = static_cast<int32_t>(buffer.length(rt)),
|
|
682
|
+
.data = buffer.data(rt),
|
|
683
|
+
};
|
|
684
|
+
|
|
685
|
+
// This buffer is constructed from foreign bytes. Rust scaffolding copies
|
|
686
|
+
// the bytes, to make the RustBuffer.
|
|
687
|
+
auto buf = rustbuffer_from_bytes(bytes);
|
|
688
|
+
// Once it leaves this function, the buffer is immediately passed back
|
|
689
|
+
// into Rust, where it's used to deserialize into the Rust versions of the
|
|
690
|
+
// arguments. At that point, the copy is destroyed.
|
|
691
|
+
return buf;
|
|
692
|
+
} catch (const std::logic_error &e) {
|
|
693
|
+
throw jsi::JSError(rt, e.what());
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker>,
|
|
698
|
+
RustBuffer buf) {
|
|
699
|
+
// We need to make a copy of the bytes from Rust's memory space into
|
|
700
|
+
// Javascripts memory space. We need to do this because the two languages
|
|
701
|
+
// manages memory very differently: a garbage collector needs to track all
|
|
702
|
+
// the memory at runtime, Rust is doing it all closer to compile time.
|
|
703
|
+
uint8_t *bytes = new uint8_t[buf.len];
|
|
704
|
+
std::memcpy(bytes, buf.data, buf.len);
|
|
705
|
+
|
|
706
|
+
// Construct an ArrayBuffer with copy of the bytes from the RustBuffer.
|
|
707
|
+
auto payload = std::make_shared<uniffi_jsi::CMutableBuffer>(
|
|
708
|
+
uniffi_jsi::CMutableBuffer((uint8_t *)bytes, buf.len));
|
|
709
|
+
auto arrayBuffer = jsi::ArrayBuffer(rt, payload);
|
|
710
|
+
|
|
711
|
+
// Once we have a Javascript version, we no longer need the Rust version, so
|
|
712
|
+
// we can call into Rust to tell it it's okay to free that memory.
|
|
713
|
+
rustbuffer_free(buf);
|
|
714
|
+
|
|
715
|
+
// Finally, return the ArrayBuffer.
|
|
716
|
+
return uniffi_jsi::Bridging<jsi::ArrayBuffer>::arraybuffer_to_value(rt, arrayBuffer);;
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
|
|
720
|
+
} // namespace uniffi::cojson_core_rn
|
|
721
|
+
|
|
722
|
+
namespace uniffi::cojson_core_rn {
|
|
723
|
+
using namespace facebook;
|
|
724
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
725
|
+
|
|
726
|
+
template <> struct Bridging<RustCallStatus> {
|
|
727
|
+
static jsi::Value jsSuccess(jsi::Runtime &rt) {
|
|
728
|
+
auto statusObject = jsi::Object(rt);
|
|
729
|
+
statusObject.setProperty(rt, "code", jsi::Value(rt, UNIFFI_CALL_STATUS_OK));
|
|
730
|
+
return statusObject;
|
|
731
|
+
}
|
|
732
|
+
static RustCallStatus rustSuccess(jsi::Runtime &rt) {
|
|
733
|
+
return {UNIFFI_CALL_STATUS_OK};
|
|
734
|
+
}
|
|
735
|
+
static void copyIntoJs(jsi::Runtime &rt,
|
|
736
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
737
|
+
const RustCallStatus status,
|
|
738
|
+
const jsi::Value &jsStatus) {
|
|
739
|
+
auto statusObject = jsStatus.asObject(rt);
|
|
740
|
+
if (status.error_buf.data != nullptr) {
|
|
741
|
+
auto rbuf = Bridging<RustBuffer>::toJs(rt, callInvoker,
|
|
742
|
+
status.error_buf);
|
|
743
|
+
statusObject.setProperty(rt, "errorBuf", rbuf);
|
|
744
|
+
}
|
|
745
|
+
if (status.code != UNIFFI_CALL_STATUS_OK) {
|
|
746
|
+
auto code =
|
|
747
|
+
uniffi_jsi::Bridging<uint8_t>::toJs(rt, callInvoker, status.code);
|
|
748
|
+
statusObject.setProperty(rt, "code", code);
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
static RustCallStatus fromJs(jsi::Runtime &rt,
|
|
753
|
+
std::shared_ptr<CallInvoker> invoker,
|
|
754
|
+
const jsi::Value &jsStatus) {
|
|
755
|
+
RustCallStatus status;
|
|
756
|
+
auto statusObject = jsStatus.asObject(rt);
|
|
757
|
+
if (statusObject.hasProperty(rt, "errorBuf")) {
|
|
758
|
+
auto rbuf = statusObject.getProperty(rt, "errorBuf");
|
|
759
|
+
status.error_buf =
|
|
760
|
+
Bridging<RustBuffer>::fromJs(rt, invoker, rbuf);
|
|
761
|
+
}
|
|
762
|
+
if (statusObject.hasProperty(rt, "code")) {
|
|
763
|
+
auto code = statusObject.getProperty(rt, "code");
|
|
764
|
+
status.code = uniffi_jsi::Bridging<uint8_t>::fromJs(rt, invoker, code);
|
|
765
|
+
}
|
|
766
|
+
return status;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
static void copyFromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> invoker,
|
|
770
|
+
const jsi::Value &jsStatus, RustCallStatus *status) {
|
|
771
|
+
auto statusObject = jsStatus.asObject(rt);
|
|
772
|
+
if (statusObject.hasProperty(rt, "errorBuf")) {
|
|
773
|
+
auto rbuf = statusObject.getProperty(rt, "errorBuf");
|
|
774
|
+
status->error_buf =
|
|
775
|
+
Bridging<RustBuffer>::fromJs(rt, invoker, rbuf);
|
|
776
|
+
}
|
|
777
|
+
if (statusObject.hasProperty(rt, "code")) {
|
|
778
|
+
auto code = statusObject.getProperty(rt, "code");
|
|
779
|
+
status->code = uniffi_jsi::Bridging<uint8_t>::fromJs(rt, invoker, code);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
};
|
|
783
|
+
|
|
784
|
+
} // namespace uniffi::cojson_core_rn
|
|
785
|
+
// In other uniffi bindings, it is assumed that the foreign language holds on
|
|
786
|
+
// to the vtable, which the Rust just gets a pointer to.
|
|
787
|
+
// Here, we need to hold on to them, but also be able to clear them at just the
|
|
788
|
+
// right time so we can support hot-reloading.
|
|
789
|
+
namespace uniffi::cojson_core_rn::registry {
|
|
790
|
+
template <typename T>
|
|
791
|
+
class VTableHolder {
|
|
792
|
+
public:
|
|
793
|
+
T vtable;
|
|
794
|
+
VTableHolder(T v) : vtable(v) {}
|
|
795
|
+
};
|
|
796
|
+
|
|
797
|
+
// Mutex to bind the storage and setting of vtable together.
|
|
798
|
+
// We declare it here, but the lock is taken by callers of the putTable
|
|
799
|
+
// method who are also sending a pointer to Rust.
|
|
800
|
+
static std::mutex vtableMutex;
|
|
801
|
+
|
|
802
|
+
// Registry to hold all vtables so they persist even when JS objects are GC'd.
|
|
803
|
+
// The only reason this exists is to prevent a dangling pointer in the
|
|
804
|
+
// Rust machinery: i.e. we don't need to access or write to this registry
|
|
805
|
+
// after startup.
|
|
806
|
+
// Registry to hold all vtables so they persist even when JS objects are GC'd.
|
|
807
|
+
// Maps string identifiers to vtable holders using type erasure
|
|
808
|
+
static std::unordered_map<std::string, std::shared_ptr<void>> vtableRegistry;
|
|
809
|
+
|
|
810
|
+
// Add a vtable to the registry with an identifier
|
|
811
|
+
template <typename T>
|
|
812
|
+
static T* putTable(std::string_view identifier, T vtable) {
|
|
813
|
+
auto holder = std::make_shared<VTableHolder<T>>(vtable);
|
|
814
|
+
// Store the raw pointer to the vtable before type erasure
|
|
815
|
+
T* rawPtr = &(holder->vtable);
|
|
816
|
+
// Store the holder using type erasure with the string identifier
|
|
817
|
+
vtableRegistry[std::string(identifier)] = std::shared_ptr<void>(holder);
|
|
818
|
+
return rawPtr;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
// Clear the registry.
|
|
822
|
+
//
|
|
823
|
+
// Conceptually, this is called after teardown of the module (i.e. after
|
|
824
|
+
// teardown of the jsi::Runtime). However, because Rust is dropping callbacks
|
|
825
|
+
// because the Runtime is being torn down, we must keep the registry intact
|
|
826
|
+
// until after the runtime goes away.
|
|
827
|
+
//
|
|
828
|
+
// Therefore, in practice we should call this when the next runtime is
|
|
829
|
+
// being stood up.
|
|
830
|
+
static void clearRegistry() {
|
|
831
|
+
std::lock_guard<std::mutex> lock(vtableMutex);
|
|
832
|
+
vtableRegistry.clear();
|
|
833
|
+
}
|
|
834
|
+
} // namespace uniffi::cojson_core_rn::registry
|
|
835
|
+
|
|
836
|
+
// This calls into Rust.
|
|
837
|
+
// Implementation of callback function calling from Rust to JS RustFutureContinuationCallback
|
|
838
|
+
|
|
839
|
+
// Callback function: uniffi::cojson_core_rn::cb::rustfuturecontinuationcallback::UniffiRustFutureContinuationCallback
|
|
840
|
+
//
|
|
841
|
+
// We have the following constraints:
|
|
842
|
+
// - we need to pass a function pointer to Rust.
|
|
843
|
+
// - we need a jsi::Runtime and jsi::Function to call into JS.
|
|
844
|
+
// - function pointers can't store state, so we can't use a lamda.
|
|
845
|
+
//
|
|
846
|
+
// For this, we store a lambda as a global, as `rsLambda`. The `callback` function calls
|
|
847
|
+
// the lambda, which itself calls the `body` which then calls into JS.
|
|
848
|
+
//
|
|
849
|
+
// We then give the `callback` function pointer to Rust which will call the lambda sometime in the
|
|
850
|
+
// future.
|
|
851
|
+
namespace uniffi::cojson_core_rn::cb::rustfuturecontinuationcallback {
|
|
852
|
+
using namespace facebook;
|
|
853
|
+
|
|
854
|
+
// We need to store a lambda in a global so we can call it from
|
|
855
|
+
// a function pointer. The function pointer is passed to Rust.
|
|
856
|
+
static std::function<void(uint64_t, int8_t)> rsLambda = nullptr;
|
|
857
|
+
|
|
858
|
+
// This is the main body of the callback. It's called from the lambda,
|
|
859
|
+
// which itself is called from the callback function which is passed to Rust.
|
|
860
|
+
static void body(jsi::Runtime &rt,
|
|
861
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
862
|
+
std::shared_ptr<jsi::Value> callbackValue
|
|
863
|
+
,uint64_t rs_data
|
|
864
|
+
,int8_t rs_pollResult) {
|
|
865
|
+
|
|
866
|
+
// Convert the arguments from Rust, into jsi::Values.
|
|
867
|
+
// We'll use the Bridging class to do this…
|
|
868
|
+
auto js_data = uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_data);
|
|
869
|
+
auto js_pollResult = uniffi_jsi::Bridging<int8_t>::toJs(rt, callInvoker, rs_pollResult);
|
|
870
|
+
|
|
871
|
+
// Now we are ready to call the callback.
|
|
872
|
+
// We are already on the JS thread, because this `body` function was
|
|
873
|
+
// invoked from the CallInvoker.
|
|
874
|
+
try {
|
|
875
|
+
// Getting the callback function
|
|
876
|
+
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
877
|
+
auto uniffiResult = cb.call(rt, js_data, js_pollResult
|
|
878
|
+
);
|
|
879
|
+
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
} catch (const jsi::JSError &error) {
|
|
884
|
+
std::cout << "Error in callback UniffiRustFutureContinuationCallback: "
|
|
885
|
+
<< error.what() << std::endl;
|
|
886
|
+
throw error;
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
static void callback(uint64_t rs_data, int8_t rs_pollResult) {
|
|
891
|
+
// If the runtime has shutdown, then there is no point in trying to
|
|
892
|
+
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
893
|
+
//
|
|
894
|
+
// Answer: the module destructor calls into callback `cleanup` method,
|
|
895
|
+
// which nulls out the rsLamda.
|
|
896
|
+
//
|
|
897
|
+
// If rsLamda is null, then there is no runtime to call into.
|
|
898
|
+
if (rsLambda == nullptr) {
|
|
899
|
+
// This only occurs when destructors are calling into Rust free/drop,
|
|
900
|
+
// which causes the JS callback to be dropped.
|
|
901
|
+
return;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
905
|
+
// are all in the lambda.
|
|
906
|
+
rsLambda(
|
|
907
|
+
rs_data,
|
|
908
|
+
rs_pollResult);
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
static UniffiRustFutureContinuationCallback
|
|
912
|
+
makeCallbackFunction( // uniffi::cojson_core_rn::cb::rustfuturecontinuationcallback
|
|
913
|
+
jsi::Runtime &rt,
|
|
914
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
915
|
+
const jsi::Value &value) {
|
|
916
|
+
if (rsLambda != nullptr) {
|
|
917
|
+
// `makeCallbackFunction` is called in two circumstances:
|
|
918
|
+
//
|
|
919
|
+
// 1. at startup, when initializing callback interface vtables.
|
|
920
|
+
// 2. when polling futures. This happens at least once per future that is
|
|
921
|
+
// exposed to Javascript. We know that this is always the same function,
|
|
922
|
+
// `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
|
|
923
|
+
//
|
|
924
|
+
// We can therefore return the callback function without making anything
|
|
925
|
+
// new if we've been initialized already.
|
|
926
|
+
return callback;
|
|
927
|
+
}
|
|
928
|
+
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
929
|
+
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
930
|
+
rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_data, int8_t rs_pollResult) {
|
|
931
|
+
// We immediately make a lambda which will do the work of transforming the
|
|
932
|
+
// arguments into JSI values and calling the callback.
|
|
933
|
+
uniffi_runtime::UniffiCallFunc jsLambda = [
|
|
934
|
+
callInvoker,
|
|
935
|
+
callbackValue
|
|
936
|
+
, rs_data
|
|
937
|
+
, rs_pollResult](jsi::Runtime &rt) mutable {
|
|
938
|
+
body(rt, callInvoker, callbackValue
|
|
939
|
+
, rs_data
|
|
940
|
+
, rs_pollResult);
|
|
941
|
+
};
|
|
942
|
+
// We'll then call that lambda from the callInvoker which will
|
|
943
|
+
// look after calling it on the correct thread.
|
|
944
|
+
|
|
945
|
+
callInvoker->invokeNonBlocking(rt, jsLambda);
|
|
946
|
+
};
|
|
947
|
+
return callback;
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
// This method is called from the destructor of NativeCojsonCoreRn, which only happens
|
|
951
|
+
// when the jsi::Runtime is being destroyed.
|
|
952
|
+
static void cleanup() {
|
|
953
|
+
// The lambda holds a reference to the the Runtime, so when this is nulled out,
|
|
954
|
+
// then the pointer will no longer be left dangling.
|
|
955
|
+
rsLambda = nullptr;
|
|
956
|
+
}
|
|
957
|
+
} // namespace uniffi::cojson_core_rn::cb::rustfuturecontinuationcallback
|
|
958
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureFree,
|
|
959
|
+
// passed from Rust to JS as part of async callbacks.
|
|
960
|
+
namespace uniffi::cojson_core_rn {
|
|
961
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
962
|
+
|
|
963
|
+
template <> struct Bridging<UniffiForeignFutureFree> {
|
|
964
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureFree rsCallback) {
|
|
965
|
+
return jsi::Function::createFromHostFunction(
|
|
966
|
+
rt,
|
|
967
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureFree"),
|
|
968
|
+
1,
|
|
969
|
+
[rsCallback, callInvoker](
|
|
970
|
+
jsi::Runtime &rt,
|
|
971
|
+
const jsi::Value &thisValue,
|
|
972
|
+
const jsi::Value *arguments,
|
|
973
|
+
size_t count) -> jsi::Value
|
|
974
|
+
{
|
|
975
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
976
|
+
}
|
|
977
|
+
);
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
static jsi::Value intoRust(
|
|
981
|
+
jsi::Runtime &rt,
|
|
982
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
983
|
+
const jsi::Value &thisValue,
|
|
984
|
+
const jsi::Value *args,
|
|
985
|
+
size_t count,
|
|
986
|
+
UniffiForeignFutureFree func) {
|
|
987
|
+
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
988
|
+
// then call the rs_callback with those arguments.
|
|
989
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0])
|
|
990
|
+
);
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
return jsi::Value::undefined();
|
|
994
|
+
}
|
|
995
|
+
};
|
|
996
|
+
} // namespace uniffi::cojson_core_rn
|
|
997
|
+
// Implementation of free callback function CallbackInterfaceFree
|
|
998
|
+
|
|
999
|
+
|
|
1000
|
+
// Callback function: uniffi::cojson_core_rn::st::foreignfuture::foreignfuture::free::UniffiCallbackInterfaceFree
|
|
1001
|
+
//
|
|
1002
|
+
// We have the following constraints:
|
|
1003
|
+
// - we need to pass a function pointer to Rust.
|
|
1004
|
+
// - we need a jsi::Runtime and jsi::Function to call into JS.
|
|
1005
|
+
// - function pointers can't store state, so we can't use a lamda.
|
|
1006
|
+
//
|
|
1007
|
+
// For this, we store a lambda as a global, as `rsLambda`. The `callback` function calls
|
|
1008
|
+
// the lambda, which itself calls the `body` which then calls into JS.
|
|
1009
|
+
//
|
|
1010
|
+
// We then give the `callback` function pointer to Rust which will call the lambda sometime in the
|
|
1011
|
+
// future.
|
|
1012
|
+
namespace uniffi::cojson_core_rn::st::foreignfuture::foreignfuture::free {
|
|
1013
|
+
using namespace facebook;
|
|
1014
|
+
|
|
1015
|
+
// We need to store a lambda in a global so we can call it from
|
|
1016
|
+
// a function pointer. The function pointer is passed to Rust.
|
|
1017
|
+
static std::function<void(uint64_t)> rsLambda = nullptr;
|
|
1018
|
+
|
|
1019
|
+
// This is the main body of the callback. It's called from the lambda,
|
|
1020
|
+
// which itself is called from the callback function which is passed to Rust.
|
|
1021
|
+
static void body(jsi::Runtime &rt,
|
|
1022
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
1023
|
+
std::shared_ptr<jsi::Value> callbackValue
|
|
1024
|
+
,uint64_t rs_handle) {
|
|
1025
|
+
|
|
1026
|
+
// Convert the arguments from Rust, into jsi::Values.
|
|
1027
|
+
// We'll use the Bridging class to do this…
|
|
1028
|
+
auto js_handle = uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_handle);
|
|
1029
|
+
|
|
1030
|
+
// Now we are ready to call the callback.
|
|
1031
|
+
// We are already on the JS thread, because this `body` function was
|
|
1032
|
+
// invoked from the CallInvoker.
|
|
1033
|
+
try {
|
|
1034
|
+
// Getting the callback function
|
|
1035
|
+
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
1036
|
+
auto uniffiResult = cb.call(rt, js_handle
|
|
1037
|
+
);
|
|
1038
|
+
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
} catch (const jsi::JSError &error) {
|
|
1043
|
+
std::cout << "Error in callback UniffiCallbackInterfaceFree: "
|
|
1044
|
+
<< error.what() << std::endl;
|
|
1045
|
+
throw error;
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
static void callback(uint64_t rs_handle) {
|
|
1050
|
+
// If the runtime has shutdown, then there is no point in trying to
|
|
1051
|
+
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
1052
|
+
//
|
|
1053
|
+
// Answer: the module destructor calls into callback `cleanup` method,
|
|
1054
|
+
// which nulls out the rsLamda.
|
|
1055
|
+
//
|
|
1056
|
+
// If rsLamda is null, then there is no runtime to call into.
|
|
1057
|
+
if (rsLambda == nullptr) {
|
|
1058
|
+
// This only occurs when destructors are calling into Rust free/drop,
|
|
1059
|
+
// which causes the JS callback to be dropped.
|
|
1060
|
+
return;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
1064
|
+
// are all in the lambda.
|
|
1065
|
+
rsLambda(
|
|
1066
|
+
rs_handle);
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
static UniffiCallbackInterfaceFree
|
|
1070
|
+
makeCallbackFunction( // uniffi::cojson_core_rn::st::foreignfuture::foreignfuture::free
|
|
1071
|
+
jsi::Runtime &rt,
|
|
1072
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
1073
|
+
const jsi::Value &value) {
|
|
1074
|
+
if (rsLambda != nullptr) {
|
|
1075
|
+
// `makeCallbackFunction` is called in two circumstances:
|
|
1076
|
+
//
|
|
1077
|
+
// 1. at startup, when initializing callback interface vtables.
|
|
1078
|
+
// 2. when polling futures. This happens at least once per future that is
|
|
1079
|
+
// exposed to Javascript. We know that this is always the same function,
|
|
1080
|
+
// `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
|
|
1081
|
+
//
|
|
1082
|
+
// We can therefore return the callback function without making anything
|
|
1083
|
+
// new if we've been initialized already.
|
|
1084
|
+
return callback;
|
|
1085
|
+
}
|
|
1086
|
+
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
1087
|
+
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
1088
|
+
rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle) {
|
|
1089
|
+
// We immediately make a lambda which will do the work of transforming the
|
|
1090
|
+
// arguments into JSI values and calling the callback.
|
|
1091
|
+
uniffi_runtime::UniffiCallFunc jsLambda = [
|
|
1092
|
+
callInvoker,
|
|
1093
|
+
callbackValue
|
|
1094
|
+
, rs_handle](jsi::Runtime &rt) mutable {
|
|
1095
|
+
body(rt, callInvoker, callbackValue
|
|
1096
|
+
, rs_handle);
|
|
1097
|
+
};
|
|
1098
|
+
// We'll then call that lambda from the callInvoker which will
|
|
1099
|
+
// look after calling it on the correct thread.
|
|
1100
|
+
|
|
1101
|
+
callInvoker->invokeNonBlocking(rt, jsLambda);
|
|
1102
|
+
};
|
|
1103
|
+
return callback;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
// This method is called from the destructor of NativeCojsonCoreRn, which only happens
|
|
1107
|
+
// when the jsi::Runtime is being destroyed.
|
|
1108
|
+
static void cleanup() {
|
|
1109
|
+
// The lambda holds a reference to the the Runtime, so when this is nulled out,
|
|
1110
|
+
// then the pointer will no longer be left dangling.
|
|
1111
|
+
rsLambda = nullptr;
|
|
1112
|
+
}
|
|
1113
|
+
} // namespace uniffi::cojson_core_rn::st::foreignfuture::foreignfuture::free
|
|
1114
|
+
namespace uniffi::cojson_core_rn {
|
|
1115
|
+
using namespace facebook;
|
|
1116
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1117
|
+
|
|
1118
|
+
template <> struct Bridging<UniffiForeignFuture> {
|
|
1119
|
+
static UniffiForeignFuture fromJs(jsi::Runtime &rt,
|
|
1120
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1121
|
+
const jsi::Value &jsValue
|
|
1122
|
+
) {
|
|
1123
|
+
// Check if the input is an object
|
|
1124
|
+
if (!jsValue.isObject()) {
|
|
1125
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFuture");
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
// Get the object from the jsi::Value
|
|
1129
|
+
auto jsObject = jsValue.getObject(rt);
|
|
1130
|
+
|
|
1131
|
+
// Create the vtable struct
|
|
1132
|
+
UniffiForeignFuture rsObject;
|
|
1133
|
+
|
|
1134
|
+
// Create the vtable from the js callbacks.
|
|
1135
|
+
rsObject.handle = uniffi_jsi::Bridging<uint64_t>::fromJs(
|
|
1136
|
+
rt, callInvoker,
|
|
1137
|
+
jsObject.getProperty(rt, "handle")
|
|
1138
|
+
);
|
|
1139
|
+
rsObject.free = uniffi::cojson_core_rn::st::foreignfuture::foreignfuture::free::makeCallbackFunction(
|
|
1140
|
+
rt, callInvoker, jsObject.getProperty(rt, "free")
|
|
1141
|
+
);
|
|
1142
|
+
|
|
1143
|
+
return rsObject;
|
|
1144
|
+
}
|
|
1145
|
+
};
|
|
1146
|
+
|
|
1147
|
+
} // namespace uniffi::cojson_core_rn
|
|
1148
|
+
namespace uniffi::cojson_core_rn {
|
|
1149
|
+
using namespace facebook;
|
|
1150
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1151
|
+
|
|
1152
|
+
template <> struct Bridging<UniffiForeignFutureStructU8> {
|
|
1153
|
+
static UniffiForeignFutureStructU8 fromJs(jsi::Runtime &rt,
|
|
1154
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1155
|
+
const jsi::Value &jsValue
|
|
1156
|
+
) {
|
|
1157
|
+
// Check if the input is an object
|
|
1158
|
+
if (!jsValue.isObject()) {
|
|
1159
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructU8");
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
// Get the object from the jsi::Value
|
|
1163
|
+
auto jsObject = jsValue.getObject(rt);
|
|
1164
|
+
|
|
1165
|
+
// Create the vtable struct
|
|
1166
|
+
UniffiForeignFutureStructU8 rsObject;
|
|
1167
|
+
|
|
1168
|
+
// Create the vtable from the js callbacks.
|
|
1169
|
+
rsObject.return_value = uniffi_jsi::Bridging<uint8_t>::fromJs(
|
|
1170
|
+
rt, callInvoker,
|
|
1171
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1172
|
+
);
|
|
1173
|
+
rsObject.call_status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::fromJs(
|
|
1174
|
+
rt, callInvoker,
|
|
1175
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1176
|
+
);
|
|
1177
|
+
|
|
1178
|
+
return rsObject;
|
|
1179
|
+
}
|
|
1180
|
+
};
|
|
1181
|
+
|
|
1182
|
+
} // namespace uniffi::cojson_core_rn
|
|
1183
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteU8,
|
|
1184
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1185
|
+
namespace uniffi::cojson_core_rn {
|
|
1186
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1187
|
+
|
|
1188
|
+
template <> struct Bridging<UniffiForeignFutureCompleteU8> {
|
|
1189
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteU8 rsCallback) {
|
|
1190
|
+
return jsi::Function::createFromHostFunction(
|
|
1191
|
+
rt,
|
|
1192
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteU8"),
|
|
1193
|
+
2,
|
|
1194
|
+
[rsCallback, callInvoker](
|
|
1195
|
+
jsi::Runtime &rt,
|
|
1196
|
+
const jsi::Value &thisValue,
|
|
1197
|
+
const jsi::Value *arguments,
|
|
1198
|
+
size_t count) -> jsi::Value
|
|
1199
|
+
{
|
|
1200
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1201
|
+
}
|
|
1202
|
+
);
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
static jsi::Value intoRust(
|
|
1206
|
+
jsi::Runtime &rt,
|
|
1207
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1208
|
+
const jsi::Value &thisValue,
|
|
1209
|
+
const jsi::Value *args,
|
|
1210
|
+
size_t count,
|
|
1211
|
+
UniffiForeignFutureCompleteU8 func) {
|
|
1212
|
+
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1213
|
+
// then call the rs_callback with those arguments.
|
|
1214
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<UniffiForeignFutureStructU8>::fromJs(rt, callInvoker, args[1])
|
|
1215
|
+
);
|
|
1216
|
+
|
|
1217
|
+
|
|
1218
|
+
return jsi::Value::undefined();
|
|
1219
|
+
}
|
|
1220
|
+
};
|
|
1221
|
+
} // namespace uniffi::cojson_core_rn
|
|
1222
|
+
namespace uniffi::cojson_core_rn {
|
|
1223
|
+
using namespace facebook;
|
|
1224
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1225
|
+
|
|
1226
|
+
template <> struct Bridging<UniffiForeignFutureStructI8> {
|
|
1227
|
+
static UniffiForeignFutureStructI8 fromJs(jsi::Runtime &rt,
|
|
1228
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1229
|
+
const jsi::Value &jsValue
|
|
1230
|
+
) {
|
|
1231
|
+
// Check if the input is an object
|
|
1232
|
+
if (!jsValue.isObject()) {
|
|
1233
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructI8");
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
// Get the object from the jsi::Value
|
|
1237
|
+
auto jsObject = jsValue.getObject(rt);
|
|
1238
|
+
|
|
1239
|
+
// Create the vtable struct
|
|
1240
|
+
UniffiForeignFutureStructI8 rsObject;
|
|
1241
|
+
|
|
1242
|
+
// Create the vtable from the js callbacks.
|
|
1243
|
+
rsObject.return_value = uniffi_jsi::Bridging<int8_t>::fromJs(
|
|
1244
|
+
rt, callInvoker,
|
|
1245
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1246
|
+
);
|
|
1247
|
+
rsObject.call_status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::fromJs(
|
|
1248
|
+
rt, callInvoker,
|
|
1249
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1250
|
+
);
|
|
1251
|
+
|
|
1252
|
+
return rsObject;
|
|
1253
|
+
}
|
|
1254
|
+
};
|
|
1255
|
+
|
|
1256
|
+
} // namespace uniffi::cojson_core_rn
|
|
1257
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteI8,
|
|
1258
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1259
|
+
namespace uniffi::cojson_core_rn {
|
|
1260
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1261
|
+
|
|
1262
|
+
template <> struct Bridging<UniffiForeignFutureCompleteI8> {
|
|
1263
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteI8 rsCallback) {
|
|
1264
|
+
return jsi::Function::createFromHostFunction(
|
|
1265
|
+
rt,
|
|
1266
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteI8"),
|
|
1267
|
+
2,
|
|
1268
|
+
[rsCallback, callInvoker](
|
|
1269
|
+
jsi::Runtime &rt,
|
|
1270
|
+
const jsi::Value &thisValue,
|
|
1271
|
+
const jsi::Value *arguments,
|
|
1272
|
+
size_t count) -> jsi::Value
|
|
1273
|
+
{
|
|
1274
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1275
|
+
}
|
|
1276
|
+
);
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
static jsi::Value intoRust(
|
|
1280
|
+
jsi::Runtime &rt,
|
|
1281
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1282
|
+
const jsi::Value &thisValue,
|
|
1283
|
+
const jsi::Value *args,
|
|
1284
|
+
size_t count,
|
|
1285
|
+
UniffiForeignFutureCompleteI8 func) {
|
|
1286
|
+
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1287
|
+
// then call the rs_callback with those arguments.
|
|
1288
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<UniffiForeignFutureStructI8>::fromJs(rt, callInvoker, args[1])
|
|
1289
|
+
);
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
return jsi::Value::undefined();
|
|
1293
|
+
}
|
|
1294
|
+
};
|
|
1295
|
+
} // namespace uniffi::cojson_core_rn
|
|
1296
|
+
namespace uniffi::cojson_core_rn {
|
|
1297
|
+
using namespace facebook;
|
|
1298
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1299
|
+
|
|
1300
|
+
template <> struct Bridging<UniffiForeignFutureStructU16> {
|
|
1301
|
+
static UniffiForeignFutureStructU16 fromJs(jsi::Runtime &rt,
|
|
1302
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1303
|
+
const jsi::Value &jsValue
|
|
1304
|
+
) {
|
|
1305
|
+
// Check if the input is an object
|
|
1306
|
+
if (!jsValue.isObject()) {
|
|
1307
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructU16");
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
// Get the object from the jsi::Value
|
|
1311
|
+
auto jsObject = jsValue.getObject(rt);
|
|
1312
|
+
|
|
1313
|
+
// Create the vtable struct
|
|
1314
|
+
UniffiForeignFutureStructU16 rsObject;
|
|
1315
|
+
|
|
1316
|
+
// Create the vtable from the js callbacks.
|
|
1317
|
+
rsObject.return_value = uniffi_jsi::Bridging<uint16_t>::fromJs(
|
|
1318
|
+
rt, callInvoker,
|
|
1319
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1320
|
+
);
|
|
1321
|
+
rsObject.call_status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::fromJs(
|
|
1322
|
+
rt, callInvoker,
|
|
1323
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1324
|
+
);
|
|
1325
|
+
|
|
1326
|
+
return rsObject;
|
|
1327
|
+
}
|
|
1328
|
+
};
|
|
1329
|
+
|
|
1330
|
+
} // namespace uniffi::cojson_core_rn
|
|
1331
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteU16,
|
|
1332
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1333
|
+
namespace uniffi::cojson_core_rn {
|
|
1334
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1335
|
+
|
|
1336
|
+
template <> struct Bridging<UniffiForeignFutureCompleteU16> {
|
|
1337
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteU16 rsCallback) {
|
|
1338
|
+
return jsi::Function::createFromHostFunction(
|
|
1339
|
+
rt,
|
|
1340
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteU16"),
|
|
1341
|
+
2,
|
|
1342
|
+
[rsCallback, callInvoker](
|
|
1343
|
+
jsi::Runtime &rt,
|
|
1344
|
+
const jsi::Value &thisValue,
|
|
1345
|
+
const jsi::Value *arguments,
|
|
1346
|
+
size_t count) -> jsi::Value
|
|
1347
|
+
{
|
|
1348
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1349
|
+
}
|
|
1350
|
+
);
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
static jsi::Value intoRust(
|
|
1354
|
+
jsi::Runtime &rt,
|
|
1355
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1356
|
+
const jsi::Value &thisValue,
|
|
1357
|
+
const jsi::Value *args,
|
|
1358
|
+
size_t count,
|
|
1359
|
+
UniffiForeignFutureCompleteU16 func) {
|
|
1360
|
+
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1361
|
+
// then call the rs_callback with those arguments.
|
|
1362
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<UniffiForeignFutureStructU16>::fromJs(rt, callInvoker, args[1])
|
|
1363
|
+
);
|
|
1364
|
+
|
|
1365
|
+
|
|
1366
|
+
return jsi::Value::undefined();
|
|
1367
|
+
}
|
|
1368
|
+
};
|
|
1369
|
+
} // namespace uniffi::cojson_core_rn
|
|
1370
|
+
namespace uniffi::cojson_core_rn {
|
|
1371
|
+
using namespace facebook;
|
|
1372
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1373
|
+
|
|
1374
|
+
template <> struct Bridging<UniffiForeignFutureStructI16> {
|
|
1375
|
+
static UniffiForeignFutureStructI16 fromJs(jsi::Runtime &rt,
|
|
1376
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1377
|
+
const jsi::Value &jsValue
|
|
1378
|
+
) {
|
|
1379
|
+
// Check if the input is an object
|
|
1380
|
+
if (!jsValue.isObject()) {
|
|
1381
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructI16");
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
// Get the object from the jsi::Value
|
|
1385
|
+
auto jsObject = jsValue.getObject(rt);
|
|
1386
|
+
|
|
1387
|
+
// Create the vtable struct
|
|
1388
|
+
UniffiForeignFutureStructI16 rsObject;
|
|
1389
|
+
|
|
1390
|
+
// Create the vtable from the js callbacks.
|
|
1391
|
+
rsObject.return_value = uniffi_jsi::Bridging<int16_t>::fromJs(
|
|
1392
|
+
rt, callInvoker,
|
|
1393
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1394
|
+
);
|
|
1395
|
+
rsObject.call_status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::fromJs(
|
|
1396
|
+
rt, callInvoker,
|
|
1397
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1398
|
+
);
|
|
1399
|
+
|
|
1400
|
+
return rsObject;
|
|
1401
|
+
}
|
|
1402
|
+
};
|
|
1403
|
+
|
|
1404
|
+
} // namespace uniffi::cojson_core_rn
|
|
1405
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteI16,
|
|
1406
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1407
|
+
namespace uniffi::cojson_core_rn {
|
|
1408
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1409
|
+
|
|
1410
|
+
template <> struct Bridging<UniffiForeignFutureCompleteI16> {
|
|
1411
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteI16 rsCallback) {
|
|
1412
|
+
return jsi::Function::createFromHostFunction(
|
|
1413
|
+
rt,
|
|
1414
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteI16"),
|
|
1415
|
+
2,
|
|
1416
|
+
[rsCallback, callInvoker](
|
|
1417
|
+
jsi::Runtime &rt,
|
|
1418
|
+
const jsi::Value &thisValue,
|
|
1419
|
+
const jsi::Value *arguments,
|
|
1420
|
+
size_t count) -> jsi::Value
|
|
1421
|
+
{
|
|
1422
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1423
|
+
}
|
|
1424
|
+
);
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
static jsi::Value intoRust(
|
|
1428
|
+
jsi::Runtime &rt,
|
|
1429
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1430
|
+
const jsi::Value &thisValue,
|
|
1431
|
+
const jsi::Value *args,
|
|
1432
|
+
size_t count,
|
|
1433
|
+
UniffiForeignFutureCompleteI16 func) {
|
|
1434
|
+
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1435
|
+
// then call the rs_callback with those arguments.
|
|
1436
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<UniffiForeignFutureStructI16>::fromJs(rt, callInvoker, args[1])
|
|
1437
|
+
);
|
|
1438
|
+
|
|
1439
|
+
|
|
1440
|
+
return jsi::Value::undefined();
|
|
1441
|
+
}
|
|
1442
|
+
};
|
|
1443
|
+
} // namespace uniffi::cojson_core_rn
|
|
1444
|
+
namespace uniffi::cojson_core_rn {
|
|
1445
|
+
using namespace facebook;
|
|
1446
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1447
|
+
|
|
1448
|
+
template <> struct Bridging<UniffiForeignFutureStructU32> {
|
|
1449
|
+
static UniffiForeignFutureStructU32 fromJs(jsi::Runtime &rt,
|
|
1450
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1451
|
+
const jsi::Value &jsValue
|
|
1452
|
+
) {
|
|
1453
|
+
// Check if the input is an object
|
|
1454
|
+
if (!jsValue.isObject()) {
|
|
1455
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructU32");
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
// Get the object from the jsi::Value
|
|
1459
|
+
auto jsObject = jsValue.getObject(rt);
|
|
1460
|
+
|
|
1461
|
+
// Create the vtable struct
|
|
1462
|
+
UniffiForeignFutureStructU32 rsObject;
|
|
1463
|
+
|
|
1464
|
+
// Create the vtable from the js callbacks.
|
|
1465
|
+
rsObject.return_value = uniffi_jsi::Bridging<uint32_t>::fromJs(
|
|
1466
|
+
rt, callInvoker,
|
|
1467
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1468
|
+
);
|
|
1469
|
+
rsObject.call_status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::fromJs(
|
|
1470
|
+
rt, callInvoker,
|
|
1471
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1472
|
+
);
|
|
1473
|
+
|
|
1474
|
+
return rsObject;
|
|
1475
|
+
}
|
|
1476
|
+
};
|
|
1477
|
+
|
|
1478
|
+
} // namespace uniffi::cojson_core_rn
|
|
1479
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteU32,
|
|
1480
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1481
|
+
namespace uniffi::cojson_core_rn {
|
|
1482
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1483
|
+
|
|
1484
|
+
template <> struct Bridging<UniffiForeignFutureCompleteU32> {
|
|
1485
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteU32 rsCallback) {
|
|
1486
|
+
return jsi::Function::createFromHostFunction(
|
|
1487
|
+
rt,
|
|
1488
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteU32"),
|
|
1489
|
+
2,
|
|
1490
|
+
[rsCallback, callInvoker](
|
|
1491
|
+
jsi::Runtime &rt,
|
|
1492
|
+
const jsi::Value &thisValue,
|
|
1493
|
+
const jsi::Value *arguments,
|
|
1494
|
+
size_t count) -> jsi::Value
|
|
1495
|
+
{
|
|
1496
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1497
|
+
}
|
|
1498
|
+
);
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
static jsi::Value intoRust(
|
|
1502
|
+
jsi::Runtime &rt,
|
|
1503
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1504
|
+
const jsi::Value &thisValue,
|
|
1505
|
+
const jsi::Value *args,
|
|
1506
|
+
size_t count,
|
|
1507
|
+
UniffiForeignFutureCompleteU32 func) {
|
|
1508
|
+
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1509
|
+
// then call the rs_callback with those arguments.
|
|
1510
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<UniffiForeignFutureStructU32>::fromJs(rt, callInvoker, args[1])
|
|
1511
|
+
);
|
|
1512
|
+
|
|
1513
|
+
|
|
1514
|
+
return jsi::Value::undefined();
|
|
1515
|
+
}
|
|
1516
|
+
};
|
|
1517
|
+
} // namespace uniffi::cojson_core_rn
|
|
1518
|
+
namespace uniffi::cojson_core_rn {
|
|
1519
|
+
using namespace facebook;
|
|
1520
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1521
|
+
|
|
1522
|
+
template <> struct Bridging<UniffiForeignFutureStructI32> {
|
|
1523
|
+
static UniffiForeignFutureStructI32 fromJs(jsi::Runtime &rt,
|
|
1524
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1525
|
+
const jsi::Value &jsValue
|
|
1526
|
+
) {
|
|
1527
|
+
// Check if the input is an object
|
|
1528
|
+
if (!jsValue.isObject()) {
|
|
1529
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructI32");
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
// Get the object from the jsi::Value
|
|
1533
|
+
auto jsObject = jsValue.getObject(rt);
|
|
1534
|
+
|
|
1535
|
+
// Create the vtable struct
|
|
1536
|
+
UniffiForeignFutureStructI32 rsObject;
|
|
1537
|
+
|
|
1538
|
+
// Create the vtable from the js callbacks.
|
|
1539
|
+
rsObject.return_value = uniffi_jsi::Bridging<int32_t>::fromJs(
|
|
1540
|
+
rt, callInvoker,
|
|
1541
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1542
|
+
);
|
|
1543
|
+
rsObject.call_status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::fromJs(
|
|
1544
|
+
rt, callInvoker,
|
|
1545
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1546
|
+
);
|
|
1547
|
+
|
|
1548
|
+
return rsObject;
|
|
1549
|
+
}
|
|
1550
|
+
};
|
|
1551
|
+
|
|
1552
|
+
} // namespace uniffi::cojson_core_rn
|
|
1553
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteI32,
|
|
1554
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1555
|
+
namespace uniffi::cojson_core_rn {
|
|
1556
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1557
|
+
|
|
1558
|
+
template <> struct Bridging<UniffiForeignFutureCompleteI32> {
|
|
1559
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteI32 rsCallback) {
|
|
1560
|
+
return jsi::Function::createFromHostFunction(
|
|
1561
|
+
rt,
|
|
1562
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteI32"),
|
|
1563
|
+
2,
|
|
1564
|
+
[rsCallback, callInvoker](
|
|
1565
|
+
jsi::Runtime &rt,
|
|
1566
|
+
const jsi::Value &thisValue,
|
|
1567
|
+
const jsi::Value *arguments,
|
|
1568
|
+
size_t count) -> jsi::Value
|
|
1569
|
+
{
|
|
1570
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1571
|
+
}
|
|
1572
|
+
);
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
static jsi::Value intoRust(
|
|
1576
|
+
jsi::Runtime &rt,
|
|
1577
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1578
|
+
const jsi::Value &thisValue,
|
|
1579
|
+
const jsi::Value *args,
|
|
1580
|
+
size_t count,
|
|
1581
|
+
UniffiForeignFutureCompleteI32 func) {
|
|
1582
|
+
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1583
|
+
// then call the rs_callback with those arguments.
|
|
1584
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<UniffiForeignFutureStructI32>::fromJs(rt, callInvoker, args[1])
|
|
1585
|
+
);
|
|
1586
|
+
|
|
1587
|
+
|
|
1588
|
+
return jsi::Value::undefined();
|
|
1589
|
+
}
|
|
1590
|
+
};
|
|
1591
|
+
} // namespace uniffi::cojson_core_rn
|
|
1592
|
+
namespace uniffi::cojson_core_rn {
|
|
1593
|
+
using namespace facebook;
|
|
1594
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1595
|
+
|
|
1596
|
+
template <> struct Bridging<UniffiForeignFutureStructU64> {
|
|
1597
|
+
static UniffiForeignFutureStructU64 fromJs(jsi::Runtime &rt,
|
|
1598
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1599
|
+
const jsi::Value &jsValue
|
|
1600
|
+
) {
|
|
1601
|
+
// Check if the input is an object
|
|
1602
|
+
if (!jsValue.isObject()) {
|
|
1603
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructU64");
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
// Get the object from the jsi::Value
|
|
1607
|
+
auto jsObject = jsValue.getObject(rt);
|
|
1608
|
+
|
|
1609
|
+
// Create the vtable struct
|
|
1610
|
+
UniffiForeignFutureStructU64 rsObject;
|
|
1611
|
+
|
|
1612
|
+
// Create the vtable from the js callbacks.
|
|
1613
|
+
rsObject.return_value = uniffi_jsi::Bridging<uint64_t>::fromJs(
|
|
1614
|
+
rt, callInvoker,
|
|
1615
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1616
|
+
);
|
|
1617
|
+
rsObject.call_status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::fromJs(
|
|
1618
|
+
rt, callInvoker,
|
|
1619
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1620
|
+
);
|
|
1621
|
+
|
|
1622
|
+
return rsObject;
|
|
1623
|
+
}
|
|
1624
|
+
};
|
|
1625
|
+
|
|
1626
|
+
} // namespace uniffi::cojson_core_rn
|
|
1627
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteU64,
|
|
1628
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1629
|
+
namespace uniffi::cojson_core_rn {
|
|
1630
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1631
|
+
|
|
1632
|
+
template <> struct Bridging<UniffiForeignFutureCompleteU64> {
|
|
1633
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteU64 rsCallback) {
|
|
1634
|
+
return jsi::Function::createFromHostFunction(
|
|
1635
|
+
rt,
|
|
1636
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteU64"),
|
|
1637
|
+
2,
|
|
1638
|
+
[rsCallback, callInvoker](
|
|
1639
|
+
jsi::Runtime &rt,
|
|
1640
|
+
const jsi::Value &thisValue,
|
|
1641
|
+
const jsi::Value *arguments,
|
|
1642
|
+
size_t count) -> jsi::Value
|
|
1643
|
+
{
|
|
1644
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1645
|
+
}
|
|
1646
|
+
);
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
static jsi::Value intoRust(
|
|
1650
|
+
jsi::Runtime &rt,
|
|
1651
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1652
|
+
const jsi::Value &thisValue,
|
|
1653
|
+
const jsi::Value *args,
|
|
1654
|
+
size_t count,
|
|
1655
|
+
UniffiForeignFutureCompleteU64 func) {
|
|
1656
|
+
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1657
|
+
// then call the rs_callback with those arguments.
|
|
1658
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<UniffiForeignFutureStructU64>::fromJs(rt, callInvoker, args[1])
|
|
1659
|
+
);
|
|
1660
|
+
|
|
1661
|
+
|
|
1662
|
+
return jsi::Value::undefined();
|
|
1663
|
+
}
|
|
1664
|
+
};
|
|
1665
|
+
} // namespace uniffi::cojson_core_rn
|
|
1666
|
+
namespace uniffi::cojson_core_rn {
|
|
1667
|
+
using namespace facebook;
|
|
1668
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1669
|
+
|
|
1670
|
+
template <> struct Bridging<UniffiForeignFutureStructI64> {
|
|
1671
|
+
static UniffiForeignFutureStructI64 fromJs(jsi::Runtime &rt,
|
|
1672
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1673
|
+
const jsi::Value &jsValue
|
|
1674
|
+
) {
|
|
1675
|
+
// Check if the input is an object
|
|
1676
|
+
if (!jsValue.isObject()) {
|
|
1677
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructI64");
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
// Get the object from the jsi::Value
|
|
1681
|
+
auto jsObject = jsValue.getObject(rt);
|
|
1682
|
+
|
|
1683
|
+
// Create the vtable struct
|
|
1684
|
+
UniffiForeignFutureStructI64 rsObject;
|
|
1685
|
+
|
|
1686
|
+
// Create the vtable from the js callbacks.
|
|
1687
|
+
rsObject.return_value = uniffi_jsi::Bridging<int64_t>::fromJs(
|
|
1688
|
+
rt, callInvoker,
|
|
1689
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1690
|
+
);
|
|
1691
|
+
rsObject.call_status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::fromJs(
|
|
1692
|
+
rt, callInvoker,
|
|
1693
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1694
|
+
);
|
|
1695
|
+
|
|
1696
|
+
return rsObject;
|
|
1697
|
+
}
|
|
1698
|
+
};
|
|
1699
|
+
|
|
1700
|
+
} // namespace uniffi::cojson_core_rn
|
|
1701
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteI64,
|
|
1702
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1703
|
+
namespace uniffi::cojson_core_rn {
|
|
1704
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1705
|
+
|
|
1706
|
+
template <> struct Bridging<UniffiForeignFutureCompleteI64> {
|
|
1707
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteI64 rsCallback) {
|
|
1708
|
+
return jsi::Function::createFromHostFunction(
|
|
1709
|
+
rt,
|
|
1710
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteI64"),
|
|
1711
|
+
2,
|
|
1712
|
+
[rsCallback, callInvoker](
|
|
1713
|
+
jsi::Runtime &rt,
|
|
1714
|
+
const jsi::Value &thisValue,
|
|
1715
|
+
const jsi::Value *arguments,
|
|
1716
|
+
size_t count) -> jsi::Value
|
|
1717
|
+
{
|
|
1718
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1719
|
+
}
|
|
1720
|
+
);
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
static jsi::Value intoRust(
|
|
1724
|
+
jsi::Runtime &rt,
|
|
1725
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1726
|
+
const jsi::Value &thisValue,
|
|
1727
|
+
const jsi::Value *args,
|
|
1728
|
+
size_t count,
|
|
1729
|
+
UniffiForeignFutureCompleteI64 func) {
|
|
1730
|
+
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1731
|
+
// then call the rs_callback with those arguments.
|
|
1732
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<UniffiForeignFutureStructI64>::fromJs(rt, callInvoker, args[1])
|
|
1733
|
+
);
|
|
1734
|
+
|
|
1735
|
+
|
|
1736
|
+
return jsi::Value::undefined();
|
|
1737
|
+
}
|
|
1738
|
+
};
|
|
1739
|
+
} // namespace uniffi::cojson_core_rn
|
|
1740
|
+
namespace uniffi::cojson_core_rn {
|
|
1741
|
+
using namespace facebook;
|
|
1742
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1743
|
+
|
|
1744
|
+
template <> struct Bridging<UniffiForeignFutureStructF32> {
|
|
1745
|
+
static UniffiForeignFutureStructF32 fromJs(jsi::Runtime &rt,
|
|
1746
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1747
|
+
const jsi::Value &jsValue
|
|
1748
|
+
) {
|
|
1749
|
+
// Check if the input is an object
|
|
1750
|
+
if (!jsValue.isObject()) {
|
|
1751
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructF32");
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
// Get the object from the jsi::Value
|
|
1755
|
+
auto jsObject = jsValue.getObject(rt);
|
|
1756
|
+
|
|
1757
|
+
// Create the vtable struct
|
|
1758
|
+
UniffiForeignFutureStructF32 rsObject;
|
|
1759
|
+
|
|
1760
|
+
// Create the vtable from the js callbacks.
|
|
1761
|
+
rsObject.return_value = uniffi_jsi::Bridging<float>::fromJs(
|
|
1762
|
+
rt, callInvoker,
|
|
1763
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1764
|
+
);
|
|
1765
|
+
rsObject.call_status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::fromJs(
|
|
1766
|
+
rt, callInvoker,
|
|
1767
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1768
|
+
);
|
|
1769
|
+
|
|
1770
|
+
return rsObject;
|
|
1771
|
+
}
|
|
1772
|
+
};
|
|
1773
|
+
|
|
1774
|
+
} // namespace uniffi::cojson_core_rn
|
|
1775
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteF32,
|
|
1776
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1777
|
+
namespace uniffi::cojson_core_rn {
|
|
1778
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1779
|
+
|
|
1780
|
+
template <> struct Bridging<UniffiForeignFutureCompleteF32> {
|
|
1781
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteF32 rsCallback) {
|
|
1782
|
+
return jsi::Function::createFromHostFunction(
|
|
1783
|
+
rt,
|
|
1784
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteF32"),
|
|
1785
|
+
2,
|
|
1786
|
+
[rsCallback, callInvoker](
|
|
1787
|
+
jsi::Runtime &rt,
|
|
1788
|
+
const jsi::Value &thisValue,
|
|
1789
|
+
const jsi::Value *arguments,
|
|
1790
|
+
size_t count) -> jsi::Value
|
|
1791
|
+
{
|
|
1792
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1793
|
+
}
|
|
1794
|
+
);
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
static jsi::Value intoRust(
|
|
1798
|
+
jsi::Runtime &rt,
|
|
1799
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1800
|
+
const jsi::Value &thisValue,
|
|
1801
|
+
const jsi::Value *args,
|
|
1802
|
+
size_t count,
|
|
1803
|
+
UniffiForeignFutureCompleteF32 func) {
|
|
1804
|
+
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1805
|
+
// then call the rs_callback with those arguments.
|
|
1806
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<UniffiForeignFutureStructF32>::fromJs(rt, callInvoker, args[1])
|
|
1807
|
+
);
|
|
1808
|
+
|
|
1809
|
+
|
|
1810
|
+
return jsi::Value::undefined();
|
|
1811
|
+
}
|
|
1812
|
+
};
|
|
1813
|
+
} // namespace uniffi::cojson_core_rn
|
|
1814
|
+
namespace uniffi::cojson_core_rn {
|
|
1815
|
+
using namespace facebook;
|
|
1816
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1817
|
+
|
|
1818
|
+
template <> struct Bridging<UniffiForeignFutureStructF64> {
|
|
1819
|
+
static UniffiForeignFutureStructF64 fromJs(jsi::Runtime &rt,
|
|
1820
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1821
|
+
const jsi::Value &jsValue
|
|
1822
|
+
) {
|
|
1823
|
+
// Check if the input is an object
|
|
1824
|
+
if (!jsValue.isObject()) {
|
|
1825
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructF64");
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
// Get the object from the jsi::Value
|
|
1829
|
+
auto jsObject = jsValue.getObject(rt);
|
|
1830
|
+
|
|
1831
|
+
// Create the vtable struct
|
|
1832
|
+
UniffiForeignFutureStructF64 rsObject;
|
|
1833
|
+
|
|
1834
|
+
// Create the vtable from the js callbacks.
|
|
1835
|
+
rsObject.return_value = uniffi_jsi::Bridging<double>::fromJs(
|
|
1836
|
+
rt, callInvoker,
|
|
1837
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1838
|
+
);
|
|
1839
|
+
rsObject.call_status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::fromJs(
|
|
1840
|
+
rt, callInvoker,
|
|
1841
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1842
|
+
);
|
|
1843
|
+
|
|
1844
|
+
return rsObject;
|
|
1845
|
+
}
|
|
1846
|
+
};
|
|
1847
|
+
|
|
1848
|
+
} // namespace uniffi::cojson_core_rn
|
|
1849
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteF64,
|
|
1850
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1851
|
+
namespace uniffi::cojson_core_rn {
|
|
1852
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1853
|
+
|
|
1854
|
+
template <> struct Bridging<UniffiForeignFutureCompleteF64> {
|
|
1855
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteF64 rsCallback) {
|
|
1856
|
+
return jsi::Function::createFromHostFunction(
|
|
1857
|
+
rt,
|
|
1858
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteF64"),
|
|
1859
|
+
2,
|
|
1860
|
+
[rsCallback, callInvoker](
|
|
1861
|
+
jsi::Runtime &rt,
|
|
1862
|
+
const jsi::Value &thisValue,
|
|
1863
|
+
const jsi::Value *arguments,
|
|
1864
|
+
size_t count) -> jsi::Value
|
|
1865
|
+
{
|
|
1866
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1867
|
+
}
|
|
1868
|
+
);
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
static jsi::Value intoRust(
|
|
1872
|
+
jsi::Runtime &rt,
|
|
1873
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1874
|
+
const jsi::Value &thisValue,
|
|
1875
|
+
const jsi::Value *args,
|
|
1876
|
+
size_t count,
|
|
1877
|
+
UniffiForeignFutureCompleteF64 func) {
|
|
1878
|
+
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1879
|
+
// then call the rs_callback with those arguments.
|
|
1880
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<UniffiForeignFutureStructF64>::fromJs(rt, callInvoker, args[1])
|
|
1881
|
+
);
|
|
1882
|
+
|
|
1883
|
+
|
|
1884
|
+
return jsi::Value::undefined();
|
|
1885
|
+
}
|
|
1886
|
+
};
|
|
1887
|
+
} // namespace uniffi::cojson_core_rn
|
|
1888
|
+
namespace uniffi::cojson_core_rn {
|
|
1889
|
+
using namespace facebook;
|
|
1890
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1891
|
+
|
|
1892
|
+
template <> struct Bridging<UniffiForeignFutureStructPointer> {
|
|
1893
|
+
static UniffiForeignFutureStructPointer fromJs(jsi::Runtime &rt,
|
|
1894
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1895
|
+
const jsi::Value &jsValue
|
|
1896
|
+
) {
|
|
1897
|
+
// Check if the input is an object
|
|
1898
|
+
if (!jsValue.isObject()) {
|
|
1899
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructPointer");
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
// Get the object from the jsi::Value
|
|
1903
|
+
auto jsObject = jsValue.getObject(rt);
|
|
1904
|
+
|
|
1905
|
+
// Create the vtable struct
|
|
1906
|
+
UniffiForeignFutureStructPointer rsObject;
|
|
1907
|
+
|
|
1908
|
+
// Create the vtable from the js callbacks.
|
|
1909
|
+
rsObject.return_value = uniffi_jsi::Bridging<void *>::fromJs(
|
|
1910
|
+
rt, callInvoker,
|
|
1911
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1912
|
+
);
|
|
1913
|
+
rsObject.call_status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::fromJs(
|
|
1914
|
+
rt, callInvoker,
|
|
1915
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1916
|
+
);
|
|
1917
|
+
|
|
1918
|
+
return rsObject;
|
|
1919
|
+
}
|
|
1920
|
+
};
|
|
1921
|
+
|
|
1922
|
+
} // namespace uniffi::cojson_core_rn
|
|
1923
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompletePointer,
|
|
1924
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1925
|
+
namespace uniffi::cojson_core_rn {
|
|
1926
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1927
|
+
|
|
1928
|
+
template <> struct Bridging<UniffiForeignFutureCompletePointer> {
|
|
1929
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompletePointer rsCallback) {
|
|
1930
|
+
return jsi::Function::createFromHostFunction(
|
|
1931
|
+
rt,
|
|
1932
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompletePointer"),
|
|
1933
|
+
2,
|
|
1934
|
+
[rsCallback, callInvoker](
|
|
1935
|
+
jsi::Runtime &rt,
|
|
1936
|
+
const jsi::Value &thisValue,
|
|
1937
|
+
const jsi::Value *arguments,
|
|
1938
|
+
size_t count) -> jsi::Value
|
|
1939
|
+
{
|
|
1940
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1941
|
+
}
|
|
1942
|
+
);
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
static jsi::Value intoRust(
|
|
1946
|
+
jsi::Runtime &rt,
|
|
1947
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1948
|
+
const jsi::Value &thisValue,
|
|
1949
|
+
const jsi::Value *args,
|
|
1950
|
+
size_t count,
|
|
1951
|
+
UniffiForeignFutureCompletePointer func) {
|
|
1952
|
+
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1953
|
+
// then call the rs_callback with those arguments.
|
|
1954
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<UniffiForeignFutureStructPointer>::fromJs(rt, callInvoker, args[1])
|
|
1955
|
+
);
|
|
1956
|
+
|
|
1957
|
+
|
|
1958
|
+
return jsi::Value::undefined();
|
|
1959
|
+
}
|
|
1960
|
+
};
|
|
1961
|
+
} // namespace uniffi::cojson_core_rn
|
|
1962
|
+
namespace uniffi::cojson_core_rn {
|
|
1963
|
+
using namespace facebook;
|
|
1964
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1965
|
+
|
|
1966
|
+
template <> struct Bridging<UniffiForeignFutureStructRustBuffer> {
|
|
1967
|
+
static UniffiForeignFutureStructRustBuffer fromJs(jsi::Runtime &rt,
|
|
1968
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1969
|
+
const jsi::Value &jsValue
|
|
1970
|
+
) {
|
|
1971
|
+
// Check if the input is an object
|
|
1972
|
+
if (!jsValue.isObject()) {
|
|
1973
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructRustBuffer");
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
// Get the object from the jsi::Value
|
|
1977
|
+
auto jsObject = jsValue.getObject(rt);
|
|
1978
|
+
|
|
1979
|
+
// Create the vtable struct
|
|
1980
|
+
UniffiForeignFutureStructRustBuffer rsObject;
|
|
1981
|
+
|
|
1982
|
+
// Create the vtable from the js callbacks.
|
|
1983
|
+
rsObject.return_value = uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(
|
|
1984
|
+
rt, callInvoker,
|
|
1985
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1986
|
+
);
|
|
1987
|
+
rsObject.call_status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::fromJs(
|
|
1988
|
+
rt, callInvoker,
|
|
1989
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1990
|
+
);
|
|
1991
|
+
|
|
1992
|
+
return rsObject;
|
|
1993
|
+
}
|
|
1994
|
+
};
|
|
1995
|
+
|
|
1996
|
+
} // namespace uniffi::cojson_core_rn
|
|
1997
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteRustBuffer,
|
|
1998
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1999
|
+
namespace uniffi::cojson_core_rn {
|
|
2000
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
2001
|
+
|
|
2002
|
+
template <> struct Bridging<UniffiForeignFutureCompleteRustBuffer> {
|
|
2003
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteRustBuffer rsCallback) {
|
|
2004
|
+
return jsi::Function::createFromHostFunction(
|
|
2005
|
+
rt,
|
|
2006
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteRustBuffer"),
|
|
2007
|
+
2,
|
|
2008
|
+
[rsCallback, callInvoker](
|
|
2009
|
+
jsi::Runtime &rt,
|
|
2010
|
+
const jsi::Value &thisValue,
|
|
2011
|
+
const jsi::Value *arguments,
|
|
2012
|
+
size_t count) -> jsi::Value
|
|
2013
|
+
{
|
|
2014
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
2015
|
+
}
|
|
2016
|
+
);
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
static jsi::Value intoRust(
|
|
2020
|
+
jsi::Runtime &rt,
|
|
2021
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
2022
|
+
const jsi::Value &thisValue,
|
|
2023
|
+
const jsi::Value *args,
|
|
2024
|
+
size_t count,
|
|
2025
|
+
UniffiForeignFutureCompleteRustBuffer func) {
|
|
2026
|
+
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
2027
|
+
// then call the rs_callback with those arguments.
|
|
2028
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<UniffiForeignFutureStructRustBuffer>::fromJs(rt, callInvoker, args[1])
|
|
2029
|
+
);
|
|
2030
|
+
|
|
2031
|
+
|
|
2032
|
+
return jsi::Value::undefined();
|
|
2033
|
+
}
|
|
2034
|
+
};
|
|
2035
|
+
} // namespace uniffi::cojson_core_rn
|
|
2036
|
+
namespace uniffi::cojson_core_rn {
|
|
2037
|
+
using namespace facebook;
|
|
2038
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
2039
|
+
|
|
2040
|
+
template <> struct Bridging<UniffiForeignFutureStructVoid> {
|
|
2041
|
+
static UniffiForeignFutureStructVoid fromJs(jsi::Runtime &rt,
|
|
2042
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
2043
|
+
const jsi::Value &jsValue
|
|
2044
|
+
) {
|
|
2045
|
+
// Check if the input is an object
|
|
2046
|
+
if (!jsValue.isObject()) {
|
|
2047
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructVoid");
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
// Get the object from the jsi::Value
|
|
2051
|
+
auto jsObject = jsValue.getObject(rt);
|
|
2052
|
+
|
|
2053
|
+
// Create the vtable struct
|
|
2054
|
+
UniffiForeignFutureStructVoid rsObject;
|
|
2055
|
+
|
|
2056
|
+
// Create the vtable from the js callbacks.
|
|
2057
|
+
rsObject.call_status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::fromJs(
|
|
2058
|
+
rt, callInvoker,
|
|
2059
|
+
jsObject.getProperty(rt, "callStatus")
|
|
2060
|
+
);
|
|
2061
|
+
|
|
2062
|
+
return rsObject;
|
|
2063
|
+
}
|
|
2064
|
+
};
|
|
2065
|
+
|
|
2066
|
+
} // namespace uniffi::cojson_core_rn
|
|
2067
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteVoid,
|
|
2068
|
+
// passed from Rust to JS as part of async callbacks.
|
|
2069
|
+
namespace uniffi::cojson_core_rn {
|
|
2070
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
2071
|
+
|
|
2072
|
+
template <> struct Bridging<UniffiForeignFutureCompleteVoid> {
|
|
2073
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteVoid rsCallback) {
|
|
2074
|
+
return jsi::Function::createFromHostFunction(
|
|
2075
|
+
rt,
|
|
2076
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteVoid"),
|
|
2077
|
+
2,
|
|
2078
|
+
[rsCallback, callInvoker](
|
|
2079
|
+
jsi::Runtime &rt,
|
|
2080
|
+
const jsi::Value &thisValue,
|
|
2081
|
+
const jsi::Value *arguments,
|
|
2082
|
+
size_t count) -> jsi::Value
|
|
2083
|
+
{
|
|
2084
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
2085
|
+
}
|
|
2086
|
+
);
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
static jsi::Value intoRust(
|
|
2090
|
+
jsi::Runtime &rt,
|
|
2091
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
2092
|
+
const jsi::Value &thisValue,
|
|
2093
|
+
const jsi::Value *args,
|
|
2094
|
+
size_t count,
|
|
2095
|
+
UniffiForeignFutureCompleteVoid func) {
|
|
2096
|
+
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
2097
|
+
// then call the rs_callback with those arguments.
|
|
2098
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<UniffiForeignFutureStructVoid>::fromJs(rt, callInvoker, args[1])
|
|
2099
|
+
);
|
|
2100
|
+
|
|
2101
|
+
|
|
2102
|
+
return jsi::Value::undefined();
|
|
2103
|
+
}
|
|
2104
|
+
};
|
|
2105
|
+
} // namespace uniffi::cojson_core_rn
|
|
2106
|
+
|
|
2107
|
+
|
|
2108
|
+
namespace uniffi::cojson_core_rn {
|
|
2109
|
+
using namespace facebook;
|
|
2110
|
+
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
2111
|
+
|
|
2112
|
+
template <> struct Bridging<UniffiRustFutureContinuationCallback> {
|
|
2113
|
+
static UniffiRustFutureContinuationCallback fromJs(
|
|
2114
|
+
jsi::Runtime &rt,
|
|
2115
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
2116
|
+
const jsi::Value &value
|
|
2117
|
+
) {
|
|
2118
|
+
try {
|
|
2119
|
+
return uniffi::cojson_core_rn::cb::rustfuturecontinuationcallback::makeCallbackFunction(
|
|
2120
|
+
rt,
|
|
2121
|
+
callInvoker,
|
|
2122
|
+
value
|
|
2123
|
+
);
|
|
2124
|
+
} catch (const std::logic_error &e) {
|
|
2125
|
+
throw jsi::JSError(rt, e.what());
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
};
|
|
2129
|
+
|
|
2130
|
+
} // namespace uniffi::cojson_core_rn
|
|
2131
|
+
|
|
2132
|
+
NativeCojsonCoreRn::NativeCojsonCoreRn(
|
|
2133
|
+
jsi::Runtime &rt,
|
|
2134
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> invoker
|
|
2135
|
+
) : callInvoker(invoker), props() {
|
|
2136
|
+
// Map from Javascript names to the cpp names
|
|
2137
|
+
props["ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length"] = jsi::Function::createFromHostFunction(
|
|
2138
|
+
rt,
|
|
2139
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length"),
|
|
2140
|
+
1,
|
|
2141
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2142
|
+
return this->cpp_uniffi_internal_fn_func_ffi__string_to_byte_length(rt, thisVal, args, count);
|
|
2143
|
+
}
|
|
2144
|
+
);
|
|
2145
|
+
props["ubrn_uniffi_internal_fn_func_ffi__string_to_arraybuffer"] = jsi::Function::createFromHostFunction(
|
|
2146
|
+
rt,
|
|
2147
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_func_ffi__string_to_arraybuffer"),
|
|
2148
|
+
1,
|
|
2149
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2150
|
+
return this->cpp_uniffi_internal_fn_func_ffi__string_to_arraybuffer(rt, thisVal, args, count);
|
|
2151
|
+
}
|
|
2152
|
+
);
|
|
2153
|
+
props["ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string"] = jsi::Function::createFromHostFunction(
|
|
2154
|
+
rt,
|
|
2155
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string"),
|
|
2156
|
+
1,
|
|
2157
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2158
|
+
return this->cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string(rt, thisVal, args, count);
|
|
2159
|
+
}
|
|
2160
|
+
);
|
|
2161
|
+
props["ubrn_uniffi_cojson_core_rn_fn_clone_blake3hasher"] = jsi::Function::createFromHostFunction(
|
|
2162
|
+
rt,
|
|
2163
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_clone_blake3hasher"),
|
|
2164
|
+
1,
|
|
2165
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2166
|
+
return this->cpp_uniffi_cojson_core_rn_fn_clone_blake3hasher(rt, thisVal, args, count);
|
|
2167
|
+
}
|
|
2168
|
+
);
|
|
2169
|
+
props["ubrn_uniffi_cojson_core_rn_fn_free_blake3hasher"] = jsi::Function::createFromHostFunction(
|
|
2170
|
+
rt,
|
|
2171
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_free_blake3hasher"),
|
|
2172
|
+
1,
|
|
2173
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2174
|
+
return this->cpp_uniffi_cojson_core_rn_fn_free_blake3hasher(rt, thisVal, args, count);
|
|
2175
|
+
}
|
|
2176
|
+
);
|
|
2177
|
+
props["ubrn_uniffi_cojson_core_rn_fn_constructor_blake3hasher_new"] = jsi::Function::createFromHostFunction(
|
|
2178
|
+
rt,
|
|
2179
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_constructor_blake3hasher_new"),
|
|
2180
|
+
0,
|
|
2181
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2182
|
+
return this->cpp_uniffi_cojson_core_rn_fn_constructor_blake3hasher_new(rt, thisVal, args, count);
|
|
2183
|
+
}
|
|
2184
|
+
);
|
|
2185
|
+
props["ubrn_uniffi_cojson_core_rn_fn_method_blake3hasher_clone_hasher"] = jsi::Function::createFromHostFunction(
|
|
2186
|
+
rt,
|
|
2187
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_method_blake3hasher_clone_hasher"),
|
|
2188
|
+
1,
|
|
2189
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2190
|
+
return this->cpp_uniffi_cojson_core_rn_fn_method_blake3hasher_clone_hasher(rt, thisVal, args, count);
|
|
2191
|
+
}
|
|
2192
|
+
);
|
|
2193
|
+
props["ubrn_uniffi_cojson_core_rn_fn_method_blake3hasher_finalize"] = jsi::Function::createFromHostFunction(
|
|
2194
|
+
rt,
|
|
2195
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_method_blake3hasher_finalize"),
|
|
2196
|
+
1,
|
|
2197
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2198
|
+
return this->cpp_uniffi_cojson_core_rn_fn_method_blake3hasher_finalize(rt, thisVal, args, count);
|
|
2199
|
+
}
|
|
2200
|
+
);
|
|
2201
|
+
props["ubrn_uniffi_cojson_core_rn_fn_method_blake3hasher_update"] = jsi::Function::createFromHostFunction(
|
|
2202
|
+
rt,
|
|
2203
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_method_blake3hasher_update"),
|
|
2204
|
+
2,
|
|
2205
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2206
|
+
return this->cpp_uniffi_cojson_core_rn_fn_method_blake3hasher_update(rt, thisVal, args, count);
|
|
2207
|
+
}
|
|
2208
|
+
);
|
|
2209
|
+
props["ubrn_uniffi_cojson_core_rn_fn_clone_sessionlog"] = jsi::Function::createFromHostFunction(
|
|
2210
|
+
rt,
|
|
2211
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_clone_sessionlog"),
|
|
2212
|
+
1,
|
|
2213
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2214
|
+
return this->cpp_uniffi_cojson_core_rn_fn_clone_sessionlog(rt, thisVal, args, count);
|
|
2215
|
+
}
|
|
2216
|
+
);
|
|
2217
|
+
props["ubrn_uniffi_cojson_core_rn_fn_free_sessionlog"] = jsi::Function::createFromHostFunction(
|
|
2218
|
+
rt,
|
|
2219
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_free_sessionlog"),
|
|
2220
|
+
1,
|
|
2221
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2222
|
+
return this->cpp_uniffi_cojson_core_rn_fn_free_sessionlog(rt, thisVal, args, count);
|
|
2223
|
+
}
|
|
2224
|
+
);
|
|
2225
|
+
props["ubrn_uniffi_cojson_core_rn_fn_constructor_sessionlog_new"] = jsi::Function::createFromHostFunction(
|
|
2226
|
+
rt,
|
|
2227
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_constructor_sessionlog_new"),
|
|
2228
|
+
3,
|
|
2229
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2230
|
+
return this->cpp_uniffi_cojson_core_rn_fn_constructor_sessionlog_new(rt, thisVal, args, count);
|
|
2231
|
+
}
|
|
2232
|
+
);
|
|
2233
|
+
props["ubrn_uniffi_cojson_core_rn_fn_method_sessionlog_add_new_private_transaction"] = jsi::Function::createFromHostFunction(
|
|
2234
|
+
rt,
|
|
2235
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_method_sessionlog_add_new_private_transaction"),
|
|
2236
|
+
7,
|
|
2237
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2238
|
+
return this->cpp_uniffi_cojson_core_rn_fn_method_sessionlog_add_new_private_transaction(rt, thisVal, args, count);
|
|
2239
|
+
}
|
|
2240
|
+
);
|
|
2241
|
+
props["ubrn_uniffi_cojson_core_rn_fn_method_sessionlog_add_new_trusting_transaction"] = jsi::Function::createFromHostFunction(
|
|
2242
|
+
rt,
|
|
2243
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_method_sessionlog_add_new_trusting_transaction"),
|
|
2244
|
+
5,
|
|
2245
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2246
|
+
return this->cpp_uniffi_cojson_core_rn_fn_method_sessionlog_add_new_trusting_transaction(rt, thisVal, args, count);
|
|
2247
|
+
}
|
|
2248
|
+
);
|
|
2249
|
+
props["ubrn_uniffi_cojson_core_rn_fn_method_sessionlog_clone_session_log"] = jsi::Function::createFromHostFunction(
|
|
2250
|
+
rt,
|
|
2251
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_method_sessionlog_clone_session_log"),
|
|
2252
|
+
1,
|
|
2253
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2254
|
+
return this->cpp_uniffi_cojson_core_rn_fn_method_sessionlog_clone_session_log(rt, thisVal, args, count);
|
|
2255
|
+
}
|
|
2256
|
+
);
|
|
2257
|
+
props["ubrn_uniffi_cojson_core_rn_fn_method_sessionlog_decrypt_next_transaction_changes_json"] = jsi::Function::createFromHostFunction(
|
|
2258
|
+
rt,
|
|
2259
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_method_sessionlog_decrypt_next_transaction_changes_json"),
|
|
2260
|
+
3,
|
|
2261
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2262
|
+
return this->cpp_uniffi_cojson_core_rn_fn_method_sessionlog_decrypt_next_transaction_changes_json(rt, thisVal, args, count);
|
|
2263
|
+
}
|
|
2264
|
+
);
|
|
2265
|
+
props["ubrn_uniffi_cojson_core_rn_fn_method_sessionlog_decrypt_next_transaction_meta_json"] = jsi::Function::createFromHostFunction(
|
|
2266
|
+
rt,
|
|
2267
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_method_sessionlog_decrypt_next_transaction_meta_json"),
|
|
2268
|
+
3,
|
|
2269
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2270
|
+
return this->cpp_uniffi_cojson_core_rn_fn_method_sessionlog_decrypt_next_transaction_meta_json(rt, thisVal, args, count);
|
|
2271
|
+
}
|
|
2272
|
+
);
|
|
2273
|
+
props["ubrn_uniffi_cojson_core_rn_fn_method_sessionlog_try_add"] = jsi::Function::createFromHostFunction(
|
|
2274
|
+
rt,
|
|
2275
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_method_sessionlog_try_add"),
|
|
2276
|
+
4,
|
|
2277
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2278
|
+
return this->cpp_uniffi_cojson_core_rn_fn_method_sessionlog_try_add(rt, thisVal, args, count);
|
|
2279
|
+
}
|
|
2280
|
+
);
|
|
2281
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_blake3_hash_once"] = jsi::Function::createFromHostFunction(
|
|
2282
|
+
rt,
|
|
2283
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_blake3_hash_once"),
|
|
2284
|
+
1,
|
|
2285
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2286
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_blake3_hash_once(rt, thisVal, args, count);
|
|
2287
|
+
}
|
|
2288
|
+
);
|
|
2289
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_blake3_hash_once_with_context"] = jsi::Function::createFromHostFunction(
|
|
2290
|
+
rt,
|
|
2291
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_blake3_hash_once_with_context"),
|
|
2292
|
+
2,
|
|
2293
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2294
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_blake3_hash_once_with_context(rt, thisVal, args, count);
|
|
2295
|
+
}
|
|
2296
|
+
);
|
|
2297
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_decrypt"] = jsi::Function::createFromHostFunction(
|
|
2298
|
+
rt,
|
|
2299
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_decrypt"),
|
|
2300
|
+
3,
|
|
2301
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2302
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_decrypt(rt, thisVal, args, count);
|
|
2303
|
+
}
|
|
2304
|
+
);
|
|
2305
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_decrypt_xsalsa20"] = jsi::Function::createFromHostFunction(
|
|
2306
|
+
rt,
|
|
2307
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_decrypt_xsalsa20"),
|
|
2308
|
+
3,
|
|
2309
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2310
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_decrypt_xsalsa20(rt, thisVal, args, count);
|
|
2311
|
+
}
|
|
2312
|
+
);
|
|
2313
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_ed25519_sign"] = jsi::Function::createFromHostFunction(
|
|
2314
|
+
rt,
|
|
2315
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_ed25519_sign"),
|
|
2316
|
+
2,
|
|
2317
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2318
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_ed25519_sign(rt, thisVal, args, count);
|
|
2319
|
+
}
|
|
2320
|
+
);
|
|
2321
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_ed25519_signature_from_bytes"] = jsi::Function::createFromHostFunction(
|
|
2322
|
+
rt,
|
|
2323
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_ed25519_signature_from_bytes"),
|
|
2324
|
+
1,
|
|
2325
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2326
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_ed25519_signature_from_bytes(rt, thisVal, args, count);
|
|
2327
|
+
}
|
|
2328
|
+
);
|
|
2329
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_ed25519_signing_key_from_bytes"] = jsi::Function::createFromHostFunction(
|
|
2330
|
+
rt,
|
|
2331
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_ed25519_signing_key_from_bytes"),
|
|
2332
|
+
1,
|
|
2333
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2334
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_ed25519_signing_key_from_bytes(rt, thisVal, args, count);
|
|
2335
|
+
}
|
|
2336
|
+
);
|
|
2337
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_ed25519_signing_key_sign"] = jsi::Function::createFromHostFunction(
|
|
2338
|
+
rt,
|
|
2339
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_ed25519_signing_key_sign"),
|
|
2340
|
+
2,
|
|
2341
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2342
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_ed25519_signing_key_sign(rt, thisVal, args, count);
|
|
2343
|
+
}
|
|
2344
|
+
);
|
|
2345
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_ed25519_signing_key_to_public"] = jsi::Function::createFromHostFunction(
|
|
2346
|
+
rt,
|
|
2347
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_ed25519_signing_key_to_public"),
|
|
2348
|
+
1,
|
|
2349
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2350
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_ed25519_signing_key_to_public(rt, thisVal, args, count);
|
|
2351
|
+
}
|
|
2352
|
+
);
|
|
2353
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_ed25519_verify"] = jsi::Function::createFromHostFunction(
|
|
2354
|
+
rt,
|
|
2355
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_ed25519_verify"),
|
|
2356
|
+
3,
|
|
2357
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2358
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_ed25519_verify(rt, thisVal, args, count);
|
|
2359
|
+
}
|
|
2360
|
+
);
|
|
2361
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_ed25519_verifying_key"] = jsi::Function::createFromHostFunction(
|
|
2362
|
+
rt,
|
|
2363
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_ed25519_verifying_key"),
|
|
2364
|
+
1,
|
|
2365
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2366
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_ed25519_verifying_key(rt, thisVal, args, count);
|
|
2367
|
+
}
|
|
2368
|
+
);
|
|
2369
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_ed25519_verifying_key_from_bytes"] = jsi::Function::createFromHostFunction(
|
|
2370
|
+
rt,
|
|
2371
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_ed25519_verifying_key_from_bytes"),
|
|
2372
|
+
1,
|
|
2373
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2374
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_ed25519_verifying_key_from_bytes(rt, thisVal, args, count);
|
|
2375
|
+
}
|
|
2376
|
+
);
|
|
2377
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_encrypt"] = jsi::Function::createFromHostFunction(
|
|
2378
|
+
rt,
|
|
2379
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_encrypt"),
|
|
2380
|
+
3,
|
|
2381
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2382
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_encrypt(rt, thisVal, args, count);
|
|
2383
|
+
}
|
|
2384
|
+
);
|
|
2385
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_encrypt_xsalsa20"] = jsi::Function::createFromHostFunction(
|
|
2386
|
+
rt,
|
|
2387
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_encrypt_xsalsa20"),
|
|
2388
|
+
3,
|
|
2389
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2390
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_encrypt_xsalsa20(rt, thisVal, args, count);
|
|
2391
|
+
}
|
|
2392
|
+
);
|
|
2393
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_generate_nonce"] = jsi::Function::createFromHostFunction(
|
|
2394
|
+
rt,
|
|
2395
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_generate_nonce"),
|
|
2396
|
+
1,
|
|
2397
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2398
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_generate_nonce(rt, thisVal, args, count);
|
|
2399
|
+
}
|
|
2400
|
+
);
|
|
2401
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_get_sealer_id"] = jsi::Function::createFromHostFunction(
|
|
2402
|
+
rt,
|
|
2403
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_get_sealer_id"),
|
|
2404
|
+
1,
|
|
2405
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2406
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_get_sealer_id(rt, thisVal, args, count);
|
|
2407
|
+
}
|
|
2408
|
+
);
|
|
2409
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_get_signer_id"] = jsi::Function::createFromHostFunction(
|
|
2410
|
+
rt,
|
|
2411
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_get_signer_id"),
|
|
2412
|
+
1,
|
|
2413
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2414
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_get_signer_id(rt, thisVal, args, count);
|
|
2415
|
+
}
|
|
2416
|
+
);
|
|
2417
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_new_ed25519_signing_key"] = jsi::Function::createFromHostFunction(
|
|
2418
|
+
rt,
|
|
2419
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_new_ed25519_signing_key"),
|
|
2420
|
+
0,
|
|
2421
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2422
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_new_ed25519_signing_key(rt, thisVal, args, count);
|
|
2423
|
+
}
|
|
2424
|
+
);
|
|
2425
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_new_x25519_private_key"] = jsi::Function::createFromHostFunction(
|
|
2426
|
+
rt,
|
|
2427
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_new_x25519_private_key"),
|
|
2428
|
+
0,
|
|
2429
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2430
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_new_x25519_private_key(rt, thisVal, args, count);
|
|
2431
|
+
}
|
|
2432
|
+
);
|
|
2433
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_seal"] = jsi::Function::createFromHostFunction(
|
|
2434
|
+
rt,
|
|
2435
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_seal"),
|
|
2436
|
+
4,
|
|
2437
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2438
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_seal(rt, thisVal, args, count);
|
|
2439
|
+
}
|
|
2440
|
+
);
|
|
2441
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_sign"] = jsi::Function::createFromHostFunction(
|
|
2442
|
+
rt,
|
|
2443
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_sign"),
|
|
2444
|
+
2,
|
|
2445
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2446
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_sign(rt, thisVal, args, count);
|
|
2447
|
+
}
|
|
2448
|
+
);
|
|
2449
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_unseal"] = jsi::Function::createFromHostFunction(
|
|
2450
|
+
rt,
|
|
2451
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_unseal"),
|
|
2452
|
+
4,
|
|
2453
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2454
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_unseal(rt, thisVal, args, count);
|
|
2455
|
+
}
|
|
2456
|
+
);
|
|
2457
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_verify"] = jsi::Function::createFromHostFunction(
|
|
2458
|
+
rt,
|
|
2459
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_verify"),
|
|
2460
|
+
3,
|
|
2461
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2462
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_verify(rt, thisVal, args, count);
|
|
2463
|
+
}
|
|
2464
|
+
);
|
|
2465
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_x25519_diffie_hellman"] = jsi::Function::createFromHostFunction(
|
|
2466
|
+
rt,
|
|
2467
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_x25519_diffie_hellman"),
|
|
2468
|
+
2,
|
|
2469
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2470
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_x25519_diffie_hellman(rt, thisVal, args, count);
|
|
2471
|
+
}
|
|
2472
|
+
);
|
|
2473
|
+
props["ubrn_uniffi_cojson_core_rn_fn_func_x25519_public_key"] = jsi::Function::createFromHostFunction(
|
|
2474
|
+
rt,
|
|
2475
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_fn_func_x25519_public_key"),
|
|
2476
|
+
1,
|
|
2477
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2478
|
+
return this->cpp_uniffi_cojson_core_rn_fn_func_x25519_public_key(rt, thisVal, args, count);
|
|
2479
|
+
}
|
|
2480
|
+
);
|
|
2481
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_blake3_hash_once"] = jsi::Function::createFromHostFunction(
|
|
2482
|
+
rt,
|
|
2483
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_blake3_hash_once"),
|
|
2484
|
+
0,
|
|
2485
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2486
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_blake3_hash_once(rt, thisVal, args, count);
|
|
2487
|
+
}
|
|
2488
|
+
);
|
|
2489
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_blake3_hash_once_with_context"] = jsi::Function::createFromHostFunction(
|
|
2490
|
+
rt,
|
|
2491
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_blake3_hash_once_with_context"),
|
|
2492
|
+
0,
|
|
2493
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2494
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_blake3_hash_once_with_context(rt, thisVal, args, count);
|
|
2495
|
+
}
|
|
2496
|
+
);
|
|
2497
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_decrypt"] = jsi::Function::createFromHostFunction(
|
|
2498
|
+
rt,
|
|
2499
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_decrypt"),
|
|
2500
|
+
0,
|
|
2501
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2502
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_decrypt(rt, thisVal, args, count);
|
|
2503
|
+
}
|
|
2504
|
+
);
|
|
2505
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_decrypt_xsalsa20"] = jsi::Function::createFromHostFunction(
|
|
2506
|
+
rt,
|
|
2507
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_decrypt_xsalsa20"),
|
|
2508
|
+
0,
|
|
2509
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2510
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_decrypt_xsalsa20(rt, thisVal, args, count);
|
|
2511
|
+
}
|
|
2512
|
+
);
|
|
2513
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_ed25519_sign"] = jsi::Function::createFromHostFunction(
|
|
2514
|
+
rt,
|
|
2515
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_ed25519_sign"),
|
|
2516
|
+
0,
|
|
2517
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2518
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_ed25519_sign(rt, thisVal, args, count);
|
|
2519
|
+
}
|
|
2520
|
+
);
|
|
2521
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_ed25519_signature_from_bytes"] = jsi::Function::createFromHostFunction(
|
|
2522
|
+
rt,
|
|
2523
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_ed25519_signature_from_bytes"),
|
|
2524
|
+
0,
|
|
2525
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2526
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_ed25519_signature_from_bytes(rt, thisVal, args, count);
|
|
2527
|
+
}
|
|
2528
|
+
);
|
|
2529
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_ed25519_signing_key_from_bytes"] = jsi::Function::createFromHostFunction(
|
|
2530
|
+
rt,
|
|
2531
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_ed25519_signing_key_from_bytes"),
|
|
2532
|
+
0,
|
|
2533
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2534
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_ed25519_signing_key_from_bytes(rt, thisVal, args, count);
|
|
2535
|
+
}
|
|
2536
|
+
);
|
|
2537
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_ed25519_signing_key_sign"] = jsi::Function::createFromHostFunction(
|
|
2538
|
+
rt,
|
|
2539
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_ed25519_signing_key_sign"),
|
|
2540
|
+
0,
|
|
2541
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2542
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_ed25519_signing_key_sign(rt, thisVal, args, count);
|
|
2543
|
+
}
|
|
2544
|
+
);
|
|
2545
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_ed25519_signing_key_to_public"] = jsi::Function::createFromHostFunction(
|
|
2546
|
+
rt,
|
|
2547
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_ed25519_signing_key_to_public"),
|
|
2548
|
+
0,
|
|
2549
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2550
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_ed25519_signing_key_to_public(rt, thisVal, args, count);
|
|
2551
|
+
}
|
|
2552
|
+
);
|
|
2553
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_ed25519_verify"] = jsi::Function::createFromHostFunction(
|
|
2554
|
+
rt,
|
|
2555
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_ed25519_verify"),
|
|
2556
|
+
0,
|
|
2557
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2558
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_ed25519_verify(rt, thisVal, args, count);
|
|
2559
|
+
}
|
|
2560
|
+
);
|
|
2561
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_ed25519_verifying_key"] = jsi::Function::createFromHostFunction(
|
|
2562
|
+
rt,
|
|
2563
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_ed25519_verifying_key"),
|
|
2564
|
+
0,
|
|
2565
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2566
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_ed25519_verifying_key(rt, thisVal, args, count);
|
|
2567
|
+
}
|
|
2568
|
+
);
|
|
2569
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_ed25519_verifying_key_from_bytes"] = jsi::Function::createFromHostFunction(
|
|
2570
|
+
rt,
|
|
2571
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_ed25519_verifying_key_from_bytes"),
|
|
2572
|
+
0,
|
|
2573
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2574
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_ed25519_verifying_key_from_bytes(rt, thisVal, args, count);
|
|
2575
|
+
}
|
|
2576
|
+
);
|
|
2577
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_encrypt"] = jsi::Function::createFromHostFunction(
|
|
2578
|
+
rt,
|
|
2579
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_encrypt"),
|
|
2580
|
+
0,
|
|
2581
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2582
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_encrypt(rt, thisVal, args, count);
|
|
2583
|
+
}
|
|
2584
|
+
);
|
|
2585
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_encrypt_xsalsa20"] = jsi::Function::createFromHostFunction(
|
|
2586
|
+
rt,
|
|
2587
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_encrypt_xsalsa20"),
|
|
2588
|
+
0,
|
|
2589
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2590
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_encrypt_xsalsa20(rt, thisVal, args, count);
|
|
2591
|
+
}
|
|
2592
|
+
);
|
|
2593
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_generate_nonce"] = jsi::Function::createFromHostFunction(
|
|
2594
|
+
rt,
|
|
2595
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_generate_nonce"),
|
|
2596
|
+
0,
|
|
2597
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2598
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_generate_nonce(rt, thisVal, args, count);
|
|
2599
|
+
}
|
|
2600
|
+
);
|
|
2601
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_get_sealer_id"] = jsi::Function::createFromHostFunction(
|
|
2602
|
+
rt,
|
|
2603
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_get_sealer_id"),
|
|
2604
|
+
0,
|
|
2605
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2606
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_get_sealer_id(rt, thisVal, args, count);
|
|
2607
|
+
}
|
|
2608
|
+
);
|
|
2609
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_get_signer_id"] = jsi::Function::createFromHostFunction(
|
|
2610
|
+
rt,
|
|
2611
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_get_signer_id"),
|
|
2612
|
+
0,
|
|
2613
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2614
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_get_signer_id(rt, thisVal, args, count);
|
|
2615
|
+
}
|
|
2616
|
+
);
|
|
2617
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_new_ed25519_signing_key"] = jsi::Function::createFromHostFunction(
|
|
2618
|
+
rt,
|
|
2619
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_new_ed25519_signing_key"),
|
|
2620
|
+
0,
|
|
2621
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2622
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_new_ed25519_signing_key(rt, thisVal, args, count);
|
|
2623
|
+
}
|
|
2624
|
+
);
|
|
2625
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_new_x25519_private_key"] = jsi::Function::createFromHostFunction(
|
|
2626
|
+
rt,
|
|
2627
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_new_x25519_private_key"),
|
|
2628
|
+
0,
|
|
2629
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2630
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_new_x25519_private_key(rt, thisVal, args, count);
|
|
2631
|
+
}
|
|
2632
|
+
);
|
|
2633
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_seal"] = jsi::Function::createFromHostFunction(
|
|
2634
|
+
rt,
|
|
2635
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_seal"),
|
|
2636
|
+
0,
|
|
2637
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2638
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_seal(rt, thisVal, args, count);
|
|
2639
|
+
}
|
|
2640
|
+
);
|
|
2641
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_sign"] = jsi::Function::createFromHostFunction(
|
|
2642
|
+
rt,
|
|
2643
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_sign"),
|
|
2644
|
+
0,
|
|
2645
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2646
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_sign(rt, thisVal, args, count);
|
|
2647
|
+
}
|
|
2648
|
+
);
|
|
2649
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_unseal"] = jsi::Function::createFromHostFunction(
|
|
2650
|
+
rt,
|
|
2651
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_unseal"),
|
|
2652
|
+
0,
|
|
2653
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2654
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_unseal(rt, thisVal, args, count);
|
|
2655
|
+
}
|
|
2656
|
+
);
|
|
2657
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_verify"] = jsi::Function::createFromHostFunction(
|
|
2658
|
+
rt,
|
|
2659
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_verify"),
|
|
2660
|
+
0,
|
|
2661
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2662
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_verify(rt, thisVal, args, count);
|
|
2663
|
+
}
|
|
2664
|
+
);
|
|
2665
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_x25519_diffie_hellman"] = jsi::Function::createFromHostFunction(
|
|
2666
|
+
rt,
|
|
2667
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_x25519_diffie_hellman"),
|
|
2668
|
+
0,
|
|
2669
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2670
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_x25519_diffie_hellman(rt, thisVal, args, count);
|
|
2671
|
+
}
|
|
2672
|
+
);
|
|
2673
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_func_x25519_public_key"] = jsi::Function::createFromHostFunction(
|
|
2674
|
+
rt,
|
|
2675
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_func_x25519_public_key"),
|
|
2676
|
+
0,
|
|
2677
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2678
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_func_x25519_public_key(rt, thisVal, args, count);
|
|
2679
|
+
}
|
|
2680
|
+
);
|
|
2681
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_method_blake3hasher_clone_hasher"] = jsi::Function::createFromHostFunction(
|
|
2682
|
+
rt,
|
|
2683
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_method_blake3hasher_clone_hasher"),
|
|
2684
|
+
0,
|
|
2685
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2686
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_method_blake3hasher_clone_hasher(rt, thisVal, args, count);
|
|
2687
|
+
}
|
|
2688
|
+
);
|
|
2689
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_method_blake3hasher_finalize"] = jsi::Function::createFromHostFunction(
|
|
2690
|
+
rt,
|
|
2691
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_method_blake3hasher_finalize"),
|
|
2692
|
+
0,
|
|
2693
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2694
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_method_blake3hasher_finalize(rt, thisVal, args, count);
|
|
2695
|
+
}
|
|
2696
|
+
);
|
|
2697
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_method_blake3hasher_update"] = jsi::Function::createFromHostFunction(
|
|
2698
|
+
rt,
|
|
2699
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_method_blake3hasher_update"),
|
|
2700
|
+
0,
|
|
2701
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2702
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_method_blake3hasher_update(rt, thisVal, args, count);
|
|
2703
|
+
}
|
|
2704
|
+
);
|
|
2705
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_method_sessionlog_add_new_private_transaction"] = jsi::Function::createFromHostFunction(
|
|
2706
|
+
rt,
|
|
2707
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_method_sessionlog_add_new_private_transaction"),
|
|
2708
|
+
0,
|
|
2709
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2710
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_method_sessionlog_add_new_private_transaction(rt, thisVal, args, count);
|
|
2711
|
+
}
|
|
2712
|
+
);
|
|
2713
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_method_sessionlog_add_new_trusting_transaction"] = jsi::Function::createFromHostFunction(
|
|
2714
|
+
rt,
|
|
2715
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_method_sessionlog_add_new_trusting_transaction"),
|
|
2716
|
+
0,
|
|
2717
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2718
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_method_sessionlog_add_new_trusting_transaction(rt, thisVal, args, count);
|
|
2719
|
+
}
|
|
2720
|
+
);
|
|
2721
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_method_sessionlog_clone_session_log"] = jsi::Function::createFromHostFunction(
|
|
2722
|
+
rt,
|
|
2723
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_method_sessionlog_clone_session_log"),
|
|
2724
|
+
0,
|
|
2725
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2726
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_method_sessionlog_clone_session_log(rt, thisVal, args, count);
|
|
2727
|
+
}
|
|
2728
|
+
);
|
|
2729
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_method_sessionlog_decrypt_next_transaction_changes_json"] = jsi::Function::createFromHostFunction(
|
|
2730
|
+
rt,
|
|
2731
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_method_sessionlog_decrypt_next_transaction_changes_json"),
|
|
2732
|
+
0,
|
|
2733
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2734
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_method_sessionlog_decrypt_next_transaction_changes_json(rt, thisVal, args, count);
|
|
2735
|
+
}
|
|
2736
|
+
);
|
|
2737
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_method_sessionlog_decrypt_next_transaction_meta_json"] = jsi::Function::createFromHostFunction(
|
|
2738
|
+
rt,
|
|
2739
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_method_sessionlog_decrypt_next_transaction_meta_json"),
|
|
2740
|
+
0,
|
|
2741
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2742
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_method_sessionlog_decrypt_next_transaction_meta_json(rt, thisVal, args, count);
|
|
2743
|
+
}
|
|
2744
|
+
);
|
|
2745
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_method_sessionlog_try_add"] = jsi::Function::createFromHostFunction(
|
|
2746
|
+
rt,
|
|
2747
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_method_sessionlog_try_add"),
|
|
2748
|
+
0,
|
|
2749
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2750
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_method_sessionlog_try_add(rt, thisVal, args, count);
|
|
2751
|
+
}
|
|
2752
|
+
);
|
|
2753
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_constructor_blake3hasher_new"] = jsi::Function::createFromHostFunction(
|
|
2754
|
+
rt,
|
|
2755
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_constructor_blake3hasher_new"),
|
|
2756
|
+
0,
|
|
2757
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2758
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_constructor_blake3hasher_new(rt, thisVal, args, count);
|
|
2759
|
+
}
|
|
2760
|
+
);
|
|
2761
|
+
props["ubrn_uniffi_cojson_core_rn_checksum_constructor_sessionlog_new"] = jsi::Function::createFromHostFunction(
|
|
2762
|
+
rt,
|
|
2763
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_cojson_core_rn_checksum_constructor_sessionlog_new"),
|
|
2764
|
+
0,
|
|
2765
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2766
|
+
return this->cpp_uniffi_cojson_core_rn_checksum_constructor_sessionlog_new(rt, thisVal, args, count);
|
|
2767
|
+
}
|
|
2768
|
+
);
|
|
2769
|
+
props["ubrn_ffi_cojson_core_rn_uniffi_contract_version"] = jsi::Function::createFromHostFunction(
|
|
2770
|
+
rt,
|
|
2771
|
+
jsi::PropNameID::forAscii(rt, "ubrn_ffi_cojson_core_rn_uniffi_contract_version"),
|
|
2772
|
+
0,
|
|
2773
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2774
|
+
return this->cpp_ffi_cojson_core_rn_uniffi_contract_version(rt, thisVal, args, count);
|
|
2775
|
+
}
|
|
2776
|
+
);
|
|
2777
|
+
props["ubrn_uniffi_internal_fn_method_blake3hasher_ffi__bless_pointer"] = jsi::Function::createFromHostFunction(
|
|
2778
|
+
rt,
|
|
2779
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_blake3hasher_ffi__bless_pointer"),
|
|
2780
|
+
1,
|
|
2781
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2782
|
+
return this->cpp_uniffi_internal_fn_method_blake3hasher_ffi__bless_pointer(rt, thisVal, args, count);
|
|
2783
|
+
}
|
|
2784
|
+
);
|
|
2785
|
+
props["ubrn_uniffi_internal_fn_method_sessionlog_ffi__bless_pointer"] = jsi::Function::createFromHostFunction(
|
|
2786
|
+
rt,
|
|
2787
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_sessionlog_ffi__bless_pointer"),
|
|
2788
|
+
1,
|
|
2789
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2790
|
+
return this->cpp_uniffi_internal_fn_method_sessionlog_ffi__bless_pointer(rt, thisVal, args, count);
|
|
2791
|
+
}
|
|
2792
|
+
);
|
|
2793
|
+
}
|
|
2794
|
+
|
|
2795
|
+
void NativeCojsonCoreRn::registerModule(jsi::Runtime &rt, std::shared_ptr<react::CallInvoker> callInvoker) {
|
|
2796
|
+
auto invoker = std::make_shared<uniffi_runtime::UniffiCallInvoker>(callInvoker);
|
|
2797
|
+
auto tm = std::make_shared<NativeCojsonCoreRn>(rt, invoker);
|
|
2798
|
+
auto obj = rt.global().createFromHostObject(rt, tm);
|
|
2799
|
+
rt.global().setProperty(rt, "NativeCojsonCoreRn", obj);
|
|
2800
|
+
}
|
|
2801
|
+
|
|
2802
|
+
void NativeCojsonCoreRn::unregisterModule(jsi::Runtime &rt) {
|
|
2803
|
+
uniffi::cojson_core_rn::registry::clearRegistry();
|
|
2804
|
+
}
|
|
2805
|
+
|
|
2806
|
+
jsi::Value NativeCojsonCoreRn::get(jsi::Runtime& rt, const jsi::PropNameID& name) {
|
|
2807
|
+
try {
|
|
2808
|
+
return jsi::Value(rt, props.at(name.utf8(rt)));
|
|
2809
|
+
}
|
|
2810
|
+
catch (std::out_of_range &e) {
|
|
2811
|
+
return jsi::Value::undefined();
|
|
2812
|
+
}
|
|
2813
|
+
}
|
|
2814
|
+
|
|
2815
|
+
std::vector<jsi::PropNameID> NativeCojsonCoreRn::getPropertyNames(jsi::Runtime& rt) {
|
|
2816
|
+
std::vector<jsi::PropNameID> rval;
|
|
2817
|
+
for (auto& [key, value] : props) {
|
|
2818
|
+
rval.push_back(jsi::PropNameID::forUtf8(rt, key));
|
|
2819
|
+
}
|
|
2820
|
+
return rval;
|
|
2821
|
+
}
|
|
2822
|
+
|
|
2823
|
+
void NativeCojsonCoreRn::set(jsi::Runtime& rt, const jsi::PropNameID& name, const jsi::Value& value) {
|
|
2824
|
+
props.insert_or_assign(name.utf8(rt), &value);
|
|
2825
|
+
}
|
|
2826
|
+
|
|
2827
|
+
NativeCojsonCoreRn::~NativeCojsonCoreRn() {
|
|
2828
|
+
// Cleanup for callback function RustFutureContinuationCallback
|
|
2829
|
+
uniffi::cojson_core_rn::cb::rustfuturecontinuationcallback::cleanup();
|
|
2830
|
+
// Cleanup for "free" callback function CallbackInterfaceFree
|
|
2831
|
+
uniffi::cojson_core_rn::st::foreignfuture::foreignfuture::free::cleanup();
|
|
2832
|
+
}
|
|
2833
|
+
|
|
2834
|
+
// Utility functions for serialization/deserialization of strings.
|
|
2835
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_internal_fn_func_ffi__string_to_byte_length(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2836
|
+
return uniffi_jsi::Bridging<std::string>::string_to_bytelength(rt, args[0]);
|
|
2837
|
+
}
|
|
2838
|
+
|
|
2839
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_internal_fn_func_ffi__string_to_arraybuffer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2840
|
+
return uniffi_jsi::Bridging<std::string>::string_to_arraybuffer(rt, args[0]);
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2843
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2844
|
+
return uniffi_jsi::Bridging<std::string>::arraybuffer_to_string(rt, args[0]);
|
|
2845
|
+
}jsi::Value NativeCojsonCoreRn::cpp_uniffi_internal_fn_method_blake3hasher_ffi__bless_pointer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2846
|
+
auto pointer = uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]);
|
|
2847
|
+
auto static destructor = [](uint64_t p) {
|
|
2848
|
+
auto pointer = reinterpret_cast<void *>(static_cast<uintptr_t>(p));
|
|
2849
|
+
RustCallStatus status = {0};
|
|
2850
|
+
uniffi_cojson_core_rn_fn_free_blake3hasher(pointer, &status);
|
|
2851
|
+
};
|
|
2852
|
+
auto ptrObj = std::make_shared<uniffi_jsi::DestructibleObject>(pointer, destructor);
|
|
2853
|
+
auto obj = jsi::Object::createFromHostObject(rt, ptrObj);
|
|
2854
|
+
return jsi::Value(rt, obj);
|
|
2855
|
+
}jsi::Value NativeCojsonCoreRn::cpp_uniffi_internal_fn_method_sessionlog_ffi__bless_pointer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2856
|
+
auto pointer = uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]);
|
|
2857
|
+
auto static destructor = [](uint64_t p) {
|
|
2858
|
+
auto pointer = reinterpret_cast<void *>(static_cast<uintptr_t>(p));
|
|
2859
|
+
RustCallStatus status = {0};
|
|
2860
|
+
uniffi_cojson_core_rn_fn_free_sessionlog(pointer, &status);
|
|
2861
|
+
};
|
|
2862
|
+
auto ptrObj = std::make_shared<uniffi_jsi::DestructibleObject>(pointer, destructor);
|
|
2863
|
+
auto obj = jsi::Object::createFromHostObject(rt, ptrObj);
|
|
2864
|
+
return jsi::Value(rt, obj);
|
|
2865
|
+
}
|
|
2866
|
+
|
|
2867
|
+
// Methods calling directly into the uniffi generated C API of the Rust crate.
|
|
2868
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_clone_blake3hasher(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2869
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2870
|
+
auto value = uniffi_cojson_core_rn_fn_clone_blake3hasher(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
2871
|
+
&status
|
|
2872
|
+
);
|
|
2873
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2874
|
+
|
|
2875
|
+
|
|
2876
|
+
return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
|
|
2877
|
+
}
|
|
2878
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_free_blake3hasher(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2879
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2880
|
+
uniffi_cojson_core_rn_fn_free_blake3hasher(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
2881
|
+
&status
|
|
2882
|
+
);
|
|
2883
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2884
|
+
|
|
2885
|
+
|
|
2886
|
+
return jsi::Value::undefined();
|
|
2887
|
+
}
|
|
2888
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_constructor_blake3hasher_new(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2889
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2890
|
+
auto value = uniffi_cojson_core_rn_fn_constructor_blake3hasher_new(&status
|
|
2891
|
+
);
|
|
2892
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2893
|
+
|
|
2894
|
+
|
|
2895
|
+
return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
|
|
2896
|
+
}
|
|
2897
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_method_blake3hasher_clone_hasher(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2898
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2899
|
+
auto value = uniffi_cojson_core_rn_fn_method_blake3hasher_clone_hasher(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
2900
|
+
&status
|
|
2901
|
+
);
|
|
2902
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2903
|
+
|
|
2904
|
+
|
|
2905
|
+
return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
|
|
2906
|
+
}
|
|
2907
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_method_blake3hasher_finalize(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2908
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2909
|
+
auto value = uniffi_cojson_core_rn_fn_method_blake3hasher_finalize(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
2910
|
+
&status
|
|
2911
|
+
);
|
|
2912
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2913
|
+
|
|
2914
|
+
|
|
2915
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2916
|
+
}
|
|
2917
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_method_blake3hasher_update(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2918
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2919
|
+
uniffi_cojson_core_rn_fn_method_blake3hasher_update(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
|
|
2920
|
+
&status
|
|
2921
|
+
);
|
|
2922
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2923
|
+
|
|
2924
|
+
|
|
2925
|
+
return jsi::Value::undefined();
|
|
2926
|
+
}
|
|
2927
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_clone_sessionlog(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2928
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2929
|
+
auto value = uniffi_cojson_core_rn_fn_clone_sessionlog(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
2930
|
+
&status
|
|
2931
|
+
);
|
|
2932
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2933
|
+
|
|
2934
|
+
|
|
2935
|
+
return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
|
|
2936
|
+
}
|
|
2937
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_free_sessionlog(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2938
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2939
|
+
uniffi_cojson_core_rn_fn_free_sessionlog(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
2940
|
+
&status
|
|
2941
|
+
);
|
|
2942
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2943
|
+
|
|
2944
|
+
|
|
2945
|
+
return jsi::Value::undefined();
|
|
2946
|
+
}
|
|
2947
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_constructor_sessionlog_new(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2948
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2949
|
+
auto value = uniffi_cojson_core_rn_fn_constructor_sessionlog_new(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]),
|
|
2950
|
+
&status
|
|
2951
|
+
);
|
|
2952
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2953
|
+
|
|
2954
|
+
|
|
2955
|
+
return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
|
|
2956
|
+
}
|
|
2957
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_method_sessionlog_add_new_private_transaction(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2958
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2959
|
+
auto value = uniffi_cojson_core_rn_fn_method_sessionlog_add_new_private_transaction(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[3]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[4]), uniffi_jsi::Bridging<double>::fromJs(rt, callInvoker, args[5]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[6]),
|
|
2960
|
+
&status
|
|
2961
|
+
);
|
|
2962
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2963
|
+
|
|
2964
|
+
|
|
2965
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2966
|
+
}
|
|
2967
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_method_sessionlog_add_new_trusting_transaction(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2968
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2969
|
+
auto value = uniffi_cojson_core_rn_fn_method_sessionlog_add_new_trusting_transaction(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]), uniffi_jsi::Bridging<double>::fromJs(rt, callInvoker, args[3]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[4]),
|
|
2970
|
+
&status
|
|
2971
|
+
);
|
|
2972
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2973
|
+
|
|
2974
|
+
|
|
2975
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2976
|
+
}
|
|
2977
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_method_sessionlog_clone_session_log(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2978
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2979
|
+
auto value = uniffi_cojson_core_rn_fn_method_sessionlog_clone_session_log(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
2980
|
+
&status
|
|
2981
|
+
);
|
|
2982
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2983
|
+
|
|
2984
|
+
|
|
2985
|
+
return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
|
|
2986
|
+
}
|
|
2987
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_method_sessionlog_decrypt_next_transaction_changes_json(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2988
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2989
|
+
auto value = uniffi_cojson_core_rn_fn_method_sessionlog_decrypt_next_transaction_changes_json(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), uniffi_jsi::Bridging<uint32_t>::fromJs(rt, callInvoker, args[1]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]),
|
|
2990
|
+
&status
|
|
2991
|
+
);
|
|
2992
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2993
|
+
|
|
2994
|
+
|
|
2995
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2996
|
+
}
|
|
2997
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_method_sessionlog_decrypt_next_transaction_meta_json(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2998
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2999
|
+
auto value = uniffi_cojson_core_rn_fn_method_sessionlog_decrypt_next_transaction_meta_json(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), uniffi_jsi::Bridging<uint32_t>::fromJs(rt, callInvoker, args[1]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]),
|
|
3000
|
+
&status
|
|
3001
|
+
);
|
|
3002
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3003
|
+
|
|
3004
|
+
|
|
3005
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3006
|
+
}
|
|
3007
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_method_sessionlog_try_add(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3008
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3009
|
+
uniffi_cojson_core_rn_fn_method_sessionlog_try_add(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]), uniffi_jsi::Bridging<int8_t>::fromJs(rt, callInvoker, args[3]),
|
|
3010
|
+
&status
|
|
3011
|
+
);
|
|
3012
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3013
|
+
|
|
3014
|
+
|
|
3015
|
+
return jsi::Value::undefined();
|
|
3016
|
+
}
|
|
3017
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_blake3_hash_once(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3018
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3019
|
+
auto value = uniffi_cojson_core_rn_fn_func_blake3_hash_once(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]),
|
|
3020
|
+
&status
|
|
3021
|
+
);
|
|
3022
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3023
|
+
|
|
3024
|
+
|
|
3025
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3026
|
+
}
|
|
3027
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_blake3_hash_once_with_context(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3028
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3029
|
+
auto value = uniffi_cojson_core_rn_fn_func_blake3_hash_once_with_context(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
|
|
3030
|
+
&status
|
|
3031
|
+
);
|
|
3032
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3033
|
+
|
|
3034
|
+
|
|
3035
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3036
|
+
}
|
|
3037
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_decrypt(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3038
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3039
|
+
auto value = uniffi_cojson_core_rn_fn_func_decrypt(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]),
|
|
3040
|
+
&status
|
|
3041
|
+
);
|
|
3042
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3043
|
+
|
|
3044
|
+
|
|
3045
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3046
|
+
}
|
|
3047
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_decrypt_xsalsa20(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3048
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3049
|
+
auto value = uniffi_cojson_core_rn_fn_func_decrypt_xsalsa20(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]),
|
|
3050
|
+
&status
|
|
3051
|
+
);
|
|
3052
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3053
|
+
|
|
3054
|
+
|
|
3055
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3056
|
+
}
|
|
3057
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_ed25519_sign(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3058
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3059
|
+
auto value = uniffi_cojson_core_rn_fn_func_ed25519_sign(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
|
|
3060
|
+
&status
|
|
3061
|
+
);
|
|
3062
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3063
|
+
|
|
3064
|
+
|
|
3065
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3066
|
+
}
|
|
3067
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_ed25519_signature_from_bytes(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3068
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3069
|
+
auto value = uniffi_cojson_core_rn_fn_func_ed25519_signature_from_bytes(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]),
|
|
3070
|
+
&status
|
|
3071
|
+
);
|
|
3072
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3073
|
+
|
|
3074
|
+
|
|
3075
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3076
|
+
}
|
|
3077
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_ed25519_signing_key_from_bytes(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3078
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3079
|
+
auto value = uniffi_cojson_core_rn_fn_func_ed25519_signing_key_from_bytes(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]),
|
|
3080
|
+
&status
|
|
3081
|
+
);
|
|
3082
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3083
|
+
|
|
3084
|
+
|
|
3085
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3086
|
+
}
|
|
3087
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_ed25519_signing_key_sign(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3088
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3089
|
+
auto value = uniffi_cojson_core_rn_fn_func_ed25519_signing_key_sign(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
|
|
3090
|
+
&status
|
|
3091
|
+
);
|
|
3092
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3093
|
+
|
|
3094
|
+
|
|
3095
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3096
|
+
}
|
|
3097
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_ed25519_signing_key_to_public(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3098
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3099
|
+
auto value = uniffi_cojson_core_rn_fn_func_ed25519_signing_key_to_public(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]),
|
|
3100
|
+
&status
|
|
3101
|
+
);
|
|
3102
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3103
|
+
|
|
3104
|
+
|
|
3105
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3106
|
+
}
|
|
3107
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_ed25519_verify(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3108
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3109
|
+
auto value = uniffi_cojson_core_rn_fn_func_ed25519_verify(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]),
|
|
3110
|
+
&status
|
|
3111
|
+
);
|
|
3112
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3113
|
+
|
|
3114
|
+
|
|
3115
|
+
return uniffi_jsi::Bridging<int8_t>::toJs(rt, callInvoker, value);
|
|
3116
|
+
}
|
|
3117
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_ed25519_verifying_key(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3118
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3119
|
+
auto value = uniffi_cojson_core_rn_fn_func_ed25519_verifying_key(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]),
|
|
3120
|
+
&status
|
|
3121
|
+
);
|
|
3122
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3123
|
+
|
|
3124
|
+
|
|
3125
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3126
|
+
}
|
|
3127
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_ed25519_verifying_key_from_bytes(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3128
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3129
|
+
auto value = uniffi_cojson_core_rn_fn_func_ed25519_verifying_key_from_bytes(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]),
|
|
3130
|
+
&status
|
|
3131
|
+
);
|
|
3132
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3133
|
+
|
|
3134
|
+
|
|
3135
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3136
|
+
}
|
|
3137
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_encrypt(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3138
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3139
|
+
auto value = uniffi_cojson_core_rn_fn_func_encrypt(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]),
|
|
3140
|
+
&status
|
|
3141
|
+
);
|
|
3142
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3143
|
+
|
|
3144
|
+
|
|
3145
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3146
|
+
}
|
|
3147
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_encrypt_xsalsa20(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3148
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3149
|
+
auto value = uniffi_cojson_core_rn_fn_func_encrypt_xsalsa20(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]),
|
|
3150
|
+
&status
|
|
3151
|
+
);
|
|
3152
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3153
|
+
|
|
3154
|
+
|
|
3155
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3156
|
+
}
|
|
3157
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_generate_nonce(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3158
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3159
|
+
auto value = uniffi_cojson_core_rn_fn_func_generate_nonce(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]),
|
|
3160
|
+
&status
|
|
3161
|
+
);
|
|
3162
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3163
|
+
|
|
3164
|
+
|
|
3165
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3166
|
+
}
|
|
3167
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_get_sealer_id(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3168
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3169
|
+
auto value = uniffi_cojson_core_rn_fn_func_get_sealer_id(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]),
|
|
3170
|
+
&status
|
|
3171
|
+
);
|
|
3172
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3173
|
+
|
|
3174
|
+
|
|
3175
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3176
|
+
}
|
|
3177
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_get_signer_id(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3178
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3179
|
+
auto value = uniffi_cojson_core_rn_fn_func_get_signer_id(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]),
|
|
3180
|
+
&status
|
|
3181
|
+
);
|
|
3182
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3183
|
+
|
|
3184
|
+
|
|
3185
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3186
|
+
}
|
|
3187
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_new_ed25519_signing_key(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3188
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3189
|
+
auto value = uniffi_cojson_core_rn_fn_func_new_ed25519_signing_key(&status
|
|
3190
|
+
);
|
|
3191
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3192
|
+
|
|
3193
|
+
|
|
3194
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3195
|
+
}
|
|
3196
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_new_x25519_private_key(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3197
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3198
|
+
auto value = uniffi_cojson_core_rn_fn_func_new_x25519_private_key(&status
|
|
3199
|
+
);
|
|
3200
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3201
|
+
|
|
3202
|
+
|
|
3203
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3204
|
+
}
|
|
3205
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_seal(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3206
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3207
|
+
auto value = uniffi_cojson_core_rn_fn_func_seal(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[3]),
|
|
3208
|
+
&status
|
|
3209
|
+
);
|
|
3210
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3211
|
+
|
|
3212
|
+
|
|
3213
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3214
|
+
}
|
|
3215
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_sign(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3216
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3217
|
+
auto value = uniffi_cojson_core_rn_fn_func_sign(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
|
|
3218
|
+
&status
|
|
3219
|
+
);
|
|
3220
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3221
|
+
|
|
3222
|
+
|
|
3223
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3224
|
+
}
|
|
3225
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_unseal(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3226
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3227
|
+
auto value = uniffi_cojson_core_rn_fn_func_unseal(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[3]),
|
|
3228
|
+
&status
|
|
3229
|
+
);
|
|
3230
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3231
|
+
|
|
3232
|
+
|
|
3233
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3234
|
+
}
|
|
3235
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_verify(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3236
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3237
|
+
auto value = uniffi_cojson_core_rn_fn_func_verify(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]),
|
|
3238
|
+
&status
|
|
3239
|
+
);
|
|
3240
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3241
|
+
|
|
3242
|
+
|
|
3243
|
+
return uniffi_jsi::Bridging<int8_t>::toJs(rt, callInvoker, value);
|
|
3244
|
+
}
|
|
3245
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_x25519_diffie_hellman(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3246
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3247
|
+
auto value = uniffi_cojson_core_rn_fn_func_x25519_diffie_hellman(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]), uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
|
|
3248
|
+
&status
|
|
3249
|
+
);
|
|
3250
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3251
|
+
|
|
3252
|
+
|
|
3253
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3254
|
+
}
|
|
3255
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_fn_func_x25519_public_key(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3256
|
+
RustCallStatus status = uniffi::cojson_core_rn::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
3257
|
+
auto value = uniffi_cojson_core_rn_fn_func_x25519_public_key(uniffi::cojson_core_rn::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[0]),
|
|
3258
|
+
&status
|
|
3259
|
+
);
|
|
3260
|
+
uniffi::cojson_core_rn::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
3261
|
+
|
|
3262
|
+
|
|
3263
|
+
return uniffi::cojson_core_rn::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
3264
|
+
}
|
|
3265
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_blake3_hash_once(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3266
|
+
auto value = uniffi_cojson_core_rn_checksum_func_blake3_hash_once(
|
|
3267
|
+
);
|
|
3268
|
+
|
|
3269
|
+
|
|
3270
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3271
|
+
}
|
|
3272
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_blake3_hash_once_with_context(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3273
|
+
auto value = uniffi_cojson_core_rn_checksum_func_blake3_hash_once_with_context(
|
|
3274
|
+
);
|
|
3275
|
+
|
|
3276
|
+
|
|
3277
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3278
|
+
}
|
|
3279
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_decrypt(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3280
|
+
auto value = uniffi_cojson_core_rn_checksum_func_decrypt(
|
|
3281
|
+
);
|
|
3282
|
+
|
|
3283
|
+
|
|
3284
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3285
|
+
}
|
|
3286
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_decrypt_xsalsa20(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3287
|
+
auto value = uniffi_cojson_core_rn_checksum_func_decrypt_xsalsa20(
|
|
3288
|
+
);
|
|
3289
|
+
|
|
3290
|
+
|
|
3291
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3292
|
+
}
|
|
3293
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_ed25519_sign(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3294
|
+
auto value = uniffi_cojson_core_rn_checksum_func_ed25519_sign(
|
|
3295
|
+
);
|
|
3296
|
+
|
|
3297
|
+
|
|
3298
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3299
|
+
}
|
|
3300
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_ed25519_signature_from_bytes(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3301
|
+
auto value = uniffi_cojson_core_rn_checksum_func_ed25519_signature_from_bytes(
|
|
3302
|
+
);
|
|
3303
|
+
|
|
3304
|
+
|
|
3305
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3306
|
+
}
|
|
3307
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_ed25519_signing_key_from_bytes(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3308
|
+
auto value = uniffi_cojson_core_rn_checksum_func_ed25519_signing_key_from_bytes(
|
|
3309
|
+
);
|
|
3310
|
+
|
|
3311
|
+
|
|
3312
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3313
|
+
}
|
|
3314
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_ed25519_signing_key_sign(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3315
|
+
auto value = uniffi_cojson_core_rn_checksum_func_ed25519_signing_key_sign(
|
|
3316
|
+
);
|
|
3317
|
+
|
|
3318
|
+
|
|
3319
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3320
|
+
}
|
|
3321
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_ed25519_signing_key_to_public(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3322
|
+
auto value = uniffi_cojson_core_rn_checksum_func_ed25519_signing_key_to_public(
|
|
3323
|
+
);
|
|
3324
|
+
|
|
3325
|
+
|
|
3326
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3327
|
+
}
|
|
3328
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_ed25519_verify(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3329
|
+
auto value = uniffi_cojson_core_rn_checksum_func_ed25519_verify(
|
|
3330
|
+
);
|
|
3331
|
+
|
|
3332
|
+
|
|
3333
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3334
|
+
}
|
|
3335
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_ed25519_verifying_key(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3336
|
+
auto value = uniffi_cojson_core_rn_checksum_func_ed25519_verifying_key(
|
|
3337
|
+
);
|
|
3338
|
+
|
|
3339
|
+
|
|
3340
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3341
|
+
}
|
|
3342
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_ed25519_verifying_key_from_bytes(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3343
|
+
auto value = uniffi_cojson_core_rn_checksum_func_ed25519_verifying_key_from_bytes(
|
|
3344
|
+
);
|
|
3345
|
+
|
|
3346
|
+
|
|
3347
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3348
|
+
}
|
|
3349
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_encrypt(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3350
|
+
auto value = uniffi_cojson_core_rn_checksum_func_encrypt(
|
|
3351
|
+
);
|
|
3352
|
+
|
|
3353
|
+
|
|
3354
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3355
|
+
}
|
|
3356
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_encrypt_xsalsa20(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3357
|
+
auto value = uniffi_cojson_core_rn_checksum_func_encrypt_xsalsa20(
|
|
3358
|
+
);
|
|
3359
|
+
|
|
3360
|
+
|
|
3361
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3362
|
+
}
|
|
3363
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_generate_nonce(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3364
|
+
auto value = uniffi_cojson_core_rn_checksum_func_generate_nonce(
|
|
3365
|
+
);
|
|
3366
|
+
|
|
3367
|
+
|
|
3368
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3369
|
+
}
|
|
3370
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_get_sealer_id(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3371
|
+
auto value = uniffi_cojson_core_rn_checksum_func_get_sealer_id(
|
|
3372
|
+
);
|
|
3373
|
+
|
|
3374
|
+
|
|
3375
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3376
|
+
}
|
|
3377
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_get_signer_id(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3378
|
+
auto value = uniffi_cojson_core_rn_checksum_func_get_signer_id(
|
|
3379
|
+
);
|
|
3380
|
+
|
|
3381
|
+
|
|
3382
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3383
|
+
}
|
|
3384
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_new_ed25519_signing_key(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3385
|
+
auto value = uniffi_cojson_core_rn_checksum_func_new_ed25519_signing_key(
|
|
3386
|
+
);
|
|
3387
|
+
|
|
3388
|
+
|
|
3389
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3390
|
+
}
|
|
3391
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_new_x25519_private_key(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3392
|
+
auto value = uniffi_cojson_core_rn_checksum_func_new_x25519_private_key(
|
|
3393
|
+
);
|
|
3394
|
+
|
|
3395
|
+
|
|
3396
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3397
|
+
}
|
|
3398
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_seal(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3399
|
+
auto value = uniffi_cojson_core_rn_checksum_func_seal(
|
|
3400
|
+
);
|
|
3401
|
+
|
|
3402
|
+
|
|
3403
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3404
|
+
}
|
|
3405
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_sign(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3406
|
+
auto value = uniffi_cojson_core_rn_checksum_func_sign(
|
|
3407
|
+
);
|
|
3408
|
+
|
|
3409
|
+
|
|
3410
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3411
|
+
}
|
|
3412
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_unseal(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3413
|
+
auto value = uniffi_cojson_core_rn_checksum_func_unseal(
|
|
3414
|
+
);
|
|
3415
|
+
|
|
3416
|
+
|
|
3417
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3418
|
+
}
|
|
3419
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_verify(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3420
|
+
auto value = uniffi_cojson_core_rn_checksum_func_verify(
|
|
3421
|
+
);
|
|
3422
|
+
|
|
3423
|
+
|
|
3424
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3425
|
+
}
|
|
3426
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_x25519_diffie_hellman(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3427
|
+
auto value = uniffi_cojson_core_rn_checksum_func_x25519_diffie_hellman(
|
|
3428
|
+
);
|
|
3429
|
+
|
|
3430
|
+
|
|
3431
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3432
|
+
}
|
|
3433
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_func_x25519_public_key(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3434
|
+
auto value = uniffi_cojson_core_rn_checksum_func_x25519_public_key(
|
|
3435
|
+
);
|
|
3436
|
+
|
|
3437
|
+
|
|
3438
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3439
|
+
}
|
|
3440
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_method_blake3hasher_clone_hasher(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3441
|
+
auto value = uniffi_cojson_core_rn_checksum_method_blake3hasher_clone_hasher(
|
|
3442
|
+
);
|
|
3443
|
+
|
|
3444
|
+
|
|
3445
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3446
|
+
}
|
|
3447
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_method_blake3hasher_finalize(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3448
|
+
auto value = uniffi_cojson_core_rn_checksum_method_blake3hasher_finalize(
|
|
3449
|
+
);
|
|
3450
|
+
|
|
3451
|
+
|
|
3452
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3453
|
+
}
|
|
3454
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_method_blake3hasher_update(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3455
|
+
auto value = uniffi_cojson_core_rn_checksum_method_blake3hasher_update(
|
|
3456
|
+
);
|
|
3457
|
+
|
|
3458
|
+
|
|
3459
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3460
|
+
}
|
|
3461
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_method_sessionlog_add_new_private_transaction(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3462
|
+
auto value = uniffi_cojson_core_rn_checksum_method_sessionlog_add_new_private_transaction(
|
|
3463
|
+
);
|
|
3464
|
+
|
|
3465
|
+
|
|
3466
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3467
|
+
}
|
|
3468
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_method_sessionlog_add_new_trusting_transaction(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3469
|
+
auto value = uniffi_cojson_core_rn_checksum_method_sessionlog_add_new_trusting_transaction(
|
|
3470
|
+
);
|
|
3471
|
+
|
|
3472
|
+
|
|
3473
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3474
|
+
}
|
|
3475
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_method_sessionlog_clone_session_log(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3476
|
+
auto value = uniffi_cojson_core_rn_checksum_method_sessionlog_clone_session_log(
|
|
3477
|
+
);
|
|
3478
|
+
|
|
3479
|
+
|
|
3480
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3481
|
+
}
|
|
3482
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_method_sessionlog_decrypt_next_transaction_changes_json(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3483
|
+
auto value = uniffi_cojson_core_rn_checksum_method_sessionlog_decrypt_next_transaction_changes_json(
|
|
3484
|
+
);
|
|
3485
|
+
|
|
3486
|
+
|
|
3487
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3488
|
+
}
|
|
3489
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_method_sessionlog_decrypt_next_transaction_meta_json(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3490
|
+
auto value = uniffi_cojson_core_rn_checksum_method_sessionlog_decrypt_next_transaction_meta_json(
|
|
3491
|
+
);
|
|
3492
|
+
|
|
3493
|
+
|
|
3494
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3495
|
+
}
|
|
3496
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_method_sessionlog_try_add(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3497
|
+
auto value = uniffi_cojson_core_rn_checksum_method_sessionlog_try_add(
|
|
3498
|
+
);
|
|
3499
|
+
|
|
3500
|
+
|
|
3501
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3502
|
+
}
|
|
3503
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_constructor_blake3hasher_new(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3504
|
+
auto value = uniffi_cojson_core_rn_checksum_constructor_blake3hasher_new(
|
|
3505
|
+
);
|
|
3506
|
+
|
|
3507
|
+
|
|
3508
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3509
|
+
}
|
|
3510
|
+
jsi::Value NativeCojsonCoreRn::cpp_uniffi_cojson_core_rn_checksum_constructor_sessionlog_new(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3511
|
+
auto value = uniffi_cojson_core_rn_checksum_constructor_sessionlog_new(
|
|
3512
|
+
);
|
|
3513
|
+
|
|
3514
|
+
|
|
3515
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
3516
|
+
}
|
|
3517
|
+
jsi::Value NativeCojsonCoreRn::cpp_ffi_cojson_core_rn_uniffi_contract_version(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
3518
|
+
auto value = ffi_cojson_core_rn_uniffi_contract_version(
|
|
3519
|
+
);
|
|
3520
|
+
|
|
3521
|
+
|
|
3522
|
+
return uniffi_jsi::Bridging<uint32_t>::toJs(rt, callInvoker, value);
|
|
3523
|
+
}
|