breez-sdk-spark 0.2.5.dev1__cp311-cp311-macosx_11_0_universal2.whl → 0.2.5.dev2__cp311-cp311-macosx_11_0_universal2.whl

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.

Potentially problematic release.


This version of breez-sdk-spark might be problematic. Click here for more details.

@@ -509,7 +509,7 @@ def _uniffi_check_api_checksums(lib):
509
509
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
510
510
  if lib.uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction() != 65179:
511
511
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
512
- if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener() != 61844:
512
+ if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener() != 37737:
513
513
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
514
514
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_check_lightning_address_available() != 31624:
515
515
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
@@ -549,13 +549,13 @@ def _uniffi_check_api_checksums(lib):
549
549
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
550
550
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_register_lightning_address() != 530:
551
551
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
552
- if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener() != 60980:
552
+ if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener() != 41066:
553
553
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
554
554
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment() != 54349:
555
555
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
556
556
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_internal() != 37855:
557
557
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
558
- if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet() != 36066:
558
+ if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet() != 30368:
559
559
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
560
560
  if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build() != 8126:
561
561
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
@@ -593,7 +593,7 @@ def _uniffi_check_api_checksums(lib):
593
593
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
594
594
  if lib.uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new() != 53882:
595
595
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
596
- if lib.uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event() != 10824:
596
+ if lib.uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event() != 24807:
597
597
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
598
598
  if lib.uniffi_breez_sdk_spark_checksum_method_logger_log() != 11839:
599
599
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
@@ -703,8 +703,7 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure):
703
703
  ]
704
704
  _UNIFFI_FOREIGN_FUTURE_COMPLETE_VOID = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureStructVoid,
705
705
  )
706
- _UNIFFI_CALLBACK_INTERFACE_EVENT_LISTENER_METHOD0 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,ctypes.c_void_p,
707
- ctypes.POINTER(_UniffiRustCallStatus),
706
+ _UNIFFI_CALLBACK_INTERFACE_EVENT_LISTENER_METHOD0 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_VOID,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
708
707
  )
709
708
  _UNIFFI_CALLBACK_INTERFACE_LOGGER_METHOD0 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,ctypes.c_void_p,
710
709
  ctypes.POINTER(_UniffiRustCallStatus),
@@ -819,9 +818,8 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_free_breezsdk.restype = None
819
818
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener.argtypes = (
820
819
  ctypes.c_void_p,
821
820
  ctypes.c_uint64,
822
- ctypes.POINTER(_UniffiRustCallStatus),
823
821
  )
824
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener.restype = _UniffiRustBuffer
822
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener.restype = ctypes.c_uint64
825
823
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_check_lightning_address_available.argtypes = (
826
824
  ctypes.c_void_p,
827
825
  _UniffiRustBuffer,
@@ -917,9 +915,8 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_register_lightning_address.
917
915
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener.argtypes = (
918
916
  ctypes.c_void_p,
919
917
  _UniffiRustBuffer,
920
- ctypes.POINTER(_UniffiRustCallStatus),
921
918
  )
922
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener.restype = ctypes.c_int8
919
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener.restype = ctypes.c_uint64
923
920
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment.argtypes = (
924
921
  ctypes.c_void_p,
925
922
  _UniffiRustBuffer,
@@ -934,9 +931,8 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment_internal.resty
934
931
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet.argtypes = (
935
932
  ctypes.c_void_p,
936
933
  _UniffiRustBuffer,
937
- ctypes.POINTER(_UniffiRustCallStatus),
938
934
  )
939
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet.restype = _UniffiRustBuffer
935
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet.restype = ctypes.c_uint64
940
936
  _UniffiLib.uniffi_breez_sdk_spark_fn_clone_sdkbuilder.argtypes = (
941
937
  ctypes.c_void_p,
942
938
  ctypes.POINTER(_UniffiRustCallStatus),
@@ -2128,8 +2124,7 @@ class BreezSdk:
2128
2124
  inst._pointer = pointer
2129
2125
  return inst
2130
2126
 
2131
-
2132
- def add_event_listener(self, listener: "EventListener") -> "str":
2127
+ async def add_event_listener(self, listener: "EventListener") -> "str":
2133
2128
  """
2134
2129
  Registers a listener to receive SDK events
2135
2130
 
@@ -2144,11 +2139,22 @@ class BreezSdk:
2144
2139
 
2145
2140
  _UniffiConverterTypeEventListener.check_lower(listener)
2146
2141
 
2147
- return _UniffiConverterString.lift(
2148
- _uniffi_rust_call(_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener,self._uniffi_clone_pointer(),
2149
- _UniffiConverterTypeEventListener.lower(listener))
2150
- )
2142
+ return await _uniffi_rust_call_async(
2143
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener(
2144
+ self._uniffi_clone_pointer(),
2145
+ _UniffiConverterTypeEventListener.lower(listener)
2146
+ ),
2147
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
2148
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
2149
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
2150
+ # lift function
2151
+ _UniffiConverterString.lift,
2152
+
2153
+ # Error FFI converter
2154
+
2155
+ None,
2151
2156
 
2157
+ )
2152
2158
 
2153
2159
 
2154
2160
 
@@ -2563,8 +2569,7 @@ _UniffiConverterTypeSdkError,
2563
2569
 
2564
2570
 
2565
2571
 
2566
-
2567
- def remove_event_listener(self, id: "str") -> "bool":
2572
+ async def remove_event_listener(self, id: "str") -> "bool":
2568
2573
  """
2569
2574
  Removes a previously registered event listener
2570
2575
 
@@ -2579,11 +2584,22 @@ _UniffiConverterTypeSdkError,
2579
2584
 
2580
2585
  _UniffiConverterString.check_lower(id)
2581
2586
 
2582
- return _UniffiConverterBool.lift(
2583
- _uniffi_rust_call(_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener,self._uniffi_clone_pointer(),
2584
- _UniffiConverterString.lower(id))
2585
- )
2587
+ return await _uniffi_rust_call_async(
2588
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener(
2589
+ self._uniffi_clone_pointer(),
2590
+ _UniffiConverterString.lower(id)
2591
+ ),
2592
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_i8,
2593
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_i8,
2594
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_free_i8,
2595
+ # lift function
2596
+ _UniffiConverterBool.lift,
2597
+
2598
+ # Error FFI converter
2586
2599
 
2600
+ None,
2601
+
2602
+ )
2587
2603
 
2588
2604
 
2589
2605
 
@@ -2632,19 +2648,28 @@ _UniffiConverterTypeSdkError,
2632
2648
 
2633
2649
 
2634
2650
 
2635
-
2636
- def sync_wallet(self, request: "SyncWalletRequest") -> "SyncWalletResponse":
2651
+ async def sync_wallet(self, request: "SyncWalletRequest") -> "SyncWalletResponse":
2637
2652
  """
2638
2653
  Synchronizes the wallet with the Spark network
2639
2654
  """
2640
2655
 
2641
2656
  _UniffiConverterTypeSyncWalletRequest.check_lower(request)
2642
2657
 
2643
- return _UniffiConverterTypeSyncWalletResponse.lift(
2644
- _uniffi_rust_call_with_error(_UniffiConverterTypeSdkError,_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet,self._uniffi_clone_pointer(),
2645
- _UniffiConverterTypeSyncWalletRequest.lower(request))
2646
- )
2658
+ return await _uniffi_rust_call_async(
2659
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
2660
+ self._uniffi_clone_pointer(),
2661
+ _UniffiConverterTypeSyncWalletRequest.lower(request)
2662
+ ),
2663
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
2664
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
2665
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
2666
+ # lift function
2667
+ _UniffiConverterTypeSyncWalletResponse.lift,
2668
+
2669
+ # Error FFI converter
2670
+ _UniffiConverterTypeSdkError,
2647
2671
 
2672
+ )
2648
2673
 
2649
2674
 
2650
2675
 
@@ -4243,26 +4268,32 @@ class GetInfoRequest:
4243
4268
  Request to get the balance of the wallet
4244
4269
  """
4245
4270
 
4271
+ ensure_synced: "typing.Optional[bool]"
4272
+ def __init__(self, *, ensure_synced: "typing.Optional[bool]"):
4273
+ self.ensure_synced = ensure_synced
4246
4274
 
4247
4275
  def __str__(self):
4248
- return "GetInfoRequest()".format()
4276
+ return "GetInfoRequest(ensure_synced={})".format(self.ensure_synced)
4249
4277
 
4250
4278
  def __eq__(self, other):
4279
+ if self.ensure_synced != other.ensure_synced:
4280
+ return False
4251
4281
  return True
4252
4282
 
4253
4283
  class _UniffiConverterTypeGetInfoRequest(_UniffiConverterRustBuffer):
4254
4284
  @staticmethod
4255
4285
  def read(buf):
4256
4286
  return GetInfoRequest(
4287
+ ensure_synced=_UniffiConverterOptionalBool.read(buf),
4257
4288
  )
4258
4289
 
4259
4290
  @staticmethod
4260
4291
  def check_lower(value):
4261
- pass
4292
+ _UniffiConverterOptionalBool.check_lower(value.ensure_synced)
4262
4293
 
4263
4294
  @staticmethod
4264
4295
  def write(value, buf):
4265
- pass
4296
+ _UniffiConverterOptionalBool.write(value.ensure_synced, buf)
4266
4297
 
4267
4298
 
4268
4299
  class GetInfoResponse:
@@ -7754,8 +7785,9 @@ class _UniffiTraitImplEventListener:
7754
7785
  def on_event(
7755
7786
  uniffi_handle,
7756
7787
  event,
7788
+ uniffi_future_callback,
7789
+ uniffi_callback_data,
7757
7790
  uniffi_out_return,
7758
- uniffi_call_status_ptr,
7759
7791
  ):
7760
7792
  uniffi_obj = _UniffiConverterTypeEventListener._handle_map.get(uniffi_handle)
7761
7793
  def make_call():
@@ -7764,12 +7796,22 @@ class _UniffiTraitImplEventListener:
7764
7796
  return method(*args)
7765
7797
 
7766
7798
 
7767
- write_return_value = lambda v: None
7768
- _uniffi_trait_interface_call(
7769
- uniffi_call_status_ptr.contents,
7770
- make_call,
7771
- write_return_value,
7772
- )
7799
+ def handle_success(return_value):
7800
+ uniffi_future_callback(
7801
+ uniffi_callback_data,
7802
+ _UniffiForeignFutureStructVoid(
7803
+ _UniffiRustCallStatus.default()
7804
+ )
7805
+ )
7806
+
7807
+ def handle_error(status_code, rust_buffer):
7808
+ uniffi_future_callback(
7809
+ uniffi_callback_data,
7810
+ _UniffiForeignFutureStructVoid(
7811
+ _UniffiRustCallStatus(status_code, rust_buffer),
7812
+ )
7813
+ )
7814
+ uniffi_out_return[0] = _uniffi_trait_interface_call_async(make_call, handle_success, handle_error)
7773
7815
 
7774
7816
  @_UNIFFI_CALLBACK_INTERFACE_FREE
7775
7817
  def _uniffi_free(uniffi_handle):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: breez-sdk-spark
3
- Version: 0.2.5.dev1
3
+ Version: 0.2.5.dev2
4
4
  Summary: Python language bindings for the Breez Spark SDK
5
5
  Home-page: https://github.com/breez/spark-sdk
6
6
  Author: Breez <contact@breez.technology>
@@ -0,0 +1,9 @@
1
+ breez_sdk_spark/__init__.py,sha256=Rmo1pY5ISvxSNwDo_RBCneMCfoYDNbB_4A7VCmQmtEI,148
2
+ breez_sdk_spark/breez_sdk_common.py,sha256=cdFqiHbDKhnyftMiQRJ30XPHUoGVHDu1gAyeM4EMg_w,202759
3
+ breez_sdk_spark/breez_sdk_spark.py,sha256=zRsS7Tmrr54QhSri-rrnEtXe1R5edAPqrOYf0eRUuz4,312405
4
+ breez_sdk_spark/breez_sdk_spark_bindings.py,sha256=ysAJqyrIhXUjJIBj856CADqim5MR38CgNEIdG1Fj4qg,32901
5
+ breez_sdk_spark/libbreez_sdk_spark_bindings.dylib,sha256=S2Lk3nasKIgGykHR-TrHAic1F7VKVeeDGvfZHp1Kld0,32460128
6
+ breez_sdk_spark-0.2.5.dev2.dist-info/METADATA,sha256=wyWUx__28keSB5maW9TV73FqPA7t-v9EuonM4LcQRHw,426
7
+ breez_sdk_spark-0.2.5.dev2.dist-info/WHEEL,sha256=GawKr6JLD8GO3wjYxGh0WnO5HI6x5QNtg3ex_nGgOQ8,115
8
+ breez_sdk_spark-0.2.5.dev2.dist-info/top_level.txt,sha256=EWjZB7jCSH5bjyOrFhpRFW4Jfo8ykKdxJ7tqAOytwDU,16
9
+ breez_sdk_spark-0.2.5.dev2.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- breez_sdk_spark/__init__.py,sha256=Rmo1pY5ISvxSNwDo_RBCneMCfoYDNbB_4A7VCmQmtEI,148
2
- breez_sdk_spark/breez_sdk_common.py,sha256=cdFqiHbDKhnyftMiQRJ30XPHUoGVHDu1gAyeM4EMg_w,202759
3
- breez_sdk_spark/breez_sdk_spark.py,sha256=juA8i_IW7BdBnhmhdFERcYrRU4zUYsO7cKB-e9-TEd8,310558
4
- breez_sdk_spark/breez_sdk_spark_bindings.py,sha256=ysAJqyrIhXUjJIBj856CADqim5MR38CgNEIdG1Fj4qg,32901
5
- breez_sdk_spark/libbreez_sdk_spark_bindings.dylib,sha256=GyNCVkheyaTSTBZ3GfRs12dcqkjxYWUctzND9rG8pcs,32365184
6
- breez_sdk_spark-0.2.5.dev1.dist-info/METADATA,sha256=9H0mCSUU9VAP_g8VWfhxhHW4HdIq3MJBZYoe5eYNoQU,426
7
- breez_sdk_spark-0.2.5.dev1.dist-info/WHEEL,sha256=GawKr6JLD8GO3wjYxGh0WnO5HI6x5QNtg3ex_nGgOQ8,115
8
- breez_sdk_spark-0.2.5.dev1.dist-info/top_level.txt,sha256=EWjZB7jCSH5bjyOrFhpRFW4Jfo8ykKdxJ7tqAOytwDU,16
9
- breez_sdk_spark-0.2.5.dev1.dist-info/RECORD,,