@breeztech/breez-sdk-spark-react-native 0.1.8-dev1

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.
Files changed (103) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +54 -0
  3. package/android/CMakeLists.txt +79 -0
  4. package/android/build.gradle +143 -0
  5. package/android/cpp-adapter.cpp +63 -0
  6. package/android/generated/android/app/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeBreezSdkSparkReactNativeSpec.java +41 -0
  7. package/android/generated/android/app/build/generated/source/codegen/jni/BreezSdkSparkReactNativeSpec-generated.cpp +38 -0
  8. package/android/generated/android/app/build/generated/source/codegen/jni/BreezSdkSparkReactNativeSpec.h +31 -0
  9. package/android/generated/android/app/build/generated/source/codegen/jni/CMakeLists.txt +36 -0
  10. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/BreezSdkSparkReactNativeSpecJSI-generated.cpp +32 -0
  11. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/BreezSdkSparkReactNativeSpecJSI.h +80 -0
  12. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/ComponentDescriptors.cpp +22 -0
  13. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/ComponentDescriptors.h +24 -0
  14. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/EventEmitters.cpp +16 -0
  15. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/EventEmitters.h +17 -0
  16. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/Props.cpp +19 -0
  17. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/Props.h +18 -0
  18. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/ShadowNodes.cpp +17 -0
  19. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/ShadowNodes.h +23 -0
  20. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/States.cpp +16 -0
  21. package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/BreezSdkSparkReactNativeSpec/States.h +19 -0
  22. package/android/gradle.properties +5 -0
  23. package/android/src/main/AndroidManifest.xml +5 -0
  24. package/android/src/main/AndroidManifestNew.xml +2 -0
  25. package/android/src/main/java/com/breeztech/breezsdkspark/BreezSdkSparkReactNativeModule.kt +43 -0
  26. package/android/src/main/java/com/breeztech/breezsdkspark/BreezSdkSparkReactNativePackage.kt +34 -0
  27. package/breeztech-breez-sdk-spark-react-native.podspec +44 -0
  28. package/cpp/breeztech-breez-sdk-spark-react-native.cpp +20 -0
  29. package/cpp/breeztech-breez-sdk-spark-react-native.h +15 -0
  30. package/cpp/generated/breez_sdk_common.cpp +3834 -0
  31. package/cpp/generated/breez_sdk_common.hpp +251 -0
  32. package/cpp/generated/breez_sdk_spark.cpp +8722 -0
  33. package/cpp/generated/breez_sdk_spark.hpp +589 -0
  34. package/cpp/generated/breez_sdk_spark_bindings.cpp +1750 -0
  35. package/cpp/generated/breez_sdk_spark_bindings.hpp +65 -0
  36. package/ios/BreezSdkSparkReactNative.h +16 -0
  37. package/ios/BreezSdkSparkReactNative.mm +66 -0
  38. package/ios/generated/build/generated/ios/BreezSdkSparkReactNativeSpec/BreezSdkSparkReactNativeSpec-generated.mm +46 -0
  39. package/ios/generated/build/generated/ios/BreezSdkSparkReactNativeSpec/BreezSdkSparkReactNativeSpec.h +63 -0
  40. package/ios/generated/build/generated/ios/BreezSdkSparkReactNativeSpecJSI-generated.cpp +32 -0
  41. package/ios/generated/build/generated/ios/BreezSdkSparkReactNativeSpecJSI.h +80 -0
  42. package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/ComponentDescriptors.cpp +22 -0
  43. package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/ComponentDescriptors.h +24 -0
  44. package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/EventEmitters.cpp +16 -0
  45. package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/EventEmitters.h +17 -0
  46. package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/Props.cpp +19 -0
  47. package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/Props.h +18 -0
  48. package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/RCTComponentViewHelpers.h +18 -0
  49. package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/ShadowNodes.cpp +17 -0
  50. package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/ShadowNodes.h +23 -0
  51. package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/States.cpp +16 -0
  52. package/ios/generated/build/generated/ios/react/renderer/components/BreezSdkSparkReactNativeSpec/States.h +19 -0
  53. package/lib/commonjs/NativeBreezSdkSparkReactNative.js +10 -0
  54. package/lib/commonjs/NativeBreezSdkSparkReactNative.js.map +1 -0
  55. package/lib/commonjs/generated/breez_sdk_common-ffi.js +44 -0
  56. package/lib/commonjs/generated/breez_sdk_common-ffi.js.map +1 -0
  57. package/lib/commonjs/generated/breez_sdk_common.js +3948 -0
  58. package/lib/commonjs/generated/breez_sdk_common.js.map +1 -0
  59. package/lib/commonjs/generated/breez_sdk_spark-ffi.js +44 -0
  60. package/lib/commonjs/generated/breez_sdk_spark-ffi.js.map +1 -0
  61. package/lib/commonjs/generated/breez_sdk_spark.js +5775 -0
  62. package/lib/commonjs/generated/breez_sdk_spark.js.map +1 -0
  63. package/lib/commonjs/generated/breez_sdk_spark_bindings-ffi.js +44 -0
  64. package/lib/commonjs/generated/breez_sdk_spark_bindings-ffi.js.map +1 -0
  65. package/lib/commonjs/generated/breez_sdk_spark_bindings.js +51 -0
  66. package/lib/commonjs/generated/breez_sdk_spark_bindings.js.map +1 -0
  67. package/lib/commonjs/index.js +81 -0
  68. package/lib/commonjs/index.js.map +1 -0
  69. package/lib/commonjs/package.json +1 -0
  70. package/lib/module/NativeBreezSdkSparkReactNative.js +7 -0
  71. package/lib/module/NativeBreezSdkSparkReactNative.js.map +1 -0
  72. package/lib/module/generated/breez_sdk_common-ffi.js +43 -0
  73. package/lib/module/generated/breez_sdk_common-ffi.js.map +1 -0
  74. package/lib/module/generated/breez_sdk_common.js +3942 -0
  75. package/lib/module/generated/breez_sdk_common.js.map +1 -0
  76. package/lib/module/generated/breez_sdk_spark-ffi.js +43 -0
  77. package/lib/module/generated/breez_sdk_spark-ffi.js.map +1 -0
  78. package/lib/module/generated/breez_sdk_spark.js +5759 -0
  79. package/lib/module/generated/breez_sdk_spark.js.map +1 -0
  80. package/lib/module/generated/breez_sdk_spark_bindings-ffi.js +43 -0
  81. package/lib/module/generated/breez_sdk_spark_bindings-ffi.js.map +1 -0
  82. package/lib/module/generated/breez_sdk_spark_bindings.js +46 -0
  83. package/lib/module/generated/breez_sdk_spark_bindings.js.map +1 -0
  84. package/lib/module/index.js +44 -0
  85. package/lib/module/index.js.map +1 -0
  86. package/lib/module/package.json +1 -0
  87. package/lib/typescript/commonjs/package.json +1 -0
  88. package/lib/typescript/commonjs/src/NativeBreezSdkSparkReactNative.d.ts +8 -0
  89. package/lib/typescript/commonjs/src/NativeBreezSdkSparkReactNative.d.ts.map +1 -0
  90. package/lib/typescript/module/package.json +1 -0
  91. package/lib/typescript/module/src/NativeBreezSdkSparkReactNative.d.ts +8 -0
  92. package/lib/typescript/module/src/NativeBreezSdkSparkReactNative.d.ts.map +1 -0
  93. package/package.json +189 -0
  94. package/react-native.config.js +12 -0
  95. package/scripts/postinstall.sh +14 -0
  96. package/src/NativeBreezSdkSparkReactNative.ts +10 -0
  97. package/src/generated/breez_sdk_common-ffi.ts +394 -0
  98. package/src/generated/breez_sdk_common.ts +5502 -0
  99. package/src/generated/breez_sdk_spark-ffi.ts +751 -0
  100. package/src/generated/breez_sdk_spark.ts +9179 -0
  101. package/src/generated/breez_sdk_spark_bindings-ffi.ts +185 -0
  102. package/src/generated/breez_sdk_spark_bindings.ts +103 -0
  103. package/src/index.tsx +42 -0
@@ -0,0 +1,751 @@
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
+
4
+ import {
5
+ type StructuralEquality as UniffiStructuralEquality,
6
+ type UniffiForeignFuture as RuntimeUniffiForeignFuture,
7
+ type UniffiRustCallStatus,
8
+ type UniffiRustArcPtr,
9
+ type UniffiRustFutureContinuationCallback as RuntimeUniffiRustFutureContinuationCallback,
10
+ type UniffiResult,
11
+ } from 'uniffi-bindgen-react-native';
12
+
13
+ interface NativeModuleInterface {
14
+ ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length(
15
+ string: string,
16
+ uniffi_out_err: UniffiRustCallStatus
17
+ ): number;
18
+ ubrn_uniffi_internal_fn_func_ffi__string_to_arraybuffer(
19
+ string: string,
20
+ uniffi_out_err: UniffiRustCallStatus
21
+ ): Uint8Array;
22
+ ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string(
23
+ buffer: Uint8Array,
24
+ uniffi_out_err: UniffiRustCallStatus
25
+ ): string;
26
+ ubrn_uniffi_breez_sdk_spark_fn_clone_bitcoinchainservice(
27
+ ptr: bigint,
28
+ uniffi_out_err: UniffiRustCallStatus
29
+ ): bigint;
30
+ ubrn_uniffi_breez_sdk_spark_fn_free_bitcoinchainservice(
31
+ ptr: bigint,
32
+ uniffi_out_err: UniffiRustCallStatus
33
+ ): void;
34
+ ubrn_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_address_utxos(
35
+ ptr: bigint,
36
+ address: Uint8Array
37
+ ): bigint;
38
+ ubrn_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_transaction_hex(
39
+ ptr: bigint,
40
+ txid: Uint8Array
41
+ ): bigint;
42
+ ubrn_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_broadcast_transaction(
43
+ ptr: bigint,
44
+ tx: Uint8Array
45
+ ): bigint;
46
+ ubrn_uniffi_breez_sdk_spark_fn_clone_breezsdk(
47
+ ptr: bigint,
48
+ uniffi_out_err: UniffiRustCallStatus
49
+ ): bigint;
50
+ ubrn_uniffi_breez_sdk_spark_fn_free_breezsdk(
51
+ ptr: bigint,
52
+ uniffi_out_err: UniffiRustCallStatus
53
+ ): void;
54
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener(
55
+ ptr: bigint,
56
+ listener: bigint,
57
+ uniffi_out_err: UniffiRustCallStatus
58
+ ): Uint8Array;
59
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_check_lightning_address_available(
60
+ ptr: bigint,
61
+ req: Uint8Array
62
+ ): bigint;
63
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_claim_deposit(
64
+ ptr: bigint,
65
+ request: Uint8Array
66
+ ): bigint;
67
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_delete_lightning_address(
68
+ ptr: bigint
69
+ ): bigint;
70
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect(
71
+ ptr: bigint,
72
+ uniffi_out_err: UniffiRustCallStatus
73
+ ): void;
74
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_get_info(
75
+ ptr: bigint,
76
+ request: Uint8Array
77
+ ): bigint;
78
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_get_lightning_address(
79
+ ptr: bigint
80
+ ): bigint;
81
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_get_payment(
82
+ ptr: bigint,
83
+ request: Uint8Array
84
+ ): bigint;
85
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_list_payments(
86
+ ptr: bigint,
87
+ request: Uint8Array
88
+ ): bigint;
89
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_list_unclaimed_deposits(
90
+ ptr: bigint,
91
+ request: Uint8Array
92
+ ): bigint;
93
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_pay(
94
+ ptr: bigint,
95
+ request: Uint8Array
96
+ ): bigint;
97
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_poll_lightning_send_payment(
98
+ ptr: bigint,
99
+ paymentId: Uint8Array,
100
+ uniffi_out_err: UniffiRustCallStatus
101
+ ): void;
102
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_lnurl_pay(
103
+ ptr: bigint,
104
+ request: Uint8Array
105
+ ): bigint;
106
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_send_payment(
107
+ ptr: bigint,
108
+ request: Uint8Array
109
+ ): bigint;
110
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_receive_payment(
111
+ ptr: bigint,
112
+ request: Uint8Array
113
+ ): bigint;
114
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_recover_lightning_address(
115
+ ptr: bigint
116
+ ): bigint;
117
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_refund_deposit(
118
+ ptr: bigint,
119
+ request: Uint8Array
120
+ ): bigint;
121
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_register_lightning_address(
122
+ ptr: bigint,
123
+ request: Uint8Array
124
+ ): bigint;
125
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener(
126
+ ptr: bigint,
127
+ id: Uint8Array,
128
+ uniffi_out_err: UniffiRustCallStatus
129
+ ): number;
130
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment(
131
+ ptr: bigint,
132
+ request: Uint8Array
133
+ ): bigint;
134
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment_internal(
135
+ ptr: bigint,
136
+ request: Uint8Array,
137
+ suppressPaymentEvent: number
138
+ ): bigint;
139
+ ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
140
+ ptr: bigint,
141
+ request: Uint8Array,
142
+ uniffi_out_err: UniffiRustCallStatus
143
+ ): Uint8Array;
144
+ ubrn_uniffi_breez_sdk_spark_fn_clone_sdkbuilder(
145
+ ptr: bigint,
146
+ uniffi_out_err: UniffiRustCallStatus
147
+ ): bigint;
148
+ ubrn_uniffi_breez_sdk_spark_fn_free_sdkbuilder(
149
+ ptr: bigint,
150
+ uniffi_out_err: UniffiRustCallStatus
151
+ ): void;
152
+ ubrn_uniffi_breez_sdk_spark_fn_constructor_sdkbuilder_new(
153
+ config: Uint8Array,
154
+ mnemonic: Uint8Array,
155
+ storage: bigint,
156
+ uniffi_out_err: UniffiRustCallStatus
157
+ ): bigint;
158
+ ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_build(ptr: bigint): bigint;
159
+ ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_chain_service(
160
+ ptr: bigint,
161
+ chainService: bigint
162
+ ): bigint;
163
+ ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_lnurl_client(
164
+ ptr: bigint,
165
+ lnurlClient: bigint
166
+ ): bigint;
167
+ ubrn_uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_rest_chain_service(
168
+ ptr: bigint,
169
+ url: Uint8Array,
170
+ credentials: Uint8Array
171
+ ): bigint;
172
+ ubrn_uniffi_breez_sdk_spark_fn_clone_storage(
173
+ ptr: bigint,
174
+ uniffi_out_err: UniffiRustCallStatus
175
+ ): bigint;
176
+ ubrn_uniffi_breez_sdk_spark_fn_free_storage(
177
+ ptr: bigint,
178
+ uniffi_out_err: UniffiRustCallStatus
179
+ ): void;
180
+ ubrn_uniffi_breez_sdk_spark_fn_method_storage_delete_cached_item(
181
+ ptr: bigint,
182
+ key: Uint8Array
183
+ ): bigint;
184
+ ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_cached_item(
185
+ ptr: bigint,
186
+ key: Uint8Array
187
+ ): bigint;
188
+ ubrn_uniffi_breez_sdk_spark_fn_method_storage_set_cached_item(
189
+ ptr: bigint,
190
+ key: Uint8Array,
191
+ value: Uint8Array
192
+ ): bigint;
193
+ ubrn_uniffi_breez_sdk_spark_fn_method_storage_list_payments(
194
+ ptr: bigint,
195
+ offset: Uint8Array,
196
+ limit: Uint8Array
197
+ ): bigint;
198
+ ubrn_uniffi_breez_sdk_spark_fn_method_storage_insert_payment(
199
+ ptr: bigint,
200
+ payment: Uint8Array
201
+ ): bigint;
202
+ ubrn_uniffi_breez_sdk_spark_fn_method_storage_set_payment_metadata(
203
+ ptr: bigint,
204
+ paymentId: Uint8Array,
205
+ metadata: Uint8Array
206
+ ): bigint;
207
+ ubrn_uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_id(
208
+ ptr: bigint,
209
+ id: Uint8Array
210
+ ): bigint;
211
+ ubrn_uniffi_breez_sdk_spark_fn_method_storage_add_deposit(
212
+ ptr: bigint,
213
+ txid: Uint8Array,
214
+ vout: number,
215
+ amountSats: bigint
216
+ ): bigint;
217
+ ubrn_uniffi_breez_sdk_spark_fn_method_storage_delete_deposit(
218
+ ptr: bigint,
219
+ txid: Uint8Array,
220
+ vout: number
221
+ ): bigint;
222
+ ubrn_uniffi_breez_sdk_spark_fn_method_storage_list_deposits(
223
+ ptr: bigint
224
+ ): bigint;
225
+ ubrn_uniffi_breez_sdk_spark_fn_method_storage_update_deposit(
226
+ ptr: bigint,
227
+ txid: Uint8Array,
228
+ vout: number,
229
+ payload: Uint8Array
230
+ ): bigint;
231
+ ubrn_uniffi_breez_sdk_spark_fn_func_connect(request: Uint8Array): bigint;
232
+ ubrn_uniffi_breez_sdk_spark_fn_func_default_config(
233
+ network: Uint8Array,
234
+ uniffi_out_err: UniffiRustCallStatus
235
+ ): Uint8Array;
236
+ ubrn_uniffi_breez_sdk_spark_fn_func_default_storage(
237
+ dataDir: Uint8Array
238
+ ): bigint;
239
+ ubrn_uniffi_breez_sdk_spark_fn_func_init_logging(
240
+ logDir: Uint8Array,
241
+ appLogger: Uint8Array,
242
+ logFilter: Uint8Array,
243
+ uniffi_out_err: UniffiRustCallStatus
244
+ ): void;
245
+ ubrn_uniffi_breez_sdk_spark_fn_func_parse(input: Uint8Array): bigint;
246
+ ubrn_ffi_breez_sdk_spark_rust_future_poll_u8(
247
+ handle: bigint,
248
+ callback: UniffiRustFutureContinuationCallback,
249
+ callbackData: bigint
250
+ ): void;
251
+ ubrn_ffi_breez_sdk_spark_rust_future_cancel_u8(handle: bigint): void;
252
+ ubrn_ffi_breez_sdk_spark_rust_future_free_u8(handle: bigint): void;
253
+ ubrn_ffi_breez_sdk_spark_rust_future_complete_u8(
254
+ handle: bigint,
255
+ uniffi_out_err: UniffiRustCallStatus
256
+ ): number;
257
+ ubrn_ffi_breez_sdk_spark_rust_future_poll_i8(
258
+ handle: bigint,
259
+ callback: UniffiRustFutureContinuationCallback,
260
+ callbackData: bigint
261
+ ): void;
262
+ ubrn_ffi_breez_sdk_spark_rust_future_cancel_i8(handle: bigint): void;
263
+ ubrn_ffi_breez_sdk_spark_rust_future_free_i8(handle: bigint): void;
264
+ ubrn_ffi_breez_sdk_spark_rust_future_complete_i8(
265
+ handle: bigint,
266
+ uniffi_out_err: UniffiRustCallStatus
267
+ ): number;
268
+ ubrn_ffi_breez_sdk_spark_rust_future_poll_u16(
269
+ handle: bigint,
270
+ callback: UniffiRustFutureContinuationCallback,
271
+ callbackData: bigint
272
+ ): void;
273
+ ubrn_ffi_breez_sdk_spark_rust_future_cancel_u16(handle: bigint): void;
274
+ ubrn_ffi_breez_sdk_spark_rust_future_free_u16(handle: bigint): void;
275
+ ubrn_ffi_breez_sdk_spark_rust_future_complete_u16(
276
+ handle: bigint,
277
+ uniffi_out_err: UniffiRustCallStatus
278
+ ): number;
279
+ ubrn_ffi_breez_sdk_spark_rust_future_poll_i16(
280
+ handle: bigint,
281
+ callback: UniffiRustFutureContinuationCallback,
282
+ callbackData: bigint
283
+ ): void;
284
+ ubrn_ffi_breez_sdk_spark_rust_future_cancel_i16(handle: bigint): void;
285
+ ubrn_ffi_breez_sdk_spark_rust_future_free_i16(handle: bigint): void;
286
+ ubrn_ffi_breez_sdk_spark_rust_future_complete_i16(
287
+ handle: bigint,
288
+ uniffi_out_err: UniffiRustCallStatus
289
+ ): number;
290
+ ubrn_ffi_breez_sdk_spark_rust_future_poll_u32(
291
+ handle: bigint,
292
+ callback: UniffiRustFutureContinuationCallback,
293
+ callbackData: bigint
294
+ ): void;
295
+ ubrn_ffi_breez_sdk_spark_rust_future_cancel_u32(handle: bigint): void;
296
+ ubrn_ffi_breez_sdk_spark_rust_future_free_u32(handle: bigint): void;
297
+ ubrn_ffi_breez_sdk_spark_rust_future_complete_u32(
298
+ handle: bigint,
299
+ uniffi_out_err: UniffiRustCallStatus
300
+ ): number;
301
+ ubrn_ffi_breez_sdk_spark_rust_future_poll_i32(
302
+ handle: bigint,
303
+ callback: UniffiRustFutureContinuationCallback,
304
+ callbackData: bigint
305
+ ): void;
306
+ ubrn_ffi_breez_sdk_spark_rust_future_cancel_i32(handle: bigint): void;
307
+ ubrn_ffi_breez_sdk_spark_rust_future_free_i32(handle: bigint): void;
308
+ ubrn_ffi_breez_sdk_spark_rust_future_complete_i32(
309
+ handle: bigint,
310
+ uniffi_out_err: UniffiRustCallStatus
311
+ ): number;
312
+ ubrn_ffi_breez_sdk_spark_rust_future_poll_u64(
313
+ handle: bigint,
314
+ callback: UniffiRustFutureContinuationCallback,
315
+ callbackData: bigint
316
+ ): void;
317
+ ubrn_ffi_breez_sdk_spark_rust_future_cancel_u64(handle: bigint): void;
318
+ ubrn_ffi_breez_sdk_spark_rust_future_free_u64(handle: bigint): void;
319
+ ubrn_ffi_breez_sdk_spark_rust_future_complete_u64(
320
+ handle: bigint,
321
+ uniffi_out_err: UniffiRustCallStatus
322
+ ): bigint;
323
+ ubrn_ffi_breez_sdk_spark_rust_future_poll_i64(
324
+ handle: bigint,
325
+ callback: UniffiRustFutureContinuationCallback,
326
+ callbackData: bigint
327
+ ): void;
328
+ ubrn_ffi_breez_sdk_spark_rust_future_cancel_i64(handle: bigint): void;
329
+ ubrn_ffi_breez_sdk_spark_rust_future_free_i64(handle: bigint): void;
330
+ ubrn_ffi_breez_sdk_spark_rust_future_complete_i64(
331
+ handle: bigint,
332
+ uniffi_out_err: UniffiRustCallStatus
333
+ ): bigint;
334
+ ubrn_ffi_breez_sdk_spark_rust_future_poll_f32(
335
+ handle: bigint,
336
+ callback: UniffiRustFutureContinuationCallback,
337
+ callbackData: bigint
338
+ ): void;
339
+ ubrn_ffi_breez_sdk_spark_rust_future_cancel_f32(handle: bigint): void;
340
+ ubrn_ffi_breez_sdk_spark_rust_future_free_f32(handle: bigint): void;
341
+ ubrn_ffi_breez_sdk_spark_rust_future_complete_f32(
342
+ handle: bigint,
343
+ uniffi_out_err: UniffiRustCallStatus
344
+ ): number;
345
+ ubrn_ffi_breez_sdk_spark_rust_future_poll_f64(
346
+ handle: bigint,
347
+ callback: UniffiRustFutureContinuationCallback,
348
+ callbackData: bigint
349
+ ): void;
350
+ ubrn_ffi_breez_sdk_spark_rust_future_cancel_f64(handle: bigint): void;
351
+ ubrn_ffi_breez_sdk_spark_rust_future_free_f64(handle: bigint): void;
352
+ ubrn_ffi_breez_sdk_spark_rust_future_complete_f64(
353
+ handle: bigint,
354
+ uniffi_out_err: UniffiRustCallStatus
355
+ ): number;
356
+ ubrn_ffi_breez_sdk_spark_rust_future_poll_pointer(
357
+ handle: bigint,
358
+ callback: UniffiRustFutureContinuationCallback,
359
+ callbackData: bigint
360
+ ): void;
361
+ ubrn_ffi_breez_sdk_spark_rust_future_cancel_pointer(handle: bigint): void;
362
+ ubrn_ffi_breez_sdk_spark_rust_future_free_pointer(handle: bigint): void;
363
+ ubrn_ffi_breez_sdk_spark_rust_future_complete_pointer(
364
+ handle: bigint,
365
+ uniffi_out_err: UniffiRustCallStatus
366
+ ): bigint;
367
+ ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer(
368
+ handle: bigint,
369
+ callback: UniffiRustFutureContinuationCallback,
370
+ callbackData: bigint
371
+ ): void;
372
+ ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer(handle: bigint): void;
373
+ ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer(handle: bigint): void;
374
+ ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer(
375
+ handle: bigint,
376
+ uniffi_out_err: UniffiRustCallStatus
377
+ ): Uint8Array;
378
+ ubrn_ffi_breez_sdk_spark_rust_future_poll_void(
379
+ handle: bigint,
380
+ callback: UniffiRustFutureContinuationCallback,
381
+ callbackData: bigint
382
+ ): void;
383
+ ubrn_ffi_breez_sdk_spark_rust_future_cancel_void(handle: bigint): void;
384
+ ubrn_ffi_breez_sdk_spark_rust_future_free_void(handle: bigint): void;
385
+ ubrn_ffi_breez_sdk_spark_rust_future_complete_void(
386
+ handle: bigint,
387
+ uniffi_out_err: UniffiRustCallStatus
388
+ ): void;
389
+ ubrn_uniffi_breez_sdk_spark_checksum_func_connect(): number;
390
+ ubrn_uniffi_breez_sdk_spark_checksum_func_default_config(): number;
391
+ ubrn_uniffi_breez_sdk_spark_checksum_func_default_storage(): number;
392
+ ubrn_uniffi_breez_sdk_spark_checksum_func_init_logging(): number;
393
+ ubrn_uniffi_breez_sdk_spark_checksum_func_parse(): number;
394
+ ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_address_utxos(): number;
395
+ ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_hex(): number;
396
+ ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction(): number;
397
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener(): number;
398
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_check_lightning_address_available(): number;
399
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit(): number;
400
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_address(): number;
401
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_disconnect(): number;
402
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_info(): number;
403
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_lightning_address(): number;
404
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment(): number;
405
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_payments(): number;
406
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_list_unclaimed_deposits(): number;
407
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay(): number;
408
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_poll_lightning_send_payment(): number;
409
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay(): number;
410
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment(): number;
411
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment(): number;
412
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_recover_lightning_address(): number;
413
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit(): number;
414
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_register_lightning_address(): number;
415
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener(): number;
416
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment(): number;
417
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_internal(): number;
418
+ ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet(): number;
419
+ ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build(): number;
420
+ ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service(): number;
421
+ ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client(): number;
422
+ ubrn_uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_chain_service(): number;
423
+ ubrn_uniffi_breez_sdk_spark_checksum_method_storage_delete_cached_item(): number;
424
+ ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_cached_item(): number;
425
+ ubrn_uniffi_breez_sdk_spark_checksum_method_storage_set_cached_item(): number;
426
+ ubrn_uniffi_breez_sdk_spark_checksum_method_storage_list_payments(): number;
427
+ ubrn_uniffi_breez_sdk_spark_checksum_method_storage_insert_payment(): number;
428
+ ubrn_uniffi_breez_sdk_spark_checksum_method_storage_set_payment_metadata(): number;
429
+ ubrn_uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_id(): number;
430
+ ubrn_uniffi_breez_sdk_spark_checksum_method_storage_add_deposit(): number;
431
+ ubrn_uniffi_breez_sdk_spark_checksum_method_storage_delete_deposit(): number;
432
+ ubrn_uniffi_breez_sdk_spark_checksum_method_storage_list_deposits(): number;
433
+ ubrn_uniffi_breez_sdk_spark_checksum_method_storage_update_deposit(): number;
434
+ ubrn_uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new(): number;
435
+ ubrn_uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event(): number;
436
+ ubrn_uniffi_breez_sdk_spark_checksum_method_logger_log(): number;
437
+ ubrn_ffi_breez_sdk_spark_uniffi_contract_version(): number;
438
+ ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener(
439
+ vtable: UniffiVTableCallbackInterfaceEventListener
440
+ ): void;
441
+ ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_logger(
442
+ vtable: UniffiVTableCallbackInterfaceLogger
443
+ ): void;
444
+ ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_bitcoinchainservice(
445
+ vtable: UniffiVTableCallbackInterfaceBitcoinChainService
446
+ ): void;
447
+ ubrn_uniffi_breez_sdk_spark_fn_init_callback_vtable_storage(
448
+ vtable: UniffiVTableCallbackInterfaceStorage
449
+ ): void;
450
+ ubrn_uniffi_internal_fn_method_bitcoinchainservice_ffi__bless_pointer(
451
+ pointer: bigint,
452
+ uniffi_out_err: UniffiRustCallStatus
453
+ ): UniffiRustArcPtr;
454
+ ubrn_uniffi_internal_fn_method_breezsdk_ffi__bless_pointer(
455
+ pointer: bigint,
456
+ uniffi_out_err: UniffiRustCallStatus
457
+ ): UniffiRustArcPtr;
458
+ ubrn_uniffi_internal_fn_method_sdkbuilder_ffi__bless_pointer(
459
+ pointer: bigint,
460
+ uniffi_out_err: UniffiRustCallStatus
461
+ ): UniffiRustArcPtr;
462
+ ubrn_uniffi_internal_fn_method_storage_ffi__bless_pointer(
463
+ pointer: bigint,
464
+ uniffi_out_err: UniffiRustCallStatus
465
+ ): UniffiRustArcPtr;
466
+ }
467
+
468
+ // Casting globalThis to any allows us to look for `NativeBreezSdkSpark`
469
+ // if it was added via JSI.
470
+ //
471
+ // We use a getter here rather than simply `globalThis.NativeBreezSdkSpark` so that
472
+ // if/when the startup sequence isn't just so, an empty value isn't inadvertantly cached.
473
+ const getter: () => NativeModuleInterface = () =>
474
+ (globalThis as any).NativeBreezSdkSpark;
475
+ export default getter;
476
+
477
+ // Structs and function types for calling back into Typescript from Rust.
478
+ export type UniffiRustFutureContinuationCallback = (
479
+ data: bigint,
480
+ pollResult: number
481
+ ) => void;
482
+ type UniffiForeignFutureFree = (handle: bigint) => void;
483
+ type UniffiCallbackInterfaceFree = (handle: bigint) => void;
484
+ export type UniffiForeignFuture = {
485
+ handle: bigint;
486
+ free: UniffiForeignFutureFree;
487
+ };
488
+ export type UniffiForeignFutureStructU8 = {
489
+ returnValue: number;
490
+ callStatus: UniffiRustCallStatus;
491
+ };
492
+ export type UniffiForeignFutureCompleteU8 = (
493
+ callbackData: bigint,
494
+ result: UniffiForeignFutureStructU8
495
+ ) => void;
496
+ export type UniffiForeignFutureStructI8 = {
497
+ returnValue: number;
498
+ callStatus: UniffiRustCallStatus;
499
+ };
500
+ export type UniffiForeignFutureCompleteI8 = (
501
+ callbackData: bigint,
502
+ result: UniffiForeignFutureStructI8
503
+ ) => void;
504
+ export type UniffiForeignFutureStructU16 = {
505
+ returnValue: number;
506
+ callStatus: UniffiRustCallStatus;
507
+ };
508
+ export type UniffiForeignFutureCompleteU16 = (
509
+ callbackData: bigint,
510
+ result: UniffiForeignFutureStructU16
511
+ ) => void;
512
+ export type UniffiForeignFutureStructI16 = {
513
+ returnValue: number;
514
+ callStatus: UniffiRustCallStatus;
515
+ };
516
+ export type UniffiForeignFutureCompleteI16 = (
517
+ callbackData: bigint,
518
+ result: UniffiForeignFutureStructI16
519
+ ) => void;
520
+ export type UniffiForeignFutureStructU32 = {
521
+ returnValue: number;
522
+ callStatus: UniffiRustCallStatus;
523
+ };
524
+ export type UniffiForeignFutureCompleteU32 = (
525
+ callbackData: bigint,
526
+ result: UniffiForeignFutureStructU32
527
+ ) => void;
528
+ export type UniffiForeignFutureStructI32 = {
529
+ returnValue: number;
530
+ callStatus: UniffiRustCallStatus;
531
+ };
532
+ export type UniffiForeignFutureCompleteI32 = (
533
+ callbackData: bigint,
534
+ result: UniffiForeignFutureStructI32
535
+ ) => void;
536
+ export type UniffiForeignFutureStructU64 = {
537
+ returnValue: bigint;
538
+ callStatus: UniffiRustCallStatus;
539
+ };
540
+ export type UniffiForeignFutureCompleteU64 = (
541
+ callbackData: bigint,
542
+ result: UniffiForeignFutureStructU64
543
+ ) => void;
544
+ export type UniffiForeignFutureStructI64 = {
545
+ returnValue: bigint;
546
+ callStatus: UniffiRustCallStatus;
547
+ };
548
+ export type UniffiForeignFutureCompleteI64 = (
549
+ callbackData: bigint,
550
+ result: UniffiForeignFutureStructI64
551
+ ) => void;
552
+ export type UniffiForeignFutureStructF32 = {
553
+ returnValue: number;
554
+ callStatus: UniffiRustCallStatus;
555
+ };
556
+ export type UniffiForeignFutureCompleteF32 = (
557
+ callbackData: bigint,
558
+ result: UniffiForeignFutureStructF32
559
+ ) => void;
560
+ export type UniffiForeignFutureStructF64 = {
561
+ returnValue: number;
562
+ callStatus: UniffiRustCallStatus;
563
+ };
564
+ export type UniffiForeignFutureCompleteF64 = (
565
+ callbackData: bigint,
566
+ result: UniffiForeignFutureStructF64
567
+ ) => void;
568
+ export type UniffiForeignFutureStructPointer = {
569
+ returnValue: bigint;
570
+ callStatus: UniffiRustCallStatus;
571
+ };
572
+ export type UniffiForeignFutureCompletePointer = (
573
+ callbackData: bigint,
574
+ result: UniffiForeignFutureStructPointer
575
+ ) => void;
576
+ export type UniffiForeignFutureStructRustBuffer = {
577
+ returnValue: Uint8Array;
578
+ callStatus: UniffiRustCallStatus;
579
+ };
580
+ export type UniffiForeignFutureCompleteRustBuffer = (
581
+ callbackData: bigint,
582
+ result: UniffiForeignFutureStructRustBuffer
583
+ ) => void;
584
+ export type UniffiForeignFutureStructVoid = {
585
+ callStatus: UniffiRustCallStatus;
586
+ };
587
+ export type UniffiForeignFutureCompleteVoid = (
588
+ callbackData: bigint,
589
+ result: UniffiForeignFutureStructVoid
590
+ ) => void;
591
+ type UniffiCallbackInterfaceEventListenerMethod0 = (
592
+ uniffiHandle: bigint,
593
+ event: Uint8Array
594
+ ) => UniffiResult<void>;
595
+ type UniffiCallbackInterfaceLoggerMethod0 = (
596
+ uniffiHandle: bigint,
597
+ l: Uint8Array
598
+ ) => UniffiResult<void>;
599
+ type UniffiCallbackInterfaceBitcoinChainServiceMethod0 = (
600
+ uniffiHandle: bigint,
601
+ address: Uint8Array,
602
+ uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
603
+ uniffiCallbackData: bigint
604
+ ) => UniffiResult<UniffiForeignFuture>;
605
+ type UniffiCallbackInterfaceBitcoinChainServiceMethod1 = (
606
+ uniffiHandle: bigint,
607
+ txid: Uint8Array,
608
+ uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
609
+ uniffiCallbackData: bigint
610
+ ) => UniffiResult<UniffiForeignFuture>;
611
+ type UniffiCallbackInterfaceBitcoinChainServiceMethod2 = (
612
+ uniffiHandle: bigint,
613
+ tx: Uint8Array,
614
+ uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
615
+ uniffiCallbackData: bigint
616
+ ) => UniffiResult<UniffiForeignFuture>;
617
+ type UniffiCallbackInterfaceStorageMethod0 = (
618
+ uniffiHandle: bigint,
619
+ key: Uint8Array,
620
+ uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
621
+ uniffiCallbackData: bigint
622
+ ) => UniffiResult<UniffiForeignFuture>;
623
+ type UniffiCallbackInterfaceStorageMethod1 = (
624
+ uniffiHandle: bigint,
625
+ key: Uint8Array,
626
+ uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
627
+ uniffiCallbackData: bigint
628
+ ) => UniffiResult<UniffiForeignFuture>;
629
+ type UniffiCallbackInterfaceStorageMethod2 = (
630
+ uniffiHandle: bigint,
631
+ key: Uint8Array,
632
+ value: Uint8Array,
633
+ uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
634
+ uniffiCallbackData: bigint
635
+ ) => UniffiResult<UniffiForeignFuture>;
636
+ type UniffiCallbackInterfaceStorageMethod3 = (
637
+ uniffiHandle: bigint,
638
+ offset: Uint8Array,
639
+ limit: Uint8Array,
640
+ uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
641
+ uniffiCallbackData: bigint
642
+ ) => UniffiResult<UniffiForeignFuture>;
643
+ type UniffiCallbackInterfaceStorageMethod4 = (
644
+ uniffiHandle: bigint,
645
+ payment: Uint8Array,
646
+ uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
647
+ uniffiCallbackData: bigint
648
+ ) => UniffiResult<UniffiForeignFuture>;
649
+ type UniffiCallbackInterfaceStorageMethod5 = (
650
+ uniffiHandle: bigint,
651
+ paymentId: Uint8Array,
652
+ metadata: Uint8Array,
653
+ uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
654
+ uniffiCallbackData: bigint
655
+ ) => UniffiResult<UniffiForeignFuture>;
656
+ type UniffiCallbackInterfaceStorageMethod6 = (
657
+ uniffiHandle: bigint,
658
+ id: Uint8Array,
659
+ uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
660
+ uniffiCallbackData: bigint
661
+ ) => UniffiResult<UniffiForeignFuture>;
662
+ type UniffiCallbackInterfaceStorageMethod7 = (
663
+ uniffiHandle: bigint,
664
+ txid: Uint8Array,
665
+ vout: number,
666
+ amountSats: bigint,
667
+ uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
668
+ uniffiCallbackData: bigint
669
+ ) => UniffiResult<UniffiForeignFuture>;
670
+ type UniffiCallbackInterfaceStorageMethod8 = (
671
+ uniffiHandle: bigint,
672
+ txid: Uint8Array,
673
+ vout: number,
674
+ uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
675
+ uniffiCallbackData: bigint
676
+ ) => UniffiResult<UniffiForeignFuture>;
677
+ type UniffiCallbackInterfaceStorageMethod9 = (
678
+ uniffiHandle: bigint,
679
+ uniffiFutureCallback: UniffiForeignFutureCompleteRustBuffer,
680
+ uniffiCallbackData: bigint
681
+ ) => UniffiResult<UniffiForeignFuture>;
682
+ type UniffiCallbackInterfaceStorageMethod10 = (
683
+ uniffiHandle: bigint,
684
+ txid: Uint8Array,
685
+ vout: number,
686
+ payload: Uint8Array,
687
+ uniffiFutureCallback: UniffiForeignFutureCompleteVoid,
688
+ uniffiCallbackData: bigint
689
+ ) => UniffiResult<UniffiForeignFuture>;
690
+ export type UniffiVTableCallbackInterfaceEventListener = {
691
+ onEvent: UniffiCallbackInterfaceEventListenerMethod0;
692
+ uniffiFree: UniffiCallbackInterfaceFree;
693
+ };
694
+ export type UniffiVTableCallbackInterfaceLogger = {
695
+ log: UniffiCallbackInterfaceLoggerMethod0;
696
+ uniffiFree: UniffiCallbackInterfaceFree;
697
+ };
698
+ export type UniffiVTableCallbackInterfaceBitcoinChainService = {
699
+ getAddressUtxos: UniffiCallbackInterfaceBitcoinChainServiceMethod0;
700
+ getTransactionHex: UniffiCallbackInterfaceBitcoinChainServiceMethod1;
701
+ broadcastTransaction: UniffiCallbackInterfaceBitcoinChainServiceMethod2;
702
+ uniffiFree: UniffiCallbackInterfaceFree;
703
+ };
704
+ export type UniffiVTableCallbackInterfaceStorage = {
705
+ deleteCachedItem: UniffiCallbackInterfaceStorageMethod0;
706
+ getCachedItem: UniffiCallbackInterfaceStorageMethod1;
707
+ setCachedItem: UniffiCallbackInterfaceStorageMethod2;
708
+ listPayments: UniffiCallbackInterfaceStorageMethod3;
709
+ insertPayment: UniffiCallbackInterfaceStorageMethod4;
710
+ setPaymentMetadata: UniffiCallbackInterfaceStorageMethod5;
711
+ getPaymentById: UniffiCallbackInterfaceStorageMethod6;
712
+ addDeposit: UniffiCallbackInterfaceStorageMethod7;
713
+ deleteDeposit: UniffiCallbackInterfaceStorageMethod8;
714
+ listDeposits: UniffiCallbackInterfaceStorageMethod9;
715
+ updateDeposit: UniffiCallbackInterfaceStorageMethod10;
716
+ uniffiFree: UniffiCallbackInterfaceFree;
717
+ };
718
+
719
+ // UniffiRustFutureContinuationCallback is generated as part of the component interface's
720
+ // ffi_definitions. However, we need it in the runtime.
721
+ // We could:
722
+ // (a) do some complicated template logic to ensure the declaration is not generated here (possible)
723
+ // (b) import the generated declaration into the runtime (m a y b e) or…
724
+ // (c) generate the declaration anyway, and use a different declaration in the runtime.
725
+ //
726
+ // We chose (c) here as the simplest. In addition, we perform a compile time check that
727
+ // the two versions of `UniffiRustFutureContinuationCallback` are structurally equivalent.
728
+ //
729
+ // If you see the error:
730
+ // ```
731
+ // Type 'true' is not assignable to type 'false'.(2322)
732
+ // ```
733
+ // Then a new version of uniffi has changed the signature of the callback. Most likely, code in
734
+ // `typescript/src/async-rust-call.ts` will need to be changed.
735
+ //
736
+ // If you see the error:
737
+ // ```
738
+ // Cannot find name 'UniffiRustFutureContinuationCallback'. Did you mean 'RuntimeUniffiRustFutureContinuationCallback'?(2552)
739
+ // ```
740
+ // then you may not be using callbacks or promises, and uniffi is now not generating Futures and callbacks.
741
+ // You should not generate this if that is the case.
742
+ //
743
+ // ('You' being the bindings generator maintainer).
744
+ const isRustFutureContinuationCallbackTypeCompatible: UniffiStructuralEquality<
745
+ RuntimeUniffiRustFutureContinuationCallback,
746
+ UniffiRustFutureContinuationCallback
747
+ > = true;
748
+ const isUniffiForeignFutureTypeCompatible: UniffiStructuralEquality<
749
+ RuntimeUniffiForeignFuture,
750
+ UniffiForeignFuture
751
+ > = true;