@bennyblader/ddk-rn 0.3.43 → 1.0.0-rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DdkRn.podspec +1 -1
- package/README.md +198 -49
- package/android/CMakeLists.txt +6 -3
- package/android/build.gradle +0 -1
- package/android/cpp-adapter.cpp +6 -26
- package/android/src/main/jniLibs/arm64-v8a/libddk_ffi.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libddk_ffi.so +0 -0
- package/android/src/main/jniLibs/x86/libddk_ffi.so +0 -0
- package/android/src/main/jniLibs/x86_64/libddk_ffi.so +0 -0
- package/cpp/bennyblader-ddk-rn.cpp +1 -1
- package/cpp/ddk_ffi.cpp +3446 -2669
- package/cpp/ddk_ffi.hpp +139 -255
- package/ios/DdkRn.xcframework/Info.plist +43 -0
- package/ios/DdkRn.xcframework/ios-arm64/libddk_ffi.a +0 -0
- package/ios/DdkRn.xcframework/ios-arm64-simulator/libddk_ffi.a +0 -0
- package/lib/commonjs/ddk_ffi-ffi.js +6 -29
- package/lib/commonjs/ddk_ffi-ffi.js.map +1 -1
- package/lib/commonjs/ddk_ffi.js +2828 -942
- package/lib/commonjs/ddk_ffi.js.map +1 -1
- package/lib/module/ddk_ffi-ffi.js +6 -29
- package/lib/module/ddk_ffi-ffi.js.map +1 -1
- package/lib/module/ddk_ffi.js +2750 -874
- package/lib/module/ddk_ffi.js.map +1 -1
- package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts +124 -96
- package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ddk_ffi.d.ts +2545 -466
- package/lib/typescript/commonjs/src/ddk_ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/ddk_ffi-ffi.d.ts +124 -96
- package/lib/typescript/module/src/ddk_ffi-ffi.d.ts.map +1 -1
- package/lib/typescript/module/src/ddk_ffi.d.ts +2545 -466
- package/lib/typescript/module/src/ddk_ffi.d.ts.map +1 -1
- package/package.json +24 -45
- package/src/ddk_ffi-ffi.ts +609 -170
- package/src/ddk_ffi.ts +5643 -1910
- package/ubrn.config.yaml +18 -1
- package/ddk-ffi/Cargo.lock +0 -1013
- package/ddk-ffi/Cargo.toml +0 -36
- package/ddk-ffi/build.rs +0 -3
- package/ddk-ffi/rust-toolchain.toml +0 -10
- package/ddk-ffi/src/ddk_ffi.udl +0 -376
- package/ddk-ffi/src/lib.rs +0 -2509
- package/ddk-ffi/src/uniffi-bindgen.rs +0 -3
- package/ddk-ffi/uniffi.toml +0 -18
- package/scripts/apply-hotfix.js +0 -96
- package/scripts/postinstall.js +0 -298
- package/scripts/prepare-rust-src.js +0 -51
package/src/ddk_ffi-ffi.ts
CHANGED
|
@@ -1,195 +1,634 @@
|
|
|
1
1
|
// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
|
|
2
2
|
// Trust me, you don't want to mess with it!
|
|
3
3
|
|
|
4
|
+
/* tslint:disable */
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
// @ts-nocheck
|
|
7
|
+
|
|
4
8
|
import {
|
|
5
9
|
type StructuralEquality as UniffiStructuralEquality,
|
|
6
10
|
type UniffiForeignFuture as RuntimeUniffiForeignFuture,
|
|
7
11
|
type UniffiRustCallStatus,
|
|
8
|
-
type
|
|
12
|
+
type UniffiGcObject,
|
|
9
13
|
type UniffiRustFutureContinuationCallback as RuntimeUniffiRustFutureContinuationCallback,
|
|
10
14
|
type UniffiResult,
|
|
11
|
-
|
|
15
|
+
} from '@ubjs/core';
|
|
12
16
|
|
|
13
17
|
interface NativeModuleInterface {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
18
|
+
ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length(
|
|
19
|
+
string: string,
|
|
20
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
21
|
+
): number;
|
|
22
|
+
ubrn_uniffi_internal_fn_func_ffi__string_to_buffer(
|
|
23
|
+
string: string,
|
|
24
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
25
|
+
): Uint8Array;
|
|
26
|
+
ubrn_uniffi_internal_fn_func_ffi__string_from_buffer(
|
|
27
|
+
buffer: Uint8Array,
|
|
28
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
29
|
+
): string;
|
|
30
|
+
ubrn_uniffi_internal_fn_func_ffi__read_string_from_buffer(
|
|
31
|
+
buffer: any,
|
|
32
|
+
offset: number,
|
|
33
|
+
length: number
|
|
34
|
+
): string;
|
|
35
|
+
ubrn_ffi_ddk_ffi_rust_future_poll_u8(
|
|
36
|
+
handle: bigint,
|
|
37
|
+
callback: UniffiRustFutureContinuationCallback,
|
|
38
|
+
callbackData: bigint
|
|
39
|
+
): void;
|
|
40
|
+
ubrn_ffi_ddk_ffi_rust_future_cancel_u8(handle: bigint): void;
|
|
41
|
+
ubrn_ffi_ddk_ffi_rust_future_complete_u8(
|
|
42
|
+
handle: bigint,
|
|
43
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
44
|
+
): number;
|
|
45
|
+
ubrn_ffi_ddk_ffi_rust_future_free_u8(handle: bigint): void;
|
|
46
|
+
ubrn_ffi_ddk_ffi_rust_future_poll_i8(
|
|
47
|
+
handle: bigint,
|
|
48
|
+
callback: UniffiRustFutureContinuationCallback,
|
|
49
|
+
callbackData: bigint
|
|
50
|
+
): void;
|
|
51
|
+
ubrn_ffi_ddk_ffi_rust_future_cancel_i8(handle: bigint): void;
|
|
52
|
+
ubrn_ffi_ddk_ffi_rust_future_complete_i8(
|
|
53
|
+
handle: bigint,
|
|
54
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
55
|
+
): number;
|
|
56
|
+
ubrn_ffi_ddk_ffi_rust_future_free_i8(handle: bigint): void;
|
|
57
|
+
ubrn_ffi_ddk_ffi_rust_future_poll_u16(
|
|
58
|
+
handle: bigint,
|
|
59
|
+
callback: UniffiRustFutureContinuationCallback,
|
|
60
|
+
callbackData: bigint
|
|
61
|
+
): void;
|
|
62
|
+
ubrn_ffi_ddk_ffi_rust_future_cancel_u16(handle: bigint): void;
|
|
63
|
+
ubrn_ffi_ddk_ffi_rust_future_complete_u16(
|
|
64
|
+
handle: bigint,
|
|
65
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
66
|
+
): number;
|
|
67
|
+
ubrn_ffi_ddk_ffi_rust_future_free_u16(handle: bigint): void;
|
|
68
|
+
ubrn_ffi_ddk_ffi_rust_future_poll_i16(
|
|
69
|
+
handle: bigint,
|
|
70
|
+
callback: UniffiRustFutureContinuationCallback,
|
|
71
|
+
callbackData: bigint
|
|
72
|
+
): void;
|
|
73
|
+
ubrn_ffi_ddk_ffi_rust_future_cancel_i16(handle: bigint): void;
|
|
74
|
+
ubrn_ffi_ddk_ffi_rust_future_complete_i16(
|
|
75
|
+
handle: bigint,
|
|
76
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
77
|
+
): number;
|
|
78
|
+
ubrn_ffi_ddk_ffi_rust_future_free_i16(handle: bigint): void;
|
|
79
|
+
ubrn_ffi_ddk_ffi_rust_future_poll_u32(
|
|
80
|
+
handle: bigint,
|
|
81
|
+
callback: UniffiRustFutureContinuationCallback,
|
|
82
|
+
callbackData: bigint
|
|
83
|
+
): void;
|
|
84
|
+
ubrn_ffi_ddk_ffi_rust_future_cancel_u32(handle: bigint): void;
|
|
85
|
+
ubrn_ffi_ddk_ffi_rust_future_complete_u32(
|
|
86
|
+
handle: bigint,
|
|
87
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
88
|
+
): number;
|
|
89
|
+
ubrn_ffi_ddk_ffi_rust_future_free_u32(handle: bigint): void;
|
|
90
|
+
ubrn_ffi_ddk_ffi_rust_future_poll_i32(
|
|
91
|
+
handle: bigint,
|
|
92
|
+
callback: UniffiRustFutureContinuationCallback,
|
|
93
|
+
callbackData: bigint
|
|
94
|
+
): void;
|
|
95
|
+
ubrn_ffi_ddk_ffi_rust_future_cancel_i32(handle: bigint): void;
|
|
96
|
+
ubrn_ffi_ddk_ffi_rust_future_complete_i32(
|
|
97
|
+
handle: bigint,
|
|
98
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
99
|
+
): number;
|
|
100
|
+
ubrn_ffi_ddk_ffi_rust_future_free_i32(handle: bigint): void;
|
|
101
|
+
ubrn_ffi_ddk_ffi_rust_future_poll_u64(
|
|
102
|
+
handle: bigint,
|
|
103
|
+
callback: UniffiRustFutureContinuationCallback,
|
|
104
|
+
callbackData: bigint
|
|
105
|
+
): void;
|
|
106
|
+
ubrn_ffi_ddk_ffi_rust_future_cancel_u64(handle: bigint): void;
|
|
107
|
+
ubrn_ffi_ddk_ffi_rust_future_complete_u64(
|
|
108
|
+
handle: bigint,
|
|
109
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
110
|
+
): bigint;
|
|
111
|
+
ubrn_ffi_ddk_ffi_rust_future_free_u64(handle: bigint): void;
|
|
112
|
+
ubrn_ffi_ddk_ffi_rust_future_poll_i64(
|
|
113
|
+
handle: bigint,
|
|
114
|
+
callback: UniffiRustFutureContinuationCallback,
|
|
115
|
+
callbackData: bigint
|
|
116
|
+
): void;
|
|
117
|
+
ubrn_ffi_ddk_ffi_rust_future_cancel_i64(handle: bigint): void;
|
|
118
|
+
ubrn_ffi_ddk_ffi_rust_future_complete_i64(
|
|
119
|
+
handle: bigint,
|
|
120
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
121
|
+
): bigint;
|
|
122
|
+
ubrn_ffi_ddk_ffi_rust_future_free_i64(handle: bigint): void;
|
|
123
|
+
ubrn_ffi_ddk_ffi_rust_future_poll_f32(
|
|
124
|
+
handle: bigint,
|
|
125
|
+
callback: UniffiRustFutureContinuationCallback,
|
|
126
|
+
callbackData: bigint
|
|
127
|
+
): void;
|
|
128
|
+
ubrn_ffi_ddk_ffi_rust_future_cancel_f32(handle: bigint): void;
|
|
129
|
+
ubrn_ffi_ddk_ffi_rust_future_complete_f32(
|
|
130
|
+
handle: bigint,
|
|
131
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
132
|
+
): number;
|
|
133
|
+
ubrn_ffi_ddk_ffi_rust_future_free_f32(handle: bigint): void;
|
|
134
|
+
ubrn_ffi_ddk_ffi_rust_future_poll_f64(
|
|
135
|
+
handle: bigint,
|
|
136
|
+
callback: UniffiRustFutureContinuationCallback,
|
|
137
|
+
callbackData: bigint
|
|
138
|
+
): void;
|
|
139
|
+
ubrn_ffi_ddk_ffi_rust_future_cancel_f64(handle: bigint): void;
|
|
140
|
+
ubrn_ffi_ddk_ffi_rust_future_complete_f64(
|
|
141
|
+
handle: bigint,
|
|
142
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
143
|
+
): number;
|
|
144
|
+
ubrn_ffi_ddk_ffi_rust_future_free_f64(handle: bigint): void;
|
|
145
|
+
ubrn_ffi_ddk_ffi_rust_future_poll_rust_buffer(
|
|
146
|
+
handle: bigint,
|
|
147
|
+
callback: UniffiRustFutureContinuationCallback,
|
|
148
|
+
callbackData: bigint
|
|
149
|
+
): void;
|
|
150
|
+
ubrn_ffi_ddk_ffi_rust_future_cancel_rust_buffer(handle: bigint): void;
|
|
151
|
+
ubrn_ffi_ddk_ffi_rust_future_complete_rust_buffer(
|
|
152
|
+
handle: bigint,
|
|
153
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
154
|
+
): Uint8Array;
|
|
155
|
+
ubrn_ffi_ddk_ffi_rust_future_free_rust_buffer(handle: bigint): void;
|
|
156
|
+
ubrn_ffi_ddk_ffi_rust_future_poll_void(
|
|
157
|
+
handle: bigint,
|
|
158
|
+
callback: UniffiRustFutureContinuationCallback,
|
|
159
|
+
callbackData: bigint
|
|
160
|
+
): void;
|
|
161
|
+
ubrn_ffi_ddk_ffi_rust_future_cancel_void(handle: bigint): void;
|
|
162
|
+
ubrn_ffi_ddk_ffi_rust_future_complete_void(
|
|
163
|
+
handle: bigint,
|
|
164
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
165
|
+
): void;
|
|
166
|
+
ubrn_ffi_ddk_ffi_rust_future_free_void(handle: bigint): void;
|
|
167
|
+
ubrn_uniffi_ddk_ffi_fn_clone_contractkeyprovider(
|
|
168
|
+
ptr: bigint,
|
|
169
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
170
|
+
): bigint;
|
|
171
|
+
ubrn_uniffi_ddk_ffi_fn_free_contractkeyprovider(
|
|
172
|
+
ptr: bigint,
|
|
173
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
174
|
+
): void;
|
|
175
|
+
ubrn_uniffi_ddk_ffi_fn_func_accept_offer(
|
|
176
|
+
offer: Uint8Array,
|
|
177
|
+
params: Uint8Array,
|
|
178
|
+
keys: bigint,
|
|
179
|
+
newTemporaryContractId: Uint8Array,
|
|
180
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
181
|
+
): Uint8Array;
|
|
182
|
+
ubrn_uniffi_ddk_ffi_fn_func_chain_hash_from_network(
|
|
183
|
+
network: Uint8Array,
|
|
184
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
185
|
+
): Uint8Array;
|
|
186
|
+
ubrn_uniffi_ddk_ffi_fn_func_compute_contract_id(
|
|
187
|
+
offer: Uint8Array,
|
|
188
|
+
accept: Uint8Array,
|
|
189
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
190
|
+
): Uint8Array;
|
|
191
|
+
ubrn_uniffi_ddk_ffi_fn_func_contract_info_payouts(
|
|
192
|
+
contractInfo: Uint8Array,
|
|
193
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
194
|
+
): Uint8Array;
|
|
195
|
+
ubrn_uniffi_ddk_ffi_fn_func_convert_mnemonic_to_seed(
|
|
196
|
+
mnemonic: Uint8Array,
|
|
197
|
+
passphrase: Uint8Array,
|
|
198
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
199
|
+
): Uint8Array;
|
|
200
|
+
ubrn_uniffi_ddk_ffi_fn_func_create_cet(
|
|
201
|
+
localOutput: Uint8Array,
|
|
202
|
+
localPayoutSerialId: bigint,
|
|
203
|
+
remoteOutput: Uint8Array,
|
|
204
|
+
remotePayoutSerialId: bigint,
|
|
205
|
+
fundTxId: Uint8Array,
|
|
206
|
+
fundVout: number,
|
|
207
|
+
lockTime: number,
|
|
208
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
209
|
+
): Uint8Array;
|
|
210
|
+
ubrn_uniffi_ddk_ffi_fn_func_create_cet_adaptor_points_from_oracle_info(
|
|
211
|
+
oracleInfo: Uint8Array,
|
|
212
|
+
msgs: Uint8Array,
|
|
213
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
214
|
+
): Uint8Array;
|
|
215
|
+
ubrn_uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_oracle_info(
|
|
216
|
+
cets: Uint8Array,
|
|
217
|
+
oracleInfo: Uint8Array,
|
|
218
|
+
fundingSecretKey: Uint8Array,
|
|
219
|
+
fundingScriptPubkey: Uint8Array,
|
|
220
|
+
fundOutputValue: bigint,
|
|
221
|
+
msgs: Uint8Array,
|
|
222
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
223
|
+
): Uint8Array;
|
|
224
|
+
ubrn_uniffi_ddk_ffi_fn_func_create_cet_adaptor_sigs_from_points(
|
|
225
|
+
cets: Uint8Array,
|
|
226
|
+
adaptorPoints: Uint8Array,
|
|
227
|
+
fundingSecretKey: Uint8Array,
|
|
228
|
+
fundingScriptPubkey: Uint8Array,
|
|
229
|
+
fundOutputValue: bigint,
|
|
230
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
231
|
+
): Uint8Array;
|
|
232
|
+
ubrn_uniffi_ddk_ffi_fn_func_create_cets(
|
|
233
|
+
fundTxId: Uint8Array,
|
|
234
|
+
fundVout: number,
|
|
235
|
+
localFinalScriptPubkey: Uint8Array,
|
|
236
|
+
remoteFinalScriptPubkey: Uint8Array,
|
|
237
|
+
outcomes: Uint8Array,
|
|
238
|
+
lockTime: number,
|
|
239
|
+
localSerialId: bigint,
|
|
240
|
+
remoteSerialId: bigint,
|
|
241
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
242
|
+
): Uint8Array;
|
|
243
|
+
ubrn_uniffi_ddk_ffi_fn_func_create_dlc_splice_input(
|
|
244
|
+
prevOffer: Uint8Array,
|
|
245
|
+
prevAccept: Uint8Array,
|
|
246
|
+
localParty: Uint8Array,
|
|
247
|
+
inputSerialId: Uint8Array,
|
|
248
|
+
maxWitnessLen: number,
|
|
249
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
250
|
+
): Uint8Array;
|
|
251
|
+
ubrn_uniffi_ddk_ffi_fn_func_create_dlc_transactions(
|
|
252
|
+
outcomes: Uint8Array,
|
|
253
|
+
localParams: Uint8Array,
|
|
254
|
+
remoteParams: Uint8Array,
|
|
255
|
+
refundLocktime: number,
|
|
256
|
+
feeRate: bigint,
|
|
257
|
+
fundLockTime: number,
|
|
258
|
+
cetLockTime: number,
|
|
259
|
+
fundOutputSerialId: bigint,
|
|
260
|
+
contractFlags: number,
|
|
261
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
262
|
+
): Uint8Array;
|
|
263
|
+
ubrn_uniffi_ddk_ffi_fn_func_create_extkey_from_parent_path(
|
|
264
|
+
extkey: Uint8Array,
|
|
265
|
+
path: Uint8Array,
|
|
266
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
267
|
+
): Uint8Array;
|
|
268
|
+
ubrn_uniffi_ddk_ffi_fn_func_create_extkey_from_seed(
|
|
269
|
+
seed: Uint8Array,
|
|
270
|
+
network: Uint8Array,
|
|
271
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
272
|
+
): Uint8Array;
|
|
273
|
+
ubrn_uniffi_ddk_ffi_fn_func_create_fund_tx_locking_script(
|
|
274
|
+
localFundPubkey: Uint8Array,
|
|
275
|
+
remoteFundPubkey: Uint8Array,
|
|
276
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
277
|
+
): Uint8Array;
|
|
278
|
+
ubrn_uniffi_ddk_ffi_fn_func_create_funding_psbt(
|
|
279
|
+
offer: Uint8Array,
|
|
280
|
+
accept: Uint8Array,
|
|
281
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
282
|
+
): Uint8Array;
|
|
283
|
+
ubrn_uniffi_ddk_ffi_fn_func_create_offer(
|
|
284
|
+
params: Uint8Array,
|
|
285
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
286
|
+
): Uint8Array;
|
|
287
|
+
ubrn_uniffi_ddk_ffi_fn_func_create_refund_transaction(
|
|
288
|
+
localFinalScriptPubkey: Uint8Array,
|
|
289
|
+
remoteFinalScriptPubkey: Uint8Array,
|
|
290
|
+
localAmount: bigint,
|
|
291
|
+
remoteAmount: bigint,
|
|
292
|
+
lockTime: number,
|
|
293
|
+
fundTxId: Uint8Array,
|
|
294
|
+
fundVout: number,
|
|
295
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
296
|
+
): Uint8Array;
|
|
297
|
+
ubrn_uniffi_ddk_ffi_fn_func_create_spliced_dlc_transactions(
|
|
298
|
+
outcomes: Uint8Array,
|
|
299
|
+
localParams: Uint8Array,
|
|
300
|
+
remoteParams: Uint8Array,
|
|
301
|
+
refundLocktime: number,
|
|
302
|
+
feeRate: bigint,
|
|
303
|
+
fundLockTime: number,
|
|
304
|
+
cetLockTime: number,
|
|
305
|
+
fundOutputSerialId: bigint,
|
|
306
|
+
contractFlags: number,
|
|
307
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
308
|
+
): Uint8Array;
|
|
309
|
+
ubrn_uniffi_ddk_ffi_fn_func_create_xpriv_from_parent_path(
|
|
310
|
+
seedOrXpriv: Uint8Array,
|
|
311
|
+
baseDerivationPath: Uint8Array,
|
|
312
|
+
network: Uint8Array,
|
|
313
|
+
path: Uint8Array,
|
|
314
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
315
|
+
): Uint8Array;
|
|
316
|
+
ubrn_uniffi_ddk_ffi_fn_func_dlc_input_max_witness_len(
|
|
317
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
318
|
+
): number;
|
|
319
|
+
ubrn_uniffi_ddk_ffi_fn_func_dlc_transactions_from_messages(
|
|
320
|
+
offer: Uint8Array,
|
|
321
|
+
accept: Uint8Array,
|
|
322
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
323
|
+
): Uint8Array;
|
|
324
|
+
ubrn_uniffi_ddk_ffi_fn_func_extract_ecdsa_signature_from_oracle_signatures(
|
|
325
|
+
oracleSignatures: Uint8Array,
|
|
326
|
+
adaptorSignature: Uint8Array,
|
|
327
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
328
|
+
): Uint8Array;
|
|
329
|
+
ubrn_uniffi_ddk_ffi_fn_func_finalize_sign(
|
|
330
|
+
offer: Uint8Array,
|
|
331
|
+
accept: Uint8Array,
|
|
332
|
+
sign: Uint8Array,
|
|
333
|
+
signedFundingPsbt: Uint8Array,
|
|
334
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
335
|
+
): Uint8Array;
|
|
336
|
+
ubrn_uniffi_ddk_ffi_fn_func_finalize_sign_spliced(
|
|
337
|
+
offer: Uint8Array,
|
|
338
|
+
accept: Uint8Array,
|
|
339
|
+
sign: Uint8Array,
|
|
340
|
+
signedFundingPsbt: Uint8Array,
|
|
341
|
+
keys: bigint,
|
|
342
|
+
spliceKeys: Uint8Array,
|
|
343
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
344
|
+
): Uint8Array;
|
|
345
|
+
ubrn_uniffi_ddk_ffi_fn_func_funding_input(
|
|
346
|
+
previousTransaction: Uint8Array,
|
|
347
|
+
vout: number,
|
|
348
|
+
inputSerialId: Uint8Array,
|
|
349
|
+
sequence: number,
|
|
350
|
+
maxWitnessLen: number,
|
|
351
|
+
redeemScript: Uint8Array,
|
|
352
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
353
|
+
): Uint8Array;
|
|
354
|
+
ubrn_uniffi_ddk_ffi_fn_func_get_pubkey_from_extkey(
|
|
355
|
+
extkey: Uint8Array,
|
|
356
|
+
network: Uint8Array,
|
|
357
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
358
|
+
): Uint8Array;
|
|
359
|
+
ubrn_uniffi_ddk_ffi_fn_func_get_total_input_vsize(
|
|
360
|
+
inputs: Uint8Array,
|
|
361
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
362
|
+
): number;
|
|
363
|
+
ubrn_uniffi_ddk_ffi_fn_func_get_xpub_from_xpriv(
|
|
364
|
+
xpriv: Uint8Array,
|
|
365
|
+
network: Uint8Array,
|
|
366
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
367
|
+
): Uint8Array;
|
|
368
|
+
ubrn_uniffi_ddk_ffi_fn_func_sign_accept(
|
|
369
|
+
offer: Uint8Array,
|
|
370
|
+
accept: Uint8Array,
|
|
371
|
+
keys: bigint,
|
|
372
|
+
temporaryContractId: Uint8Array,
|
|
373
|
+
signedFundingPsbt: Uint8Array,
|
|
374
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
375
|
+
): Uint8Array;
|
|
376
|
+
ubrn_uniffi_ddk_ffi_fn_func_sign_accept_spliced(
|
|
377
|
+
offer: Uint8Array,
|
|
378
|
+
accept: Uint8Array,
|
|
379
|
+
keys: bigint,
|
|
380
|
+
temporaryContractId: Uint8Array,
|
|
381
|
+
signedFundingPsbt: Uint8Array,
|
|
382
|
+
spliceKeys: Uint8Array,
|
|
383
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
384
|
+
): Uint8Array;
|
|
385
|
+
ubrn_uniffi_ddk_ffi_fn_func_sign_contract_cet(
|
|
386
|
+
offer: Uint8Array,
|
|
387
|
+
accept: Uint8Array,
|
|
388
|
+
sign: Uint8Array,
|
|
389
|
+
keys: bigint,
|
|
390
|
+
temporaryContractId: Uint8Array,
|
|
391
|
+
attestations: Uint8Array,
|
|
392
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
393
|
+
): Uint8Array;
|
|
394
|
+
ubrn_uniffi_ddk_ffi_fn_func_sign_contract_refund(
|
|
395
|
+
offer: Uint8Array,
|
|
396
|
+
accept: Uint8Array,
|
|
397
|
+
sign: Uint8Array,
|
|
398
|
+
keys: bigint,
|
|
399
|
+
temporaryContractId: Uint8Array,
|
|
400
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
401
|
+
): Uint8Array;
|
|
402
|
+
ubrn_uniffi_ddk_ffi_fn_func_sign_funding_psbt_with_descriptor(
|
|
403
|
+
offer: Uint8Array,
|
|
404
|
+
accept: Uint8Array,
|
|
405
|
+
fundingPsbt: Uint8Array,
|
|
406
|
+
descriptor: Uint8Array,
|
|
407
|
+
inputs: Uint8Array,
|
|
408
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
409
|
+
): Uint8Array;
|
|
410
|
+
ubrn_uniffi_ddk_ffi_fn_func_validate_accept(
|
|
411
|
+
offer: Uint8Array,
|
|
412
|
+
accept: Uint8Array,
|
|
413
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
414
|
+
): void;
|
|
415
|
+
ubrn_uniffi_ddk_ffi_fn_func_validate_offer(
|
|
416
|
+
offer: Uint8Array,
|
|
417
|
+
minTimeoutInterval: number,
|
|
418
|
+
maxTimeoutInterval: number,
|
|
419
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
420
|
+
): void;
|
|
421
|
+
ubrn_uniffi_ddk_ffi_fn_func_validate_sign(
|
|
422
|
+
offer: Uint8Array,
|
|
423
|
+
accept: Uint8Array,
|
|
424
|
+
sign: Uint8Array,
|
|
425
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
426
|
+
): void;
|
|
427
|
+
ubrn_uniffi_ddk_ffi_fn_func_verify_cet_adaptor_sigs_from_oracle_info(
|
|
428
|
+
adaptorSigs: Uint8Array,
|
|
429
|
+
cets: Uint8Array,
|
|
430
|
+
oracleInfos: Uint8Array,
|
|
431
|
+
pubkey: Uint8Array,
|
|
432
|
+
fundingScriptPubkey: Uint8Array,
|
|
433
|
+
totalCollateral: bigint,
|
|
434
|
+
msgs: Uint8Array,
|
|
435
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
436
|
+
): number;
|
|
437
|
+
ubrn_uniffi_ddk_ffi_fn_func_version(
|
|
438
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
439
|
+
): Uint8Array;
|
|
440
|
+
ubrn_uniffi_ddk_ffi_fn_method_adaptorsignature_verify_from_oracle_info(
|
|
441
|
+
uniffiSelf: Uint8Array,
|
|
442
|
+
cet: Uint8Array,
|
|
443
|
+
oracleInfos: Uint8Array,
|
|
444
|
+
pubkey: Uint8Array,
|
|
445
|
+
fundingScriptPubkey: Uint8Array,
|
|
446
|
+
totalCollateral: bigint,
|
|
447
|
+
msgs: Uint8Array,
|
|
448
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
449
|
+
): number;
|
|
450
|
+
ubrn_uniffi_ddk_ffi_fn_method_partyparams_change_output_and_fees(
|
|
451
|
+
uniffiSelf: Uint8Array,
|
|
452
|
+
feeRate: bigint,
|
|
453
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
454
|
+
): Uint8Array;
|
|
455
|
+
ubrn_uniffi_ddk_ffi_fn_method_transaction_add_signature(
|
|
456
|
+
uniffiSelf: Uint8Array,
|
|
457
|
+
signature: Uint8Array,
|
|
458
|
+
pubkey: Uint8Array,
|
|
459
|
+
inputIndex: number,
|
|
460
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
461
|
+
): Uint8Array;
|
|
462
|
+
ubrn_uniffi_ddk_ffi_fn_method_transaction_cet_adaptor_signature_from_oracle_info(
|
|
463
|
+
uniffiSelf: Uint8Array,
|
|
464
|
+
oracleInfo: Uint8Array,
|
|
465
|
+
fundingSk: Uint8Array,
|
|
466
|
+
fundingScriptPubkey: Uint8Array,
|
|
467
|
+
totalCollateral: bigint,
|
|
468
|
+
msgs: Uint8Array,
|
|
469
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
470
|
+
): Uint8Array;
|
|
471
|
+
ubrn_uniffi_ddk_ffi_fn_method_transaction_cet_adaptor_signature_inputs(
|
|
472
|
+
uniffiSelf: Uint8Array,
|
|
473
|
+
oracleInfo: Uint8Array,
|
|
474
|
+
fundingScriptPubkey: Uint8Array,
|
|
475
|
+
fundOutputValue: bigint,
|
|
476
|
+
msgs: Uint8Array,
|
|
477
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
478
|
+
): Uint8Array;
|
|
479
|
+
ubrn_uniffi_ddk_ffi_fn_method_transaction_cet_sighash(
|
|
480
|
+
uniffiSelf: Uint8Array,
|
|
481
|
+
fundingScriptPubkey: Uint8Array,
|
|
482
|
+
fundOutputValue: bigint,
|
|
483
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
484
|
+
): Uint8Array;
|
|
485
|
+
ubrn_uniffi_ddk_ffi_fn_method_transaction_raw_funding_input_signature(
|
|
486
|
+
uniffiSelf: Uint8Array,
|
|
487
|
+
privkey: Uint8Array,
|
|
488
|
+
prevTxId: Uint8Array,
|
|
489
|
+
prevTxVout: number,
|
|
490
|
+
value: bigint,
|
|
491
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
492
|
+
): Uint8Array;
|
|
493
|
+
ubrn_uniffi_ddk_ffi_fn_method_transaction_sign_cet(
|
|
494
|
+
uniffiSelf: Uint8Array,
|
|
495
|
+
adaptorSignature: Uint8Array,
|
|
496
|
+
oracleSignatures: Uint8Array,
|
|
497
|
+
fundingSecretKey: Uint8Array,
|
|
498
|
+
otherPubkey: Uint8Array,
|
|
499
|
+
fundingScriptPubkey: Uint8Array,
|
|
500
|
+
fundOutputValue: bigint,
|
|
501
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
502
|
+
): Uint8Array;
|
|
503
|
+
ubrn_uniffi_ddk_ffi_fn_method_transaction_sign_fund_input(
|
|
504
|
+
uniffiSelf: Uint8Array,
|
|
505
|
+
privkey: Uint8Array,
|
|
506
|
+
prevTxId: Uint8Array,
|
|
507
|
+
prevTxVout: number,
|
|
508
|
+
value: bigint,
|
|
509
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
510
|
+
): Uint8Array;
|
|
511
|
+
ubrn_uniffi_ddk_ffi_fn_method_transaction_sign_multi_sig_input(
|
|
512
|
+
uniffiSelf: Uint8Array,
|
|
513
|
+
dlcInput: Uint8Array,
|
|
514
|
+
localPrivkey: Uint8Array,
|
|
515
|
+
remoteSignature: Uint8Array,
|
|
516
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
517
|
+
): Uint8Array;
|
|
518
|
+
ubrn_uniffi_ddk_ffi_fn_method_transaction_verify_fund_signature(
|
|
519
|
+
uniffiSelf: Uint8Array,
|
|
520
|
+
signature: Uint8Array,
|
|
521
|
+
pubkey: Uint8Array,
|
|
522
|
+
txid: Uint8Array,
|
|
523
|
+
vout: number,
|
|
524
|
+
inputAmount: bigint,
|
|
525
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
526
|
+
): number;
|
|
527
|
+
ubrn_uniffi_ddk_ffi_fn_method_txoutput_is_dust(
|
|
528
|
+
uniffiSelf: Uint8Array,
|
|
529
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
530
|
+
): number;
|
|
531
|
+
ubrn_uniffi_ddk_ffi_fn_constructor_contractkeyprovider_from_descriptor(
|
|
532
|
+
descriptor: Uint8Array,
|
|
533
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
534
|
+
): bigint;
|
|
535
|
+
ubrn_uniffi_ddk_ffi_fn_constructor_contractkeyprovider_from_mnemonic(
|
|
536
|
+
mnemonic: Uint8Array,
|
|
537
|
+
passphrase: Uint8Array,
|
|
538
|
+
network: Uint8Array,
|
|
539
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
540
|
+
): bigint;
|
|
541
|
+
ubrn_uniffi_ddk_ffi_fn_constructor_contractkeyprovider_from_seed(
|
|
542
|
+
seed: Uint8Array,
|
|
543
|
+
network: Uint8Array,
|
|
544
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
545
|
+
): bigint;
|
|
546
|
+
ubrn_uniffi_ddk_ffi_fn_constructor_contractkeyprovider_from_xprv(
|
|
547
|
+
xprv: Uint8Array,
|
|
548
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
549
|
+
): bigint;
|
|
550
|
+
ubrn_uniffi_ddk_ffi_fn_method_contractkeyprovider_funding_pubkey(
|
|
551
|
+
uniffiSelf: bigint,
|
|
552
|
+
temporaryContractId: Uint8Array,
|
|
553
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
554
|
+
): Uint8Array;
|
|
555
|
+
ubrn_ffi_ddk_ffi_uniffi_contract_version(): number;
|
|
556
|
+
ubrn_uniffi_ddk_ffi_checksum_func_accept_offer(): number;
|
|
557
|
+
ubrn_uniffi_ddk_ffi_checksum_func_chain_hash_from_network(): number;
|
|
558
|
+
ubrn_uniffi_ddk_ffi_checksum_func_compute_contract_id(): number;
|
|
559
|
+
ubrn_uniffi_ddk_ffi_checksum_func_contract_info_payouts(): number;
|
|
560
|
+
ubrn_uniffi_ddk_ffi_checksum_func_convert_mnemonic_to_seed(): number;
|
|
561
|
+
ubrn_uniffi_ddk_ffi_checksum_func_create_cet(): number;
|
|
562
|
+
ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_points_from_oracle_info(): number;
|
|
563
|
+
ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_oracle_info(): number;
|
|
564
|
+
ubrn_uniffi_ddk_ffi_checksum_func_create_cet_adaptor_sigs_from_points(): number;
|
|
565
|
+
ubrn_uniffi_ddk_ffi_checksum_func_create_cets(): number;
|
|
566
|
+
ubrn_uniffi_ddk_ffi_checksum_func_create_dlc_splice_input(): number;
|
|
567
|
+
ubrn_uniffi_ddk_ffi_checksum_func_create_dlc_transactions(): number;
|
|
568
|
+
ubrn_uniffi_ddk_ffi_checksum_func_create_extkey_from_parent_path(): number;
|
|
569
|
+
ubrn_uniffi_ddk_ffi_checksum_func_create_extkey_from_seed(): number;
|
|
570
|
+
ubrn_uniffi_ddk_ffi_checksum_func_create_fund_tx_locking_script(): number;
|
|
571
|
+
ubrn_uniffi_ddk_ffi_checksum_func_create_funding_psbt(): number;
|
|
572
|
+
ubrn_uniffi_ddk_ffi_checksum_func_create_offer(): number;
|
|
573
|
+
ubrn_uniffi_ddk_ffi_checksum_func_create_refund_transaction(): number;
|
|
574
|
+
ubrn_uniffi_ddk_ffi_checksum_func_create_spliced_dlc_transactions(): number;
|
|
575
|
+
ubrn_uniffi_ddk_ffi_checksum_func_create_xpriv_from_parent_path(): number;
|
|
576
|
+
ubrn_uniffi_ddk_ffi_checksum_func_dlc_input_max_witness_len(): number;
|
|
577
|
+
ubrn_uniffi_ddk_ffi_checksum_func_dlc_transactions_from_messages(): number;
|
|
578
|
+
ubrn_uniffi_ddk_ffi_checksum_func_extract_ecdsa_signature_from_oracle_signatures(): number;
|
|
579
|
+
ubrn_uniffi_ddk_ffi_checksum_func_finalize_sign(): number;
|
|
580
|
+
ubrn_uniffi_ddk_ffi_checksum_func_finalize_sign_spliced(): number;
|
|
581
|
+
ubrn_uniffi_ddk_ffi_checksum_func_funding_input(): number;
|
|
582
|
+
ubrn_uniffi_ddk_ffi_checksum_func_get_pubkey_from_extkey(): number;
|
|
583
|
+
ubrn_uniffi_ddk_ffi_checksum_func_get_total_input_vsize(): number;
|
|
584
|
+
ubrn_uniffi_ddk_ffi_checksum_func_get_xpub_from_xpriv(): number;
|
|
585
|
+
ubrn_uniffi_ddk_ffi_checksum_func_sign_accept(): number;
|
|
586
|
+
ubrn_uniffi_ddk_ffi_checksum_func_sign_accept_spliced(): number;
|
|
587
|
+
ubrn_uniffi_ddk_ffi_checksum_func_sign_contract_cet(): number;
|
|
588
|
+
ubrn_uniffi_ddk_ffi_checksum_func_sign_contract_refund(): number;
|
|
589
|
+
ubrn_uniffi_ddk_ffi_checksum_func_sign_funding_psbt_with_descriptor(): number;
|
|
590
|
+
ubrn_uniffi_ddk_ffi_checksum_func_validate_accept(): number;
|
|
591
|
+
ubrn_uniffi_ddk_ffi_checksum_func_validate_offer(): number;
|
|
592
|
+
ubrn_uniffi_ddk_ffi_checksum_func_validate_sign(): number;
|
|
593
|
+
ubrn_uniffi_ddk_ffi_checksum_func_verify_cet_adaptor_sigs_from_oracle_info(): number;
|
|
594
|
+
ubrn_uniffi_ddk_ffi_checksum_func_version(): number;
|
|
595
|
+
ubrn_uniffi_ddk_ffi_checksum_constructor_contractkeyprovider_from_descriptor(): number;
|
|
596
|
+
ubrn_uniffi_ddk_ffi_checksum_constructor_contractkeyprovider_from_mnemonic(): number;
|
|
597
|
+
ubrn_uniffi_ddk_ffi_checksum_constructor_contractkeyprovider_from_seed(): number;
|
|
598
|
+
ubrn_uniffi_ddk_ffi_checksum_constructor_contractkeyprovider_from_xprv(): number;
|
|
599
|
+
ubrn_uniffi_ddk_ffi_checksum_method_contractkeyprovider_funding_pubkey(): number;
|
|
600
|
+
ubrn_uniffi_internal_fn_method_contractkeyprovider_ffi__bless_pointer(
|
|
601
|
+
pointer: bigint,
|
|
602
|
+
uniffi_out_err: UniffiRustCallStatus
|
|
603
|
+
): UniffiGcObject;
|
|
604
|
+
// Codegen call sites use these via `nativeModule().rustbuffer_alloc(...)`
|
|
605
|
+
// and `nativeModule().rustbuffer_free(...)`. The JSI host object exposes
|
|
606
|
+
// them as properties; see `props["rustbuffer_alloc"]` / `props["rustbuffer_free"]`
|
|
607
|
+
// in the C++ wrapper template.
|
|
608
|
+
rustbuffer_alloc(n: number): Uint8Array;
|
|
609
|
+
rustbuffer_free(view: Uint8Array): void;
|
|
80
610
|
}
|
|
81
611
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
//
|
|
85
|
-
// We use a getter here rather than simply `globalThis.NativeDdkFfi` so that
|
|
86
|
-
// if/when the startup sequence isn't just so, an empty value isn't inadvertantly cached.
|
|
87
|
-
const getter: () => NativeModuleInterface = () => (globalThis as any).NativeDdkFfi;
|
|
612
|
+
const getter: () => NativeModuleInterface = () =>
|
|
613
|
+
(globalThis as any).NativeDdkFfi;
|
|
88
614
|
export default getter;
|
|
89
615
|
|
|
90
616
|
// Structs and function types for calling back into Typescript from Rust.
|
|
91
|
-
export type UniffiRustFutureContinuationCallback = (
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
617
|
+
export type UniffiRustFutureContinuationCallback = (
|
|
618
|
+
data: bigint,
|
|
619
|
+
pollResult: number
|
|
620
|
+
) => void;
|
|
621
|
+
export type UniffiForeignFutureDroppedCallback = (handle: bigint) => void;
|
|
622
|
+
export type UniffiForeignFutureDroppedCallbackStruct = {
|
|
95
623
|
handle: bigint;
|
|
96
|
-
free:
|
|
97
|
-
};
|
|
98
|
-
export type UniffiForeignFutureStructU8 = {
|
|
99
|
-
returnValue: number;
|
|
100
|
-
callStatus: UniffiRustCallStatus;
|
|
101
|
-
};
|
|
102
|
-
export type UniffiForeignFutureCompleteU8 = (callbackData: bigint, result: UniffiForeignFutureStructU8) => void;
|
|
103
|
-
export type UniffiForeignFutureStructI8 = {
|
|
104
|
-
returnValue: number;
|
|
105
|
-
callStatus: UniffiRustCallStatus;
|
|
106
|
-
};
|
|
107
|
-
export type UniffiForeignFutureCompleteI8 = (callbackData: bigint, result: UniffiForeignFutureStructI8) => void;
|
|
108
|
-
export type UniffiForeignFutureStructU16 = {
|
|
109
|
-
returnValue: number;
|
|
110
|
-
callStatus: UniffiRustCallStatus;
|
|
111
|
-
};
|
|
112
|
-
export type UniffiForeignFutureCompleteU16 = (callbackData: bigint, result: UniffiForeignFutureStructU16) => void;
|
|
113
|
-
export type UniffiForeignFutureStructI16 = {
|
|
114
|
-
returnValue: number;
|
|
115
|
-
callStatus: UniffiRustCallStatus;
|
|
116
|
-
};
|
|
117
|
-
export type UniffiForeignFutureCompleteI16 = (callbackData: bigint, result: UniffiForeignFutureStructI16) => void;
|
|
118
|
-
export type UniffiForeignFutureStructU32 = {
|
|
119
|
-
returnValue: number;
|
|
120
|
-
callStatus: UniffiRustCallStatus;
|
|
121
|
-
};
|
|
122
|
-
export type UniffiForeignFutureCompleteU32 = (callbackData: bigint, result: UniffiForeignFutureStructU32) => void;
|
|
123
|
-
export type UniffiForeignFutureStructI32 = {
|
|
124
|
-
returnValue: number;
|
|
125
|
-
callStatus: UniffiRustCallStatus;
|
|
126
|
-
};
|
|
127
|
-
export type UniffiForeignFutureCompleteI32 = (callbackData: bigint, result: UniffiForeignFutureStructI32) => void;
|
|
128
|
-
export type UniffiForeignFutureStructU64 = {
|
|
129
|
-
returnValue: bigint;
|
|
130
|
-
callStatus: UniffiRustCallStatus;
|
|
131
|
-
};
|
|
132
|
-
export type UniffiForeignFutureCompleteU64 = (callbackData: bigint, result: UniffiForeignFutureStructU64) => void;
|
|
133
|
-
export type UniffiForeignFutureStructI64 = {
|
|
134
|
-
returnValue: bigint;
|
|
135
|
-
callStatus: UniffiRustCallStatus;
|
|
136
|
-
};
|
|
137
|
-
export type UniffiForeignFutureCompleteI64 = (callbackData: bigint, result: UniffiForeignFutureStructI64) => void;
|
|
138
|
-
export type UniffiForeignFutureStructF32 = {
|
|
139
|
-
returnValue: number;
|
|
140
|
-
callStatus: UniffiRustCallStatus;
|
|
141
|
-
};
|
|
142
|
-
export type UniffiForeignFutureCompleteF32 = (callbackData: bigint, result: UniffiForeignFutureStructF32) => void;
|
|
143
|
-
export type UniffiForeignFutureStructF64 = {
|
|
144
|
-
returnValue: number;
|
|
145
|
-
callStatus: UniffiRustCallStatus;
|
|
146
|
-
};
|
|
147
|
-
export type UniffiForeignFutureCompleteF64 = (callbackData: bigint, result: UniffiForeignFutureStructF64) => void;
|
|
148
|
-
export type UniffiForeignFutureStructPointer = {
|
|
149
|
-
returnValue: bigint;
|
|
150
|
-
callStatus: UniffiRustCallStatus;
|
|
151
|
-
};
|
|
152
|
-
export type UniffiForeignFutureCompletePointer = (callbackData: bigint, result: UniffiForeignFutureStructPointer) => void;
|
|
153
|
-
export type UniffiForeignFutureStructRustBuffer = {
|
|
154
|
-
returnValue: Uint8Array;
|
|
155
|
-
callStatus: UniffiRustCallStatus;
|
|
156
|
-
};
|
|
157
|
-
export type UniffiForeignFutureCompleteRustBuffer = (callbackData: bigint, result: UniffiForeignFutureStructRustBuffer) => void;
|
|
158
|
-
export type UniffiForeignFutureStructVoid = {
|
|
159
|
-
callStatus: UniffiRustCallStatus;
|
|
624
|
+
free: UniffiForeignFutureDroppedCallback;
|
|
160
625
|
};
|
|
161
|
-
export type UniffiForeignFutureCompleteVoid = (callbackData: bigint, result: UniffiForeignFutureStructVoid) => void;
|
|
162
626
|
|
|
163
627
|
// UniffiRustFutureContinuationCallback is generated as part of the component interface's
|
|
164
628
|
// ffi_definitions. However, we need it in the runtime.
|
|
165
|
-
// We
|
|
166
|
-
//
|
|
167
|
-
// (b) import the generated declaration into the runtime (m a y b e) or…
|
|
168
|
-
// (c) generate the declaration anyway, and use a different declaration in the runtime.
|
|
169
|
-
//
|
|
170
|
-
// We chose (c) here as the simplest. In addition, we perform a compile time check that
|
|
171
|
-
// the two versions of `UniffiRustFutureContinuationCallback` are structurally equivalent.
|
|
172
|
-
//
|
|
173
|
-
// If you see the error:
|
|
174
|
-
// ```
|
|
175
|
-
// Type 'true' is not assignable to type 'false'.(2322)
|
|
176
|
-
// ```
|
|
177
|
-
// Then a new version of uniffi has changed the signature of the callback. Most likely, code in
|
|
178
|
-
// `typescript/src/async-rust-call.ts` will need to be changed.
|
|
179
|
-
//
|
|
180
|
-
// If you see the error:
|
|
181
|
-
// ```
|
|
182
|
-
// Cannot find name 'UniffiRustFutureContinuationCallback'. Did you mean 'RuntimeUniffiRustFutureContinuationCallback'?(2552)
|
|
183
|
-
// ```
|
|
184
|
-
// then you may not be using callbacks or promises, and uniffi is now not generating Futures and callbacks.
|
|
185
|
-
// You should not generate this if that is the case.
|
|
186
|
-
//
|
|
187
|
-
// ('You' being the bindings generator maintainer).
|
|
629
|
+
// We chose to generate the declaration anyway, and use a different declaration in the runtime.
|
|
630
|
+
// We perform a compile time check that the two versions are structurally equivalent.
|
|
188
631
|
const isRustFutureContinuationCallbackTypeCompatible: UniffiStructuralEquality<
|
|
189
632
|
RuntimeUniffiRustFutureContinuationCallback,
|
|
190
633
|
UniffiRustFutureContinuationCallback
|
|
191
634
|
> = true;
|
|
192
|
-
const isUniffiForeignFutureTypeCompatible: UniffiStructuralEquality<
|
|
193
|
-
RuntimeUniffiForeignFuture,
|
|
194
|
-
UniffiForeignFuture
|
|
195
|
-
> = true;
|