breez-sdk-spark 0.2.4__cp310-cp310-manylinux_2_31_x86_64.whl → 0.2.5.dev2__cp310-cp310-manylinux_2_31_x86_64.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.
@@ -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")
@@ -563,7 +563,7 @@ def _uniffi_check_api_checksums(lib):
563
563
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
564
564
  if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_fiat_service() != 41113:
565
565
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
566
- if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set() != 55523:
566
+ if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set() != 42926:
567
567
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
568
568
  if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client() != 61720:
569
569
  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),
@@ -972,6 +968,7 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set.argtypes = (
972
968
  ctypes.c_void_p,
973
969
  _UniffiRustBuffer,
974
970
  ctypes.c_int8,
971
+ _UniffiRustBuffer,
975
972
  )
976
973
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set.restype = ctypes.c_uint64
977
974
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_lnurl_client.argtypes = (
@@ -2127,8 +2124,7 @@ class BreezSdk:
2127
2124
  inst._pointer = pointer
2128
2125
  return inst
2129
2126
 
2130
-
2131
- def add_event_listener(self, listener: "EventListener") -> "str":
2127
+ async def add_event_listener(self, listener: "EventListener") -> "str":
2132
2128
  """
2133
2129
  Registers a listener to receive SDK events
2134
2130
 
@@ -2143,11 +2139,22 @@ class BreezSdk:
2143
2139
 
2144
2140
  _UniffiConverterTypeEventListener.check_lower(listener)
2145
2141
 
2146
- return _UniffiConverterString.lift(
2147
- _uniffi_rust_call(_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener,self._uniffi_clone_pointer(),
2148
- _UniffiConverterTypeEventListener.lower(listener))
2149
- )
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
2150
2154
 
2155
+ None,
2156
+
2157
+ )
2151
2158
 
2152
2159
 
2153
2160
 
@@ -2562,8 +2569,7 @@ _UniffiConverterTypeSdkError,
2562
2569
 
2563
2570
 
2564
2571
 
2565
-
2566
- def remove_event_listener(self, id: "str") -> "bool":
2572
+ async def remove_event_listener(self, id: "str") -> "bool":
2567
2573
  """
2568
2574
  Removes a previously registered event listener
2569
2575
 
@@ -2578,11 +2584,22 @@ _UniffiConverterTypeSdkError,
2578
2584
 
2579
2585
  _UniffiConverterString.check_lower(id)
2580
2586
 
2581
- return _UniffiConverterBool.lift(
2582
- _uniffi_rust_call(_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener,self._uniffi_clone_pointer(),
2583
- _UniffiConverterString.lower(id))
2584
- )
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
2585
2599
 
2600
+ None,
2601
+
2602
+ )
2586
2603
 
2587
2604
 
2588
2605
 
@@ -2631,19 +2648,28 @@ _UniffiConverterTypeSdkError,
2631
2648
 
2632
2649
 
2633
2650
 
2634
-
2635
- def sync_wallet(self, request: "SyncWalletRequest") -> "SyncWalletResponse":
2651
+ async def sync_wallet(self, request: "SyncWalletRequest") -> "SyncWalletResponse":
2636
2652
  """
2637
2653
  Synchronizes the wallet with the Spark network
2638
2654
  """
2639
2655
 
2640
2656
  _UniffiConverterTypeSyncWalletRequest.check_lower(request)
2641
2657
 
2642
- return _UniffiConverterTypeSyncWalletResponse.lift(
2643
- _uniffi_rust_call_with_error(_UniffiConverterTypeSdkError,_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet,self._uniffi_clone_pointer(),
2644
- _UniffiConverterTypeSyncWalletRequest.lower(request))
2645
- )
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,
2646
2671
 
2672
+ )
2647
2673
 
2648
2674
 
2649
2675
 
@@ -2706,7 +2732,7 @@ class SdkBuilderProtocol(typing.Protocol):
2706
2732
  """
2707
2733
 
2708
2734
  raise NotImplementedError
2709
- def with_key_set(self, key_set_type: "KeySetType",use_address_index: "bool"):
2735
+ def with_key_set(self, key_set_type: "KeySetType",use_address_index: "bool",account_number: "typing.Optional[int]"):
2710
2736
  """
2711
2737
  Sets the key set type to be used by the SDK.
2712
2738
  Arguments:
@@ -2854,7 +2880,7 @@ _UniffiConverterTypeSdkError,
2854
2880
 
2855
2881
 
2856
2882
 
2857
- async def with_key_set(self, key_set_type: "KeySetType",use_address_index: "bool") -> None:
2883
+ async def with_key_set(self, key_set_type: "KeySetType",use_address_index: "bool",account_number: "typing.Optional[int]") -> None:
2858
2884
 
2859
2885
  """
2860
2886
  Sets the key set type to be used by the SDK.
@@ -2867,11 +2893,14 @@ _UniffiConverterTypeSdkError,
2867
2893
 
2868
2894
  _UniffiConverterBool.check_lower(use_address_index)
2869
2895
 
2896
+ _UniffiConverterOptionalUInt32.check_lower(account_number)
2897
+
2870
2898
  return await _uniffi_rust_call_async(
2871
2899
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set(
2872
2900
  self._uniffi_clone_pointer(),
2873
2901
  _UniffiConverterTypeKeySetType.lower(key_set_type),
2874
- _UniffiConverterBool.lower(use_address_index)
2902
+ _UniffiConverterBool.lower(use_address_index),
2903
+ _UniffiConverterOptionalUInt32.lower(account_number)
2875
2904
  ),
2876
2905
  _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_void,
2877
2906
  _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_void,
@@ -4239,26 +4268,32 @@ class GetInfoRequest:
4239
4268
  Request to get the balance of the wallet
4240
4269
  """
4241
4270
 
4271
+ ensure_synced: "typing.Optional[bool]"
4272
+ def __init__(self, *, ensure_synced: "typing.Optional[bool]"):
4273
+ self.ensure_synced = ensure_synced
4242
4274
 
4243
4275
  def __str__(self):
4244
- return "GetInfoRequest()".format()
4276
+ return "GetInfoRequest(ensure_synced={})".format(self.ensure_synced)
4245
4277
 
4246
4278
  def __eq__(self, other):
4279
+ if self.ensure_synced != other.ensure_synced:
4280
+ return False
4247
4281
  return True
4248
4282
 
4249
4283
  class _UniffiConverterTypeGetInfoRequest(_UniffiConverterRustBuffer):
4250
4284
  @staticmethod
4251
4285
  def read(buf):
4252
4286
  return GetInfoRequest(
4287
+ ensure_synced=_UniffiConverterOptionalBool.read(buf),
4253
4288
  )
4254
4289
 
4255
4290
  @staticmethod
4256
4291
  def check_lower(value):
4257
- pass
4292
+ _UniffiConverterOptionalBool.check_lower(value.ensure_synced)
4258
4293
 
4259
4294
  @staticmethod
4260
4295
  def write(value, buf):
4261
- pass
4296
+ _UniffiConverterOptionalBool.write(value.ensure_synced, buf)
4262
4297
 
4263
4298
 
4264
4299
  class GetInfoResponse:
@@ -7750,8 +7785,9 @@ class _UniffiTraitImplEventListener:
7750
7785
  def on_event(
7751
7786
  uniffi_handle,
7752
7787
  event,
7788
+ uniffi_future_callback,
7789
+ uniffi_callback_data,
7753
7790
  uniffi_out_return,
7754
- uniffi_call_status_ptr,
7755
7791
  ):
7756
7792
  uniffi_obj = _UniffiConverterTypeEventListener._handle_map.get(uniffi_handle)
7757
7793
  def make_call():
@@ -7760,12 +7796,22 @@ class _UniffiTraitImplEventListener:
7760
7796
  return method(*args)
7761
7797
 
7762
7798
 
7763
- write_return_value = lambda v: None
7764
- _uniffi_trait_interface_call(
7765
- uniffi_call_status_ptr.contents,
7766
- make_call,
7767
- write_return_value,
7768
- )
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)
7769
7815
 
7770
7816
  @_UNIFFI_CALLBACK_INTERFACE_FREE
7771
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.4
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.so,sha256=72d9BW-PEWPPkiAeW2rBmpJozkT4ql2WIeB6WC_d5Vw,25058640
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=jLv5-5hrJ068pYxltNCiq8acHXkgec5FC-0ihkw0gug,114
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=XJLvgZMRBSCXYuq2lraSoTtGf_CjAi17wpb3B-Ix6cM,310319
4
- breez_sdk_spark/breez_sdk_spark_bindings.py,sha256=ysAJqyrIhXUjJIBj856CADqim5MR38CgNEIdG1Fj4qg,32901
5
- breez_sdk_spark/libbreez_sdk_spark_bindings.so,sha256=ZEk2_q2YjUwXzUaC6_ZdrDFoKL2RL5mraC_yu7vC1t4,24997216
6
- breez_sdk_spark-0.2.4.dist-info/METADATA,sha256=ZmhfY4Vy6s5JUzMBXY_NyplWVjkJpPTPByl0PwK21Sc,421
7
- breez_sdk_spark-0.2.4.dist-info/WHEEL,sha256=jLv5-5hrJ068pYxltNCiq8acHXkgec5FC-0ihkw0gug,114
8
- breez_sdk_spark-0.2.4.dist-info/top_level.txt,sha256=EWjZB7jCSH5bjyOrFhpRFW4Jfo8ykKdxJ7tqAOytwDU,16
9
- breez_sdk_spark-0.2.4.dist-info/RECORD,,