breez-sdk-spark 0.2.5.dev2__cp312-cp312-macosx_11_0_universal2.whl → 0.2.6__cp312-cp312-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.
- breez_sdk_spark/breez_sdk_spark.py +480 -23
- breez_sdk_spark/libbreez_sdk_spark_bindings.dylib +0 -0
- {breez_sdk_spark-0.2.5.dev2.dist-info → breez_sdk_spark-0.2.6.dist-info}/METADATA +1 -1
- breez_sdk_spark-0.2.6.dist-info/RECORD +9 -0
- breez_sdk_spark-0.2.5.dev2.dist-info/RECORD +0 -9
- {breez_sdk_spark-0.2.5.dev2.dist-info → breez_sdk_spark-0.2.6.dist-info}/WHEEL +0 -0
- {breez_sdk_spark-0.2.5.dev2.dist-info → breez_sdk_spark-0.2.6.dist-info}/top_level.txt +0 -0
|
@@ -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() !=
|
|
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")
|
|
@@ -551,12 +551,20 @@ def _uniffi_check_api_checksums(lib):
|
|
|
551
551
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
552
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
|
+
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:
|
|
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")
|
|
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")
|
|
558
564
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet() != 30368:
|
|
559
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:
|
|
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")
|
|
562
570
|
if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service() != 2848:
|
|
@@ -583,13 +591,15 @@ 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.
|
|
594
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice() != 57075:
|
|
595
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
596
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_storage_add_deposit() != 60240:
|
|
587
597
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
588
|
-
if lib.uniffi_breez_sdk_spark_checksum_method_storage_delete_deposit() !=
|
|
598
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_storage_delete_deposit() != 60586:
|
|
589
599
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
590
|
-
if lib.uniffi_breez_sdk_spark_checksum_method_storage_list_deposits() !=
|
|
600
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_storage_list_deposits() != 54118:
|
|
591
601
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
592
|
-
if lib.uniffi_breez_sdk_spark_checksum_method_storage_update_deposit() !=
|
|
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")
|
|
@@ -730,13 +740,15 @@ _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD5 = ctypes.CFUNCTYPE(None,ctypes.c_uint
|
|
|
730
740
|
)
|
|
731
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),
|
|
732
742
|
)
|
|
733
|
-
_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD7 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,
|
|
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),
|
|
734
746
|
)
|
|
735
|
-
|
|
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),
|
|
736
748
|
)
|
|
737
|
-
|
|
749
|
+
_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD10 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
738
750
|
)
|
|
739
|
-
|
|
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),
|
|
740
752
|
)
|
|
741
753
|
class _UniffiVTableCallbackInterfaceEventListener(ctypes.Structure):
|
|
742
754
|
_fields_ = [
|
|
@@ -765,10 +777,11 @@ class _UniffiVTableCallbackInterfaceStorage(ctypes.Structure):
|
|
|
765
777
|
("insert_payment", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD4),
|
|
766
778
|
("set_payment_metadata", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD5),
|
|
767
779
|
("get_payment_by_id", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD6),
|
|
768
|
-
("
|
|
769
|
-
("
|
|
770
|
-
("
|
|
771
|
-
("
|
|
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),
|
|
772
785
|
("uniffi_free", _UNIFFI_CALLBACK_INTERFACE_FREE),
|
|
773
786
|
]
|
|
774
787
|
_UniffiLib.uniffi_breez_sdk_spark_fn_clone_bitcoinchainservice.argtypes = (
|
|
@@ -836,9 +849,8 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_delete_lightning_address.ar
|
|
|
836
849
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_delete_lightning_address.restype = ctypes.c_uint64
|
|
837
850
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect.argtypes = (
|
|
838
851
|
ctypes.c_void_p,
|
|
839
|
-
ctypes.POINTER(_UniffiRustCallStatus),
|
|
840
852
|
)
|
|
841
|
-
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect.restype =
|
|
853
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect.restype = ctypes.c_uint64
|
|
842
854
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_get_info.argtypes = (
|
|
843
855
|
ctypes.c_void_p,
|
|
844
856
|
_UniffiRustBuffer,
|
|
@@ -917,6 +929,21 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_remove_event_listener.argty
|
|
|
917
929
|
_UniffiRustBuffer,
|
|
918
930
|
)
|
|
919
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
|
|
920
947
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment.argtypes = (
|
|
921
948
|
ctypes.c_void_p,
|
|
922
949
|
_UniffiRustBuffer,
|
|
@@ -928,11 +955,22 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment_internal.argty
|
|
|
928
955
|
ctypes.c_int8,
|
|
929
956
|
)
|
|
930
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
|
|
931
964
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet.argtypes = (
|
|
932
965
|
ctypes.c_void_p,
|
|
933
966
|
_UniffiRustBuffer,
|
|
934
967
|
)
|
|
935
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
|
|
936
974
|
_UniffiLib.uniffi_breez_sdk_spark_fn_clone_sdkbuilder.argtypes = (
|
|
937
975
|
ctypes.c_void_p,
|
|
938
976
|
ctypes.POINTER(_UniffiRustCallStatus),
|
|
@@ -1034,6 +1072,11 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_id.argtypes =
|
|
|
1034
1072
|
_UniffiRustBuffer,
|
|
1035
1073
|
)
|
|
1036
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
|
|
1037
1080
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_add_deposit.argtypes = (
|
|
1038
1081
|
ctypes.c_void_p,
|
|
1039
1082
|
_UniffiRustBuffer,
|
|
@@ -1449,15 +1492,27 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_register_lightning_ad
|
|
|
1449
1492
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener.argtypes = (
|
|
1450
1493
|
)
|
|
1451
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
|
|
1452
1501
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment.argtypes = (
|
|
1453
1502
|
)
|
|
1454
1503
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment.restype = ctypes.c_uint16
|
|
1455
1504
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_internal.argtypes = (
|
|
1456
1505
|
)
|
|
1457
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
|
|
1458
1510
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet.argtypes = (
|
|
1459
1511
|
)
|
|
1460
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
|
|
1461
1516
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build.argtypes = (
|
|
1462
1517
|
)
|
|
1463
1518
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build.restype = ctypes.c_uint16
|
|
@@ -1497,6 +1552,9 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_set_payment_metadata.r
|
|
|
1497
1552
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_id.argtypes = (
|
|
1498
1553
|
)
|
|
1499
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
|
|
1500
1558
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_add_deposit.argtypes = (
|
|
1501
1559
|
)
|
|
1502
1560
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_add_deposit.restype = ctypes.c_uint16
|
|
@@ -2082,17 +2140,25 @@ class BreezSdkProtocol(typing.Protocol):
|
|
|
2082
2140
|
`true` if the listener was found and removed, `false` otherwise
|
|
2083
2141
|
"""
|
|
2084
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"):
|
|
2085
2147
|
raise NotImplementedError
|
|
2086
2148
|
def send_payment(self, request: "SendPaymentRequest"):
|
|
2087
2149
|
raise NotImplementedError
|
|
2088
2150
|
def send_payment_internal(self, request: "SendPaymentRequest",suppress_payment_event: "bool"):
|
|
2089
2151
|
raise NotImplementedError
|
|
2152
|
+
def send_spark_address(self, address: "str",request: "SendPaymentRequest"):
|
|
2153
|
+
raise NotImplementedError
|
|
2090
2154
|
def sync_wallet(self, request: "SyncWalletRequest"):
|
|
2091
2155
|
"""
|
|
2092
2156
|
Synchronizes the wallet with the Spark network
|
|
2093
2157
|
"""
|
|
2094
2158
|
|
|
2095
2159
|
raise NotImplementedError
|
|
2160
|
+
def wait_for_payment(self, request: "WaitForPaymentRequest"):
|
|
2161
|
+
raise NotImplementedError
|
|
2096
2162
|
|
|
2097
2163
|
|
|
2098
2164
|
class BreezSdk:
|
|
@@ -2220,8 +2286,8 @@ _UniffiConverterTypeSdkError,
|
|
|
2220
2286
|
|
|
2221
2287
|
|
|
2222
2288
|
|
|
2289
|
+
async def disconnect(self, ) -> None:
|
|
2223
2290
|
|
|
2224
|
-
def disconnect(self, ) -> None:
|
|
2225
2291
|
"""
|
|
2226
2292
|
Stops the SDK's background tasks
|
|
2227
2293
|
|
|
@@ -2233,9 +2299,21 @@ _UniffiConverterTypeSdkError,
|
|
|
2233
2299
|
Result containing either success or an `SdkError` if the background task couldn't be stopped
|
|
2234
2300
|
"""
|
|
2235
2301
|
|
|
2236
|
-
|
|
2237
|
-
|
|
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,
|
|
2238
2315
|
|
|
2316
|
+
)
|
|
2239
2317
|
|
|
2240
2318
|
|
|
2241
2319
|
|
|
@@ -2603,6 +2681,63 @@ _UniffiConverterTypeSdkError,
|
|
|
2603
2681
|
|
|
2604
2682
|
|
|
2605
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
|
+
|
|
2740
|
+
|
|
2606
2741
|
async def send_payment(self, request: "SendPaymentRequest") -> "SendPaymentResponse":
|
|
2607
2742
|
_UniffiConverterTypeSendPaymentRequest.check_lower(request)
|
|
2608
2743
|
|
|
@@ -2648,6 +2783,30 @@ _UniffiConverterTypeSdkError,
|
|
|
2648
2783
|
|
|
2649
2784
|
|
|
2650
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
|
+
|
|
2809
|
+
|
|
2651
2810
|
async def sync_wallet(self, request: "SyncWalletRequest") -> "SyncWalletResponse":
|
|
2652
2811
|
"""
|
|
2653
2812
|
Synchronizes the wallet with the Spark network
|
|
@@ -2673,6 +2832,27 @@ _UniffiConverterTypeSdkError,
|
|
|
2673
2832
|
|
|
2674
2833
|
|
|
2675
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
|
+
|
|
2855
|
+
|
|
2676
2856
|
|
|
2677
2857
|
|
|
2678
2858
|
class _UniffiConverterTypeBreezSdk:
|
|
@@ -3074,6 +3254,18 @@ class Storage(typing.Protocol):
|
|
|
3074
3254
|
The payment if found or None if not found
|
|
3075
3255
|
"""
|
|
3076
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
|
+
|
|
3077
3269
|
raise NotImplementedError
|
|
3078
3270
|
def add_deposit(self, txid: "str",vout: "int",amount_sats: "int"):
|
|
3079
3271
|
"""
|
|
@@ -3371,6 +3563,37 @@ _UniffiConverterTypeStorageError,
|
|
|
3371
3563
|
|
|
3372
3564
|
|
|
3373
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
|
+
|
|
3374
3597
|
async def add_deposit(self, txid: "str",vout: "int",amount_sats: "int") -> None:
|
|
3375
3598
|
|
|
3376
3599
|
"""
|
|
@@ -3757,6 +3980,40 @@ class _UniffiTraitImplStorage:
|
|
|
3757
3980
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, StorageError, _UniffiConverterTypeStorageError.lower)
|
|
3758
3981
|
|
|
3759
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
|
|
3760
4017
|
def add_deposit(
|
|
3761
4018
|
uniffi_handle,
|
|
3762
4019
|
txid,
|
|
@@ -3790,7 +4047,7 @@ class _UniffiTraitImplStorage:
|
|
|
3790
4047
|
)
|
|
3791
4048
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, StorageError, _UniffiConverterTypeStorageError.lower)
|
|
3792
4049
|
|
|
3793
|
-
@
|
|
4050
|
+
@_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD9
|
|
3794
4051
|
def delete_deposit(
|
|
3795
4052
|
uniffi_handle,
|
|
3796
4053
|
txid,
|
|
@@ -3823,7 +4080,7 @@ class _UniffiTraitImplStorage:
|
|
|
3823
4080
|
)
|
|
3824
4081
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, StorageError, _UniffiConverterTypeStorageError.lower)
|
|
3825
4082
|
|
|
3826
|
-
@
|
|
4083
|
+
@_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD10
|
|
3827
4084
|
def list_deposits(
|
|
3828
4085
|
uniffi_handle,
|
|
3829
4086
|
uniffi_future_callback,
|
|
@@ -3856,7 +4113,7 @@ class _UniffiTraitImplStorage:
|
|
|
3856
4113
|
)
|
|
3857
4114
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, StorageError, _UniffiConverterTypeStorageError.lower)
|
|
3858
4115
|
|
|
3859
|
-
@
|
|
4116
|
+
@_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD11
|
|
3860
4117
|
def update_deposit(
|
|
3861
4118
|
uniffi_handle,
|
|
3862
4119
|
txid,
|
|
@@ -3903,6 +4160,7 @@ class _UniffiTraitImplStorage:
|
|
|
3903
4160
|
insert_payment,
|
|
3904
4161
|
set_payment_metadata,
|
|
3905
4162
|
get_payment_by_id,
|
|
4163
|
+
get_payment_by_invoice,
|
|
3906
4164
|
add_deposit,
|
|
3907
4165
|
delete_deposit,
|
|
3908
4166
|
list_deposits,
|
|
@@ -5675,6 +5933,64 @@ class _UniffiConverterTypeUtxo(_UniffiConverterRustBuffer):
|
|
|
5675
5933
|
_UniffiConverterTypeTxStatus.write(value.status, buf)
|
|
5676
5934
|
|
|
5677
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
|
+
|
|
5678
5994
|
# ChainServiceError
|
|
5679
5995
|
# We want to define each variant as a nested class that's also a subclass,
|
|
5680
5996
|
# which is tricky in Python. To accomplish this we're going to create each
|
|
@@ -7475,18 +7791,27 @@ class SendPaymentOptions:
|
|
|
7475
7791
|
|
|
7476
7792
|
class BOLT11_INVOICE:
|
|
7477
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
|
+
|
|
7478
7800
|
|
|
7479
|
-
def __init__(self,prefer_spark: "bool"):
|
|
7801
|
+
def __init__(self,prefer_spark: "bool", completion_timeout_secs: "typing.Optional[int]"):
|
|
7480
7802
|
self.prefer_spark = prefer_spark
|
|
7803
|
+
self.completion_timeout_secs = completion_timeout_secs
|
|
7481
7804
|
|
|
7482
7805
|
def __str__(self):
|
|
7483
|
-
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)
|
|
7484
7807
|
|
|
7485
7808
|
def __eq__(self, other):
|
|
7486
7809
|
if not other.is_bolt11_invoice():
|
|
7487
7810
|
return False
|
|
7488
7811
|
if self.prefer_spark != other.prefer_spark:
|
|
7489
7812
|
return False
|
|
7813
|
+
if self.completion_timeout_secs != other.completion_timeout_secs:
|
|
7814
|
+
return False
|
|
7490
7815
|
return True
|
|
7491
7816
|
|
|
7492
7817
|
|
|
@@ -7519,6 +7844,7 @@ class _UniffiConverterTypeSendPaymentOptions(_UniffiConverterRustBuffer):
|
|
|
7519
7844
|
if variant == 2:
|
|
7520
7845
|
return SendPaymentOptions.BOLT11_INVOICE(
|
|
7521
7846
|
_UniffiConverterBool.read(buf),
|
|
7847
|
+
_UniffiConverterOptionalUInt32.read(buf),
|
|
7522
7848
|
)
|
|
7523
7849
|
raise InternalError("Raw enum value doesn't match any cases")
|
|
7524
7850
|
|
|
@@ -7529,6 +7855,7 @@ class _UniffiConverterTypeSendPaymentOptions(_UniffiConverterRustBuffer):
|
|
|
7529
7855
|
return
|
|
7530
7856
|
if value.is_bolt11_invoice():
|
|
7531
7857
|
_UniffiConverterBool.check_lower(value.prefer_spark)
|
|
7858
|
+
_UniffiConverterOptionalUInt32.check_lower(value.completion_timeout_secs)
|
|
7532
7859
|
return
|
|
7533
7860
|
raise ValueError(value)
|
|
7534
7861
|
|
|
@@ -7540,6 +7867,7 @@ class _UniffiConverterTypeSendPaymentOptions(_UniffiConverterRustBuffer):
|
|
|
7540
7867
|
if value.is_bolt11_invoice():
|
|
7541
7868
|
buf.write_i32(2)
|
|
7542
7869
|
_UniffiConverterBool.write(value.prefer_spark, buf)
|
|
7870
|
+
_UniffiConverterOptionalUInt32.write(value.completion_timeout_secs, buf)
|
|
7543
7871
|
|
|
7544
7872
|
|
|
7545
7873
|
|
|
@@ -7764,6 +8092,105 @@ class _UniffiConverterTypeUpdateDepositPayload(_UniffiConverterRustBuffer):
|
|
|
7764
8092
|
|
|
7765
8093
|
|
|
7766
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
|
+
|
|
7767
8194
|
class EventListener(typing.Protocol):
|
|
7768
8195
|
"""
|
|
7769
8196
|
Trait for event listeners
|
|
@@ -8068,6 +8495,33 @@ class _UniffiConverterOptionalTypeLnurlPayInfo(_UniffiConverterRustBuffer):
|
|
|
8068
8495
|
|
|
8069
8496
|
|
|
8070
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
|
+
|
|
8071
8525
|
class _UniffiConverterOptionalTypeDepositClaimError(_UniffiConverterRustBuffer):
|
|
8072
8526
|
@classmethod
|
|
8073
8527
|
def check_lower(cls, value):
|
|
@@ -8635,6 +9089,7 @@ __all__ = [
|
|
|
8635
9089
|
"SendPaymentOptions",
|
|
8636
9090
|
"StorageError",
|
|
8637
9091
|
"UpdateDepositPayload",
|
|
9092
|
+
"WaitForPaymentIdentifier",
|
|
8638
9093
|
"CheckLightningAddressRequest",
|
|
8639
9094
|
"ClaimDepositRequest",
|
|
8640
9095
|
"ClaimDepositResponse",
|
|
@@ -8676,6 +9131,8 @@ __all__ = [
|
|
|
8676
9131
|
"SyncWalletResponse",
|
|
8677
9132
|
"TxStatus",
|
|
8678
9133
|
"Utxo",
|
|
9134
|
+
"WaitForPaymentRequest",
|
|
9135
|
+
"WaitForPaymentResponse",
|
|
8679
9136
|
"connect",
|
|
8680
9137
|
"default_config",
|
|
8681
9138
|
"default_storage",
|
|
Binary file
|
|
@@ -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=6qn4xZRNOdy1R02gFdyuan5UnPAI9-KFuJMji8ZaB_8,330913
|
|
4
|
+
breez_sdk_spark/breez_sdk_spark_bindings.py,sha256=ysAJqyrIhXUjJIBj856CADqim5MR38CgNEIdG1Fj4qg,32901
|
|
5
|
+
breez_sdk_spark/libbreez_sdk_spark_bindings.dylib,sha256=2qOW_jAILlIp1c2mGIROOsHi1Sn2cBvULuXHRAqTiUk,32535360
|
|
6
|
+
breez_sdk_spark-0.2.6.dist-info/METADATA,sha256=uIdN8VbmMMfCB-BWLLomLpEmyAWsoYUb_qWt7n5EqxM,545
|
|
7
|
+
breez_sdk_spark-0.2.6.dist-info/WHEEL,sha256=o0zAoJUNILGJZxEeFPjb7OMHp_94eqIkZBeZ0gvgOpo,114
|
|
8
|
+
breez_sdk_spark-0.2.6.dist-info/top_level.txt,sha256=EWjZB7jCSH5bjyOrFhpRFW4Jfo8ykKdxJ7tqAOytwDU,16
|
|
9
|
+
breez_sdk_spark-0.2.6.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=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=TuAPq3nalAZD8LV_EpoXYYxFAo73oLcud6BAZvHN_9Q,550
|
|
7
|
-
breez_sdk_spark-0.2.5.dev2.dist-info/WHEEL,sha256=o0zAoJUNILGJZxEeFPjb7OMHp_94eqIkZBeZ0gvgOpo,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,,
|
|
File without changes
|
|
File without changes
|