@synonymdev/react-native-pubky 0.8.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -9
- package/android/src/main/java/com/pubky/PubkyModule.kt +364 -273
- package/android/src/main/java/uniffi/pubkycore/pubkycore.kt +1327 -0
- package/android/src/main/jniLibs/arm64-v8a/libpubkycore.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libpubkycore.so +0 -0
- package/android/src/main/jniLibs/x86/libpubkycore.so +0 -0
- package/android/src/main/jniLibs/x86_64/libpubkycore.so +0 -0
- package/ios/Frameworks/{PubkyMobile.xcframework → PubkyCore.xcframework}/Info.plist +8 -8
- package/ios/Frameworks/{PubkyMobile.xcframework → PubkyCore.xcframework}/ios-arm64/Headers/module.modulemap +2 -2
- package/ios/Frameworks/PubkyCore.xcframework/ios-arm64/Headers/pubkycoreFFI.h +297 -0
- package/ios/Frameworks/{PubkyMobile.xcframework/ios-arm64/libpubkymobile.a → PubkyCore.xcframework/ios-arm64/libpubkycore.a} +0 -0
- package/ios/Frameworks/{PubkyMobile.xcframework → PubkyCore.xcframework}/ios-arm64-simulator/Headers/module.modulemap +2 -2
- package/ios/Frameworks/PubkyCore.xcframework/ios-arm64-simulator/Headers/pubkycoreFFI.h +297 -0
- package/ios/Frameworks/{PubkyMobile.xcframework/ios-arm64-simulator/libpubkymobile.a → PubkyCore.xcframework/ios-arm64-simulator/libpubkycore.a} +0 -0
- package/ios/Pubky-Bridging-Header.h +1 -0
- package/ios/Pubky.mm +16 -1
- package/ios/Pubky.swift +64 -1
- package/ios/{pubkymobile.swift → pubkycore.swift} +354 -37
- package/lib/commonjs/index.js +45 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +42 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +16 -9
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +16 -9
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +12 -7
- package/react-native-pubky.podspec +1 -1
- package/src/index.tsx +62 -9
- package/android/src/main/java/uniffi/pubkymobile/pubkymobile.kt +0 -862
- package/android/src/main/jniLibs/arm64-v8a/libpubkymobile.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libpubkymobile.so +0 -0
- package/android/src/main/jniLibs/x86/libpubkymobile.so +0 -0
- package/android/src/main/jniLibs/x86_64/libpubkymobile.so +0 -0
- package/ios/Frameworks/PubkyMobile.xcframework/ios-arm64/Headers/mobileFFI.h +0 -188
- package/ios/Frameworks/PubkyMobile.xcframework/ios-arm64/Headers/pubkymobileFFI.h +0 -264
- package/ios/Frameworks/PubkyMobile.xcframework/ios-arm64/libmobile.a +0 -0
- package/ios/Frameworks/PubkyMobile.xcframework/ios-arm64-simulator/Headers/mobileFFI.h +0 -188
- package/ios/Frameworks/PubkyMobile.xcframework/ios-arm64-simulator/Headers/pubkymobileFFI.h +0 -264
- package/ios/Frameworks/PubkyMobile.xcframework/ios-arm64-simulator/libmobile.a +0 -0
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -6,37 +6,37 @@
|
|
6
6
|
<array>
|
7
7
|
<dict>
|
8
8
|
<key>BinaryPath</key>
|
9
|
-
<string>
|
9
|
+
<string>libpubkycore.a</string>
|
10
10
|
<key>HeadersPath</key>
|
11
11
|
<string>Headers</string>
|
12
12
|
<key>LibraryIdentifier</key>
|
13
|
-
<string>ios-arm64</string>
|
13
|
+
<string>ios-arm64-simulator</string>
|
14
14
|
<key>LibraryPath</key>
|
15
|
-
<string>
|
15
|
+
<string>libpubkycore.a</string>
|
16
16
|
<key>SupportedArchitectures</key>
|
17
17
|
<array>
|
18
18
|
<string>arm64</string>
|
19
19
|
</array>
|
20
20
|
<key>SupportedPlatform</key>
|
21
21
|
<string>ios</string>
|
22
|
+
<key>SupportedPlatformVariant</key>
|
23
|
+
<string>simulator</string>
|
22
24
|
</dict>
|
23
25
|
<dict>
|
24
26
|
<key>BinaryPath</key>
|
25
|
-
<string>
|
27
|
+
<string>libpubkycore.a</string>
|
26
28
|
<key>HeadersPath</key>
|
27
29
|
<string>Headers</string>
|
28
30
|
<key>LibraryIdentifier</key>
|
29
|
-
<string>ios-arm64
|
31
|
+
<string>ios-arm64</string>
|
30
32
|
<key>LibraryPath</key>
|
31
|
-
<string>
|
33
|
+
<string>libpubkycore.a</string>
|
32
34
|
<key>SupportedArchitectures</key>
|
33
35
|
<array>
|
34
36
|
<string>arm64</string>
|
35
37
|
</array>
|
36
38
|
<key>SupportedPlatform</key>
|
37
39
|
<string>ios</string>
|
38
|
-
<key>SupportedPlatformVariant</key>
|
39
|
-
<string>simulator</string>
|
40
40
|
</dict>
|
41
41
|
</array>
|
42
42
|
<key>CFBundlePackageType</key>
|
@@ -0,0 +1,297 @@
|
|
1
|
+
// This file was autogenerated by some hot garbage in the `uniffi` crate.
|
2
|
+
// Trust me, you don't want to mess with it!
|
3
|
+
|
4
|
+
#pragma once
|
5
|
+
|
6
|
+
#include <stdbool.h>
|
7
|
+
#include <stddef.h>
|
8
|
+
#include <stdint.h>
|
9
|
+
|
10
|
+
// The following structs are used to implement the lowest level
|
11
|
+
// of the FFI, and thus useful to multiple uniffied crates.
|
12
|
+
// We ensure they are declared exactly once, with a header guard, UNIFFI_SHARED_H.
|
13
|
+
#ifdef UNIFFI_SHARED_H
|
14
|
+
// We also try to prevent mixing versions of shared uniffi header structs.
|
15
|
+
// If you add anything to the #else block, you must increment the version suffix in UNIFFI_SHARED_HEADER_V4
|
16
|
+
#ifndef UNIFFI_SHARED_HEADER_V4
|
17
|
+
#error Combining helper code from multiple versions of uniffi is not supported
|
18
|
+
#endif // ndef UNIFFI_SHARED_HEADER_V4
|
19
|
+
#else
|
20
|
+
#define UNIFFI_SHARED_H
|
21
|
+
#define UNIFFI_SHARED_HEADER_V4
|
22
|
+
// ⚠️ Attention: If you change this #else block (ending in `#endif // def UNIFFI_SHARED_H`) you *must* ⚠️
|
23
|
+
// ⚠️ increment the version suffix in all instances of UNIFFI_SHARED_HEADER_V4 in this file. ⚠️
|
24
|
+
|
25
|
+
typedef struct RustBuffer
|
26
|
+
{
|
27
|
+
int32_t capacity;
|
28
|
+
int32_t len;
|
29
|
+
uint8_t *_Nullable data;
|
30
|
+
} RustBuffer;
|
31
|
+
|
32
|
+
typedef int32_t (*ForeignCallback)(uint64_t, int32_t, const uint8_t *_Nonnull, int32_t, RustBuffer *_Nonnull);
|
33
|
+
|
34
|
+
// Task defined in Rust that Swift executes
|
35
|
+
typedef void (*UniFfiRustTaskCallback)(const void * _Nullable, int8_t);
|
36
|
+
|
37
|
+
// Callback to execute Rust tasks using a Swift Task
|
38
|
+
//
|
39
|
+
// Args:
|
40
|
+
// executor: ForeignExecutor lowered into a size_t value
|
41
|
+
// delay: Delay in MS
|
42
|
+
// task: UniFfiRustTaskCallback to call
|
43
|
+
// task_data: data to pass the task callback
|
44
|
+
typedef int8_t (*UniFfiForeignExecutorCallback)(size_t, uint32_t, UniFfiRustTaskCallback _Nullable, const void * _Nullable);
|
45
|
+
|
46
|
+
typedef struct ForeignBytes
|
47
|
+
{
|
48
|
+
int32_t len;
|
49
|
+
const uint8_t *_Nullable data;
|
50
|
+
} ForeignBytes;
|
51
|
+
|
52
|
+
// Error definitions
|
53
|
+
typedef struct RustCallStatus {
|
54
|
+
int8_t code;
|
55
|
+
RustBuffer errorBuf;
|
56
|
+
} RustCallStatus;
|
57
|
+
|
58
|
+
// ⚠️ Attention: If you change this #else block (ending in `#endif // def UNIFFI_SHARED_H`) you *must* ⚠️
|
59
|
+
// ⚠️ increment the version suffix in all instances of UNIFFI_SHARED_HEADER_V4 in this file. ⚠️
|
60
|
+
#endif // def UNIFFI_SHARED_H
|
61
|
+
|
62
|
+
// Continuation callback for UniFFI Futures
|
63
|
+
typedef void (*UniFfiRustFutureContinuation)(void * _Nonnull, int8_t);
|
64
|
+
|
65
|
+
// Scaffolding functions
|
66
|
+
void uniffi_pubkycore_fn_free_eventnotifier(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status
|
67
|
+
);
|
68
|
+
void uniffi_pubkycore_fn_init_callback_eventlistener(ForeignCallback _Nonnull callback_stub, RustCallStatus *_Nonnull out_status
|
69
|
+
);
|
70
|
+
RustBuffer uniffi_pubkycore_fn_func_auth(RustBuffer url, RustBuffer secret_key, RustCallStatus *_Nonnull out_status
|
71
|
+
);
|
72
|
+
RustBuffer uniffi_pubkycore_fn_func_create_recovery_file(RustBuffer secret_key, RustBuffer passphrase, RustCallStatus *_Nonnull out_status
|
73
|
+
);
|
74
|
+
RustBuffer uniffi_pubkycore_fn_func_decrypt_recovery_file(RustBuffer recovery_file, RustBuffer passphrase, RustCallStatus *_Nonnull out_status
|
75
|
+
);
|
76
|
+
RustBuffer uniffi_pubkycore_fn_func_delete_file(RustBuffer url, RustCallStatus *_Nonnull out_status
|
77
|
+
);
|
78
|
+
RustBuffer uniffi_pubkycore_fn_func_generate_secret_key(RustCallStatus *_Nonnull out_status
|
79
|
+
|
80
|
+
);
|
81
|
+
RustBuffer uniffi_pubkycore_fn_func_get(RustBuffer url, RustCallStatus *_Nonnull out_status
|
82
|
+
);
|
83
|
+
RustBuffer uniffi_pubkycore_fn_func_get_public_key_from_secret_key(RustBuffer secret_key, RustCallStatus *_Nonnull out_status
|
84
|
+
);
|
85
|
+
RustBuffer uniffi_pubkycore_fn_func_list(RustBuffer url, RustCallStatus *_Nonnull out_status
|
86
|
+
);
|
87
|
+
RustBuffer uniffi_pubkycore_fn_func_parse_auth_url(RustBuffer url, RustCallStatus *_Nonnull out_status
|
88
|
+
);
|
89
|
+
RustBuffer uniffi_pubkycore_fn_func_publish(RustBuffer record_name, RustBuffer record_content, RustBuffer secret_key, RustCallStatus *_Nonnull out_status
|
90
|
+
);
|
91
|
+
RustBuffer uniffi_pubkycore_fn_func_publish_https(RustBuffer record_name, RustBuffer target, RustBuffer secret_key, RustCallStatus *_Nonnull out_status
|
92
|
+
);
|
93
|
+
RustBuffer uniffi_pubkycore_fn_func_put(RustBuffer url, RustBuffer content, RustCallStatus *_Nonnull out_status
|
94
|
+
);
|
95
|
+
void uniffi_pubkycore_fn_func_remove_event_listener(RustCallStatus *_Nonnull out_status
|
96
|
+
|
97
|
+
);
|
98
|
+
RustBuffer uniffi_pubkycore_fn_func_resolve(RustBuffer public_key, RustCallStatus *_Nonnull out_status
|
99
|
+
);
|
100
|
+
RustBuffer uniffi_pubkycore_fn_func_resolve_https(RustBuffer public_key, RustCallStatus *_Nonnull out_status
|
101
|
+
);
|
102
|
+
RustBuffer uniffi_pubkycore_fn_func_session(RustBuffer pubky, RustCallStatus *_Nonnull out_status
|
103
|
+
);
|
104
|
+
void uniffi_pubkycore_fn_func_set_event_listener(uint64_t listener, RustCallStatus *_Nonnull out_status
|
105
|
+
);
|
106
|
+
RustBuffer uniffi_pubkycore_fn_func_sign_in(RustBuffer secret_key, RustCallStatus *_Nonnull out_status
|
107
|
+
);
|
108
|
+
RustBuffer uniffi_pubkycore_fn_func_sign_out(RustBuffer secret_key, RustCallStatus *_Nonnull out_status
|
109
|
+
);
|
110
|
+
RustBuffer uniffi_pubkycore_fn_func_sign_up(RustBuffer secret_key, RustBuffer homeserver, RustCallStatus *_Nonnull out_status
|
111
|
+
);
|
112
|
+
RustBuffer uniffi_pubkycore_fn_func_switch_network(int8_t use_testnet, RustCallStatus *_Nonnull out_status
|
113
|
+
);
|
114
|
+
RustBuffer ffi_pubkycore_rustbuffer_alloc(int32_t size, RustCallStatus *_Nonnull out_status
|
115
|
+
);
|
116
|
+
RustBuffer ffi_pubkycore_rustbuffer_from_bytes(ForeignBytes bytes, RustCallStatus *_Nonnull out_status
|
117
|
+
);
|
118
|
+
void ffi_pubkycore_rustbuffer_free(RustBuffer buf, RustCallStatus *_Nonnull out_status
|
119
|
+
);
|
120
|
+
RustBuffer ffi_pubkycore_rustbuffer_reserve(RustBuffer buf, int32_t additional, RustCallStatus *_Nonnull out_status
|
121
|
+
);
|
122
|
+
void ffi_pubkycore_rust_future_continuation_callback_set(UniFfiRustFutureContinuation _Nonnull callback
|
123
|
+
);
|
124
|
+
void ffi_pubkycore_rust_future_poll_u8(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
125
|
+
);
|
126
|
+
void ffi_pubkycore_rust_future_cancel_u8(void* _Nonnull handle
|
127
|
+
);
|
128
|
+
void ffi_pubkycore_rust_future_free_u8(void* _Nonnull handle
|
129
|
+
);
|
130
|
+
uint8_t ffi_pubkycore_rust_future_complete_u8(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
131
|
+
);
|
132
|
+
void ffi_pubkycore_rust_future_poll_i8(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
133
|
+
);
|
134
|
+
void ffi_pubkycore_rust_future_cancel_i8(void* _Nonnull handle
|
135
|
+
);
|
136
|
+
void ffi_pubkycore_rust_future_free_i8(void* _Nonnull handle
|
137
|
+
);
|
138
|
+
int8_t ffi_pubkycore_rust_future_complete_i8(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
139
|
+
);
|
140
|
+
void ffi_pubkycore_rust_future_poll_u16(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
141
|
+
);
|
142
|
+
void ffi_pubkycore_rust_future_cancel_u16(void* _Nonnull handle
|
143
|
+
);
|
144
|
+
void ffi_pubkycore_rust_future_free_u16(void* _Nonnull handle
|
145
|
+
);
|
146
|
+
uint16_t ffi_pubkycore_rust_future_complete_u16(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
147
|
+
);
|
148
|
+
void ffi_pubkycore_rust_future_poll_i16(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
149
|
+
);
|
150
|
+
void ffi_pubkycore_rust_future_cancel_i16(void* _Nonnull handle
|
151
|
+
);
|
152
|
+
void ffi_pubkycore_rust_future_free_i16(void* _Nonnull handle
|
153
|
+
);
|
154
|
+
int16_t ffi_pubkycore_rust_future_complete_i16(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
155
|
+
);
|
156
|
+
void ffi_pubkycore_rust_future_poll_u32(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
157
|
+
);
|
158
|
+
void ffi_pubkycore_rust_future_cancel_u32(void* _Nonnull handle
|
159
|
+
);
|
160
|
+
void ffi_pubkycore_rust_future_free_u32(void* _Nonnull handle
|
161
|
+
);
|
162
|
+
uint32_t ffi_pubkycore_rust_future_complete_u32(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
163
|
+
);
|
164
|
+
void ffi_pubkycore_rust_future_poll_i32(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
165
|
+
);
|
166
|
+
void ffi_pubkycore_rust_future_cancel_i32(void* _Nonnull handle
|
167
|
+
);
|
168
|
+
void ffi_pubkycore_rust_future_free_i32(void* _Nonnull handle
|
169
|
+
);
|
170
|
+
int32_t ffi_pubkycore_rust_future_complete_i32(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
171
|
+
);
|
172
|
+
void ffi_pubkycore_rust_future_poll_u64(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
173
|
+
);
|
174
|
+
void ffi_pubkycore_rust_future_cancel_u64(void* _Nonnull handle
|
175
|
+
);
|
176
|
+
void ffi_pubkycore_rust_future_free_u64(void* _Nonnull handle
|
177
|
+
);
|
178
|
+
uint64_t ffi_pubkycore_rust_future_complete_u64(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
179
|
+
);
|
180
|
+
void ffi_pubkycore_rust_future_poll_i64(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
181
|
+
);
|
182
|
+
void ffi_pubkycore_rust_future_cancel_i64(void* _Nonnull handle
|
183
|
+
);
|
184
|
+
void ffi_pubkycore_rust_future_free_i64(void* _Nonnull handle
|
185
|
+
);
|
186
|
+
int64_t ffi_pubkycore_rust_future_complete_i64(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
187
|
+
);
|
188
|
+
void ffi_pubkycore_rust_future_poll_f32(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
189
|
+
);
|
190
|
+
void ffi_pubkycore_rust_future_cancel_f32(void* _Nonnull handle
|
191
|
+
);
|
192
|
+
void ffi_pubkycore_rust_future_free_f32(void* _Nonnull handle
|
193
|
+
);
|
194
|
+
float ffi_pubkycore_rust_future_complete_f32(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
195
|
+
);
|
196
|
+
void ffi_pubkycore_rust_future_poll_f64(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
197
|
+
);
|
198
|
+
void ffi_pubkycore_rust_future_cancel_f64(void* _Nonnull handle
|
199
|
+
);
|
200
|
+
void ffi_pubkycore_rust_future_free_f64(void* _Nonnull handle
|
201
|
+
);
|
202
|
+
double ffi_pubkycore_rust_future_complete_f64(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
203
|
+
);
|
204
|
+
void ffi_pubkycore_rust_future_poll_pointer(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
205
|
+
);
|
206
|
+
void ffi_pubkycore_rust_future_cancel_pointer(void* _Nonnull handle
|
207
|
+
);
|
208
|
+
void ffi_pubkycore_rust_future_free_pointer(void* _Nonnull handle
|
209
|
+
);
|
210
|
+
void*_Nonnull ffi_pubkycore_rust_future_complete_pointer(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
211
|
+
);
|
212
|
+
void ffi_pubkycore_rust_future_poll_rust_buffer(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
213
|
+
);
|
214
|
+
void ffi_pubkycore_rust_future_cancel_rust_buffer(void* _Nonnull handle
|
215
|
+
);
|
216
|
+
void ffi_pubkycore_rust_future_free_rust_buffer(void* _Nonnull handle
|
217
|
+
);
|
218
|
+
RustBuffer ffi_pubkycore_rust_future_complete_rust_buffer(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
219
|
+
);
|
220
|
+
void ffi_pubkycore_rust_future_poll_void(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
221
|
+
);
|
222
|
+
void ffi_pubkycore_rust_future_cancel_void(void* _Nonnull handle
|
223
|
+
);
|
224
|
+
void ffi_pubkycore_rust_future_free_void(void* _Nonnull handle
|
225
|
+
);
|
226
|
+
void ffi_pubkycore_rust_future_complete_void(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
227
|
+
);
|
228
|
+
uint16_t uniffi_pubkycore_checksum_func_auth(void
|
229
|
+
|
230
|
+
);
|
231
|
+
uint16_t uniffi_pubkycore_checksum_func_create_recovery_file(void
|
232
|
+
|
233
|
+
);
|
234
|
+
uint16_t uniffi_pubkycore_checksum_func_decrypt_recovery_file(void
|
235
|
+
|
236
|
+
);
|
237
|
+
uint16_t uniffi_pubkycore_checksum_func_delete_file(void
|
238
|
+
|
239
|
+
);
|
240
|
+
uint16_t uniffi_pubkycore_checksum_func_generate_secret_key(void
|
241
|
+
|
242
|
+
);
|
243
|
+
uint16_t uniffi_pubkycore_checksum_func_get(void
|
244
|
+
|
245
|
+
);
|
246
|
+
uint16_t uniffi_pubkycore_checksum_func_get_public_key_from_secret_key(void
|
247
|
+
|
248
|
+
);
|
249
|
+
uint16_t uniffi_pubkycore_checksum_func_list(void
|
250
|
+
|
251
|
+
);
|
252
|
+
uint16_t uniffi_pubkycore_checksum_func_parse_auth_url(void
|
253
|
+
|
254
|
+
);
|
255
|
+
uint16_t uniffi_pubkycore_checksum_func_publish(void
|
256
|
+
|
257
|
+
);
|
258
|
+
uint16_t uniffi_pubkycore_checksum_func_publish_https(void
|
259
|
+
|
260
|
+
);
|
261
|
+
uint16_t uniffi_pubkycore_checksum_func_put(void
|
262
|
+
|
263
|
+
);
|
264
|
+
uint16_t uniffi_pubkycore_checksum_func_remove_event_listener(void
|
265
|
+
|
266
|
+
);
|
267
|
+
uint16_t uniffi_pubkycore_checksum_func_resolve(void
|
268
|
+
|
269
|
+
);
|
270
|
+
uint16_t uniffi_pubkycore_checksum_func_resolve_https(void
|
271
|
+
|
272
|
+
);
|
273
|
+
uint16_t uniffi_pubkycore_checksum_func_session(void
|
274
|
+
|
275
|
+
);
|
276
|
+
uint16_t uniffi_pubkycore_checksum_func_set_event_listener(void
|
277
|
+
|
278
|
+
);
|
279
|
+
uint16_t uniffi_pubkycore_checksum_func_sign_in(void
|
280
|
+
|
281
|
+
);
|
282
|
+
uint16_t uniffi_pubkycore_checksum_func_sign_out(void
|
283
|
+
|
284
|
+
);
|
285
|
+
uint16_t uniffi_pubkycore_checksum_func_sign_up(void
|
286
|
+
|
287
|
+
);
|
288
|
+
uint16_t uniffi_pubkycore_checksum_func_switch_network(void
|
289
|
+
|
290
|
+
);
|
291
|
+
uint16_t uniffi_pubkycore_checksum_method_eventlistener_on_event_occurred(void
|
292
|
+
|
293
|
+
);
|
294
|
+
uint32_t ffi_pubkycore_uniffi_contract_version(void
|
295
|
+
|
296
|
+
);
|
297
|
+
|
Binary file
|
@@ -0,0 +1,297 @@
|
|
1
|
+
// This file was autogenerated by some hot garbage in the `uniffi` crate.
|
2
|
+
// Trust me, you don't want to mess with it!
|
3
|
+
|
4
|
+
#pragma once
|
5
|
+
|
6
|
+
#include <stdbool.h>
|
7
|
+
#include <stddef.h>
|
8
|
+
#include <stdint.h>
|
9
|
+
|
10
|
+
// The following structs are used to implement the lowest level
|
11
|
+
// of the FFI, and thus useful to multiple uniffied crates.
|
12
|
+
// We ensure they are declared exactly once, with a header guard, UNIFFI_SHARED_H.
|
13
|
+
#ifdef UNIFFI_SHARED_H
|
14
|
+
// We also try to prevent mixing versions of shared uniffi header structs.
|
15
|
+
// If you add anything to the #else block, you must increment the version suffix in UNIFFI_SHARED_HEADER_V4
|
16
|
+
#ifndef UNIFFI_SHARED_HEADER_V4
|
17
|
+
#error Combining helper code from multiple versions of uniffi is not supported
|
18
|
+
#endif // ndef UNIFFI_SHARED_HEADER_V4
|
19
|
+
#else
|
20
|
+
#define UNIFFI_SHARED_H
|
21
|
+
#define UNIFFI_SHARED_HEADER_V4
|
22
|
+
// ⚠️ Attention: If you change this #else block (ending in `#endif // def UNIFFI_SHARED_H`) you *must* ⚠️
|
23
|
+
// ⚠️ increment the version suffix in all instances of UNIFFI_SHARED_HEADER_V4 in this file. ⚠️
|
24
|
+
|
25
|
+
typedef struct RustBuffer
|
26
|
+
{
|
27
|
+
int32_t capacity;
|
28
|
+
int32_t len;
|
29
|
+
uint8_t *_Nullable data;
|
30
|
+
} RustBuffer;
|
31
|
+
|
32
|
+
typedef int32_t (*ForeignCallback)(uint64_t, int32_t, const uint8_t *_Nonnull, int32_t, RustBuffer *_Nonnull);
|
33
|
+
|
34
|
+
// Task defined in Rust that Swift executes
|
35
|
+
typedef void (*UniFfiRustTaskCallback)(const void * _Nullable, int8_t);
|
36
|
+
|
37
|
+
// Callback to execute Rust tasks using a Swift Task
|
38
|
+
//
|
39
|
+
// Args:
|
40
|
+
// executor: ForeignExecutor lowered into a size_t value
|
41
|
+
// delay: Delay in MS
|
42
|
+
// task: UniFfiRustTaskCallback to call
|
43
|
+
// task_data: data to pass the task callback
|
44
|
+
typedef int8_t (*UniFfiForeignExecutorCallback)(size_t, uint32_t, UniFfiRustTaskCallback _Nullable, const void * _Nullable);
|
45
|
+
|
46
|
+
typedef struct ForeignBytes
|
47
|
+
{
|
48
|
+
int32_t len;
|
49
|
+
const uint8_t *_Nullable data;
|
50
|
+
} ForeignBytes;
|
51
|
+
|
52
|
+
// Error definitions
|
53
|
+
typedef struct RustCallStatus {
|
54
|
+
int8_t code;
|
55
|
+
RustBuffer errorBuf;
|
56
|
+
} RustCallStatus;
|
57
|
+
|
58
|
+
// ⚠️ Attention: If you change this #else block (ending in `#endif // def UNIFFI_SHARED_H`) you *must* ⚠️
|
59
|
+
// ⚠️ increment the version suffix in all instances of UNIFFI_SHARED_HEADER_V4 in this file. ⚠️
|
60
|
+
#endif // def UNIFFI_SHARED_H
|
61
|
+
|
62
|
+
// Continuation callback for UniFFI Futures
|
63
|
+
typedef void (*UniFfiRustFutureContinuation)(void * _Nonnull, int8_t);
|
64
|
+
|
65
|
+
// Scaffolding functions
|
66
|
+
void uniffi_pubkycore_fn_free_eventnotifier(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status
|
67
|
+
);
|
68
|
+
void uniffi_pubkycore_fn_init_callback_eventlistener(ForeignCallback _Nonnull callback_stub, RustCallStatus *_Nonnull out_status
|
69
|
+
);
|
70
|
+
RustBuffer uniffi_pubkycore_fn_func_auth(RustBuffer url, RustBuffer secret_key, RustCallStatus *_Nonnull out_status
|
71
|
+
);
|
72
|
+
RustBuffer uniffi_pubkycore_fn_func_create_recovery_file(RustBuffer secret_key, RustBuffer passphrase, RustCallStatus *_Nonnull out_status
|
73
|
+
);
|
74
|
+
RustBuffer uniffi_pubkycore_fn_func_decrypt_recovery_file(RustBuffer recovery_file, RustBuffer passphrase, RustCallStatus *_Nonnull out_status
|
75
|
+
);
|
76
|
+
RustBuffer uniffi_pubkycore_fn_func_delete_file(RustBuffer url, RustCallStatus *_Nonnull out_status
|
77
|
+
);
|
78
|
+
RustBuffer uniffi_pubkycore_fn_func_generate_secret_key(RustCallStatus *_Nonnull out_status
|
79
|
+
|
80
|
+
);
|
81
|
+
RustBuffer uniffi_pubkycore_fn_func_get(RustBuffer url, RustCallStatus *_Nonnull out_status
|
82
|
+
);
|
83
|
+
RustBuffer uniffi_pubkycore_fn_func_get_public_key_from_secret_key(RustBuffer secret_key, RustCallStatus *_Nonnull out_status
|
84
|
+
);
|
85
|
+
RustBuffer uniffi_pubkycore_fn_func_list(RustBuffer url, RustCallStatus *_Nonnull out_status
|
86
|
+
);
|
87
|
+
RustBuffer uniffi_pubkycore_fn_func_parse_auth_url(RustBuffer url, RustCallStatus *_Nonnull out_status
|
88
|
+
);
|
89
|
+
RustBuffer uniffi_pubkycore_fn_func_publish(RustBuffer record_name, RustBuffer record_content, RustBuffer secret_key, RustCallStatus *_Nonnull out_status
|
90
|
+
);
|
91
|
+
RustBuffer uniffi_pubkycore_fn_func_publish_https(RustBuffer record_name, RustBuffer target, RustBuffer secret_key, RustCallStatus *_Nonnull out_status
|
92
|
+
);
|
93
|
+
RustBuffer uniffi_pubkycore_fn_func_put(RustBuffer url, RustBuffer content, RustCallStatus *_Nonnull out_status
|
94
|
+
);
|
95
|
+
void uniffi_pubkycore_fn_func_remove_event_listener(RustCallStatus *_Nonnull out_status
|
96
|
+
|
97
|
+
);
|
98
|
+
RustBuffer uniffi_pubkycore_fn_func_resolve(RustBuffer public_key, RustCallStatus *_Nonnull out_status
|
99
|
+
);
|
100
|
+
RustBuffer uniffi_pubkycore_fn_func_resolve_https(RustBuffer public_key, RustCallStatus *_Nonnull out_status
|
101
|
+
);
|
102
|
+
RustBuffer uniffi_pubkycore_fn_func_session(RustBuffer pubky, RustCallStatus *_Nonnull out_status
|
103
|
+
);
|
104
|
+
void uniffi_pubkycore_fn_func_set_event_listener(uint64_t listener, RustCallStatus *_Nonnull out_status
|
105
|
+
);
|
106
|
+
RustBuffer uniffi_pubkycore_fn_func_sign_in(RustBuffer secret_key, RustCallStatus *_Nonnull out_status
|
107
|
+
);
|
108
|
+
RustBuffer uniffi_pubkycore_fn_func_sign_out(RustBuffer secret_key, RustCallStatus *_Nonnull out_status
|
109
|
+
);
|
110
|
+
RustBuffer uniffi_pubkycore_fn_func_sign_up(RustBuffer secret_key, RustBuffer homeserver, RustCallStatus *_Nonnull out_status
|
111
|
+
);
|
112
|
+
RustBuffer uniffi_pubkycore_fn_func_switch_network(int8_t use_testnet, RustCallStatus *_Nonnull out_status
|
113
|
+
);
|
114
|
+
RustBuffer ffi_pubkycore_rustbuffer_alloc(int32_t size, RustCallStatus *_Nonnull out_status
|
115
|
+
);
|
116
|
+
RustBuffer ffi_pubkycore_rustbuffer_from_bytes(ForeignBytes bytes, RustCallStatus *_Nonnull out_status
|
117
|
+
);
|
118
|
+
void ffi_pubkycore_rustbuffer_free(RustBuffer buf, RustCallStatus *_Nonnull out_status
|
119
|
+
);
|
120
|
+
RustBuffer ffi_pubkycore_rustbuffer_reserve(RustBuffer buf, int32_t additional, RustCallStatus *_Nonnull out_status
|
121
|
+
);
|
122
|
+
void ffi_pubkycore_rust_future_continuation_callback_set(UniFfiRustFutureContinuation _Nonnull callback
|
123
|
+
);
|
124
|
+
void ffi_pubkycore_rust_future_poll_u8(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
125
|
+
);
|
126
|
+
void ffi_pubkycore_rust_future_cancel_u8(void* _Nonnull handle
|
127
|
+
);
|
128
|
+
void ffi_pubkycore_rust_future_free_u8(void* _Nonnull handle
|
129
|
+
);
|
130
|
+
uint8_t ffi_pubkycore_rust_future_complete_u8(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
131
|
+
);
|
132
|
+
void ffi_pubkycore_rust_future_poll_i8(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
133
|
+
);
|
134
|
+
void ffi_pubkycore_rust_future_cancel_i8(void* _Nonnull handle
|
135
|
+
);
|
136
|
+
void ffi_pubkycore_rust_future_free_i8(void* _Nonnull handle
|
137
|
+
);
|
138
|
+
int8_t ffi_pubkycore_rust_future_complete_i8(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
139
|
+
);
|
140
|
+
void ffi_pubkycore_rust_future_poll_u16(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
141
|
+
);
|
142
|
+
void ffi_pubkycore_rust_future_cancel_u16(void* _Nonnull handle
|
143
|
+
);
|
144
|
+
void ffi_pubkycore_rust_future_free_u16(void* _Nonnull handle
|
145
|
+
);
|
146
|
+
uint16_t ffi_pubkycore_rust_future_complete_u16(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
147
|
+
);
|
148
|
+
void ffi_pubkycore_rust_future_poll_i16(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
149
|
+
);
|
150
|
+
void ffi_pubkycore_rust_future_cancel_i16(void* _Nonnull handle
|
151
|
+
);
|
152
|
+
void ffi_pubkycore_rust_future_free_i16(void* _Nonnull handle
|
153
|
+
);
|
154
|
+
int16_t ffi_pubkycore_rust_future_complete_i16(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
155
|
+
);
|
156
|
+
void ffi_pubkycore_rust_future_poll_u32(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
157
|
+
);
|
158
|
+
void ffi_pubkycore_rust_future_cancel_u32(void* _Nonnull handle
|
159
|
+
);
|
160
|
+
void ffi_pubkycore_rust_future_free_u32(void* _Nonnull handle
|
161
|
+
);
|
162
|
+
uint32_t ffi_pubkycore_rust_future_complete_u32(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
163
|
+
);
|
164
|
+
void ffi_pubkycore_rust_future_poll_i32(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
165
|
+
);
|
166
|
+
void ffi_pubkycore_rust_future_cancel_i32(void* _Nonnull handle
|
167
|
+
);
|
168
|
+
void ffi_pubkycore_rust_future_free_i32(void* _Nonnull handle
|
169
|
+
);
|
170
|
+
int32_t ffi_pubkycore_rust_future_complete_i32(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
171
|
+
);
|
172
|
+
void ffi_pubkycore_rust_future_poll_u64(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
173
|
+
);
|
174
|
+
void ffi_pubkycore_rust_future_cancel_u64(void* _Nonnull handle
|
175
|
+
);
|
176
|
+
void ffi_pubkycore_rust_future_free_u64(void* _Nonnull handle
|
177
|
+
);
|
178
|
+
uint64_t ffi_pubkycore_rust_future_complete_u64(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
179
|
+
);
|
180
|
+
void ffi_pubkycore_rust_future_poll_i64(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
181
|
+
);
|
182
|
+
void ffi_pubkycore_rust_future_cancel_i64(void* _Nonnull handle
|
183
|
+
);
|
184
|
+
void ffi_pubkycore_rust_future_free_i64(void* _Nonnull handle
|
185
|
+
);
|
186
|
+
int64_t ffi_pubkycore_rust_future_complete_i64(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
187
|
+
);
|
188
|
+
void ffi_pubkycore_rust_future_poll_f32(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
189
|
+
);
|
190
|
+
void ffi_pubkycore_rust_future_cancel_f32(void* _Nonnull handle
|
191
|
+
);
|
192
|
+
void ffi_pubkycore_rust_future_free_f32(void* _Nonnull handle
|
193
|
+
);
|
194
|
+
float ffi_pubkycore_rust_future_complete_f32(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
195
|
+
);
|
196
|
+
void ffi_pubkycore_rust_future_poll_f64(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
197
|
+
);
|
198
|
+
void ffi_pubkycore_rust_future_cancel_f64(void* _Nonnull handle
|
199
|
+
);
|
200
|
+
void ffi_pubkycore_rust_future_free_f64(void* _Nonnull handle
|
201
|
+
);
|
202
|
+
double ffi_pubkycore_rust_future_complete_f64(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
203
|
+
);
|
204
|
+
void ffi_pubkycore_rust_future_poll_pointer(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
205
|
+
);
|
206
|
+
void ffi_pubkycore_rust_future_cancel_pointer(void* _Nonnull handle
|
207
|
+
);
|
208
|
+
void ffi_pubkycore_rust_future_free_pointer(void* _Nonnull handle
|
209
|
+
);
|
210
|
+
void*_Nonnull ffi_pubkycore_rust_future_complete_pointer(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
211
|
+
);
|
212
|
+
void ffi_pubkycore_rust_future_poll_rust_buffer(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
213
|
+
);
|
214
|
+
void ffi_pubkycore_rust_future_cancel_rust_buffer(void* _Nonnull handle
|
215
|
+
);
|
216
|
+
void ffi_pubkycore_rust_future_free_rust_buffer(void* _Nonnull handle
|
217
|
+
);
|
218
|
+
RustBuffer ffi_pubkycore_rust_future_complete_rust_buffer(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
219
|
+
);
|
220
|
+
void ffi_pubkycore_rust_future_poll_void(void* _Nonnull handle, void* _Nonnull uniffi_callback
|
221
|
+
);
|
222
|
+
void ffi_pubkycore_rust_future_cancel_void(void* _Nonnull handle
|
223
|
+
);
|
224
|
+
void ffi_pubkycore_rust_future_free_void(void* _Nonnull handle
|
225
|
+
);
|
226
|
+
void ffi_pubkycore_rust_future_complete_void(void* _Nonnull handle, RustCallStatus *_Nonnull out_status
|
227
|
+
);
|
228
|
+
uint16_t uniffi_pubkycore_checksum_func_auth(void
|
229
|
+
|
230
|
+
);
|
231
|
+
uint16_t uniffi_pubkycore_checksum_func_create_recovery_file(void
|
232
|
+
|
233
|
+
);
|
234
|
+
uint16_t uniffi_pubkycore_checksum_func_decrypt_recovery_file(void
|
235
|
+
|
236
|
+
);
|
237
|
+
uint16_t uniffi_pubkycore_checksum_func_delete_file(void
|
238
|
+
|
239
|
+
);
|
240
|
+
uint16_t uniffi_pubkycore_checksum_func_generate_secret_key(void
|
241
|
+
|
242
|
+
);
|
243
|
+
uint16_t uniffi_pubkycore_checksum_func_get(void
|
244
|
+
|
245
|
+
);
|
246
|
+
uint16_t uniffi_pubkycore_checksum_func_get_public_key_from_secret_key(void
|
247
|
+
|
248
|
+
);
|
249
|
+
uint16_t uniffi_pubkycore_checksum_func_list(void
|
250
|
+
|
251
|
+
);
|
252
|
+
uint16_t uniffi_pubkycore_checksum_func_parse_auth_url(void
|
253
|
+
|
254
|
+
);
|
255
|
+
uint16_t uniffi_pubkycore_checksum_func_publish(void
|
256
|
+
|
257
|
+
);
|
258
|
+
uint16_t uniffi_pubkycore_checksum_func_publish_https(void
|
259
|
+
|
260
|
+
);
|
261
|
+
uint16_t uniffi_pubkycore_checksum_func_put(void
|
262
|
+
|
263
|
+
);
|
264
|
+
uint16_t uniffi_pubkycore_checksum_func_remove_event_listener(void
|
265
|
+
|
266
|
+
);
|
267
|
+
uint16_t uniffi_pubkycore_checksum_func_resolve(void
|
268
|
+
|
269
|
+
);
|
270
|
+
uint16_t uniffi_pubkycore_checksum_func_resolve_https(void
|
271
|
+
|
272
|
+
);
|
273
|
+
uint16_t uniffi_pubkycore_checksum_func_session(void
|
274
|
+
|
275
|
+
);
|
276
|
+
uint16_t uniffi_pubkycore_checksum_func_set_event_listener(void
|
277
|
+
|
278
|
+
);
|
279
|
+
uint16_t uniffi_pubkycore_checksum_func_sign_in(void
|
280
|
+
|
281
|
+
);
|
282
|
+
uint16_t uniffi_pubkycore_checksum_func_sign_out(void
|
283
|
+
|
284
|
+
);
|
285
|
+
uint16_t uniffi_pubkycore_checksum_func_sign_up(void
|
286
|
+
|
287
|
+
);
|
288
|
+
uint16_t uniffi_pubkycore_checksum_func_switch_network(void
|
289
|
+
|
290
|
+
);
|
291
|
+
uint16_t uniffi_pubkycore_checksum_method_eventlistener_on_event_occurred(void
|
292
|
+
|
293
|
+
);
|
294
|
+
uint32_t ffi_pubkycore_uniffi_contract_version(void
|
295
|
+
|
296
|
+
);
|
297
|
+
|
Binary file
|