@breeztech/breez-sdk-spark-react-native 0.25.0 → 0.26.0

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.
@@ -360,70 +360,78 @@ typedef void (*UniffiCallbackInterfaceStorageMethod12)(
360
360
  UniffiForeignFutureCompleteVoid uniffi_future_callback,
361
361
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
362
362
  typedef void (*UniffiCallbackInterfaceStorageMethod13)(
363
+ uint64_t uniffi_handle,
364
+ UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
365
+ uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
366
+ typedef void (*UniffiCallbackInterfaceStorageMethod14)(
367
+ uint64_t uniffi_handle, RustBuffer address, RustBuffer payload,
368
+ UniffiForeignFutureCompleteVoid uniffi_future_callback,
369
+ uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
370
+ typedef void (*UniffiCallbackInterfaceStorageMethod15)(
363
371
  uint64_t uniffi_handle, RustBuffer metadata,
364
372
  UniffiForeignFutureCompleteVoid uniffi_future_callback,
365
373
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
366
- typedef void (*UniffiCallbackInterfaceStorageMethod14)(
374
+ typedef void (*UniffiCallbackInterfaceStorageMethod16)(
367
375
  uint64_t uniffi_handle, RustBuffer request,
368
376
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
369
377
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
370
- typedef void (*UniffiCallbackInterfaceStorageMethod15)(
378
+ typedef void (*UniffiCallbackInterfaceStorageMethod17)(
371
379
  uint64_t uniffi_handle, RustBuffer id,
372
380
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
373
381
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
374
- typedef void (*UniffiCallbackInterfaceStorageMethod16)(
382
+ typedef void (*UniffiCallbackInterfaceStorageMethod18)(
375
383
  uint64_t uniffi_handle, RustBuffer contact,
376
384
  UniffiForeignFutureCompleteVoid uniffi_future_callback,
377
385
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
378
- typedef void (*UniffiCallbackInterfaceStorageMethod17)(
386
+ typedef void (*UniffiCallbackInterfaceStorageMethod19)(
379
387
  uint64_t uniffi_handle, RustBuffer id,
380
388
  UniffiForeignFutureCompleteVoid uniffi_future_callback,
381
389
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
382
- typedef void (*UniffiCallbackInterfaceStorageMethod18)(
390
+ typedef void (*UniffiCallbackInterfaceStorageMethod20)(
383
391
  uint64_t uniffi_handle, RustBuffer swap,
384
392
  UniffiForeignFutureCompleteVoid uniffi_future_callback,
385
393
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
386
- typedef void (*UniffiCallbackInterfaceStorageMethod19)(
394
+ typedef void (*UniffiCallbackInterfaceStorageMethod21)(
387
395
  uint64_t uniffi_handle, RustBuffer provider, RustBuffer id,
388
396
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
389
397
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
390
- typedef void (*UniffiCallbackInterfaceStorageMethod20)(
398
+ typedef void (*UniffiCallbackInterfaceStorageMethod22)(
391
399
  uint64_t uniffi_handle, RustBuffer provider,
392
400
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
393
401
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
394
- typedef void (*UniffiCallbackInterfaceStorageMethod21)(
402
+ typedef void (*UniffiCallbackInterfaceStorageMethod23)(
395
403
  uint64_t uniffi_handle, RustBuffer record,
396
404
  UniffiForeignFutureCompleteU64 uniffi_future_callback,
397
405
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
398
- typedef void (*UniffiCallbackInterfaceStorageMethod22)(
406
+ typedef void (*UniffiCallbackInterfaceStorageMethod24)(
399
407
  uint64_t uniffi_handle, RustBuffer record, uint64_t local_revision,
400
408
  UniffiForeignFutureCompleteVoid uniffi_future_callback,
401
409
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
402
- typedef void (*UniffiCallbackInterfaceStorageMethod23)(
410
+ typedef void (*UniffiCallbackInterfaceStorageMethod25)(
403
411
  uint64_t uniffi_handle, uint32_t limit,
404
412
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
405
413
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
406
- typedef void (*UniffiCallbackInterfaceStorageMethod24)(
414
+ typedef void (*UniffiCallbackInterfaceStorageMethod26)(
407
415
  uint64_t uniffi_handle,
408
416
  UniffiForeignFutureCompleteU64 uniffi_future_callback,
409
417
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
410
- typedef void (*UniffiCallbackInterfaceStorageMethod25)(
418
+ typedef void (*UniffiCallbackInterfaceStorageMethod27)(
411
419
  uint64_t uniffi_handle, RustBuffer records,
412
420
  UniffiForeignFutureCompleteVoid uniffi_future_callback,
413
421
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
414
- typedef void (*UniffiCallbackInterfaceStorageMethod26)(
422
+ typedef void (*UniffiCallbackInterfaceStorageMethod28)(
415
423
  uint64_t uniffi_handle, RustBuffer record,
416
424
  UniffiForeignFutureCompleteVoid uniffi_future_callback,
417
425
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
418
- typedef void (*UniffiCallbackInterfaceStorageMethod27)(
426
+ typedef void (*UniffiCallbackInterfaceStorageMethod29)(
419
427
  uint64_t uniffi_handle, uint32_t limit,
420
428
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
421
429
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
422
- typedef void (*UniffiCallbackInterfaceStorageMethod28)(
430
+ typedef void (*UniffiCallbackInterfaceStorageMethod30)(
423
431
  uint64_t uniffi_handle,
424
432
  UniffiForeignFutureCompleteRustBuffer uniffi_future_callback,
425
433
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
426
- typedef void (*UniffiCallbackInterfaceStorageMethod29)(
434
+ typedef void (*UniffiCallbackInterfaceStorageMethod31)(
427
435
  uint64_t uniffi_handle, RustBuffer record,
428
436
  UniffiForeignFutureCompleteVoid uniffi_future_callback,
429
437
  uint64_t uniffi_callback_data, UniffiForeignFuture *uniffi_out_return);
@@ -537,23 +545,25 @@ typedef struct UniffiVTableCallbackInterfaceStorage {
537
545
  UniffiCallbackInterfaceStorageMethod10 delete_deposit;
538
546
  UniffiCallbackInterfaceStorageMethod11 list_deposits;
539
547
  UniffiCallbackInterfaceStorageMethod12 update_deposit;
540
- UniffiCallbackInterfaceStorageMethod13 set_lnurl_metadata;
541
- UniffiCallbackInterfaceStorageMethod14 list_contacts;
542
- UniffiCallbackInterfaceStorageMethod15 get_contact;
543
- UniffiCallbackInterfaceStorageMethod16 insert_contact;
544
- UniffiCallbackInterfaceStorageMethod17 delete_contact;
545
- UniffiCallbackInterfaceStorageMethod18 set_cross_chain_swap;
546
- UniffiCallbackInterfaceStorageMethod19 get_cross_chain_swap;
547
- UniffiCallbackInterfaceStorageMethod20 list_active_cross_chain_swaps;
548
- UniffiCallbackInterfaceStorageMethod21 add_outgoing_change;
549
- UniffiCallbackInterfaceStorageMethod22 complete_outgoing_sync;
550
- UniffiCallbackInterfaceStorageMethod23 get_pending_outgoing_changes;
551
- UniffiCallbackInterfaceStorageMethod24 get_last_revision;
552
- UniffiCallbackInterfaceStorageMethod25 insert_incoming_records;
553
- UniffiCallbackInterfaceStorageMethod26 delete_incoming_record;
554
- UniffiCallbackInterfaceStorageMethod27 get_incoming_records;
555
- UniffiCallbackInterfaceStorageMethod28 get_latest_outgoing_change;
556
- UniffiCallbackInterfaceStorageMethod29 update_record_from_incoming;
548
+ UniffiCallbackInterfaceStorageMethod13 list_watched_deposit_addresses;
549
+ UniffiCallbackInterfaceStorageMethod14 update_watched_deposit_address;
550
+ UniffiCallbackInterfaceStorageMethod15 set_lnurl_metadata;
551
+ UniffiCallbackInterfaceStorageMethod16 list_contacts;
552
+ UniffiCallbackInterfaceStorageMethod17 get_contact;
553
+ UniffiCallbackInterfaceStorageMethod18 insert_contact;
554
+ UniffiCallbackInterfaceStorageMethod19 delete_contact;
555
+ UniffiCallbackInterfaceStorageMethod20 set_cross_chain_swap;
556
+ UniffiCallbackInterfaceStorageMethod21 get_cross_chain_swap;
557
+ UniffiCallbackInterfaceStorageMethod22 list_active_cross_chain_swaps;
558
+ UniffiCallbackInterfaceStorageMethod23 add_outgoing_change;
559
+ UniffiCallbackInterfaceStorageMethod24 complete_outgoing_sync;
560
+ UniffiCallbackInterfaceStorageMethod25 get_pending_outgoing_changes;
561
+ UniffiCallbackInterfaceStorageMethod26 get_last_revision;
562
+ UniffiCallbackInterfaceStorageMethod27 insert_incoming_records;
563
+ UniffiCallbackInterfaceStorageMethod28 delete_incoming_record;
564
+ UniffiCallbackInterfaceStorageMethod29 get_incoming_records;
565
+ UniffiCallbackInterfaceStorageMethod30 get_latest_outgoing_change;
566
+ UniffiCallbackInterfaceStorageMethod31 update_record_from_incoming;
557
567
  UniffiCallbackInterfaceFree uniffi_free;
558
568
  } UniffiVTableCallbackInterfaceStorage;
559
569
  typedef struct UniffiVTableCallbackInterfaceStorageBackend {
@@ -1068,6 +1078,12 @@ uniffi_breez_sdk_spark_fn_method_storage_get_payments_by_parent_ids(
1068
1078
  uniffi_breez_sdk_spark_fn_method_storage_list_deposits(void *ptr);
1069
1079
  /*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_storage_update_deposit(
1070
1080
  void *ptr, RustBuffer txid, uint32_t vout, RustBuffer payload);
1081
+ /*handle*/ uint64_t
1082
+ uniffi_breez_sdk_spark_fn_method_storage_list_watched_deposit_addresses(
1083
+ void *ptr);
1084
+ /*handle*/ uint64_t
1085
+ uniffi_breez_sdk_spark_fn_method_storage_update_watched_deposit_address(
1086
+ void *ptr, RustBuffer address, RustBuffer payload);
1071
1087
  /*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_storage_set_lnurl_metadata(
1072
1088
  void *ptr, RustBuffer metadata);
1073
1089
  /*handle*/ uint64_t
@@ -1548,6 +1564,10 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_storage_add_deposit();
1548
1564
  uint16_t uniffi_breez_sdk_spark_checksum_method_storage_delete_deposit();
1549
1565
  uint16_t uniffi_breez_sdk_spark_checksum_method_storage_list_deposits();
1550
1566
  uint16_t uniffi_breez_sdk_spark_checksum_method_storage_update_deposit();
1567
+ uint16_t
1568
+ uniffi_breez_sdk_spark_checksum_method_storage_list_watched_deposit_addresses();
1569
+ uint16_t
1570
+ uniffi_breez_sdk_spark_checksum_method_storage_update_watched_deposit_address();
1551
1571
  uint16_t uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_metadata();
1552
1572
  uint16_t uniffi_breez_sdk_spark_checksum_method_storage_list_contacts();
1553
1573
  uint16_t uniffi_breez_sdk_spark_checksum_method_storage_get_contact();
@@ -14006,7 +14026,7 @@ using namespace facebook;
14006
14026
 
14007
14027
  // We need to store a lambda in a global so we can call it from
14008
14028
  // a function pointer. The function pointer is passed to Rust.
14009
- static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
14029
+ static std::function<void(uint64_t, UniffiForeignFutureCompleteRustBuffer,
14010
14030
  uint64_t, UniffiForeignFuture *)>
14011
14031
  rsLambda = nullptr;
14012
14032
 
@@ -14015,8 +14035,8 @@ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
14015
14035
  static void body(jsi::Runtime &rt,
14016
14036
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
14017
14037
  std::shared_ptr<jsi::Value> callbackValue,
14018
- uint64_t rs_uniffiHandle, RustBuffer rs_metadata,
14019
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14038
+ uint64_t rs_uniffiHandle,
14039
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14020
14040
  uint64_t rs_uniffiCallbackData,
14021
14041
  UniffiForeignFuture *rs_uniffiOutReturn) {
14022
14042
 
@@ -14024,11 +14044,9 @@ static void body(jsi::Runtime &rt,
14024
14044
  // We'll use the Bridging class to do this…
14025
14045
  auto js_uniffiHandle =
14026
14046
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
14027
- auto js_metadata = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14028
- rt, callInvoker, rs_metadata);
14029
- auto js_uniffiFutureCallback =
14030
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
14031
- rt, callInvoker, rs_uniffiFutureCallback);
14047
+ auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
14048
+ UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
14049
+ rs_uniffiFutureCallback);
14032
14050
  auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
14033
14051
  rt, callInvoker, rs_uniffiCallbackData);
14034
14052
 
@@ -14038,8 +14056,8 @@ static void body(jsi::Runtime &rt,
14038
14056
  try {
14039
14057
  // Getting the callback function
14040
14058
  auto cb = callbackValue->asObject(rt).asFunction(rt);
14041
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_metadata,
14042
- js_uniffiFutureCallback, js_uniffiCallbackData);
14059
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
14060
+ js_uniffiCallbackData);
14043
14061
 
14044
14062
  // return type is MutReference(Struct("ForeignFuture"))
14045
14063
  // Finally, we need to copy the return value back into the Rust pointer.
@@ -14053,10 +14071,11 @@ static void body(jsi::Runtime &rt,
14053
14071
  }
14054
14072
  }
14055
14073
 
14056
- static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_metadata,
14057
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14058
- uint64_t rs_uniffiCallbackData,
14059
- UniffiForeignFuture *rs_uniffiOutReturn) {
14074
+ static void
14075
+ callback(uint64_t rs_uniffiHandle,
14076
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14077
+ uint64_t rs_uniffiCallbackData,
14078
+ UniffiForeignFuture *rs_uniffiOutReturn) {
14060
14079
  // If the runtime has shutdown, then there is no point in trying to
14061
14080
  // call into Javascript. BUT how do we tell if the runtime has shutdown?
14062
14081
  //
@@ -14072,8 +14091,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_metadata,
14072
14091
 
14073
14092
  // The runtime, the actual callback jsi::funtion, and the callInvoker
14074
14093
  // are all in the lambda.
14075
- rsLambda(rs_uniffiHandle, rs_metadata, rs_uniffiFutureCallback,
14076
- rs_uniffiCallbackData, rs_uniffiOutReturn);
14094
+ rsLambda(rs_uniffiHandle, rs_uniffiFutureCallback, rs_uniffiCallbackData,
14095
+ rs_uniffiOutReturn);
14077
14096
  }
14078
14097
 
14079
14098
  static UniffiCallbackInterfaceStorageMethod13
@@ -14096,17 +14115,16 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
14096
14115
  auto callbackFunction = value.asObject(rt).asFunction(rt);
14097
14116
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
14098
14117
  rsLambda = [&rt, callInvoker, callbackValue](
14099
- uint64_t rs_uniffiHandle, RustBuffer rs_metadata,
14100
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14118
+ uint64_t rs_uniffiHandle,
14119
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14101
14120
  uint64_t rs_uniffiCallbackData,
14102
14121
  UniffiForeignFuture *rs_uniffiOutReturn) {
14103
14122
  // We immediately make a lambda which will do the work of transforming the
14104
14123
  // arguments into JSI values and calling the callback.
14105
14124
  uniffi_runtime::UniffiCallFunc jsLambda =
14106
- [callInvoker, callbackValue, rs_uniffiHandle, rs_metadata,
14107
- rs_uniffiFutureCallback, rs_uniffiCallbackData,
14108
- rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
14109
- body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_metadata,
14125
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_uniffiFutureCallback,
14126
+ rs_uniffiCallbackData, rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
14127
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle,
14110
14128
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
14111
14129
  rs_uniffiOutReturn);
14112
14130
  };
@@ -14147,8 +14165,8 @@ using namespace facebook;
14147
14165
 
14148
14166
  // We need to store a lambda in a global so we can call it from
14149
14167
  // a function pointer. The function pointer is passed to Rust.
14150
- static std::function<void(uint64_t, RustBuffer,
14151
- UniffiForeignFutureCompleteRustBuffer, uint64_t,
14168
+ static std::function<void(uint64_t, RustBuffer, RustBuffer,
14169
+ UniffiForeignFutureCompleteVoid, uint64_t,
14152
14170
  UniffiForeignFuture *)>
14153
14171
  rsLambda = nullptr;
14154
14172
 
@@ -14157,8 +14175,9 @@ static std::function<void(uint64_t, RustBuffer,
14157
14175
  static void body(jsi::Runtime &rt,
14158
14176
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
14159
14177
  std::shared_ptr<jsi::Value> callbackValue,
14160
- uint64_t rs_uniffiHandle, RustBuffer rs_request,
14161
- UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14178
+ uint64_t rs_uniffiHandle, RustBuffer rs_address,
14179
+ RustBuffer rs_payload,
14180
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14162
14181
  uint64_t rs_uniffiCallbackData,
14163
14182
  UniffiForeignFuture *rs_uniffiOutReturn) {
14164
14183
 
@@ -14166,11 +14185,13 @@ static void body(jsi::Runtime &rt,
14166
14185
  // We'll use the Bridging class to do this…
14167
14186
  auto js_uniffiHandle =
14168
14187
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
14169
- auto js_request = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14170
- rt, callInvoker, rs_request);
14171
- auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
14172
- UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
14173
- rs_uniffiFutureCallback);
14188
+ auto js_address = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14189
+ rt, callInvoker, rs_address);
14190
+ auto js_payload = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14191
+ rt, callInvoker, rs_payload);
14192
+ auto js_uniffiFutureCallback =
14193
+ uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
14194
+ rt, callInvoker, rs_uniffiFutureCallback);
14174
14195
  auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
14175
14196
  rt, callInvoker, rs_uniffiCallbackData);
14176
14197
 
@@ -14180,7 +14201,7 @@ static void body(jsi::Runtime &rt,
14180
14201
  try {
14181
14202
  // Getting the callback function
14182
14203
  auto cb = callbackValue->asObject(rt).asFunction(rt);
14183
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_request,
14204
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_address, js_payload,
14184
14205
  js_uniffiFutureCallback, js_uniffiCallbackData);
14185
14206
 
14186
14207
  // return type is MutReference(Struct("ForeignFuture"))
@@ -14195,11 +14216,11 @@ static void body(jsi::Runtime &rt,
14195
14216
  }
14196
14217
  }
14197
14218
 
14198
- static void
14199
- callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
14200
- UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14201
- uint64_t rs_uniffiCallbackData,
14202
- UniffiForeignFuture *rs_uniffiOutReturn) {
14219
+ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_address,
14220
+ RustBuffer rs_payload,
14221
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14222
+ uint64_t rs_uniffiCallbackData,
14223
+ UniffiForeignFuture *rs_uniffiOutReturn) {
14203
14224
  // If the runtime has shutdown, then there is no point in trying to
14204
14225
  // call into Javascript. BUT how do we tell if the runtime has shutdown?
14205
14226
  //
@@ -14215,7 +14236,7 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
14215
14236
 
14216
14237
  // The runtime, the actual callback jsi::funtion, and the callInvoker
14217
14238
  // are all in the lambda.
14218
- rsLambda(rs_uniffiHandle, rs_request, rs_uniffiFutureCallback,
14239
+ rsLambda(rs_uniffiHandle, rs_address, rs_payload, rs_uniffiFutureCallback,
14219
14240
  rs_uniffiCallbackData, rs_uniffiOutReturn);
14220
14241
  }
14221
14242
 
@@ -14239,18 +14260,19 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
14239
14260
  auto callbackFunction = value.asObject(rt).asFunction(rt);
14240
14261
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
14241
14262
  rsLambda = [&rt, callInvoker, callbackValue](
14242
- uint64_t rs_uniffiHandle, RustBuffer rs_request,
14243
- UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14263
+ uint64_t rs_uniffiHandle, RustBuffer rs_address,
14264
+ RustBuffer rs_payload,
14265
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14244
14266
  uint64_t rs_uniffiCallbackData,
14245
14267
  UniffiForeignFuture *rs_uniffiOutReturn) {
14246
14268
  // We immediately make a lambda which will do the work of transforming the
14247
14269
  // arguments into JSI values and calling the callback.
14248
14270
  uniffi_runtime::UniffiCallFunc jsLambda =
14249
- [callInvoker, callbackValue, rs_uniffiHandle, rs_request,
14271
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_address, rs_payload,
14250
14272
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
14251
14273
  rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
14252
- body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_request,
14253
- rs_uniffiFutureCallback, rs_uniffiCallbackData,
14274
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_address,
14275
+ rs_payload, rs_uniffiFutureCallback, rs_uniffiCallbackData,
14254
14276
  rs_uniffiOutReturn);
14255
14277
  };
14256
14278
  // We'll then call that lambda from the callInvoker which will
@@ -14290,9 +14312,8 @@ using namespace facebook;
14290
14312
 
14291
14313
  // We need to store a lambda in a global so we can call it from
14292
14314
  // a function pointer. The function pointer is passed to Rust.
14293
- static std::function<void(uint64_t, RustBuffer,
14294
- UniffiForeignFutureCompleteRustBuffer, uint64_t,
14295
- UniffiForeignFuture *)>
14315
+ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
14316
+ uint64_t, UniffiForeignFuture *)>
14296
14317
  rsLambda = nullptr;
14297
14318
 
14298
14319
  // This is the main body of the callback. It's called from the lambda,
@@ -14300,8 +14321,8 @@ static std::function<void(uint64_t, RustBuffer,
14300
14321
  static void body(jsi::Runtime &rt,
14301
14322
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
14302
14323
  std::shared_ptr<jsi::Value> callbackValue,
14303
- uint64_t rs_uniffiHandle, RustBuffer rs_id,
14304
- UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14324
+ uint64_t rs_uniffiHandle, RustBuffer rs_metadata,
14325
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14305
14326
  uint64_t rs_uniffiCallbackData,
14306
14327
  UniffiForeignFuture *rs_uniffiOutReturn) {
14307
14328
 
@@ -14309,11 +14330,11 @@ static void body(jsi::Runtime &rt,
14309
14330
  // We'll use the Bridging class to do this…
14310
14331
  auto js_uniffiHandle =
14311
14332
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
14312
- auto js_id = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14313
- rt, callInvoker, rs_id);
14314
- auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
14315
- UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
14316
- rs_uniffiFutureCallback);
14333
+ auto js_metadata = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14334
+ rt, callInvoker, rs_metadata);
14335
+ auto js_uniffiFutureCallback =
14336
+ uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
14337
+ rt, callInvoker, rs_uniffiFutureCallback);
14317
14338
  auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
14318
14339
  rt, callInvoker, rs_uniffiCallbackData);
14319
14340
 
@@ -14323,7 +14344,7 @@ static void body(jsi::Runtime &rt,
14323
14344
  try {
14324
14345
  // Getting the callback function
14325
14346
  auto cb = callbackValue->asObject(rt).asFunction(rt);
14326
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_id,
14347
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_metadata,
14327
14348
  js_uniffiFutureCallback, js_uniffiCallbackData);
14328
14349
 
14329
14350
  // return type is MutReference(Struct("ForeignFuture"))
@@ -14338,11 +14359,10 @@ static void body(jsi::Runtime &rt,
14338
14359
  }
14339
14360
  }
14340
14361
 
14341
- static void
14342
- callback(uint64_t rs_uniffiHandle, RustBuffer rs_id,
14343
- UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14344
- uint64_t rs_uniffiCallbackData,
14345
- UniffiForeignFuture *rs_uniffiOutReturn) {
14362
+ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_metadata,
14363
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14364
+ uint64_t rs_uniffiCallbackData,
14365
+ UniffiForeignFuture *rs_uniffiOutReturn) {
14346
14366
  // If the runtime has shutdown, then there is no point in trying to
14347
14367
  // call into Javascript. BUT how do we tell if the runtime has shutdown?
14348
14368
  //
@@ -14358,7 +14378,7 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_id,
14358
14378
 
14359
14379
  // The runtime, the actual callback jsi::funtion, and the callInvoker
14360
14380
  // are all in the lambda.
14361
- rsLambda(rs_uniffiHandle, rs_id, rs_uniffiFutureCallback,
14381
+ rsLambda(rs_uniffiHandle, rs_metadata, rs_uniffiFutureCallback,
14362
14382
  rs_uniffiCallbackData, rs_uniffiOutReturn);
14363
14383
  }
14364
14384
 
@@ -14382,17 +14402,17 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
14382
14402
  auto callbackFunction = value.asObject(rt).asFunction(rt);
14383
14403
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
14384
14404
  rsLambda = [&rt, callInvoker, callbackValue](
14385
- uint64_t rs_uniffiHandle, RustBuffer rs_id,
14386
- UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14405
+ uint64_t rs_uniffiHandle, RustBuffer rs_metadata,
14406
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14387
14407
  uint64_t rs_uniffiCallbackData,
14388
14408
  UniffiForeignFuture *rs_uniffiOutReturn) {
14389
14409
  // We immediately make a lambda which will do the work of transforming the
14390
14410
  // arguments into JSI values and calling the callback.
14391
14411
  uniffi_runtime::UniffiCallFunc jsLambda =
14392
- [callInvoker, callbackValue, rs_uniffiHandle, rs_id,
14412
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_metadata,
14393
14413
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
14394
14414
  rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
14395
- body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_id,
14415
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_metadata,
14396
14416
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
14397
14417
  rs_uniffiOutReturn);
14398
14418
  };
@@ -14433,8 +14453,9 @@ using namespace facebook;
14433
14453
 
14434
14454
  // We need to store a lambda in a global so we can call it from
14435
14455
  // a function pointer. The function pointer is passed to Rust.
14436
- static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
14437
- uint64_t, UniffiForeignFuture *)>
14456
+ static std::function<void(uint64_t, RustBuffer,
14457
+ UniffiForeignFutureCompleteRustBuffer, uint64_t,
14458
+ UniffiForeignFuture *)>
14438
14459
  rsLambda = nullptr;
14439
14460
 
14440
14461
  // This is the main body of the callback. It's called from the lambda,
@@ -14442,8 +14463,8 @@ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
14442
14463
  static void body(jsi::Runtime &rt,
14443
14464
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
14444
14465
  std::shared_ptr<jsi::Value> callbackValue,
14445
- uint64_t rs_uniffiHandle, RustBuffer rs_contact,
14446
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14466
+ uint64_t rs_uniffiHandle, RustBuffer rs_request,
14467
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14447
14468
  uint64_t rs_uniffiCallbackData,
14448
14469
  UniffiForeignFuture *rs_uniffiOutReturn) {
14449
14470
 
@@ -14451,11 +14472,11 @@ static void body(jsi::Runtime &rt,
14451
14472
  // We'll use the Bridging class to do this…
14452
14473
  auto js_uniffiHandle =
14453
14474
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
14454
- auto js_contact = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14455
- rt, callInvoker, rs_contact);
14456
- auto js_uniffiFutureCallback =
14457
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
14458
- rt, callInvoker, rs_uniffiFutureCallback);
14475
+ auto js_request = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14476
+ rt, callInvoker, rs_request);
14477
+ auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
14478
+ UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
14479
+ rs_uniffiFutureCallback);
14459
14480
  auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
14460
14481
  rt, callInvoker, rs_uniffiCallbackData);
14461
14482
 
@@ -14465,7 +14486,7 @@ static void body(jsi::Runtime &rt,
14465
14486
  try {
14466
14487
  // Getting the callback function
14467
14488
  auto cb = callbackValue->asObject(rt).asFunction(rt);
14468
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_contact,
14489
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_request,
14469
14490
  js_uniffiFutureCallback, js_uniffiCallbackData);
14470
14491
 
14471
14492
  // return type is MutReference(Struct("ForeignFuture"))
@@ -14480,10 +14501,11 @@ static void body(jsi::Runtime &rt,
14480
14501
  }
14481
14502
  }
14482
14503
 
14483
- static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_contact,
14484
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14485
- uint64_t rs_uniffiCallbackData,
14486
- UniffiForeignFuture *rs_uniffiOutReturn) {
14504
+ static void
14505
+ callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
14506
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14507
+ uint64_t rs_uniffiCallbackData,
14508
+ UniffiForeignFuture *rs_uniffiOutReturn) {
14487
14509
  // If the runtime has shutdown, then there is no point in trying to
14488
14510
  // call into Javascript. BUT how do we tell if the runtime has shutdown?
14489
14511
  //
@@ -14499,7 +14521,7 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_contact,
14499
14521
 
14500
14522
  // The runtime, the actual callback jsi::funtion, and the callInvoker
14501
14523
  // are all in the lambda.
14502
- rsLambda(rs_uniffiHandle, rs_contact, rs_uniffiFutureCallback,
14524
+ rsLambda(rs_uniffiHandle, rs_request, rs_uniffiFutureCallback,
14503
14525
  rs_uniffiCallbackData, rs_uniffiOutReturn);
14504
14526
  }
14505
14527
 
@@ -14523,17 +14545,17 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
14523
14545
  auto callbackFunction = value.asObject(rt).asFunction(rt);
14524
14546
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
14525
14547
  rsLambda = [&rt, callInvoker, callbackValue](
14526
- uint64_t rs_uniffiHandle, RustBuffer rs_contact,
14527
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14548
+ uint64_t rs_uniffiHandle, RustBuffer rs_request,
14549
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14528
14550
  uint64_t rs_uniffiCallbackData,
14529
14551
  UniffiForeignFuture *rs_uniffiOutReturn) {
14530
14552
  // We immediately make a lambda which will do the work of transforming the
14531
14553
  // arguments into JSI values and calling the callback.
14532
14554
  uniffi_runtime::UniffiCallFunc jsLambda =
14533
- [callInvoker, callbackValue, rs_uniffiHandle, rs_contact,
14555
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_request,
14534
14556
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
14535
14557
  rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
14536
- body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_contact,
14558
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_request,
14537
14559
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
14538
14560
  rs_uniffiOutReturn);
14539
14561
  };
@@ -14574,8 +14596,9 @@ using namespace facebook;
14574
14596
 
14575
14597
  // We need to store a lambda in a global so we can call it from
14576
14598
  // a function pointer. The function pointer is passed to Rust.
14577
- static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
14578
- uint64_t, UniffiForeignFuture *)>
14599
+ static std::function<void(uint64_t, RustBuffer,
14600
+ UniffiForeignFutureCompleteRustBuffer, uint64_t,
14601
+ UniffiForeignFuture *)>
14579
14602
  rsLambda = nullptr;
14580
14603
 
14581
14604
  // This is the main body of the callback. It's called from the lambda,
@@ -14584,7 +14607,7 @@ static void body(jsi::Runtime &rt,
14584
14607
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
14585
14608
  std::shared_ptr<jsi::Value> callbackValue,
14586
14609
  uint64_t rs_uniffiHandle, RustBuffer rs_id,
14587
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14610
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14588
14611
  uint64_t rs_uniffiCallbackData,
14589
14612
  UniffiForeignFuture *rs_uniffiOutReturn) {
14590
14613
 
@@ -14594,9 +14617,9 @@ static void body(jsi::Runtime &rt,
14594
14617
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
14595
14618
  auto js_id = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14596
14619
  rt, callInvoker, rs_id);
14597
- auto js_uniffiFutureCallback =
14598
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
14599
- rt, callInvoker, rs_uniffiFutureCallback);
14620
+ auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
14621
+ UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
14622
+ rs_uniffiFutureCallback);
14600
14623
  auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
14601
14624
  rt, callInvoker, rs_uniffiCallbackData);
14602
14625
 
@@ -14621,10 +14644,11 @@ static void body(jsi::Runtime &rt,
14621
14644
  }
14622
14645
  }
14623
14646
 
14624
- static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_id,
14625
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14626
- uint64_t rs_uniffiCallbackData,
14627
- UniffiForeignFuture *rs_uniffiOutReturn) {
14647
+ static void
14648
+ callback(uint64_t rs_uniffiHandle, RustBuffer rs_id,
14649
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14650
+ uint64_t rs_uniffiCallbackData,
14651
+ UniffiForeignFuture *rs_uniffiOutReturn) {
14628
14652
  // If the runtime has shutdown, then there is no point in trying to
14629
14653
  // call into Javascript. BUT how do we tell if the runtime has shutdown?
14630
14654
  //
@@ -14665,7 +14689,7 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
14665
14689
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
14666
14690
  rsLambda = [&rt, callInvoker, callbackValue](
14667
14691
  uint64_t rs_uniffiHandle, RustBuffer rs_id,
14668
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14692
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14669
14693
  uint64_t rs_uniffiCallbackData,
14670
14694
  UniffiForeignFuture *rs_uniffiOutReturn) {
14671
14695
  // We immediately make a lambda which will do the work of transforming the
@@ -14724,7 +14748,7 @@ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
14724
14748
  static void body(jsi::Runtime &rt,
14725
14749
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
14726
14750
  std::shared_ptr<jsi::Value> callbackValue,
14727
- uint64_t rs_uniffiHandle, RustBuffer rs_swap,
14751
+ uint64_t rs_uniffiHandle, RustBuffer rs_contact,
14728
14752
  UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14729
14753
  uint64_t rs_uniffiCallbackData,
14730
14754
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -14733,8 +14757,8 @@ static void body(jsi::Runtime &rt,
14733
14757
  // We'll use the Bridging class to do this…
14734
14758
  auto js_uniffiHandle =
14735
14759
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
14736
- auto js_swap = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14737
- rt, callInvoker, rs_swap);
14760
+ auto js_contact = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14761
+ rt, callInvoker, rs_contact);
14738
14762
  auto js_uniffiFutureCallback =
14739
14763
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
14740
14764
  rt, callInvoker, rs_uniffiFutureCallback);
@@ -14747,7 +14771,7 @@ static void body(jsi::Runtime &rt,
14747
14771
  try {
14748
14772
  // Getting the callback function
14749
14773
  auto cb = callbackValue->asObject(rt).asFunction(rt);
14750
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_swap,
14774
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_contact,
14751
14775
  js_uniffiFutureCallback, js_uniffiCallbackData);
14752
14776
 
14753
14777
  // return type is MutReference(Struct("ForeignFuture"))
@@ -14762,7 +14786,7 @@ static void body(jsi::Runtime &rt,
14762
14786
  }
14763
14787
  }
14764
14788
 
14765
- static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_swap,
14789
+ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_contact,
14766
14790
  UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14767
14791
  uint64_t rs_uniffiCallbackData,
14768
14792
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -14781,7 +14805,7 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_swap,
14781
14805
 
14782
14806
  // The runtime, the actual callback jsi::funtion, and the callInvoker
14783
14807
  // are all in the lambda.
14784
- rsLambda(rs_uniffiHandle, rs_swap, rs_uniffiFutureCallback,
14808
+ rsLambda(rs_uniffiHandle, rs_contact, rs_uniffiFutureCallback,
14785
14809
  rs_uniffiCallbackData, rs_uniffiOutReturn);
14786
14810
  }
14787
14811
 
@@ -14805,17 +14829,17 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
14805
14829
  auto callbackFunction = value.asObject(rt).asFunction(rt);
14806
14830
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
14807
14831
  rsLambda = [&rt, callInvoker, callbackValue](
14808
- uint64_t rs_uniffiHandle, RustBuffer rs_swap,
14832
+ uint64_t rs_uniffiHandle, RustBuffer rs_contact,
14809
14833
  UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14810
14834
  uint64_t rs_uniffiCallbackData,
14811
14835
  UniffiForeignFuture *rs_uniffiOutReturn) {
14812
14836
  // We immediately make a lambda which will do the work of transforming the
14813
14837
  // arguments into JSI values and calling the callback.
14814
14838
  uniffi_runtime::UniffiCallFunc jsLambda =
14815
- [callInvoker, callbackValue, rs_uniffiHandle, rs_swap,
14839
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_contact,
14816
14840
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
14817
14841
  rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
14818
- body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_swap,
14842
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_contact,
14819
14843
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
14820
14844
  rs_uniffiOutReturn);
14821
14845
  };
@@ -14856,9 +14880,8 @@ using namespace facebook;
14856
14880
 
14857
14881
  // We need to store a lambda in a global so we can call it from
14858
14882
  // a function pointer. The function pointer is passed to Rust.
14859
- static std::function<void(uint64_t, RustBuffer, RustBuffer,
14860
- UniffiForeignFutureCompleteRustBuffer, uint64_t,
14861
- UniffiForeignFuture *)>
14883
+ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
14884
+ uint64_t, UniffiForeignFuture *)>
14862
14885
  rsLambda = nullptr;
14863
14886
 
14864
14887
  // This is the main body of the callback. It's called from the lambda,
@@ -14866,9 +14889,292 @@ static std::function<void(uint64_t, RustBuffer, RustBuffer,
14866
14889
  static void body(jsi::Runtime &rt,
14867
14890
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
14868
14891
  std::shared_ptr<jsi::Value> callbackValue,
14869
- uint64_t rs_uniffiHandle, RustBuffer rs_provider,
14870
- RustBuffer rs_id,
14871
- UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14892
+ uint64_t rs_uniffiHandle, RustBuffer rs_id,
14893
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14894
+ uint64_t rs_uniffiCallbackData,
14895
+ UniffiForeignFuture *rs_uniffiOutReturn) {
14896
+
14897
+ // Convert the arguments from Rust, into jsi::Values.
14898
+ // We'll use the Bridging class to do this…
14899
+ auto js_uniffiHandle =
14900
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
14901
+ auto js_id = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14902
+ rt, callInvoker, rs_id);
14903
+ auto js_uniffiFutureCallback =
14904
+ uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
14905
+ rt, callInvoker, rs_uniffiFutureCallback);
14906
+ auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
14907
+ rt, callInvoker, rs_uniffiCallbackData);
14908
+
14909
+ // Now we are ready to call the callback.
14910
+ // We are already on the JS thread, because this `body` function was
14911
+ // invoked from the CallInvoker.
14912
+ try {
14913
+ // Getting the callback function
14914
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
14915
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_id,
14916
+ js_uniffiFutureCallback, js_uniffiCallbackData);
14917
+
14918
+ // return type is MutReference(Struct("ForeignFuture"))
14919
+ // Finally, we need to copy the return value back into the Rust pointer.
14920
+ *rs_uniffiOutReturn =
14921
+ uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
14922
+ rt, callInvoker, uniffiResult);
14923
+ } catch (const jsi::JSError &error) {
14924
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod19: "
14925
+ << error.what() << std::endl;
14926
+ throw error;
14927
+ }
14928
+ }
14929
+
14930
+ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_id,
14931
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14932
+ uint64_t rs_uniffiCallbackData,
14933
+ UniffiForeignFuture *rs_uniffiOutReturn) {
14934
+ // If the runtime has shutdown, then there is no point in trying to
14935
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
14936
+ //
14937
+ // Answer: the module destructor calls into callback `cleanup` method,
14938
+ // which nulls out the rsLamda.
14939
+ //
14940
+ // If rsLamda is null, then there is no runtime to call into.
14941
+ if (rsLambda == nullptr) {
14942
+ // This only occurs when destructors are calling into Rust free/drop,
14943
+ // which causes the JS callback to be dropped.
14944
+ return;
14945
+ }
14946
+
14947
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
14948
+ // are all in the lambda.
14949
+ rsLambda(rs_uniffiHandle, rs_id, rs_uniffiFutureCallback,
14950
+ rs_uniffiCallbackData, rs_uniffiOutReturn);
14951
+ }
14952
+
14953
+ static UniffiCallbackInterfaceStorageMethod19
14954
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod19
14955
+ jsi::Runtime &rt,
14956
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
14957
+ const jsi::Value &value) {
14958
+ if (rsLambda != nullptr) {
14959
+ // `makeCallbackFunction` is called in two circumstances:
14960
+ //
14961
+ // 1. at startup, when initializing callback interface vtables.
14962
+ // 2. when polling futures. This happens at least once per future that is
14963
+ // exposed to Javascript. We know that this is always the same function,
14964
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
14965
+ //
14966
+ // We can therefore return the callback function without making anything
14967
+ // new if we've been initialized already.
14968
+ return callback;
14969
+ }
14970
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
14971
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
14972
+ rsLambda = [&rt, callInvoker, callbackValue](
14973
+ uint64_t rs_uniffiHandle, RustBuffer rs_id,
14974
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14975
+ uint64_t rs_uniffiCallbackData,
14976
+ UniffiForeignFuture *rs_uniffiOutReturn) {
14977
+ // We immediately make a lambda which will do the work of transforming the
14978
+ // arguments into JSI values and calling the callback.
14979
+ uniffi_runtime::UniffiCallFunc jsLambda =
14980
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_id,
14981
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
14982
+ rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
14983
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_id,
14984
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
14985
+ rs_uniffiOutReturn);
14986
+ };
14987
+ // We'll then call that lambda from the callInvoker which will
14988
+ // look after calling it on the correct thread.
14989
+ callInvoker->invokeBlocking(rt, jsLambda);
14990
+ };
14991
+ return callback;
14992
+ }
14993
+
14994
+ // This method is called from the destructor of NativeBreezSdkSpark, which only
14995
+ // happens when the jsi::Runtime is being destroyed.
14996
+ static void cleanup() {
14997
+ // The lambda holds a reference to the the Runtime, so when this is nulled
14998
+ // out, then the pointer will no longer be left dangling.
14999
+ rsLambda = nullptr;
15000
+ }
15001
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod19
15002
+ // Implementation of callback function calling from Rust to JS
15003
+ // CallbackInterfaceStorageMethod20
15004
+
15005
+ // Callback function:
15006
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20::UniffiCallbackInterfaceStorageMethod20
15007
+ //
15008
+ // We have the following constraints:
15009
+ // - we need to pass a function pointer to Rust.
15010
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
15011
+ // - function pointers can't store state, so we can't use a lamda.
15012
+ //
15013
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
15014
+ // function calls the lambda, which itself calls the `body` which then calls
15015
+ // into JS.
15016
+ //
15017
+ // We then give the `callback` function pointer to Rust which will call the
15018
+ // lambda sometime in the future.
15019
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20 {
15020
+ using namespace facebook;
15021
+
15022
+ // We need to store a lambda in a global so we can call it from
15023
+ // a function pointer. The function pointer is passed to Rust.
15024
+ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
15025
+ uint64_t, UniffiForeignFuture *)>
15026
+ rsLambda = nullptr;
15027
+
15028
+ // This is the main body of the callback. It's called from the lambda,
15029
+ // which itself is called from the callback function which is passed to Rust.
15030
+ static void body(jsi::Runtime &rt,
15031
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
15032
+ std::shared_ptr<jsi::Value> callbackValue,
15033
+ uint64_t rs_uniffiHandle, RustBuffer rs_swap,
15034
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
15035
+ uint64_t rs_uniffiCallbackData,
15036
+ UniffiForeignFuture *rs_uniffiOutReturn) {
15037
+
15038
+ // Convert the arguments from Rust, into jsi::Values.
15039
+ // We'll use the Bridging class to do this…
15040
+ auto js_uniffiHandle =
15041
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
15042
+ auto js_swap = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
15043
+ rt, callInvoker, rs_swap);
15044
+ auto js_uniffiFutureCallback =
15045
+ uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
15046
+ rt, callInvoker, rs_uniffiFutureCallback);
15047
+ auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
15048
+ rt, callInvoker, rs_uniffiCallbackData);
15049
+
15050
+ // Now we are ready to call the callback.
15051
+ // We are already on the JS thread, because this `body` function was
15052
+ // invoked from the CallInvoker.
15053
+ try {
15054
+ // Getting the callback function
15055
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
15056
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_swap,
15057
+ js_uniffiFutureCallback, js_uniffiCallbackData);
15058
+
15059
+ // return type is MutReference(Struct("ForeignFuture"))
15060
+ // Finally, we need to copy the return value back into the Rust pointer.
15061
+ *rs_uniffiOutReturn =
15062
+ uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
15063
+ rt, callInvoker, uniffiResult);
15064
+ } catch (const jsi::JSError &error) {
15065
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod20: "
15066
+ << error.what() << std::endl;
15067
+ throw error;
15068
+ }
15069
+ }
15070
+
15071
+ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_swap,
15072
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
15073
+ uint64_t rs_uniffiCallbackData,
15074
+ UniffiForeignFuture *rs_uniffiOutReturn) {
15075
+ // If the runtime has shutdown, then there is no point in trying to
15076
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
15077
+ //
15078
+ // Answer: the module destructor calls into callback `cleanup` method,
15079
+ // which nulls out the rsLamda.
15080
+ //
15081
+ // If rsLamda is null, then there is no runtime to call into.
15082
+ if (rsLambda == nullptr) {
15083
+ // This only occurs when destructors are calling into Rust free/drop,
15084
+ // which causes the JS callback to be dropped.
15085
+ return;
15086
+ }
15087
+
15088
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
15089
+ // are all in the lambda.
15090
+ rsLambda(rs_uniffiHandle, rs_swap, rs_uniffiFutureCallback,
15091
+ rs_uniffiCallbackData, rs_uniffiOutReturn);
15092
+ }
15093
+
15094
+ static UniffiCallbackInterfaceStorageMethod20
15095
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20
15096
+ jsi::Runtime &rt,
15097
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
15098
+ const jsi::Value &value) {
15099
+ if (rsLambda != nullptr) {
15100
+ // `makeCallbackFunction` is called in two circumstances:
15101
+ //
15102
+ // 1. at startup, when initializing callback interface vtables.
15103
+ // 2. when polling futures. This happens at least once per future that is
15104
+ // exposed to Javascript. We know that this is always the same function,
15105
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
15106
+ //
15107
+ // We can therefore return the callback function without making anything
15108
+ // new if we've been initialized already.
15109
+ return callback;
15110
+ }
15111
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
15112
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
15113
+ rsLambda = [&rt, callInvoker, callbackValue](
15114
+ uint64_t rs_uniffiHandle, RustBuffer rs_swap,
15115
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
15116
+ uint64_t rs_uniffiCallbackData,
15117
+ UniffiForeignFuture *rs_uniffiOutReturn) {
15118
+ // We immediately make a lambda which will do the work of transforming the
15119
+ // arguments into JSI values and calling the callback.
15120
+ uniffi_runtime::UniffiCallFunc jsLambda =
15121
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_swap,
15122
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
15123
+ rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
15124
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_swap,
15125
+ rs_uniffiFutureCallback, rs_uniffiCallbackData,
15126
+ rs_uniffiOutReturn);
15127
+ };
15128
+ // We'll then call that lambda from the callInvoker which will
15129
+ // look after calling it on the correct thread.
15130
+ callInvoker->invokeBlocking(rt, jsLambda);
15131
+ };
15132
+ return callback;
15133
+ }
15134
+
15135
+ // This method is called from the destructor of NativeBreezSdkSpark, which only
15136
+ // happens when the jsi::Runtime is being destroyed.
15137
+ static void cleanup() {
15138
+ // The lambda holds a reference to the the Runtime, so when this is nulled
15139
+ // out, then the pointer will no longer be left dangling.
15140
+ rsLambda = nullptr;
15141
+ }
15142
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20
15143
+ // Implementation of callback function calling from Rust to JS
15144
+ // CallbackInterfaceStorageMethod21
15145
+
15146
+ // Callback function:
15147
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21::UniffiCallbackInterfaceStorageMethod21
15148
+ //
15149
+ // We have the following constraints:
15150
+ // - we need to pass a function pointer to Rust.
15151
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
15152
+ // - function pointers can't store state, so we can't use a lamda.
15153
+ //
15154
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
15155
+ // function calls the lambda, which itself calls the `body` which then calls
15156
+ // into JS.
15157
+ //
15158
+ // We then give the `callback` function pointer to Rust which will call the
15159
+ // lambda sometime in the future.
15160
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21 {
15161
+ using namespace facebook;
15162
+
15163
+ // We need to store a lambda in a global so we can call it from
15164
+ // a function pointer. The function pointer is passed to Rust.
15165
+ static std::function<void(uint64_t, RustBuffer, RustBuffer,
15166
+ UniffiForeignFutureCompleteRustBuffer, uint64_t,
15167
+ UniffiForeignFuture *)>
15168
+ rsLambda = nullptr;
15169
+
15170
+ // This is the main body of the callback. It's called from the lambda,
15171
+ // which itself is called from the callback function which is passed to Rust.
15172
+ static void body(jsi::Runtime &rt,
15173
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
15174
+ std::shared_ptr<jsi::Value> callbackValue,
15175
+ uint64_t rs_uniffiHandle, RustBuffer rs_provider,
15176
+ RustBuffer rs_id,
15177
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14872
15178
  uint64_t rs_uniffiCallbackData,
14873
15179
  UniffiForeignFuture *rs_uniffiOutReturn) {
14874
15180
 
@@ -14901,7 +15207,7 @@ static void body(jsi::Runtime &rt,
14901
15207
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
14902
15208
  rt, callInvoker, uniffiResult);
14903
15209
  } catch (const jsi::JSError &error) {
14904
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod19: "
15210
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod21: "
14905
15211
  << error.what() << std::endl;
14906
15212
  throw error;
14907
15213
  }
@@ -14931,8 +15237,8 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_provider, RustBuffer rs_id,
14931
15237
  rs_uniffiCallbackData, rs_uniffiOutReturn);
14932
15238
  }
14933
15239
 
14934
- static UniffiCallbackInterfaceStorageMethod19
14935
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod19
15240
+ static UniffiCallbackInterfaceStorageMethod21
15241
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21
14936
15242
  jsi::Runtime &rt,
14937
15243
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
14938
15244
  const jsi::Value &value) {
@@ -14980,12 +15286,12 @@ static void cleanup() {
14980
15286
  // out, then the pointer will no longer be left dangling.
14981
15287
  rsLambda = nullptr;
14982
15288
  }
14983
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod19
15289
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21
14984
15290
  // Implementation of callback function calling from Rust to JS
14985
- // CallbackInterfaceStorageMethod20
15291
+ // CallbackInterfaceStorageMethod22
14986
15292
 
14987
15293
  // Callback function:
14988
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20::UniffiCallbackInterfaceStorageMethod20
15294
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22::UniffiCallbackInterfaceStorageMethod22
14989
15295
  //
14990
15296
  // We have the following constraints:
14991
15297
  // - we need to pass a function pointer to Rust.
@@ -14998,7 +15304,7 @@ static void cleanup() {
14998
15304
  //
14999
15305
  // We then give the `callback` function pointer to Rust which will call the
15000
15306
  // lambda sometime in the future.
15001
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20 {
15307
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22 {
15002
15308
  using namespace facebook;
15003
15309
 
15004
15310
  // We need to store a lambda in a global so we can call it from
@@ -15045,7 +15351,7 @@ static void body(jsi::Runtime &rt,
15045
15351
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
15046
15352
  rt, callInvoker, uniffiResult);
15047
15353
  } catch (const jsi::JSError &error) {
15048
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod20: "
15354
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod22: "
15049
15355
  << error.what() << std::endl;
15050
15356
  throw error;
15051
15357
  }
@@ -15075,8 +15381,8 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_provider,
15075
15381
  rs_uniffiCallbackData, rs_uniffiOutReturn);
15076
15382
  }
15077
15383
 
15078
- static UniffiCallbackInterfaceStorageMethod20
15079
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20
15384
+ static UniffiCallbackInterfaceStorageMethod22
15385
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22
15080
15386
  jsi::Runtime &rt,
15081
15387
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
15082
15388
  const jsi::Value &value) {
@@ -15123,12 +15429,12 @@ static void cleanup() {
15123
15429
  // out, then the pointer will no longer be left dangling.
15124
15430
  rsLambda = nullptr;
15125
15431
  }
15126
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20
15432
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22
15127
15433
  // Implementation of callback function calling from Rust to JS
15128
- // CallbackInterfaceStorageMethod21
15434
+ // CallbackInterfaceStorageMethod23
15129
15435
 
15130
15436
  // Callback function:
15131
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21::UniffiCallbackInterfaceStorageMethod21
15437
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23::UniffiCallbackInterfaceStorageMethod23
15132
15438
  //
15133
15439
  // We have the following constraints:
15134
15440
  // - we need to pass a function pointer to Rust.
@@ -15141,7 +15447,7 @@ static void cleanup() {
15141
15447
  //
15142
15448
  // We then give the `callback` function pointer to Rust which will call the
15143
15449
  // lambda sometime in the future.
15144
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21 {
15450
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23 {
15145
15451
  using namespace facebook;
15146
15452
 
15147
15453
  // We need to store a lambda in a global so we can call it from
@@ -15187,7 +15493,7 @@ static void body(jsi::Runtime &rt,
15187
15493
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
15188
15494
  rt, callInvoker, uniffiResult);
15189
15495
  } catch (const jsi::JSError &error) {
15190
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod21: "
15496
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod23: "
15191
15497
  << error.what() << std::endl;
15192
15498
  throw error;
15193
15499
  }
@@ -15216,8 +15522,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
15216
15522
  rs_uniffiCallbackData, rs_uniffiOutReturn);
15217
15523
  }
15218
15524
 
15219
- static UniffiCallbackInterfaceStorageMethod21
15220
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21
15525
+ static UniffiCallbackInterfaceStorageMethod23
15526
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23
15221
15527
  jsi::Runtime &rt,
15222
15528
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
15223
15529
  const jsi::Value &value) {
@@ -15264,12 +15570,12 @@ static void cleanup() {
15264
15570
  // out, then the pointer will no longer be left dangling.
15265
15571
  rsLambda = nullptr;
15266
15572
  }
15267
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21
15573
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23
15268
15574
  // Implementation of callback function calling from Rust to JS
15269
- // CallbackInterfaceStorageMethod22
15575
+ // CallbackInterfaceStorageMethod24
15270
15576
 
15271
15577
  // Callback function:
15272
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22::UniffiCallbackInterfaceStorageMethod22
15578
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24::UniffiCallbackInterfaceStorageMethod24
15273
15579
  //
15274
15580
  // We have the following constraints:
15275
15581
  // - we need to pass a function pointer to Rust.
@@ -15282,7 +15588,7 @@ static void cleanup() {
15282
15588
  //
15283
15589
  // We then give the `callback` function pointer to Rust which will call the
15284
15590
  // lambda sometime in the future.
15285
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22 {
15591
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24 {
15286
15592
  using namespace facebook;
15287
15593
 
15288
15594
  // We need to store a lambda in a global so we can call it from
@@ -15333,7 +15639,7 @@ static void body(jsi::Runtime &rt,
15333
15639
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
15334
15640
  rt, callInvoker, uniffiResult);
15335
15641
  } catch (const jsi::JSError &error) {
15336
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod22: "
15642
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod24: "
15337
15643
  << error.what() << std::endl;
15338
15644
  throw error;
15339
15645
  }
@@ -15363,8 +15669,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
15363
15669
  rs_uniffiFutureCallback, rs_uniffiCallbackData, rs_uniffiOutReturn);
15364
15670
  }
15365
15671
 
15366
- static UniffiCallbackInterfaceStorageMethod22
15367
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22
15672
+ static UniffiCallbackInterfaceStorageMethod24
15673
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24
15368
15674
  jsi::Runtime &rt,
15369
15675
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
15370
15676
  const jsi::Value &value) {
@@ -15412,12 +15718,12 @@ static void cleanup() {
15412
15718
  // out, then the pointer will no longer be left dangling.
15413
15719
  rsLambda = nullptr;
15414
15720
  }
15415
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22
15721
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24
15416
15722
  // Implementation of callback function calling from Rust to JS
15417
- // CallbackInterfaceStorageMethod23
15723
+ // CallbackInterfaceStorageMethod25
15418
15724
 
15419
15725
  // Callback function:
15420
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23::UniffiCallbackInterfaceStorageMethod23
15726
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25::UniffiCallbackInterfaceStorageMethod25
15421
15727
  //
15422
15728
  // We have the following constraints:
15423
15729
  // - we need to pass a function pointer to Rust.
@@ -15430,7 +15736,7 @@ static void cleanup() {
15430
15736
  //
15431
15737
  // We then give the `callback` function pointer to Rust which will call the
15432
15738
  // lambda sometime in the future.
15433
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23 {
15739
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25 {
15434
15740
  using namespace facebook;
15435
15741
 
15436
15742
  // We need to store a lambda in a global so we can call it from
@@ -15477,7 +15783,7 @@ static void body(jsi::Runtime &rt,
15477
15783
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
15478
15784
  rt, callInvoker, uniffiResult);
15479
15785
  } catch (const jsi::JSError &error) {
15480
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod23: "
15786
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod25: "
15481
15787
  << error.what() << std::endl;
15482
15788
  throw error;
15483
15789
  }
@@ -15507,8 +15813,8 @@ callback(uint64_t rs_uniffiHandle, uint32_t rs_limit,
15507
15813
  rs_uniffiCallbackData, rs_uniffiOutReturn);
15508
15814
  }
15509
15815
 
15510
- static UniffiCallbackInterfaceStorageMethod23
15511
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23
15816
+ static UniffiCallbackInterfaceStorageMethod25
15817
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25
15512
15818
  jsi::Runtime &rt,
15513
15819
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
15514
15820
  const jsi::Value &value) {
@@ -15555,12 +15861,12 @@ static void cleanup() {
15555
15861
  // out, then the pointer will no longer be left dangling.
15556
15862
  rsLambda = nullptr;
15557
15863
  }
15558
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23
15864
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25
15559
15865
  // Implementation of callback function calling from Rust to JS
15560
- // CallbackInterfaceStorageMethod24
15866
+ // CallbackInterfaceStorageMethod26
15561
15867
 
15562
15868
  // Callback function:
15563
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24::UniffiCallbackInterfaceStorageMethod24
15869
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26::UniffiCallbackInterfaceStorageMethod26
15564
15870
  //
15565
15871
  // We have the following constraints:
15566
15872
  // - we need to pass a function pointer to Rust.
@@ -15573,7 +15879,7 @@ static void cleanup() {
15573
15879
  //
15574
15880
  // We then give the `callback` function pointer to Rust which will call the
15575
15881
  // lambda sometime in the future.
15576
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24 {
15882
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26 {
15577
15883
  using namespace facebook;
15578
15884
 
15579
15885
  // We need to store a lambda in a global so we can call it from
@@ -15617,7 +15923,7 @@ static void body(jsi::Runtime &rt,
15617
15923
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
15618
15924
  rt, callInvoker, uniffiResult);
15619
15925
  } catch (const jsi::JSError &error) {
15620
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod24: "
15926
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod26: "
15621
15927
  << error.what() << std::endl;
15622
15928
  throw error;
15623
15929
  }
@@ -15646,8 +15952,8 @@ static void callback(uint64_t rs_uniffiHandle,
15646
15952
  rs_uniffiOutReturn);
15647
15953
  }
15648
15954
 
15649
- static UniffiCallbackInterfaceStorageMethod24
15650
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24
15955
+ static UniffiCallbackInterfaceStorageMethod26
15956
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26
15651
15957
  jsi::Runtime &rt,
15652
15958
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
15653
15959
  const jsi::Value &value) {
@@ -15693,12 +15999,12 @@ static void cleanup() {
15693
15999
  // out, then the pointer will no longer be left dangling.
15694
16000
  rsLambda = nullptr;
15695
16001
  }
15696
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24
16002
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26
15697
16003
  // Implementation of callback function calling from Rust to JS
15698
- // CallbackInterfaceStorageMethod25
16004
+ // CallbackInterfaceStorageMethod27
15699
16005
 
15700
16006
  // Callback function:
15701
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25::UniffiCallbackInterfaceStorageMethod25
16007
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod27::UniffiCallbackInterfaceStorageMethod27
15702
16008
  //
15703
16009
  // We have the following constraints:
15704
16010
  // - we need to pass a function pointer to Rust.
@@ -15711,7 +16017,7 @@ static void cleanup() {
15711
16017
  //
15712
16018
  // We then give the `callback` function pointer to Rust which will call the
15713
16019
  // lambda sometime in the future.
15714
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25 {
16020
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod27 {
15715
16021
  using namespace facebook;
15716
16022
 
15717
16023
  // We need to store a lambda in a global so we can call it from
@@ -15757,7 +16063,7 @@ static void body(jsi::Runtime &rt,
15757
16063
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
15758
16064
  rt, callInvoker, uniffiResult);
15759
16065
  } catch (const jsi::JSError &error) {
15760
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod25: "
16066
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod27: "
15761
16067
  << error.what() << std::endl;
15762
16068
  throw error;
15763
16069
  }
@@ -15786,8 +16092,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_records,
15786
16092
  rs_uniffiCallbackData, rs_uniffiOutReturn);
15787
16093
  }
15788
16094
 
15789
- static UniffiCallbackInterfaceStorageMethod25
15790
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25
16095
+ static UniffiCallbackInterfaceStorageMethod27
16096
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod27
15791
16097
  jsi::Runtime &rt,
15792
16098
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
15793
16099
  const jsi::Value &value) {
@@ -15834,12 +16140,12 @@ static void cleanup() {
15834
16140
  // out, then the pointer will no longer be left dangling.
15835
16141
  rsLambda = nullptr;
15836
16142
  }
15837
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25
16143
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod27
15838
16144
  // Implementation of callback function calling from Rust to JS
15839
- // CallbackInterfaceStorageMethod26
16145
+ // CallbackInterfaceStorageMethod28
15840
16146
 
15841
16147
  // Callback function:
15842
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26::UniffiCallbackInterfaceStorageMethod26
16148
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod28::UniffiCallbackInterfaceStorageMethod28
15843
16149
  //
15844
16150
  // We have the following constraints:
15845
16151
  // - we need to pass a function pointer to Rust.
@@ -15852,7 +16158,7 @@ static void cleanup() {
15852
16158
  //
15853
16159
  // We then give the `callback` function pointer to Rust which will call the
15854
16160
  // lambda sometime in the future.
15855
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26 {
16161
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod28 {
15856
16162
  using namespace facebook;
15857
16163
 
15858
16164
  // We need to store a lambda in a global so we can call it from
@@ -15898,7 +16204,7 @@ static void body(jsi::Runtime &rt,
15898
16204
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
15899
16205
  rt, callInvoker, uniffiResult);
15900
16206
  } catch (const jsi::JSError &error) {
15901
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod26: "
16207
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod28: "
15902
16208
  << error.what() << std::endl;
15903
16209
  throw error;
15904
16210
  }
@@ -15927,8 +16233,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
15927
16233
  rs_uniffiCallbackData, rs_uniffiOutReturn);
15928
16234
  }
15929
16235
 
15930
- static UniffiCallbackInterfaceStorageMethod26
15931
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26
16236
+ static UniffiCallbackInterfaceStorageMethod28
16237
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod28
15932
16238
  jsi::Runtime &rt,
15933
16239
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
15934
16240
  const jsi::Value &value) {
@@ -15975,12 +16281,12 @@ static void cleanup() {
15975
16281
  // out, then the pointer will no longer be left dangling.
15976
16282
  rsLambda = nullptr;
15977
16283
  }
15978
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26
16284
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod28
15979
16285
  // Implementation of callback function calling from Rust to JS
15980
- // CallbackInterfaceStorageMethod27
16286
+ // CallbackInterfaceStorageMethod29
15981
16287
 
15982
16288
  // Callback function:
15983
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod27::UniffiCallbackInterfaceStorageMethod27
16289
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod29::UniffiCallbackInterfaceStorageMethod29
15984
16290
  //
15985
16291
  // We have the following constraints:
15986
16292
  // - we need to pass a function pointer to Rust.
@@ -15993,7 +16299,7 @@ static void cleanup() {
15993
16299
  //
15994
16300
  // We then give the `callback` function pointer to Rust which will call the
15995
16301
  // lambda sometime in the future.
15996
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod27 {
16302
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod29 {
15997
16303
  using namespace facebook;
15998
16304
 
15999
16305
  // We need to store a lambda in a global so we can call it from
@@ -16040,7 +16346,7 @@ static void body(jsi::Runtime &rt,
16040
16346
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
16041
16347
  rt, callInvoker, uniffiResult);
16042
16348
  } catch (const jsi::JSError &error) {
16043
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod27: "
16349
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod29: "
16044
16350
  << error.what() << std::endl;
16045
16351
  throw error;
16046
16352
  }
@@ -16070,8 +16376,8 @@ callback(uint64_t rs_uniffiHandle, uint32_t rs_limit,
16070
16376
  rs_uniffiCallbackData, rs_uniffiOutReturn);
16071
16377
  }
16072
16378
 
16073
- static UniffiCallbackInterfaceStorageMethod27
16074
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod27
16379
+ static UniffiCallbackInterfaceStorageMethod29
16380
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod29
16075
16381
  jsi::Runtime &rt,
16076
16382
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
16077
16383
  const jsi::Value &value) {
@@ -16118,12 +16424,12 @@ static void cleanup() {
16118
16424
  // out, then the pointer will no longer be left dangling.
16119
16425
  rsLambda = nullptr;
16120
16426
  }
16121
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod27
16427
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod29
16122
16428
  // Implementation of callback function calling from Rust to JS
16123
- // CallbackInterfaceStorageMethod28
16429
+ // CallbackInterfaceStorageMethod30
16124
16430
 
16125
16431
  // Callback function:
16126
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod28::UniffiCallbackInterfaceStorageMethod28
16432
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod30::UniffiCallbackInterfaceStorageMethod30
16127
16433
  //
16128
16434
  // We have the following constraints:
16129
16435
  // - we need to pass a function pointer to Rust.
@@ -16136,7 +16442,7 @@ static void cleanup() {
16136
16442
  //
16137
16443
  // We then give the `callback` function pointer to Rust which will call the
16138
16444
  // lambda sometime in the future.
16139
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod28 {
16445
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod30 {
16140
16446
  using namespace facebook;
16141
16447
 
16142
16448
  // We need to store a lambda in a global so we can call it from
@@ -16180,7 +16486,7 @@ static void body(jsi::Runtime &rt,
16180
16486
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
16181
16487
  rt, callInvoker, uniffiResult);
16182
16488
  } catch (const jsi::JSError &error) {
16183
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod28: "
16489
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod30: "
16184
16490
  << error.what() << std::endl;
16185
16491
  throw error;
16186
16492
  }
@@ -16210,8 +16516,8 @@ callback(uint64_t rs_uniffiHandle,
16210
16516
  rs_uniffiOutReturn);
16211
16517
  }
16212
16518
 
16213
- static UniffiCallbackInterfaceStorageMethod28
16214
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod28
16519
+ static UniffiCallbackInterfaceStorageMethod30
16520
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod30
16215
16521
  jsi::Runtime &rt,
16216
16522
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
16217
16523
  const jsi::Value &value) {
@@ -16257,12 +16563,12 @@ static void cleanup() {
16257
16563
  // out, then the pointer will no longer be left dangling.
16258
16564
  rsLambda = nullptr;
16259
16565
  }
16260
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod28
16566
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod30
16261
16567
  // Implementation of callback function calling from Rust to JS
16262
- // CallbackInterfaceStorageMethod29
16568
+ // CallbackInterfaceStorageMethod31
16263
16569
 
16264
16570
  // Callback function:
16265
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod29::UniffiCallbackInterfaceStorageMethod29
16571
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod31::UniffiCallbackInterfaceStorageMethod31
16266
16572
  //
16267
16573
  // We have the following constraints:
16268
16574
  // - we need to pass a function pointer to Rust.
@@ -16275,7 +16581,7 @@ static void cleanup() {
16275
16581
  //
16276
16582
  // We then give the `callback` function pointer to Rust which will call the
16277
16583
  // lambda sometime in the future.
16278
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod29 {
16584
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod31 {
16279
16585
  using namespace facebook;
16280
16586
 
16281
16587
  // We need to store a lambda in a global so we can call it from
@@ -16321,7 +16627,7 @@ static void body(jsi::Runtime &rt,
16321
16627
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
16322
16628
  rt, callInvoker, uniffiResult);
16323
16629
  } catch (const jsi::JSError &error) {
16324
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod29: "
16630
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod31: "
16325
16631
  << error.what() << std::endl;
16326
16632
  throw error;
16327
16633
  }
@@ -16350,8 +16656,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
16350
16656
  rs_uniffiCallbackData, rs_uniffiOutReturn);
16351
16657
  }
16352
16658
 
16353
- static UniffiCallbackInterfaceStorageMethod29
16354
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod29
16659
+ static UniffiCallbackInterfaceStorageMethod31
16660
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod31
16355
16661
  jsi::Runtime &rt,
16356
16662
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
16357
16663
  const jsi::Value &value) {
@@ -16398,7 +16704,7 @@ static void cleanup() {
16398
16704
  // out, then the pointer will no longer be left dangling.
16399
16705
  rsLambda = nullptr;
16400
16706
  }
16401
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod29
16707
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod31
16402
16708
  // Implementation of callback function calling from Rust to JS
16403
16709
  // CallbackInterfaceStorageBackendMethod0
16404
16710
 
@@ -17157,59 +17463,67 @@ template <> struct Bridging<UniffiVTableCallbackInterfaceStorage> {
17157
17463
  rsObject.update_deposit = uniffi::breez_sdk_spark::cb::
17158
17464
  callbackinterfacestoragemethod12::makeCallbackFunction(
17159
17465
  rt, callInvoker, jsObject.getProperty(rt, "updateDeposit"));
17160
- rsObject.set_lnurl_metadata = uniffi::breez_sdk_spark::cb::
17466
+ rsObject.list_watched_deposit_addresses = uniffi::breez_sdk_spark::cb::
17161
17467
  callbackinterfacestoragemethod13::makeCallbackFunction(
17468
+ rt, callInvoker,
17469
+ jsObject.getProperty(rt, "listWatchedDepositAddresses"));
17470
+ rsObject.update_watched_deposit_address = uniffi::breez_sdk_spark::cb::
17471
+ callbackinterfacestoragemethod14::makeCallbackFunction(
17472
+ rt, callInvoker,
17473
+ jsObject.getProperty(rt, "updateWatchedDepositAddress"));
17474
+ rsObject.set_lnurl_metadata = uniffi::breez_sdk_spark::cb::
17475
+ callbackinterfacestoragemethod15::makeCallbackFunction(
17162
17476
  rt, callInvoker, jsObject.getProperty(rt, "setLnurlMetadata"));
17163
17477
  rsObject.list_contacts = uniffi::breez_sdk_spark::cb::
17164
- callbackinterfacestoragemethod14::makeCallbackFunction(
17478
+ callbackinterfacestoragemethod16::makeCallbackFunction(
17165
17479
  rt, callInvoker, jsObject.getProperty(rt, "listContacts"));
17166
17480
  rsObject.get_contact = uniffi::breez_sdk_spark::cb::
17167
- callbackinterfacestoragemethod15::makeCallbackFunction(
17481
+ callbackinterfacestoragemethod17::makeCallbackFunction(
17168
17482
  rt, callInvoker, jsObject.getProperty(rt, "getContact"));
17169
17483
  rsObject.insert_contact = uniffi::breez_sdk_spark::cb::
17170
- callbackinterfacestoragemethod16::makeCallbackFunction(
17484
+ callbackinterfacestoragemethod18::makeCallbackFunction(
17171
17485
  rt, callInvoker, jsObject.getProperty(rt, "insertContact"));
17172
17486
  rsObject.delete_contact = uniffi::breez_sdk_spark::cb::
17173
- callbackinterfacestoragemethod17::makeCallbackFunction(
17487
+ callbackinterfacestoragemethod19::makeCallbackFunction(
17174
17488
  rt, callInvoker, jsObject.getProperty(rt, "deleteContact"));
17175
17489
  rsObject.set_cross_chain_swap = uniffi::breez_sdk_spark::cb::
17176
- callbackinterfacestoragemethod18::makeCallbackFunction(
17490
+ callbackinterfacestoragemethod20::makeCallbackFunction(
17177
17491
  rt, callInvoker, jsObject.getProperty(rt, "setCrossChainSwap"));
17178
17492
  rsObject.get_cross_chain_swap = uniffi::breez_sdk_spark::cb::
17179
- callbackinterfacestoragemethod19::makeCallbackFunction(
17493
+ callbackinterfacestoragemethod21::makeCallbackFunction(
17180
17494
  rt, callInvoker, jsObject.getProperty(rt, "getCrossChainSwap"));
17181
17495
  rsObject.list_active_cross_chain_swaps = uniffi::breez_sdk_spark::cb::
17182
- callbackinterfacestoragemethod20::makeCallbackFunction(
17496
+ callbackinterfacestoragemethod22::makeCallbackFunction(
17183
17497
  rt, callInvoker,
17184
17498
  jsObject.getProperty(rt, "listActiveCrossChainSwaps"));
17185
17499
  rsObject.add_outgoing_change = uniffi::breez_sdk_spark::cb::
17186
- callbackinterfacestoragemethod21::makeCallbackFunction(
17500
+ callbackinterfacestoragemethod23::makeCallbackFunction(
17187
17501
  rt, callInvoker, jsObject.getProperty(rt, "addOutgoingChange"));
17188
17502
  rsObject.complete_outgoing_sync = uniffi::breez_sdk_spark::cb::
17189
- callbackinterfacestoragemethod22::makeCallbackFunction(
17503
+ callbackinterfacestoragemethod24::makeCallbackFunction(
17190
17504
  rt, callInvoker, jsObject.getProperty(rt, "completeOutgoingSync"));
17191
17505
  rsObject.get_pending_outgoing_changes = uniffi::breez_sdk_spark::cb::
17192
- callbackinterfacestoragemethod23::makeCallbackFunction(
17506
+ callbackinterfacestoragemethod25::makeCallbackFunction(
17193
17507
  rt, callInvoker,
17194
17508
  jsObject.getProperty(rt, "getPendingOutgoingChanges"));
17195
17509
  rsObject.get_last_revision = uniffi::breez_sdk_spark::cb::
17196
- callbackinterfacestoragemethod24::makeCallbackFunction(
17510
+ callbackinterfacestoragemethod26::makeCallbackFunction(
17197
17511
  rt, callInvoker, jsObject.getProperty(rt, "getLastRevision"));
17198
17512
  rsObject.insert_incoming_records = uniffi::breez_sdk_spark::cb::
17199
- callbackinterfacestoragemethod25::makeCallbackFunction(
17513
+ callbackinterfacestoragemethod27::makeCallbackFunction(
17200
17514
  rt, callInvoker, jsObject.getProperty(rt, "insertIncomingRecords"));
17201
17515
  rsObject.delete_incoming_record = uniffi::breez_sdk_spark::cb::
17202
- callbackinterfacestoragemethod26::makeCallbackFunction(
17516
+ callbackinterfacestoragemethod28::makeCallbackFunction(
17203
17517
  rt, callInvoker, jsObject.getProperty(rt, "deleteIncomingRecord"));
17204
17518
  rsObject.get_incoming_records = uniffi::breez_sdk_spark::cb::
17205
- callbackinterfacestoragemethod27::makeCallbackFunction(
17519
+ callbackinterfacestoragemethod29::makeCallbackFunction(
17206
17520
  rt, callInvoker, jsObject.getProperty(rt, "getIncomingRecords"));
17207
17521
  rsObject.get_latest_outgoing_change = uniffi::breez_sdk_spark::cb::
17208
- callbackinterfacestoragemethod28::makeCallbackFunction(
17522
+ callbackinterfacestoragemethod30::makeCallbackFunction(
17209
17523
  rt, callInvoker,
17210
17524
  jsObject.getProperty(rt, "getLatestOutgoingChange"));
17211
17525
  rsObject.update_record_from_incoming = uniffi::breez_sdk_spark::cb::
17212
- callbackinterfacestoragemethod29::makeCallbackFunction(
17526
+ callbackinterfacestoragemethod31::makeCallbackFunction(
17213
17527
  rt, callInvoker,
17214
17528
  jsObject.getProperty(rt, "updateRecordFromIncoming"));
17215
17529
  rsObject.uniffi_free =
@@ -19630,6 +19944,30 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
19630
19944
  ->cpp_uniffi_breez_sdk_spark_fn_method_storage_update_deposit(
19631
19945
  rt, thisVal, args, count);
19632
19946
  });
19947
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_list_watched_deposit_"
19948
+ "addresses"] = jsi::Function::createFromHostFunction(
19949
+ rt,
19950
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
19951
+ "storage_list_watched_deposit_addresses"),
19952
+ 1,
19953
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
19954
+ const jsi::Value *args, size_t count) -> jsi::Value {
19955
+ return this
19956
+ ->cpp_uniffi_breez_sdk_spark_fn_method_storage_list_watched_deposit_addresses(
19957
+ rt, thisVal, args, count);
19958
+ });
19959
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_update_watched_deposit_"
19960
+ "address"] = jsi::Function::createFromHostFunction(
19961
+ rt,
19962
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
19963
+ "storage_update_watched_deposit_address"),
19964
+ 3,
19965
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
19966
+ const jsi::Value *args, size_t count) -> jsi::Value {
19967
+ return this
19968
+ ->cpp_uniffi_breez_sdk_spark_fn_method_storage_update_watched_deposit_address(
19969
+ rt, thisVal, args, count);
19970
+ });
19633
19971
  props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_set_lnurl_metadata"] =
19634
19972
  jsi::Function::createFromHostFunction(
19635
19973
  rt,
@@ -22701,6 +23039,32 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
22701
23039
  ->cpp_uniffi_breez_sdk_spark_checksum_method_storage_update_deposit(
22702
23040
  rt, thisVal, args, count);
22703
23041
  });
23042
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_list_watched_"
23043
+ "deposit_addresses"] = jsi::Function::createFromHostFunction(
23044
+ rt,
23045
+ jsi::PropNameID::forAscii(rt,
23046
+ "ubrn_uniffi_breez_sdk_spark_checksum_method_"
23047
+ "storage_list_watched_deposit_addresses"),
23048
+ 0,
23049
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
23050
+ const jsi::Value *args, size_t count) -> jsi::Value {
23051
+ return this
23052
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_storage_list_watched_deposit_addresses(
23053
+ rt, thisVal, args, count);
23054
+ });
23055
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_update_watched_"
23056
+ "deposit_address"] = jsi::Function::createFromHostFunction(
23057
+ rt,
23058
+ jsi::PropNameID::forAscii(rt,
23059
+ "ubrn_uniffi_breez_sdk_spark_checksum_method_"
23060
+ "storage_update_watched_deposit_address"),
23061
+ 0,
23062
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
23063
+ const jsi::Value *args, size_t count) -> jsi::Value {
23064
+ return this
23065
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_storage_update_watched_deposit_address(
23066
+ rt, thisVal, args, count);
23067
+ });
22704
23068
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_"
22705
23069
  "metadata"] = jsi::Function::createFromHostFunction(
22706
23070
  rt,
@@ -23599,6 +23963,10 @@ NativeBreezSdkSpark::~NativeBreezSdkSpark() {
23599
23963
  uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod28::cleanup();
23600
23964
  // Cleanup for callback function CallbackInterfaceStorageMethod29
23601
23965
  uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod29::cleanup();
23966
+ // Cleanup for callback function CallbackInterfaceStorageMethod30
23967
+ uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod30::cleanup();
23968
+ // Cleanup for callback function CallbackInterfaceStorageMethod31
23969
+ uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod31::cleanup();
23602
23970
  // Cleanup for callback function CallbackInterfaceStorageBackendMethod0
23603
23971
  uniffi::breez_sdk_spark::cb::callbackinterfacestoragebackendmethod0::
23604
23972
  cleanup();
@@ -26351,6 +26719,32 @@ jsi::Value NativeBreezSdkSpark::
26351
26719
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
26352
26720
  value);
26353
26721
  }
26722
+ jsi::Value NativeBreezSdkSpark::
26723
+ cpp_uniffi_breez_sdk_spark_fn_method_storage_list_watched_deposit_addresses(
26724
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
26725
+ size_t count) {
26726
+ auto value =
26727
+ uniffi_breez_sdk_spark_fn_method_storage_list_watched_deposit_addresses(
26728
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]));
26729
+
26730
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
26731
+ value);
26732
+ }
26733
+ jsi::Value NativeBreezSdkSpark::
26734
+ cpp_uniffi_breez_sdk_spark_fn_method_storage_update_watched_deposit_address(
26735
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
26736
+ size_t count) {
26737
+ auto value =
26738
+ uniffi_breez_sdk_spark_fn_method_storage_update_watched_deposit_address(
26739
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
26740
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
26741
+ args[1]),
26742
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
26743
+ args[2]));
26744
+
26745
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
26746
+ value);
26747
+ }
26354
26748
  jsi::Value NativeBreezSdkSpark::
26355
26749
  cpp_uniffi_breez_sdk_spark_fn_method_storage_set_lnurl_metadata(
26356
26750
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -28943,6 +29337,24 @@ jsi::Value NativeBreezSdkSpark::
28943
29337
 
28944
29338
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
28945
29339
  }
29340
+ jsi::Value NativeBreezSdkSpark::
29341
+ cpp_uniffi_breez_sdk_spark_checksum_method_storage_list_watched_deposit_addresses(
29342
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
29343
+ size_t count) {
29344
+ auto value =
29345
+ uniffi_breez_sdk_spark_checksum_method_storage_list_watched_deposit_addresses();
29346
+
29347
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
29348
+ }
29349
+ jsi::Value NativeBreezSdkSpark::
29350
+ cpp_uniffi_breez_sdk_spark_checksum_method_storage_update_watched_deposit_address(
29351
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
29352
+ size_t count) {
29353
+ auto value =
29354
+ uniffi_breez_sdk_spark_checksum_method_storage_update_watched_deposit_address();
29355
+
29356
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
29357
+ }
28946
29358
  jsi::Value NativeBreezSdkSpark::
28947
29359
  cpp_uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_metadata(
28948
29360
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,