breez-sdk-spark 0.2.5.dev1__cp39-cp39-win_amd64.whl → 0.2.6__cp39-cp39-win_amd64.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")
@@ -517,7 +517,7 @@ def _uniffi_check_api_checksums(lib):
517
517
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
518
518
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_address() != 44132:
519
519
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
520
- if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_disconnect() != 30986:
520
+ if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_disconnect() != 330:
521
521
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
522
522
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_info() != 6771:
523
523
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
@@ -549,13 +549,21 @@ 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
+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
554
+ if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_bitcoin_address() != 5926:
555
+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
556
+ if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_bolt11_invoice() != 21785:
553
557
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
554
558
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment() != 54349:
555
559
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
556
560
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_internal() != 37855:
557
561
  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:
562
+ if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_spark_address() != 63147:
563
+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
564
+ if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet() != 30368:
565
+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
566
+ if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment() != 64922:
559
567
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
560
568
  if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build() != 8126:
561
569
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
@@ -583,17 +591,19 @@ def _uniffi_check_api_checksums(lib):
583
591
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
584
592
  if lib.uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_id() != 35394:
585
593
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
586
- if lib.uniffi_breez_sdk_spark_checksum_method_storage_add_deposit() != 55082:
594
+ if lib.uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice() != 57075:
587
595
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
588
- if lib.uniffi_breez_sdk_spark_checksum_method_storage_delete_deposit() != 13111:
596
+ if lib.uniffi_breez_sdk_spark_checksum_method_storage_add_deposit() != 60240:
589
597
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
590
- if lib.uniffi_breez_sdk_spark_checksum_method_storage_list_deposits() != 22806:
598
+ if lib.uniffi_breez_sdk_spark_checksum_method_storage_delete_deposit() != 60586:
591
599
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
592
- if lib.uniffi_breez_sdk_spark_checksum_method_storage_update_deposit() != 48478:
600
+ if lib.uniffi_breez_sdk_spark_checksum_method_storage_list_deposits() != 54118:
601
+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
602
+ if lib.uniffi_breez_sdk_spark_checksum_method_storage_update_deposit() != 39803:
593
603
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
594
604
  if lib.uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new() != 53882:
595
605
  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:
606
+ if lib.uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event() != 24807:
597
607
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
598
608
  if lib.uniffi_breez_sdk_spark_checksum_method_logger_log() != 11839:
599
609
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
@@ -703,8 +713,7 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure):
703
713
  ]
704
714
  _UNIFFI_FOREIGN_FUTURE_COMPLETE_VOID = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureStructVoid,
705
715
  )
706
- _UNIFFI_CALLBACK_INTERFACE_EVENT_LISTENER_METHOD0 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,ctypes.c_void_p,
707
- ctypes.POINTER(_UniffiRustCallStatus),
716
+ _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
717
  )
709
718
  _UNIFFI_CALLBACK_INTERFACE_LOGGER_METHOD0 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,ctypes.c_void_p,
710
719
  ctypes.POINTER(_UniffiRustCallStatus),
@@ -731,13 +740,15 @@ _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD5 = ctypes.CFUNCTYPE(None,ctypes.c_uint
731
740
  )
732
741
  _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD6 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
733
742
  )
734
- _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD7 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,ctypes.c_uint32,ctypes.c_uint64,_UNIFFI_FOREIGN_FUTURE_COMPLETE_VOID,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
743
+ _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD7 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
744
+ )
745
+ _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD8 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,ctypes.c_uint32,ctypes.c_uint64,_UNIFFI_FOREIGN_FUTURE_COMPLETE_VOID,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
735
746
  )
736
- _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD8 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,ctypes.c_uint32,_UNIFFI_FOREIGN_FUTURE_COMPLETE_VOID,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
747
+ _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD9 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,ctypes.c_uint32,_UNIFFI_FOREIGN_FUTURE_COMPLETE_VOID,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
737
748
  )
738
- _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD9 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
749
+ _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD10 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
739
750
  )
740
- _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD10 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,ctypes.c_uint32,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_VOID,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
751
+ _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD11 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,ctypes.c_uint32,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_VOID,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
741
752
  )
742
753
  class _UniffiVTableCallbackInterfaceEventListener(ctypes.Structure):
743
754
  _fields_ = [
@@ -766,10 +777,11 @@ class _UniffiVTableCallbackInterfaceStorage(ctypes.Structure):
766
777
  ("insert_payment", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD4),
767
778
  ("set_payment_metadata", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD5),
768
779
  ("get_payment_by_id", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD6),
769
- ("add_deposit", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD7),
770
- ("delete_deposit", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD8),
771
- ("list_deposits", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD9),
772
- ("update_deposit", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD10),
780
+ ("get_payment_by_invoice", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD7),
781
+ ("add_deposit", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD8),
782
+ ("delete_deposit", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD9),
783
+ ("list_deposits", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD10),
784
+ ("update_deposit", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD11),
773
785
  ("uniffi_free", _UNIFFI_CALLBACK_INTERFACE_FREE),
774
786
  ]
775
787
  _UniffiLib.uniffi_breez_sdk_spark_fn_clone_bitcoinchainservice.argtypes = (
@@ -819,9 +831,8 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_free_breezsdk.restype = None
819
831
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener.argtypes = (
820
832
  ctypes.c_void_p,
821
833
  ctypes.c_uint64,
822
- ctypes.POINTER(_UniffiRustCallStatus),
823
834
  )
824
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener.restype = _UniffiRustBuffer
835
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener.restype = ctypes.c_uint64
825
836
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_check_lightning_address_available.argtypes = (
826
837
  ctypes.c_void_p,
827
838
  _UniffiRustBuffer,
@@ -838,9 +849,8 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_delete_lightning_address.ar
838
849
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_delete_lightning_address.restype = ctypes.c_uint64
839
850
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect.argtypes = (
840
851
  ctypes.c_void_p,
841
- ctypes.POINTER(_UniffiRustCallStatus),
842
852
  )
843
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect.restype = None
853
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect.restype = ctypes.c_uint64
844
854
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_get_info.argtypes = (
845
855
  ctypes.c_void_p,
846
856
  _UniffiRustBuffer,
@@ -917,9 +927,23 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_register_lightning_address.
917
927
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener.argtypes = (
918
928
  ctypes.c_void_p,
919
929
  _UniffiRustBuffer,
920
- ctypes.POINTER(_UniffiRustCallStatus),
921
930
  )
922
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener.restype = ctypes.c_int8
931
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener.restype = ctypes.c_uint64
932
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_bitcoin_address.argtypes = (
933
+ ctypes.c_void_p,
934
+ _UniffiRustBufferBitcoinAddressDetails,
935
+ _UniffiRustBuffer,
936
+ _UniffiRustBuffer,
937
+ )
938
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_bitcoin_address.restype = ctypes.c_uint64
939
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_bolt11_invoice.argtypes = (
940
+ ctypes.c_void_p,
941
+ _UniffiRustBufferBolt11InvoiceDetails,
942
+ _UniffiRustBuffer,
943
+ ctypes.c_uint64,
944
+ _UniffiRustBuffer,
945
+ )
946
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_bolt11_invoice.restype = ctypes.c_uint64
923
947
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment.argtypes = (
924
948
  ctypes.c_void_p,
925
949
  _UniffiRustBuffer,
@@ -931,12 +955,22 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment_internal.argty
931
955
  ctypes.c_int8,
932
956
  )
933
957
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment_internal.restype = ctypes.c_uint64
958
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_spark_address.argtypes = (
959
+ ctypes.c_void_p,
960
+ _UniffiRustBuffer,
961
+ _UniffiRustBuffer,
962
+ )
963
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_spark_address.restype = ctypes.c_uint64
934
964
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet.argtypes = (
935
965
  ctypes.c_void_p,
936
966
  _UniffiRustBuffer,
937
- ctypes.POINTER(_UniffiRustCallStatus),
938
967
  )
939
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet.restype = _UniffiRustBuffer
968
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet.restype = ctypes.c_uint64
969
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment.argtypes = (
970
+ ctypes.c_void_p,
971
+ _UniffiRustBuffer,
972
+ )
973
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment.restype = ctypes.c_uint64
940
974
  _UniffiLib.uniffi_breez_sdk_spark_fn_clone_sdkbuilder.argtypes = (
941
975
  ctypes.c_void_p,
942
976
  ctypes.POINTER(_UniffiRustCallStatus),
@@ -1038,6 +1072,11 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_id.argtypes =
1038
1072
  _UniffiRustBuffer,
1039
1073
  )
1040
1074
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_id.restype = ctypes.c_uint64
1075
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_invoice.argtypes = (
1076
+ ctypes.c_void_p,
1077
+ _UniffiRustBuffer,
1078
+ )
1079
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_invoice.restype = ctypes.c_uint64
1041
1080
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_add_deposit.argtypes = (
1042
1081
  ctypes.c_void_p,
1043
1082
  _UniffiRustBuffer,
@@ -1453,15 +1492,27 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_register_lightning_ad
1453
1492
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener.argtypes = (
1454
1493
  )
1455
1494
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener.restype = ctypes.c_uint16
1495
+ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_bitcoin_address.argtypes = (
1496
+ )
1497
+ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_bitcoin_address.restype = ctypes.c_uint16
1498
+ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_bolt11_invoice.argtypes = (
1499
+ )
1500
+ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_bolt11_invoice.restype = ctypes.c_uint16
1456
1501
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment.argtypes = (
1457
1502
  )
1458
1503
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment.restype = ctypes.c_uint16
1459
1504
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_internal.argtypes = (
1460
1505
  )
1461
1506
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_internal.restype = ctypes.c_uint16
1507
+ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_spark_address.argtypes = (
1508
+ )
1509
+ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_spark_address.restype = ctypes.c_uint16
1462
1510
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet.argtypes = (
1463
1511
  )
1464
1512
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet.restype = ctypes.c_uint16
1513
+ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment.argtypes = (
1514
+ )
1515
+ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment.restype = ctypes.c_uint16
1465
1516
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build.argtypes = (
1466
1517
  )
1467
1518
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build.restype = ctypes.c_uint16
@@ -1501,6 +1552,9 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_set_payment_metadata.r
1501
1552
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_id.argtypes = (
1502
1553
  )
1503
1554
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_id.restype = ctypes.c_uint16
1555
+ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice.argtypes = (
1556
+ )
1557
+ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice.restype = ctypes.c_uint16
1504
1558
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_add_deposit.argtypes = (
1505
1559
  )
1506
1560
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_add_deposit.restype = ctypes.c_uint16
@@ -2086,17 +2140,25 @@ class BreezSdkProtocol(typing.Protocol):
2086
2140
  `true` if the listener was found and removed, `false` otherwise
2087
2141
  """
2088
2142
 
2143
+ raise NotImplementedError
2144
+ def send_bitcoin_address(self, address: "BitcoinAddressDetails",fee_quote: "SendOnchainFeeQuote",request: "SendPaymentRequest"):
2145
+ raise NotImplementedError
2146
+ def send_bolt11_invoice(self, invoice_details: "Bolt11InvoiceDetails",spark_transfer_fee_sats: "typing.Optional[int]",lightning_fee_sats: "int",request: "SendPaymentRequest"):
2089
2147
  raise NotImplementedError
2090
2148
  def send_payment(self, request: "SendPaymentRequest"):
2091
2149
  raise NotImplementedError
2092
2150
  def send_payment_internal(self, request: "SendPaymentRequest",suppress_payment_event: "bool"):
2093
2151
  raise NotImplementedError
2152
+ def send_spark_address(self, address: "str",request: "SendPaymentRequest"):
2153
+ raise NotImplementedError
2094
2154
  def sync_wallet(self, request: "SyncWalletRequest"):
2095
2155
  """
2096
2156
  Synchronizes the wallet with the Spark network
2097
2157
  """
2098
2158
 
2099
2159
  raise NotImplementedError
2160
+ def wait_for_payment(self, request: "WaitForPaymentRequest"):
2161
+ raise NotImplementedError
2100
2162
 
2101
2163
 
2102
2164
  class BreezSdk:
@@ -2128,8 +2190,7 @@ class BreezSdk:
2128
2190
  inst._pointer = pointer
2129
2191
  return inst
2130
2192
 
2131
-
2132
- def add_event_listener(self, listener: "EventListener") -> "str":
2193
+ async def add_event_listener(self, listener: "EventListener") -> "str":
2133
2194
  """
2134
2195
  Registers a listener to receive SDK events
2135
2196
 
@@ -2144,11 +2205,22 @@ class BreezSdk:
2144
2205
 
2145
2206
  _UniffiConverterTypeEventListener.check_lower(listener)
2146
2207
 
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
- )
2208
+ return await _uniffi_rust_call_async(
2209
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_add_event_listener(
2210
+ self._uniffi_clone_pointer(),
2211
+ _UniffiConverterTypeEventListener.lower(listener)
2212
+ ),
2213
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
2214
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
2215
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
2216
+ # lift function
2217
+ _UniffiConverterString.lift,
2218
+
2219
+ # Error FFI converter
2220
+
2221
+ None,
2151
2222
 
2223
+ )
2152
2224
 
2153
2225
 
2154
2226
 
@@ -2214,8 +2286,8 @@ _UniffiConverterTypeSdkError,
2214
2286
 
2215
2287
 
2216
2288
 
2289
+ async def disconnect(self, ) -> None:
2217
2290
 
2218
- def disconnect(self, ) -> None:
2219
2291
  """
2220
2292
  Stops the SDK's background tasks
2221
2293
 
@@ -2227,9 +2299,21 @@ _UniffiConverterTypeSdkError,
2227
2299
  Result containing either success or an `SdkError` if the background task couldn't be stopped
2228
2300
  """
2229
2301
 
2230
- _uniffi_rust_call_with_error(_UniffiConverterTypeSdkError,_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect,self._uniffi_clone_pointer(),)
2231
-
2302
+ return await _uniffi_rust_call_async(
2303
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect(
2304
+ self._uniffi_clone_pointer(),
2305
+ ),
2306
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_void,
2307
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_void,
2308
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_free_void,
2309
+ # lift function
2310
+ lambda val: None,
2311
+
2312
+
2313
+ # Error FFI converter
2314
+ _UniffiConverterTypeSdkError,
2232
2315
 
2316
+ )
2233
2317
 
2234
2318
 
2235
2319
 
@@ -2563,8 +2647,7 @@ _UniffiConverterTypeSdkError,
2563
2647
 
2564
2648
 
2565
2649
 
2566
-
2567
- def remove_event_listener(self, id: "str") -> "bool":
2650
+ async def remove_event_listener(self, id: "str") -> "bool":
2568
2651
  """
2569
2652
  Removes a previously registered event listener
2570
2653
 
@@ -2579,13 +2662,81 @@ _UniffiConverterTypeSdkError,
2579
2662
 
2580
2663
  _UniffiConverterString.check_lower(id)
2581
2664
 
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))
2665
+ return await _uniffi_rust_call_async(
2666
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener(
2667
+ self._uniffi_clone_pointer(),
2668
+ _UniffiConverterString.lower(id)
2669
+ ),
2670
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_i8,
2671
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_i8,
2672
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_free_i8,
2673
+ # lift function
2674
+ _UniffiConverterBool.lift,
2675
+
2676
+ # Error FFI converter
2677
+
2678
+ None,
2679
+
2585
2680
  )
2586
2681
 
2587
2682
 
2588
2683
 
2684
+ async def send_bitcoin_address(self, address: "BitcoinAddressDetails",fee_quote: "SendOnchainFeeQuote",request: "SendPaymentRequest") -> "SendPaymentResponse":
2685
+ _UniffiConverterTypeBitcoinAddressDetails.check_lower(address)
2686
+
2687
+ _UniffiConverterTypeSendOnchainFeeQuote.check_lower(fee_quote)
2688
+
2689
+ _UniffiConverterTypeSendPaymentRequest.check_lower(request)
2690
+
2691
+ return await _uniffi_rust_call_async(
2692
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_bitcoin_address(
2693
+ self._uniffi_clone_pointer(),
2694
+ _UniffiConverterTypeBitcoinAddressDetails.lower(address),
2695
+ _UniffiConverterTypeSendOnchainFeeQuote.lower(fee_quote),
2696
+ _UniffiConverterTypeSendPaymentRequest.lower(request)
2697
+ ),
2698
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
2699
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
2700
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
2701
+ # lift function
2702
+ _UniffiConverterTypeSendPaymentResponse.lift,
2703
+
2704
+ # Error FFI converter
2705
+ _UniffiConverterTypeSdkError,
2706
+
2707
+ )
2708
+
2709
+
2710
+
2711
+ async def send_bolt11_invoice(self, invoice_details: "Bolt11InvoiceDetails",spark_transfer_fee_sats: "typing.Optional[int]",lightning_fee_sats: "int",request: "SendPaymentRequest") -> "SendPaymentResponse":
2712
+ _UniffiConverterTypeBolt11InvoiceDetails.check_lower(invoice_details)
2713
+
2714
+ _UniffiConverterOptionalUInt64.check_lower(spark_transfer_fee_sats)
2715
+
2716
+ _UniffiConverterUInt64.check_lower(lightning_fee_sats)
2717
+
2718
+ _UniffiConverterTypeSendPaymentRequest.check_lower(request)
2719
+
2720
+ return await _uniffi_rust_call_async(
2721
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_bolt11_invoice(
2722
+ self._uniffi_clone_pointer(),
2723
+ _UniffiConverterTypeBolt11InvoiceDetails.lower(invoice_details),
2724
+ _UniffiConverterOptionalUInt64.lower(spark_transfer_fee_sats),
2725
+ _UniffiConverterUInt64.lower(lightning_fee_sats),
2726
+ _UniffiConverterTypeSendPaymentRequest.lower(request)
2727
+ ),
2728
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
2729
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
2730
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
2731
+ # lift function
2732
+ _UniffiConverterTypeSendPaymentResponse.lift,
2733
+
2734
+ # Error FFI converter
2735
+ _UniffiConverterTypeSdkError,
2736
+
2737
+ )
2738
+
2739
+
2589
2740
 
2590
2741
  async def send_payment(self, request: "SendPaymentRequest") -> "SendPaymentResponse":
2591
2742
  _UniffiConverterTypeSendPaymentRequest.check_lower(request)
@@ -2632,21 +2783,75 @@ _UniffiConverterTypeSdkError,
2632
2783
 
2633
2784
 
2634
2785
 
2786
+ async def send_spark_address(self, address: "str",request: "SendPaymentRequest") -> "SendPaymentResponse":
2787
+ _UniffiConverterString.check_lower(address)
2788
+
2789
+ _UniffiConverterTypeSendPaymentRequest.check_lower(request)
2790
+
2791
+ return await _uniffi_rust_call_async(
2792
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_spark_address(
2793
+ self._uniffi_clone_pointer(),
2794
+ _UniffiConverterString.lower(address),
2795
+ _UniffiConverterTypeSendPaymentRequest.lower(request)
2796
+ ),
2797
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
2798
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
2799
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
2800
+ # lift function
2801
+ _UniffiConverterTypeSendPaymentResponse.lift,
2802
+
2803
+ # Error FFI converter
2804
+ _UniffiConverterTypeSdkError,
2805
+
2806
+ )
2807
+
2808
+
2635
2809
 
2636
- def sync_wallet(self, request: "SyncWalletRequest") -> "SyncWalletResponse":
2810
+ async def sync_wallet(self, request: "SyncWalletRequest") -> "SyncWalletResponse":
2637
2811
  """
2638
2812
  Synchronizes the wallet with the Spark network
2639
2813
  """
2640
2814
 
2641
2815
  _UniffiConverterTypeSyncWalletRequest.check_lower(request)
2642
2816
 
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))
2817
+ return await _uniffi_rust_call_async(
2818
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
2819
+ self._uniffi_clone_pointer(),
2820
+ _UniffiConverterTypeSyncWalletRequest.lower(request)
2821
+ ),
2822
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
2823
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
2824
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
2825
+ # lift function
2826
+ _UniffiConverterTypeSyncWalletResponse.lift,
2827
+
2828
+ # Error FFI converter
2829
+ _UniffiConverterTypeSdkError,
2830
+
2646
2831
  )
2647
2832
 
2648
2833
 
2649
2834
 
2835
+ async def wait_for_payment(self, request: "WaitForPaymentRequest") -> "WaitForPaymentResponse":
2836
+ _UniffiConverterTypeWaitForPaymentRequest.check_lower(request)
2837
+
2838
+ return await _uniffi_rust_call_async(
2839
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment(
2840
+ self._uniffi_clone_pointer(),
2841
+ _UniffiConverterTypeWaitForPaymentRequest.lower(request)
2842
+ ),
2843
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
2844
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
2845
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
2846
+ # lift function
2847
+ _UniffiConverterTypeWaitForPaymentResponse.lift,
2848
+
2849
+ # Error FFI converter
2850
+ _UniffiConverterTypeSdkError,
2851
+
2852
+ )
2853
+
2854
+
2650
2855
 
2651
2856
 
2652
2857
 
@@ -3049,6 +3254,18 @@ class Storage(typing.Protocol):
3049
3254
  The payment if found or None if not found
3050
3255
  """
3051
3256
 
3257
+ raise NotImplementedError
3258
+ def get_payment_by_invoice(self, invoice: "str"):
3259
+ """
3260
+ Gets a payment by its invoice
3261
+ # Arguments
3262
+
3263
+ * `invoice` - The invoice of the payment to retrieve
3264
+ # Returns
3265
+
3266
+ The payment if found or None if not found
3267
+ """
3268
+
3052
3269
  raise NotImplementedError
3053
3270
  def add_deposit(self, txid: "str",vout: "int",amount_sats: "int"):
3054
3271
  """
@@ -3346,6 +3563,37 @@ _UniffiConverterTypeStorageError,
3346
3563
 
3347
3564
 
3348
3565
 
3566
+ async def get_payment_by_invoice(self, invoice: "str") -> "typing.Optional[Payment]":
3567
+ """
3568
+ Gets a payment by its invoice
3569
+ # Arguments
3570
+
3571
+ * `invoice` - The invoice of the payment to retrieve
3572
+ # Returns
3573
+
3574
+ The payment if found or None if not found
3575
+ """
3576
+
3577
+ _UniffiConverterString.check_lower(invoice)
3578
+
3579
+ return await _uniffi_rust_call_async(
3580
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_invoice(
3581
+ self._uniffi_clone_pointer(),
3582
+ _UniffiConverterString.lower(invoice)
3583
+ ),
3584
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
3585
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
3586
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
3587
+ # lift function
3588
+ _UniffiConverterOptionalTypePayment.lift,
3589
+
3590
+ # Error FFI converter
3591
+ _UniffiConverterTypeStorageError,
3592
+
3593
+ )
3594
+
3595
+
3596
+
3349
3597
  async def add_deposit(self, txid: "str",vout: "int",amount_sats: "int") -> None:
3350
3598
 
3351
3599
  """
@@ -3732,6 +3980,40 @@ class _UniffiTraitImplStorage:
3732
3980
  uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, StorageError, _UniffiConverterTypeStorageError.lower)
3733
3981
 
3734
3982
  @_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD7
3983
+ def get_payment_by_invoice(
3984
+ uniffi_handle,
3985
+ invoice,
3986
+ uniffi_future_callback,
3987
+ uniffi_callback_data,
3988
+ uniffi_out_return,
3989
+ ):
3990
+ uniffi_obj = _UniffiConverterTypeStorage._handle_map.get(uniffi_handle)
3991
+ def make_call():
3992
+ args = (_UniffiConverterString.lift(invoice), )
3993
+ method = uniffi_obj.get_payment_by_invoice
3994
+ return method(*args)
3995
+
3996
+
3997
+ def handle_success(return_value):
3998
+ uniffi_future_callback(
3999
+ uniffi_callback_data,
4000
+ _UniffiForeignFutureStructRustBuffer(
4001
+ _UniffiConverterOptionalTypePayment.lower(return_value),
4002
+ _UniffiRustCallStatus.default()
4003
+ )
4004
+ )
4005
+
4006
+ def handle_error(status_code, rust_buffer):
4007
+ uniffi_future_callback(
4008
+ uniffi_callback_data,
4009
+ _UniffiForeignFutureStructRustBuffer(
4010
+ _UniffiRustBuffer.default(),
4011
+ _UniffiRustCallStatus(status_code, rust_buffer),
4012
+ )
4013
+ )
4014
+ uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, StorageError, _UniffiConverterTypeStorageError.lower)
4015
+
4016
+ @_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD8
3735
4017
  def add_deposit(
3736
4018
  uniffi_handle,
3737
4019
  txid,
@@ -3765,7 +4047,7 @@ class _UniffiTraitImplStorage:
3765
4047
  )
3766
4048
  uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, StorageError, _UniffiConverterTypeStorageError.lower)
3767
4049
 
3768
- @_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD8
4050
+ @_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD9
3769
4051
  def delete_deposit(
3770
4052
  uniffi_handle,
3771
4053
  txid,
@@ -3798,7 +4080,7 @@ class _UniffiTraitImplStorage:
3798
4080
  )
3799
4081
  uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, StorageError, _UniffiConverterTypeStorageError.lower)
3800
4082
 
3801
- @_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD9
4083
+ @_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD10
3802
4084
  def list_deposits(
3803
4085
  uniffi_handle,
3804
4086
  uniffi_future_callback,
@@ -3831,7 +4113,7 @@ class _UniffiTraitImplStorage:
3831
4113
  )
3832
4114
  uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, StorageError, _UniffiConverterTypeStorageError.lower)
3833
4115
 
3834
- @_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD10
4116
+ @_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD11
3835
4117
  def update_deposit(
3836
4118
  uniffi_handle,
3837
4119
  txid,
@@ -3878,6 +4160,7 @@ class _UniffiTraitImplStorage:
3878
4160
  insert_payment,
3879
4161
  set_payment_metadata,
3880
4162
  get_payment_by_id,
4163
+ get_payment_by_invoice,
3881
4164
  add_deposit,
3882
4165
  delete_deposit,
3883
4166
  list_deposits,
@@ -4243,26 +4526,32 @@ class GetInfoRequest:
4243
4526
  Request to get the balance of the wallet
4244
4527
  """
4245
4528
 
4529
+ ensure_synced: "typing.Optional[bool]"
4530
+ def __init__(self, *, ensure_synced: "typing.Optional[bool]"):
4531
+ self.ensure_synced = ensure_synced
4246
4532
 
4247
4533
  def __str__(self):
4248
- return "GetInfoRequest()".format()
4534
+ return "GetInfoRequest(ensure_synced={})".format(self.ensure_synced)
4249
4535
 
4250
4536
  def __eq__(self, other):
4537
+ if self.ensure_synced != other.ensure_synced:
4538
+ return False
4251
4539
  return True
4252
4540
 
4253
4541
  class _UniffiConverterTypeGetInfoRequest(_UniffiConverterRustBuffer):
4254
4542
  @staticmethod
4255
4543
  def read(buf):
4256
4544
  return GetInfoRequest(
4545
+ ensure_synced=_UniffiConverterOptionalBool.read(buf),
4257
4546
  )
4258
4547
 
4259
4548
  @staticmethod
4260
4549
  def check_lower(value):
4261
- pass
4550
+ _UniffiConverterOptionalBool.check_lower(value.ensure_synced)
4262
4551
 
4263
4552
  @staticmethod
4264
4553
  def write(value, buf):
4265
- pass
4554
+ _UniffiConverterOptionalBool.write(value.ensure_synced, buf)
4266
4555
 
4267
4556
 
4268
4557
  class GetInfoResponse:
@@ -5644,6 +5933,64 @@ class _UniffiConverterTypeUtxo(_UniffiConverterRustBuffer):
5644
5933
  _UniffiConverterTypeTxStatus.write(value.status, buf)
5645
5934
 
5646
5935
 
5936
+ class WaitForPaymentRequest:
5937
+ identifier: "WaitForPaymentIdentifier"
5938
+ def __init__(self, *, identifier: "WaitForPaymentIdentifier"):
5939
+ self.identifier = identifier
5940
+
5941
+ def __str__(self):
5942
+ return "WaitForPaymentRequest(identifier={})".format(self.identifier)
5943
+
5944
+ def __eq__(self, other):
5945
+ if self.identifier != other.identifier:
5946
+ return False
5947
+ return True
5948
+
5949
+ class _UniffiConverterTypeWaitForPaymentRequest(_UniffiConverterRustBuffer):
5950
+ @staticmethod
5951
+ def read(buf):
5952
+ return WaitForPaymentRequest(
5953
+ identifier=_UniffiConverterTypeWaitForPaymentIdentifier.read(buf),
5954
+ )
5955
+
5956
+ @staticmethod
5957
+ def check_lower(value):
5958
+ _UniffiConverterTypeWaitForPaymentIdentifier.check_lower(value.identifier)
5959
+
5960
+ @staticmethod
5961
+ def write(value, buf):
5962
+ _UniffiConverterTypeWaitForPaymentIdentifier.write(value.identifier, buf)
5963
+
5964
+
5965
+ class WaitForPaymentResponse:
5966
+ payment: "Payment"
5967
+ def __init__(self, *, payment: "Payment"):
5968
+ self.payment = payment
5969
+
5970
+ def __str__(self):
5971
+ return "WaitForPaymentResponse(payment={})".format(self.payment)
5972
+
5973
+ def __eq__(self, other):
5974
+ if self.payment != other.payment:
5975
+ return False
5976
+ return True
5977
+
5978
+ class _UniffiConverterTypeWaitForPaymentResponse(_UniffiConverterRustBuffer):
5979
+ @staticmethod
5980
+ def read(buf):
5981
+ return WaitForPaymentResponse(
5982
+ payment=_UniffiConverterTypePayment.read(buf),
5983
+ )
5984
+
5985
+ @staticmethod
5986
+ def check_lower(value):
5987
+ _UniffiConverterTypePayment.check_lower(value.payment)
5988
+
5989
+ @staticmethod
5990
+ def write(value, buf):
5991
+ _UniffiConverterTypePayment.write(value.payment, buf)
5992
+
5993
+
5647
5994
  # ChainServiceError
5648
5995
  # We want to define each variant as a nested class that's also a subclass,
5649
5996
  # which is tricky in Python. To accomplish this we're going to create each
@@ -7444,18 +7791,27 @@ class SendPaymentOptions:
7444
7791
 
7445
7792
  class BOLT11_INVOICE:
7446
7793
  prefer_spark: "bool"
7794
+ completion_timeout_secs: "typing.Optional[int]"
7795
+ """
7796
+ If set, the function will return the payment if it is still pending after this
7797
+ number of seconds. If unset, the function will return immediately after initiating the payment.
7798
+ """
7799
+
7447
7800
 
7448
- def __init__(self,prefer_spark: "bool"):
7801
+ def __init__(self,prefer_spark: "bool", completion_timeout_secs: "typing.Optional[int]"):
7449
7802
  self.prefer_spark = prefer_spark
7803
+ self.completion_timeout_secs = completion_timeout_secs
7450
7804
 
7451
7805
  def __str__(self):
7452
- return "SendPaymentOptions.BOLT11_INVOICE(prefer_spark={})".format(self.prefer_spark)
7806
+ return "SendPaymentOptions.BOLT11_INVOICE(prefer_spark={}, completion_timeout_secs={})".format(self.prefer_spark, self.completion_timeout_secs)
7453
7807
 
7454
7808
  def __eq__(self, other):
7455
7809
  if not other.is_bolt11_invoice():
7456
7810
  return False
7457
7811
  if self.prefer_spark != other.prefer_spark:
7458
7812
  return False
7813
+ if self.completion_timeout_secs != other.completion_timeout_secs:
7814
+ return False
7459
7815
  return True
7460
7816
 
7461
7817
 
@@ -7488,6 +7844,7 @@ class _UniffiConverterTypeSendPaymentOptions(_UniffiConverterRustBuffer):
7488
7844
  if variant == 2:
7489
7845
  return SendPaymentOptions.BOLT11_INVOICE(
7490
7846
  _UniffiConverterBool.read(buf),
7847
+ _UniffiConverterOptionalUInt32.read(buf),
7491
7848
  )
7492
7849
  raise InternalError("Raw enum value doesn't match any cases")
7493
7850
 
@@ -7498,6 +7855,7 @@ class _UniffiConverterTypeSendPaymentOptions(_UniffiConverterRustBuffer):
7498
7855
  return
7499
7856
  if value.is_bolt11_invoice():
7500
7857
  _UniffiConverterBool.check_lower(value.prefer_spark)
7858
+ _UniffiConverterOptionalUInt32.check_lower(value.completion_timeout_secs)
7501
7859
  return
7502
7860
  raise ValueError(value)
7503
7861
 
@@ -7509,6 +7867,7 @@ class _UniffiConverterTypeSendPaymentOptions(_UniffiConverterRustBuffer):
7509
7867
  if value.is_bolt11_invoice():
7510
7868
  buf.write_i32(2)
7511
7869
  _UniffiConverterBool.write(value.prefer_spark, buf)
7870
+ _UniffiConverterOptionalUInt32.write(value.completion_timeout_secs, buf)
7512
7871
 
7513
7872
 
7514
7873
 
@@ -7733,6 +8092,105 @@ class _UniffiConverterTypeUpdateDepositPayload(_UniffiConverterRustBuffer):
7733
8092
 
7734
8093
 
7735
8094
 
8095
+
8096
+
8097
+ class WaitForPaymentIdentifier:
8098
+ def __init__(self):
8099
+ raise RuntimeError("WaitForPaymentIdentifier cannot be instantiated directly")
8100
+
8101
+ # Each enum variant is a nested class of the enum itself.
8102
+ class PAYMENT_ID:
8103
+ def __init__(self, *values):
8104
+ if len(values) != 1:
8105
+ raise TypeError(f"Expected 1 arguments, found {len(values)}")
8106
+ if not isinstance(values[0], str):
8107
+ raise TypeError(f"unexpected type for tuple element 0 - expected 'str', got '{type(values[0])}'")
8108
+ self._values = values
8109
+
8110
+ def __getitem__(self, index):
8111
+ return self._values[index]
8112
+
8113
+ def __str__(self):
8114
+ return f"WaitForPaymentIdentifier.PAYMENT_ID{self._values!r}"
8115
+
8116
+ def __eq__(self, other):
8117
+ if not other.is_payment_id():
8118
+ return False
8119
+ return self._values == other._values
8120
+ class PAYMENT_REQUEST:
8121
+ def __init__(self, *values):
8122
+ if len(values) != 1:
8123
+ raise TypeError(f"Expected 1 arguments, found {len(values)}")
8124
+ if not isinstance(values[0], str):
8125
+ raise TypeError(f"unexpected type for tuple element 0 - expected 'str', got '{type(values[0])}'")
8126
+ self._values = values
8127
+
8128
+ def __getitem__(self, index):
8129
+ return self._values[index]
8130
+
8131
+ def __str__(self):
8132
+ return f"WaitForPaymentIdentifier.PAYMENT_REQUEST{self._values!r}"
8133
+
8134
+ def __eq__(self, other):
8135
+ if not other.is_payment_request():
8136
+ return False
8137
+ return self._values == other._values
8138
+
8139
+
8140
+ # For each variant, we have an `is_NAME` method for easily checking
8141
+ # whether an instance is that variant.
8142
+ def is_payment_id(self) -> bool:
8143
+ return isinstance(self, WaitForPaymentIdentifier.PAYMENT_ID)
8144
+ def is_payment_request(self) -> bool:
8145
+ return isinstance(self, WaitForPaymentIdentifier.PAYMENT_REQUEST)
8146
+
8147
+
8148
+ # Now, a little trick - we make each nested variant class be a subclass of the main
8149
+ # enum class, so that method calls and instance checks etc will work intuitively.
8150
+ # We might be able to do this a little more neatly with a metaclass, but this'll do.
8151
+ WaitForPaymentIdentifier.PAYMENT_ID = type("WaitForPaymentIdentifier.PAYMENT_ID", (WaitForPaymentIdentifier.PAYMENT_ID, WaitForPaymentIdentifier,), {}) # type: ignore
8152
+ WaitForPaymentIdentifier.PAYMENT_REQUEST = type("WaitForPaymentIdentifier.PAYMENT_REQUEST", (WaitForPaymentIdentifier.PAYMENT_REQUEST, WaitForPaymentIdentifier,), {}) # type: ignore
8153
+
8154
+
8155
+
8156
+
8157
+ class _UniffiConverterTypeWaitForPaymentIdentifier(_UniffiConverterRustBuffer):
8158
+ @staticmethod
8159
+ def read(buf):
8160
+ variant = buf.read_i32()
8161
+ if variant == 1:
8162
+ return WaitForPaymentIdentifier.PAYMENT_ID(
8163
+ _UniffiConverterString.read(buf),
8164
+ )
8165
+ if variant == 2:
8166
+ return WaitForPaymentIdentifier.PAYMENT_REQUEST(
8167
+ _UniffiConverterString.read(buf),
8168
+ )
8169
+ raise InternalError("Raw enum value doesn't match any cases")
8170
+
8171
+ @staticmethod
8172
+ def check_lower(value):
8173
+ if value.is_payment_id():
8174
+ _UniffiConverterString.check_lower(value._values[0])
8175
+ return
8176
+ if value.is_payment_request():
8177
+ _UniffiConverterString.check_lower(value._values[0])
8178
+ return
8179
+ raise ValueError(value)
8180
+
8181
+ @staticmethod
8182
+ def write(value, buf):
8183
+ if value.is_payment_id():
8184
+ buf.write_i32(1)
8185
+ _UniffiConverterString.write(value._values[0], buf)
8186
+ if value.is_payment_request():
8187
+ buf.write_i32(2)
8188
+ _UniffiConverterString.write(value._values[0], buf)
8189
+
8190
+
8191
+
8192
+
8193
+
7736
8194
  class EventListener(typing.Protocol):
7737
8195
  """
7738
8196
  Trait for event listeners
@@ -7754,8 +8212,9 @@ class _UniffiTraitImplEventListener:
7754
8212
  def on_event(
7755
8213
  uniffi_handle,
7756
8214
  event,
8215
+ uniffi_future_callback,
8216
+ uniffi_callback_data,
7757
8217
  uniffi_out_return,
7758
- uniffi_call_status_ptr,
7759
8218
  ):
7760
8219
  uniffi_obj = _UniffiConverterTypeEventListener._handle_map.get(uniffi_handle)
7761
8220
  def make_call():
@@ -7764,12 +8223,22 @@ class _UniffiTraitImplEventListener:
7764
8223
  return method(*args)
7765
8224
 
7766
8225
 
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
- )
8226
+ def handle_success(return_value):
8227
+ uniffi_future_callback(
8228
+ uniffi_callback_data,
8229
+ _UniffiForeignFutureStructVoid(
8230
+ _UniffiRustCallStatus.default()
8231
+ )
8232
+ )
8233
+
8234
+ def handle_error(status_code, rust_buffer):
8235
+ uniffi_future_callback(
8236
+ uniffi_callback_data,
8237
+ _UniffiForeignFutureStructVoid(
8238
+ _UniffiRustCallStatus(status_code, rust_buffer),
8239
+ )
8240
+ )
8241
+ uniffi_out_return[0] = _uniffi_trait_interface_call_async(make_call, handle_success, handle_error)
7773
8242
 
7774
8243
  @_UNIFFI_CALLBACK_INTERFACE_FREE
7775
8244
  def _uniffi_free(uniffi_handle):
@@ -8026,6 +8495,33 @@ class _UniffiConverterOptionalTypeLnurlPayInfo(_UniffiConverterRustBuffer):
8026
8495
 
8027
8496
 
8028
8497
 
8498
+ class _UniffiConverterOptionalTypePayment(_UniffiConverterRustBuffer):
8499
+ @classmethod
8500
+ def check_lower(cls, value):
8501
+ if value is not None:
8502
+ _UniffiConverterTypePayment.check_lower(value)
8503
+
8504
+ @classmethod
8505
+ def write(cls, value, buf):
8506
+ if value is None:
8507
+ buf.write_u8(0)
8508
+ return
8509
+
8510
+ buf.write_u8(1)
8511
+ _UniffiConverterTypePayment.write(value, buf)
8512
+
8513
+ @classmethod
8514
+ def read(cls, buf):
8515
+ flag = buf.read_u8()
8516
+ if flag == 0:
8517
+ return None
8518
+ elif flag == 1:
8519
+ return _UniffiConverterTypePayment.read(buf)
8520
+ else:
8521
+ raise InternalError("Unexpected flag byte for optional type")
8522
+
8523
+
8524
+
8029
8525
  class _UniffiConverterOptionalTypeDepositClaimError(_UniffiConverterRustBuffer):
8030
8526
  @classmethod
8031
8527
  def check_lower(cls, value):
@@ -8593,6 +9089,7 @@ __all__ = [
8593
9089
  "SendPaymentOptions",
8594
9090
  "StorageError",
8595
9091
  "UpdateDepositPayload",
9092
+ "WaitForPaymentIdentifier",
8596
9093
  "CheckLightningAddressRequest",
8597
9094
  "ClaimDepositRequest",
8598
9095
  "ClaimDepositResponse",
@@ -8634,6 +9131,8 @@ __all__ = [
8634
9131
  "SyncWalletResponse",
8635
9132
  "TxStatus",
8636
9133
  "Utxo",
9134
+ "WaitForPaymentRequest",
9135
+ "WaitForPaymentResponse",
8637
9136
  "connect",
8638
9137
  "default_config",
8639
9138
  "default_storage",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: breez_sdk_spark
3
- Version: 0.2.5.dev1
3
+ Version: 0.2.6
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>
@@ -1,12 +1,12 @@
1
1
  breez_sdk_spark/__init__.py,sha256=YcEpqfQeZ0Yc8lRjKv0b5M19vH3VyMiZjV5hHWdz6wE,151
2
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.dll,sha256=FUE_3dY7VwoBf7K2-tJirS9dnQ63s76yGj3fjdzFmBk,11960320
3
+ breez_sdk_spark/breez_sdk_spark.py,sha256=6qn4xZRNOdy1R02gFdyuan5UnPAI9-KFuJMji8ZaB_8,330913
4
+ breez_sdk_spark/breez_sdk_spark_bindings.dll,sha256=wPdjn822ZqpAjBEMNu_KmTgFOJO2f5BArCimnnUWFg4,12022784
5
5
  breez_sdk_spark/breez_sdk_spark_bindings.py,sha256=ysAJqyrIhXUjJIBj856CADqim5MR38CgNEIdG1Fj4qg,32901
6
6
  breez_sdk_spark/msvcp140.dll,sha256=D4hbUJpoXSu_plL-0mtfsx2I-9qwqXjGQdHHuKpGCqk,557728
7
7
  breez_sdk_spark/vcruntime140.dll,sha256=1eTZo-g1-meUUBRdan2U42VzpQkxcRGQTZs3EsMNkGY,124544
8
8
  breez_sdk_spark/vcruntime140_1.dll,sha256=Hy1BxKpdsLwz6_e2bXKUOoF9fObL6IBQKpQDgjYzCT8,49792
9
- breez_sdk_spark-0.2.5.dev1.dist-info/METADATA,sha256=zJzIEgzLrxj9OnhW0sVdIHVglQpN6IUemjt4r7ShZCg,573
10
- breez_sdk_spark-0.2.5.dev1.dist-info/WHEEL,sha256=XkFE14KmFh7mutkkb-qn_ueuH2lwfT8rLdfc5xpQ7wE,99
11
- breez_sdk_spark-0.2.5.dev1.dist-info/top_level.txt,sha256=EWjZB7jCSH5bjyOrFhpRFW4Jfo8ykKdxJ7tqAOytwDU,16
12
- breez_sdk_spark-0.2.5.dev1.dist-info/RECORD,,
9
+ breez_sdk_spark-0.2.6.dist-info/METADATA,sha256=_7pgvCQucC3Ws9JhJU3tfCZebmqNkOcTJCcgDbuUpFo,568
10
+ breez_sdk_spark-0.2.6.dist-info/WHEEL,sha256=XkFE14KmFh7mutkkb-qn_ueuH2lwfT8rLdfc5xpQ7wE,99
11
+ breez_sdk_spark-0.2.6.dist-info/top_level.txt,sha256=EWjZB7jCSH5bjyOrFhpRFW4Jfo8ykKdxJ7tqAOytwDU,16
12
+ breez_sdk_spark-0.2.6.dist-info/RECORD,,