@breeztech/breez-sdk-spark-react-native 0.24.1 → 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 {
@@ -621,6 +631,9 @@ uniffi_breez_sdk_spark_fn_method_breezsdk_check_lightning_address_available(
621
631
  uniffi_breez_sdk_spark_fn_method_breezsdk_check_message(void *ptr,
622
632
  RustBuffer request);
623
633
  /*handle*/ uint64_t
634
+ uniffi_breez_sdk_spark_fn_method_breezsdk_check_unilateral_exit(
635
+ void *ptr, RustBuffer request);
636
+ /*handle*/ uint64_t
624
637
  uniffi_breez_sdk_spark_fn_method_breezsdk_claim_deposit(void *ptr,
625
638
  RustBuffer request);
626
639
  /*handle*/ uint64_t
@@ -1065,6 +1078,12 @@ uniffi_breez_sdk_spark_fn_method_storage_get_payments_by_parent_ids(
1065
1078
  uniffi_breez_sdk_spark_fn_method_storage_list_deposits(void *ptr);
1066
1079
  /*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_storage_update_deposit(
1067
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);
1068
1087
  /*handle*/ uint64_t uniffi_breez_sdk_spark_fn_method_storage_set_lnurl_metadata(
1069
1088
  void *ptr, RustBuffer metadata);
1070
1089
  /*handle*/ uint64_t
@@ -1364,6 +1383,8 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_buy_bitcoin();
1364
1383
  uint16_t
1365
1384
  uniffi_breez_sdk_spark_checksum_method_breezsdk_check_lightning_address_available();
1366
1385
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_check_message();
1386
+ uint16_t
1387
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_check_unilateral_exit();
1367
1388
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit();
1368
1389
  uint16_t uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_htlc_payment();
1369
1390
  uint16_t
@@ -1543,6 +1564,10 @@ uint16_t uniffi_breez_sdk_spark_checksum_method_storage_add_deposit();
1543
1564
  uint16_t uniffi_breez_sdk_spark_checksum_method_storage_delete_deposit();
1544
1565
  uint16_t uniffi_breez_sdk_spark_checksum_method_storage_list_deposits();
1545
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();
1546
1571
  uint16_t uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_metadata();
1547
1572
  uint16_t uniffi_breez_sdk_spark_checksum_method_storage_list_contacts();
1548
1573
  uint16_t uniffi_breez_sdk_spark_checksum_method_storage_get_contact();
@@ -14001,7 +14026,7 @@ using namespace facebook;
14001
14026
 
14002
14027
  // We need to store a lambda in a global so we can call it from
14003
14028
  // a function pointer. The function pointer is passed to Rust.
14004
- static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
14029
+ static std::function<void(uint64_t, UniffiForeignFutureCompleteRustBuffer,
14005
14030
  uint64_t, UniffiForeignFuture *)>
14006
14031
  rsLambda = nullptr;
14007
14032
 
@@ -14010,8 +14035,8 @@ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
14010
14035
  static void body(jsi::Runtime &rt,
14011
14036
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
14012
14037
  std::shared_ptr<jsi::Value> callbackValue,
14013
- uint64_t rs_uniffiHandle, RustBuffer rs_metadata,
14014
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14038
+ uint64_t rs_uniffiHandle,
14039
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14015
14040
  uint64_t rs_uniffiCallbackData,
14016
14041
  UniffiForeignFuture *rs_uniffiOutReturn) {
14017
14042
 
@@ -14019,11 +14044,9 @@ static void body(jsi::Runtime &rt,
14019
14044
  // We'll use the Bridging class to do this…
14020
14045
  auto js_uniffiHandle =
14021
14046
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
14022
- auto js_metadata = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14023
- rt, callInvoker, rs_metadata);
14024
- auto js_uniffiFutureCallback =
14025
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
14026
- rt, callInvoker, rs_uniffiFutureCallback);
14047
+ auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
14048
+ UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
14049
+ rs_uniffiFutureCallback);
14027
14050
  auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
14028
14051
  rt, callInvoker, rs_uniffiCallbackData);
14029
14052
 
@@ -14033,8 +14056,8 @@ static void body(jsi::Runtime &rt,
14033
14056
  try {
14034
14057
  // Getting the callback function
14035
14058
  auto cb = callbackValue->asObject(rt).asFunction(rt);
14036
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_metadata,
14037
- js_uniffiFutureCallback, js_uniffiCallbackData);
14059
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_uniffiFutureCallback,
14060
+ js_uniffiCallbackData);
14038
14061
 
14039
14062
  // return type is MutReference(Struct("ForeignFuture"))
14040
14063
  // Finally, we need to copy the return value back into the Rust pointer.
@@ -14048,10 +14071,11 @@ static void body(jsi::Runtime &rt,
14048
14071
  }
14049
14072
  }
14050
14073
 
14051
- static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_metadata,
14052
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14053
- uint64_t rs_uniffiCallbackData,
14054
- 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) {
14055
14079
  // If the runtime has shutdown, then there is no point in trying to
14056
14080
  // call into Javascript. BUT how do we tell if the runtime has shutdown?
14057
14081
  //
@@ -14067,8 +14091,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_metadata,
14067
14091
 
14068
14092
  // The runtime, the actual callback jsi::funtion, and the callInvoker
14069
14093
  // are all in the lambda.
14070
- rsLambda(rs_uniffiHandle, rs_metadata, rs_uniffiFutureCallback,
14071
- rs_uniffiCallbackData, rs_uniffiOutReturn);
14094
+ rsLambda(rs_uniffiHandle, rs_uniffiFutureCallback, rs_uniffiCallbackData,
14095
+ rs_uniffiOutReturn);
14072
14096
  }
14073
14097
 
14074
14098
  static UniffiCallbackInterfaceStorageMethod13
@@ -14091,17 +14115,16 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
14091
14115
  auto callbackFunction = value.asObject(rt).asFunction(rt);
14092
14116
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
14093
14117
  rsLambda = [&rt, callInvoker, callbackValue](
14094
- uint64_t rs_uniffiHandle, RustBuffer rs_metadata,
14095
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14118
+ uint64_t rs_uniffiHandle,
14119
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14096
14120
  uint64_t rs_uniffiCallbackData,
14097
14121
  UniffiForeignFuture *rs_uniffiOutReturn) {
14098
14122
  // We immediately make a lambda which will do the work of transforming the
14099
14123
  // arguments into JSI values and calling the callback.
14100
14124
  uniffi_runtime::UniffiCallFunc jsLambda =
14101
- [callInvoker, callbackValue, rs_uniffiHandle, rs_metadata,
14102
- rs_uniffiFutureCallback, rs_uniffiCallbackData,
14103
- rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
14104
- 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,
14105
14128
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
14106
14129
  rs_uniffiOutReturn);
14107
14130
  };
@@ -14142,8 +14165,8 @@ using namespace facebook;
14142
14165
 
14143
14166
  // We need to store a lambda in a global so we can call it from
14144
14167
  // a function pointer. The function pointer is passed to Rust.
14145
- static std::function<void(uint64_t, RustBuffer,
14146
- UniffiForeignFutureCompleteRustBuffer, uint64_t,
14168
+ static std::function<void(uint64_t, RustBuffer, RustBuffer,
14169
+ UniffiForeignFutureCompleteVoid, uint64_t,
14147
14170
  UniffiForeignFuture *)>
14148
14171
  rsLambda = nullptr;
14149
14172
 
@@ -14152,8 +14175,9 @@ static std::function<void(uint64_t, RustBuffer,
14152
14175
  static void body(jsi::Runtime &rt,
14153
14176
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
14154
14177
  std::shared_ptr<jsi::Value> callbackValue,
14155
- uint64_t rs_uniffiHandle, RustBuffer rs_request,
14156
- UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14178
+ uint64_t rs_uniffiHandle, RustBuffer rs_address,
14179
+ RustBuffer rs_payload,
14180
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14157
14181
  uint64_t rs_uniffiCallbackData,
14158
14182
  UniffiForeignFuture *rs_uniffiOutReturn) {
14159
14183
 
@@ -14161,11 +14185,13 @@ static void body(jsi::Runtime &rt,
14161
14185
  // We'll use the Bridging class to do this…
14162
14186
  auto js_uniffiHandle =
14163
14187
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
14164
- auto js_request = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14165
- rt, callInvoker, rs_request);
14166
- auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
14167
- UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
14168
- 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);
14169
14195
  auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
14170
14196
  rt, callInvoker, rs_uniffiCallbackData);
14171
14197
 
@@ -14175,7 +14201,7 @@ static void body(jsi::Runtime &rt,
14175
14201
  try {
14176
14202
  // Getting the callback function
14177
14203
  auto cb = callbackValue->asObject(rt).asFunction(rt);
14178
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_request,
14204
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_address, js_payload,
14179
14205
  js_uniffiFutureCallback, js_uniffiCallbackData);
14180
14206
 
14181
14207
  // return type is MutReference(Struct("ForeignFuture"))
@@ -14190,11 +14216,11 @@ static void body(jsi::Runtime &rt,
14190
14216
  }
14191
14217
  }
14192
14218
 
14193
- static void
14194
- callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
14195
- UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14196
- uint64_t rs_uniffiCallbackData,
14197
- 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) {
14198
14224
  // If the runtime has shutdown, then there is no point in trying to
14199
14225
  // call into Javascript. BUT how do we tell if the runtime has shutdown?
14200
14226
  //
@@ -14210,7 +14236,7 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_request,
14210
14236
 
14211
14237
  // The runtime, the actual callback jsi::funtion, and the callInvoker
14212
14238
  // are all in the lambda.
14213
- rsLambda(rs_uniffiHandle, rs_request, rs_uniffiFutureCallback,
14239
+ rsLambda(rs_uniffiHandle, rs_address, rs_payload, rs_uniffiFutureCallback,
14214
14240
  rs_uniffiCallbackData, rs_uniffiOutReturn);
14215
14241
  }
14216
14242
 
@@ -14234,18 +14260,19 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
14234
14260
  auto callbackFunction = value.asObject(rt).asFunction(rt);
14235
14261
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
14236
14262
  rsLambda = [&rt, callInvoker, callbackValue](
14237
- uint64_t rs_uniffiHandle, RustBuffer rs_request,
14238
- UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14263
+ uint64_t rs_uniffiHandle, RustBuffer rs_address,
14264
+ RustBuffer rs_payload,
14265
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14239
14266
  uint64_t rs_uniffiCallbackData,
14240
14267
  UniffiForeignFuture *rs_uniffiOutReturn) {
14241
14268
  // We immediately make a lambda which will do the work of transforming the
14242
14269
  // arguments into JSI values and calling the callback.
14243
14270
  uniffi_runtime::UniffiCallFunc jsLambda =
14244
- [callInvoker, callbackValue, rs_uniffiHandle, rs_request,
14271
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_address, rs_payload,
14245
14272
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
14246
14273
  rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
14247
- body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_request,
14248
- rs_uniffiFutureCallback, rs_uniffiCallbackData,
14274
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_address,
14275
+ rs_payload, rs_uniffiFutureCallback, rs_uniffiCallbackData,
14249
14276
  rs_uniffiOutReturn);
14250
14277
  };
14251
14278
  // We'll then call that lambda from the callInvoker which will
@@ -14285,9 +14312,8 @@ using namespace facebook;
14285
14312
 
14286
14313
  // We need to store a lambda in a global so we can call it from
14287
14314
  // a function pointer. The function pointer is passed to Rust.
14288
- static std::function<void(uint64_t, RustBuffer,
14289
- UniffiForeignFutureCompleteRustBuffer, uint64_t,
14290
- UniffiForeignFuture *)>
14315
+ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
14316
+ uint64_t, UniffiForeignFuture *)>
14291
14317
  rsLambda = nullptr;
14292
14318
 
14293
14319
  // This is the main body of the callback. It's called from the lambda,
@@ -14295,8 +14321,8 @@ static std::function<void(uint64_t, RustBuffer,
14295
14321
  static void body(jsi::Runtime &rt,
14296
14322
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
14297
14323
  std::shared_ptr<jsi::Value> callbackValue,
14298
- uint64_t rs_uniffiHandle, RustBuffer rs_id,
14299
- UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14324
+ uint64_t rs_uniffiHandle, RustBuffer rs_metadata,
14325
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14300
14326
  uint64_t rs_uniffiCallbackData,
14301
14327
  UniffiForeignFuture *rs_uniffiOutReturn) {
14302
14328
 
@@ -14304,11 +14330,11 @@ static void body(jsi::Runtime &rt,
14304
14330
  // We'll use the Bridging class to do this…
14305
14331
  auto js_uniffiHandle =
14306
14332
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
14307
- auto js_id = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14308
- rt, callInvoker, rs_id);
14309
- auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
14310
- UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
14311
- 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);
14312
14338
  auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
14313
14339
  rt, callInvoker, rs_uniffiCallbackData);
14314
14340
 
@@ -14318,7 +14344,7 @@ static void body(jsi::Runtime &rt,
14318
14344
  try {
14319
14345
  // Getting the callback function
14320
14346
  auto cb = callbackValue->asObject(rt).asFunction(rt);
14321
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_id,
14347
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_metadata,
14322
14348
  js_uniffiFutureCallback, js_uniffiCallbackData);
14323
14349
 
14324
14350
  // return type is MutReference(Struct("ForeignFuture"))
@@ -14333,11 +14359,10 @@ static void body(jsi::Runtime &rt,
14333
14359
  }
14334
14360
  }
14335
14361
 
14336
- static void
14337
- callback(uint64_t rs_uniffiHandle, RustBuffer rs_id,
14338
- UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14339
- uint64_t rs_uniffiCallbackData,
14340
- 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) {
14341
14366
  // If the runtime has shutdown, then there is no point in trying to
14342
14367
  // call into Javascript. BUT how do we tell if the runtime has shutdown?
14343
14368
  //
@@ -14353,7 +14378,7 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_id,
14353
14378
 
14354
14379
  // The runtime, the actual callback jsi::funtion, and the callInvoker
14355
14380
  // are all in the lambda.
14356
- rsLambda(rs_uniffiHandle, rs_id, rs_uniffiFutureCallback,
14381
+ rsLambda(rs_uniffiHandle, rs_metadata, rs_uniffiFutureCallback,
14357
14382
  rs_uniffiCallbackData, rs_uniffiOutReturn);
14358
14383
  }
14359
14384
 
@@ -14377,17 +14402,17 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
14377
14402
  auto callbackFunction = value.asObject(rt).asFunction(rt);
14378
14403
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
14379
14404
  rsLambda = [&rt, callInvoker, callbackValue](
14380
- uint64_t rs_uniffiHandle, RustBuffer rs_id,
14381
- UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14405
+ uint64_t rs_uniffiHandle, RustBuffer rs_metadata,
14406
+ UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14382
14407
  uint64_t rs_uniffiCallbackData,
14383
14408
  UniffiForeignFuture *rs_uniffiOutReturn) {
14384
14409
  // We immediately make a lambda which will do the work of transforming the
14385
14410
  // arguments into JSI values and calling the callback.
14386
14411
  uniffi_runtime::UniffiCallFunc jsLambda =
14387
- [callInvoker, callbackValue, rs_uniffiHandle, rs_id,
14412
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_metadata,
14388
14413
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
14389
14414
  rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
14390
- body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_id,
14415
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_metadata,
14391
14416
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
14392
14417
  rs_uniffiOutReturn);
14393
14418
  };
@@ -14428,8 +14453,9 @@ using namespace facebook;
14428
14453
 
14429
14454
  // We need to store a lambda in a global so we can call it from
14430
14455
  // a function pointer. The function pointer is passed to Rust.
14431
- static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
14432
- uint64_t, UniffiForeignFuture *)>
14456
+ static std::function<void(uint64_t, RustBuffer,
14457
+ UniffiForeignFutureCompleteRustBuffer, uint64_t,
14458
+ UniffiForeignFuture *)>
14433
14459
  rsLambda = nullptr;
14434
14460
 
14435
14461
  // This is the main body of the callback. It's called from the lambda,
@@ -14437,8 +14463,8 @@ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
14437
14463
  static void body(jsi::Runtime &rt,
14438
14464
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
14439
14465
  std::shared_ptr<jsi::Value> callbackValue,
14440
- uint64_t rs_uniffiHandle, RustBuffer rs_contact,
14441
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14466
+ uint64_t rs_uniffiHandle, RustBuffer rs_request,
14467
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14442
14468
  uint64_t rs_uniffiCallbackData,
14443
14469
  UniffiForeignFuture *rs_uniffiOutReturn) {
14444
14470
 
@@ -14446,11 +14472,11 @@ static void body(jsi::Runtime &rt,
14446
14472
  // We'll use the Bridging class to do this…
14447
14473
  auto js_uniffiHandle =
14448
14474
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
14449
- auto js_contact = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14450
- rt, callInvoker, rs_contact);
14451
- auto js_uniffiFutureCallback =
14452
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
14453
- 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);
14454
14480
  auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
14455
14481
  rt, callInvoker, rs_uniffiCallbackData);
14456
14482
 
@@ -14460,7 +14486,7 @@ static void body(jsi::Runtime &rt,
14460
14486
  try {
14461
14487
  // Getting the callback function
14462
14488
  auto cb = callbackValue->asObject(rt).asFunction(rt);
14463
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_contact,
14489
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_request,
14464
14490
  js_uniffiFutureCallback, js_uniffiCallbackData);
14465
14491
 
14466
14492
  // return type is MutReference(Struct("ForeignFuture"))
@@ -14475,10 +14501,11 @@ static void body(jsi::Runtime &rt,
14475
14501
  }
14476
14502
  }
14477
14503
 
14478
- static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_contact,
14479
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14480
- uint64_t rs_uniffiCallbackData,
14481
- 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) {
14482
14509
  // If the runtime has shutdown, then there is no point in trying to
14483
14510
  // call into Javascript. BUT how do we tell if the runtime has shutdown?
14484
14511
  //
@@ -14494,7 +14521,7 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_contact,
14494
14521
 
14495
14522
  // The runtime, the actual callback jsi::funtion, and the callInvoker
14496
14523
  // are all in the lambda.
14497
- rsLambda(rs_uniffiHandle, rs_contact, rs_uniffiFutureCallback,
14524
+ rsLambda(rs_uniffiHandle, rs_request, rs_uniffiFutureCallback,
14498
14525
  rs_uniffiCallbackData, rs_uniffiOutReturn);
14499
14526
  }
14500
14527
 
@@ -14518,17 +14545,17 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
14518
14545
  auto callbackFunction = value.asObject(rt).asFunction(rt);
14519
14546
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
14520
14547
  rsLambda = [&rt, callInvoker, callbackValue](
14521
- uint64_t rs_uniffiHandle, RustBuffer rs_contact,
14522
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14548
+ uint64_t rs_uniffiHandle, RustBuffer rs_request,
14549
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14523
14550
  uint64_t rs_uniffiCallbackData,
14524
14551
  UniffiForeignFuture *rs_uniffiOutReturn) {
14525
14552
  // We immediately make a lambda which will do the work of transforming the
14526
14553
  // arguments into JSI values and calling the callback.
14527
14554
  uniffi_runtime::UniffiCallFunc jsLambda =
14528
- [callInvoker, callbackValue, rs_uniffiHandle, rs_contact,
14555
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_request,
14529
14556
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
14530
14557
  rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
14531
- body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_contact,
14558
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_request,
14532
14559
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
14533
14560
  rs_uniffiOutReturn);
14534
14561
  };
@@ -14569,8 +14596,9 @@ using namespace facebook;
14569
14596
 
14570
14597
  // We need to store a lambda in a global so we can call it from
14571
14598
  // a function pointer. The function pointer is passed to Rust.
14572
- static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
14573
- uint64_t, UniffiForeignFuture *)>
14599
+ static std::function<void(uint64_t, RustBuffer,
14600
+ UniffiForeignFutureCompleteRustBuffer, uint64_t,
14601
+ UniffiForeignFuture *)>
14574
14602
  rsLambda = nullptr;
14575
14603
 
14576
14604
  // This is the main body of the callback. It's called from the lambda,
@@ -14579,7 +14607,7 @@ static void body(jsi::Runtime &rt,
14579
14607
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
14580
14608
  std::shared_ptr<jsi::Value> callbackValue,
14581
14609
  uint64_t rs_uniffiHandle, RustBuffer rs_id,
14582
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14610
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14583
14611
  uint64_t rs_uniffiCallbackData,
14584
14612
  UniffiForeignFuture *rs_uniffiOutReturn) {
14585
14613
 
@@ -14589,9 +14617,9 @@ static void body(jsi::Runtime &rt,
14589
14617
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
14590
14618
  auto js_id = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14591
14619
  rt, callInvoker, rs_id);
14592
- auto js_uniffiFutureCallback =
14593
- uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
14594
- rt, callInvoker, rs_uniffiFutureCallback);
14620
+ auto js_uniffiFutureCallback = uniffi::breez_sdk_spark::Bridging<
14621
+ UniffiForeignFutureCompleteRustBuffer>::toJs(rt, callInvoker,
14622
+ rs_uniffiFutureCallback);
14595
14623
  auto js_uniffiCallbackData = uniffi_jsi::Bridging<uint64_t>::toJs(
14596
14624
  rt, callInvoker, rs_uniffiCallbackData);
14597
14625
 
@@ -14616,10 +14644,11 @@ static void body(jsi::Runtime &rt,
14616
14644
  }
14617
14645
  }
14618
14646
 
14619
- static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_id,
14620
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14621
- uint64_t rs_uniffiCallbackData,
14622
- 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) {
14623
14652
  // If the runtime has shutdown, then there is no point in trying to
14624
14653
  // call into Javascript. BUT how do we tell if the runtime has shutdown?
14625
14654
  //
@@ -14660,7 +14689,7 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
14660
14689
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
14661
14690
  rsLambda = [&rt, callInvoker, callbackValue](
14662
14691
  uint64_t rs_uniffiHandle, RustBuffer rs_id,
14663
- UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14692
+ UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14664
14693
  uint64_t rs_uniffiCallbackData,
14665
14694
  UniffiForeignFuture *rs_uniffiOutReturn) {
14666
14695
  // We immediately make a lambda which will do the work of transforming the
@@ -14719,7 +14748,7 @@ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
14719
14748
  static void body(jsi::Runtime &rt,
14720
14749
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
14721
14750
  std::shared_ptr<jsi::Value> callbackValue,
14722
- uint64_t rs_uniffiHandle, RustBuffer rs_swap,
14751
+ uint64_t rs_uniffiHandle, RustBuffer rs_contact,
14723
14752
  UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14724
14753
  uint64_t rs_uniffiCallbackData,
14725
14754
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -14728,8 +14757,8 @@ static void body(jsi::Runtime &rt,
14728
14757
  // We'll use the Bridging class to do this…
14729
14758
  auto js_uniffiHandle =
14730
14759
  uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_uniffiHandle);
14731
- auto js_swap = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14732
- rt, callInvoker, rs_swap);
14760
+ auto js_contact = uniffi::breez_sdk_spark::Bridging<RustBuffer>::toJs(
14761
+ rt, callInvoker, rs_contact);
14733
14762
  auto js_uniffiFutureCallback =
14734
14763
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFutureCompleteVoid>::toJs(
14735
14764
  rt, callInvoker, rs_uniffiFutureCallback);
@@ -14742,7 +14771,7 @@ static void body(jsi::Runtime &rt,
14742
14771
  try {
14743
14772
  // Getting the callback function
14744
14773
  auto cb = callbackValue->asObject(rt).asFunction(rt);
14745
- auto uniffiResult = cb.call(rt, js_uniffiHandle, js_swap,
14774
+ auto uniffiResult = cb.call(rt, js_uniffiHandle, js_contact,
14746
14775
  js_uniffiFutureCallback, js_uniffiCallbackData);
14747
14776
 
14748
14777
  // return type is MutReference(Struct("ForeignFuture"))
@@ -14757,7 +14786,7 @@ static void body(jsi::Runtime &rt,
14757
14786
  }
14758
14787
  }
14759
14788
 
14760
- static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_swap,
14789
+ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_contact,
14761
14790
  UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14762
14791
  uint64_t rs_uniffiCallbackData,
14763
14792
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -14776,7 +14805,7 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_swap,
14776
14805
 
14777
14806
  // The runtime, the actual callback jsi::funtion, and the callInvoker
14778
14807
  // are all in the lambda.
14779
- rsLambda(rs_uniffiHandle, rs_swap, rs_uniffiFutureCallback,
14808
+ rsLambda(rs_uniffiHandle, rs_contact, rs_uniffiFutureCallback,
14780
14809
  rs_uniffiCallbackData, rs_uniffiOutReturn);
14781
14810
  }
14782
14811
 
@@ -14800,17 +14829,17 @@ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestorageme
14800
14829
  auto callbackFunction = value.asObject(rt).asFunction(rt);
14801
14830
  auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
14802
14831
  rsLambda = [&rt, callInvoker, callbackValue](
14803
- uint64_t rs_uniffiHandle, RustBuffer rs_swap,
14832
+ uint64_t rs_uniffiHandle, RustBuffer rs_contact,
14804
14833
  UniffiForeignFutureCompleteVoid rs_uniffiFutureCallback,
14805
14834
  uint64_t rs_uniffiCallbackData,
14806
14835
  UniffiForeignFuture *rs_uniffiOutReturn) {
14807
14836
  // We immediately make a lambda which will do the work of transforming the
14808
14837
  // arguments into JSI values and calling the callback.
14809
14838
  uniffi_runtime::UniffiCallFunc jsLambda =
14810
- [callInvoker, callbackValue, rs_uniffiHandle, rs_swap,
14839
+ [callInvoker, callbackValue, rs_uniffiHandle, rs_contact,
14811
14840
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
14812
14841
  rs_uniffiOutReturn](jsi::Runtime &rt) mutable {
14813
- body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_swap,
14842
+ body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_contact,
14814
14843
  rs_uniffiFutureCallback, rs_uniffiCallbackData,
14815
14844
  rs_uniffiOutReturn);
14816
14845
  };
@@ -14851,9 +14880,8 @@ using namespace facebook;
14851
14880
 
14852
14881
  // We need to store a lambda in a global so we can call it from
14853
14882
  // a function pointer. The function pointer is passed to Rust.
14854
- static std::function<void(uint64_t, RustBuffer, RustBuffer,
14855
- UniffiForeignFutureCompleteRustBuffer, uint64_t,
14856
- UniffiForeignFuture *)>
14883
+ static std::function<void(uint64_t, RustBuffer, UniffiForeignFutureCompleteVoid,
14884
+ uint64_t, UniffiForeignFuture *)>
14857
14885
  rsLambda = nullptr;
14858
14886
 
14859
14887
  // This is the main body of the callback. It's called from the lambda,
@@ -14861,8 +14889,291 @@ static std::function<void(uint64_t, RustBuffer, RustBuffer,
14861
14889
  static void body(jsi::Runtime &rt,
14862
14890
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
14863
14891
  std::shared_ptr<jsi::Value> callbackValue,
14864
- uint64_t rs_uniffiHandle, RustBuffer rs_provider,
14865
- RustBuffer rs_id,
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,
14866
15177
  UniffiForeignFutureCompleteRustBuffer rs_uniffiFutureCallback,
14867
15178
  uint64_t rs_uniffiCallbackData,
14868
15179
  UniffiForeignFuture *rs_uniffiOutReturn) {
@@ -14896,7 +15207,7 @@ static void body(jsi::Runtime &rt,
14896
15207
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
14897
15208
  rt, callInvoker, uniffiResult);
14898
15209
  } catch (const jsi::JSError &error) {
14899
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod19: "
15210
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod21: "
14900
15211
  << error.what() << std::endl;
14901
15212
  throw error;
14902
15213
  }
@@ -14926,8 +15237,8 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_provider, RustBuffer rs_id,
14926
15237
  rs_uniffiCallbackData, rs_uniffiOutReturn);
14927
15238
  }
14928
15239
 
14929
- static UniffiCallbackInterfaceStorageMethod19
14930
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod19
15240
+ static UniffiCallbackInterfaceStorageMethod21
15241
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21
14931
15242
  jsi::Runtime &rt,
14932
15243
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
14933
15244
  const jsi::Value &value) {
@@ -14975,12 +15286,12 @@ static void cleanup() {
14975
15286
  // out, then the pointer will no longer be left dangling.
14976
15287
  rsLambda = nullptr;
14977
15288
  }
14978
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod19
15289
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21
14979
15290
  // Implementation of callback function calling from Rust to JS
14980
- // CallbackInterfaceStorageMethod20
15291
+ // CallbackInterfaceStorageMethod22
14981
15292
 
14982
15293
  // Callback function:
14983
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20::UniffiCallbackInterfaceStorageMethod20
15294
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22::UniffiCallbackInterfaceStorageMethod22
14984
15295
  //
14985
15296
  // We have the following constraints:
14986
15297
  // - we need to pass a function pointer to Rust.
@@ -14993,7 +15304,7 @@ static void cleanup() {
14993
15304
  //
14994
15305
  // We then give the `callback` function pointer to Rust which will call the
14995
15306
  // lambda sometime in the future.
14996
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20 {
15307
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22 {
14997
15308
  using namespace facebook;
14998
15309
 
14999
15310
  // We need to store a lambda in a global so we can call it from
@@ -15040,7 +15351,7 @@ static void body(jsi::Runtime &rt,
15040
15351
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
15041
15352
  rt, callInvoker, uniffiResult);
15042
15353
  } catch (const jsi::JSError &error) {
15043
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod20: "
15354
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod22: "
15044
15355
  << error.what() << std::endl;
15045
15356
  throw error;
15046
15357
  }
@@ -15070,8 +15381,8 @@ callback(uint64_t rs_uniffiHandle, RustBuffer rs_provider,
15070
15381
  rs_uniffiCallbackData, rs_uniffiOutReturn);
15071
15382
  }
15072
15383
 
15073
- static UniffiCallbackInterfaceStorageMethod20
15074
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20
15384
+ static UniffiCallbackInterfaceStorageMethod22
15385
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22
15075
15386
  jsi::Runtime &rt,
15076
15387
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
15077
15388
  const jsi::Value &value) {
@@ -15118,12 +15429,12 @@ static void cleanup() {
15118
15429
  // out, then the pointer will no longer be left dangling.
15119
15430
  rsLambda = nullptr;
15120
15431
  }
15121
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod20
15432
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22
15122
15433
  // Implementation of callback function calling from Rust to JS
15123
- // CallbackInterfaceStorageMethod21
15434
+ // CallbackInterfaceStorageMethod23
15124
15435
 
15125
15436
  // Callback function:
15126
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21::UniffiCallbackInterfaceStorageMethod21
15437
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23::UniffiCallbackInterfaceStorageMethod23
15127
15438
  //
15128
15439
  // We have the following constraints:
15129
15440
  // - we need to pass a function pointer to Rust.
@@ -15136,7 +15447,7 @@ static void cleanup() {
15136
15447
  //
15137
15448
  // We then give the `callback` function pointer to Rust which will call the
15138
15449
  // lambda sometime in the future.
15139
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21 {
15450
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23 {
15140
15451
  using namespace facebook;
15141
15452
 
15142
15453
  // We need to store a lambda in a global so we can call it from
@@ -15182,7 +15493,7 @@ static void body(jsi::Runtime &rt,
15182
15493
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
15183
15494
  rt, callInvoker, uniffiResult);
15184
15495
  } catch (const jsi::JSError &error) {
15185
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod21: "
15496
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod23: "
15186
15497
  << error.what() << std::endl;
15187
15498
  throw error;
15188
15499
  }
@@ -15211,8 +15522,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
15211
15522
  rs_uniffiCallbackData, rs_uniffiOutReturn);
15212
15523
  }
15213
15524
 
15214
- static UniffiCallbackInterfaceStorageMethod21
15215
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21
15525
+ static UniffiCallbackInterfaceStorageMethod23
15526
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23
15216
15527
  jsi::Runtime &rt,
15217
15528
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
15218
15529
  const jsi::Value &value) {
@@ -15259,12 +15570,12 @@ static void cleanup() {
15259
15570
  // out, then the pointer will no longer be left dangling.
15260
15571
  rsLambda = nullptr;
15261
15572
  }
15262
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod21
15573
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23
15263
15574
  // Implementation of callback function calling from Rust to JS
15264
- // CallbackInterfaceStorageMethod22
15575
+ // CallbackInterfaceStorageMethod24
15265
15576
 
15266
15577
  // Callback function:
15267
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22::UniffiCallbackInterfaceStorageMethod22
15578
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24::UniffiCallbackInterfaceStorageMethod24
15268
15579
  //
15269
15580
  // We have the following constraints:
15270
15581
  // - we need to pass a function pointer to Rust.
@@ -15277,7 +15588,7 @@ static void cleanup() {
15277
15588
  //
15278
15589
  // We then give the `callback` function pointer to Rust which will call the
15279
15590
  // lambda sometime in the future.
15280
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22 {
15591
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24 {
15281
15592
  using namespace facebook;
15282
15593
 
15283
15594
  // We need to store a lambda in a global so we can call it from
@@ -15328,7 +15639,7 @@ static void body(jsi::Runtime &rt,
15328
15639
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
15329
15640
  rt, callInvoker, uniffiResult);
15330
15641
  } catch (const jsi::JSError &error) {
15331
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod22: "
15642
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod24: "
15332
15643
  << error.what() << std::endl;
15333
15644
  throw error;
15334
15645
  }
@@ -15358,8 +15669,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
15358
15669
  rs_uniffiFutureCallback, rs_uniffiCallbackData, rs_uniffiOutReturn);
15359
15670
  }
15360
15671
 
15361
- static UniffiCallbackInterfaceStorageMethod22
15362
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22
15672
+ static UniffiCallbackInterfaceStorageMethod24
15673
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24
15363
15674
  jsi::Runtime &rt,
15364
15675
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
15365
15676
  const jsi::Value &value) {
@@ -15407,12 +15718,12 @@ static void cleanup() {
15407
15718
  // out, then the pointer will no longer be left dangling.
15408
15719
  rsLambda = nullptr;
15409
15720
  }
15410
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod22
15721
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24
15411
15722
  // Implementation of callback function calling from Rust to JS
15412
- // CallbackInterfaceStorageMethod23
15723
+ // CallbackInterfaceStorageMethod25
15413
15724
 
15414
15725
  // Callback function:
15415
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23::UniffiCallbackInterfaceStorageMethod23
15726
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25::UniffiCallbackInterfaceStorageMethod25
15416
15727
  //
15417
15728
  // We have the following constraints:
15418
15729
  // - we need to pass a function pointer to Rust.
@@ -15425,7 +15736,7 @@ static void cleanup() {
15425
15736
  //
15426
15737
  // We then give the `callback` function pointer to Rust which will call the
15427
15738
  // lambda sometime in the future.
15428
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23 {
15739
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25 {
15429
15740
  using namespace facebook;
15430
15741
 
15431
15742
  // We need to store a lambda in a global so we can call it from
@@ -15472,7 +15783,7 @@ static void body(jsi::Runtime &rt,
15472
15783
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
15473
15784
  rt, callInvoker, uniffiResult);
15474
15785
  } catch (const jsi::JSError &error) {
15475
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod23: "
15786
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod25: "
15476
15787
  << error.what() << std::endl;
15477
15788
  throw error;
15478
15789
  }
@@ -15502,8 +15813,8 @@ callback(uint64_t rs_uniffiHandle, uint32_t rs_limit,
15502
15813
  rs_uniffiCallbackData, rs_uniffiOutReturn);
15503
15814
  }
15504
15815
 
15505
- static UniffiCallbackInterfaceStorageMethod23
15506
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23
15816
+ static UniffiCallbackInterfaceStorageMethod25
15817
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25
15507
15818
  jsi::Runtime &rt,
15508
15819
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
15509
15820
  const jsi::Value &value) {
@@ -15550,12 +15861,12 @@ static void cleanup() {
15550
15861
  // out, then the pointer will no longer be left dangling.
15551
15862
  rsLambda = nullptr;
15552
15863
  }
15553
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod23
15864
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25
15554
15865
  // Implementation of callback function calling from Rust to JS
15555
- // CallbackInterfaceStorageMethod24
15866
+ // CallbackInterfaceStorageMethod26
15556
15867
 
15557
15868
  // Callback function:
15558
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24::UniffiCallbackInterfaceStorageMethod24
15869
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26::UniffiCallbackInterfaceStorageMethod26
15559
15870
  //
15560
15871
  // We have the following constraints:
15561
15872
  // - we need to pass a function pointer to Rust.
@@ -15568,7 +15879,7 @@ static void cleanup() {
15568
15879
  //
15569
15880
  // We then give the `callback` function pointer to Rust which will call the
15570
15881
  // lambda sometime in the future.
15571
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24 {
15882
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26 {
15572
15883
  using namespace facebook;
15573
15884
 
15574
15885
  // We need to store a lambda in a global so we can call it from
@@ -15612,7 +15923,7 @@ static void body(jsi::Runtime &rt,
15612
15923
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
15613
15924
  rt, callInvoker, uniffiResult);
15614
15925
  } catch (const jsi::JSError &error) {
15615
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod24: "
15926
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod26: "
15616
15927
  << error.what() << std::endl;
15617
15928
  throw error;
15618
15929
  }
@@ -15641,8 +15952,8 @@ static void callback(uint64_t rs_uniffiHandle,
15641
15952
  rs_uniffiOutReturn);
15642
15953
  }
15643
15954
 
15644
- static UniffiCallbackInterfaceStorageMethod24
15645
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24
15955
+ static UniffiCallbackInterfaceStorageMethod26
15956
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26
15646
15957
  jsi::Runtime &rt,
15647
15958
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
15648
15959
  const jsi::Value &value) {
@@ -15688,12 +15999,12 @@ static void cleanup() {
15688
15999
  // out, then the pointer will no longer be left dangling.
15689
16000
  rsLambda = nullptr;
15690
16001
  }
15691
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod24
16002
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26
15692
16003
  // Implementation of callback function calling from Rust to JS
15693
- // CallbackInterfaceStorageMethod25
16004
+ // CallbackInterfaceStorageMethod27
15694
16005
 
15695
16006
  // Callback function:
15696
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25::UniffiCallbackInterfaceStorageMethod25
16007
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod27::UniffiCallbackInterfaceStorageMethod27
15697
16008
  //
15698
16009
  // We have the following constraints:
15699
16010
  // - we need to pass a function pointer to Rust.
@@ -15706,7 +16017,7 @@ static void cleanup() {
15706
16017
  //
15707
16018
  // We then give the `callback` function pointer to Rust which will call the
15708
16019
  // lambda sometime in the future.
15709
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25 {
16020
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod27 {
15710
16021
  using namespace facebook;
15711
16022
 
15712
16023
  // We need to store a lambda in a global so we can call it from
@@ -15752,7 +16063,7 @@ static void body(jsi::Runtime &rt,
15752
16063
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
15753
16064
  rt, callInvoker, uniffiResult);
15754
16065
  } catch (const jsi::JSError &error) {
15755
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod25: "
16066
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod27: "
15756
16067
  << error.what() << std::endl;
15757
16068
  throw error;
15758
16069
  }
@@ -15781,8 +16092,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_records,
15781
16092
  rs_uniffiCallbackData, rs_uniffiOutReturn);
15782
16093
  }
15783
16094
 
15784
- static UniffiCallbackInterfaceStorageMethod25
15785
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25
16095
+ static UniffiCallbackInterfaceStorageMethod27
16096
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod27
15786
16097
  jsi::Runtime &rt,
15787
16098
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
15788
16099
  const jsi::Value &value) {
@@ -15829,12 +16140,12 @@ static void cleanup() {
15829
16140
  // out, then the pointer will no longer be left dangling.
15830
16141
  rsLambda = nullptr;
15831
16142
  }
15832
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod25
16143
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod27
15833
16144
  // Implementation of callback function calling from Rust to JS
15834
- // CallbackInterfaceStorageMethod26
16145
+ // CallbackInterfaceStorageMethod28
15835
16146
 
15836
16147
  // Callback function:
15837
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26::UniffiCallbackInterfaceStorageMethod26
16148
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod28::UniffiCallbackInterfaceStorageMethod28
15838
16149
  //
15839
16150
  // We have the following constraints:
15840
16151
  // - we need to pass a function pointer to Rust.
@@ -15847,7 +16158,7 @@ static void cleanup() {
15847
16158
  //
15848
16159
  // We then give the `callback` function pointer to Rust which will call the
15849
16160
  // lambda sometime in the future.
15850
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26 {
16161
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod28 {
15851
16162
  using namespace facebook;
15852
16163
 
15853
16164
  // We need to store a lambda in a global so we can call it from
@@ -15893,7 +16204,7 @@ static void body(jsi::Runtime &rt,
15893
16204
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
15894
16205
  rt, callInvoker, uniffiResult);
15895
16206
  } catch (const jsi::JSError &error) {
15896
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod26: "
16207
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod28: "
15897
16208
  << error.what() << std::endl;
15898
16209
  throw error;
15899
16210
  }
@@ -15922,8 +16233,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
15922
16233
  rs_uniffiCallbackData, rs_uniffiOutReturn);
15923
16234
  }
15924
16235
 
15925
- static UniffiCallbackInterfaceStorageMethod26
15926
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26
16236
+ static UniffiCallbackInterfaceStorageMethod28
16237
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod28
15927
16238
  jsi::Runtime &rt,
15928
16239
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
15929
16240
  const jsi::Value &value) {
@@ -15970,12 +16281,12 @@ static void cleanup() {
15970
16281
  // out, then the pointer will no longer be left dangling.
15971
16282
  rsLambda = nullptr;
15972
16283
  }
15973
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod26
16284
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod28
15974
16285
  // Implementation of callback function calling from Rust to JS
15975
- // CallbackInterfaceStorageMethod27
16286
+ // CallbackInterfaceStorageMethod29
15976
16287
 
15977
16288
  // Callback function:
15978
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod27::UniffiCallbackInterfaceStorageMethod27
16289
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod29::UniffiCallbackInterfaceStorageMethod29
15979
16290
  //
15980
16291
  // We have the following constraints:
15981
16292
  // - we need to pass a function pointer to Rust.
@@ -15988,7 +16299,7 @@ static void cleanup() {
15988
16299
  //
15989
16300
  // We then give the `callback` function pointer to Rust which will call the
15990
16301
  // lambda sometime in the future.
15991
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod27 {
16302
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod29 {
15992
16303
  using namespace facebook;
15993
16304
 
15994
16305
  // We need to store a lambda in a global so we can call it from
@@ -16035,7 +16346,7 @@ static void body(jsi::Runtime &rt,
16035
16346
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
16036
16347
  rt, callInvoker, uniffiResult);
16037
16348
  } catch (const jsi::JSError &error) {
16038
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod27: "
16349
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod29: "
16039
16350
  << error.what() << std::endl;
16040
16351
  throw error;
16041
16352
  }
@@ -16065,8 +16376,8 @@ callback(uint64_t rs_uniffiHandle, uint32_t rs_limit,
16065
16376
  rs_uniffiCallbackData, rs_uniffiOutReturn);
16066
16377
  }
16067
16378
 
16068
- static UniffiCallbackInterfaceStorageMethod27
16069
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod27
16379
+ static UniffiCallbackInterfaceStorageMethod29
16380
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod29
16070
16381
  jsi::Runtime &rt,
16071
16382
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
16072
16383
  const jsi::Value &value) {
@@ -16113,12 +16424,12 @@ static void cleanup() {
16113
16424
  // out, then the pointer will no longer be left dangling.
16114
16425
  rsLambda = nullptr;
16115
16426
  }
16116
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod27
16427
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod29
16117
16428
  // Implementation of callback function calling from Rust to JS
16118
- // CallbackInterfaceStorageMethod28
16429
+ // CallbackInterfaceStorageMethod30
16119
16430
 
16120
16431
  // Callback function:
16121
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod28::UniffiCallbackInterfaceStorageMethod28
16432
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod30::UniffiCallbackInterfaceStorageMethod30
16122
16433
  //
16123
16434
  // We have the following constraints:
16124
16435
  // - we need to pass a function pointer to Rust.
@@ -16131,7 +16442,7 @@ static void cleanup() {
16131
16442
  //
16132
16443
  // We then give the `callback` function pointer to Rust which will call the
16133
16444
  // lambda sometime in the future.
16134
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod28 {
16445
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod30 {
16135
16446
  using namespace facebook;
16136
16447
 
16137
16448
  // We need to store a lambda in a global so we can call it from
@@ -16175,7 +16486,7 @@ static void body(jsi::Runtime &rt,
16175
16486
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
16176
16487
  rt, callInvoker, uniffiResult);
16177
16488
  } catch (const jsi::JSError &error) {
16178
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod28: "
16489
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod30: "
16179
16490
  << error.what() << std::endl;
16180
16491
  throw error;
16181
16492
  }
@@ -16205,8 +16516,8 @@ callback(uint64_t rs_uniffiHandle,
16205
16516
  rs_uniffiOutReturn);
16206
16517
  }
16207
16518
 
16208
- static UniffiCallbackInterfaceStorageMethod28
16209
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod28
16519
+ static UniffiCallbackInterfaceStorageMethod30
16520
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod30
16210
16521
  jsi::Runtime &rt,
16211
16522
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
16212
16523
  const jsi::Value &value) {
@@ -16252,12 +16563,12 @@ static void cleanup() {
16252
16563
  // out, then the pointer will no longer be left dangling.
16253
16564
  rsLambda = nullptr;
16254
16565
  }
16255
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod28
16566
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod30
16256
16567
  // Implementation of callback function calling from Rust to JS
16257
- // CallbackInterfaceStorageMethod29
16568
+ // CallbackInterfaceStorageMethod31
16258
16569
 
16259
16570
  // Callback function:
16260
- // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod29::UniffiCallbackInterfaceStorageMethod29
16571
+ // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod31::UniffiCallbackInterfaceStorageMethod31
16261
16572
  //
16262
16573
  // We have the following constraints:
16263
16574
  // - we need to pass a function pointer to Rust.
@@ -16270,7 +16581,7 @@ static void cleanup() {
16270
16581
  //
16271
16582
  // We then give the `callback` function pointer to Rust which will call the
16272
16583
  // lambda sometime in the future.
16273
- namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod29 {
16584
+ namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod31 {
16274
16585
  using namespace facebook;
16275
16586
 
16276
16587
  // We need to store a lambda in a global so we can call it from
@@ -16316,7 +16627,7 @@ static void body(jsi::Runtime &rt,
16316
16627
  uniffi::breez_sdk_spark::Bridging<UniffiForeignFuture>::fromJs(
16317
16628
  rt, callInvoker, uniffiResult);
16318
16629
  } catch (const jsi::JSError &error) {
16319
- std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod29: "
16630
+ std::cout << "Error in callback UniffiCallbackInterfaceStorageMethod31: "
16320
16631
  << error.what() << std::endl;
16321
16632
  throw error;
16322
16633
  }
@@ -16345,8 +16656,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_record,
16345
16656
  rs_uniffiCallbackData, rs_uniffiOutReturn);
16346
16657
  }
16347
16658
 
16348
- static UniffiCallbackInterfaceStorageMethod29
16349
- makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod29
16659
+ static UniffiCallbackInterfaceStorageMethod31
16660
+ makeCallbackFunction( // uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod31
16350
16661
  jsi::Runtime &rt,
16351
16662
  std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
16352
16663
  const jsi::Value &value) {
@@ -16393,7 +16704,7 @@ static void cleanup() {
16393
16704
  // out, then the pointer will no longer be left dangling.
16394
16705
  rsLambda = nullptr;
16395
16706
  }
16396
- } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod29
16707
+ } // namespace uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod31
16397
16708
  // Implementation of callback function calling from Rust to JS
16398
16709
  // CallbackInterfaceStorageBackendMethod0
16399
16710
 
@@ -17152,59 +17463,67 @@ template <> struct Bridging<UniffiVTableCallbackInterfaceStorage> {
17152
17463
  rsObject.update_deposit = uniffi::breez_sdk_spark::cb::
17153
17464
  callbackinterfacestoragemethod12::makeCallbackFunction(
17154
17465
  rt, callInvoker, jsObject.getProperty(rt, "updateDeposit"));
17155
- rsObject.set_lnurl_metadata = uniffi::breez_sdk_spark::cb::
17466
+ rsObject.list_watched_deposit_addresses = uniffi::breez_sdk_spark::cb::
17156
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(
17157
17476
  rt, callInvoker, jsObject.getProperty(rt, "setLnurlMetadata"));
17158
17477
  rsObject.list_contacts = uniffi::breez_sdk_spark::cb::
17159
- callbackinterfacestoragemethod14::makeCallbackFunction(
17478
+ callbackinterfacestoragemethod16::makeCallbackFunction(
17160
17479
  rt, callInvoker, jsObject.getProperty(rt, "listContacts"));
17161
17480
  rsObject.get_contact = uniffi::breez_sdk_spark::cb::
17162
- callbackinterfacestoragemethod15::makeCallbackFunction(
17481
+ callbackinterfacestoragemethod17::makeCallbackFunction(
17163
17482
  rt, callInvoker, jsObject.getProperty(rt, "getContact"));
17164
17483
  rsObject.insert_contact = uniffi::breez_sdk_spark::cb::
17165
- callbackinterfacestoragemethod16::makeCallbackFunction(
17484
+ callbackinterfacestoragemethod18::makeCallbackFunction(
17166
17485
  rt, callInvoker, jsObject.getProperty(rt, "insertContact"));
17167
17486
  rsObject.delete_contact = uniffi::breez_sdk_spark::cb::
17168
- callbackinterfacestoragemethod17::makeCallbackFunction(
17487
+ callbackinterfacestoragemethod19::makeCallbackFunction(
17169
17488
  rt, callInvoker, jsObject.getProperty(rt, "deleteContact"));
17170
17489
  rsObject.set_cross_chain_swap = uniffi::breez_sdk_spark::cb::
17171
- callbackinterfacestoragemethod18::makeCallbackFunction(
17490
+ callbackinterfacestoragemethod20::makeCallbackFunction(
17172
17491
  rt, callInvoker, jsObject.getProperty(rt, "setCrossChainSwap"));
17173
17492
  rsObject.get_cross_chain_swap = uniffi::breez_sdk_spark::cb::
17174
- callbackinterfacestoragemethod19::makeCallbackFunction(
17493
+ callbackinterfacestoragemethod21::makeCallbackFunction(
17175
17494
  rt, callInvoker, jsObject.getProperty(rt, "getCrossChainSwap"));
17176
17495
  rsObject.list_active_cross_chain_swaps = uniffi::breez_sdk_spark::cb::
17177
- callbackinterfacestoragemethod20::makeCallbackFunction(
17496
+ callbackinterfacestoragemethod22::makeCallbackFunction(
17178
17497
  rt, callInvoker,
17179
17498
  jsObject.getProperty(rt, "listActiveCrossChainSwaps"));
17180
17499
  rsObject.add_outgoing_change = uniffi::breez_sdk_spark::cb::
17181
- callbackinterfacestoragemethod21::makeCallbackFunction(
17500
+ callbackinterfacestoragemethod23::makeCallbackFunction(
17182
17501
  rt, callInvoker, jsObject.getProperty(rt, "addOutgoingChange"));
17183
17502
  rsObject.complete_outgoing_sync = uniffi::breez_sdk_spark::cb::
17184
- callbackinterfacestoragemethod22::makeCallbackFunction(
17503
+ callbackinterfacestoragemethod24::makeCallbackFunction(
17185
17504
  rt, callInvoker, jsObject.getProperty(rt, "completeOutgoingSync"));
17186
17505
  rsObject.get_pending_outgoing_changes = uniffi::breez_sdk_spark::cb::
17187
- callbackinterfacestoragemethod23::makeCallbackFunction(
17506
+ callbackinterfacestoragemethod25::makeCallbackFunction(
17188
17507
  rt, callInvoker,
17189
17508
  jsObject.getProperty(rt, "getPendingOutgoingChanges"));
17190
17509
  rsObject.get_last_revision = uniffi::breez_sdk_spark::cb::
17191
- callbackinterfacestoragemethod24::makeCallbackFunction(
17510
+ callbackinterfacestoragemethod26::makeCallbackFunction(
17192
17511
  rt, callInvoker, jsObject.getProperty(rt, "getLastRevision"));
17193
17512
  rsObject.insert_incoming_records = uniffi::breez_sdk_spark::cb::
17194
- callbackinterfacestoragemethod25::makeCallbackFunction(
17513
+ callbackinterfacestoragemethod27::makeCallbackFunction(
17195
17514
  rt, callInvoker, jsObject.getProperty(rt, "insertIncomingRecords"));
17196
17515
  rsObject.delete_incoming_record = uniffi::breez_sdk_spark::cb::
17197
- callbackinterfacestoragemethod26::makeCallbackFunction(
17516
+ callbackinterfacestoragemethod28::makeCallbackFunction(
17198
17517
  rt, callInvoker, jsObject.getProperty(rt, "deleteIncomingRecord"));
17199
17518
  rsObject.get_incoming_records = uniffi::breez_sdk_spark::cb::
17200
- callbackinterfacestoragemethod27::makeCallbackFunction(
17519
+ callbackinterfacestoragemethod29::makeCallbackFunction(
17201
17520
  rt, callInvoker, jsObject.getProperty(rt, "getIncomingRecords"));
17202
17521
  rsObject.get_latest_outgoing_change = uniffi::breez_sdk_spark::cb::
17203
- callbackinterfacestoragemethod28::makeCallbackFunction(
17522
+ callbackinterfacestoragemethod30::makeCallbackFunction(
17204
17523
  rt, callInvoker,
17205
17524
  jsObject.getProperty(rt, "getLatestOutgoingChange"));
17206
17525
  rsObject.update_record_from_incoming = uniffi::breez_sdk_spark::cb::
17207
- callbackinterfacestoragemethod29::makeCallbackFunction(
17526
+ callbackinterfacestoragemethod31::makeCallbackFunction(
17208
17527
  rt, callInvoker,
17209
17528
  jsObject.getProperty(rt, "updateRecordFromIncoming"));
17210
17529
  rsObject.uniffi_free =
@@ -17577,6 +17896,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
17577
17896
  ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_check_message(
17578
17897
  rt, thisVal, args, count);
17579
17898
  });
17899
+ props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_check_unilateral_"
17900
+ "exit"] = jsi::Function::createFromHostFunction(
17901
+ rt,
17902
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_fn_method_"
17903
+ "breezsdk_check_unilateral_exit"),
17904
+ 2,
17905
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
17906
+ const jsi::Value *args, size_t count) -> jsi::Value {
17907
+ return this
17908
+ ->cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_check_unilateral_exit(
17909
+ rt, thisVal, args, count);
17910
+ });
17580
17911
  props["ubrn_uniffi_breez_sdk_spark_fn_method_breezsdk_claim_deposit"] =
17581
17912
  jsi::Function::createFromHostFunction(
17582
17913
  rt,
@@ -19613,6 +19944,30 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
19613
19944
  ->cpp_uniffi_breez_sdk_spark_fn_method_storage_update_deposit(
19614
19945
  rt, thisVal, args, count);
19615
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
+ });
19616
19971
  props["ubrn_uniffi_breez_sdk_spark_fn_method_storage_set_lnurl_metadata"] =
19617
19972
  jsi::Function::createFromHostFunction(
19618
19973
  rt,
@@ -21149,6 +21504,18 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
21149
21504
  ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_check_message(
21150
21505
  rt, thisVal, args, count);
21151
21506
  });
21507
+ props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_check_unilateral_"
21508
+ "exit"] = jsi::Function::createFromHostFunction(
21509
+ rt,
21510
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_breez_sdk_spark_checksum_"
21511
+ "method_breezsdk_check_unilateral_exit"),
21512
+ 0,
21513
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
21514
+ const jsi::Value *args, size_t count) -> jsi::Value {
21515
+ return this
21516
+ ->cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_check_unilateral_exit(
21517
+ rt, thisVal, args, count);
21518
+ });
21152
21519
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit"] =
21153
21520
  jsi::Function::createFromHostFunction(
21154
21521
  rt,
@@ -22672,6 +23039,32 @@ NativeBreezSdkSpark::NativeBreezSdkSpark(
22672
23039
  ->cpp_uniffi_breez_sdk_spark_checksum_method_storage_update_deposit(
22673
23040
  rt, thisVal, args, count);
22674
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
+ });
22675
23068
  props["ubrn_uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_"
22676
23069
  "metadata"] = jsi::Function::createFromHostFunction(
22677
23070
  rt,
@@ -23570,6 +23963,10 @@ NativeBreezSdkSpark::~NativeBreezSdkSpark() {
23570
23963
  uniffi::breez_sdk_spark::cb::callbackinterfacestoragemethod28::cleanup();
23571
23964
  // Cleanup for callback function CallbackInterfaceStorageMethod29
23572
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();
23573
23970
  // Cleanup for callback function CallbackInterfaceStorageBackendMethod0
23574
23971
  uniffi::breez_sdk_spark::cb::callbackinterfacestoragebackendmethod0::
23575
23972
  cleanup();
@@ -24179,6 +24576,18 @@ jsi::Value NativeBreezSdkSpark::
24179
24576
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
24180
24577
  value);
24181
24578
  }
24579
+ jsi::Value NativeBreezSdkSpark::
24580
+ cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_check_unilateral_exit(
24581
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
24582
+ size_t count) {
24583
+ auto value = uniffi_breez_sdk_spark_fn_method_breezsdk_check_unilateral_exit(
24584
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
24585
+ uniffi::breez_sdk_spark::Bridging<RustBuffer>::fromJs(rt, callInvoker,
24586
+ args[1]));
24587
+
24588
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
24589
+ value);
24590
+ }
24182
24591
  jsi::Value NativeBreezSdkSpark::
24183
24592
  cpp_uniffi_breez_sdk_spark_fn_method_breezsdk_claim_deposit(
24184
24593
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -26310,6 +26719,32 @@ jsi::Value NativeBreezSdkSpark::
26310
26719
  return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
26311
26720
  value);
26312
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
+ }
26313
26748
  jsi::Value NativeBreezSdkSpark::
26314
26749
  cpp_uniffi_breez_sdk_spark_fn_method_storage_set_lnurl_metadata(
26315
26750
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -27812,6 +28247,15 @@ jsi::Value NativeBreezSdkSpark::
27812
28247
 
27813
28248
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
27814
28249
  }
28250
+ jsi::Value NativeBreezSdkSpark::
28251
+ cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_check_unilateral_exit(
28252
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
28253
+ size_t count) {
28254
+ auto value =
28255
+ uniffi_breez_sdk_spark_checksum_method_breezsdk_check_unilateral_exit();
28256
+
28257
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
28258
+ }
27815
28259
  jsi::Value NativeBreezSdkSpark::
27816
28260
  cpp_uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit(
27817
28261
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
@@ -28893,6 +29337,24 @@ jsi::Value NativeBreezSdkSpark::
28893
29337
 
28894
29338
  return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
28895
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
+ }
28896
29358
  jsi::Value NativeBreezSdkSpark::
28897
29359
  cpp_uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_metadata(
28898
29360
  jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,