breez-sdk-spark 0.2.5.dev2__cp312-cp312-macosx_11_0_universal2.whl → 0.3.0rc1__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.
@@ -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")
@@ -525,6 +525,8 @@ def _uniffi_check_api_checksums(lib):
525
525
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
526
526
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment() != 11540:
527
527
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
528
+ if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_tokens_metadata() != 40125:
529
+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
528
530
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_currencies() != 63366:
529
531
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
530
532
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_rates() != 5904:
@@ -535,16 +537,12 @@ def _uniffi_check_api_checksums(lib):
535
537
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
536
538
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay() != 10147:
537
539
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
538
- if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_poll_lightning_send_payment() != 57601:
539
- raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
540
540
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay() != 37691:
541
541
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
542
542
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment() != 34185:
543
543
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
544
544
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment() != 36984:
545
545
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
546
- if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_recover_lightning_address() != 43367:
547
- raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
548
546
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit() != 33646:
549
547
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
550
548
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_register_lightning_address() != 530:
@@ -553,10 +551,10 @@ def _uniffi_check_api_checksums(lib):
553
551
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
554
552
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment() != 54349:
555
553
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
556
- if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_internal() != 37855:
557
- raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
558
554
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet() != 30368:
559
555
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
556
+ if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment() != 64922:
557
+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
560
558
  if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build() != 8126:
561
559
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
562
560
  if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service() != 2848:
@@ -575,7 +573,7 @@ def _uniffi_check_api_checksums(lib):
575
573
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
576
574
  if lib.uniffi_breez_sdk_spark_checksum_method_storage_set_cached_item() != 7970:
577
575
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
578
- if lib.uniffi_breez_sdk_spark_checksum_method_storage_list_payments() != 35678:
576
+ if lib.uniffi_breez_sdk_spark_checksum_method_storage_list_payments() != 19728:
579
577
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
580
578
  if lib.uniffi_breez_sdk_spark_checksum_method_storage_insert_payment() != 28075:
581
579
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
@@ -583,13 +581,15 @@ def _uniffi_check_api_checksums(lib):
583
581
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
584
582
  if lib.uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_id() != 35394:
585
583
  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:
584
+ if lib.uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice() != 57075:
585
+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
586
+ if lib.uniffi_breez_sdk_spark_checksum_method_storage_add_deposit() != 60240:
587
587
  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:
588
+ if lib.uniffi_breez_sdk_spark_checksum_method_storage_delete_deposit() != 60586:
589
589
  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:
590
+ if lib.uniffi_breez_sdk_spark_checksum_method_storage_list_deposits() != 54118:
591
591
  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:
592
+ if lib.uniffi_breez_sdk_spark_checksum_method_storage_update_deposit() != 39803:
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")
@@ -722,7 +722,7 @@ _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD1 = ctypes.CFUNCTYPE(None,ctypes.c_uint
722
722
  )
723
723
  _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD2 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_VOID,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
724
724
  )
725
- _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD3 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
725
+ _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD3 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
726
726
  )
727
727
  _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD4 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_VOID,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
728
728
  )
@@ -730,13 +730,15 @@ _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD5 = ctypes.CFUNCTYPE(None,ctypes.c_uint
730
730
  )
731
731
  _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
732
  )
733
- _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),
733
+ _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD7 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
734
734
  )
735
- _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),
735
+ _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),
736
736
  )
737
- _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD9 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
737
+ _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),
738
738
  )
739
- _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),
739
+ _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD10 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
740
+ )
741
+ _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
742
  )
741
743
  class _UniffiVTableCallbackInterfaceEventListener(ctypes.Structure):
742
744
  _fields_ = [
@@ -765,10 +767,11 @@ class _UniffiVTableCallbackInterfaceStorage(ctypes.Structure):
765
767
  ("insert_payment", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD4),
766
768
  ("set_payment_metadata", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD5),
767
769
  ("get_payment_by_id", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD6),
768
- ("add_deposit", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD7),
769
- ("delete_deposit", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD8),
770
- ("list_deposits", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD9),
771
- ("update_deposit", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD10),
770
+ ("get_payment_by_invoice", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD7),
771
+ ("add_deposit", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD8),
772
+ ("delete_deposit", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD9),
773
+ ("list_deposits", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD10),
774
+ ("update_deposit", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD11),
772
775
  ("uniffi_free", _UNIFFI_CALLBACK_INTERFACE_FREE),
773
776
  ]
774
777
  _UniffiLib.uniffi_breez_sdk_spark_fn_clone_bitcoinchainservice.argtypes = (
@@ -836,9 +839,8 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_delete_lightning_address.ar
836
839
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_delete_lightning_address.restype = ctypes.c_uint64
837
840
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect.argtypes = (
838
841
  ctypes.c_void_p,
839
- ctypes.POINTER(_UniffiRustCallStatus),
840
842
  )
841
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect.restype = None
843
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect.restype = ctypes.c_uint64
842
844
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_get_info.argtypes = (
843
845
  ctypes.c_void_p,
844
846
  _UniffiRustBuffer,
@@ -853,6 +855,11 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_get_payment.argtypes = (
853
855
  _UniffiRustBuffer,
854
856
  )
855
857
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_get_payment.restype = ctypes.c_uint64
858
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_get_tokens_metadata.argtypes = (
859
+ ctypes.c_void_p,
860
+ _UniffiRustBuffer,
861
+ )
862
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_get_tokens_metadata.restype = ctypes.c_uint64
856
863
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_list_fiat_currencies.argtypes = (
857
864
  ctypes.c_void_p,
858
865
  )
@@ -876,13 +883,6 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_pay.argtypes = (
876
883
  _UniffiRustBuffer,
877
884
  )
878
885
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_pay.restype = ctypes.c_uint64
879
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_poll_lightning_send_payment.argtypes = (
880
- ctypes.c_void_p,
881
- _UniffiRustBuffer,
882
- _UniffiRustBuffer,
883
- ctypes.POINTER(_UniffiRustCallStatus),
884
- )
885
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_poll_lightning_send_payment.restype = None
886
886
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_prepare_lnurl_pay.argtypes = (
887
887
  ctypes.c_void_p,
888
888
  _UniffiRustBuffer,
@@ -898,10 +898,6 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_receive_payment.argtypes =
898
898
  _UniffiRustBuffer,
899
899
  )
900
900
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_receive_payment.restype = ctypes.c_uint64
901
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_recover_lightning_address.argtypes = (
902
- ctypes.c_void_p,
903
- )
904
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_recover_lightning_address.restype = ctypes.c_uint64
905
901
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_refund_deposit.argtypes = (
906
902
  ctypes.c_void_p,
907
903
  _UniffiRustBuffer,
@@ -922,17 +918,16 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment.argtypes = (
922
918
  _UniffiRustBuffer,
923
919
  )
924
920
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment.restype = ctypes.c_uint64
925
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment_internal.argtypes = (
921
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet.argtypes = (
926
922
  ctypes.c_void_p,
927
923
  _UniffiRustBuffer,
928
- ctypes.c_int8,
929
924
  )
930
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment_internal.restype = ctypes.c_uint64
931
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet.argtypes = (
925
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet.restype = ctypes.c_uint64
926
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment.argtypes = (
932
927
  ctypes.c_void_p,
933
928
  _UniffiRustBuffer,
934
929
  )
935
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet.restype = ctypes.c_uint64
930
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment.restype = ctypes.c_uint64
936
931
  _UniffiLib.uniffi_breez_sdk_spark_fn_clone_sdkbuilder.argtypes = (
937
932
  ctypes.c_void_p,
938
933
  ctypes.POINTER(_UniffiRustCallStatus),
@@ -1015,7 +1010,6 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_set_cached_item.restype = ct
1015
1010
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_list_payments.argtypes = (
1016
1011
  ctypes.c_void_p,
1017
1012
  _UniffiRustBuffer,
1018
- _UniffiRustBuffer,
1019
1013
  )
1020
1014
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_list_payments.restype = ctypes.c_uint64
1021
1015
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_insert_payment.argtypes = (
@@ -1034,6 +1028,11 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_id.argtypes =
1034
1028
  _UniffiRustBuffer,
1035
1029
  )
1036
1030
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_id.restype = ctypes.c_uint64
1031
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_invoice.argtypes = (
1032
+ ctypes.c_void_p,
1033
+ _UniffiRustBuffer,
1034
+ )
1035
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_invoice.restype = ctypes.c_uint64
1037
1036
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_add_deposit.argtypes = (
1038
1037
  ctypes.c_void_p,
1039
1038
  _UniffiRustBuffer,
@@ -1410,6 +1409,9 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_lightning_address
1410
1409
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment.argtypes = (
1411
1410
  )
1412
1411
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment.restype = ctypes.c_uint16
1412
+ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_tokens_metadata.argtypes = (
1413
+ )
1414
+ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_tokens_metadata.restype = ctypes.c_uint16
1413
1415
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_currencies.argtypes = (
1414
1416
  )
1415
1417
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_currencies.restype = ctypes.c_uint16
@@ -1425,9 +1427,6 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_unclaimed_deposi
1425
1427
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay.argtypes = (
1426
1428
  )
1427
1429
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay.restype = ctypes.c_uint16
1428
- _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_poll_lightning_send_payment.argtypes = (
1429
- )
1430
- _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_poll_lightning_send_payment.restype = ctypes.c_uint16
1431
1430
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay.argtypes = (
1432
1431
  )
1433
1432
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay.restype = ctypes.c_uint16
@@ -1437,9 +1436,6 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment.
1437
1436
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment.argtypes = (
1438
1437
  )
1439
1438
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment.restype = ctypes.c_uint16
1440
- _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_recover_lightning_address.argtypes = (
1441
- )
1442
- _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_recover_lightning_address.restype = ctypes.c_uint16
1443
1439
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit.argtypes = (
1444
1440
  )
1445
1441
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit.restype = ctypes.c_uint16
@@ -1452,12 +1448,12 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_remove_event_listener
1452
1448
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment.argtypes = (
1453
1449
  )
1454
1450
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment.restype = ctypes.c_uint16
1455
- _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_internal.argtypes = (
1456
- )
1457
- _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_send_payment_internal.restype = ctypes.c_uint16
1458
1451
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet.argtypes = (
1459
1452
  )
1460
1453
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet.restype = ctypes.c_uint16
1454
+ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment.argtypes = (
1455
+ )
1456
+ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment.restype = ctypes.c_uint16
1461
1457
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build.argtypes = (
1462
1458
  )
1463
1459
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build.restype = ctypes.c_uint16
@@ -1497,6 +1493,9 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_set_payment_metadata.r
1497
1493
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_id.argtypes = (
1498
1494
  )
1499
1495
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_id.restype = ctypes.c_uint16
1496
+ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice.argtypes = (
1497
+ )
1498
+ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_get_payment_by_invoice.restype = ctypes.c_uint16
1500
1499
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_add_deposit.argtypes = (
1501
1500
  )
1502
1501
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_add_deposit.restype = ctypes.c_uint16
@@ -2014,6 +2013,17 @@ class BreezSdkProtocol(typing.Protocol):
2014
2013
  def get_lightning_address(self, ):
2015
2014
  raise NotImplementedError
2016
2015
  def get_payment(self, request: "GetPaymentRequest"):
2016
+ raise NotImplementedError
2017
+ def get_tokens_metadata(self, request: "GetTokensMetadataRequest"):
2018
+ """
2019
+ Returns the metadata for the given token identifiers.
2020
+
2021
+ Results are not guaranteed to be in the same order as the input token identifiers.
2022
+
2023
+ If the metadata is not found locally in cache, it will be queried from
2024
+ the Spark network and then cached.
2025
+ """
2026
+
2017
2027
  raise NotImplementedError
2018
2028
  def list_fiat_currencies(self, ):
2019
2029
  """
@@ -2051,19 +2061,11 @@ class BreezSdkProtocol(typing.Protocol):
2051
2061
  raise NotImplementedError
2052
2062
  def lnurl_pay(self, request: "LnurlPayRequest"):
2053
2063
  raise NotImplementedError
2054
- def poll_lightning_send_payment(self, payment: "Payment",ssp_id: "str"):
2055
- raise NotImplementedError
2056
2064
  def prepare_lnurl_pay(self, request: "PrepareLnurlPayRequest"):
2057
2065
  raise NotImplementedError
2058
2066
  def prepare_send_payment(self, request: "PrepareSendPaymentRequest"):
2059
2067
  raise NotImplementedError
2060
2068
  def receive_payment(self, request: "ReceivePaymentRequest"):
2061
- raise NotImplementedError
2062
- def recover_lightning_address(self, ):
2063
- """
2064
- Attempts to recover a lightning address from the lnurl server.
2065
- """
2066
-
2067
2069
  raise NotImplementedError
2068
2070
  def refund_deposit(self, request: "RefundDepositRequest"):
2069
2071
  raise NotImplementedError
@@ -2085,14 +2087,14 @@ class BreezSdkProtocol(typing.Protocol):
2085
2087
  raise NotImplementedError
2086
2088
  def send_payment(self, request: "SendPaymentRequest"):
2087
2089
  raise NotImplementedError
2088
- def send_payment_internal(self, request: "SendPaymentRequest",suppress_payment_event: "bool"):
2089
- raise NotImplementedError
2090
2090
  def sync_wallet(self, request: "SyncWalletRequest"):
2091
2091
  """
2092
2092
  Synchronizes the wallet with the Spark network
2093
2093
  """
2094
2094
 
2095
2095
  raise NotImplementedError
2096
+ def wait_for_payment(self, request: "WaitForPaymentRequest"):
2097
+ raise NotImplementedError
2096
2098
 
2097
2099
 
2098
2100
  class BreezSdk:
@@ -2220,8 +2222,8 @@ _UniffiConverterTypeSdkError,
2220
2222
 
2221
2223
 
2222
2224
 
2225
+ async def disconnect(self, ) -> None:
2223
2226
 
2224
- def disconnect(self, ) -> None:
2225
2227
  """
2226
2228
  Stops the SDK's background tasks
2227
2229
 
@@ -2233,9 +2235,21 @@ _UniffiConverterTypeSdkError,
2233
2235
  Result containing either success or an `SdkError` if the background task couldn't be stopped
2234
2236
  """
2235
2237
 
2236
- _uniffi_rust_call_with_error(_UniffiConverterTypeSdkError,_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect,self._uniffi_clone_pointer(),)
2237
-
2238
+ return await _uniffi_rust_call_async(
2239
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect(
2240
+ self._uniffi_clone_pointer(),
2241
+ ),
2242
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_void,
2243
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_void,
2244
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_free_void,
2245
+ # lift function
2246
+ lambda val: None,
2247
+
2248
+
2249
+ # Error FFI converter
2250
+ _UniffiConverterTypeSdkError,
2238
2251
 
2252
+ )
2239
2253
 
2240
2254
 
2241
2255
 
@@ -2303,6 +2317,36 @@ _UniffiConverterTypeSdkError,
2303
2317
 
2304
2318
 
2305
2319
 
2320
+ async def get_tokens_metadata(self, request: "GetTokensMetadataRequest") -> "GetTokensMetadataResponse":
2321
+ """
2322
+ Returns the metadata for the given token identifiers.
2323
+
2324
+ Results are not guaranteed to be in the same order as the input token identifiers.
2325
+
2326
+ If the metadata is not found locally in cache, it will be queried from
2327
+ the Spark network and then cached.
2328
+ """
2329
+
2330
+ _UniffiConverterTypeGetTokensMetadataRequest.check_lower(request)
2331
+
2332
+ return await _uniffi_rust_call_async(
2333
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_get_tokens_metadata(
2334
+ self._uniffi_clone_pointer(),
2335
+ _UniffiConverterTypeGetTokensMetadataRequest.lower(request)
2336
+ ),
2337
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
2338
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
2339
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
2340
+ # lift function
2341
+ _UniffiConverterTypeGetTokensMetadataResponse.lift,
2342
+
2343
+ # Error FFI converter
2344
+ _UniffiConverterTypeSdkError,
2345
+
2346
+ )
2347
+
2348
+
2349
+
2306
2350
  async def list_fiat_currencies(self, ) -> "ListFiatCurrenciesResponse":
2307
2351
  """
2308
2352
  List fiat currencies for which there is a known exchange rate,
@@ -2428,20 +2472,6 @@ _UniffiConverterTypeSdkError,
2428
2472
 
2429
2473
 
2430
2474
 
2431
-
2432
- def poll_lightning_send_payment(self, payment: "Payment",ssp_id: "str") -> None:
2433
- _UniffiConverterTypePayment.check_lower(payment)
2434
-
2435
- _UniffiConverterString.check_lower(ssp_id)
2436
-
2437
- _uniffi_rust_call(_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_poll_lightning_send_payment,self._uniffi_clone_pointer(),
2438
- _UniffiConverterTypePayment.lower(payment),
2439
- _UniffiConverterString.lower(ssp_id))
2440
-
2441
-
2442
-
2443
-
2444
-
2445
2475
  async def prepare_lnurl_pay(self, request: "PrepareLnurlPayRequest") -> "PrepareLnurlPayResponse":
2446
2476
  _UniffiConverterTypePrepareLnurlPayRequest.check_lower(request)
2447
2477
 
@@ -2505,28 +2535,6 @@ _UniffiConverterTypeSdkError,
2505
2535
 
2506
2536
 
2507
2537
 
2508
- async def recover_lightning_address(self, ) -> "typing.Optional[LightningAddressInfo]":
2509
- """
2510
- Attempts to recover a lightning address from the lnurl server.
2511
- """
2512
-
2513
- return await _uniffi_rust_call_async(
2514
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_recover_lightning_address(
2515
- self._uniffi_clone_pointer(),
2516
- ),
2517
- _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
2518
- _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
2519
- _UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
2520
- # lift function
2521
- _UniffiConverterOptionalTypeLightningAddressInfo.lift,
2522
-
2523
- # Error FFI converter
2524
- _UniffiConverterTypeSdkError,
2525
-
2526
- )
2527
-
2528
-
2529
-
2530
2538
  async def refund_deposit(self, request: "RefundDepositRequest") -> "RefundDepositResponse":
2531
2539
  _UniffiConverterTypeRefundDepositRequest.check_lower(request)
2532
2540
 
@@ -2624,22 +2632,23 @@ _UniffiConverterTypeSdkError,
2624
2632
 
2625
2633
 
2626
2634
 
2627
- async def send_payment_internal(self, request: "SendPaymentRequest",suppress_payment_event: "bool") -> "SendPaymentResponse":
2628
- _UniffiConverterTypeSendPaymentRequest.check_lower(request)
2629
-
2630
- _UniffiConverterBool.check_lower(suppress_payment_event)
2635
+ async def sync_wallet(self, request: "SyncWalletRequest") -> "SyncWalletResponse":
2636
+ """
2637
+ Synchronizes the wallet with the Spark network
2638
+ """
2639
+
2640
+ _UniffiConverterTypeSyncWalletRequest.check_lower(request)
2631
2641
 
2632
2642
  return await _uniffi_rust_call_async(
2633
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_send_payment_internal(
2643
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
2634
2644
  self._uniffi_clone_pointer(),
2635
- _UniffiConverterTypeSendPaymentRequest.lower(request),
2636
- _UniffiConverterBool.lower(suppress_payment_event)
2645
+ _UniffiConverterTypeSyncWalletRequest.lower(request)
2637
2646
  ),
2638
2647
  _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
2639
2648
  _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
2640
2649
  _UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
2641
2650
  # lift function
2642
- _UniffiConverterTypeSendPaymentResponse.lift,
2651
+ _UniffiConverterTypeSyncWalletResponse.lift,
2643
2652
 
2644
2653
  # Error FFI converter
2645
2654
  _UniffiConverterTypeSdkError,
@@ -2648,23 +2657,19 @@ _UniffiConverterTypeSdkError,
2648
2657
 
2649
2658
 
2650
2659
 
2651
- async def sync_wallet(self, request: "SyncWalletRequest") -> "SyncWalletResponse":
2652
- """
2653
- Synchronizes the wallet with the Spark network
2654
- """
2655
-
2656
- _UniffiConverterTypeSyncWalletRequest.check_lower(request)
2660
+ async def wait_for_payment(self, request: "WaitForPaymentRequest") -> "WaitForPaymentResponse":
2661
+ _UniffiConverterTypeWaitForPaymentRequest.check_lower(request)
2657
2662
 
2658
2663
  return await _uniffi_rust_call_async(
2659
- _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_sync_wallet(
2664
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment(
2660
2665
  self._uniffi_clone_pointer(),
2661
- _UniffiConverterTypeSyncWalletRequest.lower(request)
2666
+ _UniffiConverterTypeWaitForPaymentRequest.lower(request)
2662
2667
  ),
2663
2668
  _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
2664
2669
  _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
2665
2670
  _UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
2666
2671
  # lift function
2667
- _UniffiConverterTypeSyncWalletResponse.lift,
2672
+ _UniffiConverterTypeWaitForPaymentResponse.lift,
2668
2673
 
2669
2674
  # Error FFI converter
2670
2675
  _UniffiConverterTypeSdkError,
@@ -3018,14 +3023,13 @@ class Storage(typing.Protocol):
3018
3023
  raise NotImplementedError
3019
3024
  def set_cached_item(self, key: "str",value: "str"):
3020
3025
  raise NotImplementedError
3021
- def list_payments(self, offset: "typing.Optional[int]",limit: "typing.Optional[int]"):
3026
+ def list_payments(self, request: "ListPaymentsRequest"):
3022
3027
  """
3023
- Lists payments with pagination
3028
+ Lists payments with optional filters and pagination
3024
3029
 
3025
3030
  # Arguments
3026
3031
 
3027
- * `offset` - Number of records to skip
3028
- * `limit` - Maximum number of records to return
3032
+ * `list_payments_request` - The request to list payments
3029
3033
 
3030
3034
  # Returns
3031
3035
 
@@ -3074,6 +3078,18 @@ class Storage(typing.Protocol):
3074
3078
  The payment if found or None if not found
3075
3079
  """
3076
3080
 
3081
+ raise NotImplementedError
3082
+ def get_payment_by_invoice(self, invoice: "str"):
3083
+ """
3084
+ Gets a payment by its invoice
3085
+ # Arguments
3086
+
3087
+ * `invoice` - The invoice of the payment to retrieve
3088
+ # Returns
3089
+
3090
+ The payment if found or None if not found
3091
+ """
3092
+
3077
3093
  raise NotImplementedError
3078
3094
  def add_deposit(self, txid: "str",vout: "int",amount_sats: "int"):
3079
3095
  """
@@ -3228,29 +3244,25 @@ _UniffiConverterTypeStorageError,
3228
3244
 
3229
3245
 
3230
3246
 
3231
- async def list_payments(self, offset: "typing.Optional[int]",limit: "typing.Optional[int]") -> "typing.List[Payment]":
3247
+ async def list_payments(self, request: "ListPaymentsRequest") -> "typing.List[Payment]":
3232
3248
  """
3233
- Lists payments with pagination
3249
+ Lists payments with optional filters and pagination
3234
3250
 
3235
3251
  # Arguments
3236
3252
 
3237
- * `offset` - Number of records to skip
3238
- * `limit` - Maximum number of records to return
3253
+ * `list_payments_request` - The request to list payments
3239
3254
 
3240
3255
  # Returns
3241
3256
 
3242
3257
  A vector of payments or a `StorageError`
3243
3258
  """
3244
3259
 
3245
- _UniffiConverterOptionalUInt32.check_lower(offset)
3246
-
3247
- _UniffiConverterOptionalUInt32.check_lower(limit)
3260
+ _UniffiConverterTypeListPaymentsRequest.check_lower(request)
3248
3261
 
3249
3262
  return await _uniffi_rust_call_async(
3250
3263
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_list_payments(
3251
3264
  self._uniffi_clone_pointer(),
3252
- _UniffiConverterOptionalUInt32.lower(offset),
3253
- _UniffiConverterOptionalUInt32.lower(limit)
3265
+ _UniffiConverterTypeListPaymentsRequest.lower(request)
3254
3266
  ),
3255
3267
  _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
3256
3268
  _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
@@ -3371,6 +3383,37 @@ _UniffiConverterTypeStorageError,
3371
3383
 
3372
3384
 
3373
3385
 
3386
+ async def get_payment_by_invoice(self, invoice: "str") -> "typing.Optional[Payment]":
3387
+ """
3388
+ Gets a payment by its invoice
3389
+ # Arguments
3390
+
3391
+ * `invoice` - The invoice of the payment to retrieve
3392
+ # Returns
3393
+
3394
+ The payment if found or None if not found
3395
+ """
3396
+
3397
+ _UniffiConverterString.check_lower(invoice)
3398
+
3399
+ return await _uniffi_rust_call_async(
3400
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_get_payment_by_invoice(
3401
+ self._uniffi_clone_pointer(),
3402
+ _UniffiConverterString.lower(invoice)
3403
+ ),
3404
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
3405
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
3406
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
3407
+ # lift function
3408
+ _UniffiConverterOptionalTypePayment.lift,
3409
+
3410
+ # Error FFI converter
3411
+ _UniffiConverterTypeStorageError,
3412
+
3413
+ )
3414
+
3415
+
3416
+
3374
3417
  async def add_deposit(self, txid: "str",vout: "int",amount_sats: "int") -> None:
3375
3418
 
3376
3419
  """
@@ -3625,15 +3668,14 @@ class _UniffiTraitImplStorage:
3625
3668
  @_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD3
3626
3669
  def list_payments(
3627
3670
  uniffi_handle,
3628
- offset,
3629
- limit,
3671
+ request,
3630
3672
  uniffi_future_callback,
3631
3673
  uniffi_callback_data,
3632
3674
  uniffi_out_return,
3633
3675
  ):
3634
3676
  uniffi_obj = _UniffiConverterTypeStorage._handle_map.get(uniffi_handle)
3635
3677
  def make_call():
3636
- args = (_UniffiConverterOptionalUInt32.lift(offset), _UniffiConverterOptionalUInt32.lift(limit), )
3678
+ args = (_UniffiConverterTypeListPaymentsRequest.lift(request), )
3637
3679
  method = uniffi_obj.list_payments
3638
3680
  return method(*args)
3639
3681
 
@@ -3757,6 +3799,40 @@ class _UniffiTraitImplStorage:
3757
3799
  uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, StorageError, _UniffiConverterTypeStorageError.lower)
3758
3800
 
3759
3801
  @_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD7
3802
+ def get_payment_by_invoice(
3803
+ uniffi_handle,
3804
+ invoice,
3805
+ uniffi_future_callback,
3806
+ uniffi_callback_data,
3807
+ uniffi_out_return,
3808
+ ):
3809
+ uniffi_obj = _UniffiConverterTypeStorage._handle_map.get(uniffi_handle)
3810
+ def make_call():
3811
+ args = (_UniffiConverterString.lift(invoice), )
3812
+ method = uniffi_obj.get_payment_by_invoice
3813
+ return method(*args)
3814
+
3815
+
3816
+ def handle_success(return_value):
3817
+ uniffi_future_callback(
3818
+ uniffi_callback_data,
3819
+ _UniffiForeignFutureStructRustBuffer(
3820
+ _UniffiConverterOptionalTypePayment.lower(return_value),
3821
+ _UniffiRustCallStatus.default()
3822
+ )
3823
+ )
3824
+
3825
+ def handle_error(status_code, rust_buffer):
3826
+ uniffi_future_callback(
3827
+ uniffi_callback_data,
3828
+ _UniffiForeignFutureStructRustBuffer(
3829
+ _UniffiRustBuffer.default(),
3830
+ _UniffiRustCallStatus(status_code, rust_buffer),
3831
+ )
3832
+ )
3833
+ uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, StorageError, _UniffiConverterTypeStorageError.lower)
3834
+
3835
+ @_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD8
3760
3836
  def add_deposit(
3761
3837
  uniffi_handle,
3762
3838
  txid,
@@ -3790,7 +3866,7 @@ class _UniffiTraitImplStorage:
3790
3866
  )
3791
3867
  uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, StorageError, _UniffiConverterTypeStorageError.lower)
3792
3868
 
3793
- @_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD8
3869
+ @_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD9
3794
3870
  def delete_deposit(
3795
3871
  uniffi_handle,
3796
3872
  txid,
@@ -3823,7 +3899,7 @@ class _UniffiTraitImplStorage:
3823
3899
  )
3824
3900
  uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, StorageError, _UniffiConverterTypeStorageError.lower)
3825
3901
 
3826
- @_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD9
3902
+ @_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD10
3827
3903
  def list_deposits(
3828
3904
  uniffi_handle,
3829
3905
  uniffi_future_callback,
@@ -3856,7 +3932,7 @@ class _UniffiTraitImplStorage:
3856
3932
  )
3857
3933
  uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, StorageError, _UniffiConverterTypeStorageError.lower)
3858
3934
 
3859
- @_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD10
3935
+ @_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD11
3860
3936
  def update_deposit(
3861
3937
  uniffi_handle,
3862
3938
  txid,
@@ -3903,6 +3979,7 @@ class _UniffiTraitImplStorage:
3903
3979
  insert_payment,
3904
3980
  set_payment_metadata,
3905
3981
  get_payment_by_id,
3982
+ get_payment_by_invoice,
3906
3983
  add_deposit,
3907
3984
  delete_deposit,
3908
3985
  list_deposits,
@@ -4306,15 +4383,23 @@ class GetInfoResponse:
4306
4383
  The balance in satoshis
4307
4384
  """
4308
4385
 
4309
- def __init__(self, *, balance_sats: "int"):
4386
+ token_balances: "dict[str, TokenBalance]"
4387
+ """
4388
+ The balances of the tokens in the wallet keyed by the token identifier
4389
+ """
4390
+
4391
+ def __init__(self, *, balance_sats: "int", token_balances: "dict[str, TokenBalance]"):
4310
4392
  self.balance_sats = balance_sats
4393
+ self.token_balances = token_balances
4311
4394
 
4312
4395
  def __str__(self):
4313
- return "GetInfoResponse(balance_sats={})".format(self.balance_sats)
4396
+ return "GetInfoResponse(balance_sats={}, token_balances={})".format(self.balance_sats, self.token_balances)
4314
4397
 
4315
4398
  def __eq__(self, other):
4316
4399
  if self.balance_sats != other.balance_sats:
4317
4400
  return False
4401
+ if self.token_balances != other.token_balances:
4402
+ return False
4318
4403
  return True
4319
4404
 
4320
4405
  class _UniffiConverterTypeGetInfoResponse(_UniffiConverterRustBuffer):
@@ -4322,15 +4407,18 @@ class _UniffiConverterTypeGetInfoResponse(_UniffiConverterRustBuffer):
4322
4407
  def read(buf):
4323
4408
  return GetInfoResponse(
4324
4409
  balance_sats=_UniffiConverterUInt64.read(buf),
4410
+ token_balances=_UniffiConverterMapStringTypeTokenBalance.read(buf),
4325
4411
  )
4326
4412
 
4327
4413
  @staticmethod
4328
4414
  def check_lower(value):
4329
4415
  _UniffiConverterUInt64.check_lower(value.balance_sats)
4416
+ _UniffiConverterMapStringTypeTokenBalance.check_lower(value.token_balances)
4330
4417
 
4331
4418
  @staticmethod
4332
4419
  def write(value, buf):
4333
4420
  _UniffiConverterUInt64.write(value.balance_sats, buf)
4421
+ _UniffiConverterMapStringTypeTokenBalance.write(value.token_balances, buf)
4334
4422
 
4335
4423
 
4336
4424
  class GetPaymentRequest:
@@ -4391,6 +4479,64 @@ class _UniffiConverterTypeGetPaymentResponse(_UniffiConverterRustBuffer):
4391
4479
  _UniffiConverterTypePayment.write(value.payment, buf)
4392
4480
 
4393
4481
 
4482
+ class GetTokensMetadataRequest:
4483
+ token_identifiers: "typing.List[str]"
4484
+ def __init__(self, *, token_identifiers: "typing.List[str]"):
4485
+ self.token_identifiers = token_identifiers
4486
+
4487
+ def __str__(self):
4488
+ return "GetTokensMetadataRequest(token_identifiers={})".format(self.token_identifiers)
4489
+
4490
+ def __eq__(self, other):
4491
+ if self.token_identifiers != other.token_identifiers:
4492
+ return False
4493
+ return True
4494
+
4495
+ class _UniffiConverterTypeGetTokensMetadataRequest(_UniffiConverterRustBuffer):
4496
+ @staticmethod
4497
+ def read(buf):
4498
+ return GetTokensMetadataRequest(
4499
+ token_identifiers=_UniffiConverterSequenceString.read(buf),
4500
+ )
4501
+
4502
+ @staticmethod
4503
+ def check_lower(value):
4504
+ _UniffiConverterSequenceString.check_lower(value.token_identifiers)
4505
+
4506
+ @staticmethod
4507
+ def write(value, buf):
4508
+ _UniffiConverterSequenceString.write(value.token_identifiers, buf)
4509
+
4510
+
4511
+ class GetTokensMetadataResponse:
4512
+ tokens_metadata: "typing.List[TokenMetadata]"
4513
+ def __init__(self, *, tokens_metadata: "typing.List[TokenMetadata]"):
4514
+ self.tokens_metadata = tokens_metadata
4515
+
4516
+ def __str__(self):
4517
+ return "GetTokensMetadataResponse(tokens_metadata={})".format(self.tokens_metadata)
4518
+
4519
+ def __eq__(self, other):
4520
+ if self.tokens_metadata != other.tokens_metadata:
4521
+ return False
4522
+ return True
4523
+
4524
+ class _UniffiConverterTypeGetTokensMetadataResponse(_UniffiConverterRustBuffer):
4525
+ @staticmethod
4526
+ def read(buf):
4527
+ return GetTokensMetadataResponse(
4528
+ tokens_metadata=_UniffiConverterSequenceTypeTokenMetadata.read(buf),
4529
+ )
4530
+
4531
+ @staticmethod
4532
+ def check_lower(value):
4533
+ _UniffiConverterSequenceTypeTokenMetadata.check_lower(value.tokens_metadata)
4534
+
4535
+ @staticmethod
4536
+ def write(value, buf):
4537
+ _UniffiConverterSequenceTypeTokenMetadata.write(value.tokens_metadata, buf)
4538
+
4539
+
4394
4540
  class LightningAddressInfo:
4395
4541
  description: "str"
4396
4542
  lightning_address: "str"
@@ -4517,7 +4663,20 @@ class _UniffiConverterTypeListFiatRatesResponse(_UniffiConverterRustBuffer):
4517
4663
 
4518
4664
  class ListPaymentsRequest:
4519
4665
  """
4520
- Request to list payments with pagination
4666
+ Request to list payments with optional filters and pagination
4667
+ """
4668
+
4669
+ type_filter: "typing.Optional[typing.List[PaymentType]]"
4670
+ status_filter: "typing.Optional[typing.List[PaymentStatus]]"
4671
+ asset_filter: "typing.Optional[AssetFilter]"
4672
+ from_timestamp: "typing.Optional[int]"
4673
+ """
4674
+ Only include payments created after this timestamp (inclusive)
4675
+ """
4676
+
4677
+ to_timestamp: "typing.Optional[int]"
4678
+ """
4679
+ Only include payments created before this timestamp (exclusive)
4521
4680
  """
4522
4681
 
4523
4682
  offset: "typing.Optional[int]"
@@ -4530,7 +4689,28 @@ class ListPaymentsRequest:
4530
4689
  Maximum number of records to return
4531
4690
  """
4532
4691
 
4533
- def __init__(self, *, offset: "typing.Optional[int]" = _DEFAULT, limit: "typing.Optional[int]" = _DEFAULT):
4692
+ sort_ascending: "typing.Optional[bool]"
4693
+ def __init__(self, *, type_filter: "typing.Optional[typing.List[PaymentType]]" = _DEFAULT, status_filter: "typing.Optional[typing.List[PaymentStatus]]" = _DEFAULT, asset_filter: "typing.Optional[AssetFilter]" = _DEFAULT, from_timestamp: "typing.Optional[int]" = _DEFAULT, to_timestamp: "typing.Optional[int]" = _DEFAULT, offset: "typing.Optional[int]" = _DEFAULT, limit: "typing.Optional[int]" = _DEFAULT, sort_ascending: "typing.Optional[bool]" = _DEFAULT):
4694
+ if type_filter is _DEFAULT:
4695
+ self.type_filter = None
4696
+ else:
4697
+ self.type_filter = type_filter
4698
+ if status_filter is _DEFAULT:
4699
+ self.status_filter = None
4700
+ else:
4701
+ self.status_filter = status_filter
4702
+ if asset_filter is _DEFAULT:
4703
+ self.asset_filter = None
4704
+ else:
4705
+ self.asset_filter = asset_filter
4706
+ if from_timestamp is _DEFAULT:
4707
+ self.from_timestamp = None
4708
+ else:
4709
+ self.from_timestamp = from_timestamp
4710
+ if to_timestamp is _DEFAULT:
4711
+ self.to_timestamp = None
4712
+ else:
4713
+ self.to_timestamp = to_timestamp
4534
4714
  if offset is _DEFAULT:
4535
4715
  self.offset = None
4536
4716
  else:
@@ -4539,34 +4719,68 @@ class ListPaymentsRequest:
4539
4719
  self.limit = None
4540
4720
  else:
4541
4721
  self.limit = limit
4722
+ if sort_ascending is _DEFAULT:
4723
+ self.sort_ascending = None
4724
+ else:
4725
+ self.sort_ascending = sort_ascending
4542
4726
 
4543
4727
  def __str__(self):
4544
- return "ListPaymentsRequest(offset={}, limit={})".format(self.offset, self.limit)
4728
+ return "ListPaymentsRequest(type_filter={}, status_filter={}, asset_filter={}, from_timestamp={}, to_timestamp={}, offset={}, limit={}, sort_ascending={})".format(self.type_filter, self.status_filter, self.asset_filter, self.from_timestamp, self.to_timestamp, self.offset, self.limit, self.sort_ascending)
4545
4729
 
4546
4730
  def __eq__(self, other):
4547
- if self.offset != other.offset:
4731
+ if self.type_filter != other.type_filter:
4548
4732
  return False
4549
- if self.limit != other.limit:
4733
+ if self.status_filter != other.status_filter:
4550
4734
  return False
4551
- return True
4735
+ if self.asset_filter != other.asset_filter:
4736
+ return False
4737
+ if self.from_timestamp != other.from_timestamp:
4738
+ return False
4739
+ if self.to_timestamp != other.to_timestamp:
4740
+ return False
4741
+ if self.offset != other.offset:
4742
+ return False
4743
+ if self.limit != other.limit:
4744
+ return False
4745
+ if self.sort_ascending != other.sort_ascending:
4746
+ return False
4747
+ return True
4552
4748
 
4553
4749
  class _UniffiConverterTypeListPaymentsRequest(_UniffiConverterRustBuffer):
4554
4750
  @staticmethod
4555
4751
  def read(buf):
4556
4752
  return ListPaymentsRequest(
4753
+ type_filter=_UniffiConverterOptionalSequenceTypePaymentType.read(buf),
4754
+ status_filter=_UniffiConverterOptionalSequenceTypePaymentStatus.read(buf),
4755
+ asset_filter=_UniffiConverterOptionalTypeAssetFilter.read(buf),
4756
+ from_timestamp=_UniffiConverterOptionalUInt64.read(buf),
4757
+ to_timestamp=_UniffiConverterOptionalUInt64.read(buf),
4557
4758
  offset=_UniffiConverterOptionalUInt32.read(buf),
4558
4759
  limit=_UniffiConverterOptionalUInt32.read(buf),
4760
+ sort_ascending=_UniffiConverterOptionalBool.read(buf),
4559
4761
  )
4560
4762
 
4561
4763
  @staticmethod
4562
4764
  def check_lower(value):
4765
+ _UniffiConverterOptionalSequenceTypePaymentType.check_lower(value.type_filter)
4766
+ _UniffiConverterOptionalSequenceTypePaymentStatus.check_lower(value.status_filter)
4767
+ _UniffiConverterOptionalTypeAssetFilter.check_lower(value.asset_filter)
4768
+ _UniffiConverterOptionalUInt64.check_lower(value.from_timestamp)
4769
+ _UniffiConverterOptionalUInt64.check_lower(value.to_timestamp)
4563
4770
  _UniffiConverterOptionalUInt32.check_lower(value.offset)
4564
4771
  _UniffiConverterOptionalUInt32.check_lower(value.limit)
4772
+ _UniffiConverterOptionalBool.check_lower(value.sort_ascending)
4565
4773
 
4566
4774
  @staticmethod
4567
4775
  def write(value, buf):
4776
+ _UniffiConverterOptionalSequenceTypePaymentType.write(value.type_filter, buf)
4777
+ _UniffiConverterOptionalSequenceTypePaymentStatus.write(value.status_filter, buf)
4778
+ _UniffiConverterOptionalTypeAssetFilter.write(value.asset_filter, buf)
4779
+ _UniffiConverterOptionalUInt64.write(value.from_timestamp, buf)
4780
+ _UniffiConverterOptionalUInt64.write(value.to_timestamp, buf)
4568
4781
  _UniffiConverterOptionalUInt32.write(value.offset, buf)
4569
4782
  _UniffiConverterOptionalUInt32.write(value.limit, buf)
4783
+ _UniffiConverterOptionalBool.write(value.sort_ascending, buf)
4570
4784
 
4571
4785
 
4572
4786
  class ListPaymentsResponse:
@@ -4847,12 +5061,12 @@ class Payment:
4847
5061
  Status of the payment
4848
5062
  """
4849
5063
 
4850
- amount: "int"
5064
+ amount: "U128"
4851
5065
  """
4852
5066
  Amount in satoshis
4853
5067
  """
4854
5068
 
4855
- fees: "int"
5069
+ fees: "U128"
4856
5070
  """
4857
5071
  Fee paid in satoshis
4858
5072
  """
@@ -4873,7 +5087,7 @@ class Payment:
4873
5087
  Details of the payment
4874
5088
  """
4875
5089
 
4876
- def __init__(self, *, id: "str", payment_type: "PaymentType", status: "PaymentStatus", amount: "int", fees: "int", timestamp: "int", method: "PaymentMethod", details: "typing.Optional[PaymentDetails]"):
5090
+ def __init__(self, *, id: "str", payment_type: "PaymentType", status: "PaymentStatus", amount: "U128", fees: "U128", timestamp: "int", method: "PaymentMethod", details: "typing.Optional[PaymentDetails]"):
4877
5091
  self.id = id
4878
5092
  self.payment_type = payment_type
4879
5093
  self.status = status
@@ -4912,8 +5126,8 @@ class _UniffiConverterTypePayment(_UniffiConverterRustBuffer):
4912
5126
  id=_UniffiConverterString.read(buf),
4913
5127
  payment_type=_UniffiConverterTypePaymentType.read(buf),
4914
5128
  status=_UniffiConverterTypePaymentStatus.read(buf),
4915
- amount=_UniffiConverterUInt64.read(buf),
4916
- fees=_UniffiConverterUInt64.read(buf),
5129
+ amount=_UniffiConverterTypeU128.read(buf),
5130
+ fees=_UniffiConverterTypeU128.read(buf),
4917
5131
  timestamp=_UniffiConverterUInt64.read(buf),
4918
5132
  method=_UniffiConverterTypePaymentMethod.read(buf),
4919
5133
  details=_UniffiConverterOptionalTypePaymentDetails.read(buf),
@@ -4924,8 +5138,8 @@ class _UniffiConverterTypePayment(_UniffiConverterRustBuffer):
4924
5138
  _UniffiConverterString.check_lower(value.id)
4925
5139
  _UniffiConverterTypePaymentType.check_lower(value.payment_type)
4926
5140
  _UniffiConverterTypePaymentStatus.check_lower(value.status)
4927
- _UniffiConverterUInt64.check_lower(value.amount)
4928
- _UniffiConverterUInt64.check_lower(value.fees)
5141
+ _UniffiConverterTypeU128.check_lower(value.amount)
5142
+ _UniffiConverterTypeU128.check_lower(value.fees)
4929
5143
  _UniffiConverterUInt64.check_lower(value.timestamp)
4930
5144
  _UniffiConverterTypePaymentMethod.check_lower(value.method)
4931
5145
  _UniffiConverterOptionalTypePaymentDetails.check_lower(value.details)
@@ -4935,8 +5149,8 @@ class _UniffiConverterTypePayment(_UniffiConverterRustBuffer):
4935
5149
  _UniffiConverterString.write(value.id, buf)
4936
5150
  _UniffiConverterTypePaymentType.write(value.payment_type, buf)
4937
5151
  _UniffiConverterTypePaymentStatus.write(value.status, buf)
4938
- _UniffiConverterUInt64.write(value.amount, buf)
4939
- _UniffiConverterUInt64.write(value.fees, buf)
5152
+ _UniffiConverterTypeU128.write(value.amount, buf)
5153
+ _UniffiConverterTypeU128.write(value.fees, buf)
4940
5154
  _UniffiConverterUInt64.write(value.timestamp, buf)
4941
5155
  _UniffiConverterTypePaymentMethod.write(value.method, buf)
4942
5156
  _UniffiConverterOptionalTypePaymentDetails.write(value.details, buf)
@@ -5104,21 +5318,38 @@ class _UniffiConverterTypePrepareLnurlPayResponse(_UniffiConverterRustBuffer):
5104
5318
 
5105
5319
  class PrepareSendPaymentRequest:
5106
5320
  payment_request: "str"
5107
- amount_sats: "typing.Optional[int]"
5108
- def __init__(self, *, payment_request: "str", amount_sats: "typing.Optional[int]" = _DEFAULT):
5321
+ amount: "typing.Optional[U128]"
5322
+ """
5323
+ Amount to send. By default is denominated in sats.
5324
+ If a token identifier is provided, the amount will be denominated in the token base units.
5325
+ """
5326
+
5327
+ token_identifier: "typing.Optional[str]"
5328
+ """
5329
+ If provided, the payment will be for a token
5330
+ May only be provided if the payment request is a spark address
5331
+ """
5332
+
5333
+ def __init__(self, *, payment_request: "str", amount: "typing.Optional[U128]" = _DEFAULT, token_identifier: "typing.Optional[str]" = _DEFAULT):
5109
5334
  self.payment_request = payment_request
5110
- if amount_sats is _DEFAULT:
5111
- self.amount_sats = None
5335
+ if amount is _DEFAULT:
5336
+ self.amount = None
5112
5337
  else:
5113
- self.amount_sats = amount_sats
5338
+ self.amount = amount
5339
+ if token_identifier is _DEFAULT:
5340
+ self.token_identifier = None
5341
+ else:
5342
+ self.token_identifier = token_identifier
5114
5343
 
5115
5344
  def __str__(self):
5116
- return "PrepareSendPaymentRequest(payment_request={}, amount_sats={})".format(self.payment_request, self.amount_sats)
5345
+ return "PrepareSendPaymentRequest(payment_request={}, amount={}, token_identifier={})".format(self.payment_request, self.amount, self.token_identifier)
5117
5346
 
5118
5347
  def __eq__(self, other):
5119
5348
  if self.payment_request != other.payment_request:
5120
5349
  return False
5121
- if self.amount_sats != other.amount_sats:
5350
+ if self.amount != other.amount:
5351
+ return False
5352
+ if self.token_identifier != other.token_identifier:
5122
5353
  return False
5123
5354
  return True
5124
5355
 
@@ -5127,34 +5358,51 @@ class _UniffiConverterTypePrepareSendPaymentRequest(_UniffiConverterRustBuffer):
5127
5358
  def read(buf):
5128
5359
  return PrepareSendPaymentRequest(
5129
5360
  payment_request=_UniffiConverterString.read(buf),
5130
- amount_sats=_UniffiConverterOptionalUInt64.read(buf),
5361
+ amount=_UniffiConverterOptionalTypeU128.read(buf),
5362
+ token_identifier=_UniffiConverterOptionalString.read(buf),
5131
5363
  )
5132
5364
 
5133
5365
  @staticmethod
5134
5366
  def check_lower(value):
5135
5367
  _UniffiConverterString.check_lower(value.payment_request)
5136
- _UniffiConverterOptionalUInt64.check_lower(value.amount_sats)
5368
+ _UniffiConverterOptionalTypeU128.check_lower(value.amount)
5369
+ _UniffiConverterOptionalString.check_lower(value.token_identifier)
5137
5370
 
5138
5371
  @staticmethod
5139
5372
  def write(value, buf):
5140
5373
  _UniffiConverterString.write(value.payment_request, buf)
5141
- _UniffiConverterOptionalUInt64.write(value.amount_sats, buf)
5374
+ _UniffiConverterOptionalTypeU128.write(value.amount, buf)
5375
+ _UniffiConverterOptionalString.write(value.token_identifier, buf)
5142
5376
 
5143
5377
 
5144
5378
  class PrepareSendPaymentResponse:
5145
5379
  payment_method: "SendPaymentMethod"
5146
- amount_sats: "int"
5147
- def __init__(self, *, payment_method: "SendPaymentMethod", amount_sats: "int"):
5380
+ amount: "U128"
5381
+ """
5382
+ Amount to send. By default is denominated in sats.
5383
+ If a token identifier is provided, the amount will be denominated in the token base units.
5384
+ """
5385
+
5386
+ token_identifier: "typing.Optional[str]"
5387
+ """
5388
+ The presence of this field indicates that the payment is for a token
5389
+ If empty, it is a Bitcoin payment
5390
+ """
5391
+
5392
+ def __init__(self, *, payment_method: "SendPaymentMethod", amount: "U128", token_identifier: "typing.Optional[str]"):
5148
5393
  self.payment_method = payment_method
5149
- self.amount_sats = amount_sats
5394
+ self.amount = amount
5395
+ self.token_identifier = token_identifier
5150
5396
 
5151
5397
  def __str__(self):
5152
- return "PrepareSendPaymentResponse(payment_method={}, amount_sats={})".format(self.payment_method, self.amount_sats)
5398
+ return "PrepareSendPaymentResponse(payment_method={}, amount={}, token_identifier={})".format(self.payment_method, self.amount, self.token_identifier)
5153
5399
 
5154
5400
  def __eq__(self, other):
5155
5401
  if self.payment_method != other.payment_method:
5156
5402
  return False
5157
- if self.amount_sats != other.amount_sats:
5403
+ if self.amount != other.amount:
5404
+ return False
5405
+ if self.token_identifier != other.token_identifier:
5158
5406
  return False
5159
5407
  return True
5160
5408
 
@@ -5163,18 +5411,21 @@ class _UniffiConverterTypePrepareSendPaymentResponse(_UniffiConverterRustBuffer)
5163
5411
  def read(buf):
5164
5412
  return PrepareSendPaymentResponse(
5165
5413
  payment_method=_UniffiConverterTypeSendPaymentMethod.read(buf),
5166
- amount_sats=_UniffiConverterUInt64.read(buf),
5414
+ amount=_UniffiConverterTypeU128.read(buf),
5415
+ token_identifier=_UniffiConverterOptionalString.read(buf),
5167
5416
  )
5168
5417
 
5169
5418
  @staticmethod
5170
5419
  def check_lower(value):
5171
5420
  _UniffiConverterTypeSendPaymentMethod.check_lower(value.payment_method)
5172
- _UniffiConverterUInt64.check_lower(value.amount_sats)
5421
+ _UniffiConverterTypeU128.check_lower(value.amount)
5422
+ _UniffiConverterOptionalString.check_lower(value.token_identifier)
5173
5423
 
5174
5424
  @staticmethod
5175
5425
  def write(value, buf):
5176
5426
  _UniffiConverterTypeSendPaymentMethod.write(value.payment_method, buf)
5177
- _UniffiConverterUInt64.write(value.amount_sats, buf)
5427
+ _UniffiConverterTypeU128.write(value.amount, buf)
5428
+ _UniffiConverterOptionalString.write(value.token_identifier, buf)
5178
5429
 
5179
5430
 
5180
5431
  class ReceivePaymentRequest:
@@ -5582,6 +5833,121 @@ class _UniffiConverterTypeSyncWalletResponse(_UniffiConverterRustBuffer):
5582
5833
  pass
5583
5834
 
5584
5835
 
5836
+ class TokenBalance:
5837
+ balance: "U128"
5838
+ token_metadata: "TokenMetadata"
5839
+ def __init__(self, *, balance: "U128", token_metadata: "TokenMetadata"):
5840
+ self.balance = balance
5841
+ self.token_metadata = token_metadata
5842
+
5843
+ def __str__(self):
5844
+ return "TokenBalance(balance={}, token_metadata={})".format(self.balance, self.token_metadata)
5845
+
5846
+ def __eq__(self, other):
5847
+ if self.balance != other.balance:
5848
+ return False
5849
+ if self.token_metadata != other.token_metadata:
5850
+ return False
5851
+ return True
5852
+
5853
+ class _UniffiConverterTypeTokenBalance(_UniffiConverterRustBuffer):
5854
+ @staticmethod
5855
+ def read(buf):
5856
+ return TokenBalance(
5857
+ balance=_UniffiConverterTypeU128.read(buf),
5858
+ token_metadata=_UniffiConverterTypeTokenMetadata.read(buf),
5859
+ )
5860
+
5861
+ @staticmethod
5862
+ def check_lower(value):
5863
+ _UniffiConverterTypeU128.check_lower(value.balance)
5864
+ _UniffiConverterTypeTokenMetadata.check_lower(value.token_metadata)
5865
+
5866
+ @staticmethod
5867
+ def write(value, buf):
5868
+ _UniffiConverterTypeU128.write(value.balance, buf)
5869
+ _UniffiConverterTypeTokenMetadata.write(value.token_metadata, buf)
5870
+
5871
+
5872
+ class TokenMetadata:
5873
+ identifier: "str"
5874
+ issuer_public_key: "str"
5875
+ """
5876
+ Hex representation of the issuer public key
5877
+ """
5878
+
5879
+ name: "str"
5880
+ ticker: "str"
5881
+ decimals: "int"
5882
+ """
5883
+ Number of decimals the token uses
5884
+ """
5885
+
5886
+ max_supply: "U128"
5887
+ is_freezable: "bool"
5888
+ def __init__(self, *, identifier: "str", issuer_public_key: "str", name: "str", ticker: "str", decimals: "int", max_supply: "U128", is_freezable: "bool"):
5889
+ self.identifier = identifier
5890
+ self.issuer_public_key = issuer_public_key
5891
+ self.name = name
5892
+ self.ticker = ticker
5893
+ self.decimals = decimals
5894
+ self.max_supply = max_supply
5895
+ self.is_freezable = is_freezable
5896
+
5897
+ def __str__(self):
5898
+ return "TokenMetadata(identifier={}, issuer_public_key={}, name={}, ticker={}, decimals={}, max_supply={}, is_freezable={})".format(self.identifier, self.issuer_public_key, self.name, self.ticker, self.decimals, self.max_supply, self.is_freezable)
5899
+
5900
+ def __eq__(self, other):
5901
+ if self.identifier != other.identifier:
5902
+ return False
5903
+ if self.issuer_public_key != other.issuer_public_key:
5904
+ return False
5905
+ if self.name != other.name:
5906
+ return False
5907
+ if self.ticker != other.ticker:
5908
+ return False
5909
+ if self.decimals != other.decimals:
5910
+ return False
5911
+ if self.max_supply != other.max_supply:
5912
+ return False
5913
+ if self.is_freezable != other.is_freezable:
5914
+ return False
5915
+ return True
5916
+
5917
+ class _UniffiConverterTypeTokenMetadata(_UniffiConverterRustBuffer):
5918
+ @staticmethod
5919
+ def read(buf):
5920
+ return TokenMetadata(
5921
+ identifier=_UniffiConverterString.read(buf),
5922
+ issuer_public_key=_UniffiConverterString.read(buf),
5923
+ name=_UniffiConverterString.read(buf),
5924
+ ticker=_UniffiConverterString.read(buf),
5925
+ decimals=_UniffiConverterUInt32.read(buf),
5926
+ max_supply=_UniffiConverterTypeU128.read(buf),
5927
+ is_freezable=_UniffiConverterBool.read(buf),
5928
+ )
5929
+
5930
+ @staticmethod
5931
+ def check_lower(value):
5932
+ _UniffiConverterString.check_lower(value.identifier)
5933
+ _UniffiConverterString.check_lower(value.issuer_public_key)
5934
+ _UniffiConverterString.check_lower(value.name)
5935
+ _UniffiConverterString.check_lower(value.ticker)
5936
+ _UniffiConverterUInt32.check_lower(value.decimals)
5937
+ _UniffiConverterTypeU128.check_lower(value.max_supply)
5938
+ _UniffiConverterBool.check_lower(value.is_freezable)
5939
+
5940
+ @staticmethod
5941
+ def write(value, buf):
5942
+ _UniffiConverterString.write(value.identifier, buf)
5943
+ _UniffiConverterString.write(value.issuer_public_key, buf)
5944
+ _UniffiConverterString.write(value.name, buf)
5945
+ _UniffiConverterString.write(value.ticker, buf)
5946
+ _UniffiConverterUInt32.write(value.decimals, buf)
5947
+ _UniffiConverterTypeU128.write(value.max_supply, buf)
5948
+ _UniffiConverterBool.write(value.is_freezable, buf)
5949
+
5950
+
5585
5951
  class TxStatus:
5586
5952
  confirmed: "bool"
5587
5953
  block_height: "typing.Optional[int]"
@@ -5675,6 +6041,161 @@ class _UniffiConverterTypeUtxo(_UniffiConverterRustBuffer):
5675
6041
  _UniffiConverterTypeTxStatus.write(value.status, buf)
5676
6042
 
5677
6043
 
6044
+ class WaitForPaymentRequest:
6045
+ identifier: "WaitForPaymentIdentifier"
6046
+ def __init__(self, *, identifier: "WaitForPaymentIdentifier"):
6047
+ self.identifier = identifier
6048
+
6049
+ def __str__(self):
6050
+ return "WaitForPaymentRequest(identifier={})".format(self.identifier)
6051
+
6052
+ def __eq__(self, other):
6053
+ if self.identifier != other.identifier:
6054
+ return False
6055
+ return True
6056
+
6057
+ class _UniffiConverterTypeWaitForPaymentRequest(_UniffiConverterRustBuffer):
6058
+ @staticmethod
6059
+ def read(buf):
6060
+ return WaitForPaymentRequest(
6061
+ identifier=_UniffiConverterTypeWaitForPaymentIdentifier.read(buf),
6062
+ )
6063
+
6064
+ @staticmethod
6065
+ def check_lower(value):
6066
+ _UniffiConverterTypeWaitForPaymentIdentifier.check_lower(value.identifier)
6067
+
6068
+ @staticmethod
6069
+ def write(value, buf):
6070
+ _UniffiConverterTypeWaitForPaymentIdentifier.write(value.identifier, buf)
6071
+
6072
+
6073
+ class WaitForPaymentResponse:
6074
+ payment: "Payment"
6075
+ def __init__(self, *, payment: "Payment"):
6076
+ self.payment = payment
6077
+
6078
+ def __str__(self):
6079
+ return "WaitForPaymentResponse(payment={})".format(self.payment)
6080
+
6081
+ def __eq__(self, other):
6082
+ if self.payment != other.payment:
6083
+ return False
6084
+ return True
6085
+
6086
+ class _UniffiConverterTypeWaitForPaymentResponse(_UniffiConverterRustBuffer):
6087
+ @staticmethod
6088
+ def read(buf):
6089
+ return WaitForPaymentResponse(
6090
+ payment=_UniffiConverterTypePayment.read(buf),
6091
+ )
6092
+
6093
+ @staticmethod
6094
+ def check_lower(value):
6095
+ _UniffiConverterTypePayment.check_lower(value.payment)
6096
+
6097
+ @staticmethod
6098
+ def write(value, buf):
6099
+ _UniffiConverterTypePayment.write(value.payment, buf)
6100
+
6101
+
6102
+
6103
+
6104
+
6105
+ class AssetFilter:
6106
+ """
6107
+ A field of [`ListPaymentsRequest`] when listing payments filtered by asset
6108
+ """
6109
+
6110
+ def __init__(self):
6111
+ raise RuntimeError("AssetFilter cannot be instantiated directly")
6112
+
6113
+ # Each enum variant is a nested class of the enum itself.
6114
+ class BITCOIN:
6115
+
6116
+ def __init__(self,):
6117
+ pass
6118
+
6119
+ def __str__(self):
6120
+ return "AssetFilter.BITCOIN()".format()
6121
+
6122
+ def __eq__(self, other):
6123
+ if not other.is_bitcoin():
6124
+ return False
6125
+ return True
6126
+
6127
+ class TOKEN:
6128
+ token_identifier: "typing.Optional[str]"
6129
+ """
6130
+ Optional token identifier to filter by
6131
+ """
6132
+
6133
+
6134
+ def __init__(self,token_identifier: "typing.Optional[str]"):
6135
+ self.token_identifier = token_identifier
6136
+
6137
+ def __str__(self):
6138
+ return "AssetFilter.TOKEN(token_identifier={})".format(self.token_identifier)
6139
+
6140
+ def __eq__(self, other):
6141
+ if not other.is_token():
6142
+ return False
6143
+ if self.token_identifier != other.token_identifier:
6144
+ return False
6145
+ return True
6146
+
6147
+
6148
+
6149
+ # For each variant, we have an `is_NAME` method for easily checking
6150
+ # whether an instance is that variant.
6151
+ def is_bitcoin(self) -> bool:
6152
+ return isinstance(self, AssetFilter.BITCOIN)
6153
+ def is_token(self) -> bool:
6154
+ return isinstance(self, AssetFilter.TOKEN)
6155
+
6156
+
6157
+ # Now, a little trick - we make each nested variant class be a subclass of the main
6158
+ # enum class, so that method calls and instance checks etc will work intuitively.
6159
+ # We might be able to do this a little more neatly with a metaclass, but this'll do.
6160
+ AssetFilter.BITCOIN = type("AssetFilter.BITCOIN", (AssetFilter.BITCOIN, AssetFilter,), {}) # type: ignore
6161
+ AssetFilter.TOKEN = type("AssetFilter.TOKEN", (AssetFilter.TOKEN, AssetFilter,), {}) # type: ignore
6162
+
6163
+
6164
+
6165
+
6166
+ class _UniffiConverterTypeAssetFilter(_UniffiConverterRustBuffer):
6167
+ @staticmethod
6168
+ def read(buf):
6169
+ variant = buf.read_i32()
6170
+ if variant == 1:
6171
+ return AssetFilter.BITCOIN(
6172
+ )
6173
+ if variant == 2:
6174
+ return AssetFilter.TOKEN(
6175
+ _UniffiConverterOptionalString.read(buf),
6176
+ )
6177
+ raise InternalError("Raw enum value doesn't match any cases")
6178
+
6179
+ @staticmethod
6180
+ def check_lower(value):
6181
+ if value.is_bitcoin():
6182
+ return
6183
+ if value.is_token():
6184
+ _UniffiConverterOptionalString.check_lower(value.token_identifier)
6185
+ return
6186
+ raise ValueError(value)
6187
+
6188
+ @staticmethod
6189
+ def write(value, buf):
6190
+ if value.is_bitcoin():
6191
+ buf.write_i32(1)
6192
+ if value.is_token():
6193
+ buf.write_i32(2)
6194
+ _UniffiConverterOptionalString.write(value.token_identifier, buf)
6195
+
6196
+
6197
+
6198
+
5678
6199
  # ChainServiceError
5679
6200
  # We want to define each variant as a nested class that's also a subclass,
5680
6201
  # which is tricky in Python. To accomplish this we're going to create each
@@ -6194,6 +6715,26 @@ class PaymentDetails:
6194
6715
  return False
6195
6716
  return True
6196
6717
 
6718
+ class TOKEN:
6719
+ metadata: "TokenMetadata"
6720
+ tx_hash: "str"
6721
+
6722
+ def __init__(self,metadata: "TokenMetadata", tx_hash: "str"):
6723
+ self.metadata = metadata
6724
+ self.tx_hash = tx_hash
6725
+
6726
+ def __str__(self):
6727
+ return "PaymentDetails.TOKEN(metadata={}, tx_hash={})".format(self.metadata, self.tx_hash)
6728
+
6729
+ def __eq__(self, other):
6730
+ if not other.is_token():
6731
+ return False
6732
+ if self.metadata != other.metadata:
6733
+ return False
6734
+ if self.tx_hash != other.tx_hash:
6735
+ return False
6736
+ return True
6737
+
6197
6738
  class LIGHTNING:
6198
6739
  description: "typing.Optional[str]"
6199
6740
  """
@@ -6294,6 +6835,8 @@ class PaymentDetails:
6294
6835
  # whether an instance is that variant.
6295
6836
  def is_spark(self) -> bool:
6296
6837
  return isinstance(self, PaymentDetails.SPARK)
6838
+ def is_token(self) -> bool:
6839
+ return isinstance(self, PaymentDetails.TOKEN)
6297
6840
  def is_lightning(self) -> bool:
6298
6841
  return isinstance(self, PaymentDetails.LIGHTNING)
6299
6842
  def is_withdraw(self) -> bool:
@@ -6306,6 +6849,7 @@ class PaymentDetails:
6306
6849
  # enum class, so that method calls and instance checks etc will work intuitively.
6307
6850
  # We might be able to do this a little more neatly with a metaclass, but this'll do.
6308
6851
  PaymentDetails.SPARK = type("PaymentDetails.SPARK", (PaymentDetails.SPARK, PaymentDetails,), {}) # type: ignore
6852
+ PaymentDetails.TOKEN = type("PaymentDetails.TOKEN", (PaymentDetails.TOKEN, PaymentDetails,), {}) # type: ignore
6309
6853
  PaymentDetails.LIGHTNING = type("PaymentDetails.LIGHTNING", (PaymentDetails.LIGHTNING, PaymentDetails,), {}) # type: ignore
6310
6854
  PaymentDetails.WITHDRAW = type("PaymentDetails.WITHDRAW", (PaymentDetails.WITHDRAW, PaymentDetails,), {}) # type: ignore
6311
6855
  PaymentDetails.DEPOSIT = type("PaymentDetails.DEPOSIT", (PaymentDetails.DEPOSIT, PaymentDetails,), {}) # type: ignore
@@ -6321,6 +6865,11 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
6321
6865
  return PaymentDetails.SPARK(
6322
6866
  )
6323
6867
  if variant == 2:
6868
+ return PaymentDetails.TOKEN(
6869
+ _UniffiConverterTypeTokenMetadata.read(buf),
6870
+ _UniffiConverterString.read(buf),
6871
+ )
6872
+ if variant == 3:
6324
6873
  return PaymentDetails.LIGHTNING(
6325
6874
  _UniffiConverterOptionalString.read(buf),
6326
6875
  _UniffiConverterOptionalString.read(buf),
@@ -6329,11 +6878,11 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
6329
6878
  _UniffiConverterString.read(buf),
6330
6879
  _UniffiConverterOptionalTypeLnurlPayInfo.read(buf),
6331
6880
  )
6332
- if variant == 3:
6881
+ if variant == 4:
6333
6882
  return PaymentDetails.WITHDRAW(
6334
6883
  _UniffiConverterString.read(buf),
6335
6884
  )
6336
- if variant == 4:
6885
+ if variant == 5:
6337
6886
  return PaymentDetails.DEPOSIT(
6338
6887
  _UniffiConverterString.read(buf),
6339
6888
  )
@@ -6343,6 +6892,10 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
6343
6892
  def check_lower(value):
6344
6893
  if value.is_spark():
6345
6894
  return
6895
+ if value.is_token():
6896
+ _UniffiConverterTypeTokenMetadata.check_lower(value.metadata)
6897
+ _UniffiConverterString.check_lower(value.tx_hash)
6898
+ return
6346
6899
  if value.is_lightning():
6347
6900
  _UniffiConverterOptionalString.check_lower(value.description)
6348
6901
  _UniffiConverterOptionalString.check_lower(value.preimage)
@@ -6363,8 +6916,12 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
6363
6916
  def write(value, buf):
6364
6917
  if value.is_spark():
6365
6918
  buf.write_i32(1)
6366
- if value.is_lightning():
6919
+ if value.is_token():
6367
6920
  buf.write_i32(2)
6921
+ _UniffiConverterTypeTokenMetadata.write(value.metadata, buf)
6922
+ _UniffiConverterString.write(value.tx_hash, buf)
6923
+ if value.is_lightning():
6924
+ buf.write_i32(3)
6368
6925
  _UniffiConverterOptionalString.write(value.description, buf)
6369
6926
  _UniffiConverterOptionalString.write(value.preimage, buf)
6370
6927
  _UniffiConverterString.write(value.invoice, buf)
@@ -6372,10 +6929,10 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
6372
6929
  _UniffiConverterString.write(value.destination_pubkey, buf)
6373
6930
  _UniffiConverterOptionalTypeLnurlPayInfo.write(value.lnurl_pay_info, buf)
6374
6931
  if value.is_withdraw():
6375
- buf.write_i32(3)
6932
+ buf.write_i32(4)
6376
6933
  _UniffiConverterString.write(value.tx_id, buf)
6377
6934
  if value.is_deposit():
6378
- buf.write_i32(4)
6935
+ buf.write_i32(5)
6379
6936
  _UniffiConverterString.write(value.tx_id, buf)
6380
6937
 
6381
6938
 
@@ -6389,11 +6946,13 @@ class PaymentMethod(enum.Enum):
6389
6946
 
6390
6947
  SPARK = 1
6391
6948
 
6392
- DEPOSIT = 2
6949
+ TOKEN = 2
6950
+
6951
+ DEPOSIT = 3
6393
6952
 
6394
- WITHDRAW = 3
6953
+ WITHDRAW = 4
6395
6954
 
6396
- UNKNOWN = 4
6955
+ UNKNOWN = 5
6397
6956
 
6398
6957
 
6399
6958
 
@@ -6406,10 +6965,12 @@ class _UniffiConverterTypePaymentMethod(_UniffiConverterRustBuffer):
6406
6965
  if variant == 2:
6407
6966
  return PaymentMethod.SPARK
6408
6967
  if variant == 3:
6409
- return PaymentMethod.DEPOSIT
6968
+ return PaymentMethod.TOKEN
6410
6969
  if variant == 4:
6411
- return PaymentMethod.WITHDRAW
6970
+ return PaymentMethod.DEPOSIT
6412
6971
  if variant == 5:
6972
+ return PaymentMethod.WITHDRAW
6973
+ if variant == 6:
6413
6974
  return PaymentMethod.UNKNOWN
6414
6975
  raise InternalError("Raw enum value doesn't match any cases")
6415
6976
 
@@ -6419,6 +6980,8 @@ class _UniffiConverterTypePaymentMethod(_UniffiConverterRustBuffer):
6419
6980
  return
6420
6981
  if value == PaymentMethod.SPARK:
6421
6982
  return
6983
+ if value == PaymentMethod.TOKEN:
6984
+ return
6422
6985
  if value == PaymentMethod.DEPOSIT:
6423
6986
  return
6424
6987
  if value == PaymentMethod.WITHDRAW:
@@ -6433,12 +6996,14 @@ class _UniffiConverterTypePaymentMethod(_UniffiConverterRustBuffer):
6433
6996
  buf.write_i32(1)
6434
6997
  if value == PaymentMethod.SPARK:
6435
6998
  buf.write_i32(2)
6436
- if value == PaymentMethod.DEPOSIT:
6999
+ if value == PaymentMethod.TOKEN:
6437
7000
  buf.write_i32(3)
6438
- if value == PaymentMethod.WITHDRAW:
7001
+ if value == PaymentMethod.DEPOSIT:
6439
7002
  buf.write_i32(4)
6440
- if value == PaymentMethod.UNKNOWN:
7003
+ if value == PaymentMethod.WITHDRAW:
6441
7004
  buf.write_i32(5)
7005
+ if value == PaymentMethod.UNKNOWN:
7006
+ buf.write_i32(6)
6442
7007
 
6443
7008
 
6444
7009
 
@@ -7351,21 +7916,35 @@ class SendPaymentMethod:
7351
7916
 
7352
7917
  class SPARK_ADDRESS:
7353
7918
  address: "str"
7354
- fee_sats: "int"
7919
+ fee: "U128"
7920
+ """
7921
+ Fee to pay for the transaction
7922
+ Denominated in sats if token identifier is empty, otherwise in the token base units
7923
+ """
7924
+
7925
+ token_identifier: "typing.Optional[str]"
7926
+ """
7927
+ The presence of this field indicates that the payment is for a token
7928
+ If empty, it is a Bitcoin payment
7929
+ """
7355
7930
 
7356
- def __init__(self,address: "str", fee_sats: "int"):
7931
+
7932
+ def __init__(self,address: "str", fee: "U128", token_identifier: "typing.Optional[str]"):
7357
7933
  self.address = address
7358
- self.fee_sats = fee_sats
7934
+ self.fee = fee
7935
+ self.token_identifier = token_identifier
7359
7936
 
7360
7937
  def __str__(self):
7361
- return "SendPaymentMethod.SPARK_ADDRESS(address={}, fee_sats={})".format(self.address, self.fee_sats)
7938
+ return "SendPaymentMethod.SPARK_ADDRESS(address={}, fee={}, token_identifier={})".format(self.address, self.fee, self.token_identifier)
7362
7939
 
7363
7940
  def __eq__(self, other):
7364
7941
  if not other.is_spark_address():
7365
7942
  return False
7366
7943
  if self.address != other.address:
7367
7944
  return False
7368
- if self.fee_sats != other.fee_sats:
7945
+ if self.fee != other.fee:
7946
+ return False
7947
+ if self.token_identifier != other.token_identifier:
7369
7948
  return False
7370
7949
  return True
7371
7950
 
@@ -7409,7 +7988,8 @@ class _UniffiConverterTypeSendPaymentMethod(_UniffiConverterRustBuffer):
7409
7988
  if variant == 3:
7410
7989
  return SendPaymentMethod.SPARK_ADDRESS(
7411
7990
  _UniffiConverterString.read(buf),
7412
- _UniffiConverterUInt64.read(buf),
7991
+ _UniffiConverterTypeU128.read(buf),
7992
+ _UniffiConverterOptionalString.read(buf),
7413
7993
  )
7414
7994
  raise InternalError("Raw enum value doesn't match any cases")
7415
7995
 
@@ -7426,7 +8006,8 @@ class _UniffiConverterTypeSendPaymentMethod(_UniffiConverterRustBuffer):
7426
8006
  return
7427
8007
  if value.is_spark_address():
7428
8008
  _UniffiConverterString.check_lower(value.address)
7429
- _UniffiConverterUInt64.check_lower(value.fee_sats)
8009
+ _UniffiConverterTypeU128.check_lower(value.fee)
8010
+ _UniffiConverterOptionalString.check_lower(value.token_identifier)
7430
8011
  return
7431
8012
  raise ValueError(value)
7432
8013
 
@@ -7444,7 +8025,8 @@ class _UniffiConverterTypeSendPaymentMethod(_UniffiConverterRustBuffer):
7444
8025
  if value.is_spark_address():
7445
8026
  buf.write_i32(3)
7446
8027
  _UniffiConverterString.write(value.address, buf)
7447
- _UniffiConverterUInt64.write(value.fee_sats, buf)
8028
+ _UniffiConverterTypeU128.write(value.fee, buf)
8029
+ _UniffiConverterOptionalString.write(value.token_identifier, buf)
7448
8030
 
7449
8031
 
7450
8032
 
@@ -7475,18 +8057,27 @@ class SendPaymentOptions:
7475
8057
 
7476
8058
  class BOLT11_INVOICE:
7477
8059
  prefer_spark: "bool"
8060
+ completion_timeout_secs: "typing.Optional[int]"
8061
+ """
8062
+ If set, the function will return the payment if it is still pending after this
8063
+ number of seconds. If unset, the function will return immediately after initiating the payment.
8064
+ """
7478
8065
 
7479
- def __init__(self,prefer_spark: "bool"):
8066
+
8067
+ def __init__(self,prefer_spark: "bool", completion_timeout_secs: "typing.Optional[int]"):
7480
8068
  self.prefer_spark = prefer_spark
8069
+ self.completion_timeout_secs = completion_timeout_secs
7481
8070
 
7482
8071
  def __str__(self):
7483
- return "SendPaymentOptions.BOLT11_INVOICE(prefer_spark={})".format(self.prefer_spark)
8072
+ return "SendPaymentOptions.BOLT11_INVOICE(prefer_spark={}, completion_timeout_secs={})".format(self.prefer_spark, self.completion_timeout_secs)
7484
8073
 
7485
8074
  def __eq__(self, other):
7486
8075
  if not other.is_bolt11_invoice():
7487
8076
  return False
7488
8077
  if self.prefer_spark != other.prefer_spark:
7489
8078
  return False
8079
+ if self.completion_timeout_secs != other.completion_timeout_secs:
8080
+ return False
7490
8081
  return True
7491
8082
 
7492
8083
 
@@ -7519,6 +8110,7 @@ class _UniffiConverterTypeSendPaymentOptions(_UniffiConverterRustBuffer):
7519
8110
  if variant == 2:
7520
8111
  return SendPaymentOptions.BOLT11_INVOICE(
7521
8112
  _UniffiConverterBool.read(buf),
8113
+ _UniffiConverterOptionalUInt32.read(buf),
7522
8114
  )
7523
8115
  raise InternalError("Raw enum value doesn't match any cases")
7524
8116
 
@@ -7529,6 +8121,7 @@ class _UniffiConverterTypeSendPaymentOptions(_UniffiConverterRustBuffer):
7529
8121
  return
7530
8122
  if value.is_bolt11_invoice():
7531
8123
  _UniffiConverterBool.check_lower(value.prefer_spark)
8124
+ _UniffiConverterOptionalUInt32.check_lower(value.completion_timeout_secs)
7532
8125
  return
7533
8126
  raise ValueError(value)
7534
8127
 
@@ -7540,6 +8133,7 @@ class _UniffiConverterTypeSendPaymentOptions(_UniffiConverterRustBuffer):
7540
8133
  if value.is_bolt11_invoice():
7541
8134
  buf.write_i32(2)
7542
8135
  _UniffiConverterBool.write(value.prefer_spark, buf)
8136
+ _UniffiConverterOptionalUInt32.write(value.completion_timeout_secs, buf)
7543
8137
 
7544
8138
 
7545
8139
 
@@ -7764,15 +8358,114 @@ class _UniffiConverterTypeUpdateDepositPayload(_UniffiConverterRustBuffer):
7764
8358
 
7765
8359
 
7766
8360
 
7767
- class EventListener(typing.Protocol):
7768
- """
7769
- Trait for event listeners
7770
- """
7771
8361
 
7772
- def on_event(self, event: "SdkEvent"):
7773
- """
7774
- Called when an event occurs
7775
- """
8362
+
8363
+ class WaitForPaymentIdentifier:
8364
+ def __init__(self):
8365
+ raise RuntimeError("WaitForPaymentIdentifier cannot be instantiated directly")
8366
+
8367
+ # Each enum variant is a nested class of the enum itself.
8368
+ class PAYMENT_ID:
8369
+ def __init__(self, *values):
8370
+ if len(values) != 1:
8371
+ raise TypeError(f"Expected 1 arguments, found {len(values)}")
8372
+ if not isinstance(values[0], str):
8373
+ raise TypeError(f"unexpected type for tuple element 0 - expected 'str', got '{type(values[0])}'")
8374
+ self._values = values
8375
+
8376
+ def __getitem__(self, index):
8377
+ return self._values[index]
8378
+
8379
+ def __str__(self):
8380
+ return f"WaitForPaymentIdentifier.PAYMENT_ID{self._values!r}"
8381
+
8382
+ def __eq__(self, other):
8383
+ if not other.is_payment_id():
8384
+ return False
8385
+ return self._values == other._values
8386
+ class PAYMENT_REQUEST:
8387
+ def __init__(self, *values):
8388
+ if len(values) != 1:
8389
+ raise TypeError(f"Expected 1 arguments, found {len(values)}")
8390
+ if not isinstance(values[0], str):
8391
+ raise TypeError(f"unexpected type for tuple element 0 - expected 'str', got '{type(values[0])}'")
8392
+ self._values = values
8393
+
8394
+ def __getitem__(self, index):
8395
+ return self._values[index]
8396
+
8397
+ def __str__(self):
8398
+ return f"WaitForPaymentIdentifier.PAYMENT_REQUEST{self._values!r}"
8399
+
8400
+ def __eq__(self, other):
8401
+ if not other.is_payment_request():
8402
+ return False
8403
+ return self._values == other._values
8404
+
8405
+
8406
+ # For each variant, we have an `is_NAME` method for easily checking
8407
+ # whether an instance is that variant.
8408
+ def is_payment_id(self) -> bool:
8409
+ return isinstance(self, WaitForPaymentIdentifier.PAYMENT_ID)
8410
+ def is_payment_request(self) -> bool:
8411
+ return isinstance(self, WaitForPaymentIdentifier.PAYMENT_REQUEST)
8412
+
8413
+
8414
+ # Now, a little trick - we make each nested variant class be a subclass of the main
8415
+ # enum class, so that method calls and instance checks etc will work intuitively.
8416
+ # We might be able to do this a little more neatly with a metaclass, but this'll do.
8417
+ WaitForPaymentIdentifier.PAYMENT_ID = type("WaitForPaymentIdentifier.PAYMENT_ID", (WaitForPaymentIdentifier.PAYMENT_ID, WaitForPaymentIdentifier,), {}) # type: ignore
8418
+ WaitForPaymentIdentifier.PAYMENT_REQUEST = type("WaitForPaymentIdentifier.PAYMENT_REQUEST", (WaitForPaymentIdentifier.PAYMENT_REQUEST, WaitForPaymentIdentifier,), {}) # type: ignore
8419
+
8420
+
8421
+
8422
+
8423
+ class _UniffiConverterTypeWaitForPaymentIdentifier(_UniffiConverterRustBuffer):
8424
+ @staticmethod
8425
+ def read(buf):
8426
+ variant = buf.read_i32()
8427
+ if variant == 1:
8428
+ return WaitForPaymentIdentifier.PAYMENT_ID(
8429
+ _UniffiConverterString.read(buf),
8430
+ )
8431
+ if variant == 2:
8432
+ return WaitForPaymentIdentifier.PAYMENT_REQUEST(
8433
+ _UniffiConverterString.read(buf),
8434
+ )
8435
+ raise InternalError("Raw enum value doesn't match any cases")
8436
+
8437
+ @staticmethod
8438
+ def check_lower(value):
8439
+ if value.is_payment_id():
8440
+ _UniffiConverterString.check_lower(value._values[0])
8441
+ return
8442
+ if value.is_payment_request():
8443
+ _UniffiConverterString.check_lower(value._values[0])
8444
+ return
8445
+ raise ValueError(value)
8446
+
8447
+ @staticmethod
8448
+ def write(value, buf):
8449
+ if value.is_payment_id():
8450
+ buf.write_i32(1)
8451
+ _UniffiConverterString.write(value._values[0], buf)
8452
+ if value.is_payment_request():
8453
+ buf.write_i32(2)
8454
+ _UniffiConverterString.write(value._values[0], buf)
8455
+
8456
+
8457
+
8458
+
8459
+
8460
+ class EventListener(typing.Protocol):
8461
+ """
8462
+ Trait for event listeners
8463
+ """
8464
+
8465
+ def on_event(self, event: "SdkEvent"):
8466
+ """
8467
+ Called when an event occurs
8468
+ """
7776
8469
 
7777
8470
  raise NotImplementedError
7778
8471
 
@@ -8068,6 +8761,60 @@ class _UniffiConverterOptionalTypeLnurlPayInfo(_UniffiConverterRustBuffer):
8068
8761
 
8069
8762
 
8070
8763
 
8764
+ class _UniffiConverterOptionalTypePayment(_UniffiConverterRustBuffer):
8765
+ @classmethod
8766
+ def check_lower(cls, value):
8767
+ if value is not None:
8768
+ _UniffiConverterTypePayment.check_lower(value)
8769
+
8770
+ @classmethod
8771
+ def write(cls, value, buf):
8772
+ if value is None:
8773
+ buf.write_u8(0)
8774
+ return
8775
+
8776
+ buf.write_u8(1)
8777
+ _UniffiConverterTypePayment.write(value, buf)
8778
+
8779
+ @classmethod
8780
+ def read(cls, buf):
8781
+ flag = buf.read_u8()
8782
+ if flag == 0:
8783
+ return None
8784
+ elif flag == 1:
8785
+ return _UniffiConverterTypePayment.read(buf)
8786
+ else:
8787
+ raise InternalError("Unexpected flag byte for optional type")
8788
+
8789
+
8790
+
8791
+ class _UniffiConverterOptionalTypeAssetFilter(_UniffiConverterRustBuffer):
8792
+ @classmethod
8793
+ def check_lower(cls, value):
8794
+ if value is not None:
8795
+ _UniffiConverterTypeAssetFilter.check_lower(value)
8796
+
8797
+ @classmethod
8798
+ def write(cls, value, buf):
8799
+ if value is None:
8800
+ buf.write_u8(0)
8801
+ return
8802
+
8803
+ buf.write_u8(1)
8804
+ _UniffiConverterTypeAssetFilter.write(value, buf)
8805
+
8806
+ @classmethod
8807
+ def read(cls, buf):
8808
+ flag = buf.read_u8()
8809
+ if flag == 0:
8810
+ return None
8811
+ elif flag == 1:
8812
+ return _UniffiConverterTypeAssetFilter.read(buf)
8813
+ else:
8814
+ raise InternalError("Unexpected flag byte for optional type")
8815
+
8816
+
8817
+
8071
8818
  class _UniffiConverterOptionalTypeDepositClaimError(_UniffiConverterRustBuffer):
8072
8819
  @classmethod
8073
8820
  def check_lower(cls, value):
@@ -8203,6 +8950,60 @@ class _UniffiConverterOptionalTypeLogger(_UniffiConverterRustBuffer):
8203
8950
 
8204
8951
 
8205
8952
 
8953
+ class _UniffiConverterOptionalSequenceTypePaymentStatus(_UniffiConverterRustBuffer):
8954
+ @classmethod
8955
+ def check_lower(cls, value):
8956
+ if value is not None:
8957
+ _UniffiConverterSequenceTypePaymentStatus.check_lower(value)
8958
+
8959
+ @classmethod
8960
+ def write(cls, value, buf):
8961
+ if value is None:
8962
+ buf.write_u8(0)
8963
+ return
8964
+
8965
+ buf.write_u8(1)
8966
+ _UniffiConverterSequenceTypePaymentStatus.write(value, buf)
8967
+
8968
+ @classmethod
8969
+ def read(cls, buf):
8970
+ flag = buf.read_u8()
8971
+ if flag == 0:
8972
+ return None
8973
+ elif flag == 1:
8974
+ return _UniffiConverterSequenceTypePaymentStatus.read(buf)
8975
+ else:
8976
+ raise InternalError("Unexpected flag byte for optional type")
8977
+
8978
+
8979
+
8980
+ class _UniffiConverterOptionalSequenceTypePaymentType(_UniffiConverterRustBuffer):
8981
+ @classmethod
8982
+ def check_lower(cls, value):
8983
+ if value is not None:
8984
+ _UniffiConverterSequenceTypePaymentType.check_lower(value)
8985
+
8986
+ @classmethod
8987
+ def write(cls, value, buf):
8988
+ if value is None:
8989
+ buf.write_u8(0)
8990
+ return
8991
+
8992
+ buf.write_u8(1)
8993
+ _UniffiConverterSequenceTypePaymentType.write(value, buf)
8994
+
8995
+ @classmethod
8996
+ def read(cls, buf):
8997
+ flag = buf.read_u8()
8998
+ if flag == 0:
8999
+ return None
9000
+ elif flag == 1:
9001
+ return _UniffiConverterSequenceTypePaymentType.read(buf)
9002
+ else:
9003
+ raise InternalError("Unexpected flag byte for optional type")
9004
+
9005
+
9006
+
8206
9007
  class _UniffiConverterOptionalTypeSuccessAction(_UniffiConverterRustBuffer):
8207
9008
  @classmethod
8208
9009
  def check_lower(cls, value):
@@ -8257,6 +9058,58 @@ class _UniffiConverterOptionalTypeSuccessActionProcessed(_UniffiConverterRustBuf
8257
9058
 
8258
9059
 
8259
9060
 
9061
+ class _UniffiConverterOptionalTypeU128(_UniffiConverterRustBuffer):
9062
+ @classmethod
9063
+ def check_lower(cls, value):
9064
+ if value is not None:
9065
+ _UniffiConverterTypeU128.check_lower(value)
9066
+
9067
+ @classmethod
9068
+ def write(cls, value, buf):
9069
+ if value is None:
9070
+ buf.write_u8(0)
9071
+ return
9072
+
9073
+ buf.write_u8(1)
9074
+ _UniffiConverterTypeU128.write(value, buf)
9075
+
9076
+ @classmethod
9077
+ def read(cls, buf):
9078
+ flag = buf.read_u8()
9079
+ if flag == 0:
9080
+ return None
9081
+ elif flag == 1:
9082
+ return _UniffiConverterTypeU128.read(buf)
9083
+ else:
9084
+ raise InternalError("Unexpected flag byte for optional type")
9085
+
9086
+
9087
+
9088
+ class _UniffiConverterSequenceString(_UniffiConverterRustBuffer):
9089
+ @classmethod
9090
+ def check_lower(cls, value):
9091
+ for item in value:
9092
+ _UniffiConverterString.check_lower(item)
9093
+
9094
+ @classmethod
9095
+ def write(cls, value, buf):
9096
+ items = len(value)
9097
+ buf.write_i32(items)
9098
+ for item in value:
9099
+ _UniffiConverterString.write(item, buf)
9100
+
9101
+ @classmethod
9102
+ def read(cls, buf):
9103
+ count = buf.read_i32()
9104
+ if count < 0:
9105
+ raise InternalError("Unexpected negative sequence length")
9106
+
9107
+ return [
9108
+ _UniffiConverterString.read(buf) for i in range(count)
9109
+ ]
9110
+
9111
+
9112
+
8260
9113
  class _UniffiConverterSequenceTypeDepositInfo(_UniffiConverterRustBuffer):
8261
9114
  @classmethod
8262
9115
  def check_lower(cls, value):
@@ -8307,6 +9160,31 @@ class _UniffiConverterSequenceTypePayment(_UniffiConverterRustBuffer):
8307
9160
 
8308
9161
 
8309
9162
 
9163
+ class _UniffiConverterSequenceTypeTokenMetadata(_UniffiConverterRustBuffer):
9164
+ @classmethod
9165
+ def check_lower(cls, value):
9166
+ for item in value:
9167
+ _UniffiConverterTypeTokenMetadata.check_lower(item)
9168
+
9169
+ @classmethod
9170
+ def write(cls, value, buf):
9171
+ items = len(value)
9172
+ buf.write_i32(items)
9173
+ for item in value:
9174
+ _UniffiConverterTypeTokenMetadata.write(item, buf)
9175
+
9176
+ @classmethod
9177
+ def read(cls, buf):
9178
+ count = buf.read_i32()
9179
+ if count < 0:
9180
+ raise InternalError("Unexpected negative sequence length")
9181
+
9182
+ return [
9183
+ _UniffiConverterTypeTokenMetadata.read(buf) for i in range(count)
9184
+ ]
9185
+
9186
+
9187
+
8310
9188
  class _UniffiConverterSequenceTypeUtxo(_UniffiConverterRustBuffer):
8311
9189
  @classmethod
8312
9190
  def check_lower(cls, value):
@@ -8332,6 +9210,56 @@ class _UniffiConverterSequenceTypeUtxo(_UniffiConverterRustBuffer):
8332
9210
 
8333
9211
 
8334
9212
 
9213
+ class _UniffiConverterSequenceTypePaymentStatus(_UniffiConverterRustBuffer):
9214
+ @classmethod
9215
+ def check_lower(cls, value):
9216
+ for item in value:
9217
+ _UniffiConverterTypePaymentStatus.check_lower(item)
9218
+
9219
+ @classmethod
9220
+ def write(cls, value, buf):
9221
+ items = len(value)
9222
+ buf.write_i32(items)
9223
+ for item in value:
9224
+ _UniffiConverterTypePaymentStatus.write(item, buf)
9225
+
9226
+ @classmethod
9227
+ def read(cls, buf):
9228
+ count = buf.read_i32()
9229
+ if count < 0:
9230
+ raise InternalError("Unexpected negative sequence length")
9231
+
9232
+ return [
9233
+ _UniffiConverterTypePaymentStatus.read(buf) for i in range(count)
9234
+ ]
9235
+
9236
+
9237
+
9238
+ class _UniffiConverterSequenceTypePaymentType(_UniffiConverterRustBuffer):
9239
+ @classmethod
9240
+ def check_lower(cls, value):
9241
+ for item in value:
9242
+ _UniffiConverterTypePaymentType.check_lower(item)
9243
+
9244
+ @classmethod
9245
+ def write(cls, value, buf):
9246
+ items = len(value)
9247
+ buf.write_i32(items)
9248
+ for item in value:
9249
+ _UniffiConverterTypePaymentType.write(item, buf)
9250
+
9251
+ @classmethod
9252
+ def read(cls, buf):
9253
+ count = buf.read_i32()
9254
+ if count < 0:
9255
+ raise InternalError("Unexpected negative sequence length")
9256
+
9257
+ return [
9258
+ _UniffiConverterTypePaymentType.read(buf) for i in range(count)
9259
+ ]
9260
+
9261
+
9262
+
8335
9263
  class _UniffiConverterSequenceTypeFiatCurrency(_UniffiConverterRustBuffer):
8336
9264
  @classmethod
8337
9265
  def check_lower(cls, value):
@@ -8380,6 +9308,39 @@ class _UniffiConverterSequenceTypeRate(_UniffiConverterRustBuffer):
8380
9308
  _UniffiConverterTypeRate.read(buf) for i in range(count)
8381
9309
  ]
8382
9310
 
9311
+
9312
+
9313
+ class _UniffiConverterMapStringTypeTokenBalance(_UniffiConverterRustBuffer):
9314
+ @classmethod
9315
+ def check_lower(cls, items):
9316
+ for (key, value) in items.items():
9317
+ _UniffiConverterString.check_lower(key)
9318
+ _UniffiConverterTypeTokenBalance.check_lower(value)
9319
+
9320
+ @classmethod
9321
+ def write(cls, items, buf):
9322
+ buf.write_i32(len(items))
9323
+ for (key, value) in items.items():
9324
+ _UniffiConverterString.write(key, buf)
9325
+ _UniffiConverterTypeTokenBalance.write(value, buf)
9326
+
9327
+ @classmethod
9328
+ def read(cls, buf):
9329
+ count = buf.read_i32()
9330
+ if count < 0:
9331
+ raise InternalError("Unexpected negative map size")
9332
+
9333
+ # It would be nice to use a dict comprehension,
9334
+ # but in Python 3.7 and before the evaluation order is not according to spec,
9335
+ # so we we're reading the value before the key.
9336
+ # This loop makes the order explicit: first reading the key, then the value.
9337
+ d = {}
9338
+ for i in range(count):
9339
+ key = _UniffiConverterString.read(buf)
9340
+ val = _UniffiConverterTypeTokenBalance.read(buf)
9341
+ d[key] = val
9342
+ return d
9343
+
8383
9344
  # External type BitcoinAddressDetails is in namespace "breez_sdk_common", crate breez_sdk_common
8384
9345
 
8385
9346
 
@@ -8430,6 +9391,34 @@ class _UniffiConverterSequenceTypeRate(_UniffiConverterRustBuffer):
8430
9391
 
8431
9392
 
8432
9393
 
9394
+
9395
+ class _UniffiConverterTypeU128:
9396
+ @staticmethod
9397
+ def write(value, buf):
9398
+ builtin_value = str(value)
9399
+ _UniffiConverterString.write(builtin_value, buf)
9400
+
9401
+ @staticmethod
9402
+ def read(buf):
9403
+ builtin_value = _UniffiConverterString.read(buf)
9404
+ return int(builtin_value)
9405
+
9406
+ @staticmethod
9407
+ def lift(value):
9408
+ builtin_value = _UniffiConverterString.lift(value)
9409
+ return int(builtin_value)
9410
+
9411
+ @staticmethod
9412
+ def check_lower(value):
9413
+ builtin_value = str(value)
9414
+ return _UniffiConverterString.check_lower(builtin_value)
9415
+
9416
+ @staticmethod
9417
+ def lower(value):
9418
+ builtin_value = str(value)
9419
+ return _UniffiConverterString.lower(builtin_value)
9420
+ U128 = str
9421
+
8433
9422
  # Async support# RustFuturePoll values
8434
9423
  _UNIFFI_RUST_FUTURE_POLL_READY = 0
8435
9424
  _UNIFFI_RUST_FUTURE_POLL_MAYBE_READY = 1
@@ -8617,6 +9606,7 @@ _UniffiConverterTypeSdkError,
8617
9606
 
8618
9607
  __all__ = [
8619
9608
  "InternalError",
9609
+ "AssetFilter",
8620
9610
  "ChainServiceError",
8621
9611
  "DepositClaimError",
8622
9612
  "Fee",
@@ -8635,6 +9625,7 @@ __all__ = [
8635
9625
  "SendPaymentOptions",
8636
9626
  "StorageError",
8637
9627
  "UpdateDepositPayload",
9628
+ "WaitForPaymentIdentifier",
8638
9629
  "CheckLightningAddressRequest",
8639
9630
  "ClaimDepositRequest",
8640
9631
  "ClaimDepositResponse",
@@ -8646,6 +9637,8 @@ __all__ = [
8646
9637
  "GetInfoResponse",
8647
9638
  "GetPaymentRequest",
8648
9639
  "GetPaymentResponse",
9640
+ "GetTokensMetadataRequest",
9641
+ "GetTokensMetadataResponse",
8649
9642
  "LightningAddressInfo",
8650
9643
  "ListFiatCurrenciesResponse",
8651
9644
  "ListFiatRatesResponse",
@@ -8674,8 +9667,12 @@ __all__ = [
8674
9667
  "SendPaymentResponse",
8675
9668
  "SyncWalletRequest",
8676
9669
  "SyncWalletResponse",
9670
+ "TokenBalance",
9671
+ "TokenMetadata",
8677
9672
  "TxStatus",
8678
9673
  "Utxo",
9674
+ "WaitForPaymentRequest",
9675
+ "WaitForPaymentResponse",
8679
9676
  "connect",
8680
9677
  "default_config",
8681
9678
  "default_storage",