breez-sdk-spark 0.4.1__cp310-cp310-win_amd64.whl → 0.6.1__cp310-cp310-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- breez_sdk_spark/breez_sdk_spark.py +1935 -349
- breez_sdk_spark/breez_sdk_spark_bindings.dll +0 -0
- {breez_sdk_spark-0.4.1.dist-info → breez_sdk_spark-0.6.1.dist-info}/METADATA +1 -1
- {breez_sdk_spark-0.4.1.dist-info → breez_sdk_spark-0.6.1.dist-info}/RECORD +6 -6
- {breez_sdk_spark-0.4.1.dist-info → breez_sdk_spark-0.6.1.dist-info}/WHEEL +0 -0
- {breez_sdk_spark-0.4.1.dist-info → breez_sdk_spark-0.6.1.dist-info}/top_level.txt +0 -0
|
@@ -475,6 +475,8 @@ def _uniffi_check_api_checksums(lib):
|
|
|
475
475
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
476
476
|
if lib.uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction() != 65179:
|
|
477
477
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
478
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees() != 43230:
|
|
479
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
478
480
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener() != 37737:
|
|
479
481
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
480
482
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_check_lightning_address_available() != 31624:
|
|
@@ -483,6 +485,8 @@ def _uniffi_check_api_checksums(lib):
|
|
|
483
485
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
484
486
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit() != 43529:
|
|
485
487
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
488
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_htlc_payment() != 57587:
|
|
489
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
486
490
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_address() != 44132:
|
|
487
491
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
488
492
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_disconnect() != 330:
|
|
@@ -493,6 +497,8 @@ def _uniffi_check_api_checksums(lib):
|
|
|
493
497
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
494
498
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment() != 11540:
|
|
495
499
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
500
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_token_issuer() != 26649:
|
|
501
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
496
502
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_tokens_metadata() != 40125:
|
|
497
503
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
498
504
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_user_settings() != 38537:
|
|
@@ -517,6 +523,8 @@ def _uniffi_check_api_checksums(lib):
|
|
|
517
523
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
518
524
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment() != 36984:
|
|
519
525
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
526
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_fees() != 16947:
|
|
527
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
520
528
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit() != 33646:
|
|
521
529
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
522
530
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_register_lightning_address() != 530:
|
|
@@ -531,8 +539,6 @@ def _uniffi_check_api_checksums(lib):
|
|
|
531
539
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
532
540
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_update_user_settings() != 1721:
|
|
533
541
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
534
|
-
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment() != 64922:
|
|
535
|
-
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
536
542
|
if lib.uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies() != 19092:
|
|
537
543
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
538
544
|
if lib.uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_rates() != 11512:
|
|
@@ -561,7 +567,7 @@ def _uniffi_check_api_checksums(lib):
|
|
|
561
567
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
562
568
|
if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_real_time_sync_storage() != 20579:
|
|
563
569
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
564
|
-
if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_chain_service() !=
|
|
570
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_chain_service() != 63155:
|
|
565
571
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
566
572
|
if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_storage() != 59400:
|
|
567
573
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
@@ -589,6 +595,8 @@ def _uniffi_check_api_checksums(lib):
|
|
|
589
595
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
590
596
|
if lib.uniffi_breez_sdk_spark_checksum_method_storage_update_deposit() != 39803:
|
|
591
597
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
598
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_metadata() != 7460:
|
|
599
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
592
600
|
if lib.uniffi_breez_sdk_spark_checksum_method_syncstorage_add_outgoing_change() != 19087:
|
|
593
601
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
594
602
|
if lib.uniffi_breez_sdk_spark_checksum_method_syncstorage_complete_outgoing_sync() != 20071:
|
|
@@ -609,6 +617,20 @@ def _uniffi_check_api_checksums(lib):
|
|
|
609
617
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
610
618
|
if lib.uniffi_breez_sdk_spark_checksum_method_syncstorage_update_record_from_incoming() != 9986:
|
|
611
619
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
620
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_burn_issuer_token() != 56056:
|
|
621
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
622
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_create_issuer_token() != 33277:
|
|
623
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
624
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_freeze_issuer_token() != 32344:
|
|
625
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
626
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_get_issuer_token_balance() != 9758:
|
|
627
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
628
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_get_issuer_token_metadata() != 57707:
|
|
629
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
630
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_mint_issuer_token() != 36459:
|
|
631
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
632
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_unfreeze_issuer_token() != 65025:
|
|
633
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
612
634
|
if lib.uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new() != 65435:
|
|
613
635
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
614
636
|
if lib.uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event() != 24807:
|
|
@@ -734,6 +756,8 @@ _UNIFFI_CALLBACK_INTERFACE_BITCOIN_CHAIN_SERVICE_METHOD2 = ctypes.CFUNCTYPE(None
|
|
|
734
756
|
)
|
|
735
757
|
_UNIFFI_CALLBACK_INTERFACE_BITCOIN_CHAIN_SERVICE_METHOD3 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_VOID,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
736
758
|
)
|
|
759
|
+
_UNIFFI_CALLBACK_INTERFACE_BITCOIN_CHAIN_SERVICE_METHOD4 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
760
|
+
)
|
|
737
761
|
_UNIFFI_CALLBACK_INTERFACE_FIAT_SERVICE_METHOD0 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
738
762
|
)
|
|
739
763
|
_UNIFFI_CALLBACK_INTERFACE_FIAT_SERVICE_METHOD1 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
@@ -770,6 +794,8 @@ _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD10 = ctypes.CFUNCTYPE(None,ctypes.c_uin
|
|
|
770
794
|
)
|
|
771
795
|
_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),
|
|
772
796
|
)
|
|
797
|
+
_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD12 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_VOID,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
798
|
+
)
|
|
773
799
|
_UNIFFI_CALLBACK_INTERFACE_SYNC_STORAGE_METHOD0 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_U64,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
774
800
|
)
|
|
775
801
|
_UNIFFI_CALLBACK_INTERFACE_SYNC_STORAGE_METHOD1 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_VOID,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
@@ -806,6 +832,7 @@ class _UniffiVTableCallbackInterfaceBitcoinChainService(ctypes.Structure):
|
|
|
806
832
|
("get_transaction_status", _UNIFFI_CALLBACK_INTERFACE_BITCOIN_CHAIN_SERVICE_METHOD1),
|
|
807
833
|
("get_transaction_hex", _UNIFFI_CALLBACK_INTERFACE_BITCOIN_CHAIN_SERVICE_METHOD2),
|
|
808
834
|
("broadcast_transaction", _UNIFFI_CALLBACK_INTERFACE_BITCOIN_CHAIN_SERVICE_METHOD3),
|
|
835
|
+
("recommended_fees", _UNIFFI_CALLBACK_INTERFACE_BITCOIN_CHAIN_SERVICE_METHOD4),
|
|
809
836
|
("uniffi_free", _UNIFFI_CALLBACK_INTERFACE_FREE),
|
|
810
837
|
]
|
|
811
838
|
class _UniffiVTableCallbackInterfaceFiatService(ctypes.Structure):
|
|
@@ -840,6 +867,7 @@ class _UniffiVTableCallbackInterfaceStorage(ctypes.Structure):
|
|
|
840
867
|
("delete_deposit", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD9),
|
|
841
868
|
("list_deposits", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD10),
|
|
842
869
|
("update_deposit", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD11),
|
|
870
|
+
("set_lnurl_metadata", _UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD12),
|
|
843
871
|
("uniffi_free", _UNIFFI_CALLBACK_INTERFACE_FREE),
|
|
844
872
|
]
|
|
845
873
|
class _UniffiVTableCallbackInterfaceSyncStorage(ctypes.Structure):
|
|
@@ -890,6 +918,10 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_broadcast_transa
|
|
|
890
918
|
_UniffiRustBuffer,
|
|
891
919
|
)
|
|
892
920
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_broadcast_transaction.restype = ctypes.c_uint64
|
|
921
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_recommended_fees.argtypes = (
|
|
922
|
+
ctypes.c_void_p,
|
|
923
|
+
)
|
|
924
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_recommended_fees.restype = ctypes.c_uint64
|
|
893
925
|
_UniffiLib.uniffi_breez_sdk_spark_fn_clone_breezsdk.argtypes = (
|
|
894
926
|
ctypes.c_void_p,
|
|
895
927
|
ctypes.POINTER(_UniffiRustCallStatus),
|
|
@@ -920,6 +952,11 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_claim_deposit.argtypes = (
|
|
|
920
952
|
_UniffiRustBuffer,
|
|
921
953
|
)
|
|
922
954
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_claim_deposit.restype = ctypes.c_uint64
|
|
955
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_claim_htlc_payment.argtypes = (
|
|
956
|
+
ctypes.c_void_p,
|
|
957
|
+
_UniffiRustBuffer,
|
|
958
|
+
)
|
|
959
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_claim_htlc_payment.restype = ctypes.c_uint64
|
|
923
960
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_delete_lightning_address.argtypes = (
|
|
924
961
|
ctypes.c_void_p,
|
|
925
962
|
)
|
|
@@ -942,6 +979,11 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_get_payment.argtypes = (
|
|
|
942
979
|
_UniffiRustBuffer,
|
|
943
980
|
)
|
|
944
981
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_get_payment.restype = ctypes.c_uint64
|
|
982
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_get_token_issuer.argtypes = (
|
|
983
|
+
ctypes.c_void_p,
|
|
984
|
+
ctypes.POINTER(_UniffiRustCallStatus),
|
|
985
|
+
)
|
|
986
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_get_token_issuer.restype = ctypes.c_void_p
|
|
945
987
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_get_tokens_metadata.argtypes = (
|
|
946
988
|
ctypes.c_void_p,
|
|
947
989
|
_UniffiRustBuffer,
|
|
@@ -999,6 +1041,10 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_receive_payment.argtypes =
|
|
|
999
1041
|
_UniffiRustBuffer,
|
|
1000
1042
|
)
|
|
1001
1043
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_receive_payment.restype = ctypes.c_uint64
|
|
1044
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_recommended_fees.argtypes = (
|
|
1045
|
+
ctypes.c_void_p,
|
|
1046
|
+
)
|
|
1047
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_recommended_fees.restype = ctypes.c_uint64
|
|
1002
1048
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_refund_deposit.argtypes = (
|
|
1003
1049
|
ctypes.c_void_p,
|
|
1004
1050
|
_UniffiRustBuffer,
|
|
@@ -1034,11 +1080,6 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_update_user_settings.argtyp
|
|
|
1034
1080
|
_UniffiRustBuffer,
|
|
1035
1081
|
)
|
|
1036
1082
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_update_user_settings.restype = ctypes.c_uint64
|
|
1037
|
-
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment.argtypes = (
|
|
1038
|
-
ctypes.c_void_p,
|
|
1039
|
-
_UniffiRustBuffer,
|
|
1040
|
-
)
|
|
1041
|
-
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment.restype = ctypes.c_uint64
|
|
1042
1083
|
_UniffiLib.uniffi_breez_sdk_spark_fn_clone_fiatservice.argtypes = (
|
|
1043
1084
|
ctypes.c_void_p,
|
|
1044
1085
|
ctypes.POINTER(_UniffiRustCallStatus),
|
|
@@ -1175,6 +1216,7 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_rest_chain_service.a
|
|
|
1175
1216
|
ctypes.c_void_p,
|
|
1176
1217
|
_UniffiRustBuffer,
|
|
1177
1218
|
_UniffiRustBuffer,
|
|
1219
|
+
_UniffiRustBuffer,
|
|
1178
1220
|
)
|
|
1179
1221
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_rest_chain_service.restype = ctypes.c_uint64
|
|
1180
1222
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_storage.argtypes = (
|
|
@@ -1262,6 +1304,11 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_update_deposit.argtypes = (
|
|
|
1262
1304
|
_UniffiRustBuffer,
|
|
1263
1305
|
)
|
|
1264
1306
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_update_deposit.restype = ctypes.c_uint64
|
|
1307
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_set_lnurl_metadata.argtypes = (
|
|
1308
|
+
ctypes.c_void_p,
|
|
1309
|
+
_UniffiRustBuffer,
|
|
1310
|
+
)
|
|
1311
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_set_lnurl_metadata.restype = ctypes.c_uint64
|
|
1265
1312
|
_UniffiLib.uniffi_breez_sdk_spark_fn_clone_syncstorage.argtypes = (
|
|
1266
1313
|
ctypes.c_void_p,
|
|
1267
1314
|
ctypes.POINTER(_UniffiRustCallStatus),
|
|
@@ -1324,6 +1371,49 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_syncstorage_update_record_from_incom
|
|
|
1324
1371
|
_UniffiRustBuffer,
|
|
1325
1372
|
)
|
|
1326
1373
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_syncstorage_update_record_from_incoming.restype = ctypes.c_uint64
|
|
1374
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_clone_tokenissuer.argtypes = (
|
|
1375
|
+
ctypes.c_void_p,
|
|
1376
|
+
ctypes.POINTER(_UniffiRustCallStatus),
|
|
1377
|
+
)
|
|
1378
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_clone_tokenissuer.restype = ctypes.c_void_p
|
|
1379
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_free_tokenissuer.argtypes = (
|
|
1380
|
+
ctypes.c_void_p,
|
|
1381
|
+
ctypes.POINTER(_UniffiRustCallStatus),
|
|
1382
|
+
)
|
|
1383
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_free_tokenissuer.restype = None
|
|
1384
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_burn_issuer_token.argtypes = (
|
|
1385
|
+
ctypes.c_void_p,
|
|
1386
|
+
_UniffiRustBuffer,
|
|
1387
|
+
)
|
|
1388
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_burn_issuer_token.restype = ctypes.c_uint64
|
|
1389
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_create_issuer_token.argtypes = (
|
|
1390
|
+
ctypes.c_void_p,
|
|
1391
|
+
_UniffiRustBuffer,
|
|
1392
|
+
)
|
|
1393
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_create_issuer_token.restype = ctypes.c_uint64
|
|
1394
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_freeze_issuer_token.argtypes = (
|
|
1395
|
+
ctypes.c_void_p,
|
|
1396
|
+
_UniffiRustBuffer,
|
|
1397
|
+
)
|
|
1398
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_freeze_issuer_token.restype = ctypes.c_uint64
|
|
1399
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_get_issuer_token_balance.argtypes = (
|
|
1400
|
+
ctypes.c_void_p,
|
|
1401
|
+
)
|
|
1402
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_get_issuer_token_balance.restype = ctypes.c_uint64
|
|
1403
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_get_issuer_token_metadata.argtypes = (
|
|
1404
|
+
ctypes.c_void_p,
|
|
1405
|
+
)
|
|
1406
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_get_issuer_token_metadata.restype = ctypes.c_uint64
|
|
1407
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_mint_issuer_token.argtypes = (
|
|
1408
|
+
ctypes.c_void_p,
|
|
1409
|
+
_UniffiRustBuffer,
|
|
1410
|
+
)
|
|
1411
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_mint_issuer_token.restype = ctypes.c_uint64
|
|
1412
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_unfreeze_issuer_token.argtypes = (
|
|
1413
|
+
ctypes.c_void_p,
|
|
1414
|
+
_UniffiRustBuffer,
|
|
1415
|
+
)
|
|
1416
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_unfreeze_issuer_token.restype = ctypes.c_uint64
|
|
1327
1417
|
_UniffiLib.uniffi_breez_sdk_spark_fn_init_callback_vtable_eventlistener.argtypes = (
|
|
1328
1418
|
ctypes.POINTER(_UniffiVTableCallbackInterfaceEventListener),
|
|
1329
1419
|
)
|
|
@@ -1637,6 +1727,9 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transa
|
|
|
1637
1727
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction.argtypes = (
|
|
1638
1728
|
)
|
|
1639
1729
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction.restype = ctypes.c_uint16
|
|
1730
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees.argtypes = (
|
|
1731
|
+
)
|
|
1732
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_recommended_fees.restype = ctypes.c_uint16
|
|
1640
1733
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener.argtypes = (
|
|
1641
1734
|
)
|
|
1642
1735
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener.restype = ctypes.c_uint16
|
|
@@ -1649,6 +1742,9 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_check_message.restype
|
|
|
1649
1742
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit.argtypes = (
|
|
1650
1743
|
)
|
|
1651
1744
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_deposit.restype = ctypes.c_uint16
|
|
1745
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_htlc_payment.argtypes = (
|
|
1746
|
+
)
|
|
1747
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_claim_htlc_payment.restype = ctypes.c_uint16
|
|
1652
1748
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_address.argtypes = (
|
|
1653
1749
|
)
|
|
1654
1750
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_address.restype = ctypes.c_uint16
|
|
@@ -1664,6 +1760,9 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_lightning_address
|
|
|
1664
1760
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment.argtypes = (
|
|
1665
1761
|
)
|
|
1666
1762
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment.restype = ctypes.c_uint16
|
|
1763
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_token_issuer.argtypes = (
|
|
1764
|
+
)
|
|
1765
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_token_issuer.restype = ctypes.c_uint16
|
|
1667
1766
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_tokens_metadata.argtypes = (
|
|
1668
1767
|
)
|
|
1669
1768
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_tokens_metadata.restype = ctypes.c_uint16
|
|
@@ -1700,6 +1799,9 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_send_payment.
|
|
|
1700
1799
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment.argtypes = (
|
|
1701
1800
|
)
|
|
1702
1801
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_receive_payment.restype = ctypes.c_uint16
|
|
1802
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_fees.argtypes = (
|
|
1803
|
+
)
|
|
1804
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_recommended_fees.restype = ctypes.c_uint16
|
|
1703
1805
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit.argtypes = (
|
|
1704
1806
|
)
|
|
1705
1807
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_refund_deposit.restype = ctypes.c_uint16
|
|
@@ -1721,9 +1823,6 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_sync_wallet.restype =
|
|
|
1721
1823
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_update_user_settings.argtypes = (
|
|
1722
1824
|
)
|
|
1723
1825
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_update_user_settings.restype = ctypes.c_uint16
|
|
1724
|
-
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment.argtypes = (
|
|
1725
|
-
)
|
|
1726
|
-
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_wait_for_payment.restype = ctypes.c_uint16
|
|
1727
1826
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies.argtypes = (
|
|
1728
1827
|
)
|
|
1729
1828
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies.restype = ctypes.c_uint16
|
|
@@ -1808,6 +1907,9 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_list_deposits.restype
|
|
|
1808
1907
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_update_deposit.argtypes = (
|
|
1809
1908
|
)
|
|
1810
1909
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_update_deposit.restype = ctypes.c_uint16
|
|
1910
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_metadata.argtypes = (
|
|
1911
|
+
)
|
|
1912
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_storage_set_lnurl_metadata.restype = ctypes.c_uint16
|
|
1811
1913
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_syncstorage_add_outgoing_change.argtypes = (
|
|
1812
1914
|
)
|
|
1813
1915
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_syncstorage_add_outgoing_change.restype = ctypes.c_uint16
|
|
@@ -1838,6 +1940,27 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_syncstorage_get_latest_outgoin
|
|
|
1838
1940
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_syncstorage_update_record_from_incoming.argtypes = (
|
|
1839
1941
|
)
|
|
1840
1942
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_syncstorage_update_record_from_incoming.restype = ctypes.c_uint16
|
|
1943
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_burn_issuer_token.argtypes = (
|
|
1944
|
+
)
|
|
1945
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_burn_issuer_token.restype = ctypes.c_uint16
|
|
1946
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_create_issuer_token.argtypes = (
|
|
1947
|
+
)
|
|
1948
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_create_issuer_token.restype = ctypes.c_uint16
|
|
1949
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_freeze_issuer_token.argtypes = (
|
|
1950
|
+
)
|
|
1951
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_freeze_issuer_token.restype = ctypes.c_uint16
|
|
1952
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_get_issuer_token_balance.argtypes = (
|
|
1953
|
+
)
|
|
1954
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_get_issuer_token_balance.restype = ctypes.c_uint16
|
|
1955
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_get_issuer_token_metadata.argtypes = (
|
|
1956
|
+
)
|
|
1957
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_get_issuer_token_metadata.restype = ctypes.c_uint16
|
|
1958
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_mint_issuer_token.argtypes = (
|
|
1959
|
+
)
|
|
1960
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_mint_issuer_token.restype = ctypes.c_uint16
|
|
1961
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_unfreeze_issuer_token.argtypes = (
|
|
1962
|
+
)
|
|
1963
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_tokenissuer_unfreeze_issuer_token.restype = ctypes.c_uint16
|
|
1841
1964
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new.argtypes = (
|
|
1842
1965
|
)
|
|
1843
1966
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new.restype = ctypes.c_uint16
|
|
@@ -1989,6 +2112,8 @@ class BitcoinChainService(typing.Protocol):
|
|
|
1989
2112
|
raise NotImplementedError
|
|
1990
2113
|
def broadcast_transaction(self, tx: "str"):
|
|
1991
2114
|
raise NotImplementedError
|
|
2115
|
+
def recommended_fees(self, ):
|
|
2116
|
+
raise NotImplementedError
|
|
1992
2117
|
|
|
1993
2118
|
|
|
1994
2119
|
class BitcoinChainServiceImpl:
|
|
@@ -2100,6 +2225,24 @@ _UniffiConverterTypeChainServiceError,
|
|
|
2100
2225
|
)
|
|
2101
2226
|
|
|
2102
2227
|
|
|
2228
|
+
|
|
2229
|
+
async def recommended_fees(self, ) -> "RecommendedFees":
|
|
2230
|
+
return await _uniffi_rust_call_async(
|
|
2231
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_recommended_fees(
|
|
2232
|
+
self._uniffi_clone_pointer(),
|
|
2233
|
+
),
|
|
2234
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
2235
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
2236
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
2237
|
+
# lift function
|
|
2238
|
+
_UniffiConverterTypeRecommendedFees.lift,
|
|
2239
|
+
|
|
2240
|
+
# Error FFI converter
|
|
2241
|
+
_UniffiConverterTypeChainServiceError,
|
|
2242
|
+
|
|
2243
|
+
)
|
|
2244
|
+
|
|
2245
|
+
|
|
2103
2246
|
# Magic number for the Rust proxy to call using the same mechanism as every other method,
|
|
2104
2247
|
# to free the callback once it's dropped by Rust.
|
|
2105
2248
|
_UNIFFI_IDX_CALLBACK_FREE = 0
|
|
@@ -2271,6 +2414,39 @@ class _UniffiTraitImplBitcoinChainService:
|
|
|
2271
2414
|
)
|
|
2272
2415
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, ChainServiceError, _UniffiConverterTypeChainServiceError.lower)
|
|
2273
2416
|
|
|
2417
|
+
@_UNIFFI_CALLBACK_INTERFACE_BITCOIN_CHAIN_SERVICE_METHOD4
|
|
2418
|
+
def recommended_fees(
|
|
2419
|
+
uniffi_handle,
|
|
2420
|
+
uniffi_future_callback,
|
|
2421
|
+
uniffi_callback_data,
|
|
2422
|
+
uniffi_out_return,
|
|
2423
|
+
):
|
|
2424
|
+
uniffi_obj = _UniffiConverterTypeBitcoinChainService._handle_map.get(uniffi_handle)
|
|
2425
|
+
def make_call():
|
|
2426
|
+
args = ()
|
|
2427
|
+
method = uniffi_obj.recommended_fees
|
|
2428
|
+
return method(*args)
|
|
2429
|
+
|
|
2430
|
+
|
|
2431
|
+
def handle_success(return_value):
|
|
2432
|
+
uniffi_future_callback(
|
|
2433
|
+
uniffi_callback_data,
|
|
2434
|
+
_UniffiForeignFutureStructRustBuffer(
|
|
2435
|
+
_UniffiConverterTypeRecommendedFees.lower(return_value),
|
|
2436
|
+
_UniffiRustCallStatus.default()
|
|
2437
|
+
)
|
|
2438
|
+
)
|
|
2439
|
+
|
|
2440
|
+
def handle_error(status_code, rust_buffer):
|
|
2441
|
+
uniffi_future_callback(
|
|
2442
|
+
uniffi_callback_data,
|
|
2443
|
+
_UniffiForeignFutureStructRustBuffer(
|
|
2444
|
+
_UniffiRustBuffer.default(),
|
|
2445
|
+
_UniffiRustCallStatus(status_code, rust_buffer),
|
|
2446
|
+
)
|
|
2447
|
+
)
|
|
2448
|
+
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, ChainServiceError, _UniffiConverterTypeChainServiceError.lower)
|
|
2449
|
+
|
|
2274
2450
|
@_UNIFFI_CALLBACK_INTERFACE_FREE
|
|
2275
2451
|
def _uniffi_free(uniffi_handle):
|
|
2276
2452
|
_UniffiConverterTypeBitcoinChainService._handle_map.remove(uniffi_handle)
|
|
@@ -2281,6 +2457,7 @@ class _UniffiTraitImplBitcoinChainService:
|
|
|
2281
2457
|
get_transaction_status,
|
|
2282
2458
|
get_transaction_hex,
|
|
2283
2459
|
broadcast_transaction,
|
|
2460
|
+
recommended_fees,
|
|
2284
2461
|
_uniffi_free
|
|
2285
2462
|
)
|
|
2286
2463
|
# Send Rust a pointer to the VTable. Note: this means we need to keep the struct alive forever,
|
|
@@ -2349,6 +2526,8 @@ class BreezSdkProtocol(typing.Protocol):
|
|
|
2349
2526
|
raise NotImplementedError
|
|
2350
2527
|
def claim_deposit(self, request: "ClaimDepositRequest"):
|
|
2351
2528
|
raise NotImplementedError
|
|
2529
|
+
def claim_htlc_payment(self, request: "ClaimHtlcPaymentRequest"):
|
|
2530
|
+
raise NotImplementedError
|
|
2352
2531
|
def delete_lightning_address(self, ):
|
|
2353
2532
|
raise NotImplementedError
|
|
2354
2533
|
def disconnect(self, ):
|
|
@@ -2373,6 +2552,12 @@ class BreezSdkProtocol(typing.Protocol):
|
|
|
2373
2552
|
def get_lightning_address(self, ):
|
|
2374
2553
|
raise NotImplementedError
|
|
2375
2554
|
def get_payment(self, request: "GetPaymentRequest"):
|
|
2555
|
+
raise NotImplementedError
|
|
2556
|
+
def get_token_issuer(self, ):
|
|
2557
|
+
"""
|
|
2558
|
+
Returns an instance of the [`TokenIssuer`] for managing token issuance.
|
|
2559
|
+
"""
|
|
2560
|
+
|
|
2376
2561
|
raise NotImplementedError
|
|
2377
2562
|
def get_tokens_metadata(self, request: "GetTokensMetadataRequest"):
|
|
2378
2563
|
"""
|
|
@@ -2466,6 +2651,12 @@ class BreezSdkProtocol(typing.Protocol):
|
|
|
2466
2651
|
def prepare_send_payment(self, request: "PrepareSendPaymentRequest"):
|
|
2467
2652
|
raise NotImplementedError
|
|
2468
2653
|
def receive_payment(self, request: "ReceivePaymentRequest"):
|
|
2654
|
+
raise NotImplementedError
|
|
2655
|
+
def recommended_fees(self, ):
|
|
2656
|
+
"""
|
|
2657
|
+
Get the recommended BTC fees based on the configured chain service.
|
|
2658
|
+
"""
|
|
2659
|
+
|
|
2469
2660
|
raise NotImplementedError
|
|
2470
2661
|
def refund_deposit(self, request: "RefundDepositRequest"):
|
|
2471
2662
|
raise NotImplementedError
|
|
@@ -2509,8 +2700,6 @@ class BreezSdkProtocol(typing.Protocol):
|
|
|
2509
2700
|
"""
|
|
2510
2701
|
|
|
2511
2702
|
raise NotImplementedError
|
|
2512
|
-
def wait_for_payment(self, request: "WaitForPaymentRequest"):
|
|
2513
|
-
raise NotImplementedError
|
|
2514
2703
|
|
|
2515
2704
|
|
|
2516
2705
|
class BreezSdk:
|
|
@@ -2645,6 +2834,27 @@ _UniffiConverterTypeSdkError,
|
|
|
2645
2834
|
|
|
2646
2835
|
|
|
2647
2836
|
|
|
2837
|
+
async def claim_htlc_payment(self, request: "ClaimHtlcPaymentRequest") -> "ClaimHtlcPaymentResponse":
|
|
2838
|
+
_UniffiConverterTypeClaimHtlcPaymentRequest.check_lower(request)
|
|
2839
|
+
|
|
2840
|
+
return await _uniffi_rust_call_async(
|
|
2841
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_claim_htlc_payment(
|
|
2842
|
+
self._uniffi_clone_pointer(),
|
|
2843
|
+
_UniffiConverterTypeClaimHtlcPaymentRequest.lower(request)
|
|
2844
|
+
),
|
|
2845
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
2846
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
2847
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
2848
|
+
# lift function
|
|
2849
|
+
_UniffiConverterTypeClaimHtlcPaymentResponse.lift,
|
|
2850
|
+
|
|
2851
|
+
# Error FFI converter
|
|
2852
|
+
_UniffiConverterTypeSdkError,
|
|
2853
|
+
|
|
2854
|
+
)
|
|
2855
|
+
|
|
2856
|
+
|
|
2857
|
+
|
|
2648
2858
|
async def delete_lightning_address(self, ) -> None:
|
|
2649
2859
|
|
|
2650
2860
|
return await _uniffi_rust_call_async(
|
|
@@ -2760,6 +2970,19 @@ _UniffiConverterTypeSdkError,
|
|
|
2760
2970
|
|
|
2761
2971
|
|
|
2762
2972
|
|
|
2973
|
+
|
|
2974
|
+
def get_token_issuer(self, ) -> "TokenIssuer":
|
|
2975
|
+
"""
|
|
2976
|
+
Returns an instance of the [`TokenIssuer`] for managing token issuance.
|
|
2977
|
+
"""
|
|
2978
|
+
|
|
2979
|
+
return _UniffiConverterTypeTokenIssuer.lift(
|
|
2980
|
+
_uniffi_rust_call(_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_get_token_issuer,self._uniffi_clone_pointer(),)
|
|
2981
|
+
)
|
|
2982
|
+
|
|
2983
|
+
|
|
2984
|
+
|
|
2985
|
+
|
|
2763
2986
|
async def get_tokens_metadata(self, request: "GetTokensMetadataRequest") -> "GetTokensMetadataResponse":
|
|
2764
2987
|
"""
|
|
2765
2988
|
Returns the metadata for the given token identifiers.
|
|
@@ -3072,6 +3295,28 @@ _UniffiConverterTypeSdkError,
|
|
|
3072
3295
|
|
|
3073
3296
|
|
|
3074
3297
|
|
|
3298
|
+
async def recommended_fees(self, ) -> "RecommendedFees":
|
|
3299
|
+
"""
|
|
3300
|
+
Get the recommended BTC fees based on the configured chain service.
|
|
3301
|
+
"""
|
|
3302
|
+
|
|
3303
|
+
return await _uniffi_rust_call_async(
|
|
3304
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_recommended_fees(
|
|
3305
|
+
self._uniffi_clone_pointer(),
|
|
3306
|
+
),
|
|
3307
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
3308
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
3309
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
3310
|
+
# lift function
|
|
3311
|
+
_UniffiConverterTypeRecommendedFees.lift,
|
|
3312
|
+
|
|
3313
|
+
# Error FFI converter
|
|
3314
|
+
_UniffiConverterTypeSdkError,
|
|
3315
|
+
|
|
3316
|
+
)
|
|
3317
|
+
|
|
3318
|
+
|
|
3319
|
+
|
|
3075
3320
|
async def refund_deposit(self, request: "RefundDepositRequest") -> "RefundDepositResponse":
|
|
3076
3321
|
_UniffiConverterTypeRefundDepositRequest.check_lower(request)
|
|
3077
3322
|
|
|
@@ -3250,27 +3495,6 @@ _UniffiConverterTypeSdkError,
|
|
|
3250
3495
|
|
|
3251
3496
|
|
|
3252
3497
|
|
|
3253
|
-
async def wait_for_payment(self, request: "WaitForPaymentRequest") -> "WaitForPaymentResponse":
|
|
3254
|
-
_UniffiConverterTypeWaitForPaymentRequest.check_lower(request)
|
|
3255
|
-
|
|
3256
|
-
return await _uniffi_rust_call_async(
|
|
3257
|
-
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_wait_for_payment(
|
|
3258
|
-
self._uniffi_clone_pointer(),
|
|
3259
|
-
_UniffiConverterTypeWaitForPaymentRequest.lower(request)
|
|
3260
|
-
),
|
|
3261
|
-
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
3262
|
-
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
3263
|
-
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
3264
|
-
# lift function
|
|
3265
|
-
_UniffiConverterTypeWaitForPaymentResponse.lift,
|
|
3266
|
-
|
|
3267
|
-
# Error FFI converter
|
|
3268
|
-
_UniffiConverterTypeSdkError,
|
|
3269
|
-
|
|
3270
|
-
)
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
3498
|
|
|
3275
3499
|
|
|
3276
3500
|
class _UniffiConverterTypeBreezSdk:
|
|
@@ -4037,11 +4261,12 @@ class SdkBuilderProtocol(typing.Protocol):
|
|
|
4037
4261
|
"""
|
|
4038
4262
|
|
|
4039
4263
|
raise NotImplementedError
|
|
4040
|
-
def with_rest_chain_service(self, url: "str",credentials: "typing.Optional[Credentials]"):
|
|
4264
|
+
def with_rest_chain_service(self, url: "str",api_type: "ChainApiType",credentials: "typing.Optional[Credentials]"):
|
|
4041
4265
|
"""
|
|
4042
4266
|
Sets the REST chain service to be used by the SDK.
|
|
4043
4267
|
Arguments:
|
|
4044
4268
|
- `url`: The base URL of the REST API.
|
|
4269
|
+
- `api_type`: The API type to be used.
|
|
4045
4270
|
- `credentials`: Optional credentials for basic authentication.
|
|
4046
4271
|
"""
|
|
4047
4272
|
|
|
@@ -4331,23 +4556,27 @@ _UniffiConverterTypeSdkError,
|
|
|
4331
4556
|
|
|
4332
4557
|
|
|
4333
4558
|
|
|
4334
|
-
async def with_rest_chain_service(self, url: "str",credentials: "typing.Optional[Credentials]") -> None:
|
|
4559
|
+
async def with_rest_chain_service(self, url: "str",api_type: "ChainApiType",credentials: "typing.Optional[Credentials]") -> None:
|
|
4335
4560
|
|
|
4336
4561
|
"""
|
|
4337
4562
|
Sets the REST chain service to be used by the SDK.
|
|
4338
4563
|
Arguments:
|
|
4339
4564
|
- `url`: The base URL of the REST API.
|
|
4565
|
+
- `api_type`: The API type to be used.
|
|
4340
4566
|
- `credentials`: Optional credentials for basic authentication.
|
|
4341
4567
|
"""
|
|
4342
4568
|
|
|
4343
4569
|
_UniffiConverterString.check_lower(url)
|
|
4344
4570
|
|
|
4571
|
+
_UniffiConverterTypeChainApiType.check_lower(api_type)
|
|
4572
|
+
|
|
4345
4573
|
_UniffiConverterOptionalTypeCredentials.check_lower(credentials)
|
|
4346
4574
|
|
|
4347
4575
|
return await _uniffi_rust_call_async(
|
|
4348
4576
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_rest_chain_service(
|
|
4349
4577
|
self._uniffi_clone_pointer(),
|
|
4350
4578
|
_UniffiConverterString.lower(url),
|
|
4579
|
+
_UniffiConverterTypeChainApiType.lower(api_type),
|
|
4351
4580
|
_UniffiConverterOptionalTypeCredentials.lower(credentials)
|
|
4352
4581
|
),
|
|
4353
4582
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_void,
|
|
@@ -4559,6 +4788,8 @@ class Storage(typing.Protocol):
|
|
|
4559
4788
|
"""
|
|
4560
4789
|
|
|
4561
4790
|
raise NotImplementedError
|
|
4791
|
+
def set_lnurl_metadata(self, metadata: "typing.List[SetLnurlMetadataItem]"):
|
|
4792
|
+
raise NotImplementedError
|
|
4562
4793
|
|
|
4563
4794
|
|
|
4564
4795
|
class StorageImpl:
|
|
@@ -4976,6 +5207,29 @@ _UniffiConverterTypeStorageError,
|
|
|
4976
5207
|
|
|
4977
5208
|
|
|
4978
5209
|
|
|
5210
|
+
async def set_lnurl_metadata(self, metadata: "typing.List[SetLnurlMetadataItem]") -> None:
|
|
5211
|
+
|
|
5212
|
+
_UniffiConverterSequenceTypeSetLnurlMetadataItem.check_lower(metadata)
|
|
5213
|
+
|
|
5214
|
+
return await _uniffi_rust_call_async(
|
|
5215
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_storage_set_lnurl_metadata(
|
|
5216
|
+
self._uniffi_clone_pointer(),
|
|
5217
|
+
_UniffiConverterSequenceTypeSetLnurlMetadataItem.lower(metadata)
|
|
5218
|
+
),
|
|
5219
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_void,
|
|
5220
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_void,
|
|
5221
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_void,
|
|
5222
|
+
# lift function
|
|
5223
|
+
lambda val: None,
|
|
5224
|
+
|
|
5225
|
+
|
|
5226
|
+
# Error FFI converter
|
|
5227
|
+
_UniffiConverterTypeStorageError,
|
|
5228
|
+
|
|
5229
|
+
)
|
|
5230
|
+
|
|
5231
|
+
|
|
5232
|
+
|
|
4979
5233
|
|
|
4980
5234
|
# Put all the bits inside a class to keep the top-level namespace clean
|
|
4981
5235
|
class _UniffiTraitImplStorage:
|
|
@@ -5381,6 +5635,38 @@ class _UniffiTraitImplStorage:
|
|
|
5381
5635
|
)
|
|
5382
5636
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, StorageError, _UniffiConverterTypeStorageError.lower)
|
|
5383
5637
|
|
|
5638
|
+
@_UNIFFI_CALLBACK_INTERFACE_STORAGE_METHOD12
|
|
5639
|
+
def set_lnurl_metadata(
|
|
5640
|
+
uniffi_handle,
|
|
5641
|
+
metadata,
|
|
5642
|
+
uniffi_future_callback,
|
|
5643
|
+
uniffi_callback_data,
|
|
5644
|
+
uniffi_out_return,
|
|
5645
|
+
):
|
|
5646
|
+
uniffi_obj = _UniffiConverterTypeStorage._handle_map.get(uniffi_handle)
|
|
5647
|
+
def make_call():
|
|
5648
|
+
args = (_UniffiConverterSequenceTypeSetLnurlMetadataItem.lift(metadata), )
|
|
5649
|
+
method = uniffi_obj.set_lnurl_metadata
|
|
5650
|
+
return method(*args)
|
|
5651
|
+
|
|
5652
|
+
|
|
5653
|
+
def handle_success(return_value):
|
|
5654
|
+
uniffi_future_callback(
|
|
5655
|
+
uniffi_callback_data,
|
|
5656
|
+
_UniffiForeignFutureStructVoid(
|
|
5657
|
+
_UniffiRustCallStatus.default()
|
|
5658
|
+
)
|
|
5659
|
+
)
|
|
5660
|
+
|
|
5661
|
+
def handle_error(status_code, rust_buffer):
|
|
5662
|
+
uniffi_future_callback(
|
|
5663
|
+
uniffi_callback_data,
|
|
5664
|
+
_UniffiForeignFutureStructVoid(
|
|
5665
|
+
_UniffiRustCallStatus(status_code, rust_buffer),
|
|
5666
|
+
)
|
|
5667
|
+
)
|
|
5668
|
+
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, StorageError, _UniffiConverterTypeStorageError.lower)
|
|
5669
|
+
|
|
5384
5670
|
@_UNIFFI_CALLBACK_INTERFACE_FREE
|
|
5385
5671
|
def _uniffi_free(uniffi_handle):
|
|
5386
5672
|
_UniffiConverterTypeStorage._handle_map.remove(uniffi_handle)
|
|
@@ -5399,6 +5685,7 @@ class _UniffiTraitImplStorage:
|
|
|
5399
5685
|
delete_deposit,
|
|
5400
5686
|
list_deposits,
|
|
5401
5687
|
update_deposit,
|
|
5688
|
+
set_lnurl_metadata,
|
|
5402
5689
|
_uniffi_free
|
|
5403
5690
|
)
|
|
5404
5691
|
# Send Rust a pointer to the VTable. Note: this means we need to keep the struct alive forever,
|
|
@@ -6136,31 +6423,425 @@ class _UniffiConverterTypeSyncStorage:
|
|
|
6136
6423
|
buf.write_u64(cls.lower(value))
|
|
6137
6424
|
|
|
6138
6425
|
|
|
6139
|
-
class AesSuccessActionData:
|
|
6140
|
-
"""
|
|
6141
|
-
Payload of the AES success action, as received from the LNURL endpoint
|
|
6142
6426
|
|
|
6143
|
-
|
|
6144
|
-
""
|
|
6427
|
+
class TokenIssuerProtocol(typing.Protocol):
|
|
6428
|
+
def burn_issuer_token(self, request: "BurnIssuerTokenRequest"):
|
|
6429
|
+
"""
|
|
6430
|
+
Burns supply of the issuer token
|
|
6145
6431
|
|
|
6146
|
-
|
|
6147
|
-
"""
|
|
6148
|
-
Contents description, up to 144 characters
|
|
6149
|
-
"""
|
|
6432
|
+
# Arguments
|
|
6150
6433
|
|
|
6151
|
-
|
|
6152
|
-
"""
|
|
6153
|
-
Base64, AES-encrypted data where encryption key is payment preimage, up to 4kb of characters
|
|
6154
|
-
"""
|
|
6434
|
+
* `request`: The request containing the amount of the supply to burn
|
|
6155
6435
|
|
|
6156
|
-
|
|
6157
|
-
"""
|
|
6158
|
-
Base64, initialization vector, exactly 24 characters
|
|
6159
|
-
"""
|
|
6436
|
+
# Returns
|
|
6160
6437
|
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6438
|
+
Result containing either:
|
|
6439
|
+
* `Payment` - The payment representing the burn transaction
|
|
6440
|
+
* `SdkError` - If there was an error during the burn process
|
|
6441
|
+
"""
|
|
6442
|
+
|
|
6443
|
+
raise NotImplementedError
|
|
6444
|
+
def create_issuer_token(self, request: "CreateIssuerTokenRequest"):
|
|
6445
|
+
"""
|
|
6446
|
+
Creates a new issuer token
|
|
6447
|
+
|
|
6448
|
+
# Arguments
|
|
6449
|
+
|
|
6450
|
+
* `request`: The request containing the token parameters
|
|
6451
|
+
|
|
6452
|
+
# Returns
|
|
6453
|
+
|
|
6454
|
+
Result containing either:
|
|
6455
|
+
* `TokenMetadata` - The metadata of the created token
|
|
6456
|
+
* `SdkError` - If there was an error during the token creation
|
|
6457
|
+
"""
|
|
6458
|
+
|
|
6459
|
+
raise NotImplementedError
|
|
6460
|
+
def freeze_issuer_token(self, request: "FreezeIssuerTokenRequest"):
|
|
6461
|
+
"""
|
|
6462
|
+
Freezes tokens held at the specified address
|
|
6463
|
+
|
|
6464
|
+
# Arguments
|
|
6465
|
+
|
|
6466
|
+
* `request`: The request containing the spark address where the tokens to be frozen are held
|
|
6467
|
+
|
|
6468
|
+
# Returns
|
|
6469
|
+
|
|
6470
|
+
Result containing either:
|
|
6471
|
+
* `FreezeIssuerTokenResponse` - The response containing details of the freeze operation
|
|
6472
|
+
* `SdkError` - If there was an error during the freeze process
|
|
6473
|
+
"""
|
|
6474
|
+
|
|
6475
|
+
raise NotImplementedError
|
|
6476
|
+
def get_issuer_token_balance(self, ):
|
|
6477
|
+
"""
|
|
6478
|
+
Gets the issuer token balance
|
|
6479
|
+
|
|
6480
|
+
# Returns
|
|
6481
|
+
|
|
6482
|
+
Result containing either:
|
|
6483
|
+
* `TokenBalance` - The balance of the issuer token
|
|
6484
|
+
* `SdkError` - If there was an error during the retrieval or no issuer token exists
|
|
6485
|
+
"""
|
|
6486
|
+
|
|
6487
|
+
raise NotImplementedError
|
|
6488
|
+
def get_issuer_token_metadata(self, ):
|
|
6489
|
+
"""
|
|
6490
|
+
Gets the issuer token metadata
|
|
6491
|
+
|
|
6492
|
+
# Returns
|
|
6493
|
+
|
|
6494
|
+
Result containing either:
|
|
6495
|
+
* `TokenMetadata` - The metadata of the issuer token
|
|
6496
|
+
* `SdkError` - If there was an error during the retrieval or no issuer token exists
|
|
6497
|
+
"""
|
|
6498
|
+
|
|
6499
|
+
raise NotImplementedError
|
|
6500
|
+
def mint_issuer_token(self, request: "MintIssuerTokenRequest"):
|
|
6501
|
+
"""
|
|
6502
|
+
Mints supply for the issuer token
|
|
6503
|
+
|
|
6504
|
+
# Arguments
|
|
6505
|
+
|
|
6506
|
+
* `request`: The request contiaining the amount of the supply to mint
|
|
6507
|
+
|
|
6508
|
+
# Returns
|
|
6509
|
+
|
|
6510
|
+
Result containing either:
|
|
6511
|
+
* `Payment` - The payment representing the minting transaction
|
|
6512
|
+
* `SdkError` - If there was an error during the minting process
|
|
6513
|
+
"""
|
|
6514
|
+
|
|
6515
|
+
raise NotImplementedError
|
|
6516
|
+
def unfreeze_issuer_token(self, request: "UnfreezeIssuerTokenRequest"):
|
|
6517
|
+
"""
|
|
6518
|
+
Unfreezes tokens held at the specified address
|
|
6519
|
+
|
|
6520
|
+
# Arguments
|
|
6521
|
+
|
|
6522
|
+
* `request`: The request containing the spark address where the tokens to be unfrozen are held
|
|
6523
|
+
|
|
6524
|
+
# Returns
|
|
6525
|
+
|
|
6526
|
+
Result containing either:
|
|
6527
|
+
* `UnfreezeIssuerTokenResponse` - The response containing details of the unfreeze operation
|
|
6528
|
+
* `SdkError` - If there was an error during the unfreeze process
|
|
6529
|
+
"""
|
|
6530
|
+
|
|
6531
|
+
raise NotImplementedError
|
|
6532
|
+
|
|
6533
|
+
|
|
6534
|
+
class TokenIssuer:
|
|
6535
|
+
_pointer: ctypes.c_void_p
|
|
6536
|
+
|
|
6537
|
+
def __init__(self, *args, **kwargs):
|
|
6538
|
+
raise ValueError("This class has no default constructor")
|
|
6539
|
+
|
|
6540
|
+
def __del__(self):
|
|
6541
|
+
# In case of partial initialization of instances.
|
|
6542
|
+
pointer = getattr(self, "_pointer", None)
|
|
6543
|
+
if pointer is not None:
|
|
6544
|
+
_uniffi_rust_call(_UniffiLib.uniffi_breez_sdk_spark_fn_free_tokenissuer, pointer)
|
|
6545
|
+
|
|
6546
|
+
def _uniffi_clone_pointer(self):
|
|
6547
|
+
return _uniffi_rust_call(_UniffiLib.uniffi_breez_sdk_spark_fn_clone_tokenissuer, self._pointer)
|
|
6548
|
+
|
|
6549
|
+
# Used by alternative constructors or any methods which return this type.
|
|
6550
|
+
@classmethod
|
|
6551
|
+
def _make_instance_(cls, pointer):
|
|
6552
|
+
# Lightly yucky way to bypass the usual __init__ logic
|
|
6553
|
+
# and just create a new instance with the required pointer.
|
|
6554
|
+
inst = cls.__new__(cls)
|
|
6555
|
+
inst._pointer = pointer
|
|
6556
|
+
return inst
|
|
6557
|
+
|
|
6558
|
+
async def burn_issuer_token(self, request: "BurnIssuerTokenRequest") -> "Payment":
|
|
6559
|
+
"""
|
|
6560
|
+
Burns supply of the issuer token
|
|
6561
|
+
|
|
6562
|
+
# Arguments
|
|
6563
|
+
|
|
6564
|
+
* `request`: The request containing the amount of the supply to burn
|
|
6565
|
+
|
|
6566
|
+
# Returns
|
|
6567
|
+
|
|
6568
|
+
Result containing either:
|
|
6569
|
+
* `Payment` - The payment representing the burn transaction
|
|
6570
|
+
* `SdkError` - If there was an error during the burn process
|
|
6571
|
+
"""
|
|
6572
|
+
|
|
6573
|
+
_UniffiConverterTypeBurnIssuerTokenRequest.check_lower(request)
|
|
6574
|
+
|
|
6575
|
+
return await _uniffi_rust_call_async(
|
|
6576
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_burn_issuer_token(
|
|
6577
|
+
self._uniffi_clone_pointer(),
|
|
6578
|
+
_UniffiConverterTypeBurnIssuerTokenRequest.lower(request)
|
|
6579
|
+
),
|
|
6580
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
6581
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
6582
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
6583
|
+
# lift function
|
|
6584
|
+
_UniffiConverterTypePayment.lift,
|
|
6585
|
+
|
|
6586
|
+
# Error FFI converter
|
|
6587
|
+
_UniffiConverterTypeSdkError,
|
|
6588
|
+
|
|
6589
|
+
)
|
|
6590
|
+
|
|
6591
|
+
|
|
6592
|
+
|
|
6593
|
+
async def create_issuer_token(self, request: "CreateIssuerTokenRequest") -> "TokenMetadata":
|
|
6594
|
+
"""
|
|
6595
|
+
Creates a new issuer token
|
|
6596
|
+
|
|
6597
|
+
# Arguments
|
|
6598
|
+
|
|
6599
|
+
* `request`: The request containing the token parameters
|
|
6600
|
+
|
|
6601
|
+
# Returns
|
|
6602
|
+
|
|
6603
|
+
Result containing either:
|
|
6604
|
+
* `TokenMetadata` - The metadata of the created token
|
|
6605
|
+
* `SdkError` - If there was an error during the token creation
|
|
6606
|
+
"""
|
|
6607
|
+
|
|
6608
|
+
_UniffiConverterTypeCreateIssuerTokenRequest.check_lower(request)
|
|
6609
|
+
|
|
6610
|
+
return await _uniffi_rust_call_async(
|
|
6611
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_create_issuer_token(
|
|
6612
|
+
self._uniffi_clone_pointer(),
|
|
6613
|
+
_UniffiConverterTypeCreateIssuerTokenRequest.lower(request)
|
|
6614
|
+
),
|
|
6615
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
6616
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
6617
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
6618
|
+
# lift function
|
|
6619
|
+
_UniffiConverterTypeTokenMetadata.lift,
|
|
6620
|
+
|
|
6621
|
+
# Error FFI converter
|
|
6622
|
+
_UniffiConverterTypeSdkError,
|
|
6623
|
+
|
|
6624
|
+
)
|
|
6625
|
+
|
|
6626
|
+
|
|
6627
|
+
|
|
6628
|
+
async def freeze_issuer_token(self, request: "FreezeIssuerTokenRequest") -> "FreezeIssuerTokenResponse":
|
|
6629
|
+
"""
|
|
6630
|
+
Freezes tokens held at the specified address
|
|
6631
|
+
|
|
6632
|
+
# Arguments
|
|
6633
|
+
|
|
6634
|
+
* `request`: The request containing the spark address where the tokens to be frozen are held
|
|
6635
|
+
|
|
6636
|
+
# Returns
|
|
6637
|
+
|
|
6638
|
+
Result containing either:
|
|
6639
|
+
* `FreezeIssuerTokenResponse` - The response containing details of the freeze operation
|
|
6640
|
+
* `SdkError` - If there was an error during the freeze process
|
|
6641
|
+
"""
|
|
6642
|
+
|
|
6643
|
+
_UniffiConverterTypeFreezeIssuerTokenRequest.check_lower(request)
|
|
6644
|
+
|
|
6645
|
+
return await _uniffi_rust_call_async(
|
|
6646
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_freeze_issuer_token(
|
|
6647
|
+
self._uniffi_clone_pointer(),
|
|
6648
|
+
_UniffiConverterTypeFreezeIssuerTokenRequest.lower(request)
|
|
6649
|
+
),
|
|
6650
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
6651
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
6652
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
6653
|
+
# lift function
|
|
6654
|
+
_UniffiConverterTypeFreezeIssuerTokenResponse.lift,
|
|
6655
|
+
|
|
6656
|
+
# Error FFI converter
|
|
6657
|
+
_UniffiConverterTypeSdkError,
|
|
6658
|
+
|
|
6659
|
+
)
|
|
6660
|
+
|
|
6661
|
+
|
|
6662
|
+
|
|
6663
|
+
async def get_issuer_token_balance(self, ) -> "TokenBalance":
|
|
6664
|
+
"""
|
|
6665
|
+
Gets the issuer token balance
|
|
6666
|
+
|
|
6667
|
+
# Returns
|
|
6668
|
+
|
|
6669
|
+
Result containing either:
|
|
6670
|
+
* `TokenBalance` - The balance of the issuer token
|
|
6671
|
+
* `SdkError` - If there was an error during the retrieval or no issuer token exists
|
|
6672
|
+
"""
|
|
6673
|
+
|
|
6674
|
+
return await _uniffi_rust_call_async(
|
|
6675
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_get_issuer_token_balance(
|
|
6676
|
+
self._uniffi_clone_pointer(),
|
|
6677
|
+
),
|
|
6678
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
6679
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
6680
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
6681
|
+
# lift function
|
|
6682
|
+
_UniffiConverterTypeTokenBalance.lift,
|
|
6683
|
+
|
|
6684
|
+
# Error FFI converter
|
|
6685
|
+
_UniffiConverterTypeSdkError,
|
|
6686
|
+
|
|
6687
|
+
)
|
|
6688
|
+
|
|
6689
|
+
|
|
6690
|
+
|
|
6691
|
+
async def get_issuer_token_metadata(self, ) -> "TokenMetadata":
|
|
6692
|
+
"""
|
|
6693
|
+
Gets the issuer token metadata
|
|
6694
|
+
|
|
6695
|
+
# Returns
|
|
6696
|
+
|
|
6697
|
+
Result containing either:
|
|
6698
|
+
* `TokenMetadata` - The metadata of the issuer token
|
|
6699
|
+
* `SdkError` - If there was an error during the retrieval or no issuer token exists
|
|
6700
|
+
"""
|
|
6701
|
+
|
|
6702
|
+
return await _uniffi_rust_call_async(
|
|
6703
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_get_issuer_token_metadata(
|
|
6704
|
+
self._uniffi_clone_pointer(),
|
|
6705
|
+
),
|
|
6706
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
6707
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
6708
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
6709
|
+
# lift function
|
|
6710
|
+
_UniffiConverterTypeTokenMetadata.lift,
|
|
6711
|
+
|
|
6712
|
+
# Error FFI converter
|
|
6713
|
+
_UniffiConverterTypeSdkError,
|
|
6714
|
+
|
|
6715
|
+
)
|
|
6716
|
+
|
|
6717
|
+
|
|
6718
|
+
|
|
6719
|
+
async def mint_issuer_token(self, request: "MintIssuerTokenRequest") -> "Payment":
|
|
6720
|
+
"""
|
|
6721
|
+
Mints supply for the issuer token
|
|
6722
|
+
|
|
6723
|
+
# Arguments
|
|
6724
|
+
|
|
6725
|
+
* `request`: The request contiaining the amount of the supply to mint
|
|
6726
|
+
|
|
6727
|
+
# Returns
|
|
6728
|
+
|
|
6729
|
+
Result containing either:
|
|
6730
|
+
* `Payment` - The payment representing the minting transaction
|
|
6731
|
+
* `SdkError` - If there was an error during the minting process
|
|
6732
|
+
"""
|
|
6733
|
+
|
|
6734
|
+
_UniffiConverterTypeMintIssuerTokenRequest.check_lower(request)
|
|
6735
|
+
|
|
6736
|
+
return await _uniffi_rust_call_async(
|
|
6737
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_mint_issuer_token(
|
|
6738
|
+
self._uniffi_clone_pointer(),
|
|
6739
|
+
_UniffiConverterTypeMintIssuerTokenRequest.lower(request)
|
|
6740
|
+
),
|
|
6741
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
6742
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
6743
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
6744
|
+
# lift function
|
|
6745
|
+
_UniffiConverterTypePayment.lift,
|
|
6746
|
+
|
|
6747
|
+
# Error FFI converter
|
|
6748
|
+
_UniffiConverterTypeSdkError,
|
|
6749
|
+
|
|
6750
|
+
)
|
|
6751
|
+
|
|
6752
|
+
|
|
6753
|
+
|
|
6754
|
+
async def unfreeze_issuer_token(self, request: "UnfreezeIssuerTokenRequest") -> "UnfreezeIssuerTokenResponse":
|
|
6755
|
+
"""
|
|
6756
|
+
Unfreezes tokens held at the specified address
|
|
6757
|
+
|
|
6758
|
+
# Arguments
|
|
6759
|
+
|
|
6760
|
+
* `request`: The request containing the spark address where the tokens to be unfrozen are held
|
|
6761
|
+
|
|
6762
|
+
# Returns
|
|
6763
|
+
|
|
6764
|
+
Result containing either:
|
|
6765
|
+
* `UnfreezeIssuerTokenResponse` - The response containing details of the unfreeze operation
|
|
6766
|
+
* `SdkError` - If there was an error during the unfreeze process
|
|
6767
|
+
"""
|
|
6768
|
+
|
|
6769
|
+
_UniffiConverterTypeUnfreezeIssuerTokenRequest.check_lower(request)
|
|
6770
|
+
|
|
6771
|
+
return await _uniffi_rust_call_async(
|
|
6772
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_tokenissuer_unfreeze_issuer_token(
|
|
6773
|
+
self._uniffi_clone_pointer(),
|
|
6774
|
+
_UniffiConverterTypeUnfreezeIssuerTokenRequest.lower(request)
|
|
6775
|
+
),
|
|
6776
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
6777
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
6778
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
6779
|
+
# lift function
|
|
6780
|
+
_UniffiConverterTypeUnfreezeIssuerTokenResponse.lift,
|
|
6781
|
+
|
|
6782
|
+
# Error FFI converter
|
|
6783
|
+
_UniffiConverterTypeSdkError,
|
|
6784
|
+
|
|
6785
|
+
)
|
|
6786
|
+
|
|
6787
|
+
|
|
6788
|
+
|
|
6789
|
+
|
|
6790
|
+
|
|
6791
|
+
class _UniffiConverterTypeTokenIssuer:
|
|
6792
|
+
|
|
6793
|
+
@staticmethod
|
|
6794
|
+
def lift(value: int):
|
|
6795
|
+
return TokenIssuer._make_instance_(value)
|
|
6796
|
+
|
|
6797
|
+
@staticmethod
|
|
6798
|
+
def check_lower(value: TokenIssuer):
|
|
6799
|
+
if not isinstance(value, TokenIssuer):
|
|
6800
|
+
raise TypeError("Expected TokenIssuer instance, {} found".format(type(value).__name__))
|
|
6801
|
+
|
|
6802
|
+
@staticmethod
|
|
6803
|
+
def lower(value: TokenIssuerProtocol):
|
|
6804
|
+
if not isinstance(value, TokenIssuer):
|
|
6805
|
+
raise TypeError("Expected TokenIssuer instance, {} found".format(type(value).__name__))
|
|
6806
|
+
return value._uniffi_clone_pointer()
|
|
6807
|
+
|
|
6808
|
+
@classmethod
|
|
6809
|
+
def read(cls, buf: _UniffiRustBuffer):
|
|
6810
|
+
ptr = buf.read_u64()
|
|
6811
|
+
if ptr == 0:
|
|
6812
|
+
raise InternalError("Raw pointer value was null")
|
|
6813
|
+
return cls.lift(ptr)
|
|
6814
|
+
|
|
6815
|
+
@classmethod
|
|
6816
|
+
def write(cls, value: TokenIssuerProtocol, buf: _UniffiRustBuffer):
|
|
6817
|
+
buf.write_u64(cls.lower(value))
|
|
6818
|
+
|
|
6819
|
+
|
|
6820
|
+
class AesSuccessActionData:
|
|
6821
|
+
"""
|
|
6822
|
+
Payload of the AES success action, as received from the LNURL endpoint
|
|
6823
|
+
|
|
6824
|
+
See [`AesSuccessActionDataDecrypted`] for a similar wrapper containing the decrypted payload
|
|
6825
|
+
"""
|
|
6826
|
+
|
|
6827
|
+
description: "str"
|
|
6828
|
+
"""
|
|
6829
|
+
Contents description, up to 144 characters
|
|
6830
|
+
"""
|
|
6831
|
+
|
|
6832
|
+
ciphertext: "str"
|
|
6833
|
+
"""
|
|
6834
|
+
Base64, AES-encrypted data where encryption key is payment preimage, up to 4kb of characters
|
|
6835
|
+
"""
|
|
6836
|
+
|
|
6837
|
+
iv: "str"
|
|
6838
|
+
"""
|
|
6839
|
+
Base64, initialization vector, exactly 24 characters
|
|
6840
|
+
"""
|
|
6841
|
+
|
|
6842
|
+
def __init__(self, *, description: "str", ciphertext: "str", iv: "str"):
|
|
6843
|
+
self.description = description
|
|
6844
|
+
self.ciphertext = ciphertext
|
|
6164
6845
|
self.iv = iv
|
|
6165
6846
|
|
|
6166
6847
|
def __str__(self):
|
|
@@ -6899,6 +7580,35 @@ class _UniffiConverterTypeBolt12OfferDetails(_UniffiConverterRustBuffer):
|
|
|
6899
7580
|
_UniffiConverterOptionalString.write(value.signing_pubkey, buf)
|
|
6900
7581
|
|
|
6901
7582
|
|
|
7583
|
+
class BurnIssuerTokenRequest:
|
|
7584
|
+
amount: "U128"
|
|
7585
|
+
def __init__(self, *, amount: "U128"):
|
|
7586
|
+
self.amount = amount
|
|
7587
|
+
|
|
7588
|
+
def __str__(self):
|
|
7589
|
+
return "BurnIssuerTokenRequest(amount={})".format(self.amount)
|
|
7590
|
+
|
|
7591
|
+
def __eq__(self, other):
|
|
7592
|
+
if self.amount != other.amount:
|
|
7593
|
+
return False
|
|
7594
|
+
return True
|
|
7595
|
+
|
|
7596
|
+
class _UniffiConverterTypeBurnIssuerTokenRequest(_UniffiConverterRustBuffer):
|
|
7597
|
+
@staticmethod
|
|
7598
|
+
def read(buf):
|
|
7599
|
+
return BurnIssuerTokenRequest(
|
|
7600
|
+
amount=_UniffiConverterTypeU128.read(buf),
|
|
7601
|
+
)
|
|
7602
|
+
|
|
7603
|
+
@staticmethod
|
|
7604
|
+
def check_lower(value):
|
|
7605
|
+
_UniffiConverterTypeU128.check_lower(value.amount)
|
|
7606
|
+
|
|
7607
|
+
@staticmethod
|
|
7608
|
+
def write(value, buf):
|
|
7609
|
+
_UniffiConverterTypeU128.write(value.amount, buf)
|
|
7610
|
+
|
|
7611
|
+
|
|
6902
7612
|
class CheckLightningAddressRequest:
|
|
6903
7613
|
username: "str"
|
|
6904
7614
|
def __init__(self, *, username: "str"):
|
|
@@ -7015,8 +7725,8 @@ class _UniffiConverterTypeCheckMessageResponse(_UniffiConverterRustBuffer):
|
|
|
7015
7725
|
class ClaimDepositRequest:
|
|
7016
7726
|
txid: "str"
|
|
7017
7727
|
vout: "int"
|
|
7018
|
-
max_fee: "typing.Optional[
|
|
7019
|
-
def __init__(self, *, txid: "str", vout: "int", max_fee: "typing.Optional[
|
|
7728
|
+
max_fee: "typing.Optional[MaxFee]"
|
|
7729
|
+
def __init__(self, *, txid: "str", vout: "int", max_fee: "typing.Optional[MaxFee]" = _DEFAULT):
|
|
7020
7730
|
self.txid = txid
|
|
7021
7731
|
self.vout = vout
|
|
7022
7732
|
if max_fee is _DEFAULT:
|
|
@@ -7042,20 +7752,20 @@ class _UniffiConverterTypeClaimDepositRequest(_UniffiConverterRustBuffer):
|
|
|
7042
7752
|
return ClaimDepositRequest(
|
|
7043
7753
|
txid=_UniffiConverterString.read(buf),
|
|
7044
7754
|
vout=_UniffiConverterUInt32.read(buf),
|
|
7045
|
-
max_fee=
|
|
7755
|
+
max_fee=_UniffiConverterOptionalTypeMaxFee.read(buf),
|
|
7046
7756
|
)
|
|
7047
7757
|
|
|
7048
7758
|
@staticmethod
|
|
7049
7759
|
def check_lower(value):
|
|
7050
7760
|
_UniffiConverterString.check_lower(value.txid)
|
|
7051
7761
|
_UniffiConverterUInt32.check_lower(value.vout)
|
|
7052
|
-
|
|
7762
|
+
_UniffiConverterOptionalTypeMaxFee.check_lower(value.max_fee)
|
|
7053
7763
|
|
|
7054
7764
|
@staticmethod
|
|
7055
7765
|
def write(value, buf):
|
|
7056
7766
|
_UniffiConverterString.write(value.txid, buf)
|
|
7057
7767
|
_UniffiConverterUInt32.write(value.vout, buf)
|
|
7058
|
-
|
|
7768
|
+
_UniffiConverterOptionalTypeMaxFee.write(value.max_fee, buf)
|
|
7059
7769
|
|
|
7060
7770
|
|
|
7061
7771
|
class ClaimDepositResponse:
|
|
@@ -7087,11 +7797,69 @@ class _UniffiConverterTypeClaimDepositResponse(_UniffiConverterRustBuffer):
|
|
|
7087
7797
|
_UniffiConverterTypePayment.write(value.payment, buf)
|
|
7088
7798
|
|
|
7089
7799
|
|
|
7800
|
+
class ClaimHtlcPaymentRequest:
|
|
7801
|
+
preimage: "str"
|
|
7802
|
+
def __init__(self, *, preimage: "str"):
|
|
7803
|
+
self.preimage = preimage
|
|
7804
|
+
|
|
7805
|
+
def __str__(self):
|
|
7806
|
+
return "ClaimHtlcPaymentRequest(preimage={})".format(self.preimage)
|
|
7807
|
+
|
|
7808
|
+
def __eq__(self, other):
|
|
7809
|
+
if self.preimage != other.preimage:
|
|
7810
|
+
return False
|
|
7811
|
+
return True
|
|
7812
|
+
|
|
7813
|
+
class _UniffiConverterTypeClaimHtlcPaymentRequest(_UniffiConverterRustBuffer):
|
|
7814
|
+
@staticmethod
|
|
7815
|
+
def read(buf):
|
|
7816
|
+
return ClaimHtlcPaymentRequest(
|
|
7817
|
+
preimage=_UniffiConverterString.read(buf),
|
|
7818
|
+
)
|
|
7819
|
+
|
|
7820
|
+
@staticmethod
|
|
7821
|
+
def check_lower(value):
|
|
7822
|
+
_UniffiConverterString.check_lower(value.preimage)
|
|
7823
|
+
|
|
7824
|
+
@staticmethod
|
|
7825
|
+
def write(value, buf):
|
|
7826
|
+
_UniffiConverterString.write(value.preimage, buf)
|
|
7827
|
+
|
|
7828
|
+
|
|
7829
|
+
class ClaimHtlcPaymentResponse:
|
|
7830
|
+
payment: "Payment"
|
|
7831
|
+
def __init__(self, *, payment: "Payment"):
|
|
7832
|
+
self.payment = payment
|
|
7833
|
+
|
|
7834
|
+
def __str__(self):
|
|
7835
|
+
return "ClaimHtlcPaymentResponse(payment={})".format(self.payment)
|
|
7836
|
+
|
|
7837
|
+
def __eq__(self, other):
|
|
7838
|
+
if self.payment != other.payment:
|
|
7839
|
+
return False
|
|
7840
|
+
return True
|
|
7841
|
+
|
|
7842
|
+
class _UniffiConverterTypeClaimHtlcPaymentResponse(_UniffiConverterRustBuffer):
|
|
7843
|
+
@staticmethod
|
|
7844
|
+
def read(buf):
|
|
7845
|
+
return ClaimHtlcPaymentResponse(
|
|
7846
|
+
payment=_UniffiConverterTypePayment.read(buf),
|
|
7847
|
+
)
|
|
7848
|
+
|
|
7849
|
+
@staticmethod
|
|
7850
|
+
def check_lower(value):
|
|
7851
|
+
_UniffiConverterTypePayment.check_lower(value.payment)
|
|
7852
|
+
|
|
7853
|
+
@staticmethod
|
|
7854
|
+
def write(value, buf):
|
|
7855
|
+
_UniffiConverterTypePayment.write(value.payment, buf)
|
|
7856
|
+
|
|
7857
|
+
|
|
7090
7858
|
class Config:
|
|
7091
7859
|
api_key: "typing.Optional[str]"
|
|
7092
7860
|
network: "Network"
|
|
7093
7861
|
sync_interval_secs: "int"
|
|
7094
|
-
max_deposit_claim_fee: "typing.Optional[
|
|
7862
|
+
max_deposit_claim_fee: "typing.Optional[MaxFee]"
|
|
7095
7863
|
lnurl_domain: "typing.Optional[str]"
|
|
7096
7864
|
"""
|
|
7097
7865
|
The domain used for receiving through lnurl-pay and lightning address.
|
|
@@ -7131,7 +7899,7 @@ class Config:
|
|
|
7131
7899
|
If set to false, no changes will be made to the Spark private mode.
|
|
7132
7900
|
"""
|
|
7133
7901
|
|
|
7134
|
-
def __init__(self, *, api_key: "typing.Optional[str]", network: "Network", sync_interval_secs: "int", max_deposit_claim_fee: "typing.Optional[
|
|
7902
|
+
def __init__(self, *, api_key: "typing.Optional[str]", network: "Network", sync_interval_secs: "int", max_deposit_claim_fee: "typing.Optional[MaxFee]", lnurl_domain: "typing.Optional[str]", prefer_spark_over_lightning: "bool", external_input_parsers: "typing.Optional[typing.List[ExternalInputParser]]", use_default_external_input_parsers: "bool", real_time_sync_server_url: "typing.Optional[str]", private_enabled_default: "bool"):
|
|
7135
7903
|
self.api_key = api_key
|
|
7136
7904
|
self.network = network
|
|
7137
7905
|
self.sync_interval_secs = sync_interval_secs
|
|
@@ -7176,7 +7944,7 @@ class _UniffiConverterTypeConfig(_UniffiConverterRustBuffer):
|
|
|
7176
7944
|
api_key=_UniffiConverterOptionalString.read(buf),
|
|
7177
7945
|
network=_UniffiConverterTypeNetwork.read(buf),
|
|
7178
7946
|
sync_interval_secs=_UniffiConverterUInt32.read(buf),
|
|
7179
|
-
max_deposit_claim_fee=
|
|
7947
|
+
max_deposit_claim_fee=_UniffiConverterOptionalTypeMaxFee.read(buf),
|
|
7180
7948
|
lnurl_domain=_UniffiConverterOptionalString.read(buf),
|
|
7181
7949
|
prefer_spark_over_lightning=_UniffiConverterBool.read(buf),
|
|
7182
7950
|
external_input_parsers=_UniffiConverterOptionalSequenceTypeExternalInputParser.read(buf),
|
|
@@ -7190,7 +7958,7 @@ class _UniffiConverterTypeConfig(_UniffiConverterRustBuffer):
|
|
|
7190
7958
|
_UniffiConverterOptionalString.check_lower(value.api_key)
|
|
7191
7959
|
_UniffiConverterTypeNetwork.check_lower(value.network)
|
|
7192
7960
|
_UniffiConverterUInt32.check_lower(value.sync_interval_secs)
|
|
7193
|
-
|
|
7961
|
+
_UniffiConverterOptionalTypeMaxFee.check_lower(value.max_deposit_claim_fee)
|
|
7194
7962
|
_UniffiConverterOptionalString.check_lower(value.lnurl_domain)
|
|
7195
7963
|
_UniffiConverterBool.check_lower(value.prefer_spark_over_lightning)
|
|
7196
7964
|
_UniffiConverterOptionalSequenceTypeExternalInputParser.check_lower(value.external_input_parsers)
|
|
@@ -7203,7 +7971,7 @@ class _UniffiConverterTypeConfig(_UniffiConverterRustBuffer):
|
|
|
7203
7971
|
_UniffiConverterOptionalString.write(value.api_key, buf)
|
|
7204
7972
|
_UniffiConverterTypeNetwork.write(value.network, buf)
|
|
7205
7973
|
_UniffiConverterUInt32.write(value.sync_interval_secs, buf)
|
|
7206
|
-
|
|
7974
|
+
_UniffiConverterOptionalTypeMaxFee.write(value.max_deposit_claim_fee, buf)
|
|
7207
7975
|
_UniffiConverterOptionalString.write(value.lnurl_domain, buf)
|
|
7208
7976
|
_UniffiConverterBool.write(value.prefer_spark_over_lightning, buf)
|
|
7209
7977
|
_UniffiConverterOptionalSequenceTypeExternalInputParser.write(value.external_input_parsers, buf)
|
|
@@ -7255,6 +8023,63 @@ class _UniffiConverterTypeConnectRequest(_UniffiConverterRustBuffer):
|
|
|
7255
8023
|
_UniffiConverterString.write(value.storage_dir, buf)
|
|
7256
8024
|
|
|
7257
8025
|
|
|
8026
|
+
class CreateIssuerTokenRequest:
|
|
8027
|
+
name: "str"
|
|
8028
|
+
ticker: "str"
|
|
8029
|
+
decimals: "int"
|
|
8030
|
+
is_freezable: "bool"
|
|
8031
|
+
max_supply: "U128"
|
|
8032
|
+
def __init__(self, *, name: "str", ticker: "str", decimals: "int", is_freezable: "bool", max_supply: "U128"):
|
|
8033
|
+
self.name = name
|
|
8034
|
+
self.ticker = ticker
|
|
8035
|
+
self.decimals = decimals
|
|
8036
|
+
self.is_freezable = is_freezable
|
|
8037
|
+
self.max_supply = max_supply
|
|
8038
|
+
|
|
8039
|
+
def __str__(self):
|
|
8040
|
+
return "CreateIssuerTokenRequest(name={}, ticker={}, decimals={}, is_freezable={}, max_supply={})".format(self.name, self.ticker, self.decimals, self.is_freezable, self.max_supply)
|
|
8041
|
+
|
|
8042
|
+
def __eq__(self, other):
|
|
8043
|
+
if self.name != other.name:
|
|
8044
|
+
return False
|
|
8045
|
+
if self.ticker != other.ticker:
|
|
8046
|
+
return False
|
|
8047
|
+
if self.decimals != other.decimals:
|
|
8048
|
+
return False
|
|
8049
|
+
if self.is_freezable != other.is_freezable:
|
|
8050
|
+
return False
|
|
8051
|
+
if self.max_supply != other.max_supply:
|
|
8052
|
+
return False
|
|
8053
|
+
return True
|
|
8054
|
+
|
|
8055
|
+
class _UniffiConverterTypeCreateIssuerTokenRequest(_UniffiConverterRustBuffer):
|
|
8056
|
+
@staticmethod
|
|
8057
|
+
def read(buf):
|
|
8058
|
+
return CreateIssuerTokenRequest(
|
|
8059
|
+
name=_UniffiConverterString.read(buf),
|
|
8060
|
+
ticker=_UniffiConverterString.read(buf),
|
|
8061
|
+
decimals=_UniffiConverterUInt32.read(buf),
|
|
8062
|
+
is_freezable=_UniffiConverterBool.read(buf),
|
|
8063
|
+
max_supply=_UniffiConverterTypeU128.read(buf),
|
|
8064
|
+
)
|
|
8065
|
+
|
|
8066
|
+
@staticmethod
|
|
8067
|
+
def check_lower(value):
|
|
8068
|
+
_UniffiConverterString.check_lower(value.name)
|
|
8069
|
+
_UniffiConverterString.check_lower(value.ticker)
|
|
8070
|
+
_UniffiConverterUInt32.check_lower(value.decimals)
|
|
8071
|
+
_UniffiConverterBool.check_lower(value.is_freezable)
|
|
8072
|
+
_UniffiConverterTypeU128.check_lower(value.max_supply)
|
|
8073
|
+
|
|
8074
|
+
@staticmethod
|
|
8075
|
+
def write(value, buf):
|
|
8076
|
+
_UniffiConverterString.write(value.name, buf)
|
|
8077
|
+
_UniffiConverterString.write(value.ticker, buf)
|
|
8078
|
+
_UniffiConverterUInt32.write(value.decimals, buf)
|
|
8079
|
+
_UniffiConverterBool.write(value.is_freezable, buf)
|
|
8080
|
+
_UniffiConverterTypeU128.write(value.max_supply, buf)
|
|
8081
|
+
|
|
8082
|
+
|
|
7258
8083
|
class Credentials:
|
|
7259
8084
|
username: "str"
|
|
7260
8085
|
password: "str"
|
|
@@ -7530,6 +8355,71 @@ class _UniffiConverterTypeFiatCurrency(_UniffiConverterRustBuffer):
|
|
|
7530
8355
|
_UniffiConverterTypeCurrencyInfo.write(value.info, buf)
|
|
7531
8356
|
|
|
7532
8357
|
|
|
8358
|
+
class FreezeIssuerTokenRequest:
|
|
8359
|
+
address: "str"
|
|
8360
|
+
def __init__(self, *, address: "str"):
|
|
8361
|
+
self.address = address
|
|
8362
|
+
|
|
8363
|
+
def __str__(self):
|
|
8364
|
+
return "FreezeIssuerTokenRequest(address={})".format(self.address)
|
|
8365
|
+
|
|
8366
|
+
def __eq__(self, other):
|
|
8367
|
+
if self.address != other.address:
|
|
8368
|
+
return False
|
|
8369
|
+
return True
|
|
8370
|
+
|
|
8371
|
+
class _UniffiConverterTypeFreezeIssuerTokenRequest(_UniffiConverterRustBuffer):
|
|
8372
|
+
@staticmethod
|
|
8373
|
+
def read(buf):
|
|
8374
|
+
return FreezeIssuerTokenRequest(
|
|
8375
|
+
address=_UniffiConverterString.read(buf),
|
|
8376
|
+
)
|
|
8377
|
+
|
|
8378
|
+
@staticmethod
|
|
8379
|
+
def check_lower(value):
|
|
8380
|
+
_UniffiConverterString.check_lower(value.address)
|
|
8381
|
+
|
|
8382
|
+
@staticmethod
|
|
8383
|
+
def write(value, buf):
|
|
8384
|
+
_UniffiConverterString.write(value.address, buf)
|
|
8385
|
+
|
|
8386
|
+
|
|
8387
|
+
class FreezeIssuerTokenResponse:
|
|
8388
|
+
impacted_output_ids: "typing.List[str]"
|
|
8389
|
+
impacted_token_amount: "U128"
|
|
8390
|
+
def __init__(self, *, impacted_output_ids: "typing.List[str]", impacted_token_amount: "U128"):
|
|
8391
|
+
self.impacted_output_ids = impacted_output_ids
|
|
8392
|
+
self.impacted_token_amount = impacted_token_amount
|
|
8393
|
+
|
|
8394
|
+
def __str__(self):
|
|
8395
|
+
return "FreezeIssuerTokenResponse(impacted_output_ids={}, impacted_token_amount={})".format(self.impacted_output_ids, self.impacted_token_amount)
|
|
8396
|
+
|
|
8397
|
+
def __eq__(self, other):
|
|
8398
|
+
if self.impacted_output_ids != other.impacted_output_ids:
|
|
8399
|
+
return False
|
|
8400
|
+
if self.impacted_token_amount != other.impacted_token_amount:
|
|
8401
|
+
return False
|
|
8402
|
+
return True
|
|
8403
|
+
|
|
8404
|
+
class _UniffiConverterTypeFreezeIssuerTokenResponse(_UniffiConverterRustBuffer):
|
|
8405
|
+
@staticmethod
|
|
8406
|
+
def read(buf):
|
|
8407
|
+
return FreezeIssuerTokenResponse(
|
|
8408
|
+
impacted_output_ids=_UniffiConverterSequenceString.read(buf),
|
|
8409
|
+
impacted_token_amount=_UniffiConverterTypeU128.read(buf),
|
|
8410
|
+
)
|
|
8411
|
+
|
|
8412
|
+
@staticmethod
|
|
8413
|
+
def check_lower(value):
|
|
8414
|
+
_UniffiConverterSequenceString.check_lower(value.impacted_output_ids)
|
|
8415
|
+
_UniffiConverterTypeU128.check_lower(value.impacted_token_amount)
|
|
8416
|
+
|
|
8417
|
+
@staticmethod
|
|
8418
|
+
def write(value, buf):
|
|
8419
|
+
_UniffiConverterSequenceString.write(value.impacted_output_ids, buf)
|
|
8420
|
+
_UniffiConverterTypeU128.write(value.impacted_token_amount, buf)
|
|
8421
|
+
|
|
8422
|
+
|
|
7533
8423
|
class GetInfoRequest:
|
|
7534
8424
|
"""
|
|
7535
8425
|
Request to get the balance of the wallet
|
|
@@ -7931,6 +8821,11 @@ class ListPaymentsRequest:
|
|
|
7931
8821
|
type_filter: "typing.Optional[typing.List[PaymentType]]"
|
|
7932
8822
|
status_filter: "typing.Optional[typing.List[PaymentStatus]]"
|
|
7933
8823
|
asset_filter: "typing.Optional[AssetFilter]"
|
|
8824
|
+
spark_htlc_status_filter: "typing.Optional[typing.List[SparkHtlcStatus]]"
|
|
8825
|
+
"""
|
|
8826
|
+
Only include payments with specific Spark HTLC statuses
|
|
8827
|
+
"""
|
|
8828
|
+
|
|
7934
8829
|
from_timestamp: "typing.Optional[int]"
|
|
7935
8830
|
"""
|
|
7936
8831
|
Only include payments created after this timestamp (inclusive)
|
|
@@ -7952,7 +8847,7 @@ class ListPaymentsRequest:
|
|
|
7952
8847
|
"""
|
|
7953
8848
|
|
|
7954
8849
|
sort_ascending: "typing.Optional[bool]"
|
|
7955
|
-
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):
|
|
8850
|
+
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, spark_htlc_status_filter: "typing.Optional[typing.List[SparkHtlcStatus]]" = _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):
|
|
7956
8851
|
if type_filter is _DEFAULT:
|
|
7957
8852
|
self.type_filter = None
|
|
7958
8853
|
else:
|
|
@@ -7965,6 +8860,10 @@ class ListPaymentsRequest:
|
|
|
7965
8860
|
self.asset_filter = None
|
|
7966
8861
|
else:
|
|
7967
8862
|
self.asset_filter = asset_filter
|
|
8863
|
+
if spark_htlc_status_filter is _DEFAULT:
|
|
8864
|
+
self.spark_htlc_status_filter = None
|
|
8865
|
+
else:
|
|
8866
|
+
self.spark_htlc_status_filter = spark_htlc_status_filter
|
|
7968
8867
|
if from_timestamp is _DEFAULT:
|
|
7969
8868
|
self.from_timestamp = None
|
|
7970
8869
|
else:
|
|
@@ -7987,7 +8886,7 @@ class ListPaymentsRequest:
|
|
|
7987
8886
|
self.sort_ascending = sort_ascending
|
|
7988
8887
|
|
|
7989
8888
|
def __str__(self):
|
|
7990
|
-
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)
|
|
8889
|
+
return "ListPaymentsRequest(type_filter={}, status_filter={}, asset_filter={}, spark_htlc_status_filter={}, from_timestamp={}, to_timestamp={}, offset={}, limit={}, sort_ascending={})".format(self.type_filter, self.status_filter, self.asset_filter, self.spark_htlc_status_filter, self.from_timestamp, self.to_timestamp, self.offset, self.limit, self.sort_ascending)
|
|
7991
8890
|
|
|
7992
8891
|
def __eq__(self, other):
|
|
7993
8892
|
if self.type_filter != other.type_filter:
|
|
@@ -7996,6 +8895,8 @@ class ListPaymentsRequest:
|
|
|
7996
8895
|
return False
|
|
7997
8896
|
if self.asset_filter != other.asset_filter:
|
|
7998
8897
|
return False
|
|
8898
|
+
if self.spark_htlc_status_filter != other.spark_htlc_status_filter:
|
|
8899
|
+
return False
|
|
7999
8900
|
if self.from_timestamp != other.from_timestamp:
|
|
8000
8901
|
return False
|
|
8001
8902
|
if self.to_timestamp != other.to_timestamp:
|
|
@@ -8015,6 +8916,7 @@ class _UniffiConverterTypeListPaymentsRequest(_UniffiConverterRustBuffer):
|
|
|
8015
8916
|
type_filter=_UniffiConverterOptionalSequenceTypePaymentType.read(buf),
|
|
8016
8917
|
status_filter=_UniffiConverterOptionalSequenceTypePaymentStatus.read(buf),
|
|
8017
8918
|
asset_filter=_UniffiConverterOptionalTypeAssetFilter.read(buf),
|
|
8919
|
+
spark_htlc_status_filter=_UniffiConverterOptionalSequenceTypeSparkHtlcStatus.read(buf),
|
|
8018
8920
|
from_timestamp=_UniffiConverterOptionalUInt64.read(buf),
|
|
8019
8921
|
to_timestamp=_UniffiConverterOptionalUInt64.read(buf),
|
|
8020
8922
|
offset=_UniffiConverterOptionalUInt32.read(buf),
|
|
@@ -8027,6 +8929,7 @@ class _UniffiConverterTypeListPaymentsRequest(_UniffiConverterRustBuffer):
|
|
|
8027
8929
|
_UniffiConverterOptionalSequenceTypePaymentType.check_lower(value.type_filter)
|
|
8028
8930
|
_UniffiConverterOptionalSequenceTypePaymentStatus.check_lower(value.status_filter)
|
|
8029
8931
|
_UniffiConverterOptionalTypeAssetFilter.check_lower(value.asset_filter)
|
|
8932
|
+
_UniffiConverterOptionalSequenceTypeSparkHtlcStatus.check_lower(value.spark_htlc_status_filter)
|
|
8030
8933
|
_UniffiConverterOptionalUInt64.check_lower(value.from_timestamp)
|
|
8031
8934
|
_UniffiConverterOptionalUInt64.check_lower(value.to_timestamp)
|
|
8032
8935
|
_UniffiConverterOptionalUInt32.check_lower(value.offset)
|
|
@@ -8038,6 +8941,7 @@ class _UniffiConverterTypeListPaymentsRequest(_UniffiConverterRustBuffer):
|
|
|
8038
8941
|
_UniffiConverterOptionalSequenceTypePaymentType.write(value.type_filter, buf)
|
|
8039
8942
|
_UniffiConverterOptionalSequenceTypePaymentStatus.write(value.status_filter, buf)
|
|
8040
8943
|
_UniffiConverterOptionalTypeAssetFilter.write(value.asset_filter, buf)
|
|
8944
|
+
_UniffiConverterOptionalSequenceTypeSparkHtlcStatus.write(value.spark_htlc_status_filter, buf)
|
|
8041
8945
|
_UniffiConverterOptionalUInt64.write(value.from_timestamp, buf)
|
|
8042
8946
|
_UniffiConverterOptionalUInt64.write(value.to_timestamp, buf)
|
|
8043
8947
|
_UniffiConverterOptionalUInt32.write(value.offset, buf)
|
|
@@ -8136,7 +9040,7 @@ class _UniffiConverterTypeListUnclaimedDepositsResponse(_UniffiConverterRustBuff
|
|
|
8136
9040
|
|
|
8137
9041
|
class LnurlAuthRequestDetails:
|
|
8138
9042
|
"""
|
|
8139
|
-
Wrapped in a [`LnurlAuth`], this is the result of [`parse`] when given a LNURL-auth endpoint.
|
|
9043
|
+
Wrapped in a [`InputType::LnurlAuth`], this is the result of [`parse`](breez_sdk_common::input::parse) when given a LNURL-auth endpoint.
|
|
8140
9044
|
|
|
8141
9045
|
It represents the endpoint's parameters for the LNURL workflow.
|
|
8142
9046
|
|
|
@@ -8280,15 +9184,28 @@ class _UniffiConverterTypeLnurlPayInfo(_UniffiConverterRustBuffer):
|
|
|
8280
9184
|
|
|
8281
9185
|
class LnurlPayRequest:
|
|
8282
9186
|
prepare_response: "PrepareLnurlPayResponse"
|
|
8283
|
-
|
|
9187
|
+
idempotency_key: "typing.Optional[str]"
|
|
9188
|
+
"""
|
|
9189
|
+
If set, providing the same idempotency key for multiple requests will ensure that only one
|
|
9190
|
+
payment is made. If an idempotency key is re-used, the same payment will be returned.
|
|
9191
|
+
The idempotency key must be a valid UUID.
|
|
9192
|
+
"""
|
|
9193
|
+
|
|
9194
|
+
def __init__(self, *, prepare_response: "PrepareLnurlPayResponse", idempotency_key: "typing.Optional[str]" = _DEFAULT):
|
|
8284
9195
|
self.prepare_response = prepare_response
|
|
9196
|
+
if idempotency_key is _DEFAULT:
|
|
9197
|
+
self.idempotency_key = None
|
|
9198
|
+
else:
|
|
9199
|
+
self.idempotency_key = idempotency_key
|
|
8285
9200
|
|
|
8286
9201
|
def __str__(self):
|
|
8287
|
-
return "LnurlPayRequest(prepare_response={})".format(self.prepare_response)
|
|
9202
|
+
return "LnurlPayRequest(prepare_response={}, idempotency_key={})".format(self.prepare_response, self.idempotency_key)
|
|
8288
9203
|
|
|
8289
9204
|
def __eq__(self, other):
|
|
8290
9205
|
if self.prepare_response != other.prepare_response:
|
|
8291
9206
|
return False
|
|
9207
|
+
if self.idempotency_key != other.idempotency_key:
|
|
9208
|
+
return False
|
|
8292
9209
|
return True
|
|
8293
9210
|
|
|
8294
9211
|
class _UniffiConverterTypeLnurlPayRequest(_UniffiConverterRustBuffer):
|
|
@@ -8296,15 +9213,18 @@ class _UniffiConverterTypeLnurlPayRequest(_UniffiConverterRustBuffer):
|
|
|
8296
9213
|
def read(buf):
|
|
8297
9214
|
return LnurlPayRequest(
|
|
8298
9215
|
prepare_response=_UniffiConverterTypePrepareLnurlPayResponse.read(buf),
|
|
9216
|
+
idempotency_key=_UniffiConverterOptionalString.read(buf),
|
|
8299
9217
|
)
|
|
8300
9218
|
|
|
8301
9219
|
@staticmethod
|
|
8302
9220
|
def check_lower(value):
|
|
8303
9221
|
_UniffiConverterTypePrepareLnurlPayResponse.check_lower(value.prepare_response)
|
|
9222
|
+
_UniffiConverterOptionalString.check_lower(value.idempotency_key)
|
|
8304
9223
|
|
|
8305
9224
|
@staticmethod
|
|
8306
9225
|
def write(value, buf):
|
|
8307
9226
|
_UniffiConverterTypePrepareLnurlPayResponse.write(value.prepare_response, buf)
|
|
9227
|
+
_UniffiConverterOptionalString.write(value.idempotency_key, buf)
|
|
8308
9228
|
|
|
8309
9229
|
|
|
8310
9230
|
class LnurlPayRequestDetails:
|
|
@@ -8479,6 +9399,49 @@ class _UniffiConverterTypeLnurlPayResponse(_UniffiConverterRustBuffer):
|
|
|
8479
9399
|
_UniffiConverterOptionalTypeSuccessActionProcessed.write(value.success_action, buf)
|
|
8480
9400
|
|
|
8481
9401
|
|
|
9402
|
+
class LnurlReceiveMetadata:
|
|
9403
|
+
nostr_zap_request: "typing.Optional[str]"
|
|
9404
|
+
nostr_zap_receipt: "typing.Optional[str]"
|
|
9405
|
+
sender_comment: "typing.Optional[str]"
|
|
9406
|
+
def __init__(self, *, nostr_zap_request: "typing.Optional[str]", nostr_zap_receipt: "typing.Optional[str]", sender_comment: "typing.Optional[str]"):
|
|
9407
|
+
self.nostr_zap_request = nostr_zap_request
|
|
9408
|
+
self.nostr_zap_receipt = nostr_zap_receipt
|
|
9409
|
+
self.sender_comment = sender_comment
|
|
9410
|
+
|
|
9411
|
+
def __str__(self):
|
|
9412
|
+
return "LnurlReceiveMetadata(nostr_zap_request={}, nostr_zap_receipt={}, sender_comment={})".format(self.nostr_zap_request, self.nostr_zap_receipt, self.sender_comment)
|
|
9413
|
+
|
|
9414
|
+
def __eq__(self, other):
|
|
9415
|
+
if self.nostr_zap_request != other.nostr_zap_request:
|
|
9416
|
+
return False
|
|
9417
|
+
if self.nostr_zap_receipt != other.nostr_zap_receipt:
|
|
9418
|
+
return False
|
|
9419
|
+
if self.sender_comment != other.sender_comment:
|
|
9420
|
+
return False
|
|
9421
|
+
return True
|
|
9422
|
+
|
|
9423
|
+
class _UniffiConverterTypeLnurlReceiveMetadata(_UniffiConverterRustBuffer):
|
|
9424
|
+
@staticmethod
|
|
9425
|
+
def read(buf):
|
|
9426
|
+
return LnurlReceiveMetadata(
|
|
9427
|
+
nostr_zap_request=_UniffiConverterOptionalString.read(buf),
|
|
9428
|
+
nostr_zap_receipt=_UniffiConverterOptionalString.read(buf),
|
|
9429
|
+
sender_comment=_UniffiConverterOptionalString.read(buf),
|
|
9430
|
+
)
|
|
9431
|
+
|
|
9432
|
+
@staticmethod
|
|
9433
|
+
def check_lower(value):
|
|
9434
|
+
_UniffiConverterOptionalString.check_lower(value.nostr_zap_request)
|
|
9435
|
+
_UniffiConverterOptionalString.check_lower(value.nostr_zap_receipt)
|
|
9436
|
+
_UniffiConverterOptionalString.check_lower(value.sender_comment)
|
|
9437
|
+
|
|
9438
|
+
@staticmethod
|
|
9439
|
+
def write(value, buf):
|
|
9440
|
+
_UniffiConverterOptionalString.write(value.nostr_zap_request, buf)
|
|
9441
|
+
_UniffiConverterOptionalString.write(value.nostr_zap_receipt, buf)
|
|
9442
|
+
_UniffiConverterOptionalString.write(value.sender_comment, buf)
|
|
9443
|
+
|
|
9444
|
+
|
|
8482
9445
|
class LnurlWithdrawInfo:
|
|
8483
9446
|
"""
|
|
8484
9447
|
Represents the withdraw LNURL info
|
|
@@ -8803,27 +9766,56 @@ class MessageSuccessActionData:
|
|
|
8803
9766
|
self.message = message
|
|
8804
9767
|
|
|
8805
9768
|
def __str__(self):
|
|
8806
|
-
return "MessageSuccessActionData(message={})".format(self.message)
|
|
9769
|
+
return "MessageSuccessActionData(message={})".format(self.message)
|
|
9770
|
+
|
|
9771
|
+
def __eq__(self, other):
|
|
9772
|
+
if self.message != other.message:
|
|
9773
|
+
return False
|
|
9774
|
+
return True
|
|
9775
|
+
|
|
9776
|
+
class _UniffiConverterTypeMessageSuccessActionData(_UniffiConverterRustBuffer):
|
|
9777
|
+
@staticmethod
|
|
9778
|
+
def read(buf):
|
|
9779
|
+
return MessageSuccessActionData(
|
|
9780
|
+
message=_UniffiConverterString.read(buf),
|
|
9781
|
+
)
|
|
9782
|
+
|
|
9783
|
+
@staticmethod
|
|
9784
|
+
def check_lower(value):
|
|
9785
|
+
_UniffiConverterString.check_lower(value.message)
|
|
9786
|
+
|
|
9787
|
+
@staticmethod
|
|
9788
|
+
def write(value, buf):
|
|
9789
|
+
_UniffiConverterString.write(value.message, buf)
|
|
9790
|
+
|
|
9791
|
+
|
|
9792
|
+
class MintIssuerTokenRequest:
|
|
9793
|
+
amount: "U128"
|
|
9794
|
+
def __init__(self, *, amount: "U128"):
|
|
9795
|
+
self.amount = amount
|
|
9796
|
+
|
|
9797
|
+
def __str__(self):
|
|
9798
|
+
return "MintIssuerTokenRequest(amount={})".format(self.amount)
|
|
8807
9799
|
|
|
8808
9800
|
def __eq__(self, other):
|
|
8809
|
-
if self.
|
|
9801
|
+
if self.amount != other.amount:
|
|
8810
9802
|
return False
|
|
8811
9803
|
return True
|
|
8812
9804
|
|
|
8813
|
-
class
|
|
9805
|
+
class _UniffiConverterTypeMintIssuerTokenRequest(_UniffiConverterRustBuffer):
|
|
8814
9806
|
@staticmethod
|
|
8815
9807
|
def read(buf):
|
|
8816
|
-
return
|
|
8817
|
-
|
|
9808
|
+
return MintIssuerTokenRequest(
|
|
9809
|
+
amount=_UniffiConverterTypeU128.read(buf),
|
|
8818
9810
|
)
|
|
8819
9811
|
|
|
8820
9812
|
@staticmethod
|
|
8821
9813
|
def check_lower(value):
|
|
8822
|
-
|
|
9814
|
+
_UniffiConverterTypeU128.check_lower(value.amount)
|
|
8823
9815
|
|
|
8824
9816
|
@staticmethod
|
|
8825
9817
|
def write(value, buf):
|
|
8826
|
-
|
|
9818
|
+
_UniffiConverterTypeU128.write(value.amount, buf)
|
|
8827
9819
|
|
|
8828
9820
|
|
|
8829
9821
|
class OutgoingChange:
|
|
@@ -9457,6 +10449,63 @@ class _UniffiConverterTypeReceivePaymentResponse(_UniffiConverterRustBuffer):
|
|
|
9457
10449
|
_UniffiConverterTypeU128.write(value.fee, buf)
|
|
9458
10450
|
|
|
9459
10451
|
|
|
10452
|
+
class RecommendedFees:
|
|
10453
|
+
fastest_fee: "int"
|
|
10454
|
+
half_hour_fee: "int"
|
|
10455
|
+
hour_fee: "int"
|
|
10456
|
+
economy_fee: "int"
|
|
10457
|
+
minimum_fee: "int"
|
|
10458
|
+
def __init__(self, *, fastest_fee: "int", half_hour_fee: "int", hour_fee: "int", economy_fee: "int", minimum_fee: "int"):
|
|
10459
|
+
self.fastest_fee = fastest_fee
|
|
10460
|
+
self.half_hour_fee = half_hour_fee
|
|
10461
|
+
self.hour_fee = hour_fee
|
|
10462
|
+
self.economy_fee = economy_fee
|
|
10463
|
+
self.minimum_fee = minimum_fee
|
|
10464
|
+
|
|
10465
|
+
def __str__(self):
|
|
10466
|
+
return "RecommendedFees(fastest_fee={}, half_hour_fee={}, hour_fee={}, economy_fee={}, minimum_fee={})".format(self.fastest_fee, self.half_hour_fee, self.hour_fee, self.economy_fee, self.minimum_fee)
|
|
10467
|
+
|
|
10468
|
+
def __eq__(self, other):
|
|
10469
|
+
if self.fastest_fee != other.fastest_fee:
|
|
10470
|
+
return False
|
|
10471
|
+
if self.half_hour_fee != other.half_hour_fee:
|
|
10472
|
+
return False
|
|
10473
|
+
if self.hour_fee != other.hour_fee:
|
|
10474
|
+
return False
|
|
10475
|
+
if self.economy_fee != other.economy_fee:
|
|
10476
|
+
return False
|
|
10477
|
+
if self.minimum_fee != other.minimum_fee:
|
|
10478
|
+
return False
|
|
10479
|
+
return True
|
|
10480
|
+
|
|
10481
|
+
class _UniffiConverterTypeRecommendedFees(_UniffiConverterRustBuffer):
|
|
10482
|
+
@staticmethod
|
|
10483
|
+
def read(buf):
|
|
10484
|
+
return RecommendedFees(
|
|
10485
|
+
fastest_fee=_UniffiConverterUInt64.read(buf),
|
|
10486
|
+
half_hour_fee=_UniffiConverterUInt64.read(buf),
|
|
10487
|
+
hour_fee=_UniffiConverterUInt64.read(buf),
|
|
10488
|
+
economy_fee=_UniffiConverterUInt64.read(buf),
|
|
10489
|
+
minimum_fee=_UniffiConverterUInt64.read(buf),
|
|
10490
|
+
)
|
|
10491
|
+
|
|
10492
|
+
@staticmethod
|
|
10493
|
+
def check_lower(value):
|
|
10494
|
+
_UniffiConverterUInt64.check_lower(value.fastest_fee)
|
|
10495
|
+
_UniffiConverterUInt64.check_lower(value.half_hour_fee)
|
|
10496
|
+
_UniffiConverterUInt64.check_lower(value.hour_fee)
|
|
10497
|
+
_UniffiConverterUInt64.check_lower(value.economy_fee)
|
|
10498
|
+
_UniffiConverterUInt64.check_lower(value.minimum_fee)
|
|
10499
|
+
|
|
10500
|
+
@staticmethod
|
|
10501
|
+
def write(value, buf):
|
|
10502
|
+
_UniffiConverterUInt64.write(value.fastest_fee, buf)
|
|
10503
|
+
_UniffiConverterUInt64.write(value.half_hour_fee, buf)
|
|
10504
|
+
_UniffiConverterUInt64.write(value.hour_fee, buf)
|
|
10505
|
+
_UniffiConverterUInt64.write(value.economy_fee, buf)
|
|
10506
|
+
_UniffiConverterUInt64.write(value.minimum_fee, buf)
|
|
10507
|
+
|
|
10508
|
+
|
|
9460
10509
|
class Record:
|
|
9461
10510
|
id: "RecordId"
|
|
9462
10511
|
revision: "int"
|
|
@@ -9850,21 +10899,35 @@ class _UniffiConverterTypeSendOnchainSpeedFeeQuote(_UniffiConverterRustBuffer):
|
|
|
9850
10899
|
class SendPaymentRequest:
|
|
9851
10900
|
prepare_response: "PrepareSendPaymentResponse"
|
|
9852
10901
|
options: "typing.Optional[SendPaymentOptions]"
|
|
9853
|
-
|
|
10902
|
+
idempotency_key: "typing.Optional[str]"
|
|
10903
|
+
"""
|
|
10904
|
+
The optional idempotency key for all Spark based transfers (excludes token payments).
|
|
10905
|
+
If set, providing the same idempotency key for multiple requests will ensure that only one
|
|
10906
|
+
payment is made. If an idempotency key is re-used, the same payment will be returned.
|
|
10907
|
+
The idempotency key must be a valid UUID.
|
|
10908
|
+
"""
|
|
10909
|
+
|
|
10910
|
+
def __init__(self, *, prepare_response: "PrepareSendPaymentResponse", options: "typing.Optional[SendPaymentOptions]" = _DEFAULT, idempotency_key: "typing.Optional[str]" = _DEFAULT):
|
|
9854
10911
|
self.prepare_response = prepare_response
|
|
9855
10912
|
if options is _DEFAULT:
|
|
9856
10913
|
self.options = None
|
|
9857
10914
|
else:
|
|
9858
10915
|
self.options = options
|
|
10916
|
+
if idempotency_key is _DEFAULT:
|
|
10917
|
+
self.idempotency_key = None
|
|
10918
|
+
else:
|
|
10919
|
+
self.idempotency_key = idempotency_key
|
|
9859
10920
|
|
|
9860
10921
|
def __str__(self):
|
|
9861
|
-
return "SendPaymentRequest(prepare_response={}, options={})".format(self.prepare_response, self.options)
|
|
10922
|
+
return "SendPaymentRequest(prepare_response={}, options={}, idempotency_key={})".format(self.prepare_response, self.options, self.idempotency_key)
|
|
9862
10923
|
|
|
9863
10924
|
def __eq__(self, other):
|
|
9864
10925
|
if self.prepare_response != other.prepare_response:
|
|
9865
10926
|
return False
|
|
9866
10927
|
if self.options != other.options:
|
|
9867
10928
|
return False
|
|
10929
|
+
if self.idempotency_key != other.idempotency_key:
|
|
10930
|
+
return False
|
|
9868
10931
|
return True
|
|
9869
10932
|
|
|
9870
10933
|
class _UniffiConverterTypeSendPaymentRequest(_UniffiConverterRustBuffer):
|
|
@@ -9873,17 +10936,20 @@ class _UniffiConverterTypeSendPaymentRequest(_UniffiConverterRustBuffer):
|
|
|
9873
10936
|
return SendPaymentRequest(
|
|
9874
10937
|
prepare_response=_UniffiConverterTypePrepareSendPaymentResponse.read(buf),
|
|
9875
10938
|
options=_UniffiConverterOptionalTypeSendPaymentOptions.read(buf),
|
|
10939
|
+
idempotency_key=_UniffiConverterOptionalString.read(buf),
|
|
9876
10940
|
)
|
|
9877
10941
|
|
|
9878
10942
|
@staticmethod
|
|
9879
10943
|
def check_lower(value):
|
|
9880
10944
|
_UniffiConverterTypePrepareSendPaymentResponse.check_lower(value.prepare_response)
|
|
9881
10945
|
_UniffiConverterOptionalTypeSendPaymentOptions.check_lower(value.options)
|
|
10946
|
+
_UniffiConverterOptionalString.check_lower(value.idempotency_key)
|
|
9882
10947
|
|
|
9883
10948
|
@staticmethod
|
|
9884
10949
|
def write(value, buf):
|
|
9885
10950
|
_UniffiConverterTypePrepareSendPaymentResponse.write(value.prepare_response, buf)
|
|
9886
10951
|
_UniffiConverterOptionalTypeSendPaymentOptions.write(value.options, buf)
|
|
10952
|
+
_UniffiConverterOptionalString.write(value.idempotency_key, buf)
|
|
9887
10953
|
|
|
9888
10954
|
|
|
9889
10955
|
class SendPaymentResponse:
|
|
@@ -9915,6 +10981,56 @@ class _UniffiConverterTypeSendPaymentResponse(_UniffiConverterRustBuffer):
|
|
|
9915
10981
|
_UniffiConverterTypePayment.write(value.payment, buf)
|
|
9916
10982
|
|
|
9917
10983
|
|
|
10984
|
+
class SetLnurlMetadataItem:
|
|
10985
|
+
payment_hash: "str"
|
|
10986
|
+
sender_comment: "typing.Optional[str]"
|
|
10987
|
+
nostr_zap_request: "typing.Optional[str]"
|
|
10988
|
+
nostr_zap_receipt: "typing.Optional[str]"
|
|
10989
|
+
def __init__(self, *, payment_hash: "str", sender_comment: "typing.Optional[str]", nostr_zap_request: "typing.Optional[str]", nostr_zap_receipt: "typing.Optional[str]"):
|
|
10990
|
+
self.payment_hash = payment_hash
|
|
10991
|
+
self.sender_comment = sender_comment
|
|
10992
|
+
self.nostr_zap_request = nostr_zap_request
|
|
10993
|
+
self.nostr_zap_receipt = nostr_zap_receipt
|
|
10994
|
+
|
|
10995
|
+
def __str__(self):
|
|
10996
|
+
return "SetLnurlMetadataItem(payment_hash={}, sender_comment={}, nostr_zap_request={}, nostr_zap_receipt={})".format(self.payment_hash, self.sender_comment, self.nostr_zap_request, self.nostr_zap_receipt)
|
|
10997
|
+
|
|
10998
|
+
def __eq__(self, other):
|
|
10999
|
+
if self.payment_hash != other.payment_hash:
|
|
11000
|
+
return False
|
|
11001
|
+
if self.sender_comment != other.sender_comment:
|
|
11002
|
+
return False
|
|
11003
|
+
if self.nostr_zap_request != other.nostr_zap_request:
|
|
11004
|
+
return False
|
|
11005
|
+
if self.nostr_zap_receipt != other.nostr_zap_receipt:
|
|
11006
|
+
return False
|
|
11007
|
+
return True
|
|
11008
|
+
|
|
11009
|
+
class _UniffiConverterTypeSetLnurlMetadataItem(_UniffiConverterRustBuffer):
|
|
11010
|
+
@staticmethod
|
|
11011
|
+
def read(buf):
|
|
11012
|
+
return SetLnurlMetadataItem(
|
|
11013
|
+
payment_hash=_UniffiConverterString.read(buf),
|
|
11014
|
+
sender_comment=_UniffiConverterOptionalString.read(buf),
|
|
11015
|
+
nostr_zap_request=_UniffiConverterOptionalString.read(buf),
|
|
11016
|
+
nostr_zap_receipt=_UniffiConverterOptionalString.read(buf),
|
|
11017
|
+
)
|
|
11018
|
+
|
|
11019
|
+
@staticmethod
|
|
11020
|
+
def check_lower(value):
|
|
11021
|
+
_UniffiConverterString.check_lower(value.payment_hash)
|
|
11022
|
+
_UniffiConverterOptionalString.check_lower(value.sender_comment)
|
|
11023
|
+
_UniffiConverterOptionalString.check_lower(value.nostr_zap_request)
|
|
11024
|
+
_UniffiConverterOptionalString.check_lower(value.nostr_zap_receipt)
|
|
11025
|
+
|
|
11026
|
+
@staticmethod
|
|
11027
|
+
def write(value, buf):
|
|
11028
|
+
_UniffiConverterString.write(value.payment_hash, buf)
|
|
11029
|
+
_UniffiConverterOptionalString.write(value.sender_comment, buf)
|
|
11030
|
+
_UniffiConverterOptionalString.write(value.nostr_zap_request, buf)
|
|
11031
|
+
_UniffiConverterOptionalString.write(value.nostr_zap_receipt, buf)
|
|
11032
|
+
|
|
11033
|
+
|
|
9918
11034
|
class SignMessageRequest:
|
|
9919
11035
|
message: "str"
|
|
9920
11036
|
compact: "bool"
|
|
@@ -10096,6 +11212,117 @@ class _UniffiConverterTypeSparkAddressDetails(_UniffiConverterRustBuffer):
|
|
|
10096
11212
|
_UniffiConverterTypePaymentRequestSource.write(value.source, buf)
|
|
10097
11213
|
|
|
10098
11214
|
|
|
11215
|
+
class SparkHtlcDetails:
|
|
11216
|
+
payment_hash: "str"
|
|
11217
|
+
"""
|
|
11218
|
+
The payment hash of the HTLC
|
|
11219
|
+
"""
|
|
11220
|
+
|
|
11221
|
+
preimage: "typing.Optional[str]"
|
|
11222
|
+
"""
|
|
11223
|
+
The preimage of the HTLC. Empty until receiver has released it.
|
|
11224
|
+
"""
|
|
11225
|
+
|
|
11226
|
+
expiry_time: "int"
|
|
11227
|
+
"""
|
|
11228
|
+
The expiry time of the HTLC in seconds since the Unix epoch
|
|
11229
|
+
"""
|
|
11230
|
+
|
|
11231
|
+
status: "SparkHtlcStatus"
|
|
11232
|
+
"""
|
|
11233
|
+
The HTLC status
|
|
11234
|
+
"""
|
|
11235
|
+
|
|
11236
|
+
def __init__(self, *, payment_hash: "str", preimage: "typing.Optional[str]", expiry_time: "int", status: "SparkHtlcStatus"):
|
|
11237
|
+
self.payment_hash = payment_hash
|
|
11238
|
+
self.preimage = preimage
|
|
11239
|
+
self.expiry_time = expiry_time
|
|
11240
|
+
self.status = status
|
|
11241
|
+
|
|
11242
|
+
def __str__(self):
|
|
11243
|
+
return "SparkHtlcDetails(payment_hash={}, preimage={}, expiry_time={}, status={})".format(self.payment_hash, self.preimage, self.expiry_time, self.status)
|
|
11244
|
+
|
|
11245
|
+
def __eq__(self, other):
|
|
11246
|
+
if self.payment_hash != other.payment_hash:
|
|
11247
|
+
return False
|
|
11248
|
+
if self.preimage != other.preimage:
|
|
11249
|
+
return False
|
|
11250
|
+
if self.expiry_time != other.expiry_time:
|
|
11251
|
+
return False
|
|
11252
|
+
if self.status != other.status:
|
|
11253
|
+
return False
|
|
11254
|
+
return True
|
|
11255
|
+
|
|
11256
|
+
class _UniffiConverterTypeSparkHtlcDetails(_UniffiConverterRustBuffer):
|
|
11257
|
+
@staticmethod
|
|
11258
|
+
def read(buf):
|
|
11259
|
+
return SparkHtlcDetails(
|
|
11260
|
+
payment_hash=_UniffiConverterString.read(buf),
|
|
11261
|
+
preimage=_UniffiConverterOptionalString.read(buf),
|
|
11262
|
+
expiry_time=_UniffiConverterUInt64.read(buf),
|
|
11263
|
+
status=_UniffiConverterTypeSparkHtlcStatus.read(buf),
|
|
11264
|
+
)
|
|
11265
|
+
|
|
11266
|
+
@staticmethod
|
|
11267
|
+
def check_lower(value):
|
|
11268
|
+
_UniffiConverterString.check_lower(value.payment_hash)
|
|
11269
|
+
_UniffiConverterOptionalString.check_lower(value.preimage)
|
|
11270
|
+
_UniffiConverterUInt64.check_lower(value.expiry_time)
|
|
11271
|
+
_UniffiConverterTypeSparkHtlcStatus.check_lower(value.status)
|
|
11272
|
+
|
|
11273
|
+
@staticmethod
|
|
11274
|
+
def write(value, buf):
|
|
11275
|
+
_UniffiConverterString.write(value.payment_hash, buf)
|
|
11276
|
+
_UniffiConverterOptionalString.write(value.preimage, buf)
|
|
11277
|
+
_UniffiConverterUInt64.write(value.expiry_time, buf)
|
|
11278
|
+
_UniffiConverterTypeSparkHtlcStatus.write(value.status, buf)
|
|
11279
|
+
|
|
11280
|
+
|
|
11281
|
+
class SparkHtlcOptions:
|
|
11282
|
+
payment_hash: "str"
|
|
11283
|
+
"""
|
|
11284
|
+
The payment hash of the HTLC. The receiver will need to provide the associated preimage to claim it.
|
|
11285
|
+
"""
|
|
11286
|
+
|
|
11287
|
+
expiry_duration_secs: "int"
|
|
11288
|
+
"""
|
|
11289
|
+
The duration of the HTLC in seconds.
|
|
11290
|
+
After this time, the HTLC will be returned.
|
|
11291
|
+
"""
|
|
11292
|
+
|
|
11293
|
+
def __init__(self, *, payment_hash: "str", expiry_duration_secs: "int"):
|
|
11294
|
+
self.payment_hash = payment_hash
|
|
11295
|
+
self.expiry_duration_secs = expiry_duration_secs
|
|
11296
|
+
|
|
11297
|
+
def __str__(self):
|
|
11298
|
+
return "SparkHtlcOptions(payment_hash={}, expiry_duration_secs={})".format(self.payment_hash, self.expiry_duration_secs)
|
|
11299
|
+
|
|
11300
|
+
def __eq__(self, other):
|
|
11301
|
+
if self.payment_hash != other.payment_hash:
|
|
11302
|
+
return False
|
|
11303
|
+
if self.expiry_duration_secs != other.expiry_duration_secs:
|
|
11304
|
+
return False
|
|
11305
|
+
return True
|
|
11306
|
+
|
|
11307
|
+
class _UniffiConverterTypeSparkHtlcOptions(_UniffiConverterRustBuffer):
|
|
11308
|
+
@staticmethod
|
|
11309
|
+
def read(buf):
|
|
11310
|
+
return SparkHtlcOptions(
|
|
11311
|
+
payment_hash=_UniffiConverterString.read(buf),
|
|
11312
|
+
expiry_duration_secs=_UniffiConverterUInt64.read(buf),
|
|
11313
|
+
)
|
|
11314
|
+
|
|
11315
|
+
@staticmethod
|
|
11316
|
+
def check_lower(value):
|
|
11317
|
+
_UniffiConverterString.check_lower(value.payment_hash)
|
|
11318
|
+
_UniffiConverterUInt64.check_lower(value.expiry_duration_secs)
|
|
11319
|
+
|
|
11320
|
+
@staticmethod
|
|
11321
|
+
def write(value, buf):
|
|
11322
|
+
_UniffiConverterString.write(value.payment_hash, buf)
|
|
11323
|
+
_UniffiConverterUInt64.write(value.expiry_duration_secs, buf)
|
|
11324
|
+
|
|
11325
|
+
|
|
10099
11326
|
class SparkInvoiceDetails:
|
|
10100
11327
|
invoice: "str"
|
|
10101
11328
|
"""
|
|
@@ -10512,6 +11739,71 @@ class _UniffiConverterTypeTxStatus(_UniffiConverterRustBuffer):
|
|
|
10512
11739
|
_UniffiConverterOptionalUInt64.write(value.block_time, buf)
|
|
10513
11740
|
|
|
10514
11741
|
|
|
11742
|
+
class UnfreezeIssuerTokenRequest:
|
|
11743
|
+
address: "str"
|
|
11744
|
+
def __init__(self, *, address: "str"):
|
|
11745
|
+
self.address = address
|
|
11746
|
+
|
|
11747
|
+
def __str__(self):
|
|
11748
|
+
return "UnfreezeIssuerTokenRequest(address={})".format(self.address)
|
|
11749
|
+
|
|
11750
|
+
def __eq__(self, other):
|
|
11751
|
+
if self.address != other.address:
|
|
11752
|
+
return False
|
|
11753
|
+
return True
|
|
11754
|
+
|
|
11755
|
+
class _UniffiConverterTypeUnfreezeIssuerTokenRequest(_UniffiConverterRustBuffer):
|
|
11756
|
+
@staticmethod
|
|
11757
|
+
def read(buf):
|
|
11758
|
+
return UnfreezeIssuerTokenRequest(
|
|
11759
|
+
address=_UniffiConverterString.read(buf),
|
|
11760
|
+
)
|
|
11761
|
+
|
|
11762
|
+
@staticmethod
|
|
11763
|
+
def check_lower(value):
|
|
11764
|
+
_UniffiConverterString.check_lower(value.address)
|
|
11765
|
+
|
|
11766
|
+
@staticmethod
|
|
11767
|
+
def write(value, buf):
|
|
11768
|
+
_UniffiConverterString.write(value.address, buf)
|
|
11769
|
+
|
|
11770
|
+
|
|
11771
|
+
class UnfreezeIssuerTokenResponse:
|
|
11772
|
+
impacted_output_ids: "typing.List[str]"
|
|
11773
|
+
impacted_token_amount: "U128"
|
|
11774
|
+
def __init__(self, *, impacted_output_ids: "typing.List[str]", impacted_token_amount: "U128"):
|
|
11775
|
+
self.impacted_output_ids = impacted_output_ids
|
|
11776
|
+
self.impacted_token_amount = impacted_token_amount
|
|
11777
|
+
|
|
11778
|
+
def __str__(self):
|
|
11779
|
+
return "UnfreezeIssuerTokenResponse(impacted_output_ids={}, impacted_token_amount={})".format(self.impacted_output_ids, self.impacted_token_amount)
|
|
11780
|
+
|
|
11781
|
+
def __eq__(self, other):
|
|
11782
|
+
if self.impacted_output_ids != other.impacted_output_ids:
|
|
11783
|
+
return False
|
|
11784
|
+
if self.impacted_token_amount != other.impacted_token_amount:
|
|
11785
|
+
return False
|
|
11786
|
+
return True
|
|
11787
|
+
|
|
11788
|
+
class _UniffiConverterTypeUnfreezeIssuerTokenResponse(_UniffiConverterRustBuffer):
|
|
11789
|
+
@staticmethod
|
|
11790
|
+
def read(buf):
|
|
11791
|
+
return UnfreezeIssuerTokenResponse(
|
|
11792
|
+
impacted_output_ids=_UniffiConverterSequenceString.read(buf),
|
|
11793
|
+
impacted_token_amount=_UniffiConverterTypeU128.read(buf),
|
|
11794
|
+
)
|
|
11795
|
+
|
|
11796
|
+
@staticmethod
|
|
11797
|
+
def check_lower(value):
|
|
11798
|
+
_UniffiConverterSequenceString.check_lower(value.impacted_output_ids)
|
|
11799
|
+
_UniffiConverterTypeU128.check_lower(value.impacted_token_amount)
|
|
11800
|
+
|
|
11801
|
+
@staticmethod
|
|
11802
|
+
def write(value, buf):
|
|
11803
|
+
_UniffiConverterSequenceString.write(value.impacted_output_ids, buf)
|
|
11804
|
+
_UniffiConverterTypeU128.write(value.impacted_token_amount, buf)
|
|
11805
|
+
|
|
11806
|
+
|
|
10515
11807
|
class UnversionedRecordChange:
|
|
10516
11808
|
id: "RecordId"
|
|
10517
11809
|
schema_version: "str"
|
|
@@ -10667,115 +11959,57 @@ class _UniffiConverterTypeUserSettings(_UniffiConverterRustBuffer):
|
|
|
10667
11959
|
|
|
10668
11960
|
@staticmethod
|
|
10669
11961
|
def write(value, buf):
|
|
10670
|
-
_UniffiConverterBool.write(value.spark_private_mode_enabled, buf)
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
class Utxo:
|
|
10674
|
-
txid: "str"
|
|
10675
|
-
vout: "int"
|
|
10676
|
-
value: "int"
|
|
10677
|
-
status: "TxStatus"
|
|
10678
|
-
def __init__(self, *, txid: "str", vout: "int", value: "int", status: "TxStatus"):
|
|
10679
|
-
self.txid = txid
|
|
10680
|
-
self.vout = vout
|
|
10681
|
-
self.value = value
|
|
10682
|
-
self.status = status
|
|
10683
|
-
|
|
10684
|
-
def __str__(self):
|
|
10685
|
-
return "Utxo(txid={}, vout={}, value={}, status={})".format(self.txid, self.vout, self.value, self.status)
|
|
10686
|
-
|
|
10687
|
-
def __eq__(self, other):
|
|
10688
|
-
if self.txid != other.txid:
|
|
10689
|
-
return False
|
|
10690
|
-
if self.vout != other.vout:
|
|
10691
|
-
return False
|
|
10692
|
-
if self.value != other.value:
|
|
10693
|
-
return False
|
|
10694
|
-
if self.status != other.status:
|
|
10695
|
-
return False
|
|
10696
|
-
return True
|
|
10697
|
-
|
|
10698
|
-
class _UniffiConverterTypeUtxo(_UniffiConverterRustBuffer):
|
|
10699
|
-
@staticmethod
|
|
10700
|
-
def read(buf):
|
|
10701
|
-
return Utxo(
|
|
10702
|
-
txid=_UniffiConverterString.read(buf),
|
|
10703
|
-
vout=_UniffiConverterUInt32.read(buf),
|
|
10704
|
-
value=_UniffiConverterUInt64.read(buf),
|
|
10705
|
-
status=_UniffiConverterTypeTxStatus.read(buf),
|
|
10706
|
-
)
|
|
10707
|
-
|
|
10708
|
-
@staticmethod
|
|
10709
|
-
def check_lower(value):
|
|
10710
|
-
_UniffiConverterString.check_lower(value.txid)
|
|
10711
|
-
_UniffiConverterUInt32.check_lower(value.vout)
|
|
10712
|
-
_UniffiConverterUInt64.check_lower(value.value)
|
|
10713
|
-
_UniffiConverterTypeTxStatus.check_lower(value.status)
|
|
10714
|
-
|
|
10715
|
-
@staticmethod
|
|
10716
|
-
def write(value, buf):
|
|
10717
|
-
_UniffiConverterString.write(value.txid, buf)
|
|
10718
|
-
_UniffiConverterUInt32.write(value.vout, buf)
|
|
10719
|
-
_UniffiConverterUInt64.write(value.value, buf)
|
|
10720
|
-
_UniffiConverterTypeTxStatus.write(value.status, buf)
|
|
10721
|
-
|
|
10722
|
-
|
|
10723
|
-
class WaitForPaymentRequest:
|
|
10724
|
-
identifier: "WaitForPaymentIdentifier"
|
|
10725
|
-
def __init__(self, *, identifier: "WaitForPaymentIdentifier"):
|
|
10726
|
-
self.identifier = identifier
|
|
10727
|
-
|
|
10728
|
-
def __str__(self):
|
|
10729
|
-
return "WaitForPaymentRequest(identifier={})".format(self.identifier)
|
|
10730
|
-
|
|
10731
|
-
def __eq__(self, other):
|
|
10732
|
-
if self.identifier != other.identifier:
|
|
10733
|
-
return False
|
|
10734
|
-
return True
|
|
10735
|
-
|
|
10736
|
-
class _UniffiConverterTypeWaitForPaymentRequest(_UniffiConverterRustBuffer):
|
|
10737
|
-
@staticmethod
|
|
10738
|
-
def read(buf):
|
|
10739
|
-
return WaitForPaymentRequest(
|
|
10740
|
-
identifier=_UniffiConverterTypeWaitForPaymentIdentifier.read(buf),
|
|
10741
|
-
)
|
|
10742
|
-
|
|
10743
|
-
@staticmethod
|
|
10744
|
-
def check_lower(value):
|
|
10745
|
-
_UniffiConverterTypeWaitForPaymentIdentifier.check_lower(value.identifier)
|
|
10746
|
-
|
|
10747
|
-
@staticmethod
|
|
10748
|
-
def write(value, buf):
|
|
10749
|
-
_UniffiConverterTypeWaitForPaymentIdentifier.write(value.identifier, buf)
|
|
11962
|
+
_UniffiConverterBool.write(value.spark_private_mode_enabled, buf)
|
|
10750
11963
|
|
|
10751
11964
|
|
|
10752
|
-
class
|
|
10753
|
-
|
|
10754
|
-
|
|
10755
|
-
|
|
11965
|
+
class Utxo:
|
|
11966
|
+
txid: "str"
|
|
11967
|
+
vout: "int"
|
|
11968
|
+
value: "int"
|
|
11969
|
+
status: "TxStatus"
|
|
11970
|
+
def __init__(self, *, txid: "str", vout: "int", value: "int", status: "TxStatus"):
|
|
11971
|
+
self.txid = txid
|
|
11972
|
+
self.vout = vout
|
|
11973
|
+
self.value = value
|
|
11974
|
+
self.status = status
|
|
10756
11975
|
|
|
10757
11976
|
def __str__(self):
|
|
10758
|
-
return "
|
|
11977
|
+
return "Utxo(txid={}, vout={}, value={}, status={})".format(self.txid, self.vout, self.value, self.status)
|
|
10759
11978
|
|
|
10760
11979
|
def __eq__(self, other):
|
|
10761
|
-
if self.
|
|
11980
|
+
if self.txid != other.txid:
|
|
11981
|
+
return False
|
|
11982
|
+
if self.vout != other.vout:
|
|
11983
|
+
return False
|
|
11984
|
+
if self.value != other.value:
|
|
11985
|
+
return False
|
|
11986
|
+
if self.status != other.status:
|
|
10762
11987
|
return False
|
|
10763
11988
|
return True
|
|
10764
11989
|
|
|
10765
|
-
class
|
|
11990
|
+
class _UniffiConverterTypeUtxo(_UniffiConverterRustBuffer):
|
|
10766
11991
|
@staticmethod
|
|
10767
11992
|
def read(buf):
|
|
10768
|
-
return
|
|
10769
|
-
|
|
11993
|
+
return Utxo(
|
|
11994
|
+
txid=_UniffiConverterString.read(buf),
|
|
11995
|
+
vout=_UniffiConverterUInt32.read(buf),
|
|
11996
|
+
value=_UniffiConverterUInt64.read(buf),
|
|
11997
|
+
status=_UniffiConverterTypeTxStatus.read(buf),
|
|
10770
11998
|
)
|
|
10771
11999
|
|
|
10772
12000
|
@staticmethod
|
|
10773
12001
|
def check_lower(value):
|
|
10774
|
-
|
|
12002
|
+
_UniffiConverterString.check_lower(value.txid)
|
|
12003
|
+
_UniffiConverterUInt32.check_lower(value.vout)
|
|
12004
|
+
_UniffiConverterUInt64.check_lower(value.value)
|
|
12005
|
+
_UniffiConverterTypeTxStatus.check_lower(value.status)
|
|
10775
12006
|
|
|
10776
12007
|
@staticmethod
|
|
10777
12008
|
def write(value, buf):
|
|
10778
|
-
|
|
12009
|
+
_UniffiConverterString.write(value.txid, buf)
|
|
12010
|
+
_UniffiConverterUInt32.write(value.vout, buf)
|
|
12011
|
+
_UniffiConverterUInt64.write(value.value, buf)
|
|
12012
|
+
_UniffiConverterTypeTxStatus.write(value.status, buf)
|
|
10779
12013
|
|
|
10780
12014
|
|
|
10781
12015
|
|
|
@@ -11154,6 +12388,44 @@ class _UniffiConverterTypeBitcoinNetwork(_UniffiConverterRustBuffer):
|
|
|
11154
12388
|
|
|
11155
12389
|
|
|
11156
12390
|
|
|
12391
|
+
|
|
12392
|
+
|
|
12393
|
+
|
|
12394
|
+
class ChainApiType(enum.Enum):
|
|
12395
|
+
ESPLORA = 0
|
|
12396
|
+
|
|
12397
|
+
MEMPOOL_SPACE = 1
|
|
12398
|
+
|
|
12399
|
+
|
|
12400
|
+
|
|
12401
|
+
class _UniffiConverterTypeChainApiType(_UniffiConverterRustBuffer):
|
|
12402
|
+
@staticmethod
|
|
12403
|
+
def read(buf):
|
|
12404
|
+
variant = buf.read_i32()
|
|
12405
|
+
if variant == 1:
|
|
12406
|
+
return ChainApiType.ESPLORA
|
|
12407
|
+
if variant == 2:
|
|
12408
|
+
return ChainApiType.MEMPOOL_SPACE
|
|
12409
|
+
raise InternalError("Raw enum value doesn't match any cases")
|
|
12410
|
+
|
|
12411
|
+
@staticmethod
|
|
12412
|
+
def check_lower(value):
|
|
12413
|
+
if value == ChainApiType.ESPLORA:
|
|
12414
|
+
return
|
|
12415
|
+
if value == ChainApiType.MEMPOOL_SPACE:
|
|
12416
|
+
return
|
|
12417
|
+
raise ValueError(value)
|
|
12418
|
+
|
|
12419
|
+
@staticmethod
|
|
12420
|
+
def write(value, buf):
|
|
12421
|
+
if value == ChainApiType.ESPLORA:
|
|
12422
|
+
buf.write_i32(1)
|
|
12423
|
+
if value == ChainApiType.MEMPOOL_SPACE:
|
|
12424
|
+
buf.write_i32(2)
|
|
12425
|
+
|
|
12426
|
+
|
|
12427
|
+
|
|
12428
|
+
|
|
11157
12429
|
# ChainServiceError
|
|
11158
12430
|
# We want to define each variant as a nested class that's also a subclass,
|
|
11159
12431
|
# which is tricky in Python. To accomplish this we're going to create each
|
|
@@ -11267,23 +12539,25 @@ class DepositClaimError:
|
|
|
11267
12539
|
raise RuntimeError("DepositClaimError cannot be instantiated directly")
|
|
11268
12540
|
|
|
11269
12541
|
# Each enum variant is a nested class of the enum itself.
|
|
11270
|
-
class
|
|
12542
|
+
class MAX_DEPOSIT_CLAIM_FEE_EXCEEDED:
|
|
11271
12543
|
tx: "str"
|
|
11272
12544
|
vout: "int"
|
|
11273
12545
|
max_fee: "typing.Optional[Fee]"
|
|
11274
|
-
|
|
12546
|
+
required_fee_sats: "int"
|
|
12547
|
+
required_fee_rate_sat_per_vbyte: "int"
|
|
11275
12548
|
|
|
11276
|
-
def __init__(self,tx: "str", vout: "int", max_fee: "typing.Optional[Fee]",
|
|
12549
|
+
def __init__(self,tx: "str", vout: "int", max_fee: "typing.Optional[Fee]", required_fee_sats: "int", required_fee_rate_sat_per_vbyte: "int"):
|
|
11277
12550
|
self.tx = tx
|
|
11278
12551
|
self.vout = vout
|
|
11279
12552
|
self.max_fee = max_fee
|
|
11280
|
-
self.
|
|
12553
|
+
self.required_fee_sats = required_fee_sats
|
|
12554
|
+
self.required_fee_rate_sat_per_vbyte = required_fee_rate_sat_per_vbyte
|
|
11281
12555
|
|
|
11282
12556
|
def __str__(self):
|
|
11283
|
-
return "DepositClaimError.
|
|
12557
|
+
return "DepositClaimError.MAX_DEPOSIT_CLAIM_FEE_EXCEEDED(tx={}, vout={}, max_fee={}, required_fee_sats={}, required_fee_rate_sat_per_vbyte={})".format(self.tx, self.vout, self.max_fee, self.required_fee_sats, self.required_fee_rate_sat_per_vbyte)
|
|
11284
12558
|
|
|
11285
12559
|
def __eq__(self, other):
|
|
11286
|
-
if not other.
|
|
12560
|
+
if not other.is_max_deposit_claim_fee_exceeded():
|
|
11287
12561
|
return False
|
|
11288
12562
|
if self.tx != other.tx:
|
|
11289
12563
|
return False
|
|
@@ -11291,7 +12565,9 @@ class DepositClaimError:
|
|
|
11291
12565
|
return False
|
|
11292
12566
|
if self.max_fee != other.max_fee:
|
|
11293
12567
|
return False
|
|
11294
|
-
if self.
|
|
12568
|
+
if self.required_fee_sats != other.required_fee_sats:
|
|
12569
|
+
return False
|
|
12570
|
+
if self.required_fee_rate_sat_per_vbyte != other.required_fee_rate_sat_per_vbyte:
|
|
11295
12571
|
return False
|
|
11296
12572
|
return True
|
|
11297
12573
|
|
|
@@ -11335,8 +12611,8 @@ class DepositClaimError:
|
|
|
11335
12611
|
|
|
11336
12612
|
# For each variant, we have an `is_NAME` method for easily checking
|
|
11337
12613
|
# whether an instance is that variant.
|
|
11338
|
-
def
|
|
11339
|
-
return isinstance(self, DepositClaimError.
|
|
12614
|
+
def is_max_deposit_claim_fee_exceeded(self) -> bool:
|
|
12615
|
+
return isinstance(self, DepositClaimError.MAX_DEPOSIT_CLAIM_FEE_EXCEEDED)
|
|
11340
12616
|
def is_missing_utxo(self) -> bool:
|
|
11341
12617
|
return isinstance(self, DepositClaimError.MISSING_UTXO)
|
|
11342
12618
|
def is_generic(self) -> bool:
|
|
@@ -11346,7 +12622,7 @@ class DepositClaimError:
|
|
|
11346
12622
|
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
11347
12623
|
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
11348
12624
|
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
11349
|
-
DepositClaimError.
|
|
12625
|
+
DepositClaimError.MAX_DEPOSIT_CLAIM_FEE_EXCEEDED = type("DepositClaimError.MAX_DEPOSIT_CLAIM_FEE_EXCEEDED", (DepositClaimError.MAX_DEPOSIT_CLAIM_FEE_EXCEEDED, DepositClaimError,), {}) # type: ignore
|
|
11350
12626
|
DepositClaimError.MISSING_UTXO = type("DepositClaimError.MISSING_UTXO", (DepositClaimError.MISSING_UTXO, DepositClaimError,), {}) # type: ignore
|
|
11351
12627
|
DepositClaimError.GENERIC = type("DepositClaimError.GENERIC", (DepositClaimError.GENERIC, DepositClaimError,), {}) # type: ignore
|
|
11352
12628
|
|
|
@@ -11358,11 +12634,12 @@ class _UniffiConverterTypeDepositClaimError(_UniffiConverterRustBuffer):
|
|
|
11358
12634
|
def read(buf):
|
|
11359
12635
|
variant = buf.read_i32()
|
|
11360
12636
|
if variant == 1:
|
|
11361
|
-
return DepositClaimError.
|
|
12637
|
+
return DepositClaimError.MAX_DEPOSIT_CLAIM_FEE_EXCEEDED(
|
|
11362
12638
|
_UniffiConverterString.read(buf),
|
|
11363
12639
|
_UniffiConverterUInt32.read(buf),
|
|
11364
12640
|
_UniffiConverterOptionalTypeFee.read(buf),
|
|
11365
12641
|
_UniffiConverterUInt64.read(buf),
|
|
12642
|
+
_UniffiConverterUInt64.read(buf),
|
|
11366
12643
|
)
|
|
11367
12644
|
if variant == 2:
|
|
11368
12645
|
return DepositClaimError.MISSING_UTXO(
|
|
@@ -11377,11 +12654,12 @@ class _UniffiConverterTypeDepositClaimError(_UniffiConverterRustBuffer):
|
|
|
11377
12654
|
|
|
11378
12655
|
@staticmethod
|
|
11379
12656
|
def check_lower(value):
|
|
11380
|
-
if value.
|
|
12657
|
+
if value.is_max_deposit_claim_fee_exceeded():
|
|
11381
12658
|
_UniffiConverterString.check_lower(value.tx)
|
|
11382
12659
|
_UniffiConverterUInt32.check_lower(value.vout)
|
|
11383
12660
|
_UniffiConverterOptionalTypeFee.check_lower(value.max_fee)
|
|
11384
|
-
_UniffiConverterUInt64.check_lower(value.
|
|
12661
|
+
_UniffiConverterUInt64.check_lower(value.required_fee_sats)
|
|
12662
|
+
_UniffiConverterUInt64.check_lower(value.required_fee_rate_sat_per_vbyte)
|
|
11385
12663
|
return
|
|
11386
12664
|
if value.is_missing_utxo():
|
|
11387
12665
|
_UniffiConverterString.check_lower(value.tx)
|
|
@@ -11394,12 +12672,13 @@ class _UniffiConverterTypeDepositClaimError(_UniffiConverterRustBuffer):
|
|
|
11394
12672
|
|
|
11395
12673
|
@staticmethod
|
|
11396
12674
|
def write(value, buf):
|
|
11397
|
-
if value.
|
|
12675
|
+
if value.is_max_deposit_claim_fee_exceeded():
|
|
11398
12676
|
buf.write_i32(1)
|
|
11399
12677
|
_UniffiConverterString.write(value.tx, buf)
|
|
11400
12678
|
_UniffiConverterUInt32.write(value.vout, buf)
|
|
11401
12679
|
_UniffiConverterOptionalTypeFee.write(value.max_fee, buf)
|
|
11402
|
-
_UniffiConverterUInt64.write(value.
|
|
12680
|
+
_UniffiConverterUInt64.write(value.required_fee_sats, buf)
|
|
12681
|
+
_UniffiConverterUInt64.write(value.required_fee_rate_sat_per_vbyte, buf)
|
|
11403
12682
|
if value.is_missing_utxo():
|
|
11404
12683
|
buf.write_i32(2)
|
|
11405
12684
|
_UniffiConverterString.write(value.tx, buf)
|
|
@@ -12042,6 +13321,130 @@ class _UniffiConverterTypeKeySetType(_UniffiConverterRustBuffer):
|
|
|
12042
13321
|
|
|
12043
13322
|
|
|
12044
13323
|
|
|
13324
|
+
class MaxFee:
|
|
13325
|
+
def __init__(self):
|
|
13326
|
+
raise RuntimeError("MaxFee cannot be instantiated directly")
|
|
13327
|
+
|
|
13328
|
+
# Each enum variant is a nested class of the enum itself.
|
|
13329
|
+
class FIXED:
|
|
13330
|
+
amount: "int"
|
|
13331
|
+
|
|
13332
|
+
def __init__(self,amount: "int"):
|
|
13333
|
+
self.amount = amount
|
|
13334
|
+
|
|
13335
|
+
def __str__(self):
|
|
13336
|
+
return "MaxFee.FIXED(amount={})".format(self.amount)
|
|
13337
|
+
|
|
13338
|
+
def __eq__(self, other):
|
|
13339
|
+
if not other.is_fixed():
|
|
13340
|
+
return False
|
|
13341
|
+
if self.amount != other.amount:
|
|
13342
|
+
return False
|
|
13343
|
+
return True
|
|
13344
|
+
|
|
13345
|
+
class RATE:
|
|
13346
|
+
sat_per_vbyte: "int"
|
|
13347
|
+
|
|
13348
|
+
def __init__(self,sat_per_vbyte: "int"):
|
|
13349
|
+
self.sat_per_vbyte = sat_per_vbyte
|
|
13350
|
+
|
|
13351
|
+
def __str__(self):
|
|
13352
|
+
return "MaxFee.RATE(sat_per_vbyte={})".format(self.sat_per_vbyte)
|
|
13353
|
+
|
|
13354
|
+
def __eq__(self, other):
|
|
13355
|
+
if not other.is_rate():
|
|
13356
|
+
return False
|
|
13357
|
+
if self.sat_per_vbyte != other.sat_per_vbyte:
|
|
13358
|
+
return False
|
|
13359
|
+
return True
|
|
13360
|
+
|
|
13361
|
+
class NETWORK_RECOMMENDED:
|
|
13362
|
+
leeway_sat_per_vbyte: "int"
|
|
13363
|
+
|
|
13364
|
+
def __init__(self,leeway_sat_per_vbyte: "int"):
|
|
13365
|
+
self.leeway_sat_per_vbyte = leeway_sat_per_vbyte
|
|
13366
|
+
|
|
13367
|
+
def __str__(self):
|
|
13368
|
+
return "MaxFee.NETWORK_RECOMMENDED(leeway_sat_per_vbyte={})".format(self.leeway_sat_per_vbyte)
|
|
13369
|
+
|
|
13370
|
+
def __eq__(self, other):
|
|
13371
|
+
if not other.is_network_recommended():
|
|
13372
|
+
return False
|
|
13373
|
+
if self.leeway_sat_per_vbyte != other.leeway_sat_per_vbyte:
|
|
13374
|
+
return False
|
|
13375
|
+
return True
|
|
13376
|
+
|
|
13377
|
+
|
|
13378
|
+
|
|
13379
|
+
# For each variant, we have an `is_NAME` method for easily checking
|
|
13380
|
+
# whether an instance is that variant.
|
|
13381
|
+
def is_fixed(self) -> bool:
|
|
13382
|
+
return isinstance(self, MaxFee.FIXED)
|
|
13383
|
+
def is_rate(self) -> bool:
|
|
13384
|
+
return isinstance(self, MaxFee.RATE)
|
|
13385
|
+
def is_network_recommended(self) -> bool:
|
|
13386
|
+
return isinstance(self, MaxFee.NETWORK_RECOMMENDED)
|
|
13387
|
+
|
|
13388
|
+
|
|
13389
|
+
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
13390
|
+
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
13391
|
+
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
13392
|
+
MaxFee.FIXED = type("MaxFee.FIXED", (MaxFee.FIXED, MaxFee,), {}) # type: ignore
|
|
13393
|
+
MaxFee.RATE = type("MaxFee.RATE", (MaxFee.RATE, MaxFee,), {}) # type: ignore
|
|
13394
|
+
MaxFee.NETWORK_RECOMMENDED = type("MaxFee.NETWORK_RECOMMENDED", (MaxFee.NETWORK_RECOMMENDED, MaxFee,), {}) # type: ignore
|
|
13395
|
+
|
|
13396
|
+
|
|
13397
|
+
|
|
13398
|
+
|
|
13399
|
+
class _UniffiConverterTypeMaxFee(_UniffiConverterRustBuffer):
|
|
13400
|
+
@staticmethod
|
|
13401
|
+
def read(buf):
|
|
13402
|
+
variant = buf.read_i32()
|
|
13403
|
+
if variant == 1:
|
|
13404
|
+
return MaxFee.FIXED(
|
|
13405
|
+
_UniffiConverterUInt64.read(buf),
|
|
13406
|
+
)
|
|
13407
|
+
if variant == 2:
|
|
13408
|
+
return MaxFee.RATE(
|
|
13409
|
+
_UniffiConverterUInt64.read(buf),
|
|
13410
|
+
)
|
|
13411
|
+
if variant == 3:
|
|
13412
|
+
return MaxFee.NETWORK_RECOMMENDED(
|
|
13413
|
+
_UniffiConverterUInt64.read(buf),
|
|
13414
|
+
)
|
|
13415
|
+
raise InternalError("Raw enum value doesn't match any cases")
|
|
13416
|
+
|
|
13417
|
+
@staticmethod
|
|
13418
|
+
def check_lower(value):
|
|
13419
|
+
if value.is_fixed():
|
|
13420
|
+
_UniffiConverterUInt64.check_lower(value.amount)
|
|
13421
|
+
return
|
|
13422
|
+
if value.is_rate():
|
|
13423
|
+
_UniffiConverterUInt64.check_lower(value.sat_per_vbyte)
|
|
13424
|
+
return
|
|
13425
|
+
if value.is_network_recommended():
|
|
13426
|
+
_UniffiConverterUInt64.check_lower(value.leeway_sat_per_vbyte)
|
|
13427
|
+
return
|
|
13428
|
+
raise ValueError(value)
|
|
13429
|
+
|
|
13430
|
+
@staticmethod
|
|
13431
|
+
def write(value, buf):
|
|
13432
|
+
if value.is_fixed():
|
|
13433
|
+
buf.write_i32(1)
|
|
13434
|
+
_UniffiConverterUInt64.write(value.amount, buf)
|
|
13435
|
+
if value.is_rate():
|
|
13436
|
+
buf.write_i32(2)
|
|
13437
|
+
_UniffiConverterUInt64.write(value.sat_per_vbyte, buf)
|
|
13438
|
+
if value.is_network_recommended():
|
|
13439
|
+
buf.write_i32(3)
|
|
13440
|
+
_UniffiConverterUInt64.write(value.leeway_sat_per_vbyte, buf)
|
|
13441
|
+
|
|
13442
|
+
|
|
13443
|
+
|
|
13444
|
+
|
|
13445
|
+
|
|
13446
|
+
|
|
13447
|
+
|
|
12045
13448
|
class Network(enum.Enum):
|
|
12046
13449
|
MAINNET = 0
|
|
12047
13450
|
|
|
@@ -12137,18 +13540,26 @@ class PaymentDetails:
|
|
|
12137
13540
|
The invoice details if the payment fulfilled a spark invoice
|
|
12138
13541
|
"""
|
|
12139
13542
|
|
|
13543
|
+
htlc_details: "typing.Optional[SparkHtlcDetails]"
|
|
13544
|
+
"""
|
|
13545
|
+
The HTLC transfer details if the payment fulfilled an HTLC transfer
|
|
13546
|
+
"""
|
|
12140
13547
|
|
|
12141
|
-
|
|
13548
|
+
|
|
13549
|
+
def __init__(self,invoice_details: "typing.Optional[SparkInvoicePaymentDetails]", htlc_details: "typing.Optional[SparkHtlcDetails]"):
|
|
12142
13550
|
self.invoice_details = invoice_details
|
|
13551
|
+
self.htlc_details = htlc_details
|
|
12143
13552
|
|
|
12144
13553
|
def __str__(self):
|
|
12145
|
-
return "PaymentDetails.SPARK(invoice_details={})".format(self.invoice_details)
|
|
13554
|
+
return "PaymentDetails.SPARK(invoice_details={}, htlc_details={})".format(self.invoice_details, self.htlc_details)
|
|
12146
13555
|
|
|
12147
13556
|
def __eq__(self, other):
|
|
12148
13557
|
if not other.is_spark():
|
|
12149
13558
|
return False
|
|
12150
13559
|
if self.invoice_details != other.invoice_details:
|
|
12151
13560
|
return False
|
|
13561
|
+
if self.htlc_details != other.htlc_details:
|
|
13562
|
+
return False
|
|
12152
13563
|
return True
|
|
12153
13564
|
|
|
12154
13565
|
class TOKEN:
|
|
@@ -12217,8 +13628,13 @@ class PaymentDetails:
|
|
|
12217
13628
|
Lnurl withdrawal information if this was an lnurl payment.
|
|
12218
13629
|
"""
|
|
12219
13630
|
|
|
13631
|
+
lnurl_receive_metadata: "typing.Optional[LnurlReceiveMetadata]"
|
|
13632
|
+
"""
|
|
13633
|
+
Lnurl receive information if this was a received lnurl payment.
|
|
13634
|
+
"""
|
|
12220
13635
|
|
|
12221
|
-
|
|
13636
|
+
|
|
13637
|
+
def __init__(self,description: "typing.Optional[str]", preimage: "typing.Optional[str]", invoice: "str", payment_hash: "str", destination_pubkey: "str", lnurl_pay_info: "typing.Optional[LnurlPayInfo]", lnurl_withdraw_info: "typing.Optional[LnurlWithdrawInfo]", lnurl_receive_metadata: "typing.Optional[LnurlReceiveMetadata]"):
|
|
12222
13638
|
self.description = description
|
|
12223
13639
|
self.preimage = preimage
|
|
12224
13640
|
self.invoice = invoice
|
|
@@ -12226,9 +13642,10 @@ class PaymentDetails:
|
|
|
12226
13642
|
self.destination_pubkey = destination_pubkey
|
|
12227
13643
|
self.lnurl_pay_info = lnurl_pay_info
|
|
12228
13644
|
self.lnurl_withdraw_info = lnurl_withdraw_info
|
|
13645
|
+
self.lnurl_receive_metadata = lnurl_receive_metadata
|
|
12229
13646
|
|
|
12230
13647
|
def __str__(self):
|
|
12231
|
-
return "PaymentDetails.LIGHTNING(description={}, preimage={}, invoice={}, payment_hash={}, destination_pubkey={}, lnurl_pay_info={}, lnurl_withdraw_info={})".format(self.description, self.preimage, self.invoice, self.payment_hash, self.destination_pubkey, self.lnurl_pay_info, self.lnurl_withdraw_info)
|
|
13648
|
+
return "PaymentDetails.LIGHTNING(description={}, preimage={}, invoice={}, payment_hash={}, destination_pubkey={}, lnurl_pay_info={}, lnurl_withdraw_info={}, lnurl_receive_metadata={})".format(self.description, self.preimage, self.invoice, self.payment_hash, self.destination_pubkey, self.lnurl_pay_info, self.lnurl_withdraw_info, self.lnurl_receive_metadata)
|
|
12232
13649
|
|
|
12233
13650
|
def __eq__(self, other):
|
|
12234
13651
|
if not other.is_lightning():
|
|
@@ -12247,6 +13664,8 @@ class PaymentDetails:
|
|
|
12247
13664
|
return False
|
|
12248
13665
|
if self.lnurl_withdraw_info != other.lnurl_withdraw_info:
|
|
12249
13666
|
return False
|
|
13667
|
+
if self.lnurl_receive_metadata != other.lnurl_receive_metadata:
|
|
13668
|
+
return False
|
|
12250
13669
|
return True
|
|
12251
13670
|
|
|
12252
13671
|
class WITHDRAW:
|
|
@@ -12316,6 +13735,7 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
|
|
|
12316
13735
|
if variant == 1:
|
|
12317
13736
|
return PaymentDetails.SPARK(
|
|
12318
13737
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.read(buf),
|
|
13738
|
+
_UniffiConverterOptionalTypeSparkHtlcDetails.read(buf),
|
|
12319
13739
|
)
|
|
12320
13740
|
if variant == 2:
|
|
12321
13741
|
return PaymentDetails.TOKEN(
|
|
@@ -12332,6 +13752,7 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
|
|
|
12332
13752
|
_UniffiConverterString.read(buf),
|
|
12333
13753
|
_UniffiConverterOptionalTypeLnurlPayInfo.read(buf),
|
|
12334
13754
|
_UniffiConverterOptionalTypeLnurlWithdrawInfo.read(buf),
|
|
13755
|
+
_UniffiConverterOptionalTypeLnurlReceiveMetadata.read(buf),
|
|
12335
13756
|
)
|
|
12336
13757
|
if variant == 4:
|
|
12337
13758
|
return PaymentDetails.WITHDRAW(
|
|
@@ -12347,6 +13768,7 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
|
|
|
12347
13768
|
def check_lower(value):
|
|
12348
13769
|
if value.is_spark():
|
|
12349
13770
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.check_lower(value.invoice_details)
|
|
13771
|
+
_UniffiConverterOptionalTypeSparkHtlcDetails.check_lower(value.htlc_details)
|
|
12350
13772
|
return
|
|
12351
13773
|
if value.is_token():
|
|
12352
13774
|
_UniffiConverterTypeTokenMetadata.check_lower(value.metadata)
|
|
@@ -12361,6 +13783,7 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
|
|
|
12361
13783
|
_UniffiConverterString.check_lower(value.destination_pubkey)
|
|
12362
13784
|
_UniffiConverterOptionalTypeLnurlPayInfo.check_lower(value.lnurl_pay_info)
|
|
12363
13785
|
_UniffiConverterOptionalTypeLnurlWithdrawInfo.check_lower(value.lnurl_withdraw_info)
|
|
13786
|
+
_UniffiConverterOptionalTypeLnurlReceiveMetadata.check_lower(value.lnurl_receive_metadata)
|
|
12364
13787
|
return
|
|
12365
13788
|
if value.is_withdraw():
|
|
12366
13789
|
_UniffiConverterString.check_lower(value.tx_id)
|
|
@@ -12375,6 +13798,7 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
|
|
|
12375
13798
|
if value.is_spark():
|
|
12376
13799
|
buf.write_i32(1)
|
|
12377
13800
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.write(value.invoice_details, buf)
|
|
13801
|
+
_UniffiConverterOptionalTypeSparkHtlcDetails.write(value.htlc_details, buf)
|
|
12378
13802
|
if value.is_token():
|
|
12379
13803
|
buf.write_i32(2)
|
|
12380
13804
|
_UniffiConverterTypeTokenMetadata.write(value.metadata, buf)
|
|
@@ -12389,6 +13813,7 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
|
|
|
12389
13813
|
_UniffiConverterString.write(value.destination_pubkey, buf)
|
|
12390
13814
|
_UniffiConverterOptionalTypeLnurlPayInfo.write(value.lnurl_pay_info, buf)
|
|
12391
13815
|
_UniffiConverterOptionalTypeLnurlWithdrawInfo.write(value.lnurl_withdraw_info, buf)
|
|
13816
|
+
_UniffiConverterOptionalTypeLnurlReceiveMetadata.write(value.lnurl_receive_metadata, buf)
|
|
12392
13817
|
if value.is_withdraw():
|
|
12393
13818
|
buf.write_i32(4)
|
|
12394
13819
|
_UniffiConverterString.write(value.tx_id, buf)
|
|
@@ -13160,22 +14585,24 @@ class SdkError: # type: ignore
|
|
|
13160
14585
|
def __repr__(self):
|
|
13161
14586
|
return "SdkError.ChainServiceError({})".format(str(self))
|
|
13162
14587
|
_UniffiTempSdkError.ChainServiceError = ChainServiceError # type: ignore
|
|
13163
|
-
class
|
|
13164
|
-
def __init__(self, tx, vout, max_fee,
|
|
14588
|
+
class MaxDepositClaimFeeExceeded(_UniffiTempSdkError):
|
|
14589
|
+
def __init__(self, tx, vout, max_fee, required_fee_sats, required_fee_rate_sat_per_vbyte):
|
|
13165
14590
|
super().__init__(", ".join([
|
|
13166
14591
|
"tx={!r}".format(tx),
|
|
13167
14592
|
"vout={!r}".format(vout),
|
|
13168
14593
|
"max_fee={!r}".format(max_fee),
|
|
13169
|
-
"
|
|
14594
|
+
"required_fee_sats={!r}".format(required_fee_sats),
|
|
14595
|
+
"required_fee_rate_sat_per_vbyte={!r}".format(required_fee_rate_sat_per_vbyte),
|
|
13170
14596
|
]))
|
|
13171
14597
|
self.tx = tx
|
|
13172
14598
|
self.vout = vout
|
|
13173
14599
|
self.max_fee = max_fee
|
|
13174
|
-
self.
|
|
14600
|
+
self.required_fee_sats = required_fee_sats
|
|
14601
|
+
self.required_fee_rate_sat_per_vbyte = required_fee_rate_sat_per_vbyte
|
|
13175
14602
|
|
|
13176
14603
|
def __repr__(self):
|
|
13177
|
-
return "SdkError.
|
|
13178
|
-
_UniffiTempSdkError.
|
|
14604
|
+
return "SdkError.MaxDepositClaimFeeExceeded({})".format(str(self))
|
|
14605
|
+
_UniffiTempSdkError.MaxDepositClaimFeeExceeded = MaxDepositClaimFeeExceeded # type: ignore
|
|
13179
14606
|
class MissingUtxo(_UniffiTempSdkError):
|
|
13180
14607
|
def __init__(self, tx, vout):
|
|
13181
14608
|
super().__init__(", ".join([
|
|
@@ -13252,11 +14679,12 @@ class _UniffiConverterTypeSdkError(_UniffiConverterRustBuffer):
|
|
|
13252
14679
|
_UniffiConverterString.read(buf),
|
|
13253
14680
|
)
|
|
13254
14681
|
if variant == 7:
|
|
13255
|
-
return SdkError.
|
|
14682
|
+
return SdkError.MaxDepositClaimFeeExceeded(
|
|
13256
14683
|
_UniffiConverterString.read(buf),
|
|
13257
14684
|
_UniffiConverterUInt32.read(buf),
|
|
13258
14685
|
_UniffiConverterOptionalTypeFee.read(buf),
|
|
13259
14686
|
_UniffiConverterUInt64.read(buf),
|
|
14687
|
+
_UniffiConverterUInt64.read(buf),
|
|
13260
14688
|
)
|
|
13261
14689
|
if variant == 8:
|
|
13262
14690
|
return SdkError.MissingUtxo(
|
|
@@ -13293,11 +14721,12 @@ class _UniffiConverterTypeSdkError(_UniffiConverterRustBuffer):
|
|
|
13293
14721
|
if isinstance(value, SdkError.ChainServiceError):
|
|
13294
14722
|
_UniffiConverterString.check_lower(value._values[0])
|
|
13295
14723
|
return
|
|
13296
|
-
if isinstance(value, SdkError.
|
|
14724
|
+
if isinstance(value, SdkError.MaxDepositClaimFeeExceeded):
|
|
13297
14725
|
_UniffiConverterString.check_lower(value.tx)
|
|
13298
14726
|
_UniffiConverterUInt32.check_lower(value.vout)
|
|
13299
14727
|
_UniffiConverterOptionalTypeFee.check_lower(value.max_fee)
|
|
13300
|
-
_UniffiConverterUInt64.check_lower(value.
|
|
14728
|
+
_UniffiConverterUInt64.check_lower(value.required_fee_sats)
|
|
14729
|
+
_UniffiConverterUInt64.check_lower(value.required_fee_rate_sat_per_vbyte)
|
|
13301
14730
|
return
|
|
13302
14731
|
if isinstance(value, SdkError.MissingUtxo):
|
|
13303
14732
|
_UniffiConverterString.check_lower(value.tx)
|
|
@@ -13330,12 +14759,13 @@ class _UniffiConverterTypeSdkError(_UniffiConverterRustBuffer):
|
|
|
13330
14759
|
if isinstance(value, SdkError.ChainServiceError):
|
|
13331
14760
|
buf.write_i32(6)
|
|
13332
14761
|
_UniffiConverterString.write(value._values[0], buf)
|
|
13333
|
-
if isinstance(value, SdkError.
|
|
14762
|
+
if isinstance(value, SdkError.MaxDepositClaimFeeExceeded):
|
|
13334
14763
|
buf.write_i32(7)
|
|
13335
14764
|
_UniffiConverterString.write(value.tx, buf)
|
|
13336
14765
|
_UniffiConverterUInt32.write(value.vout, buf)
|
|
13337
14766
|
_UniffiConverterOptionalTypeFee.write(value.max_fee, buf)
|
|
13338
|
-
_UniffiConverterUInt64.write(value.
|
|
14767
|
+
_UniffiConverterUInt64.write(value.required_fee_sats, buf)
|
|
14768
|
+
_UniffiConverterUInt64.write(value.required_fee_rate_sat_per_vbyte, buf)
|
|
13339
14769
|
if isinstance(value, SdkError.MissingUtxo):
|
|
13340
14770
|
buf.write_i32(8)
|
|
13341
14771
|
_UniffiConverterString.write(value.tx, buf)
|
|
@@ -13377,30 +14807,6 @@ class SdkEvent:
|
|
|
13377
14807
|
return False
|
|
13378
14808
|
return True
|
|
13379
14809
|
|
|
13380
|
-
class DATA_SYNCED:
|
|
13381
|
-
"""
|
|
13382
|
-
Emitted when data was pushed and/or pulled to/from real-time sync storage.
|
|
13383
|
-
"""
|
|
13384
|
-
|
|
13385
|
-
did_pull_new_records: "bool"
|
|
13386
|
-
"""
|
|
13387
|
-
Value indicating whether new data was pulled through real-time sync.
|
|
13388
|
-
"""
|
|
13389
|
-
|
|
13390
|
-
|
|
13391
|
-
def __init__(self,did_pull_new_records: "bool"):
|
|
13392
|
-
self.did_pull_new_records = did_pull_new_records
|
|
13393
|
-
|
|
13394
|
-
def __str__(self):
|
|
13395
|
-
return "SdkEvent.DATA_SYNCED(did_pull_new_records={})".format(self.did_pull_new_records)
|
|
13396
|
-
|
|
13397
|
-
def __eq__(self, other):
|
|
13398
|
-
if not other.is_data_synced():
|
|
13399
|
-
return False
|
|
13400
|
-
if self.did_pull_new_records != other.did_pull_new_records:
|
|
13401
|
-
return False
|
|
13402
|
-
return True
|
|
13403
|
-
|
|
13404
14810
|
class UNCLAIMED_DEPOSITS:
|
|
13405
14811
|
"""
|
|
13406
14812
|
Emitted when the SDK was unable to claim deposits
|
|
@@ -13491,8 +14897,6 @@ class SdkEvent:
|
|
|
13491
14897
|
# whether an instance is that variant.
|
|
13492
14898
|
def is_synced(self) -> bool:
|
|
13493
14899
|
return isinstance(self, SdkEvent.SYNCED)
|
|
13494
|
-
def is_data_synced(self) -> bool:
|
|
13495
|
-
return isinstance(self, SdkEvent.DATA_SYNCED)
|
|
13496
14900
|
def is_unclaimed_deposits(self) -> bool:
|
|
13497
14901
|
return isinstance(self, SdkEvent.UNCLAIMED_DEPOSITS)
|
|
13498
14902
|
def is_claimed_deposits(self) -> bool:
|
|
@@ -13509,7 +14913,6 @@ class SdkEvent:
|
|
|
13509
14913
|
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
13510
14914
|
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
13511
14915
|
SdkEvent.SYNCED = type("SdkEvent.SYNCED", (SdkEvent.SYNCED, SdkEvent,), {}) # type: ignore
|
|
13512
|
-
SdkEvent.DATA_SYNCED = type("SdkEvent.DATA_SYNCED", (SdkEvent.DATA_SYNCED, SdkEvent,), {}) # type: ignore
|
|
13513
14916
|
SdkEvent.UNCLAIMED_DEPOSITS = type("SdkEvent.UNCLAIMED_DEPOSITS", (SdkEvent.UNCLAIMED_DEPOSITS, SdkEvent,), {}) # type: ignore
|
|
13514
14917
|
SdkEvent.CLAIMED_DEPOSITS = type("SdkEvent.CLAIMED_DEPOSITS", (SdkEvent.CLAIMED_DEPOSITS, SdkEvent,), {}) # type: ignore
|
|
13515
14918
|
SdkEvent.PAYMENT_SUCCEEDED = type("SdkEvent.PAYMENT_SUCCEEDED", (SdkEvent.PAYMENT_SUCCEEDED, SdkEvent,), {}) # type: ignore
|
|
@@ -13527,26 +14930,22 @@ class _UniffiConverterTypeSdkEvent(_UniffiConverterRustBuffer):
|
|
|
13527
14930
|
return SdkEvent.SYNCED(
|
|
13528
14931
|
)
|
|
13529
14932
|
if variant == 2:
|
|
13530
|
-
return SdkEvent.DATA_SYNCED(
|
|
13531
|
-
_UniffiConverterBool.read(buf),
|
|
13532
|
-
)
|
|
13533
|
-
if variant == 3:
|
|
13534
14933
|
return SdkEvent.UNCLAIMED_DEPOSITS(
|
|
13535
14934
|
_UniffiConverterSequenceTypeDepositInfo.read(buf),
|
|
13536
14935
|
)
|
|
13537
|
-
if variant ==
|
|
14936
|
+
if variant == 3:
|
|
13538
14937
|
return SdkEvent.CLAIMED_DEPOSITS(
|
|
13539
14938
|
_UniffiConverterSequenceTypeDepositInfo.read(buf),
|
|
13540
14939
|
)
|
|
13541
|
-
if variant ==
|
|
14940
|
+
if variant == 4:
|
|
13542
14941
|
return SdkEvent.PAYMENT_SUCCEEDED(
|
|
13543
14942
|
_UniffiConverterTypePayment.read(buf),
|
|
13544
14943
|
)
|
|
13545
|
-
if variant ==
|
|
14944
|
+
if variant == 5:
|
|
13546
14945
|
return SdkEvent.PAYMENT_PENDING(
|
|
13547
14946
|
_UniffiConverterTypePayment.read(buf),
|
|
13548
14947
|
)
|
|
13549
|
-
if variant ==
|
|
14948
|
+
if variant == 6:
|
|
13550
14949
|
return SdkEvent.PAYMENT_FAILED(
|
|
13551
14950
|
_UniffiConverterTypePayment.read(buf),
|
|
13552
14951
|
)
|
|
@@ -13556,9 +14955,6 @@ class _UniffiConverterTypeSdkEvent(_UniffiConverterRustBuffer):
|
|
|
13556
14955
|
def check_lower(value):
|
|
13557
14956
|
if value.is_synced():
|
|
13558
14957
|
return
|
|
13559
|
-
if value.is_data_synced():
|
|
13560
|
-
_UniffiConverterBool.check_lower(value.did_pull_new_records)
|
|
13561
|
-
return
|
|
13562
14958
|
if value.is_unclaimed_deposits():
|
|
13563
14959
|
_UniffiConverterSequenceTypeDepositInfo.check_lower(value.unclaimed_deposits)
|
|
13564
14960
|
return
|
|
@@ -13580,23 +14976,20 @@ class _UniffiConverterTypeSdkEvent(_UniffiConverterRustBuffer):
|
|
|
13580
14976
|
def write(value, buf):
|
|
13581
14977
|
if value.is_synced():
|
|
13582
14978
|
buf.write_i32(1)
|
|
13583
|
-
if value.is_data_synced():
|
|
13584
|
-
buf.write_i32(2)
|
|
13585
|
-
_UniffiConverterBool.write(value.did_pull_new_records, buf)
|
|
13586
14979
|
if value.is_unclaimed_deposits():
|
|
13587
|
-
buf.write_i32(
|
|
14980
|
+
buf.write_i32(2)
|
|
13588
14981
|
_UniffiConverterSequenceTypeDepositInfo.write(value.unclaimed_deposits, buf)
|
|
13589
14982
|
if value.is_claimed_deposits():
|
|
13590
|
-
buf.write_i32(
|
|
14983
|
+
buf.write_i32(3)
|
|
13591
14984
|
_UniffiConverterSequenceTypeDepositInfo.write(value.claimed_deposits, buf)
|
|
13592
14985
|
if value.is_payment_succeeded():
|
|
13593
|
-
buf.write_i32(
|
|
14986
|
+
buf.write_i32(4)
|
|
13594
14987
|
_UniffiConverterTypePayment.write(value.payment, buf)
|
|
13595
14988
|
if value.is_payment_pending():
|
|
13596
|
-
buf.write_i32(
|
|
14989
|
+
buf.write_i32(5)
|
|
13597
14990
|
_UniffiConverterTypePayment.write(value.payment, buf)
|
|
13598
14991
|
if value.is_payment_failed():
|
|
13599
|
-
buf.write_i32(
|
|
14992
|
+
buf.write_i32(6)
|
|
13600
14993
|
_UniffiConverterTypePayment.write(value.payment, buf)
|
|
13601
14994
|
|
|
13602
14995
|
|
|
@@ -13998,6 +15391,27 @@ class SendPaymentOptions:
|
|
|
13998
15391
|
return False
|
|
13999
15392
|
return True
|
|
14000
15393
|
|
|
15394
|
+
class SPARK_ADDRESS:
|
|
15395
|
+
htlc_options: "typing.Optional[SparkHtlcOptions]"
|
|
15396
|
+
"""
|
|
15397
|
+
Can only be provided for Bitcoin payments. If set, a Spark HTLC transfer will be created.
|
|
15398
|
+
The receiver will need to provide the preimage to claim it.
|
|
15399
|
+
"""
|
|
15400
|
+
|
|
15401
|
+
|
|
15402
|
+
def __init__(self,htlc_options: "typing.Optional[SparkHtlcOptions]"):
|
|
15403
|
+
self.htlc_options = htlc_options
|
|
15404
|
+
|
|
15405
|
+
def __str__(self):
|
|
15406
|
+
return "SendPaymentOptions.SPARK_ADDRESS(htlc_options={})".format(self.htlc_options)
|
|
15407
|
+
|
|
15408
|
+
def __eq__(self, other):
|
|
15409
|
+
if not other.is_spark_address():
|
|
15410
|
+
return False
|
|
15411
|
+
if self.htlc_options != other.htlc_options:
|
|
15412
|
+
return False
|
|
15413
|
+
return True
|
|
15414
|
+
|
|
14001
15415
|
|
|
14002
15416
|
|
|
14003
15417
|
# For each variant, we have an `is_NAME` method for easily checking
|
|
@@ -14006,6 +15420,8 @@ class SendPaymentOptions:
|
|
|
14006
15420
|
return isinstance(self, SendPaymentOptions.BITCOIN_ADDRESS)
|
|
14007
15421
|
def is_bolt11_invoice(self) -> bool:
|
|
14008
15422
|
return isinstance(self, SendPaymentOptions.BOLT11_INVOICE)
|
|
15423
|
+
def is_spark_address(self) -> bool:
|
|
15424
|
+
return isinstance(self, SendPaymentOptions.SPARK_ADDRESS)
|
|
14009
15425
|
|
|
14010
15426
|
|
|
14011
15427
|
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
@@ -14013,6 +15429,7 @@ class SendPaymentOptions:
|
|
|
14013
15429
|
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
14014
15430
|
SendPaymentOptions.BITCOIN_ADDRESS = type("SendPaymentOptions.BITCOIN_ADDRESS", (SendPaymentOptions.BITCOIN_ADDRESS, SendPaymentOptions,), {}) # type: ignore
|
|
14015
15431
|
SendPaymentOptions.BOLT11_INVOICE = type("SendPaymentOptions.BOLT11_INVOICE", (SendPaymentOptions.BOLT11_INVOICE, SendPaymentOptions,), {}) # type: ignore
|
|
15432
|
+
SendPaymentOptions.SPARK_ADDRESS = type("SendPaymentOptions.SPARK_ADDRESS", (SendPaymentOptions.SPARK_ADDRESS, SendPaymentOptions,), {}) # type: ignore
|
|
14016
15433
|
|
|
14017
15434
|
|
|
14018
15435
|
|
|
@@ -14030,6 +15447,10 @@ class _UniffiConverterTypeSendPaymentOptions(_UniffiConverterRustBuffer):
|
|
|
14030
15447
|
_UniffiConverterBool.read(buf),
|
|
14031
15448
|
_UniffiConverterOptionalUInt32.read(buf),
|
|
14032
15449
|
)
|
|
15450
|
+
if variant == 3:
|
|
15451
|
+
return SendPaymentOptions.SPARK_ADDRESS(
|
|
15452
|
+
_UniffiConverterOptionalTypeSparkHtlcOptions.read(buf),
|
|
15453
|
+
)
|
|
14033
15454
|
raise InternalError("Raw enum value doesn't match any cases")
|
|
14034
15455
|
|
|
14035
15456
|
@staticmethod
|
|
@@ -14041,6 +15462,9 @@ class _UniffiConverterTypeSendPaymentOptions(_UniffiConverterRustBuffer):
|
|
|
14041
15462
|
_UniffiConverterBool.check_lower(value.prefer_spark)
|
|
14042
15463
|
_UniffiConverterOptionalUInt32.check_lower(value.completion_timeout_secs)
|
|
14043
15464
|
return
|
|
15465
|
+
if value.is_spark_address():
|
|
15466
|
+
_UniffiConverterOptionalTypeSparkHtlcOptions.check_lower(value.htlc_options)
|
|
15467
|
+
return
|
|
14044
15468
|
raise ValueError(value)
|
|
14045
15469
|
|
|
14046
15470
|
@staticmethod
|
|
@@ -14052,6 +15476,9 @@ class _UniffiConverterTypeSendPaymentOptions(_UniffiConverterRustBuffer):
|
|
|
14052
15476
|
buf.write_i32(2)
|
|
14053
15477
|
_UniffiConverterBool.write(value.prefer_spark, buf)
|
|
14054
15478
|
_UniffiConverterOptionalUInt32.write(value.completion_timeout_secs, buf)
|
|
15479
|
+
if value.is_spark_address():
|
|
15480
|
+
buf.write_i32(3)
|
|
15481
|
+
_UniffiConverterOptionalTypeSparkHtlcOptions.write(value.htlc_options, buf)
|
|
14055
15482
|
|
|
14056
15483
|
|
|
14057
15484
|
|
|
@@ -14336,6 +15763,64 @@ class _UniffiConverterTypeServiceConnectivityError(_UniffiConverterRustBuffer):
|
|
|
14336
15763
|
_UniffiConverterString.write(value._values[0], buf)
|
|
14337
15764
|
|
|
14338
15765
|
|
|
15766
|
+
|
|
15767
|
+
|
|
15768
|
+
|
|
15769
|
+
class SparkHtlcStatus(enum.Enum):
|
|
15770
|
+
WAITING_FOR_PREIMAGE = 0
|
|
15771
|
+
"""
|
|
15772
|
+
The HTLC is waiting for the preimage to be shared by the receiver
|
|
15773
|
+
"""
|
|
15774
|
+
|
|
15775
|
+
|
|
15776
|
+
PREIMAGE_SHARED = 1
|
|
15777
|
+
"""
|
|
15778
|
+
The HTLC preimage has been shared and the transfer can be or has been claimed by the receiver
|
|
15779
|
+
"""
|
|
15780
|
+
|
|
15781
|
+
|
|
15782
|
+
RETURNED = 2
|
|
15783
|
+
"""
|
|
15784
|
+
The HTLC has been returned to the sender due to expiry
|
|
15785
|
+
"""
|
|
15786
|
+
|
|
15787
|
+
|
|
15788
|
+
|
|
15789
|
+
|
|
15790
|
+
class _UniffiConverterTypeSparkHtlcStatus(_UniffiConverterRustBuffer):
|
|
15791
|
+
@staticmethod
|
|
15792
|
+
def read(buf):
|
|
15793
|
+
variant = buf.read_i32()
|
|
15794
|
+
if variant == 1:
|
|
15795
|
+
return SparkHtlcStatus.WAITING_FOR_PREIMAGE
|
|
15796
|
+
if variant == 2:
|
|
15797
|
+
return SparkHtlcStatus.PREIMAGE_SHARED
|
|
15798
|
+
if variant == 3:
|
|
15799
|
+
return SparkHtlcStatus.RETURNED
|
|
15800
|
+
raise InternalError("Raw enum value doesn't match any cases")
|
|
15801
|
+
|
|
15802
|
+
@staticmethod
|
|
15803
|
+
def check_lower(value):
|
|
15804
|
+
if value == SparkHtlcStatus.WAITING_FOR_PREIMAGE:
|
|
15805
|
+
return
|
|
15806
|
+
if value == SparkHtlcStatus.PREIMAGE_SHARED:
|
|
15807
|
+
return
|
|
15808
|
+
if value == SparkHtlcStatus.RETURNED:
|
|
15809
|
+
return
|
|
15810
|
+
raise ValueError(value)
|
|
15811
|
+
|
|
15812
|
+
@staticmethod
|
|
15813
|
+
def write(value, buf):
|
|
15814
|
+
if value == SparkHtlcStatus.WAITING_FOR_PREIMAGE:
|
|
15815
|
+
buf.write_i32(1)
|
|
15816
|
+
if value == SparkHtlcStatus.PREIMAGE_SHARED:
|
|
15817
|
+
buf.write_i32(2)
|
|
15818
|
+
if value == SparkHtlcStatus.RETURNED:
|
|
15819
|
+
buf.write_i32(3)
|
|
15820
|
+
|
|
15821
|
+
|
|
15822
|
+
|
|
15823
|
+
|
|
14339
15824
|
# StorageError
|
|
14340
15825
|
# We want to define each variant as a nested class that's also a subclass,
|
|
14341
15826
|
# which is tricky in Python. To accomplish this we're going to create each
|
|
@@ -14960,105 +16445,6 @@ class _UniffiConverterTypeUpdateDepositPayload(_UniffiConverterRustBuffer):
|
|
|
14960
16445
|
|
|
14961
16446
|
|
|
14962
16447
|
|
|
14963
|
-
|
|
14964
|
-
|
|
14965
|
-
class WaitForPaymentIdentifier:
|
|
14966
|
-
def __init__(self):
|
|
14967
|
-
raise RuntimeError("WaitForPaymentIdentifier cannot be instantiated directly")
|
|
14968
|
-
|
|
14969
|
-
# Each enum variant is a nested class of the enum itself.
|
|
14970
|
-
class PAYMENT_ID:
|
|
14971
|
-
def __init__(self, *values):
|
|
14972
|
-
if len(values) != 1:
|
|
14973
|
-
raise TypeError(f"Expected 1 arguments, found {len(values)}")
|
|
14974
|
-
if not isinstance(values[0], str):
|
|
14975
|
-
raise TypeError(f"unexpected type for tuple element 0 - expected 'str', got '{type(values[0])}'")
|
|
14976
|
-
self._values = values
|
|
14977
|
-
|
|
14978
|
-
def __getitem__(self, index):
|
|
14979
|
-
return self._values[index]
|
|
14980
|
-
|
|
14981
|
-
def __str__(self):
|
|
14982
|
-
return f"WaitForPaymentIdentifier.PAYMENT_ID{self._values!r}"
|
|
14983
|
-
|
|
14984
|
-
def __eq__(self, other):
|
|
14985
|
-
if not other.is_payment_id():
|
|
14986
|
-
return False
|
|
14987
|
-
return self._values == other._values
|
|
14988
|
-
class PAYMENT_REQUEST:
|
|
14989
|
-
def __init__(self, *values):
|
|
14990
|
-
if len(values) != 1:
|
|
14991
|
-
raise TypeError(f"Expected 1 arguments, found {len(values)}")
|
|
14992
|
-
if not isinstance(values[0], str):
|
|
14993
|
-
raise TypeError(f"unexpected type for tuple element 0 - expected 'str', got '{type(values[0])}'")
|
|
14994
|
-
self._values = values
|
|
14995
|
-
|
|
14996
|
-
def __getitem__(self, index):
|
|
14997
|
-
return self._values[index]
|
|
14998
|
-
|
|
14999
|
-
def __str__(self):
|
|
15000
|
-
return f"WaitForPaymentIdentifier.PAYMENT_REQUEST{self._values!r}"
|
|
15001
|
-
|
|
15002
|
-
def __eq__(self, other):
|
|
15003
|
-
if not other.is_payment_request():
|
|
15004
|
-
return False
|
|
15005
|
-
return self._values == other._values
|
|
15006
|
-
|
|
15007
|
-
|
|
15008
|
-
# For each variant, we have an `is_NAME` method for easily checking
|
|
15009
|
-
# whether an instance is that variant.
|
|
15010
|
-
def is_payment_id(self) -> bool:
|
|
15011
|
-
return isinstance(self, WaitForPaymentIdentifier.PAYMENT_ID)
|
|
15012
|
-
def is_payment_request(self) -> bool:
|
|
15013
|
-
return isinstance(self, WaitForPaymentIdentifier.PAYMENT_REQUEST)
|
|
15014
|
-
|
|
15015
|
-
|
|
15016
|
-
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
15017
|
-
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
15018
|
-
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
15019
|
-
WaitForPaymentIdentifier.PAYMENT_ID = type("WaitForPaymentIdentifier.PAYMENT_ID", (WaitForPaymentIdentifier.PAYMENT_ID, WaitForPaymentIdentifier,), {}) # type: ignore
|
|
15020
|
-
WaitForPaymentIdentifier.PAYMENT_REQUEST = type("WaitForPaymentIdentifier.PAYMENT_REQUEST", (WaitForPaymentIdentifier.PAYMENT_REQUEST, WaitForPaymentIdentifier,), {}) # type: ignore
|
|
15021
|
-
|
|
15022
|
-
|
|
15023
|
-
|
|
15024
|
-
|
|
15025
|
-
class _UniffiConverterTypeWaitForPaymentIdentifier(_UniffiConverterRustBuffer):
|
|
15026
|
-
@staticmethod
|
|
15027
|
-
def read(buf):
|
|
15028
|
-
variant = buf.read_i32()
|
|
15029
|
-
if variant == 1:
|
|
15030
|
-
return WaitForPaymentIdentifier.PAYMENT_ID(
|
|
15031
|
-
_UniffiConverterString.read(buf),
|
|
15032
|
-
)
|
|
15033
|
-
if variant == 2:
|
|
15034
|
-
return WaitForPaymentIdentifier.PAYMENT_REQUEST(
|
|
15035
|
-
_UniffiConverterString.read(buf),
|
|
15036
|
-
)
|
|
15037
|
-
raise InternalError("Raw enum value doesn't match any cases")
|
|
15038
|
-
|
|
15039
|
-
@staticmethod
|
|
15040
|
-
def check_lower(value):
|
|
15041
|
-
if value.is_payment_id():
|
|
15042
|
-
_UniffiConverterString.check_lower(value._values[0])
|
|
15043
|
-
return
|
|
15044
|
-
if value.is_payment_request():
|
|
15045
|
-
_UniffiConverterString.check_lower(value._values[0])
|
|
15046
|
-
return
|
|
15047
|
-
raise ValueError(value)
|
|
15048
|
-
|
|
15049
|
-
@staticmethod
|
|
15050
|
-
def write(value, buf):
|
|
15051
|
-
if value.is_payment_id():
|
|
15052
|
-
buf.write_i32(1)
|
|
15053
|
-
_UniffiConverterString.write(value._values[0], buf)
|
|
15054
|
-
if value.is_payment_request():
|
|
15055
|
-
buf.write_i32(2)
|
|
15056
|
-
_UniffiConverterString.write(value._values[0], buf)
|
|
15057
|
-
|
|
15058
|
-
|
|
15059
|
-
|
|
15060
|
-
|
|
15061
|
-
|
|
15062
16448
|
class EventListener(typing.Protocol):
|
|
15063
16449
|
"""
|
|
15064
16450
|
Trait for event listeners
|
|
@@ -15363,6 +16749,33 @@ class _UniffiConverterOptionalTypeLnurlPayInfo(_UniffiConverterRustBuffer):
|
|
|
15363
16749
|
|
|
15364
16750
|
|
|
15365
16751
|
|
|
16752
|
+
class _UniffiConverterOptionalTypeLnurlReceiveMetadata(_UniffiConverterRustBuffer):
|
|
16753
|
+
@classmethod
|
|
16754
|
+
def check_lower(cls, value):
|
|
16755
|
+
if value is not None:
|
|
16756
|
+
_UniffiConverterTypeLnurlReceiveMetadata.check_lower(value)
|
|
16757
|
+
|
|
16758
|
+
@classmethod
|
|
16759
|
+
def write(cls, value, buf):
|
|
16760
|
+
if value is None:
|
|
16761
|
+
buf.write_u8(0)
|
|
16762
|
+
return
|
|
16763
|
+
|
|
16764
|
+
buf.write_u8(1)
|
|
16765
|
+
_UniffiConverterTypeLnurlReceiveMetadata.write(value, buf)
|
|
16766
|
+
|
|
16767
|
+
@classmethod
|
|
16768
|
+
def read(cls, buf):
|
|
16769
|
+
flag = buf.read_u8()
|
|
16770
|
+
if flag == 0:
|
|
16771
|
+
return None
|
|
16772
|
+
elif flag == 1:
|
|
16773
|
+
return _UniffiConverterTypeLnurlReceiveMetadata.read(buf)
|
|
16774
|
+
else:
|
|
16775
|
+
raise InternalError("Unexpected flag byte for optional type")
|
|
16776
|
+
|
|
16777
|
+
|
|
16778
|
+
|
|
15366
16779
|
class _UniffiConverterOptionalTypeLnurlWithdrawInfo(_UniffiConverterRustBuffer):
|
|
15367
16780
|
@classmethod
|
|
15368
16781
|
def check_lower(cls, value):
|
|
@@ -15471,6 +16884,60 @@ class _UniffiConverterOptionalTypeRecord(_UniffiConverterRustBuffer):
|
|
|
15471
16884
|
|
|
15472
16885
|
|
|
15473
16886
|
|
|
16887
|
+
class _UniffiConverterOptionalTypeSparkHtlcDetails(_UniffiConverterRustBuffer):
|
|
16888
|
+
@classmethod
|
|
16889
|
+
def check_lower(cls, value):
|
|
16890
|
+
if value is not None:
|
|
16891
|
+
_UniffiConverterTypeSparkHtlcDetails.check_lower(value)
|
|
16892
|
+
|
|
16893
|
+
@classmethod
|
|
16894
|
+
def write(cls, value, buf):
|
|
16895
|
+
if value is None:
|
|
16896
|
+
buf.write_u8(0)
|
|
16897
|
+
return
|
|
16898
|
+
|
|
16899
|
+
buf.write_u8(1)
|
|
16900
|
+
_UniffiConverterTypeSparkHtlcDetails.write(value, buf)
|
|
16901
|
+
|
|
16902
|
+
@classmethod
|
|
16903
|
+
def read(cls, buf):
|
|
16904
|
+
flag = buf.read_u8()
|
|
16905
|
+
if flag == 0:
|
|
16906
|
+
return None
|
|
16907
|
+
elif flag == 1:
|
|
16908
|
+
return _UniffiConverterTypeSparkHtlcDetails.read(buf)
|
|
16909
|
+
else:
|
|
16910
|
+
raise InternalError("Unexpected flag byte for optional type")
|
|
16911
|
+
|
|
16912
|
+
|
|
16913
|
+
|
|
16914
|
+
class _UniffiConverterOptionalTypeSparkHtlcOptions(_UniffiConverterRustBuffer):
|
|
16915
|
+
@classmethod
|
|
16916
|
+
def check_lower(cls, value):
|
|
16917
|
+
if value is not None:
|
|
16918
|
+
_UniffiConverterTypeSparkHtlcOptions.check_lower(value)
|
|
16919
|
+
|
|
16920
|
+
@classmethod
|
|
16921
|
+
def write(cls, value, buf):
|
|
16922
|
+
if value is None:
|
|
16923
|
+
buf.write_u8(0)
|
|
16924
|
+
return
|
|
16925
|
+
|
|
16926
|
+
buf.write_u8(1)
|
|
16927
|
+
_UniffiConverterTypeSparkHtlcOptions.write(value, buf)
|
|
16928
|
+
|
|
16929
|
+
@classmethod
|
|
16930
|
+
def read(cls, buf):
|
|
16931
|
+
flag = buf.read_u8()
|
|
16932
|
+
if flag == 0:
|
|
16933
|
+
return None
|
|
16934
|
+
elif flag == 1:
|
|
16935
|
+
return _UniffiConverterTypeSparkHtlcOptions.read(buf)
|
|
16936
|
+
else:
|
|
16937
|
+
raise InternalError("Unexpected flag byte for optional type")
|
|
16938
|
+
|
|
16939
|
+
|
|
16940
|
+
|
|
15474
16941
|
class _UniffiConverterOptionalTypeSparkInvoicePaymentDetails(_UniffiConverterRustBuffer):
|
|
15475
16942
|
@classmethod
|
|
15476
16943
|
def check_lower(cls, value):
|
|
@@ -15633,6 +17100,33 @@ class _UniffiConverterOptionalTypeFee(_UniffiConverterRustBuffer):
|
|
|
15633
17100
|
|
|
15634
17101
|
|
|
15635
17102
|
|
|
17103
|
+
class _UniffiConverterOptionalTypeMaxFee(_UniffiConverterRustBuffer):
|
|
17104
|
+
@classmethod
|
|
17105
|
+
def check_lower(cls, value):
|
|
17106
|
+
if value is not None:
|
|
17107
|
+
_UniffiConverterTypeMaxFee.check_lower(value)
|
|
17108
|
+
|
|
17109
|
+
@classmethod
|
|
17110
|
+
def write(cls, value, buf):
|
|
17111
|
+
if value is None:
|
|
17112
|
+
buf.write_u8(0)
|
|
17113
|
+
return
|
|
17114
|
+
|
|
17115
|
+
buf.write_u8(1)
|
|
17116
|
+
_UniffiConverterTypeMaxFee.write(value, buf)
|
|
17117
|
+
|
|
17118
|
+
@classmethod
|
|
17119
|
+
def read(cls, buf):
|
|
17120
|
+
flag = buf.read_u8()
|
|
17121
|
+
if flag == 0:
|
|
17122
|
+
return None
|
|
17123
|
+
elif flag == 1:
|
|
17124
|
+
return _UniffiConverterTypeMaxFee.read(buf)
|
|
17125
|
+
else:
|
|
17126
|
+
raise InternalError("Unexpected flag byte for optional type")
|
|
17127
|
+
|
|
17128
|
+
|
|
17129
|
+
|
|
15636
17130
|
class _UniffiConverterOptionalTypePaymentDetails(_UniffiConverterRustBuffer):
|
|
15637
17131
|
@classmethod
|
|
15638
17132
|
def check_lower(cls, value):
|
|
@@ -15849,6 +17343,33 @@ class _UniffiConverterOptionalSequenceTypePaymentType(_UniffiConverterRustBuffer
|
|
|
15849
17343
|
|
|
15850
17344
|
|
|
15851
17345
|
|
|
17346
|
+
class _UniffiConverterOptionalSequenceTypeSparkHtlcStatus(_UniffiConverterRustBuffer):
|
|
17347
|
+
@classmethod
|
|
17348
|
+
def check_lower(cls, value):
|
|
17349
|
+
if value is not None:
|
|
17350
|
+
_UniffiConverterSequenceTypeSparkHtlcStatus.check_lower(value)
|
|
17351
|
+
|
|
17352
|
+
@classmethod
|
|
17353
|
+
def write(cls, value, buf):
|
|
17354
|
+
if value is None:
|
|
17355
|
+
buf.write_u8(0)
|
|
17356
|
+
return
|
|
17357
|
+
|
|
17358
|
+
buf.write_u8(1)
|
|
17359
|
+
_UniffiConverterSequenceTypeSparkHtlcStatus.write(value, buf)
|
|
17360
|
+
|
|
17361
|
+
@classmethod
|
|
17362
|
+
def read(cls, buf):
|
|
17363
|
+
flag = buf.read_u8()
|
|
17364
|
+
if flag == 0:
|
|
17365
|
+
return None
|
|
17366
|
+
elif flag == 1:
|
|
17367
|
+
return _UniffiConverterSequenceTypeSparkHtlcStatus.read(buf)
|
|
17368
|
+
else:
|
|
17369
|
+
raise InternalError("Unexpected flag byte for optional type")
|
|
17370
|
+
|
|
17371
|
+
|
|
17372
|
+
|
|
15852
17373
|
class _UniffiConverterOptionalMapStringString(_UniffiConverterRustBuffer):
|
|
15853
17374
|
@classmethod
|
|
15854
17375
|
def check_lower(cls, value):
|
|
@@ -16303,6 +17824,31 @@ class _UniffiConverterSequenceTypeRecord(_UniffiConverterRustBuffer):
|
|
|
16303
17824
|
|
|
16304
17825
|
|
|
16305
17826
|
|
|
17827
|
+
class _UniffiConverterSequenceTypeSetLnurlMetadataItem(_UniffiConverterRustBuffer):
|
|
17828
|
+
@classmethod
|
|
17829
|
+
def check_lower(cls, value):
|
|
17830
|
+
for item in value:
|
|
17831
|
+
_UniffiConverterTypeSetLnurlMetadataItem.check_lower(item)
|
|
17832
|
+
|
|
17833
|
+
@classmethod
|
|
17834
|
+
def write(cls, value, buf):
|
|
17835
|
+
items = len(value)
|
|
17836
|
+
buf.write_i32(items)
|
|
17837
|
+
for item in value:
|
|
17838
|
+
_UniffiConverterTypeSetLnurlMetadataItem.write(item, buf)
|
|
17839
|
+
|
|
17840
|
+
@classmethod
|
|
17841
|
+
def read(cls, buf):
|
|
17842
|
+
count = buf.read_i32()
|
|
17843
|
+
if count < 0:
|
|
17844
|
+
raise InternalError("Unexpected negative sequence length")
|
|
17845
|
+
|
|
17846
|
+
return [
|
|
17847
|
+
_UniffiConverterTypeSetLnurlMetadataItem.read(buf) for i in range(count)
|
|
17848
|
+
]
|
|
17849
|
+
|
|
17850
|
+
|
|
17851
|
+
|
|
16306
17852
|
class _UniffiConverterSequenceTypeTokenMetadata(_UniffiConverterRustBuffer):
|
|
16307
17853
|
@classmethod
|
|
16308
17854
|
def check_lower(cls, value):
|
|
@@ -16428,6 +17974,31 @@ class _UniffiConverterSequenceTypePaymentType(_UniffiConverterRustBuffer):
|
|
|
16428
17974
|
|
|
16429
17975
|
|
|
16430
17976
|
|
|
17977
|
+
class _UniffiConverterSequenceTypeSparkHtlcStatus(_UniffiConverterRustBuffer):
|
|
17978
|
+
@classmethod
|
|
17979
|
+
def check_lower(cls, value):
|
|
17980
|
+
for item in value:
|
|
17981
|
+
_UniffiConverterTypeSparkHtlcStatus.check_lower(item)
|
|
17982
|
+
|
|
17983
|
+
@classmethod
|
|
17984
|
+
def write(cls, value, buf):
|
|
17985
|
+
items = len(value)
|
|
17986
|
+
buf.write_i32(items)
|
|
17987
|
+
for item in value:
|
|
17988
|
+
_UniffiConverterTypeSparkHtlcStatus.write(item, buf)
|
|
17989
|
+
|
|
17990
|
+
@classmethod
|
|
17991
|
+
def read(cls, buf):
|
|
17992
|
+
count = buf.read_i32()
|
|
17993
|
+
if count < 0:
|
|
17994
|
+
raise InternalError("Unexpected negative sequence length")
|
|
17995
|
+
|
|
17996
|
+
return [
|
|
17997
|
+
_UniffiConverterTypeSparkHtlcStatus.read(buf) for i in range(count)
|
|
17998
|
+
]
|
|
17999
|
+
|
|
18000
|
+
|
|
18001
|
+
|
|
16431
18002
|
class _UniffiConverterMapStringString(_UniffiConverterRustBuffer):
|
|
16432
18003
|
@classmethod
|
|
16433
18004
|
def check_lower(cls, items):
|
|
@@ -16687,11 +18258,13 @@ __all__ = [
|
|
|
16687
18258
|
"Amount",
|
|
16688
18259
|
"AssetFilter",
|
|
16689
18260
|
"BitcoinNetwork",
|
|
18261
|
+
"ChainApiType",
|
|
16690
18262
|
"ChainServiceError",
|
|
16691
18263
|
"DepositClaimError",
|
|
16692
18264
|
"Fee",
|
|
16693
18265
|
"InputType",
|
|
16694
18266
|
"KeySetType",
|
|
18267
|
+
"MaxFee",
|
|
16695
18268
|
"Network",
|
|
16696
18269
|
"OnchainConfirmationSpeed",
|
|
16697
18270
|
"PaymentDetails",
|
|
@@ -16707,12 +18280,12 @@ __all__ = [
|
|
|
16707
18280
|
"SendPaymentMethod",
|
|
16708
18281
|
"SendPaymentOptions",
|
|
16709
18282
|
"ServiceConnectivityError",
|
|
18283
|
+
"SparkHtlcStatus",
|
|
16710
18284
|
"StorageError",
|
|
16711
18285
|
"SuccessAction",
|
|
16712
18286
|
"SuccessActionProcessed",
|
|
16713
18287
|
"SyncStorageError",
|
|
16714
18288
|
"UpdateDepositPayload",
|
|
16715
|
-
"WaitForPaymentIdentifier",
|
|
16716
18289
|
"AesSuccessActionData",
|
|
16717
18290
|
"AesSuccessActionDataDecrypted",
|
|
16718
18291
|
"Bip21Details",
|
|
@@ -16728,18 +18301,24 @@ __all__ = [
|
|
|
16728
18301
|
"Bolt12Offer",
|
|
16729
18302
|
"Bolt12OfferBlindedPath",
|
|
16730
18303
|
"Bolt12OfferDetails",
|
|
18304
|
+
"BurnIssuerTokenRequest",
|
|
16731
18305
|
"CheckLightningAddressRequest",
|
|
16732
18306
|
"CheckMessageRequest",
|
|
16733
18307
|
"CheckMessageResponse",
|
|
16734
18308
|
"ClaimDepositRequest",
|
|
16735
18309
|
"ClaimDepositResponse",
|
|
18310
|
+
"ClaimHtlcPaymentRequest",
|
|
18311
|
+
"ClaimHtlcPaymentResponse",
|
|
16736
18312
|
"Config",
|
|
16737
18313
|
"ConnectRequest",
|
|
18314
|
+
"CreateIssuerTokenRequest",
|
|
16738
18315
|
"Credentials",
|
|
16739
18316
|
"CurrencyInfo",
|
|
16740
18317
|
"DepositInfo",
|
|
16741
18318
|
"ExternalInputParser",
|
|
16742
18319
|
"FiatCurrency",
|
|
18320
|
+
"FreezeIssuerTokenRequest",
|
|
18321
|
+
"FreezeIssuerTokenResponse",
|
|
16743
18322
|
"GetInfoRequest",
|
|
16744
18323
|
"GetInfoResponse",
|
|
16745
18324
|
"GetPaymentRequest",
|
|
@@ -16760,6 +18339,7 @@ __all__ = [
|
|
|
16760
18339
|
"LnurlPayRequest",
|
|
16761
18340
|
"LnurlPayRequestDetails",
|
|
16762
18341
|
"LnurlPayResponse",
|
|
18342
|
+
"LnurlReceiveMetadata",
|
|
16763
18343
|
"LnurlWithdrawInfo",
|
|
16764
18344
|
"LnurlWithdrawRequest",
|
|
16765
18345
|
"LnurlWithdrawRequestDetails",
|
|
@@ -16768,6 +18348,7 @@ __all__ = [
|
|
|
16768
18348
|
"LocalizedName",
|
|
16769
18349
|
"LogEntry",
|
|
16770
18350
|
"MessageSuccessActionData",
|
|
18351
|
+
"MintIssuerTokenRequest",
|
|
16771
18352
|
"OutgoingChange",
|
|
16772
18353
|
"Payment",
|
|
16773
18354
|
"PaymentMetadata",
|
|
@@ -16780,6 +18361,7 @@ __all__ = [
|
|
|
16780
18361
|
"Rate",
|
|
16781
18362
|
"ReceivePaymentRequest",
|
|
16782
18363
|
"ReceivePaymentResponse",
|
|
18364
|
+
"RecommendedFees",
|
|
16783
18365
|
"Record",
|
|
16784
18366
|
"RecordChange",
|
|
16785
18367
|
"RecordId",
|
|
@@ -16791,10 +18373,13 @@ __all__ = [
|
|
|
16791
18373
|
"SendOnchainSpeedFeeQuote",
|
|
16792
18374
|
"SendPaymentRequest",
|
|
16793
18375
|
"SendPaymentResponse",
|
|
18376
|
+
"SetLnurlMetadataItem",
|
|
16794
18377
|
"SignMessageRequest",
|
|
16795
18378
|
"SignMessageResponse",
|
|
16796
18379
|
"SilentPaymentAddressDetails",
|
|
16797
18380
|
"SparkAddressDetails",
|
|
18381
|
+
"SparkHtlcDetails",
|
|
18382
|
+
"SparkHtlcOptions",
|
|
16798
18383
|
"SparkInvoiceDetails",
|
|
16799
18384
|
"SparkInvoicePaymentDetails",
|
|
16800
18385
|
"Symbol",
|
|
@@ -16803,13 +18388,13 @@ __all__ = [
|
|
|
16803
18388
|
"TokenBalance",
|
|
16804
18389
|
"TokenMetadata",
|
|
16805
18390
|
"TxStatus",
|
|
18391
|
+
"UnfreezeIssuerTokenRequest",
|
|
18392
|
+
"UnfreezeIssuerTokenResponse",
|
|
16806
18393
|
"UnversionedRecordChange",
|
|
16807
18394
|
"UpdateUserSettingsRequest",
|
|
16808
18395
|
"UrlSuccessActionData",
|
|
16809
18396
|
"UserSettings",
|
|
16810
18397
|
"Utxo",
|
|
16811
|
-
"WaitForPaymentRequest",
|
|
16812
|
-
"WaitForPaymentResponse",
|
|
16813
18398
|
"connect",
|
|
16814
18399
|
"default_config",
|
|
16815
18400
|
"init_logging",
|
|
@@ -16821,6 +18406,7 @@ __all__ = [
|
|
|
16821
18406
|
"SdkBuilder",
|
|
16822
18407
|
"Storage",
|
|
16823
18408
|
"SyncStorage",
|
|
18409
|
+
"TokenIssuer",
|
|
16824
18410
|
"EventListener",
|
|
16825
18411
|
"Logger",
|
|
16826
18412
|
]
|