breez-sdk-spark 0.7.0.dev1__cp310-cp310-manylinux_2_31_x86_64.whl → 0.7.10__cp310-cp310-manylinux_2_31_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- breez_sdk_spark/breez_sdk_spark.py +1581 -775
- breez_sdk_spark/libbreez_sdk_spark_bindings.so +0 -0
- {breez_sdk_spark-0.7.0.dev1.dist-info → breez_sdk_spark-0.7.10.dist-info}/METADATA +1 -1
- breez_sdk_spark-0.7.10.dist-info/RECORD +8 -0
- breez_sdk_spark-0.7.0.dev1.dist-info/RECORD +0 -8
- {breez_sdk_spark-0.7.0.dev1.dist-info → breez_sdk_spark-0.7.10.dist-info}/WHEEL +0 -0
- {breez_sdk_spark-0.7.0.dev1.dist-info → breez_sdk_spark-0.7.10.dist-info}/top_level.txt +0 -0
|
@@ -497,7 +497,7 @@ def _uniffi_check_api_checksums(lib):
|
|
|
497
497
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
498
498
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_disconnect() != 330:
|
|
499
499
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
500
|
-
if lib.
|
|
500
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_fetch_conversion_limits() != 50958:
|
|
501
501
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
502
502
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_info() != 6771:
|
|
503
503
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
@@ -521,6 +521,8 @@ def _uniffi_check_api_checksums(lib):
|
|
|
521
521
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
522
522
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_unclaimed_deposits() != 22486:
|
|
523
523
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
524
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_auth() != 37942:
|
|
525
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
524
526
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay() != 10147:
|
|
525
527
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
526
528
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_withdraw() != 45652:
|
|
@@ -551,43 +553,45 @@ def _uniffi_check_api_checksums(lib):
|
|
|
551
553
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
552
554
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_update_user_settings() != 1721:
|
|
553
555
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
554
|
-
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_identity_public_key() !=
|
|
556
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_identity_public_key() != 62941:
|
|
555
557
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
556
|
-
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_derive_public_key() !=
|
|
558
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_derive_public_key() != 23137:
|
|
557
559
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
558
|
-
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_ecdsa() !=
|
|
560
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_ecdsa() != 37648:
|
|
559
561
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
560
|
-
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_ecdsa_recoverable() !=
|
|
562
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_ecdsa_recoverable() != 3107:
|
|
561
563
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
562
|
-
if lib.
|
|
564
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_ecies() != 60224:
|
|
563
565
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
564
|
-
if lib.
|
|
566
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_decrypt_ecies() != 59601:
|
|
565
567
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
566
568
|
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_hash_schnorr() != 57220:
|
|
567
569
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
568
|
-
if lib.
|
|
570
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_hmac_sha256() != 57517:
|
|
571
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
572
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_signing_commitment() != 31862:
|
|
569
573
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
570
|
-
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_get_public_key_for_node() !=
|
|
574
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_get_public_key_for_node() != 37434:
|
|
571
575
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
572
|
-
if lib.
|
|
576
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_secret() != 26114:
|
|
573
577
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
574
|
-
if lib.
|
|
578
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret_encrypted() != 38925:
|
|
575
579
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
576
|
-
if lib.
|
|
580
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret() != 45280:
|
|
577
581
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
578
|
-
if lib.
|
|
582
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_signing_key() != 62519:
|
|
579
583
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
580
|
-
if lib.
|
|
584
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_subtract_secrets() != 51106:
|
|
581
585
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
582
|
-
if lib.
|
|
586
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_split_secret_with_proofs() != 19489:
|
|
583
587
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
584
|
-
if lib.
|
|
588
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_secret_for_receiver() != 51627:
|
|
585
589
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
586
|
-
if lib.
|
|
590
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_public_key_from_secret() != 53055:
|
|
587
591
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
588
|
-
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_frost() !=
|
|
592
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_frost() != 20635:
|
|
589
593
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
590
|
-
if lib.
|
|
594
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_aggregate_frost() != 53544:
|
|
591
595
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
592
596
|
if lib.uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies() != 19092:
|
|
593
597
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
@@ -823,30 +827,32 @@ _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD5 = ctypes.CFUNCTYPE(None,ctype
|
|
|
823
827
|
)
|
|
824
828
|
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD6 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
825
829
|
)
|
|
826
|
-
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD7 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
830
|
+
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD7 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
827
831
|
)
|
|
828
|
-
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD8 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,
|
|
832
|
+
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD8 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
829
833
|
)
|
|
830
|
-
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD9 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
834
|
+
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD9 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
831
835
|
)
|
|
832
|
-
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD10 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,
|
|
836
|
+
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD10 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
833
837
|
)
|
|
834
838
|
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD11 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,ctypes.c_uint32,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
835
839
|
)
|
|
836
840
|
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD12 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,ctypes.c_uint32,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
837
841
|
)
|
|
838
|
-
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD13 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,
|
|
842
|
+
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD13 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,ctypes.c_uint32,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
839
843
|
)
|
|
840
|
-
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD14 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,
|
|
844
|
+
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD14 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
841
845
|
)
|
|
842
|
-
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD15 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,
|
|
846
|
+
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD15 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,ctypes.c_uint32,ctypes.c_uint32,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
843
847
|
)
|
|
844
|
-
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD16 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
848
|
+
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD16 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
845
849
|
)
|
|
846
850
|
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD17 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
847
851
|
)
|
|
848
852
|
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD18 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
849
853
|
)
|
|
854
|
+
_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD19 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
855
|
+
)
|
|
850
856
|
_UNIFFI_CALLBACK_INTERFACE_FIAT_SERVICE_METHOD0 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
851
857
|
)
|
|
852
858
|
_UNIFFI_CALLBACK_INTERFACE_FIAT_SERVICE_METHOD1 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
@@ -930,21 +936,22 @@ class _UniffiVTableCallbackInterfaceExternalSigner(ctypes.Structure):
|
|
|
930
936
|
("derive_public_key", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD1),
|
|
931
937
|
("sign_ecdsa", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD2),
|
|
932
938
|
("sign_ecdsa_recoverable", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD3),
|
|
933
|
-
("
|
|
934
|
-
("
|
|
939
|
+
("encrypt_ecies", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD4),
|
|
940
|
+
("decrypt_ecies", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD5),
|
|
935
941
|
("sign_hash_schnorr", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD6),
|
|
936
|
-
("
|
|
937
|
-
("
|
|
938
|
-
("
|
|
939
|
-
("
|
|
940
|
-
("
|
|
941
|
-
("
|
|
942
|
-
("
|
|
943
|
-
("
|
|
944
|
-
("
|
|
945
|
-
("
|
|
946
|
-
("
|
|
947
|
-
("
|
|
942
|
+
("hmac_sha256", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD7),
|
|
943
|
+
("generate_random_signing_commitment", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD8),
|
|
944
|
+
("get_public_key_for_node", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD9),
|
|
945
|
+
("generate_random_secret", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD10),
|
|
946
|
+
("static_deposit_secret_encrypted", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD11),
|
|
947
|
+
("static_deposit_secret", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD12),
|
|
948
|
+
("static_deposit_signing_key", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD13),
|
|
949
|
+
("subtract_secrets", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD14),
|
|
950
|
+
("split_secret_with_proofs", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD15),
|
|
951
|
+
("encrypt_secret_for_receiver", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD16),
|
|
952
|
+
("public_key_from_secret", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD17),
|
|
953
|
+
("sign_frost", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD18),
|
|
954
|
+
("aggregate_frost", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD19),
|
|
948
955
|
("uniffi_free", _UNIFFI_CALLBACK_INTERFACE_FREE),
|
|
949
956
|
]
|
|
950
957
|
class _UniffiVTableCallbackInterfaceFiatService(ctypes.Structure):
|
|
@@ -1081,11 +1088,11 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect.argtypes = (
|
|
|
1081
1088
|
ctypes.c_void_p,
|
|
1082
1089
|
)
|
|
1083
1090
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect.restype = ctypes.c_uint64
|
|
1084
|
-
_UniffiLib.
|
|
1091
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_fetch_conversion_limits.argtypes = (
|
|
1085
1092
|
ctypes.c_void_p,
|
|
1086
1093
|
_UniffiRustBuffer,
|
|
1087
1094
|
)
|
|
1088
|
-
_UniffiLib.
|
|
1095
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_fetch_conversion_limits.restype = ctypes.c_uint64
|
|
1089
1096
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_get_info.argtypes = (
|
|
1090
1097
|
ctypes.c_void_p,
|
|
1091
1098
|
_UniffiRustBuffer,
|
|
@@ -1137,6 +1144,11 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_list_unclaimed_deposits.arg
|
|
|
1137
1144
|
_UniffiRustBuffer,
|
|
1138
1145
|
)
|
|
1139
1146
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_list_unclaimed_deposits.restype = ctypes.c_uint64
|
|
1147
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_auth.argtypes = (
|
|
1148
|
+
ctypes.c_void_p,
|
|
1149
|
+
_UniffiRustBuffer,
|
|
1150
|
+
)
|
|
1151
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_auth.restype = ctypes.c_uint64
|
|
1140
1152
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_pay.argtypes = (
|
|
1141
1153
|
ctypes.c_void_p,
|
|
1142
1154
|
_UniffiRustBuffer,
|
|
@@ -1247,86 +1259,92 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_sign_ecdsa_recoverabl
|
|
|
1247
1259
|
_UniffiRustBuffer,
|
|
1248
1260
|
)
|
|
1249
1261
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_sign_ecdsa_recoverable.restype = ctypes.c_uint64
|
|
1250
|
-
_UniffiLib.
|
|
1262
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_encrypt_ecies.argtypes = (
|
|
1251
1263
|
ctypes.c_void_p,
|
|
1252
1264
|
_UniffiRustBuffer,
|
|
1253
1265
|
_UniffiRustBuffer,
|
|
1254
1266
|
)
|
|
1255
|
-
_UniffiLib.
|
|
1256
|
-
_UniffiLib.
|
|
1267
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_encrypt_ecies.restype = ctypes.c_uint64
|
|
1268
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_decrypt_ecies.argtypes = (
|
|
1257
1269
|
ctypes.c_void_p,
|
|
1258
1270
|
_UniffiRustBuffer,
|
|
1259
1271
|
_UniffiRustBuffer,
|
|
1260
1272
|
)
|
|
1261
|
-
_UniffiLib.
|
|
1273
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_decrypt_ecies.restype = ctypes.c_uint64
|
|
1262
1274
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_sign_hash_schnorr.argtypes = (
|
|
1263
1275
|
ctypes.c_void_p,
|
|
1264
1276
|
_UniffiRustBuffer,
|
|
1265
1277
|
_UniffiRustBuffer,
|
|
1266
1278
|
)
|
|
1267
1279
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_sign_hash_schnorr.restype = ctypes.c_uint64
|
|
1268
|
-
_UniffiLib.
|
|
1280
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_hmac_sha256.argtypes = (
|
|
1281
|
+
ctypes.c_void_p,
|
|
1282
|
+
_UniffiRustBuffer,
|
|
1283
|
+
_UniffiRustBuffer,
|
|
1284
|
+
)
|
|
1285
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_hmac_sha256.restype = ctypes.c_uint64
|
|
1286
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_generate_random_signing_commitment.argtypes = (
|
|
1269
1287
|
ctypes.c_void_p,
|
|
1270
1288
|
)
|
|
1271
|
-
_UniffiLib.
|
|
1289
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_generate_random_signing_commitment.restype = ctypes.c_uint64
|
|
1272
1290
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_get_public_key_for_node.argtypes = (
|
|
1273
1291
|
ctypes.c_void_p,
|
|
1274
1292
|
_UniffiRustBuffer,
|
|
1275
1293
|
)
|
|
1276
1294
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_get_public_key_for_node.restype = ctypes.c_uint64
|
|
1277
|
-
_UniffiLib.
|
|
1295
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_generate_random_secret.argtypes = (
|
|
1278
1296
|
ctypes.c_void_p,
|
|
1279
1297
|
)
|
|
1280
|
-
_UniffiLib.
|
|
1281
|
-
_UniffiLib.
|
|
1298
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_generate_random_secret.restype = ctypes.c_uint64
|
|
1299
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_secret_encrypted.argtypes = (
|
|
1282
1300
|
ctypes.c_void_p,
|
|
1283
1301
|
ctypes.c_uint32,
|
|
1284
1302
|
)
|
|
1285
|
-
_UniffiLib.
|
|
1286
|
-
_UniffiLib.
|
|
1303
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_secret_encrypted.restype = ctypes.c_uint64
|
|
1304
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_secret.argtypes = (
|
|
1287
1305
|
ctypes.c_void_p,
|
|
1288
1306
|
ctypes.c_uint32,
|
|
1289
1307
|
)
|
|
1290
|
-
_UniffiLib.
|
|
1291
|
-
_UniffiLib.
|
|
1308
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_secret.restype = ctypes.c_uint64
|
|
1309
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_signing_key.argtypes = (
|
|
1292
1310
|
ctypes.c_void_p,
|
|
1293
1311
|
ctypes.c_uint32,
|
|
1294
1312
|
)
|
|
1295
|
-
_UniffiLib.
|
|
1296
|
-
_UniffiLib.
|
|
1313
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_signing_key.restype = ctypes.c_uint64
|
|
1314
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_subtract_secrets.argtypes = (
|
|
1297
1315
|
ctypes.c_void_p,
|
|
1298
1316
|
_UniffiRustBuffer,
|
|
1299
1317
|
_UniffiRustBuffer,
|
|
1300
1318
|
)
|
|
1301
|
-
_UniffiLib.
|
|
1302
|
-
_UniffiLib.
|
|
1319
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_subtract_secrets.restype = ctypes.c_uint64
|
|
1320
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_split_secret_with_proofs.argtypes = (
|
|
1303
1321
|
ctypes.c_void_p,
|
|
1304
1322
|
_UniffiRustBuffer,
|
|
1305
1323
|
ctypes.c_uint32,
|
|
1306
1324
|
ctypes.c_uint32,
|
|
1307
1325
|
)
|
|
1308
|
-
_UniffiLib.
|
|
1309
|
-
_UniffiLib.
|
|
1326
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_split_secret_with_proofs.restype = ctypes.c_uint64
|
|
1327
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_encrypt_secret_for_receiver.argtypes = (
|
|
1310
1328
|
ctypes.c_void_p,
|
|
1311
1329
|
_UniffiRustBuffer,
|
|
1312
1330
|
_UniffiRustBuffer,
|
|
1313
1331
|
)
|
|
1314
|
-
_UniffiLib.
|
|
1315
|
-
_UniffiLib.
|
|
1332
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_encrypt_secret_for_receiver.restype = ctypes.c_uint64
|
|
1333
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_public_key_from_secret.argtypes = (
|
|
1316
1334
|
ctypes.c_void_p,
|
|
1317
1335
|
_UniffiRustBuffer,
|
|
1318
1336
|
)
|
|
1319
|
-
_UniffiLib.
|
|
1337
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_public_key_from_secret.restype = ctypes.c_uint64
|
|
1320
1338
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_sign_frost.argtypes = (
|
|
1321
1339
|
ctypes.c_void_p,
|
|
1322
1340
|
_UniffiRustBuffer,
|
|
1323
1341
|
)
|
|
1324
1342
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_sign_frost.restype = ctypes.c_uint64
|
|
1325
|
-
_UniffiLib.
|
|
1343
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_aggregate_frost.argtypes = (
|
|
1326
1344
|
ctypes.c_void_p,
|
|
1327
1345
|
_UniffiRustBuffer,
|
|
1328
1346
|
)
|
|
1329
|
-
_UniffiLib.
|
|
1347
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_aggregate_frost.restype = ctypes.c_uint64
|
|
1330
1348
|
_UniffiLib.uniffi_breez_sdk_spark_fn_clone_fiatservice.argtypes = (
|
|
1331
1349
|
ctypes.c_void_p,
|
|
1332
1350
|
ctypes.POINTER(_UniffiRustCallStatus),
|
|
@@ -2017,9 +2035,9 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_addr
|
|
|
2017
2035
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_disconnect.argtypes = (
|
|
2018
2036
|
)
|
|
2019
2037
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_disconnect.restype = ctypes.c_uint16
|
|
2020
|
-
_UniffiLib.
|
|
2038
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_fetch_conversion_limits.argtypes = (
|
|
2021
2039
|
)
|
|
2022
|
-
_UniffiLib.
|
|
2040
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_fetch_conversion_limits.restype = ctypes.c_uint16
|
|
2023
2041
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_info.argtypes = (
|
|
2024
2042
|
)
|
|
2025
2043
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_info.restype = ctypes.c_uint16
|
|
@@ -2053,6 +2071,9 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_payments.restype
|
|
|
2053
2071
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_unclaimed_deposits.argtypes = (
|
|
2054
2072
|
)
|
|
2055
2073
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_unclaimed_deposits.restype = ctypes.c_uint16
|
|
2074
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_auth.argtypes = (
|
|
2075
|
+
)
|
|
2076
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_auth.restype = ctypes.c_uint16
|
|
2056
2077
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay.argtypes = (
|
|
2057
2078
|
)
|
|
2058
2079
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay.restype = ctypes.c_uint16
|
|
@@ -2110,51 +2131,54 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_ecdsa.rest
|
|
|
2110
2131
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_ecdsa_recoverable.argtypes = (
|
|
2111
2132
|
)
|
|
2112
2133
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_ecdsa_recoverable.restype = ctypes.c_uint16
|
|
2113
|
-
_UniffiLib.
|
|
2134
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_ecies.argtypes = (
|
|
2114
2135
|
)
|
|
2115
|
-
_UniffiLib.
|
|
2116
|
-
_UniffiLib.
|
|
2136
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_ecies.restype = ctypes.c_uint16
|
|
2137
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_decrypt_ecies.argtypes = (
|
|
2117
2138
|
)
|
|
2118
|
-
_UniffiLib.
|
|
2139
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_decrypt_ecies.restype = ctypes.c_uint16
|
|
2119
2140
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_hash_schnorr.argtypes = (
|
|
2120
2141
|
)
|
|
2121
2142
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_hash_schnorr.restype = ctypes.c_uint16
|
|
2122
|
-
_UniffiLib.
|
|
2143
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_hmac_sha256.argtypes = (
|
|
2144
|
+
)
|
|
2145
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_hmac_sha256.restype = ctypes.c_uint16
|
|
2146
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_signing_commitment.argtypes = (
|
|
2123
2147
|
)
|
|
2124
|
-
_UniffiLib.
|
|
2148
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_signing_commitment.restype = ctypes.c_uint16
|
|
2125
2149
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_get_public_key_for_node.argtypes = (
|
|
2126
2150
|
)
|
|
2127
2151
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_get_public_key_for_node.restype = ctypes.c_uint16
|
|
2128
|
-
_UniffiLib.
|
|
2152
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_secret.argtypes = (
|
|
2129
2153
|
)
|
|
2130
|
-
_UniffiLib.
|
|
2131
|
-
_UniffiLib.
|
|
2154
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_secret.restype = ctypes.c_uint16
|
|
2155
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret_encrypted.argtypes = (
|
|
2132
2156
|
)
|
|
2133
|
-
_UniffiLib.
|
|
2134
|
-
_UniffiLib.
|
|
2157
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret_encrypted.restype = ctypes.c_uint16
|
|
2158
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret.argtypes = (
|
|
2135
2159
|
)
|
|
2136
|
-
_UniffiLib.
|
|
2137
|
-
_UniffiLib.
|
|
2160
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret.restype = ctypes.c_uint16
|
|
2161
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_signing_key.argtypes = (
|
|
2138
2162
|
)
|
|
2139
|
-
_UniffiLib.
|
|
2140
|
-
_UniffiLib.
|
|
2163
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_signing_key.restype = ctypes.c_uint16
|
|
2164
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_subtract_secrets.argtypes = (
|
|
2141
2165
|
)
|
|
2142
|
-
_UniffiLib.
|
|
2143
|
-
_UniffiLib.
|
|
2166
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_subtract_secrets.restype = ctypes.c_uint16
|
|
2167
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_split_secret_with_proofs.argtypes = (
|
|
2144
2168
|
)
|
|
2145
|
-
_UniffiLib.
|
|
2146
|
-
_UniffiLib.
|
|
2169
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_split_secret_with_proofs.restype = ctypes.c_uint16
|
|
2170
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_secret_for_receiver.argtypes = (
|
|
2147
2171
|
)
|
|
2148
|
-
_UniffiLib.
|
|
2149
|
-
_UniffiLib.
|
|
2172
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_secret_for_receiver.restype = ctypes.c_uint16
|
|
2173
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_public_key_from_secret.argtypes = (
|
|
2150
2174
|
)
|
|
2151
|
-
_UniffiLib.
|
|
2175
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_public_key_from_secret.restype = ctypes.c_uint16
|
|
2152
2176
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_frost.argtypes = (
|
|
2153
2177
|
)
|
|
2154
2178
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_frost.restype = ctypes.c_uint16
|
|
2155
|
-
_UniffiLib.
|
|
2179
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_aggregate_frost.argtypes = (
|
|
2156
2180
|
)
|
|
2157
|
-
_UniffiLib.
|
|
2181
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_aggregate_frost.restype = ctypes.c_uint16
|
|
2158
2182
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies.argtypes = (
|
|
2159
2183
|
)
|
|
2160
2184
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies.restype = ctypes.c_uint16
|
|
@@ -2901,7 +2925,7 @@ class BreezSdkProtocol(typing.Protocol):
|
|
|
2901
2925
|
"""
|
|
2902
2926
|
|
|
2903
2927
|
raise NotImplementedError
|
|
2904
|
-
def
|
|
2928
|
+
def fetch_conversion_limits(self, request: "FetchConversionLimitsRequest"):
|
|
2905
2929
|
raise NotImplementedError
|
|
2906
2930
|
def get_info(self, request: "GetInfoRequest"):
|
|
2907
2931
|
"""
|
|
@@ -2977,6 +3001,58 @@ class BreezSdkProtocol(typing.Protocol):
|
|
|
2977
3001
|
|
|
2978
3002
|
raise NotImplementedError
|
|
2979
3003
|
def list_unclaimed_deposits(self, request: "ListUnclaimedDepositsRequest"):
|
|
3004
|
+
raise NotImplementedError
|
|
3005
|
+
def lnurl_auth(self, request_data: "LnurlAuthRequestDetails"):
|
|
3006
|
+
"""
|
|
3007
|
+
Performs LNURL-auth with the service.
|
|
3008
|
+
|
|
3009
|
+
This method implements the LNURL-auth protocol as specified in LUD-04 and LUD-05.
|
|
3010
|
+
It derives a domain-specific linking key, signs the challenge, and sends the
|
|
3011
|
+
authentication request to the service.
|
|
3012
|
+
|
|
3013
|
+
# Arguments
|
|
3014
|
+
|
|
3015
|
+
* `request_data` - The parsed LNURL-auth request details obtained from [`parse`]
|
|
3016
|
+
|
|
3017
|
+
# Returns
|
|
3018
|
+
|
|
3019
|
+
* `Ok(LnurlCallbackStatus::Ok)` - Authentication was successful
|
|
3020
|
+
* `Ok(LnurlCallbackStatus::ErrorStatus{reason})` - Service returned an error
|
|
3021
|
+
* `Err(SdkError)` - An error occurred during the authentication process
|
|
3022
|
+
|
|
3023
|
+
# Example
|
|
3024
|
+
|
|
3025
|
+
```rust,no_run
|
|
3026
|
+
# use breez_sdk_spark::{BreezSdk, InputType};
|
|
3027
|
+
# async fn example(sdk: BreezSdk) -> Result<(), Box<dyn std::error::Error>> {
|
|
3028
|
+
// 1. Parse the LNURL-auth string
|
|
3029
|
+
let input = sdk.parse("lnurl1...").await?;
|
|
3030
|
+
let auth_request = match input {
|
|
3031
|
+
InputType::LnurlAuth(data) => data,
|
|
3032
|
+
_ => return Err("Not an auth request".into()),
|
|
3033
|
+
};
|
|
3034
|
+
|
|
3035
|
+
// 2. Show user the domain and get confirmation
|
|
3036
|
+
println!("Authenticate with {}?", auth_request.domain);
|
|
3037
|
+
|
|
3038
|
+
// 3. Perform authentication
|
|
3039
|
+
let status = sdk.lnurl_auth(auth_request).await?;
|
|
3040
|
+
match status {
|
|
3041
|
+
breez_sdk_spark::LnurlCallbackStatus::Ok => println!("Success!"),
|
|
3042
|
+
breez_sdk_spark::LnurlCallbackStatus::ErrorStatus { error_details } => {
|
|
3043
|
+
println!("Error: {}", error_details.reason)
|
|
3044
|
+
}
|
|
3045
|
+
}
|
|
3046
|
+
# Ok(())
|
|
3047
|
+
# }
|
|
3048
|
+
```
|
|
3049
|
+
|
|
3050
|
+
# See Also
|
|
3051
|
+
|
|
3052
|
+
* LUD-04: <https://github.com/lnurl/luds/blob/luds/04.md>
|
|
3053
|
+
* LUD-05: <https://github.com/lnurl/luds/blob/luds/05.md>
|
|
3054
|
+
"""
|
|
3055
|
+
|
|
2980
3056
|
raise NotImplementedError
|
|
2981
3057
|
def lnurl_pay(self, request: "LnurlPayRequest"):
|
|
2982
3058
|
raise NotImplementedError
|
|
@@ -3313,19 +3389,19 @@ _UniffiConverterTypeSdkError,
|
|
|
3313
3389
|
|
|
3314
3390
|
|
|
3315
3391
|
|
|
3316
|
-
async def
|
|
3317
|
-
|
|
3392
|
+
async def fetch_conversion_limits(self, request: "FetchConversionLimitsRequest") -> "FetchConversionLimitsResponse":
|
|
3393
|
+
_UniffiConverterTypeFetchConversionLimitsRequest.check_lower(request)
|
|
3318
3394
|
|
|
3319
3395
|
return await _uniffi_rust_call_async(
|
|
3320
|
-
_UniffiLib.
|
|
3396
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_fetch_conversion_limits(
|
|
3321
3397
|
self._uniffi_clone_pointer(),
|
|
3322
|
-
|
|
3398
|
+
_UniffiConverterTypeFetchConversionLimitsRequest.lower(request)
|
|
3323
3399
|
),
|
|
3324
3400
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
3325
3401
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
3326
3402
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
3327
3403
|
# lift function
|
|
3328
|
-
|
|
3404
|
+
_UniffiConverterTypeFetchConversionLimitsResponse.lift,
|
|
3329
3405
|
|
|
3330
3406
|
# Error FFI converter
|
|
3331
3407
|
_UniffiConverterTypeSdkError,
|
|
@@ -3582,6 +3658,77 @@ _UniffiConverterTypeSdkError,
|
|
|
3582
3658
|
|
|
3583
3659
|
|
|
3584
3660
|
|
|
3661
|
+
async def lnurl_auth(self, request_data: "LnurlAuthRequestDetails") -> "LnurlCallbackStatus":
|
|
3662
|
+
"""
|
|
3663
|
+
Performs LNURL-auth with the service.
|
|
3664
|
+
|
|
3665
|
+
This method implements the LNURL-auth protocol as specified in LUD-04 and LUD-05.
|
|
3666
|
+
It derives a domain-specific linking key, signs the challenge, and sends the
|
|
3667
|
+
authentication request to the service.
|
|
3668
|
+
|
|
3669
|
+
# Arguments
|
|
3670
|
+
|
|
3671
|
+
* `request_data` - The parsed LNURL-auth request details obtained from [`parse`]
|
|
3672
|
+
|
|
3673
|
+
# Returns
|
|
3674
|
+
|
|
3675
|
+
* `Ok(LnurlCallbackStatus::Ok)` - Authentication was successful
|
|
3676
|
+
* `Ok(LnurlCallbackStatus::ErrorStatus{reason})` - Service returned an error
|
|
3677
|
+
* `Err(SdkError)` - An error occurred during the authentication process
|
|
3678
|
+
|
|
3679
|
+
# Example
|
|
3680
|
+
|
|
3681
|
+
```rust,no_run
|
|
3682
|
+
# use breez_sdk_spark::{BreezSdk, InputType};
|
|
3683
|
+
# async fn example(sdk: BreezSdk) -> Result<(), Box<dyn std::error::Error>> {
|
|
3684
|
+
// 1. Parse the LNURL-auth string
|
|
3685
|
+
let input = sdk.parse("lnurl1...").await?;
|
|
3686
|
+
let auth_request = match input {
|
|
3687
|
+
InputType::LnurlAuth(data) => data,
|
|
3688
|
+
_ => return Err("Not an auth request".into()),
|
|
3689
|
+
};
|
|
3690
|
+
|
|
3691
|
+
// 2. Show user the domain and get confirmation
|
|
3692
|
+
println!("Authenticate with {}?", auth_request.domain);
|
|
3693
|
+
|
|
3694
|
+
// 3. Perform authentication
|
|
3695
|
+
let status = sdk.lnurl_auth(auth_request).await?;
|
|
3696
|
+
match status {
|
|
3697
|
+
breez_sdk_spark::LnurlCallbackStatus::Ok => println!("Success!"),
|
|
3698
|
+
breez_sdk_spark::LnurlCallbackStatus::ErrorStatus { error_details } => {
|
|
3699
|
+
println!("Error: {}", error_details.reason)
|
|
3700
|
+
}
|
|
3701
|
+
}
|
|
3702
|
+
# Ok(())
|
|
3703
|
+
# }
|
|
3704
|
+
```
|
|
3705
|
+
|
|
3706
|
+
# See Also
|
|
3707
|
+
|
|
3708
|
+
* LUD-04: <https://github.com/lnurl/luds/blob/luds/04.md>
|
|
3709
|
+
* LUD-05: <https://github.com/lnurl/luds/blob/luds/05.md>
|
|
3710
|
+
"""
|
|
3711
|
+
|
|
3712
|
+
_UniffiConverterTypeLnurlAuthRequestDetails.check_lower(request_data)
|
|
3713
|
+
|
|
3714
|
+
return await _uniffi_rust_call_async(
|
|
3715
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_auth(
|
|
3716
|
+
self._uniffi_clone_pointer(),
|
|
3717
|
+
_UniffiConverterTypeLnurlAuthRequestDetails.lower(request_data)
|
|
3718
|
+
),
|
|
3719
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
3720
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
3721
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
3722
|
+
# lift function
|
|
3723
|
+
_UniffiConverterTypeLnurlCallbackStatus.lift,
|
|
3724
|
+
|
|
3725
|
+
# Error FFI converter
|
|
3726
|
+
_UniffiConverterTypeSdkError,
|
|
3727
|
+
|
|
3728
|
+
)
|
|
3729
|
+
|
|
3730
|
+
|
|
3731
|
+
|
|
3585
3732
|
async def lnurl_pay(self, request: "LnurlPayRequest") -> "LnurlPayResponse":
|
|
3586
3733
|
_UniffiConverterTypeLnurlPayRequest.check_lower(request)
|
|
3587
3734
|
|
|
@@ -4002,6 +4149,8 @@ class ExternalSigner(typing.Protocol):
|
|
|
4002
4149
|
def identity_public_key(self, ):
|
|
4003
4150
|
"""
|
|
4004
4151
|
Returns the identity public key as 33 bytes (compressed secp256k1 key).
|
|
4152
|
+
|
|
4153
|
+
See also: [JavaScript `getIdentityPublicKey`](https://docs.spark.money/wallets/spark-signer#get-identity-public-key)
|
|
4005
4154
|
"""
|
|
4006
4155
|
|
|
4007
4156
|
raise NotImplementedError
|
|
@@ -4014,15 +4163,19 @@ class ExternalSigner(typing.Protocol):
|
|
|
4014
4163
|
|
|
4015
4164
|
# Returns
|
|
4016
4165
|
The derived public key as 33 bytes, or a `SignerError`
|
|
4166
|
+
|
|
4167
|
+
See also: [JavaScript `getPublicKeyFromDerivation`](https://docs.spark.money/wallets/spark-signer#get-public-key-from-derivation)
|
|
4017
4168
|
"""
|
|
4018
4169
|
|
|
4019
4170
|
raise NotImplementedError
|
|
4020
|
-
def sign_ecdsa(self, message: "
|
|
4171
|
+
def sign_ecdsa(self, message: "MessageBytes",path: "str"):
|
|
4021
4172
|
"""
|
|
4022
4173
|
Signs a message using ECDSA at the given derivation path.
|
|
4023
4174
|
|
|
4175
|
+
The message should be a 32-byte digest (typically a hash of the original data).
|
|
4176
|
+
|
|
4024
4177
|
# Arguments
|
|
4025
|
-
* `message` - The message to sign
|
|
4178
|
+
* `message` - The 32-byte message digest to sign
|
|
4026
4179
|
* `path` - BIP32 derivation path as a string
|
|
4027
4180
|
|
|
4028
4181
|
# Returns
|
|
@@ -4030,12 +4183,14 @@ class ExternalSigner(typing.Protocol):
|
|
|
4030
4183
|
"""
|
|
4031
4184
|
|
|
4032
4185
|
raise NotImplementedError
|
|
4033
|
-
def sign_ecdsa_recoverable(self, message: "
|
|
4186
|
+
def sign_ecdsa_recoverable(self, message: "MessageBytes",path: "str"):
|
|
4034
4187
|
"""
|
|
4035
4188
|
Signs a message using recoverable ECDSA at the given derivation path.
|
|
4036
4189
|
|
|
4190
|
+
The message should be a 32-byte digest (typically a hash of the original data).
|
|
4191
|
+
|
|
4037
4192
|
# Arguments
|
|
4038
|
-
* `message` - The message to sign
|
|
4193
|
+
* `message` - The 32-byte message digest to sign
|
|
4039
4194
|
* `path` - BIP32 derivation path as a string
|
|
4040
4195
|
|
|
4041
4196
|
# Returns
|
|
@@ -4043,7 +4198,7 @@ class ExternalSigner(typing.Protocol):
|
|
|
4043
4198
|
"""
|
|
4044
4199
|
|
|
4045
4200
|
raise NotImplementedError
|
|
4046
|
-
def
|
|
4201
|
+
def encrypt_ecies(self, message: "bytes",path: "str"):
|
|
4047
4202
|
"""
|
|
4048
4203
|
Encrypts a message using ECIES at the given derivation path.
|
|
4049
4204
|
|
|
@@ -4056,7 +4211,7 @@ class ExternalSigner(typing.Protocol):
|
|
|
4056
4211
|
"""
|
|
4057
4212
|
|
|
4058
4213
|
raise NotImplementedError
|
|
4059
|
-
def
|
|
4214
|
+
def decrypt_ecies(self, message: "bytes",path: "str"):
|
|
4060
4215
|
"""
|
|
4061
4216
|
Decrypts a message using ECIES at the given derivation path.
|
|
4062
4217
|
|
|
@@ -4066,6 +4221,8 @@ class ExternalSigner(typing.Protocol):
|
|
|
4066
4221
|
|
|
4067
4222
|
# Returns
|
|
4068
4223
|
Decrypted data, or a `SignerError`
|
|
4224
|
+
|
|
4225
|
+
See also: [JavaScript `decryptEcies`](https://docs.spark.money/wallets/spark-signer#decrypt-ecies)
|
|
4069
4226
|
"""
|
|
4070
4227
|
|
|
4071
4228
|
raise NotImplementedError
|
|
@@ -4082,12 +4239,29 @@ class ExternalSigner(typing.Protocol):
|
|
|
4082
4239
|
"""
|
|
4083
4240
|
|
|
4084
4241
|
raise NotImplementedError
|
|
4085
|
-
def
|
|
4242
|
+
def hmac_sha256(self, message: "bytes",path: "str"):
|
|
4243
|
+
"""
|
|
4244
|
+
HMAC-SHA256 of a message at the given derivation path.
|
|
4245
|
+
|
|
4246
|
+
# Arguments
|
|
4247
|
+
* `message` - The message to hash
|
|
4248
|
+
* `path` - BIP32 derivation path as a string
|
|
4249
|
+
|
|
4250
|
+
# Returns
|
|
4251
|
+
32-byte HMAC-SHA256, or a `SignerError`
|
|
4252
|
+
|
|
4253
|
+
See also: [JavaScript `htlcHMAC`](https://docs.spark.money/wallets/spark-signer#generate-htlc-hmac)
|
|
4254
|
+
"""
|
|
4255
|
+
|
|
4256
|
+
raise NotImplementedError
|
|
4257
|
+
def generate_random_signing_commitment(self, ):
|
|
4086
4258
|
"""
|
|
4087
4259
|
Generates Frost signing commitments for multi-party signing.
|
|
4088
4260
|
|
|
4089
4261
|
# Returns
|
|
4090
4262
|
Frost commitments with nonces, or a `SignerError`
|
|
4263
|
+
|
|
4264
|
+
See also: [JavaScript `getRandomSigningCommitment`](https://docs.spark.money/wallets/spark-signer#get-random-signing-commitment)
|
|
4091
4265
|
"""
|
|
4092
4266
|
|
|
4093
4267
|
raise NotImplementedError
|
|
@@ -4099,69 +4273,91 @@ class ExternalSigner(typing.Protocol):
|
|
|
4099
4273
|
* `id` - The tree node identifier
|
|
4100
4274
|
|
|
4101
4275
|
# Returns
|
|
4102
|
-
The public key for the node, or
|
|
4276
|
+
The public key for the node, or a `SignerError`
|
|
4103
4277
|
"""
|
|
4104
4278
|
|
|
4105
4279
|
raise NotImplementedError
|
|
4106
|
-
def
|
|
4280
|
+
def generate_random_secret(self, ):
|
|
4107
4281
|
"""
|
|
4108
|
-
Generates a random
|
|
4282
|
+
Generates a random secret that is encrypted and known only to the signer.
|
|
4283
|
+
|
|
4284
|
+
This method creates a new random secret and returns it in encrypted form.
|
|
4285
|
+
The plaintext secret never leaves the signer boundary, providing a secure way
|
|
4286
|
+
to create secrets that can be referenced in subsequent operations without
|
|
4287
|
+
exposing them.
|
|
4288
|
+
|
|
4289
|
+
This is conceptually similar to Spark's key derivation system where secrets
|
|
4290
|
+
are represented by opaque references (like tree node IDs or Random) rather than raw values.
|
|
4291
|
+
The encrypted secret can be passed to other signer methods that need to operate
|
|
4292
|
+
on it, while keeping the actual secret material protected within the signer.
|
|
4109
4293
|
|
|
4110
4294
|
# Returns
|
|
4111
|
-
|
|
4295
|
+
An encrypted secret that can be used in subsequent signer operations,
|
|
4296
|
+
or a `SignerError` if generation fails.
|
|
4297
|
+
|
|
4298
|
+
See also: [Key Derivation System](https://docs.spark.money/wallets/spark-signer#the-keyderivation-system)
|
|
4112
4299
|
"""
|
|
4113
4300
|
|
|
4114
4301
|
raise NotImplementedError
|
|
4115
|
-
def
|
|
4302
|
+
def static_deposit_secret_encrypted(self, index: "int"):
|
|
4116
4303
|
"""
|
|
4117
|
-
Gets
|
|
4304
|
+
Gets an encrypted static deposit secret by index.
|
|
4118
4305
|
|
|
4119
4306
|
# Arguments
|
|
4120
|
-
* `index` - The index of the static deposit
|
|
4307
|
+
* `index` - The index of the static deposit secret
|
|
4121
4308
|
|
|
4122
4309
|
# Returns
|
|
4123
|
-
The
|
|
4310
|
+
The encrypted secret, or a `SignerError`
|
|
4311
|
+
|
|
4312
|
+
This is the encrypted version of: [JavaScript `getStaticDepositSecretKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-secret-key)
|
|
4124
4313
|
"""
|
|
4125
4314
|
|
|
4126
4315
|
raise NotImplementedError
|
|
4127
|
-
def
|
|
4316
|
+
def static_deposit_secret(self, index: "int"):
|
|
4128
4317
|
"""
|
|
4129
|
-
Gets a static deposit
|
|
4318
|
+
Gets a static deposit secret by index.
|
|
4130
4319
|
|
|
4131
4320
|
# Arguments
|
|
4132
|
-
* `index` - The index of the static deposit
|
|
4321
|
+
* `index` - The index of the static deposit secret
|
|
4133
4322
|
|
|
4134
4323
|
# Returns
|
|
4135
|
-
The 32-byte
|
|
4324
|
+
The 32-byte secret, or a `SignerError`
|
|
4325
|
+
|
|
4326
|
+
See also: [JavaScript `getStaticDepositSecretKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-secret-key)
|
|
4136
4327
|
"""
|
|
4137
4328
|
|
|
4138
4329
|
raise NotImplementedError
|
|
4139
|
-
def
|
|
4330
|
+
def static_deposit_signing_key(self, index: "int"):
|
|
4140
4331
|
"""
|
|
4141
|
-
Gets a static deposit public key by index.
|
|
4332
|
+
Gets a static deposit signing public key by index.
|
|
4142
4333
|
|
|
4143
4334
|
# Arguments
|
|
4144
|
-
* `index` - The index of the static deposit key
|
|
4335
|
+
* `index` - The index of the static deposit public signing key
|
|
4145
4336
|
|
|
4146
4337
|
# Returns
|
|
4147
|
-
The 33-byte public key, or
|
|
4338
|
+
The 33-byte public key, or a `SignerError`
|
|
4339
|
+
|
|
4340
|
+
See also: [JavaScript `getStaticDepositSigningKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-signing-key)
|
|
4148
4341
|
"""
|
|
4149
4342
|
|
|
4150
4343
|
raise NotImplementedError
|
|
4151
|
-
def
|
|
4344
|
+
def subtract_secrets(self, signing_key: "ExternalSecretSource",new_signing_key: "ExternalSecretSource"):
|
|
4152
4345
|
"""
|
|
4153
|
-
Subtracts one
|
|
4346
|
+
Subtracts one secret from another.
|
|
4154
4347
|
|
|
4155
4348
|
# Arguments
|
|
4156
|
-
* `signing_key` - The first
|
|
4157
|
-
* `new_signing_key` - The second
|
|
4349
|
+
* `signing_key` - The first secret
|
|
4350
|
+
* `new_signing_key` - The second secret to subtract
|
|
4158
4351
|
|
|
4159
4352
|
# Returns
|
|
4160
|
-
The resulting
|
|
4353
|
+
The resulting secret, or a `SignerError`
|
|
4354
|
+
|
|
4355
|
+
See also: [JavaScript `subtractSplitAndEncrypt`](https://docs.spark.money/wallets/spark-signer#subtract,-split,-and-encrypt)
|
|
4356
|
+
(this method provides the subtraction step of that higher-level operation)
|
|
4161
4357
|
"""
|
|
4162
4358
|
|
|
4163
4359
|
raise NotImplementedError
|
|
4164
|
-
def
|
|
4360
|
+
def split_secret_with_proofs(self, secret: "ExternalSecretToSplit",threshold: "int",num_shares: "int"):
|
|
4165
4361
|
"""
|
|
4166
4362
|
Splits a secret with proofs using Shamir's Secret Sharing.
|
|
4167
4363
|
|
|
@@ -4171,32 +4367,36 @@ class ExternalSigner(typing.Protocol):
|
|
|
4171
4367
|
* `num_shares` - Total number of shares to create
|
|
4172
4368
|
|
|
4173
4369
|
# Returns
|
|
4174
|
-
Vector of verifiable secret shares, or
|
|
4370
|
+
Vector of verifiable secret shares, or a `SignerError`
|
|
4371
|
+
|
|
4372
|
+
See also: [JavaScript `splitSecretWithProofs`](https://docs.spark.money/wallets/spark-signer#split-secret-with-proofs)
|
|
4175
4373
|
"""
|
|
4176
4374
|
|
|
4177
4375
|
raise NotImplementedError
|
|
4178
|
-
def
|
|
4376
|
+
def encrypt_secret_for_receiver(self, encrypted_secret: "ExternalEncryptedSecret",receiver_public_key: "PublicKeyBytes"):
|
|
4179
4377
|
"""
|
|
4180
|
-
Encrypts a
|
|
4378
|
+
Encrypts a secret for a specific receiver's public key.
|
|
4181
4379
|
|
|
4182
4380
|
# Arguments
|
|
4183
|
-
* `
|
|
4381
|
+
* `encrypted_secret` - The encrypted secret to re-encrypt
|
|
4184
4382
|
* `receiver_public_key` - The receiver's 33-byte public key
|
|
4185
4383
|
|
|
4186
4384
|
# Returns
|
|
4187
|
-
Encrypted data for the receiver, or
|
|
4385
|
+
Encrypted data for the receiver, or a `SignerError`
|
|
4188
4386
|
"""
|
|
4189
4387
|
|
|
4190
4388
|
raise NotImplementedError
|
|
4191
|
-
def
|
|
4389
|
+
def public_key_from_secret(self, secret: "ExternalSecretSource"):
|
|
4192
4390
|
"""
|
|
4193
|
-
Gets the public key from a
|
|
4391
|
+
Gets the public key from a secret.
|
|
4194
4392
|
|
|
4195
4393
|
# Arguments
|
|
4196
|
-
* `
|
|
4394
|
+
* `secret` - The secret
|
|
4197
4395
|
|
|
4198
4396
|
# Returns
|
|
4199
|
-
The corresponding 33-byte public key, or
|
|
4397
|
+
The corresponding 33-byte public key, or a `SignerError`
|
|
4398
|
+
|
|
4399
|
+
See also: [JavaScript `getPublicKeyFromDerivation`](https://docs.spark.money/wallets/spark-signer#get-public-key-from-derivation)
|
|
4200
4400
|
"""
|
|
4201
4401
|
|
|
4202
4402
|
raise NotImplementedError
|
|
@@ -4208,11 +4408,13 @@ class ExternalSigner(typing.Protocol):
|
|
|
4208
4408
|
* `request` - The Frost signing request
|
|
4209
4409
|
|
|
4210
4410
|
# Returns
|
|
4211
|
-
A signature share, or
|
|
4411
|
+
A signature share, or a `SignerError`
|
|
4412
|
+
|
|
4413
|
+
See also: [JavaScript `signFrost`](https://docs.spark.money/wallets/spark-signer#frost-signing)
|
|
4212
4414
|
"""
|
|
4213
4415
|
|
|
4214
4416
|
raise NotImplementedError
|
|
4215
|
-
def
|
|
4417
|
+
def aggregate_frost(self, request: "ExternalAggregateFrostRequest"):
|
|
4216
4418
|
"""
|
|
4217
4419
|
Aggregates Frost signature shares into a final signature.
|
|
4218
4420
|
|
|
@@ -4220,7 +4422,9 @@ class ExternalSigner(typing.Protocol):
|
|
|
4220
4422
|
* `request` - The Frost aggregation request
|
|
4221
4423
|
|
|
4222
4424
|
# Returns
|
|
4223
|
-
The aggregated Frost signature, or
|
|
4425
|
+
The aggregated Frost signature, or a `SignerError`
|
|
4426
|
+
|
|
4427
|
+
See also: [JavaScript `aggregateFrost`](https://docs.spark.money/wallets/spark-signer#aggregate-frost-signatures)
|
|
4224
4428
|
"""
|
|
4225
4429
|
|
|
4226
4430
|
raise NotImplementedError
|
|
@@ -4268,6 +4472,8 @@ class ExternalSignerImpl:
|
|
|
4268
4472
|
def identity_public_key(self, ) -> "PublicKeyBytes":
|
|
4269
4473
|
"""
|
|
4270
4474
|
Returns the identity public key as 33 bytes (compressed secp256k1 key).
|
|
4475
|
+
|
|
4476
|
+
See also: [JavaScript `getIdentityPublicKey`](https://docs.spark.money/wallets/spark-signer#get-identity-public-key)
|
|
4271
4477
|
"""
|
|
4272
4478
|
|
|
4273
4479
|
return _UniffiConverterTypePublicKeyBytes.lift(
|
|
@@ -4286,6 +4492,8 @@ class ExternalSignerImpl:
|
|
|
4286
4492
|
|
|
4287
4493
|
# Returns
|
|
4288
4494
|
The derived public key as 33 bytes, or a `SignerError`
|
|
4495
|
+
|
|
4496
|
+
See also: [JavaScript `getPublicKeyFromDerivation`](https://docs.spark.money/wallets/spark-signer#get-public-key-from-derivation)
|
|
4289
4497
|
"""
|
|
4290
4498
|
|
|
4291
4499
|
_UniffiConverterString.check_lower(path)
|
|
@@ -4308,26 +4516,28 @@ _UniffiConverterTypeSignerError,
|
|
|
4308
4516
|
|
|
4309
4517
|
|
|
4310
4518
|
|
|
4311
|
-
async def sign_ecdsa(self, message: "
|
|
4519
|
+
async def sign_ecdsa(self, message: "MessageBytes",path: "str") -> "EcdsaSignatureBytes":
|
|
4312
4520
|
"""
|
|
4313
4521
|
Signs a message using ECDSA at the given derivation path.
|
|
4314
4522
|
|
|
4523
|
+
The message should be a 32-byte digest (typically a hash of the original data).
|
|
4524
|
+
|
|
4315
4525
|
# Arguments
|
|
4316
|
-
* `message` - The message to sign
|
|
4526
|
+
* `message` - The 32-byte message digest to sign
|
|
4317
4527
|
* `path` - BIP32 derivation path as a string
|
|
4318
4528
|
|
|
4319
4529
|
# Returns
|
|
4320
4530
|
64-byte compact ECDSA signature, or a `SignerError`
|
|
4321
4531
|
"""
|
|
4322
4532
|
|
|
4323
|
-
|
|
4533
|
+
_UniffiConverterTypeMessageBytes.check_lower(message)
|
|
4324
4534
|
|
|
4325
4535
|
_UniffiConverterString.check_lower(path)
|
|
4326
4536
|
|
|
4327
4537
|
return await _uniffi_rust_call_async(
|
|
4328
4538
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_sign_ecdsa(
|
|
4329
4539
|
self._uniffi_clone_pointer(),
|
|
4330
|
-
|
|
4540
|
+
_UniffiConverterTypeMessageBytes.lower(message),
|
|
4331
4541
|
_UniffiConverterString.lower(path)
|
|
4332
4542
|
),
|
|
4333
4543
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
@@ -4343,26 +4553,28 @@ _UniffiConverterTypeSignerError,
|
|
|
4343
4553
|
|
|
4344
4554
|
|
|
4345
4555
|
|
|
4346
|
-
async def sign_ecdsa_recoverable(self, message: "
|
|
4556
|
+
async def sign_ecdsa_recoverable(self, message: "MessageBytes",path: "str") -> "RecoverableEcdsaSignatureBytes":
|
|
4347
4557
|
"""
|
|
4348
4558
|
Signs a message using recoverable ECDSA at the given derivation path.
|
|
4349
4559
|
|
|
4560
|
+
The message should be a 32-byte digest (typically a hash of the original data).
|
|
4561
|
+
|
|
4350
4562
|
# Arguments
|
|
4351
|
-
* `message` - The message to sign
|
|
4563
|
+
* `message` - The 32-byte message digest to sign
|
|
4352
4564
|
* `path` - BIP32 derivation path as a string
|
|
4353
4565
|
|
|
4354
4566
|
# Returns
|
|
4355
4567
|
65 bytes: recovery ID (31 + `recovery_id`) + 64-byte signature, or a `SignerError`
|
|
4356
4568
|
"""
|
|
4357
4569
|
|
|
4358
|
-
|
|
4570
|
+
_UniffiConverterTypeMessageBytes.check_lower(message)
|
|
4359
4571
|
|
|
4360
4572
|
_UniffiConverterString.check_lower(path)
|
|
4361
4573
|
|
|
4362
4574
|
return await _uniffi_rust_call_async(
|
|
4363
4575
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_sign_ecdsa_recoverable(
|
|
4364
4576
|
self._uniffi_clone_pointer(),
|
|
4365
|
-
|
|
4577
|
+
_UniffiConverterTypeMessageBytes.lower(message),
|
|
4366
4578
|
_UniffiConverterString.lower(path)
|
|
4367
4579
|
),
|
|
4368
4580
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
@@ -4378,7 +4590,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4378
4590
|
|
|
4379
4591
|
|
|
4380
4592
|
|
|
4381
|
-
async def
|
|
4593
|
+
async def encrypt_ecies(self, message: "bytes",path: "str") -> "bytes":
|
|
4382
4594
|
"""
|
|
4383
4595
|
Encrypts a message using ECIES at the given derivation path.
|
|
4384
4596
|
|
|
@@ -4395,7 +4607,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4395
4607
|
_UniffiConverterString.check_lower(path)
|
|
4396
4608
|
|
|
4397
4609
|
return await _uniffi_rust_call_async(
|
|
4398
|
-
_UniffiLib.
|
|
4610
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_encrypt_ecies(
|
|
4399
4611
|
self._uniffi_clone_pointer(),
|
|
4400
4612
|
_UniffiConverterBytes.lower(message),
|
|
4401
4613
|
_UniffiConverterString.lower(path)
|
|
@@ -4413,7 +4625,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4413
4625
|
|
|
4414
4626
|
|
|
4415
4627
|
|
|
4416
|
-
async def
|
|
4628
|
+
async def decrypt_ecies(self, message: "bytes",path: "str") -> "bytes":
|
|
4417
4629
|
"""
|
|
4418
4630
|
Decrypts a message using ECIES at the given derivation path.
|
|
4419
4631
|
|
|
@@ -4423,6 +4635,8 @@ _UniffiConverterTypeSignerError,
|
|
|
4423
4635
|
|
|
4424
4636
|
# Returns
|
|
4425
4637
|
Decrypted data, or a `SignerError`
|
|
4638
|
+
|
|
4639
|
+
See also: [JavaScript `decryptEcies`](https://docs.spark.money/wallets/spark-signer#decrypt-ecies)
|
|
4426
4640
|
"""
|
|
4427
4641
|
|
|
4428
4642
|
_UniffiConverterBytes.check_lower(message)
|
|
@@ -4430,7 +4644,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4430
4644
|
_UniffiConverterString.check_lower(path)
|
|
4431
4645
|
|
|
4432
4646
|
return await _uniffi_rust_call_async(
|
|
4433
|
-
_UniffiLib.
|
|
4647
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_decrypt_ecies(
|
|
4434
4648
|
self._uniffi_clone_pointer(),
|
|
4435
4649
|
_UniffiConverterBytes.lower(message),
|
|
4436
4650
|
_UniffiConverterString.lower(path)
|
|
@@ -4483,16 +4697,55 @@ _UniffiConverterTypeSignerError,
|
|
|
4483
4697
|
|
|
4484
4698
|
|
|
4485
4699
|
|
|
4486
|
-
async def
|
|
4700
|
+
async def hmac_sha256(self, message: "bytes",path: "str") -> "HashedMessageBytes":
|
|
4701
|
+
"""
|
|
4702
|
+
HMAC-SHA256 of a message at the given derivation path.
|
|
4703
|
+
|
|
4704
|
+
# Arguments
|
|
4705
|
+
* `message` - The message to hash
|
|
4706
|
+
* `path` - BIP32 derivation path as a string
|
|
4707
|
+
|
|
4708
|
+
# Returns
|
|
4709
|
+
32-byte HMAC-SHA256, or a `SignerError`
|
|
4710
|
+
|
|
4711
|
+
See also: [JavaScript `htlcHMAC`](https://docs.spark.money/wallets/spark-signer#generate-htlc-hmac)
|
|
4712
|
+
"""
|
|
4713
|
+
|
|
4714
|
+
_UniffiConverterBytes.check_lower(message)
|
|
4715
|
+
|
|
4716
|
+
_UniffiConverterString.check_lower(path)
|
|
4717
|
+
|
|
4718
|
+
return await _uniffi_rust_call_async(
|
|
4719
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_hmac_sha256(
|
|
4720
|
+
self._uniffi_clone_pointer(),
|
|
4721
|
+
_UniffiConverterBytes.lower(message),
|
|
4722
|
+
_UniffiConverterString.lower(path)
|
|
4723
|
+
),
|
|
4724
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
4725
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
4726
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
4727
|
+
# lift function
|
|
4728
|
+
_UniffiConverterTypeHashedMessageBytes.lift,
|
|
4729
|
+
|
|
4730
|
+
# Error FFI converter
|
|
4731
|
+
_UniffiConverterTypeSignerError,
|
|
4732
|
+
|
|
4733
|
+
)
|
|
4734
|
+
|
|
4735
|
+
|
|
4736
|
+
|
|
4737
|
+
async def generate_random_signing_commitment(self, ) -> "ExternalFrostCommitments":
|
|
4487
4738
|
"""
|
|
4488
4739
|
Generates Frost signing commitments for multi-party signing.
|
|
4489
4740
|
|
|
4490
4741
|
# Returns
|
|
4491
4742
|
Frost commitments with nonces, or a `SignerError`
|
|
4743
|
+
|
|
4744
|
+
See also: [JavaScript `getRandomSigningCommitment`](https://docs.spark.money/wallets/spark-signer#get-random-signing-commitment)
|
|
4492
4745
|
"""
|
|
4493
4746
|
|
|
4494
4747
|
return await _uniffi_rust_call_async(
|
|
4495
|
-
_UniffiLib.
|
|
4748
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_generate_random_signing_commitment(
|
|
4496
4749
|
self._uniffi_clone_pointer(),
|
|
4497
4750
|
),
|
|
4498
4751
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
@@ -4516,7 +4769,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4516
4769
|
* `id` - The tree node identifier
|
|
4517
4770
|
|
|
4518
4771
|
# Returns
|
|
4519
|
-
The public key for the node, or
|
|
4772
|
+
The public key for the node, or a `SignerError`
|
|
4520
4773
|
"""
|
|
4521
4774
|
|
|
4522
4775
|
_UniffiConverterTypeExternalTreeNodeId.check_lower(id)
|
|
@@ -4539,23 +4792,36 @@ _UniffiConverterTypeSignerError,
|
|
|
4539
4792
|
|
|
4540
4793
|
|
|
4541
4794
|
|
|
4542
|
-
async def
|
|
4795
|
+
async def generate_random_secret(self, ) -> "ExternalEncryptedSecret":
|
|
4543
4796
|
"""
|
|
4544
|
-
Generates a random
|
|
4797
|
+
Generates a random secret that is encrypted and known only to the signer.
|
|
4798
|
+
|
|
4799
|
+
This method creates a new random secret and returns it in encrypted form.
|
|
4800
|
+
The plaintext secret never leaves the signer boundary, providing a secure way
|
|
4801
|
+
to create secrets that can be referenced in subsequent operations without
|
|
4802
|
+
exposing them.
|
|
4803
|
+
|
|
4804
|
+
This is conceptually similar to Spark's key derivation system where secrets
|
|
4805
|
+
are represented by opaque references (like tree node IDs or Random) rather than raw values.
|
|
4806
|
+
The encrypted secret can be passed to other signer methods that need to operate
|
|
4807
|
+
on it, while keeping the actual secret material protected within the signer.
|
|
4545
4808
|
|
|
4546
4809
|
# Returns
|
|
4547
|
-
|
|
4810
|
+
An encrypted secret that can be used in subsequent signer operations,
|
|
4811
|
+
or a `SignerError` if generation fails.
|
|
4812
|
+
|
|
4813
|
+
See also: [Key Derivation System](https://docs.spark.money/wallets/spark-signer#the-keyderivation-system)
|
|
4548
4814
|
"""
|
|
4549
4815
|
|
|
4550
4816
|
return await _uniffi_rust_call_async(
|
|
4551
|
-
_UniffiLib.
|
|
4817
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_generate_random_secret(
|
|
4552
4818
|
self._uniffi_clone_pointer(),
|
|
4553
4819
|
),
|
|
4554
4820
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
4555
4821
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
4556
4822
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
4557
4823
|
# lift function
|
|
4558
|
-
|
|
4824
|
+
_UniffiConverterTypeExternalEncryptedSecret.lift,
|
|
4559
4825
|
|
|
4560
4826
|
# Error FFI converter
|
|
4561
4827
|
_UniffiConverterTypeSignerError,
|
|
@@ -4564,21 +4830,23 @@ _UniffiConverterTypeSignerError,
|
|
|
4564
4830
|
|
|
4565
4831
|
|
|
4566
4832
|
|
|
4567
|
-
async def
|
|
4833
|
+
async def static_deposit_secret_encrypted(self, index: "int") -> "ExternalSecretSource":
|
|
4568
4834
|
"""
|
|
4569
|
-
Gets
|
|
4835
|
+
Gets an encrypted static deposit secret by index.
|
|
4570
4836
|
|
|
4571
4837
|
# Arguments
|
|
4572
|
-
* `index` - The index of the static deposit
|
|
4838
|
+
* `index` - The index of the static deposit secret
|
|
4573
4839
|
|
|
4574
4840
|
# Returns
|
|
4575
|
-
The
|
|
4841
|
+
The encrypted secret, or a `SignerError`
|
|
4842
|
+
|
|
4843
|
+
This is the encrypted version of: [JavaScript `getStaticDepositSecretKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-secret-key)
|
|
4576
4844
|
"""
|
|
4577
4845
|
|
|
4578
4846
|
_UniffiConverterUInt32.check_lower(index)
|
|
4579
4847
|
|
|
4580
4848
|
return await _uniffi_rust_call_async(
|
|
4581
|
-
_UniffiLib.
|
|
4849
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_secret_encrypted(
|
|
4582
4850
|
self._uniffi_clone_pointer(),
|
|
4583
4851
|
_UniffiConverterUInt32.lower(index)
|
|
4584
4852
|
),
|
|
@@ -4586,7 +4854,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4586
4854
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
4587
4855
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
4588
4856
|
# lift function
|
|
4589
|
-
|
|
4857
|
+
_UniffiConverterTypeExternalSecretSource.lift,
|
|
4590
4858
|
|
|
4591
4859
|
# Error FFI converter
|
|
4592
4860
|
_UniffiConverterTypeSignerError,
|
|
@@ -4595,21 +4863,23 @@ _UniffiConverterTypeSignerError,
|
|
|
4595
4863
|
|
|
4596
4864
|
|
|
4597
4865
|
|
|
4598
|
-
async def
|
|
4866
|
+
async def static_deposit_secret(self, index: "int") -> "SecretBytes":
|
|
4599
4867
|
"""
|
|
4600
|
-
Gets a static deposit
|
|
4868
|
+
Gets a static deposit secret by index.
|
|
4601
4869
|
|
|
4602
4870
|
# Arguments
|
|
4603
|
-
* `index` - The index of the static deposit
|
|
4871
|
+
* `index` - The index of the static deposit secret
|
|
4604
4872
|
|
|
4605
4873
|
# Returns
|
|
4606
|
-
The 32-byte
|
|
4874
|
+
The 32-byte secret, or a `SignerError`
|
|
4875
|
+
|
|
4876
|
+
See also: [JavaScript `getStaticDepositSecretKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-secret-key)
|
|
4607
4877
|
"""
|
|
4608
4878
|
|
|
4609
4879
|
_UniffiConverterUInt32.check_lower(index)
|
|
4610
4880
|
|
|
4611
4881
|
return await _uniffi_rust_call_async(
|
|
4612
|
-
_UniffiLib.
|
|
4882
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_secret(
|
|
4613
4883
|
self._uniffi_clone_pointer(),
|
|
4614
4884
|
_UniffiConverterUInt32.lower(index)
|
|
4615
4885
|
),
|
|
@@ -4617,7 +4887,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4617
4887
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
4618
4888
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
4619
4889
|
# lift function
|
|
4620
|
-
|
|
4890
|
+
_UniffiConverterTypeSecretBytes.lift,
|
|
4621
4891
|
|
|
4622
4892
|
# Error FFI converter
|
|
4623
4893
|
_UniffiConverterTypeSignerError,
|
|
@@ -4626,21 +4896,23 @@ _UniffiConverterTypeSignerError,
|
|
|
4626
4896
|
|
|
4627
4897
|
|
|
4628
4898
|
|
|
4629
|
-
async def
|
|
4899
|
+
async def static_deposit_signing_key(self, index: "int") -> "PublicKeyBytes":
|
|
4630
4900
|
"""
|
|
4631
|
-
Gets a static deposit public key by index.
|
|
4901
|
+
Gets a static deposit signing public key by index.
|
|
4632
4902
|
|
|
4633
4903
|
# Arguments
|
|
4634
|
-
* `index` - The index of the static deposit key
|
|
4904
|
+
* `index` - The index of the static deposit public signing key
|
|
4635
4905
|
|
|
4636
4906
|
# Returns
|
|
4637
|
-
The 33-byte public key, or
|
|
4907
|
+
The 33-byte public key, or a `SignerError`
|
|
4908
|
+
|
|
4909
|
+
See also: [JavaScript `getStaticDepositSigningKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-signing-key)
|
|
4638
4910
|
"""
|
|
4639
4911
|
|
|
4640
4912
|
_UniffiConverterUInt32.check_lower(index)
|
|
4641
4913
|
|
|
4642
4914
|
return await _uniffi_rust_call_async(
|
|
4643
|
-
_UniffiLib.
|
|
4915
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_signing_key(
|
|
4644
4916
|
self._uniffi_clone_pointer(),
|
|
4645
4917
|
_UniffiConverterUInt32.lower(index)
|
|
4646
4918
|
),
|
|
@@ -4657,33 +4929,36 @@ _UniffiConverterTypeSignerError,
|
|
|
4657
4929
|
|
|
4658
4930
|
|
|
4659
4931
|
|
|
4660
|
-
async def
|
|
4932
|
+
async def subtract_secrets(self, signing_key: "ExternalSecretSource",new_signing_key: "ExternalSecretSource") -> "ExternalSecretSource":
|
|
4661
4933
|
"""
|
|
4662
|
-
Subtracts one
|
|
4934
|
+
Subtracts one secret from another.
|
|
4663
4935
|
|
|
4664
4936
|
# Arguments
|
|
4665
|
-
* `signing_key` - The first
|
|
4666
|
-
* `new_signing_key` - The second
|
|
4937
|
+
* `signing_key` - The first secret
|
|
4938
|
+
* `new_signing_key` - The second secret to subtract
|
|
4667
4939
|
|
|
4668
4940
|
# Returns
|
|
4669
|
-
The resulting
|
|
4941
|
+
The resulting secret, or a `SignerError`
|
|
4942
|
+
|
|
4943
|
+
See also: [JavaScript `subtractSplitAndEncrypt`](https://docs.spark.money/wallets/spark-signer#subtract,-split,-and-encrypt)
|
|
4944
|
+
(this method provides the subtraction step of that higher-level operation)
|
|
4670
4945
|
"""
|
|
4671
4946
|
|
|
4672
|
-
|
|
4947
|
+
_UniffiConverterTypeExternalSecretSource.check_lower(signing_key)
|
|
4673
4948
|
|
|
4674
|
-
|
|
4949
|
+
_UniffiConverterTypeExternalSecretSource.check_lower(new_signing_key)
|
|
4675
4950
|
|
|
4676
4951
|
return await _uniffi_rust_call_async(
|
|
4677
|
-
_UniffiLib.
|
|
4952
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_subtract_secrets(
|
|
4678
4953
|
self._uniffi_clone_pointer(),
|
|
4679
|
-
|
|
4680
|
-
|
|
4954
|
+
_UniffiConverterTypeExternalSecretSource.lower(signing_key),
|
|
4955
|
+
_UniffiConverterTypeExternalSecretSource.lower(new_signing_key)
|
|
4681
4956
|
),
|
|
4682
4957
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
4683
4958
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
4684
4959
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
4685
4960
|
# lift function
|
|
4686
|
-
|
|
4961
|
+
_UniffiConverterTypeExternalSecretSource.lift,
|
|
4687
4962
|
|
|
4688
4963
|
# Error FFI converter
|
|
4689
4964
|
_UniffiConverterTypeSignerError,
|
|
@@ -4692,7 +4967,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4692
4967
|
|
|
4693
4968
|
|
|
4694
4969
|
|
|
4695
|
-
async def
|
|
4970
|
+
async def split_secret_with_proofs(self, secret: "ExternalSecretToSplit",threshold: "int",num_shares: "int") -> "typing.List[ExternalVerifiableSecretShare]":
|
|
4696
4971
|
"""
|
|
4697
4972
|
Splits a secret with proofs using Shamir's Secret Sharing.
|
|
4698
4973
|
|
|
@@ -4702,7 +4977,9 @@ _UniffiConverterTypeSignerError,
|
|
|
4702
4977
|
* `num_shares` - Total number of shares to create
|
|
4703
4978
|
|
|
4704
4979
|
# Returns
|
|
4705
|
-
Vector of verifiable secret shares, or
|
|
4980
|
+
Vector of verifiable secret shares, or a `SignerError`
|
|
4981
|
+
|
|
4982
|
+
See also: [JavaScript `splitSecretWithProofs`](https://docs.spark.money/wallets/spark-signer#split-secret-with-proofs)
|
|
4706
4983
|
"""
|
|
4707
4984
|
|
|
4708
4985
|
_UniffiConverterTypeExternalSecretToSplit.check_lower(secret)
|
|
@@ -4712,7 +4989,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4712
4989
|
_UniffiConverterUInt32.check_lower(num_shares)
|
|
4713
4990
|
|
|
4714
4991
|
return await _uniffi_rust_call_async(
|
|
4715
|
-
_UniffiLib.
|
|
4992
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_split_secret_with_proofs(
|
|
4716
4993
|
self._uniffi_clone_pointer(),
|
|
4717
4994
|
_UniffiConverterTypeExternalSecretToSplit.lower(secret),
|
|
4718
4995
|
_UniffiConverterUInt32.lower(threshold),
|
|
@@ -4731,26 +5008,26 @@ _UniffiConverterTypeSignerError,
|
|
|
4731
5008
|
|
|
4732
5009
|
|
|
4733
5010
|
|
|
4734
|
-
async def
|
|
5011
|
+
async def encrypt_secret_for_receiver(self, encrypted_secret: "ExternalEncryptedSecret",receiver_public_key: "PublicKeyBytes") -> "bytes":
|
|
4735
5012
|
"""
|
|
4736
|
-
Encrypts a
|
|
5013
|
+
Encrypts a secret for a specific receiver's public key.
|
|
4737
5014
|
|
|
4738
5015
|
# Arguments
|
|
4739
|
-
* `
|
|
5016
|
+
* `encrypted_secret` - The encrypted secret to re-encrypt
|
|
4740
5017
|
* `receiver_public_key` - The receiver's 33-byte public key
|
|
4741
5018
|
|
|
4742
5019
|
# Returns
|
|
4743
|
-
Encrypted data for the receiver, or
|
|
5020
|
+
Encrypted data for the receiver, or a `SignerError`
|
|
4744
5021
|
"""
|
|
4745
5022
|
|
|
4746
|
-
|
|
5023
|
+
_UniffiConverterTypeExternalEncryptedSecret.check_lower(encrypted_secret)
|
|
4747
5024
|
|
|
4748
5025
|
_UniffiConverterTypePublicKeyBytes.check_lower(receiver_public_key)
|
|
4749
5026
|
|
|
4750
5027
|
return await _uniffi_rust_call_async(
|
|
4751
|
-
_UniffiLib.
|
|
5028
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_encrypt_secret_for_receiver(
|
|
4752
5029
|
self._uniffi_clone_pointer(),
|
|
4753
|
-
|
|
5030
|
+
_UniffiConverterTypeExternalEncryptedSecret.lower(encrypted_secret),
|
|
4754
5031
|
_UniffiConverterTypePublicKeyBytes.lower(receiver_public_key)
|
|
4755
5032
|
),
|
|
4756
5033
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
@@ -4766,23 +5043,25 @@ _UniffiConverterTypeSignerError,
|
|
|
4766
5043
|
|
|
4767
5044
|
|
|
4768
5045
|
|
|
4769
|
-
async def
|
|
5046
|
+
async def public_key_from_secret(self, secret: "ExternalSecretSource") -> "PublicKeyBytes":
|
|
4770
5047
|
"""
|
|
4771
|
-
Gets the public key from a
|
|
5048
|
+
Gets the public key from a secret.
|
|
4772
5049
|
|
|
4773
5050
|
# Arguments
|
|
4774
|
-
* `
|
|
5051
|
+
* `secret` - The secret
|
|
4775
5052
|
|
|
4776
5053
|
# Returns
|
|
4777
|
-
The corresponding 33-byte public key, or
|
|
5054
|
+
The corresponding 33-byte public key, or a `SignerError`
|
|
5055
|
+
|
|
5056
|
+
See also: [JavaScript `getPublicKeyFromDerivation`](https://docs.spark.money/wallets/spark-signer#get-public-key-from-derivation)
|
|
4778
5057
|
"""
|
|
4779
5058
|
|
|
4780
|
-
|
|
5059
|
+
_UniffiConverterTypeExternalSecretSource.check_lower(secret)
|
|
4781
5060
|
|
|
4782
5061
|
return await _uniffi_rust_call_async(
|
|
4783
|
-
_UniffiLib.
|
|
5062
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_public_key_from_secret(
|
|
4784
5063
|
self._uniffi_clone_pointer(),
|
|
4785
|
-
|
|
5064
|
+
_UniffiConverterTypeExternalSecretSource.lower(secret)
|
|
4786
5065
|
),
|
|
4787
5066
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
4788
5067
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
@@ -4805,7 +5084,9 @@ _UniffiConverterTypeSignerError,
|
|
|
4805
5084
|
* `request` - The Frost signing request
|
|
4806
5085
|
|
|
4807
5086
|
# Returns
|
|
4808
|
-
A signature share, or
|
|
5087
|
+
A signature share, or a `SignerError`
|
|
5088
|
+
|
|
5089
|
+
See also: [JavaScript `signFrost`](https://docs.spark.money/wallets/spark-signer#frost-signing)
|
|
4809
5090
|
"""
|
|
4810
5091
|
|
|
4811
5092
|
_UniffiConverterTypeExternalSignFrostRequest.check_lower(request)
|
|
@@ -4828,7 +5109,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4828
5109
|
|
|
4829
5110
|
|
|
4830
5111
|
|
|
4831
|
-
async def
|
|
5112
|
+
async def aggregate_frost(self, request: "ExternalAggregateFrostRequest") -> "ExternalFrostSignature":
|
|
4832
5113
|
"""
|
|
4833
5114
|
Aggregates Frost signature shares into a final signature.
|
|
4834
5115
|
|
|
@@ -4836,13 +5117,15 @@ _UniffiConverterTypeSignerError,
|
|
|
4836
5117
|
* `request` - The Frost aggregation request
|
|
4837
5118
|
|
|
4838
5119
|
# Returns
|
|
4839
|
-
The aggregated Frost signature, or
|
|
5120
|
+
The aggregated Frost signature, or a `SignerError`
|
|
5121
|
+
|
|
5122
|
+
See also: [JavaScript `aggregateFrost`](https://docs.spark.money/wallets/spark-signer#aggregate-frost-signatures)
|
|
4840
5123
|
"""
|
|
4841
5124
|
|
|
4842
5125
|
_UniffiConverterTypeExternalAggregateFrostRequest.check_lower(request)
|
|
4843
5126
|
|
|
4844
5127
|
return await _uniffi_rust_call_async(
|
|
4845
|
-
_UniffiLib.
|
|
5128
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_aggregate_frost(
|
|
4846
5129
|
self._uniffi_clone_pointer(),
|
|
4847
5130
|
_UniffiConverterTypeExternalAggregateFrostRequest.lower(request)
|
|
4848
5131
|
),
|
|
@@ -4932,7 +5215,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
4932
5215
|
):
|
|
4933
5216
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
4934
5217
|
def make_call():
|
|
4935
|
-
args = (
|
|
5218
|
+
args = (_UniffiConverterTypeMessageBytes.lift(message), _UniffiConverterString.lift(path), )
|
|
4936
5219
|
method = uniffi_obj.sign_ecdsa
|
|
4937
5220
|
return method(*args)
|
|
4938
5221
|
|
|
@@ -4967,7 +5250,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
4967
5250
|
):
|
|
4968
5251
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
4969
5252
|
def make_call():
|
|
4970
|
-
args = (
|
|
5253
|
+
args = (_UniffiConverterTypeMessageBytes.lift(message), _UniffiConverterString.lift(path), )
|
|
4971
5254
|
method = uniffi_obj.sign_ecdsa_recoverable
|
|
4972
5255
|
return method(*args)
|
|
4973
5256
|
|
|
@@ -4992,7 +5275,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
4992
5275
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
4993
5276
|
|
|
4994
5277
|
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD4
|
|
4995
|
-
def
|
|
5278
|
+
def encrypt_ecies(
|
|
4996
5279
|
uniffi_handle,
|
|
4997
5280
|
message,
|
|
4998
5281
|
path,
|
|
@@ -5003,7 +5286,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5003
5286
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5004
5287
|
def make_call():
|
|
5005
5288
|
args = (_UniffiConverterBytes.lift(message), _UniffiConverterString.lift(path), )
|
|
5006
|
-
method = uniffi_obj.
|
|
5289
|
+
method = uniffi_obj.encrypt_ecies
|
|
5007
5290
|
return method(*args)
|
|
5008
5291
|
|
|
5009
5292
|
|
|
@@ -5027,7 +5310,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5027
5310
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5028
5311
|
|
|
5029
5312
|
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD5
|
|
5030
|
-
def
|
|
5313
|
+
def decrypt_ecies(
|
|
5031
5314
|
uniffi_handle,
|
|
5032
5315
|
message,
|
|
5033
5316
|
path,
|
|
@@ -5038,7 +5321,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5038
5321
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5039
5322
|
def make_call():
|
|
5040
5323
|
args = (_UniffiConverterBytes.lift(message), _UniffiConverterString.lift(path), )
|
|
5041
|
-
method = uniffi_obj.
|
|
5324
|
+
method = uniffi_obj.decrypt_ecies
|
|
5042
5325
|
return method(*args)
|
|
5043
5326
|
|
|
5044
5327
|
|
|
@@ -5097,7 +5380,42 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5097
5380
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5098
5381
|
|
|
5099
5382
|
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD7
|
|
5100
|
-
def
|
|
5383
|
+
def hmac_sha256(
|
|
5384
|
+
uniffi_handle,
|
|
5385
|
+
message,
|
|
5386
|
+
path,
|
|
5387
|
+
uniffi_future_callback,
|
|
5388
|
+
uniffi_callback_data,
|
|
5389
|
+
uniffi_out_return,
|
|
5390
|
+
):
|
|
5391
|
+
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5392
|
+
def make_call():
|
|
5393
|
+
args = (_UniffiConverterBytes.lift(message), _UniffiConverterString.lift(path), )
|
|
5394
|
+
method = uniffi_obj.hmac_sha256
|
|
5395
|
+
return method(*args)
|
|
5396
|
+
|
|
5397
|
+
|
|
5398
|
+
def handle_success(return_value):
|
|
5399
|
+
uniffi_future_callback(
|
|
5400
|
+
uniffi_callback_data,
|
|
5401
|
+
_UniffiForeignFutureStructRustBuffer(
|
|
5402
|
+
_UniffiConverterTypeHashedMessageBytes.lower(return_value),
|
|
5403
|
+
_UniffiRustCallStatus.default()
|
|
5404
|
+
)
|
|
5405
|
+
)
|
|
5406
|
+
|
|
5407
|
+
def handle_error(status_code, rust_buffer):
|
|
5408
|
+
uniffi_future_callback(
|
|
5409
|
+
uniffi_callback_data,
|
|
5410
|
+
_UniffiForeignFutureStructRustBuffer(
|
|
5411
|
+
_UniffiRustBuffer.default(),
|
|
5412
|
+
_UniffiRustCallStatus(status_code, rust_buffer),
|
|
5413
|
+
)
|
|
5414
|
+
)
|
|
5415
|
+
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5416
|
+
|
|
5417
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD8
|
|
5418
|
+
def generate_random_signing_commitment(
|
|
5101
5419
|
uniffi_handle,
|
|
5102
5420
|
uniffi_future_callback,
|
|
5103
5421
|
uniffi_callback_data,
|
|
@@ -5106,7 +5424,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5106
5424
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5107
5425
|
def make_call():
|
|
5108
5426
|
args = ()
|
|
5109
|
-
method = uniffi_obj.
|
|
5427
|
+
method = uniffi_obj.generate_random_signing_commitment
|
|
5110
5428
|
return method(*args)
|
|
5111
5429
|
|
|
5112
5430
|
|
|
@@ -5129,7 +5447,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5129
5447
|
)
|
|
5130
5448
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5131
5449
|
|
|
5132
|
-
@
|
|
5450
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD9
|
|
5133
5451
|
def get_public_key_for_node(
|
|
5134
5452
|
uniffi_handle,
|
|
5135
5453
|
id,
|
|
@@ -5163,8 +5481,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5163
5481
|
)
|
|
5164
5482
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5165
5483
|
|
|
5166
|
-
@
|
|
5167
|
-
def
|
|
5484
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD10
|
|
5485
|
+
def generate_random_secret(
|
|
5168
5486
|
uniffi_handle,
|
|
5169
5487
|
uniffi_future_callback,
|
|
5170
5488
|
uniffi_callback_data,
|
|
@@ -5173,7 +5491,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5173
5491
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5174
5492
|
def make_call():
|
|
5175
5493
|
args = ()
|
|
5176
|
-
method = uniffi_obj.
|
|
5494
|
+
method = uniffi_obj.generate_random_secret
|
|
5177
5495
|
return method(*args)
|
|
5178
5496
|
|
|
5179
5497
|
|
|
@@ -5181,7 +5499,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5181
5499
|
uniffi_future_callback(
|
|
5182
5500
|
uniffi_callback_data,
|
|
5183
5501
|
_UniffiForeignFutureStructRustBuffer(
|
|
5184
|
-
|
|
5502
|
+
_UniffiConverterTypeExternalEncryptedSecret.lower(return_value),
|
|
5185
5503
|
_UniffiRustCallStatus.default()
|
|
5186
5504
|
)
|
|
5187
5505
|
)
|
|
@@ -5196,8 +5514,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5196
5514
|
)
|
|
5197
5515
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5198
5516
|
|
|
5199
|
-
@
|
|
5200
|
-
def
|
|
5517
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD11
|
|
5518
|
+
def static_deposit_secret_encrypted(
|
|
5201
5519
|
uniffi_handle,
|
|
5202
5520
|
index,
|
|
5203
5521
|
uniffi_future_callback,
|
|
@@ -5207,7 +5525,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5207
5525
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5208
5526
|
def make_call():
|
|
5209
5527
|
args = (_UniffiConverterUInt32.lift(index), )
|
|
5210
|
-
method = uniffi_obj.
|
|
5528
|
+
method = uniffi_obj.static_deposit_secret_encrypted
|
|
5211
5529
|
return method(*args)
|
|
5212
5530
|
|
|
5213
5531
|
|
|
@@ -5215,7 +5533,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5215
5533
|
uniffi_future_callback(
|
|
5216
5534
|
uniffi_callback_data,
|
|
5217
5535
|
_UniffiForeignFutureStructRustBuffer(
|
|
5218
|
-
|
|
5536
|
+
_UniffiConverterTypeExternalSecretSource.lower(return_value),
|
|
5219
5537
|
_UniffiRustCallStatus.default()
|
|
5220
5538
|
)
|
|
5221
5539
|
)
|
|
@@ -5230,8 +5548,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5230
5548
|
)
|
|
5231
5549
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5232
5550
|
|
|
5233
|
-
@
|
|
5234
|
-
def
|
|
5551
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD12
|
|
5552
|
+
def static_deposit_secret(
|
|
5235
5553
|
uniffi_handle,
|
|
5236
5554
|
index,
|
|
5237
5555
|
uniffi_future_callback,
|
|
@@ -5241,7 +5559,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5241
5559
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5242
5560
|
def make_call():
|
|
5243
5561
|
args = (_UniffiConverterUInt32.lift(index), )
|
|
5244
|
-
method = uniffi_obj.
|
|
5562
|
+
method = uniffi_obj.static_deposit_secret
|
|
5245
5563
|
return method(*args)
|
|
5246
5564
|
|
|
5247
5565
|
|
|
@@ -5249,7 +5567,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5249
5567
|
uniffi_future_callback(
|
|
5250
5568
|
uniffi_callback_data,
|
|
5251
5569
|
_UniffiForeignFutureStructRustBuffer(
|
|
5252
|
-
|
|
5570
|
+
_UniffiConverterTypeSecretBytes.lower(return_value),
|
|
5253
5571
|
_UniffiRustCallStatus.default()
|
|
5254
5572
|
)
|
|
5255
5573
|
)
|
|
@@ -5264,8 +5582,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5264
5582
|
)
|
|
5265
5583
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5266
5584
|
|
|
5267
|
-
@
|
|
5268
|
-
def
|
|
5585
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD13
|
|
5586
|
+
def static_deposit_signing_key(
|
|
5269
5587
|
uniffi_handle,
|
|
5270
5588
|
index,
|
|
5271
5589
|
uniffi_future_callback,
|
|
@@ -5275,7 +5593,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5275
5593
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5276
5594
|
def make_call():
|
|
5277
5595
|
args = (_UniffiConverterUInt32.lift(index), )
|
|
5278
|
-
method = uniffi_obj.
|
|
5596
|
+
method = uniffi_obj.static_deposit_signing_key
|
|
5279
5597
|
return method(*args)
|
|
5280
5598
|
|
|
5281
5599
|
|
|
@@ -5298,8 +5616,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5298
5616
|
)
|
|
5299
5617
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5300
5618
|
|
|
5301
|
-
@
|
|
5302
|
-
def
|
|
5619
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD14
|
|
5620
|
+
def subtract_secrets(
|
|
5303
5621
|
uniffi_handle,
|
|
5304
5622
|
signing_key,
|
|
5305
5623
|
new_signing_key,
|
|
@@ -5309,8 +5627,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5309
5627
|
):
|
|
5310
5628
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5311
5629
|
def make_call():
|
|
5312
|
-
args = (
|
|
5313
|
-
method = uniffi_obj.
|
|
5630
|
+
args = (_UniffiConverterTypeExternalSecretSource.lift(signing_key), _UniffiConverterTypeExternalSecretSource.lift(new_signing_key), )
|
|
5631
|
+
method = uniffi_obj.subtract_secrets
|
|
5314
5632
|
return method(*args)
|
|
5315
5633
|
|
|
5316
5634
|
|
|
@@ -5318,7 +5636,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5318
5636
|
uniffi_future_callback(
|
|
5319
5637
|
uniffi_callback_data,
|
|
5320
5638
|
_UniffiForeignFutureStructRustBuffer(
|
|
5321
|
-
|
|
5639
|
+
_UniffiConverterTypeExternalSecretSource.lower(return_value),
|
|
5322
5640
|
_UniffiRustCallStatus.default()
|
|
5323
5641
|
)
|
|
5324
5642
|
)
|
|
@@ -5333,8 +5651,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5333
5651
|
)
|
|
5334
5652
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5335
5653
|
|
|
5336
|
-
@
|
|
5337
|
-
def
|
|
5654
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD15
|
|
5655
|
+
def split_secret_with_proofs(
|
|
5338
5656
|
uniffi_handle,
|
|
5339
5657
|
secret,
|
|
5340
5658
|
threshold,
|
|
@@ -5346,7 +5664,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5346
5664
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5347
5665
|
def make_call():
|
|
5348
5666
|
args = (_UniffiConverterTypeExternalSecretToSplit.lift(secret), _UniffiConverterUInt32.lift(threshold), _UniffiConverterUInt32.lift(num_shares), )
|
|
5349
|
-
method = uniffi_obj.
|
|
5667
|
+
method = uniffi_obj.split_secret_with_proofs
|
|
5350
5668
|
return method(*args)
|
|
5351
5669
|
|
|
5352
5670
|
|
|
@@ -5369,10 +5687,10 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5369
5687
|
)
|
|
5370
5688
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5371
5689
|
|
|
5372
|
-
@
|
|
5373
|
-
def
|
|
5690
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD16
|
|
5691
|
+
def encrypt_secret_for_receiver(
|
|
5374
5692
|
uniffi_handle,
|
|
5375
|
-
|
|
5693
|
+
encrypted_secret,
|
|
5376
5694
|
receiver_public_key,
|
|
5377
5695
|
uniffi_future_callback,
|
|
5378
5696
|
uniffi_callback_data,
|
|
@@ -5380,8 +5698,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5380
5698
|
):
|
|
5381
5699
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5382
5700
|
def make_call():
|
|
5383
|
-
args = (
|
|
5384
|
-
method = uniffi_obj.
|
|
5701
|
+
args = (_UniffiConverterTypeExternalEncryptedSecret.lift(encrypted_secret), _UniffiConverterTypePublicKeyBytes.lift(receiver_public_key), )
|
|
5702
|
+
method = uniffi_obj.encrypt_secret_for_receiver
|
|
5385
5703
|
return method(*args)
|
|
5386
5704
|
|
|
5387
5705
|
|
|
@@ -5404,18 +5722,18 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5404
5722
|
)
|
|
5405
5723
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5406
5724
|
|
|
5407
|
-
@
|
|
5408
|
-
def
|
|
5725
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD17
|
|
5726
|
+
def public_key_from_secret(
|
|
5409
5727
|
uniffi_handle,
|
|
5410
|
-
|
|
5728
|
+
secret,
|
|
5411
5729
|
uniffi_future_callback,
|
|
5412
5730
|
uniffi_callback_data,
|
|
5413
5731
|
uniffi_out_return,
|
|
5414
5732
|
):
|
|
5415
5733
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5416
5734
|
def make_call():
|
|
5417
|
-
args = (
|
|
5418
|
-
method = uniffi_obj.
|
|
5735
|
+
args = (_UniffiConverterTypeExternalSecretSource.lift(secret), )
|
|
5736
|
+
method = uniffi_obj.public_key_from_secret
|
|
5419
5737
|
return method(*args)
|
|
5420
5738
|
|
|
5421
5739
|
|
|
@@ -5438,7 +5756,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5438
5756
|
)
|
|
5439
5757
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5440
5758
|
|
|
5441
|
-
@
|
|
5759
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD18
|
|
5442
5760
|
def sign_frost(
|
|
5443
5761
|
uniffi_handle,
|
|
5444
5762
|
request,
|
|
@@ -5472,8 +5790,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5472
5790
|
)
|
|
5473
5791
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5474
5792
|
|
|
5475
|
-
@
|
|
5476
|
-
def
|
|
5793
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD19
|
|
5794
|
+
def aggregate_frost(
|
|
5477
5795
|
uniffi_handle,
|
|
5478
5796
|
request,
|
|
5479
5797
|
uniffi_future_callback,
|
|
@@ -5483,7 +5801,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5483
5801
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5484
5802
|
def make_call():
|
|
5485
5803
|
args = (_UniffiConverterTypeExternalAggregateFrostRequest.lift(request), )
|
|
5486
|
-
method = uniffi_obj.
|
|
5804
|
+
method = uniffi_obj.aggregate_frost
|
|
5487
5805
|
return method(*args)
|
|
5488
5806
|
|
|
5489
5807
|
|
|
@@ -5516,21 +5834,22 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5516
5834
|
derive_public_key,
|
|
5517
5835
|
sign_ecdsa,
|
|
5518
5836
|
sign_ecdsa_recoverable,
|
|
5519
|
-
|
|
5520
|
-
|
|
5837
|
+
encrypt_ecies,
|
|
5838
|
+
decrypt_ecies,
|
|
5521
5839
|
sign_hash_schnorr,
|
|
5522
|
-
|
|
5840
|
+
hmac_sha256,
|
|
5841
|
+
generate_random_signing_commitment,
|
|
5523
5842
|
get_public_key_for_node,
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5843
|
+
generate_random_secret,
|
|
5844
|
+
static_deposit_secret_encrypted,
|
|
5845
|
+
static_deposit_secret,
|
|
5846
|
+
static_deposit_signing_key,
|
|
5847
|
+
subtract_secrets,
|
|
5848
|
+
split_secret_with_proofs,
|
|
5849
|
+
encrypt_secret_for_receiver,
|
|
5850
|
+
public_key_from_secret,
|
|
5532
5851
|
sign_frost,
|
|
5533
|
-
|
|
5852
|
+
aggregate_frost,
|
|
5534
5853
|
_uniffi_free
|
|
5535
5854
|
)
|
|
5536
5855
|
# Send Rust a pointer to the VTable. Note: this means we need to keep the struct alive forever,
|
|
@@ -10119,60 +10438,272 @@ class _UniffiConverterTypeConnectWithSignerRequest(_UniffiConverterRustBuffer):
|
|
|
10119
10438
|
_UniffiConverterString.write(value.storage_dir, buf)
|
|
10120
10439
|
|
|
10121
10440
|
|
|
10122
|
-
class
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10441
|
+
class ConversionEstimate:
|
|
10442
|
+
"""
|
|
10443
|
+
Response from estimating a conversion, used when preparing a payment that requires conversion
|
|
10444
|
+
"""
|
|
10445
|
+
|
|
10446
|
+
options: "ConversionOptions"
|
|
10447
|
+
"""
|
|
10448
|
+
The conversion options used for the estimate
|
|
10449
|
+
"""
|
|
10450
|
+
|
|
10451
|
+
amount: "U128"
|
|
10452
|
+
"""
|
|
10453
|
+
The estimated amount to be received from the conversion
|
|
10454
|
+
Denominated in satoshis if converting from Bitcoin, otherwise in the token base units.
|
|
10455
|
+
"""
|
|
10456
|
+
|
|
10457
|
+
fee: "U128"
|
|
10458
|
+
"""
|
|
10459
|
+
The fee estimated for the conversion
|
|
10460
|
+
Denominated in satoshis if converting from Bitcoin, otherwise in the token base units.
|
|
10461
|
+
"""
|
|
10462
|
+
|
|
10463
|
+
def __init__(self, *, options: "ConversionOptions", amount: "U128", fee: "U128"):
|
|
10464
|
+
self.options = options
|
|
10465
|
+
self.amount = amount
|
|
10466
|
+
self.fee = fee
|
|
10134
10467
|
|
|
10135
10468
|
def __str__(self):
|
|
10136
|
-
return "
|
|
10469
|
+
return "ConversionEstimate(options={}, amount={}, fee={})".format(self.options, self.amount, self.fee)
|
|
10137
10470
|
|
|
10138
10471
|
def __eq__(self, other):
|
|
10139
|
-
if self.
|
|
10140
|
-
return False
|
|
10141
|
-
if self.ticker != other.ticker:
|
|
10142
|
-
return False
|
|
10143
|
-
if self.decimals != other.decimals:
|
|
10472
|
+
if self.options != other.options:
|
|
10144
10473
|
return False
|
|
10145
|
-
if self.
|
|
10474
|
+
if self.amount != other.amount:
|
|
10146
10475
|
return False
|
|
10147
|
-
if self.
|
|
10476
|
+
if self.fee != other.fee:
|
|
10148
10477
|
return False
|
|
10149
10478
|
return True
|
|
10150
10479
|
|
|
10151
|
-
class
|
|
10480
|
+
class _UniffiConverterTypeConversionEstimate(_UniffiConverterRustBuffer):
|
|
10152
10481
|
@staticmethod
|
|
10153
10482
|
def read(buf):
|
|
10154
|
-
return
|
|
10155
|
-
|
|
10156
|
-
|
|
10157
|
-
|
|
10158
|
-
is_freezable=_UniffiConverterBool.read(buf),
|
|
10159
|
-
max_supply=_UniffiConverterTypeU128.read(buf),
|
|
10483
|
+
return ConversionEstimate(
|
|
10484
|
+
options=_UniffiConverterTypeConversionOptions.read(buf),
|
|
10485
|
+
amount=_UniffiConverterTypeU128.read(buf),
|
|
10486
|
+
fee=_UniffiConverterTypeU128.read(buf),
|
|
10160
10487
|
)
|
|
10161
10488
|
|
|
10162
10489
|
@staticmethod
|
|
10163
10490
|
def check_lower(value):
|
|
10164
|
-
|
|
10165
|
-
|
|
10166
|
-
|
|
10167
|
-
_UniffiConverterBool.check_lower(value.is_freezable)
|
|
10168
|
-
_UniffiConverterTypeU128.check_lower(value.max_supply)
|
|
10491
|
+
_UniffiConverterTypeConversionOptions.check_lower(value.options)
|
|
10492
|
+
_UniffiConverterTypeU128.check_lower(value.amount)
|
|
10493
|
+
_UniffiConverterTypeU128.check_lower(value.fee)
|
|
10169
10494
|
|
|
10170
10495
|
@staticmethod
|
|
10171
10496
|
def write(value, buf):
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
|
|
10497
|
+
_UniffiConverterTypeConversionOptions.write(value.options, buf)
|
|
10498
|
+
_UniffiConverterTypeU128.write(value.amount, buf)
|
|
10499
|
+
_UniffiConverterTypeU128.write(value.fee, buf)
|
|
10500
|
+
|
|
10501
|
+
|
|
10502
|
+
class ConversionInfo:
|
|
10503
|
+
pool_id: "str"
|
|
10504
|
+
"""
|
|
10505
|
+
The pool id associated with the conversion
|
|
10506
|
+
"""
|
|
10507
|
+
|
|
10508
|
+
conversion_id: "str"
|
|
10509
|
+
"""
|
|
10510
|
+
The conversion id shared by both sides of the conversion
|
|
10511
|
+
"""
|
|
10512
|
+
|
|
10513
|
+
status: "ConversionStatus"
|
|
10514
|
+
"""
|
|
10515
|
+
The status of the conversion
|
|
10516
|
+
"""
|
|
10517
|
+
|
|
10518
|
+
fee: "typing.Optional[U128]"
|
|
10519
|
+
"""
|
|
10520
|
+
The fee paid for the conversion
|
|
10521
|
+
Denominated in satoshis if converting from Bitcoin, otherwise in the token base units.
|
|
10522
|
+
"""
|
|
10523
|
+
|
|
10524
|
+
purpose: "typing.Optional[ConversionPurpose]"
|
|
10525
|
+
"""
|
|
10526
|
+
The purpose of the conversion
|
|
10527
|
+
"""
|
|
10528
|
+
|
|
10529
|
+
def __init__(self, *, pool_id: "str", conversion_id: "str", status: "ConversionStatus", fee: "typing.Optional[U128]", purpose: "typing.Optional[ConversionPurpose]"):
|
|
10530
|
+
self.pool_id = pool_id
|
|
10531
|
+
self.conversion_id = conversion_id
|
|
10532
|
+
self.status = status
|
|
10533
|
+
self.fee = fee
|
|
10534
|
+
self.purpose = purpose
|
|
10535
|
+
|
|
10536
|
+
def __str__(self):
|
|
10537
|
+
return "ConversionInfo(pool_id={}, conversion_id={}, status={}, fee={}, purpose={})".format(self.pool_id, self.conversion_id, self.status, self.fee, self.purpose)
|
|
10538
|
+
|
|
10539
|
+
def __eq__(self, other):
|
|
10540
|
+
if self.pool_id != other.pool_id:
|
|
10541
|
+
return False
|
|
10542
|
+
if self.conversion_id != other.conversion_id:
|
|
10543
|
+
return False
|
|
10544
|
+
if self.status != other.status:
|
|
10545
|
+
return False
|
|
10546
|
+
if self.fee != other.fee:
|
|
10547
|
+
return False
|
|
10548
|
+
if self.purpose != other.purpose:
|
|
10549
|
+
return False
|
|
10550
|
+
return True
|
|
10551
|
+
|
|
10552
|
+
class _UniffiConverterTypeConversionInfo(_UniffiConverterRustBuffer):
|
|
10553
|
+
@staticmethod
|
|
10554
|
+
def read(buf):
|
|
10555
|
+
return ConversionInfo(
|
|
10556
|
+
pool_id=_UniffiConverterString.read(buf),
|
|
10557
|
+
conversion_id=_UniffiConverterString.read(buf),
|
|
10558
|
+
status=_UniffiConverterTypeConversionStatus.read(buf),
|
|
10559
|
+
fee=_UniffiConverterOptionalTypeU128.read(buf),
|
|
10560
|
+
purpose=_UniffiConverterOptionalTypeConversionPurpose.read(buf),
|
|
10561
|
+
)
|
|
10562
|
+
|
|
10563
|
+
@staticmethod
|
|
10564
|
+
def check_lower(value):
|
|
10565
|
+
_UniffiConverterString.check_lower(value.pool_id)
|
|
10566
|
+
_UniffiConverterString.check_lower(value.conversion_id)
|
|
10567
|
+
_UniffiConverterTypeConversionStatus.check_lower(value.status)
|
|
10568
|
+
_UniffiConverterOptionalTypeU128.check_lower(value.fee)
|
|
10569
|
+
_UniffiConverterOptionalTypeConversionPurpose.check_lower(value.purpose)
|
|
10570
|
+
|
|
10571
|
+
@staticmethod
|
|
10572
|
+
def write(value, buf):
|
|
10573
|
+
_UniffiConverterString.write(value.pool_id, buf)
|
|
10574
|
+
_UniffiConverterString.write(value.conversion_id, buf)
|
|
10575
|
+
_UniffiConverterTypeConversionStatus.write(value.status, buf)
|
|
10576
|
+
_UniffiConverterOptionalTypeU128.write(value.fee, buf)
|
|
10577
|
+
_UniffiConverterOptionalTypeConversionPurpose.write(value.purpose, buf)
|
|
10578
|
+
|
|
10579
|
+
|
|
10580
|
+
class ConversionOptions:
|
|
10581
|
+
"""
|
|
10582
|
+
Options for conversion when fulfilling a payment. When set, the SDK will
|
|
10583
|
+
perform a conversion before fulfilling the payment. If not set, the payment
|
|
10584
|
+
will only be fulfilled if the wallet has sufficient balance of the required asset.
|
|
10585
|
+
"""
|
|
10586
|
+
|
|
10587
|
+
conversion_type: "ConversionType"
|
|
10588
|
+
"""
|
|
10589
|
+
The type of conversion to perform when fulfilling the payment
|
|
10590
|
+
"""
|
|
10591
|
+
|
|
10592
|
+
max_slippage_bps: "typing.Optional[int]"
|
|
10593
|
+
"""
|
|
10594
|
+
The optional maximum slippage in basis points (1/100 of a percent) allowed when
|
|
10595
|
+
a conversion is needed to fulfill the payment. Defaults to 50 bps (0.5%) if not set.
|
|
10596
|
+
The conversion will fail if the actual amount received is less than
|
|
10597
|
+
`estimated_amount * (1 - max_slippage_bps / 10_000)`.
|
|
10598
|
+
"""
|
|
10599
|
+
|
|
10600
|
+
completion_timeout_secs: "typing.Optional[int]"
|
|
10601
|
+
"""
|
|
10602
|
+
The optional timeout in seconds to wait for the conversion to complete
|
|
10603
|
+
when fulfilling the payment. This timeout only concerns waiting for the received
|
|
10604
|
+
payment of the conversion. If the timeout is reached before the conversion
|
|
10605
|
+
is complete, the payment will fail. Defaults to 30 seconds if not set.
|
|
10606
|
+
"""
|
|
10607
|
+
|
|
10608
|
+
def __init__(self, *, conversion_type: "ConversionType", max_slippage_bps: "typing.Optional[int]" = _DEFAULT, completion_timeout_secs: "typing.Optional[int]" = _DEFAULT):
|
|
10609
|
+
self.conversion_type = conversion_type
|
|
10610
|
+
if max_slippage_bps is _DEFAULT:
|
|
10611
|
+
self.max_slippage_bps = None
|
|
10612
|
+
else:
|
|
10613
|
+
self.max_slippage_bps = max_slippage_bps
|
|
10614
|
+
if completion_timeout_secs is _DEFAULT:
|
|
10615
|
+
self.completion_timeout_secs = None
|
|
10616
|
+
else:
|
|
10617
|
+
self.completion_timeout_secs = completion_timeout_secs
|
|
10618
|
+
|
|
10619
|
+
def __str__(self):
|
|
10620
|
+
return "ConversionOptions(conversion_type={}, max_slippage_bps={}, completion_timeout_secs={})".format(self.conversion_type, self.max_slippage_bps, self.completion_timeout_secs)
|
|
10621
|
+
|
|
10622
|
+
def __eq__(self, other):
|
|
10623
|
+
if self.conversion_type != other.conversion_type:
|
|
10624
|
+
return False
|
|
10625
|
+
if self.max_slippage_bps != other.max_slippage_bps:
|
|
10626
|
+
return False
|
|
10627
|
+
if self.completion_timeout_secs != other.completion_timeout_secs:
|
|
10628
|
+
return False
|
|
10629
|
+
return True
|
|
10630
|
+
|
|
10631
|
+
class _UniffiConverterTypeConversionOptions(_UniffiConverterRustBuffer):
|
|
10632
|
+
@staticmethod
|
|
10633
|
+
def read(buf):
|
|
10634
|
+
return ConversionOptions(
|
|
10635
|
+
conversion_type=_UniffiConverterTypeConversionType.read(buf),
|
|
10636
|
+
max_slippage_bps=_UniffiConverterOptionalUInt32.read(buf),
|
|
10637
|
+
completion_timeout_secs=_UniffiConverterOptionalUInt32.read(buf),
|
|
10638
|
+
)
|
|
10639
|
+
|
|
10640
|
+
@staticmethod
|
|
10641
|
+
def check_lower(value):
|
|
10642
|
+
_UniffiConverterTypeConversionType.check_lower(value.conversion_type)
|
|
10643
|
+
_UniffiConverterOptionalUInt32.check_lower(value.max_slippage_bps)
|
|
10644
|
+
_UniffiConverterOptionalUInt32.check_lower(value.completion_timeout_secs)
|
|
10645
|
+
|
|
10646
|
+
@staticmethod
|
|
10647
|
+
def write(value, buf):
|
|
10648
|
+
_UniffiConverterTypeConversionType.write(value.conversion_type, buf)
|
|
10649
|
+
_UniffiConverterOptionalUInt32.write(value.max_slippage_bps, buf)
|
|
10650
|
+
_UniffiConverterOptionalUInt32.write(value.completion_timeout_secs, buf)
|
|
10651
|
+
|
|
10652
|
+
|
|
10653
|
+
class CreateIssuerTokenRequest:
|
|
10654
|
+
name: "str"
|
|
10655
|
+
ticker: "str"
|
|
10656
|
+
decimals: "int"
|
|
10657
|
+
is_freezable: "bool"
|
|
10658
|
+
max_supply: "U128"
|
|
10659
|
+
def __init__(self, *, name: "str", ticker: "str", decimals: "int", is_freezable: "bool", max_supply: "U128"):
|
|
10660
|
+
self.name = name
|
|
10661
|
+
self.ticker = ticker
|
|
10662
|
+
self.decimals = decimals
|
|
10663
|
+
self.is_freezable = is_freezable
|
|
10664
|
+
self.max_supply = max_supply
|
|
10665
|
+
|
|
10666
|
+
def __str__(self):
|
|
10667
|
+
return "CreateIssuerTokenRequest(name={}, ticker={}, decimals={}, is_freezable={}, max_supply={})".format(self.name, self.ticker, self.decimals, self.is_freezable, self.max_supply)
|
|
10668
|
+
|
|
10669
|
+
def __eq__(self, other):
|
|
10670
|
+
if self.name != other.name:
|
|
10671
|
+
return False
|
|
10672
|
+
if self.ticker != other.ticker:
|
|
10673
|
+
return False
|
|
10674
|
+
if self.decimals != other.decimals:
|
|
10675
|
+
return False
|
|
10676
|
+
if self.is_freezable != other.is_freezable:
|
|
10677
|
+
return False
|
|
10678
|
+
if self.max_supply != other.max_supply:
|
|
10679
|
+
return False
|
|
10680
|
+
return True
|
|
10681
|
+
|
|
10682
|
+
class _UniffiConverterTypeCreateIssuerTokenRequest(_UniffiConverterRustBuffer):
|
|
10683
|
+
@staticmethod
|
|
10684
|
+
def read(buf):
|
|
10685
|
+
return CreateIssuerTokenRequest(
|
|
10686
|
+
name=_UniffiConverterString.read(buf),
|
|
10687
|
+
ticker=_UniffiConverterString.read(buf),
|
|
10688
|
+
decimals=_UniffiConverterUInt32.read(buf),
|
|
10689
|
+
is_freezable=_UniffiConverterBool.read(buf),
|
|
10690
|
+
max_supply=_UniffiConverterTypeU128.read(buf),
|
|
10691
|
+
)
|
|
10692
|
+
|
|
10693
|
+
@staticmethod
|
|
10694
|
+
def check_lower(value):
|
|
10695
|
+
_UniffiConverterString.check_lower(value.name)
|
|
10696
|
+
_UniffiConverterString.check_lower(value.ticker)
|
|
10697
|
+
_UniffiConverterUInt32.check_lower(value.decimals)
|
|
10698
|
+
_UniffiConverterBool.check_lower(value.is_freezable)
|
|
10699
|
+
_UniffiConverterTypeU128.check_lower(value.max_supply)
|
|
10700
|
+
|
|
10701
|
+
@staticmethod
|
|
10702
|
+
def write(value, buf):
|
|
10703
|
+
_UniffiConverterString.write(value.name, buf)
|
|
10704
|
+
_UniffiConverterString.write(value.ticker, buf)
|
|
10705
|
+
_UniffiConverterUInt32.write(value.decimals, buf)
|
|
10706
|
+
_UniffiConverterBool.write(value.is_freezable, buf)
|
|
10176
10707
|
_UniffiConverterTypeU128.write(value.max_supply, buf)
|
|
10177
10708
|
|
|
10178
10709
|
|
|
@@ -10509,9 +11040,9 @@ class _UniffiConverterTypeExternalAggregateFrostRequest(_UniffiConverterRustBuff
|
|
|
10509
11040
|
_UniffiConverterOptionalBytes.write(value.adaptor_public_key, buf)
|
|
10510
11041
|
|
|
10511
11042
|
|
|
10512
|
-
class
|
|
11043
|
+
class ExternalEncryptedSecret:
|
|
10513
11044
|
"""
|
|
10514
|
-
FFI-safe representation of `spark_wallet::
|
|
11045
|
+
FFI-safe representation of `spark_wallet::EncryptedSecret`
|
|
10515
11046
|
"""
|
|
10516
11047
|
|
|
10517
11048
|
ciphertext: "bytes"
|
|
@@ -10523,17 +11054,17 @@ class ExternalEncryptedPrivateKey:
|
|
|
10523
11054
|
self.ciphertext = ciphertext
|
|
10524
11055
|
|
|
10525
11056
|
def __str__(self):
|
|
10526
|
-
return "
|
|
11057
|
+
return "ExternalEncryptedSecret(ciphertext={})".format(self.ciphertext)
|
|
10527
11058
|
|
|
10528
11059
|
def __eq__(self, other):
|
|
10529
11060
|
if self.ciphertext != other.ciphertext:
|
|
10530
11061
|
return False
|
|
10531
11062
|
return True
|
|
10532
11063
|
|
|
10533
|
-
class
|
|
11064
|
+
class _UniffiConverterTypeExternalEncryptedSecret(_UniffiConverterRustBuffer):
|
|
10534
11065
|
@staticmethod
|
|
10535
11066
|
def read(buf):
|
|
10536
|
-
return
|
|
11067
|
+
return ExternalEncryptedSecret(
|
|
10537
11068
|
ciphertext=_UniffiConverterBytes.read(buf),
|
|
10538
11069
|
)
|
|
10539
11070
|
|
|
@@ -10887,7 +11418,7 @@ class ExternalSignFrostRequest:
|
|
|
10887
11418
|
The public key (33 bytes compressed)
|
|
10888
11419
|
"""
|
|
10889
11420
|
|
|
10890
|
-
|
|
11421
|
+
secret: "ExternalSecretSource"
|
|
10891
11422
|
"""
|
|
10892
11423
|
The private key source
|
|
10893
11424
|
"""
|
|
@@ -10912,24 +11443,24 @@ class ExternalSignFrostRequest:
|
|
|
10912
11443
|
Optional adaptor public key (33 bytes compressed)
|
|
10913
11444
|
"""
|
|
10914
11445
|
|
|
10915
|
-
def __init__(self, *, message: "bytes", public_key: "bytes",
|
|
11446
|
+
def __init__(self, *, message: "bytes", public_key: "bytes", secret: "ExternalSecretSource", verifying_key: "bytes", self_nonce_commitment: "ExternalFrostCommitments", statechain_commitments: "typing.List[IdentifierCommitmentPair]", adaptor_public_key: "typing.Optional[bytes]"):
|
|
10916
11447
|
self.message = message
|
|
10917
11448
|
self.public_key = public_key
|
|
10918
|
-
self.
|
|
11449
|
+
self.secret = secret
|
|
10919
11450
|
self.verifying_key = verifying_key
|
|
10920
11451
|
self.self_nonce_commitment = self_nonce_commitment
|
|
10921
11452
|
self.statechain_commitments = statechain_commitments
|
|
10922
11453
|
self.adaptor_public_key = adaptor_public_key
|
|
10923
11454
|
|
|
10924
11455
|
def __str__(self):
|
|
10925
|
-
return "ExternalSignFrostRequest(message={}, public_key={},
|
|
11456
|
+
return "ExternalSignFrostRequest(message={}, public_key={}, secret={}, verifying_key={}, self_nonce_commitment={}, statechain_commitments={}, adaptor_public_key={})".format(self.message, self.public_key, self.secret, self.verifying_key, self.self_nonce_commitment, self.statechain_commitments, self.adaptor_public_key)
|
|
10926
11457
|
|
|
10927
11458
|
def __eq__(self, other):
|
|
10928
11459
|
if self.message != other.message:
|
|
10929
11460
|
return False
|
|
10930
11461
|
if self.public_key != other.public_key:
|
|
10931
11462
|
return False
|
|
10932
|
-
if self.
|
|
11463
|
+
if self.secret != other.secret:
|
|
10933
11464
|
return False
|
|
10934
11465
|
if self.verifying_key != other.verifying_key:
|
|
10935
11466
|
return False
|
|
@@ -10947,7 +11478,7 @@ class _UniffiConverterTypeExternalSignFrostRequest(_UniffiConverterRustBuffer):
|
|
|
10947
11478
|
return ExternalSignFrostRequest(
|
|
10948
11479
|
message=_UniffiConverterBytes.read(buf),
|
|
10949
11480
|
public_key=_UniffiConverterBytes.read(buf),
|
|
10950
|
-
|
|
11481
|
+
secret=_UniffiConverterTypeExternalSecretSource.read(buf),
|
|
10951
11482
|
verifying_key=_UniffiConverterBytes.read(buf),
|
|
10952
11483
|
self_nonce_commitment=_UniffiConverterTypeExternalFrostCommitments.read(buf),
|
|
10953
11484
|
statechain_commitments=_UniffiConverterSequenceTypeIdentifierCommitmentPair.read(buf),
|
|
@@ -10958,7 +11489,7 @@ class _UniffiConverterTypeExternalSignFrostRequest(_UniffiConverterRustBuffer):
|
|
|
10958
11489
|
def check_lower(value):
|
|
10959
11490
|
_UniffiConverterBytes.check_lower(value.message)
|
|
10960
11491
|
_UniffiConverterBytes.check_lower(value.public_key)
|
|
10961
|
-
|
|
11492
|
+
_UniffiConverterTypeExternalSecretSource.check_lower(value.secret)
|
|
10962
11493
|
_UniffiConverterBytes.check_lower(value.verifying_key)
|
|
10963
11494
|
_UniffiConverterTypeExternalFrostCommitments.check_lower(value.self_nonce_commitment)
|
|
10964
11495
|
_UniffiConverterSequenceTypeIdentifierCommitmentPair.check_lower(value.statechain_commitments)
|
|
@@ -10968,7 +11499,7 @@ class _UniffiConverterTypeExternalSignFrostRequest(_UniffiConverterRustBuffer):
|
|
|
10968
11499
|
def write(value, buf):
|
|
10969
11500
|
_UniffiConverterBytes.write(value.message, buf)
|
|
10970
11501
|
_UniffiConverterBytes.write(value.public_key, buf)
|
|
10971
|
-
|
|
11502
|
+
_UniffiConverterTypeExternalSecretSource.write(value.secret, buf)
|
|
10972
11503
|
_UniffiConverterBytes.write(value.verifying_key, buf)
|
|
10973
11504
|
_UniffiConverterTypeExternalFrostCommitments.write(value.self_nonce_commitment, buf)
|
|
10974
11505
|
_UniffiConverterSequenceTypeIdentifierCommitmentPair.write(value.statechain_commitments, buf)
|
|
@@ -11108,8 +11639,8 @@ class _UniffiConverterTypeExternalVerifiableSecretShare(_UniffiConverterRustBuff
|
|
|
11108
11639
|
_UniffiConverterSequenceBytes.write(value.proofs, buf)
|
|
11109
11640
|
|
|
11110
11641
|
|
|
11111
|
-
class
|
|
11112
|
-
conversion_type: "
|
|
11642
|
+
class FetchConversionLimitsRequest:
|
|
11643
|
+
conversion_type: "ConversionType"
|
|
11113
11644
|
"""
|
|
11114
11645
|
The type of conversion, either from or to Bitcoin.
|
|
11115
11646
|
"""
|
|
@@ -11119,7 +11650,7 @@ class FetchTokenConversionLimitsRequest:
|
|
|
11119
11650
|
The token identifier when converting to a token.
|
|
11120
11651
|
"""
|
|
11121
11652
|
|
|
11122
|
-
def __init__(self, *, conversion_type: "
|
|
11653
|
+
def __init__(self, *, conversion_type: "ConversionType", token_identifier: "typing.Optional[str]" = _DEFAULT):
|
|
11123
11654
|
self.conversion_type = conversion_type
|
|
11124
11655
|
if token_identifier is _DEFAULT:
|
|
11125
11656
|
self.token_identifier = None
|
|
@@ -11127,7 +11658,7 @@ class FetchTokenConversionLimitsRequest:
|
|
|
11127
11658
|
self.token_identifier = token_identifier
|
|
11128
11659
|
|
|
11129
11660
|
def __str__(self):
|
|
11130
|
-
return "
|
|
11661
|
+
return "FetchConversionLimitsRequest(conversion_type={}, token_identifier={})".format(self.conversion_type, self.token_identifier)
|
|
11131
11662
|
|
|
11132
11663
|
def __eq__(self, other):
|
|
11133
11664
|
if self.conversion_type != other.conversion_type:
|
|
@@ -11136,26 +11667,26 @@ class FetchTokenConversionLimitsRequest:
|
|
|
11136
11667
|
return False
|
|
11137
11668
|
return True
|
|
11138
11669
|
|
|
11139
|
-
class
|
|
11670
|
+
class _UniffiConverterTypeFetchConversionLimitsRequest(_UniffiConverterRustBuffer):
|
|
11140
11671
|
@staticmethod
|
|
11141
11672
|
def read(buf):
|
|
11142
|
-
return
|
|
11143
|
-
conversion_type=
|
|
11673
|
+
return FetchConversionLimitsRequest(
|
|
11674
|
+
conversion_type=_UniffiConverterTypeConversionType.read(buf),
|
|
11144
11675
|
token_identifier=_UniffiConverterOptionalString.read(buf),
|
|
11145
11676
|
)
|
|
11146
11677
|
|
|
11147
11678
|
@staticmethod
|
|
11148
11679
|
def check_lower(value):
|
|
11149
|
-
|
|
11680
|
+
_UniffiConverterTypeConversionType.check_lower(value.conversion_type)
|
|
11150
11681
|
_UniffiConverterOptionalString.check_lower(value.token_identifier)
|
|
11151
11682
|
|
|
11152
11683
|
@staticmethod
|
|
11153
11684
|
def write(value, buf):
|
|
11154
|
-
|
|
11685
|
+
_UniffiConverterTypeConversionType.write(value.conversion_type, buf)
|
|
11155
11686
|
_UniffiConverterOptionalString.write(value.token_identifier, buf)
|
|
11156
11687
|
|
|
11157
11688
|
|
|
11158
|
-
class
|
|
11689
|
+
class FetchConversionLimitsResponse:
|
|
11159
11690
|
min_from_amount: "typing.Optional[U128]"
|
|
11160
11691
|
"""
|
|
11161
11692
|
The minimum amount to be converted.
|
|
@@ -11173,7 +11704,7 @@ class FetchTokenConversionLimitsResponse:
|
|
|
11173
11704
|
self.min_to_amount = min_to_amount
|
|
11174
11705
|
|
|
11175
11706
|
def __str__(self):
|
|
11176
|
-
return "
|
|
11707
|
+
return "FetchConversionLimitsResponse(min_from_amount={}, min_to_amount={})".format(self.min_from_amount, self.min_to_amount)
|
|
11177
11708
|
|
|
11178
11709
|
def __eq__(self, other):
|
|
11179
11710
|
if self.min_from_amount != other.min_from_amount:
|
|
@@ -11182,10 +11713,10 @@ class FetchTokenConversionLimitsResponse:
|
|
|
11182
11713
|
return False
|
|
11183
11714
|
return True
|
|
11184
11715
|
|
|
11185
|
-
class
|
|
11716
|
+
class _UniffiConverterTypeFetchConversionLimitsResponse(_UniffiConverterRustBuffer):
|
|
11186
11717
|
@staticmethod
|
|
11187
11718
|
def read(buf):
|
|
11188
|
-
return
|
|
11719
|
+
return FetchConversionLimitsResponse(
|
|
11189
11720
|
min_from_amount=_UniffiConverterOptionalTypeU128.read(buf),
|
|
11190
11721
|
min_to_amount=_UniffiConverterOptionalTypeU128.read(buf),
|
|
11191
11722
|
)
|
|
@@ -11503,6 +12034,35 @@ class _UniffiConverterTypeGetTokensMetadataResponse(_UniffiConverterRustBuffer):
|
|
|
11503
12034
|
_UniffiConverterSequenceTypeTokenMetadata.write(value.tokens_metadata, buf)
|
|
11504
12035
|
|
|
11505
12036
|
|
|
12037
|
+
class HashedMessageBytes:
|
|
12038
|
+
bytes: "bytes"
|
|
12039
|
+
def __init__(self, *, bytes: "bytes"):
|
|
12040
|
+
self.bytes = bytes
|
|
12041
|
+
|
|
12042
|
+
def __str__(self):
|
|
12043
|
+
return "HashedMessageBytes(bytes={})".format(self.bytes)
|
|
12044
|
+
|
|
12045
|
+
def __eq__(self, other):
|
|
12046
|
+
if self.bytes != other.bytes:
|
|
12047
|
+
return False
|
|
12048
|
+
return True
|
|
12049
|
+
|
|
12050
|
+
class _UniffiConverterTypeHashedMessageBytes(_UniffiConverterRustBuffer):
|
|
12051
|
+
@staticmethod
|
|
12052
|
+
def read(buf):
|
|
12053
|
+
return HashedMessageBytes(
|
|
12054
|
+
bytes=_UniffiConverterBytes.read(buf),
|
|
12055
|
+
)
|
|
12056
|
+
|
|
12057
|
+
@staticmethod
|
|
12058
|
+
def check_lower(value):
|
|
12059
|
+
_UniffiConverterBytes.check_lower(value.bytes)
|
|
12060
|
+
|
|
12061
|
+
@staticmethod
|
|
12062
|
+
def write(value, buf):
|
|
12063
|
+
_UniffiConverterBytes.write(value.bytes, buf)
|
|
12064
|
+
|
|
12065
|
+
|
|
11506
12066
|
class IdentifierCommitmentPair:
|
|
11507
12067
|
"""
|
|
11508
12068
|
FFI-safe wrapper for (Identifier, `SigningCommitments`) pair
|
|
@@ -12181,6 +12741,39 @@ class _UniffiConverterTypeLnurlAuthRequestDetails(_UniffiConverterRustBuffer):
|
|
|
12181
12741
|
_UniffiConverterString.write(value.url, buf)
|
|
12182
12742
|
|
|
12183
12743
|
|
|
12744
|
+
class LnurlErrorDetails:
|
|
12745
|
+
"""
|
|
12746
|
+
LNURL error details
|
|
12747
|
+
"""
|
|
12748
|
+
|
|
12749
|
+
reason: "str"
|
|
12750
|
+
def __init__(self, *, reason: "str"):
|
|
12751
|
+
self.reason = reason
|
|
12752
|
+
|
|
12753
|
+
def __str__(self):
|
|
12754
|
+
return "LnurlErrorDetails(reason={})".format(self.reason)
|
|
12755
|
+
|
|
12756
|
+
def __eq__(self, other):
|
|
12757
|
+
if self.reason != other.reason:
|
|
12758
|
+
return False
|
|
12759
|
+
return True
|
|
12760
|
+
|
|
12761
|
+
class _UniffiConverterTypeLnurlErrorDetails(_UniffiConverterRustBuffer):
|
|
12762
|
+
@staticmethod
|
|
12763
|
+
def read(buf):
|
|
12764
|
+
return LnurlErrorDetails(
|
|
12765
|
+
reason=_UniffiConverterString.read(buf),
|
|
12766
|
+
)
|
|
12767
|
+
|
|
12768
|
+
@staticmethod
|
|
12769
|
+
def check_lower(value):
|
|
12770
|
+
_UniffiConverterString.check_lower(value.reason)
|
|
12771
|
+
|
|
12772
|
+
@staticmethod
|
|
12773
|
+
def write(value, buf):
|
|
12774
|
+
_UniffiConverterString.write(value.reason, buf)
|
|
12775
|
+
|
|
12776
|
+
|
|
12184
12777
|
class LnurlPayInfo:
|
|
12185
12778
|
"""
|
|
12186
12779
|
Represents the payment LNURL info
|
|
@@ -12827,6 +13420,39 @@ class _UniffiConverterTypeLogEntry(_UniffiConverterRustBuffer):
|
|
|
12827
13420
|
_UniffiConverterString.write(value.level, buf)
|
|
12828
13421
|
|
|
12829
13422
|
|
|
13423
|
+
class MessageBytes:
|
|
13424
|
+
"""
|
|
13425
|
+
FFI-safe representation of a 32-byte message digest for ECDSA signing
|
|
13426
|
+
"""
|
|
13427
|
+
|
|
13428
|
+
bytes: "bytes"
|
|
13429
|
+
def __init__(self, *, bytes: "bytes"):
|
|
13430
|
+
self.bytes = bytes
|
|
13431
|
+
|
|
13432
|
+
def __str__(self):
|
|
13433
|
+
return "MessageBytes(bytes={})".format(self.bytes)
|
|
13434
|
+
|
|
13435
|
+
def __eq__(self, other):
|
|
13436
|
+
if self.bytes != other.bytes:
|
|
13437
|
+
return False
|
|
13438
|
+
return True
|
|
13439
|
+
|
|
13440
|
+
class _UniffiConverterTypeMessageBytes(_UniffiConverterRustBuffer):
|
|
13441
|
+
@staticmethod
|
|
13442
|
+
def read(buf):
|
|
13443
|
+
return MessageBytes(
|
|
13444
|
+
bytes=_UniffiConverterBytes.read(buf),
|
|
13445
|
+
)
|
|
13446
|
+
|
|
13447
|
+
@staticmethod
|
|
13448
|
+
def check_lower(value):
|
|
13449
|
+
_UniffiConverterBytes.check_lower(value.bytes)
|
|
13450
|
+
|
|
13451
|
+
@staticmethod
|
|
13452
|
+
def write(value, buf):
|
|
13453
|
+
_UniffiConverterBytes.write(value.bytes, buf)
|
|
13454
|
+
|
|
13455
|
+
|
|
12830
13456
|
class MessageSuccessActionData:
|
|
12831
13457
|
message: "str"
|
|
12832
13458
|
def __init__(self, *, message: "str"):
|
|
@@ -13143,16 +13769,16 @@ class PaymentMetadata:
|
|
|
13143
13769
|
lnurl_pay_info: "typing.Optional[LnurlPayInfo]"
|
|
13144
13770
|
lnurl_withdraw_info: "typing.Optional[LnurlWithdrawInfo]"
|
|
13145
13771
|
lnurl_description: "typing.Optional[str]"
|
|
13146
|
-
|
|
13147
|
-
def __init__(self, *, parent_payment_id: "typing.Optional[str]", lnurl_pay_info: "typing.Optional[LnurlPayInfo]", lnurl_withdraw_info: "typing.Optional[LnurlWithdrawInfo]", lnurl_description: "typing.Optional[str]",
|
|
13772
|
+
conversion_info: "typing.Optional[ConversionInfo]"
|
|
13773
|
+
def __init__(self, *, parent_payment_id: "typing.Optional[str]", lnurl_pay_info: "typing.Optional[LnurlPayInfo]", lnurl_withdraw_info: "typing.Optional[LnurlWithdrawInfo]", lnurl_description: "typing.Optional[str]", conversion_info: "typing.Optional[ConversionInfo]"):
|
|
13148
13774
|
self.parent_payment_id = parent_payment_id
|
|
13149
13775
|
self.lnurl_pay_info = lnurl_pay_info
|
|
13150
13776
|
self.lnurl_withdraw_info = lnurl_withdraw_info
|
|
13151
13777
|
self.lnurl_description = lnurl_description
|
|
13152
|
-
self.
|
|
13778
|
+
self.conversion_info = conversion_info
|
|
13153
13779
|
|
|
13154
13780
|
def __str__(self):
|
|
13155
|
-
return "PaymentMetadata(parent_payment_id={}, lnurl_pay_info={}, lnurl_withdraw_info={}, lnurl_description={},
|
|
13781
|
+
return "PaymentMetadata(parent_payment_id={}, lnurl_pay_info={}, lnurl_withdraw_info={}, lnurl_description={}, conversion_info={})".format(self.parent_payment_id, self.lnurl_pay_info, self.lnurl_withdraw_info, self.lnurl_description, self.conversion_info)
|
|
13156
13782
|
|
|
13157
13783
|
def __eq__(self, other):
|
|
13158
13784
|
if self.parent_payment_id != other.parent_payment_id:
|
|
@@ -13163,7 +13789,7 @@ class PaymentMetadata:
|
|
|
13163
13789
|
return False
|
|
13164
13790
|
if self.lnurl_description != other.lnurl_description:
|
|
13165
13791
|
return False
|
|
13166
|
-
if self.
|
|
13792
|
+
if self.conversion_info != other.conversion_info:
|
|
13167
13793
|
return False
|
|
13168
13794
|
return True
|
|
13169
13795
|
|
|
@@ -13175,7 +13801,7 @@ class _UniffiConverterTypePaymentMetadata(_UniffiConverterRustBuffer):
|
|
|
13175
13801
|
lnurl_pay_info=_UniffiConverterOptionalTypeLnurlPayInfo.read(buf),
|
|
13176
13802
|
lnurl_withdraw_info=_UniffiConverterOptionalTypeLnurlWithdrawInfo.read(buf),
|
|
13177
13803
|
lnurl_description=_UniffiConverterOptionalString.read(buf),
|
|
13178
|
-
|
|
13804
|
+
conversion_info=_UniffiConverterOptionalTypeConversionInfo.read(buf),
|
|
13179
13805
|
)
|
|
13180
13806
|
|
|
13181
13807
|
@staticmethod
|
|
@@ -13184,7 +13810,7 @@ class _UniffiConverterTypePaymentMetadata(_UniffiConverterRustBuffer):
|
|
|
13184
13810
|
_UniffiConverterOptionalTypeLnurlPayInfo.check_lower(value.lnurl_pay_info)
|
|
13185
13811
|
_UniffiConverterOptionalTypeLnurlWithdrawInfo.check_lower(value.lnurl_withdraw_info)
|
|
13186
13812
|
_UniffiConverterOptionalString.check_lower(value.lnurl_description)
|
|
13187
|
-
|
|
13813
|
+
_UniffiConverterOptionalTypeConversionInfo.check_lower(value.conversion_info)
|
|
13188
13814
|
|
|
13189
13815
|
@staticmethod
|
|
13190
13816
|
def write(value, buf):
|
|
@@ -13192,7 +13818,7 @@ class _UniffiConverterTypePaymentMetadata(_UniffiConverterRustBuffer):
|
|
|
13192
13818
|
_UniffiConverterOptionalTypeLnurlPayInfo.write(value.lnurl_pay_info, buf)
|
|
13193
13819
|
_UniffiConverterOptionalTypeLnurlWithdrawInfo.write(value.lnurl_withdraw_info, buf)
|
|
13194
13820
|
_UniffiConverterOptionalString.write(value.lnurl_description, buf)
|
|
13195
|
-
|
|
13821
|
+
_UniffiConverterOptionalTypeConversionInfo.write(value.conversion_info, buf)
|
|
13196
13822
|
|
|
13197
13823
|
|
|
13198
13824
|
class PaymentRequestSource:
|
|
@@ -13365,12 +13991,12 @@ class PrepareSendPaymentRequest:
|
|
|
13365
13991
|
May only be provided if the payment request is a spark address.
|
|
13366
13992
|
"""
|
|
13367
13993
|
|
|
13368
|
-
|
|
13994
|
+
conversion_options: "typing.Optional[ConversionOptions]"
|
|
13369
13995
|
"""
|
|
13370
|
-
If provided, the payment will include a
|
|
13996
|
+
If provided, the payment will include a conversion step before sending the payment
|
|
13371
13997
|
"""
|
|
13372
13998
|
|
|
13373
|
-
def __init__(self, *, payment_request: "str", amount: "typing.Optional[U128]" = _DEFAULT, token_identifier: "typing.Optional[str]" = _DEFAULT,
|
|
13999
|
+
def __init__(self, *, payment_request: "str", amount: "typing.Optional[U128]" = _DEFAULT, token_identifier: "typing.Optional[str]" = _DEFAULT, conversion_options: "typing.Optional[ConversionOptions]" = _DEFAULT):
|
|
13374
14000
|
self.payment_request = payment_request
|
|
13375
14001
|
if amount is _DEFAULT:
|
|
13376
14002
|
self.amount = None
|
|
@@ -13380,13 +14006,13 @@ class PrepareSendPaymentRequest:
|
|
|
13380
14006
|
self.token_identifier = None
|
|
13381
14007
|
else:
|
|
13382
14008
|
self.token_identifier = token_identifier
|
|
13383
|
-
if
|
|
13384
|
-
self.
|
|
14009
|
+
if conversion_options is _DEFAULT:
|
|
14010
|
+
self.conversion_options = None
|
|
13385
14011
|
else:
|
|
13386
|
-
self.
|
|
14012
|
+
self.conversion_options = conversion_options
|
|
13387
14013
|
|
|
13388
14014
|
def __str__(self):
|
|
13389
|
-
return "PrepareSendPaymentRequest(payment_request={}, amount={}, token_identifier={},
|
|
14015
|
+
return "PrepareSendPaymentRequest(payment_request={}, amount={}, token_identifier={}, conversion_options={})".format(self.payment_request, self.amount, self.token_identifier, self.conversion_options)
|
|
13390
14016
|
|
|
13391
14017
|
def __eq__(self, other):
|
|
13392
14018
|
if self.payment_request != other.payment_request:
|
|
@@ -13395,7 +14021,7 @@ class PrepareSendPaymentRequest:
|
|
|
13395
14021
|
return False
|
|
13396
14022
|
if self.token_identifier != other.token_identifier:
|
|
13397
14023
|
return False
|
|
13398
|
-
if self.
|
|
14024
|
+
if self.conversion_options != other.conversion_options:
|
|
13399
14025
|
return False
|
|
13400
14026
|
return True
|
|
13401
14027
|
|
|
@@ -13406,7 +14032,7 @@ class _UniffiConverterTypePrepareSendPaymentRequest(_UniffiConverterRustBuffer):
|
|
|
13406
14032
|
payment_request=_UniffiConverterString.read(buf),
|
|
13407
14033
|
amount=_UniffiConverterOptionalTypeU128.read(buf),
|
|
13408
14034
|
token_identifier=_UniffiConverterOptionalString.read(buf),
|
|
13409
|
-
|
|
14035
|
+
conversion_options=_UniffiConverterOptionalTypeConversionOptions.read(buf),
|
|
13410
14036
|
)
|
|
13411
14037
|
|
|
13412
14038
|
@staticmethod
|
|
@@ -13414,14 +14040,14 @@ class _UniffiConverterTypePrepareSendPaymentRequest(_UniffiConverterRustBuffer):
|
|
|
13414
14040
|
_UniffiConverterString.check_lower(value.payment_request)
|
|
13415
14041
|
_UniffiConverterOptionalTypeU128.check_lower(value.amount)
|
|
13416
14042
|
_UniffiConverterOptionalString.check_lower(value.token_identifier)
|
|
13417
|
-
|
|
14043
|
+
_UniffiConverterOptionalTypeConversionOptions.check_lower(value.conversion_options)
|
|
13418
14044
|
|
|
13419
14045
|
@staticmethod
|
|
13420
14046
|
def write(value, buf):
|
|
13421
14047
|
_UniffiConverterString.write(value.payment_request, buf)
|
|
13422
14048
|
_UniffiConverterOptionalTypeU128.write(value.amount, buf)
|
|
13423
14049
|
_UniffiConverterOptionalString.write(value.token_identifier, buf)
|
|
13424
|
-
|
|
14050
|
+
_UniffiConverterOptionalTypeConversionOptions.write(value.conversion_options, buf)
|
|
13425
14051
|
|
|
13426
14052
|
|
|
13427
14053
|
class PrepareSendPaymentResponse:
|
|
@@ -13438,25 +14064,19 @@ class PrepareSendPaymentResponse:
|
|
|
13438
14064
|
If empty, it is a Bitcoin payment.
|
|
13439
14065
|
"""
|
|
13440
14066
|
|
|
13441
|
-
|
|
13442
|
-
"""
|
|
13443
|
-
When set, the payment will include a token conversion step before sending the payment
|
|
13444
|
-
"""
|
|
13445
|
-
|
|
13446
|
-
token_conversion_fee: "typing.Optional[U128]"
|
|
14067
|
+
conversion_estimate: "typing.Optional[ConversionEstimate]"
|
|
13447
14068
|
"""
|
|
13448
|
-
|
|
14069
|
+
When set, the payment will include a conversion step before sending the payment
|
|
13449
14070
|
"""
|
|
13450
14071
|
|
|
13451
|
-
def __init__(self, *, payment_method: "SendPaymentMethod", amount: "U128", token_identifier: "typing.Optional[str]",
|
|
14072
|
+
def __init__(self, *, payment_method: "SendPaymentMethod", amount: "U128", token_identifier: "typing.Optional[str]", conversion_estimate: "typing.Optional[ConversionEstimate]"):
|
|
13452
14073
|
self.payment_method = payment_method
|
|
13453
14074
|
self.amount = amount
|
|
13454
14075
|
self.token_identifier = token_identifier
|
|
13455
|
-
self.
|
|
13456
|
-
self.token_conversion_fee = token_conversion_fee
|
|
14076
|
+
self.conversion_estimate = conversion_estimate
|
|
13457
14077
|
|
|
13458
14078
|
def __str__(self):
|
|
13459
|
-
return "PrepareSendPaymentResponse(payment_method={}, amount={}, token_identifier={},
|
|
14079
|
+
return "PrepareSendPaymentResponse(payment_method={}, amount={}, token_identifier={}, conversion_estimate={})".format(self.payment_method, self.amount, self.token_identifier, self.conversion_estimate)
|
|
13460
14080
|
|
|
13461
14081
|
def __eq__(self, other):
|
|
13462
14082
|
if self.payment_method != other.payment_method:
|
|
@@ -13465,9 +14085,7 @@ class PrepareSendPaymentResponse:
|
|
|
13465
14085
|
return False
|
|
13466
14086
|
if self.token_identifier != other.token_identifier:
|
|
13467
14087
|
return False
|
|
13468
|
-
if self.
|
|
13469
|
-
return False
|
|
13470
|
-
if self.token_conversion_fee != other.token_conversion_fee:
|
|
14088
|
+
if self.conversion_estimate != other.conversion_estimate:
|
|
13471
14089
|
return False
|
|
13472
14090
|
return True
|
|
13473
14091
|
|
|
@@ -13478,8 +14096,7 @@ class _UniffiConverterTypePrepareSendPaymentResponse(_UniffiConverterRustBuffer)
|
|
|
13478
14096
|
payment_method=_UniffiConverterTypeSendPaymentMethod.read(buf),
|
|
13479
14097
|
amount=_UniffiConverterTypeU128.read(buf),
|
|
13480
14098
|
token_identifier=_UniffiConverterOptionalString.read(buf),
|
|
13481
|
-
|
|
13482
|
-
token_conversion_fee=_UniffiConverterOptionalTypeU128.read(buf),
|
|
14099
|
+
conversion_estimate=_UniffiConverterOptionalTypeConversionEstimate.read(buf),
|
|
13483
14100
|
)
|
|
13484
14101
|
|
|
13485
14102
|
@staticmethod
|
|
@@ -13487,55 +14104,20 @@ class _UniffiConverterTypePrepareSendPaymentResponse(_UniffiConverterRustBuffer)
|
|
|
13487
14104
|
_UniffiConverterTypeSendPaymentMethod.check_lower(value.payment_method)
|
|
13488
14105
|
_UniffiConverterTypeU128.check_lower(value.amount)
|
|
13489
14106
|
_UniffiConverterOptionalString.check_lower(value.token_identifier)
|
|
13490
|
-
|
|
13491
|
-
_UniffiConverterOptionalTypeU128.check_lower(value.token_conversion_fee)
|
|
14107
|
+
_UniffiConverterOptionalTypeConversionEstimate.check_lower(value.conversion_estimate)
|
|
13492
14108
|
|
|
13493
14109
|
@staticmethod
|
|
13494
14110
|
def write(value, buf):
|
|
13495
14111
|
_UniffiConverterTypeSendPaymentMethod.write(value.payment_method, buf)
|
|
13496
14112
|
_UniffiConverterTypeU128.write(value.amount, buf)
|
|
13497
14113
|
_UniffiConverterOptionalString.write(value.token_identifier, buf)
|
|
13498
|
-
|
|
13499
|
-
_UniffiConverterOptionalTypeU128.write(value.token_conversion_fee, buf)
|
|
14114
|
+
_UniffiConverterOptionalTypeConversionEstimate.write(value.conversion_estimate, buf)
|
|
13500
14115
|
|
|
13501
14116
|
|
|
13502
|
-
class
|
|
14117
|
+
class ProvisionalPayment:
|
|
14118
|
+
payment_id: "str"
|
|
13503
14119
|
"""
|
|
13504
|
-
|
|
13505
|
-
"""
|
|
13506
|
-
|
|
13507
|
-
bytes: "bytes"
|
|
13508
|
-
def __init__(self, *, bytes: "bytes"):
|
|
13509
|
-
self.bytes = bytes
|
|
13510
|
-
|
|
13511
|
-
def __str__(self):
|
|
13512
|
-
return "PrivateKeyBytes(bytes={})".format(self.bytes)
|
|
13513
|
-
|
|
13514
|
-
def __eq__(self, other):
|
|
13515
|
-
if self.bytes != other.bytes:
|
|
13516
|
-
return False
|
|
13517
|
-
return True
|
|
13518
|
-
|
|
13519
|
-
class _UniffiConverterTypePrivateKeyBytes(_UniffiConverterRustBuffer):
|
|
13520
|
-
@staticmethod
|
|
13521
|
-
def read(buf):
|
|
13522
|
-
return PrivateKeyBytes(
|
|
13523
|
-
bytes=_UniffiConverterBytes.read(buf),
|
|
13524
|
-
)
|
|
13525
|
-
|
|
13526
|
-
@staticmethod
|
|
13527
|
-
def check_lower(value):
|
|
13528
|
-
_UniffiConverterBytes.check_lower(value.bytes)
|
|
13529
|
-
|
|
13530
|
-
@staticmethod
|
|
13531
|
-
def write(value, buf):
|
|
13532
|
-
_UniffiConverterBytes.write(value.bytes, buf)
|
|
13533
|
-
|
|
13534
|
-
|
|
13535
|
-
class ProvisionalPayment:
|
|
13536
|
-
payment_id: "str"
|
|
13537
|
-
"""
|
|
13538
|
-
Unique identifier for the payment
|
|
14120
|
+
Unique identifier for the payment
|
|
13539
14121
|
"""
|
|
13540
14122
|
|
|
13541
14123
|
amount: "U128"
|
|
@@ -14150,6 +14732,39 @@ class _UniffiConverterTypeSchnorrSignatureBytes(_UniffiConverterRustBuffer):
|
|
|
14150
14732
|
_UniffiConverterBytes.write(value.bytes, buf)
|
|
14151
14733
|
|
|
14152
14734
|
|
|
14735
|
+
class SecretBytes:
|
|
14736
|
+
"""
|
|
14737
|
+
FFI-safe representation of a private key (32 bytes)
|
|
14738
|
+
"""
|
|
14739
|
+
|
|
14740
|
+
bytes: "bytes"
|
|
14741
|
+
def __init__(self, *, bytes: "bytes"):
|
|
14742
|
+
self.bytes = bytes
|
|
14743
|
+
|
|
14744
|
+
def __str__(self):
|
|
14745
|
+
return "SecretBytes(bytes={})".format(self.bytes)
|
|
14746
|
+
|
|
14747
|
+
def __eq__(self, other):
|
|
14748
|
+
if self.bytes != other.bytes:
|
|
14749
|
+
return False
|
|
14750
|
+
return True
|
|
14751
|
+
|
|
14752
|
+
class _UniffiConverterTypeSecretBytes(_UniffiConverterRustBuffer):
|
|
14753
|
+
@staticmethod
|
|
14754
|
+
def read(buf):
|
|
14755
|
+
return SecretBytes(
|
|
14756
|
+
bytes=_UniffiConverterBytes.read(buf),
|
|
14757
|
+
)
|
|
14758
|
+
|
|
14759
|
+
@staticmethod
|
|
14760
|
+
def check_lower(value):
|
|
14761
|
+
_UniffiConverterBytes.check_lower(value.bytes)
|
|
14762
|
+
|
|
14763
|
+
@staticmethod
|
|
14764
|
+
def write(value, buf):
|
|
14765
|
+
_UniffiConverterBytes.write(value.bytes, buf)
|
|
14766
|
+
|
|
14767
|
+
|
|
14153
14768
|
class SendOnchainFeeQuote:
|
|
14154
14769
|
id: "str"
|
|
14155
14770
|
expires_at: "int"
|
|
@@ -14572,7 +15187,7 @@ class SparkHtlcDetails:
|
|
|
14572
15187
|
|
|
14573
15188
|
expiry_time: "int"
|
|
14574
15189
|
"""
|
|
14575
|
-
The expiry time of the HTLC
|
|
15190
|
+
The expiry time of the HTLC as a unix timestamp in seconds
|
|
14576
15191
|
"""
|
|
14577
15192
|
|
|
14578
15193
|
status: "SparkHtlcStatus"
|
|
@@ -14694,7 +15309,7 @@ class SparkInvoiceDetails:
|
|
|
14694
15309
|
|
|
14695
15310
|
expiry_time: "typing.Optional[int]"
|
|
14696
15311
|
"""
|
|
14697
|
-
Optional expiry time. If not provided, the invoice will never expire.
|
|
15312
|
+
Optional expiry time as a unix timestamp in seconds. If not provided, the invoice will never expire.
|
|
14698
15313
|
"""
|
|
14699
15314
|
|
|
14700
15315
|
description: "typing.Optional[str]"
|
|
@@ -14964,146 +15579,6 @@ class _UniffiConverterTypeTokenBalance(_UniffiConverterRustBuffer):
|
|
|
14964
15579
|
_UniffiConverterTypeTokenMetadata.write(value.token_metadata, buf)
|
|
14965
15580
|
|
|
14966
15581
|
|
|
14967
|
-
class TokenConversionInfo:
|
|
14968
|
-
pool_id: "str"
|
|
14969
|
-
"""
|
|
14970
|
-
The pool id associated with the conversion
|
|
14971
|
-
"""
|
|
14972
|
-
|
|
14973
|
-
payment_id: "typing.Optional[str]"
|
|
14974
|
-
"""
|
|
14975
|
-
The receiving payment id associated with the conversion
|
|
14976
|
-
"""
|
|
14977
|
-
|
|
14978
|
-
fee: "typing.Optional[U128]"
|
|
14979
|
-
"""
|
|
14980
|
-
The fee paid for the conversion
|
|
14981
|
-
Denominated in satoshis if converting from Bitcoin, otherwise in the token base units.
|
|
14982
|
-
"""
|
|
14983
|
-
|
|
14984
|
-
refund_identifier: "typing.Optional[str]"
|
|
14985
|
-
"""
|
|
14986
|
-
The refund payment id if a refund payment was made
|
|
14987
|
-
"""
|
|
14988
|
-
|
|
14989
|
-
def __init__(self, *, pool_id: "str", payment_id: "typing.Optional[str]", fee: "typing.Optional[U128]", refund_identifier: "typing.Optional[str]"):
|
|
14990
|
-
self.pool_id = pool_id
|
|
14991
|
-
self.payment_id = payment_id
|
|
14992
|
-
self.fee = fee
|
|
14993
|
-
self.refund_identifier = refund_identifier
|
|
14994
|
-
|
|
14995
|
-
def __str__(self):
|
|
14996
|
-
return "TokenConversionInfo(pool_id={}, payment_id={}, fee={}, refund_identifier={})".format(self.pool_id, self.payment_id, self.fee, self.refund_identifier)
|
|
14997
|
-
|
|
14998
|
-
def __eq__(self, other):
|
|
14999
|
-
if self.pool_id != other.pool_id:
|
|
15000
|
-
return False
|
|
15001
|
-
if self.payment_id != other.payment_id:
|
|
15002
|
-
return False
|
|
15003
|
-
if self.fee != other.fee:
|
|
15004
|
-
return False
|
|
15005
|
-
if self.refund_identifier != other.refund_identifier:
|
|
15006
|
-
return False
|
|
15007
|
-
return True
|
|
15008
|
-
|
|
15009
|
-
class _UniffiConverterTypeTokenConversionInfo(_UniffiConverterRustBuffer):
|
|
15010
|
-
@staticmethod
|
|
15011
|
-
def read(buf):
|
|
15012
|
-
return TokenConversionInfo(
|
|
15013
|
-
pool_id=_UniffiConverterString.read(buf),
|
|
15014
|
-
payment_id=_UniffiConverterOptionalString.read(buf),
|
|
15015
|
-
fee=_UniffiConverterOptionalTypeU128.read(buf),
|
|
15016
|
-
refund_identifier=_UniffiConverterOptionalString.read(buf),
|
|
15017
|
-
)
|
|
15018
|
-
|
|
15019
|
-
@staticmethod
|
|
15020
|
-
def check_lower(value):
|
|
15021
|
-
_UniffiConverterString.check_lower(value.pool_id)
|
|
15022
|
-
_UniffiConverterOptionalString.check_lower(value.payment_id)
|
|
15023
|
-
_UniffiConverterOptionalTypeU128.check_lower(value.fee)
|
|
15024
|
-
_UniffiConverterOptionalString.check_lower(value.refund_identifier)
|
|
15025
|
-
|
|
15026
|
-
@staticmethod
|
|
15027
|
-
def write(value, buf):
|
|
15028
|
-
_UniffiConverterString.write(value.pool_id, buf)
|
|
15029
|
-
_UniffiConverterOptionalString.write(value.payment_id, buf)
|
|
15030
|
-
_UniffiConverterOptionalTypeU128.write(value.fee, buf)
|
|
15031
|
-
_UniffiConverterOptionalString.write(value.refund_identifier, buf)
|
|
15032
|
-
|
|
15033
|
-
|
|
15034
|
-
class TokenConversionOptions:
|
|
15035
|
-
"""
|
|
15036
|
-
Options for token conversion when fulfilling a payment. When set, the SDK will
|
|
15037
|
-
perform a token conversion before fulfilling the payment. If not set, the payment
|
|
15038
|
-
will only be fulfilled if the wallet has sufficient balance of the required asset.
|
|
15039
|
-
"""
|
|
15040
|
-
|
|
15041
|
-
conversion_type: "TokenConversionType"
|
|
15042
|
-
"""
|
|
15043
|
-
The type of token conversion to perform when fulfilling the payment
|
|
15044
|
-
"""
|
|
15045
|
-
|
|
15046
|
-
max_slippage_bps: "typing.Optional[int]"
|
|
15047
|
-
"""
|
|
15048
|
-
The optional maximum slippage in basis points (1/100 of a percent) allowed when
|
|
15049
|
-
a token conversion is needed to fulfill the payment. Defaults to 50 bps (0.5%) if not set.
|
|
15050
|
-
The token conversion will fail if the actual amount received is less than
|
|
15051
|
-
`estimated_amount * (1 - max_slippage_bps / 10_000)`.
|
|
15052
|
-
"""
|
|
15053
|
-
|
|
15054
|
-
completion_timeout_secs: "typing.Optional[int]"
|
|
15055
|
-
"""
|
|
15056
|
-
The optional timeout in seconds to wait for the token conversion to complete
|
|
15057
|
-
when fulfilling the payment. This timeout only concerns waiting for the received
|
|
15058
|
-
payment of the token conversion. If the timeout is reached before the conversion
|
|
15059
|
-
is complete, the payment will fail. Defaults to 30 seconds if not set.
|
|
15060
|
-
"""
|
|
15061
|
-
|
|
15062
|
-
def __init__(self, *, conversion_type: "TokenConversionType", max_slippage_bps: "typing.Optional[int]" = _DEFAULT, completion_timeout_secs: "typing.Optional[int]" = _DEFAULT):
|
|
15063
|
-
self.conversion_type = conversion_type
|
|
15064
|
-
if max_slippage_bps is _DEFAULT:
|
|
15065
|
-
self.max_slippage_bps = None
|
|
15066
|
-
else:
|
|
15067
|
-
self.max_slippage_bps = max_slippage_bps
|
|
15068
|
-
if completion_timeout_secs is _DEFAULT:
|
|
15069
|
-
self.completion_timeout_secs = None
|
|
15070
|
-
else:
|
|
15071
|
-
self.completion_timeout_secs = completion_timeout_secs
|
|
15072
|
-
|
|
15073
|
-
def __str__(self):
|
|
15074
|
-
return "TokenConversionOptions(conversion_type={}, max_slippage_bps={}, completion_timeout_secs={})".format(self.conversion_type, self.max_slippage_bps, self.completion_timeout_secs)
|
|
15075
|
-
|
|
15076
|
-
def __eq__(self, other):
|
|
15077
|
-
if self.conversion_type != other.conversion_type:
|
|
15078
|
-
return False
|
|
15079
|
-
if self.max_slippage_bps != other.max_slippage_bps:
|
|
15080
|
-
return False
|
|
15081
|
-
if self.completion_timeout_secs != other.completion_timeout_secs:
|
|
15082
|
-
return False
|
|
15083
|
-
return True
|
|
15084
|
-
|
|
15085
|
-
class _UniffiConverterTypeTokenConversionOptions(_UniffiConverterRustBuffer):
|
|
15086
|
-
@staticmethod
|
|
15087
|
-
def read(buf):
|
|
15088
|
-
return TokenConversionOptions(
|
|
15089
|
-
conversion_type=_UniffiConverterTypeTokenConversionType.read(buf),
|
|
15090
|
-
max_slippage_bps=_UniffiConverterOptionalUInt32.read(buf),
|
|
15091
|
-
completion_timeout_secs=_UniffiConverterOptionalUInt32.read(buf),
|
|
15092
|
-
)
|
|
15093
|
-
|
|
15094
|
-
@staticmethod
|
|
15095
|
-
def check_lower(value):
|
|
15096
|
-
_UniffiConverterTypeTokenConversionType.check_lower(value.conversion_type)
|
|
15097
|
-
_UniffiConverterOptionalUInt32.check_lower(value.max_slippage_bps)
|
|
15098
|
-
_UniffiConverterOptionalUInt32.check_lower(value.completion_timeout_secs)
|
|
15099
|
-
|
|
15100
|
-
@staticmethod
|
|
15101
|
-
def write(value, buf):
|
|
15102
|
-
_UniffiConverterTypeTokenConversionType.write(value.conversion_type, buf)
|
|
15103
|
-
_UniffiConverterOptionalUInt32.write(value.max_slippage_bps, buf)
|
|
15104
|
-
_UniffiConverterOptionalUInt32.write(value.completion_timeout_secs, buf)
|
|
15105
|
-
|
|
15106
|
-
|
|
15107
15582
|
class TokenMetadata:
|
|
15108
15583
|
identifier: "str"
|
|
15109
15584
|
issuer_public_key: "str"
|
|
@@ -16021,6 +16496,272 @@ class _UniffiConverterTypeChainServiceError(_UniffiConverterRustBuffer):
|
|
|
16021
16496
|
|
|
16022
16497
|
|
|
16023
16498
|
|
|
16499
|
+
class ConversionPurpose:
|
|
16500
|
+
"""
|
|
16501
|
+
The purpose of the conversion, which is used to provide context for the conversion
|
|
16502
|
+
if its related to an ongoing payment or a self-transfer.
|
|
16503
|
+
"""
|
|
16504
|
+
|
|
16505
|
+
def __init__(self):
|
|
16506
|
+
raise RuntimeError("ConversionPurpose cannot be instantiated directly")
|
|
16507
|
+
|
|
16508
|
+
# Each enum variant is a nested class of the enum itself.
|
|
16509
|
+
class ONGOING_PAYMENT:
|
|
16510
|
+
"""
|
|
16511
|
+
Conversion is associated with an ongoing payment
|
|
16512
|
+
"""
|
|
16513
|
+
|
|
16514
|
+
payment_request: "str"
|
|
16515
|
+
"""
|
|
16516
|
+
The payment request of the ongoing payment
|
|
16517
|
+
"""
|
|
16518
|
+
|
|
16519
|
+
|
|
16520
|
+
def __init__(self,payment_request: "str"):
|
|
16521
|
+
self.payment_request = payment_request
|
|
16522
|
+
|
|
16523
|
+
def __str__(self):
|
|
16524
|
+
return "ConversionPurpose.ONGOING_PAYMENT(payment_request={})".format(self.payment_request)
|
|
16525
|
+
|
|
16526
|
+
def __eq__(self, other):
|
|
16527
|
+
if not other.is_ongoing_payment():
|
|
16528
|
+
return False
|
|
16529
|
+
if self.payment_request != other.payment_request:
|
|
16530
|
+
return False
|
|
16531
|
+
return True
|
|
16532
|
+
|
|
16533
|
+
class SELF_TRANSFER:
|
|
16534
|
+
"""
|
|
16535
|
+
Conversion is for self-transfer
|
|
16536
|
+
"""
|
|
16537
|
+
|
|
16538
|
+
|
|
16539
|
+
def __init__(self,):
|
|
16540
|
+
pass
|
|
16541
|
+
|
|
16542
|
+
def __str__(self):
|
|
16543
|
+
return "ConversionPurpose.SELF_TRANSFER()".format()
|
|
16544
|
+
|
|
16545
|
+
def __eq__(self, other):
|
|
16546
|
+
if not other.is_self_transfer():
|
|
16547
|
+
return False
|
|
16548
|
+
return True
|
|
16549
|
+
|
|
16550
|
+
|
|
16551
|
+
|
|
16552
|
+
# For each variant, we have an `is_NAME` method for easily checking
|
|
16553
|
+
# whether an instance is that variant.
|
|
16554
|
+
def is_ongoing_payment(self) -> bool:
|
|
16555
|
+
return isinstance(self, ConversionPurpose.ONGOING_PAYMENT)
|
|
16556
|
+
def is_self_transfer(self) -> bool:
|
|
16557
|
+
return isinstance(self, ConversionPurpose.SELF_TRANSFER)
|
|
16558
|
+
|
|
16559
|
+
|
|
16560
|
+
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
16561
|
+
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
16562
|
+
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
16563
|
+
ConversionPurpose.ONGOING_PAYMENT = type("ConversionPurpose.ONGOING_PAYMENT", (ConversionPurpose.ONGOING_PAYMENT, ConversionPurpose,), {}) # type: ignore
|
|
16564
|
+
ConversionPurpose.SELF_TRANSFER = type("ConversionPurpose.SELF_TRANSFER", (ConversionPurpose.SELF_TRANSFER, ConversionPurpose,), {}) # type: ignore
|
|
16565
|
+
|
|
16566
|
+
|
|
16567
|
+
|
|
16568
|
+
|
|
16569
|
+
class _UniffiConverterTypeConversionPurpose(_UniffiConverterRustBuffer):
|
|
16570
|
+
@staticmethod
|
|
16571
|
+
def read(buf):
|
|
16572
|
+
variant = buf.read_i32()
|
|
16573
|
+
if variant == 1:
|
|
16574
|
+
return ConversionPurpose.ONGOING_PAYMENT(
|
|
16575
|
+
_UniffiConverterString.read(buf),
|
|
16576
|
+
)
|
|
16577
|
+
if variant == 2:
|
|
16578
|
+
return ConversionPurpose.SELF_TRANSFER(
|
|
16579
|
+
)
|
|
16580
|
+
raise InternalError("Raw enum value doesn't match any cases")
|
|
16581
|
+
|
|
16582
|
+
@staticmethod
|
|
16583
|
+
def check_lower(value):
|
|
16584
|
+
if value.is_ongoing_payment():
|
|
16585
|
+
_UniffiConverterString.check_lower(value.payment_request)
|
|
16586
|
+
return
|
|
16587
|
+
if value.is_self_transfer():
|
|
16588
|
+
return
|
|
16589
|
+
raise ValueError(value)
|
|
16590
|
+
|
|
16591
|
+
@staticmethod
|
|
16592
|
+
def write(value, buf):
|
|
16593
|
+
if value.is_ongoing_payment():
|
|
16594
|
+
buf.write_i32(1)
|
|
16595
|
+
_UniffiConverterString.write(value.payment_request, buf)
|
|
16596
|
+
if value.is_self_transfer():
|
|
16597
|
+
buf.write_i32(2)
|
|
16598
|
+
|
|
16599
|
+
|
|
16600
|
+
|
|
16601
|
+
|
|
16602
|
+
|
|
16603
|
+
|
|
16604
|
+
|
|
16605
|
+
class ConversionStatus(enum.Enum):
|
|
16606
|
+
"""
|
|
16607
|
+
The status of the conversion
|
|
16608
|
+
"""
|
|
16609
|
+
|
|
16610
|
+
COMPLETED = 0
|
|
16611
|
+
"""
|
|
16612
|
+
The conversion was successful
|
|
16613
|
+
"""
|
|
16614
|
+
|
|
16615
|
+
|
|
16616
|
+
REFUND_NEEDED = 1
|
|
16617
|
+
"""
|
|
16618
|
+
The conversion failed and no refund was made yet, which requires action by the SDK to
|
|
16619
|
+
perform the refund. This can happen if there was a failure during the conversion process.
|
|
16620
|
+
"""
|
|
16621
|
+
|
|
16622
|
+
|
|
16623
|
+
REFUNDED = 2
|
|
16624
|
+
"""
|
|
16625
|
+
The conversion failed and a refund was made
|
|
16626
|
+
"""
|
|
16627
|
+
|
|
16628
|
+
|
|
16629
|
+
|
|
16630
|
+
|
|
16631
|
+
class _UniffiConverterTypeConversionStatus(_UniffiConverterRustBuffer):
|
|
16632
|
+
@staticmethod
|
|
16633
|
+
def read(buf):
|
|
16634
|
+
variant = buf.read_i32()
|
|
16635
|
+
if variant == 1:
|
|
16636
|
+
return ConversionStatus.COMPLETED
|
|
16637
|
+
if variant == 2:
|
|
16638
|
+
return ConversionStatus.REFUND_NEEDED
|
|
16639
|
+
if variant == 3:
|
|
16640
|
+
return ConversionStatus.REFUNDED
|
|
16641
|
+
raise InternalError("Raw enum value doesn't match any cases")
|
|
16642
|
+
|
|
16643
|
+
@staticmethod
|
|
16644
|
+
def check_lower(value):
|
|
16645
|
+
if value == ConversionStatus.COMPLETED:
|
|
16646
|
+
return
|
|
16647
|
+
if value == ConversionStatus.REFUND_NEEDED:
|
|
16648
|
+
return
|
|
16649
|
+
if value == ConversionStatus.REFUNDED:
|
|
16650
|
+
return
|
|
16651
|
+
raise ValueError(value)
|
|
16652
|
+
|
|
16653
|
+
@staticmethod
|
|
16654
|
+
def write(value, buf):
|
|
16655
|
+
if value == ConversionStatus.COMPLETED:
|
|
16656
|
+
buf.write_i32(1)
|
|
16657
|
+
if value == ConversionStatus.REFUND_NEEDED:
|
|
16658
|
+
buf.write_i32(2)
|
|
16659
|
+
if value == ConversionStatus.REFUNDED:
|
|
16660
|
+
buf.write_i32(3)
|
|
16661
|
+
|
|
16662
|
+
|
|
16663
|
+
|
|
16664
|
+
|
|
16665
|
+
|
|
16666
|
+
|
|
16667
|
+
|
|
16668
|
+
class ConversionType:
|
|
16669
|
+
def __init__(self):
|
|
16670
|
+
raise RuntimeError("ConversionType cannot be instantiated directly")
|
|
16671
|
+
|
|
16672
|
+
# Each enum variant is a nested class of the enum itself.
|
|
16673
|
+
class FROM_BITCOIN:
|
|
16674
|
+
"""
|
|
16675
|
+
Converting from Bitcoin to a token
|
|
16676
|
+
"""
|
|
16677
|
+
|
|
16678
|
+
|
|
16679
|
+
def __init__(self,):
|
|
16680
|
+
pass
|
|
16681
|
+
|
|
16682
|
+
def __str__(self):
|
|
16683
|
+
return "ConversionType.FROM_BITCOIN()".format()
|
|
16684
|
+
|
|
16685
|
+
def __eq__(self, other):
|
|
16686
|
+
if not other.is_from_bitcoin():
|
|
16687
|
+
return False
|
|
16688
|
+
return True
|
|
16689
|
+
|
|
16690
|
+
class TO_BITCOIN:
|
|
16691
|
+
"""
|
|
16692
|
+
Converting from a token to Bitcoin
|
|
16693
|
+
"""
|
|
16694
|
+
|
|
16695
|
+
from_token_identifier: "str"
|
|
16696
|
+
|
|
16697
|
+
def __init__(self,from_token_identifier: "str"):
|
|
16698
|
+
self.from_token_identifier = from_token_identifier
|
|
16699
|
+
|
|
16700
|
+
def __str__(self):
|
|
16701
|
+
return "ConversionType.TO_BITCOIN(from_token_identifier={})".format(self.from_token_identifier)
|
|
16702
|
+
|
|
16703
|
+
def __eq__(self, other):
|
|
16704
|
+
if not other.is_to_bitcoin():
|
|
16705
|
+
return False
|
|
16706
|
+
if self.from_token_identifier != other.from_token_identifier:
|
|
16707
|
+
return False
|
|
16708
|
+
return True
|
|
16709
|
+
|
|
16710
|
+
|
|
16711
|
+
|
|
16712
|
+
# For each variant, we have an `is_NAME` method for easily checking
|
|
16713
|
+
# whether an instance is that variant.
|
|
16714
|
+
def is_from_bitcoin(self) -> bool:
|
|
16715
|
+
return isinstance(self, ConversionType.FROM_BITCOIN)
|
|
16716
|
+
def is_to_bitcoin(self) -> bool:
|
|
16717
|
+
return isinstance(self, ConversionType.TO_BITCOIN)
|
|
16718
|
+
|
|
16719
|
+
|
|
16720
|
+
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
16721
|
+
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
16722
|
+
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
16723
|
+
ConversionType.FROM_BITCOIN = type("ConversionType.FROM_BITCOIN", (ConversionType.FROM_BITCOIN, ConversionType,), {}) # type: ignore
|
|
16724
|
+
ConversionType.TO_BITCOIN = type("ConversionType.TO_BITCOIN", (ConversionType.TO_BITCOIN, ConversionType,), {}) # type: ignore
|
|
16725
|
+
|
|
16726
|
+
|
|
16727
|
+
|
|
16728
|
+
|
|
16729
|
+
class _UniffiConverterTypeConversionType(_UniffiConverterRustBuffer):
|
|
16730
|
+
@staticmethod
|
|
16731
|
+
def read(buf):
|
|
16732
|
+
variant = buf.read_i32()
|
|
16733
|
+
if variant == 1:
|
|
16734
|
+
return ConversionType.FROM_BITCOIN(
|
|
16735
|
+
)
|
|
16736
|
+
if variant == 2:
|
|
16737
|
+
return ConversionType.TO_BITCOIN(
|
|
16738
|
+
_UniffiConverterString.read(buf),
|
|
16739
|
+
)
|
|
16740
|
+
raise InternalError("Raw enum value doesn't match any cases")
|
|
16741
|
+
|
|
16742
|
+
@staticmethod
|
|
16743
|
+
def check_lower(value):
|
|
16744
|
+
if value.is_from_bitcoin():
|
|
16745
|
+
return
|
|
16746
|
+
if value.is_to_bitcoin():
|
|
16747
|
+
_UniffiConverterString.check_lower(value.from_token_identifier)
|
|
16748
|
+
return
|
|
16749
|
+
raise ValueError(value)
|
|
16750
|
+
|
|
16751
|
+
@staticmethod
|
|
16752
|
+
def write(value, buf):
|
|
16753
|
+
if value.is_from_bitcoin():
|
|
16754
|
+
buf.write_i32(1)
|
|
16755
|
+
if value.is_to_bitcoin():
|
|
16756
|
+
buf.write_i32(2)
|
|
16757
|
+
_UniffiConverterString.write(value.from_token_identifier, buf)
|
|
16758
|
+
|
|
16759
|
+
|
|
16760
|
+
|
|
16761
|
+
|
|
16762
|
+
|
|
16763
|
+
|
|
16764
|
+
|
|
16024
16765
|
class DepositClaimError:
|
|
16025
16766
|
def __init__(self):
|
|
16026
16767
|
raise RuntimeError("DepositClaimError cannot be instantiated directly")
|
|
@@ -16180,13 +16921,13 @@ class _UniffiConverterTypeDepositClaimError(_UniffiConverterRustBuffer):
|
|
|
16180
16921
|
|
|
16181
16922
|
|
|
16182
16923
|
|
|
16183
|
-
class
|
|
16924
|
+
class ExternalSecretSource:
|
|
16184
16925
|
"""
|
|
16185
|
-
FFI-safe representation of `spark_wallet::
|
|
16926
|
+
FFI-safe representation of `spark_wallet::SecretSource`
|
|
16186
16927
|
"""
|
|
16187
16928
|
|
|
16188
16929
|
def __init__(self):
|
|
16189
|
-
raise RuntimeError("
|
|
16930
|
+
raise RuntimeError("ExternalSecretSource cannot be instantiated directly")
|
|
16190
16931
|
|
|
16191
16932
|
# Each enum variant is a nested class of the enum itself.
|
|
16192
16933
|
class DERIVED:
|
|
@@ -16200,7 +16941,7 @@ class ExternalPrivateKeySource:
|
|
|
16200
16941
|
self.node_id = node_id
|
|
16201
16942
|
|
|
16202
16943
|
def __str__(self):
|
|
16203
|
-
return "
|
|
16944
|
+
return "ExternalSecretSource.DERIVED(node_id={})".format(self.node_id)
|
|
16204
16945
|
|
|
16205
16946
|
def __eq__(self, other):
|
|
16206
16947
|
if not other.is_derived():
|
|
@@ -16214,13 +16955,13 @@ class ExternalPrivateKeySource:
|
|
|
16214
16955
|
Encrypted private key
|
|
16215
16956
|
"""
|
|
16216
16957
|
|
|
16217
|
-
key: "
|
|
16958
|
+
key: "ExternalEncryptedSecret"
|
|
16218
16959
|
|
|
16219
|
-
def __init__(self,key: "
|
|
16960
|
+
def __init__(self,key: "ExternalEncryptedSecret"):
|
|
16220
16961
|
self.key = key
|
|
16221
16962
|
|
|
16222
16963
|
def __str__(self):
|
|
16223
|
-
return "
|
|
16964
|
+
return "ExternalSecretSource.ENCRYPTED(key={})".format(self.key)
|
|
16224
16965
|
|
|
16225
16966
|
def __eq__(self, other):
|
|
16226
16967
|
if not other.is_encrypted():
|
|
@@ -16234,31 +16975,31 @@ class ExternalPrivateKeySource:
|
|
|
16234
16975
|
# For each variant, we have an `is_NAME` method for easily checking
|
|
16235
16976
|
# whether an instance is that variant.
|
|
16236
16977
|
def is_derived(self) -> bool:
|
|
16237
|
-
return isinstance(self,
|
|
16978
|
+
return isinstance(self, ExternalSecretSource.DERIVED)
|
|
16238
16979
|
def is_encrypted(self) -> bool:
|
|
16239
|
-
return isinstance(self,
|
|
16980
|
+
return isinstance(self, ExternalSecretSource.ENCRYPTED)
|
|
16240
16981
|
|
|
16241
16982
|
|
|
16242
16983
|
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
16243
16984
|
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
16244
16985
|
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
16245
|
-
|
|
16246
|
-
|
|
16986
|
+
ExternalSecretSource.DERIVED = type("ExternalSecretSource.DERIVED", (ExternalSecretSource.DERIVED, ExternalSecretSource,), {}) # type: ignore
|
|
16987
|
+
ExternalSecretSource.ENCRYPTED = type("ExternalSecretSource.ENCRYPTED", (ExternalSecretSource.ENCRYPTED, ExternalSecretSource,), {}) # type: ignore
|
|
16247
16988
|
|
|
16248
16989
|
|
|
16249
16990
|
|
|
16250
16991
|
|
|
16251
|
-
class
|
|
16992
|
+
class _UniffiConverterTypeExternalSecretSource(_UniffiConverterRustBuffer):
|
|
16252
16993
|
@staticmethod
|
|
16253
16994
|
def read(buf):
|
|
16254
16995
|
variant = buf.read_i32()
|
|
16255
16996
|
if variant == 1:
|
|
16256
|
-
return
|
|
16997
|
+
return ExternalSecretSource.DERIVED(
|
|
16257
16998
|
_UniffiConverterTypeExternalTreeNodeId.read(buf),
|
|
16258
16999
|
)
|
|
16259
17000
|
if variant == 2:
|
|
16260
|
-
return
|
|
16261
|
-
|
|
17001
|
+
return ExternalSecretSource.ENCRYPTED(
|
|
17002
|
+
_UniffiConverterTypeExternalEncryptedSecret.read(buf),
|
|
16262
17003
|
)
|
|
16263
17004
|
raise InternalError("Raw enum value doesn't match any cases")
|
|
16264
17005
|
|
|
@@ -16268,7 +17009,7 @@ class _UniffiConverterTypeExternalPrivateKeySource(_UniffiConverterRustBuffer):
|
|
|
16268
17009
|
_UniffiConverterTypeExternalTreeNodeId.check_lower(value.node_id)
|
|
16269
17010
|
return
|
|
16270
17011
|
if value.is_encrypted():
|
|
16271
|
-
|
|
17012
|
+
_UniffiConverterTypeExternalEncryptedSecret.check_lower(value.key)
|
|
16272
17013
|
return
|
|
16273
17014
|
raise ValueError(value)
|
|
16274
17015
|
|
|
@@ -16279,7 +17020,7 @@ class _UniffiConverterTypeExternalPrivateKeySource(_UniffiConverterRustBuffer):
|
|
|
16279
17020
|
_UniffiConverterTypeExternalTreeNodeId.write(value.node_id, buf)
|
|
16280
17021
|
if value.is_encrypted():
|
|
16281
17022
|
buf.write_i32(2)
|
|
16282
|
-
|
|
17023
|
+
_UniffiConverterTypeExternalEncryptedSecret.write(value.key, buf)
|
|
16283
17024
|
|
|
16284
17025
|
|
|
16285
17026
|
|
|
@@ -16296,21 +17037,21 @@ class ExternalSecretToSplit:
|
|
|
16296
17037
|
raise RuntimeError("ExternalSecretToSplit cannot be instantiated directly")
|
|
16297
17038
|
|
|
16298
17039
|
# Each enum variant is a nested class of the enum itself.
|
|
16299
|
-
class
|
|
17040
|
+
class SECRET_SOURCE:
|
|
16300
17041
|
"""
|
|
16301
|
-
A
|
|
17042
|
+
A secret source to split
|
|
16302
17043
|
"""
|
|
16303
17044
|
|
|
16304
|
-
source: "
|
|
17045
|
+
source: "ExternalSecretSource"
|
|
16305
17046
|
|
|
16306
|
-
def __init__(self,source: "
|
|
17047
|
+
def __init__(self,source: "ExternalSecretSource"):
|
|
16307
17048
|
self.source = source
|
|
16308
17049
|
|
|
16309
17050
|
def __str__(self):
|
|
16310
|
-
return "ExternalSecretToSplit.
|
|
17051
|
+
return "ExternalSecretToSplit.SECRET_SOURCE(source={})".format(self.source)
|
|
16311
17052
|
|
|
16312
17053
|
def __eq__(self, other):
|
|
16313
|
-
if not other.
|
|
17054
|
+
if not other.is_secret_source():
|
|
16314
17055
|
return False
|
|
16315
17056
|
if self.source != other.source:
|
|
16316
17057
|
return False
|
|
@@ -16340,8 +17081,8 @@ class ExternalSecretToSplit:
|
|
|
16340
17081
|
|
|
16341
17082
|
# For each variant, we have an `is_NAME` method for easily checking
|
|
16342
17083
|
# whether an instance is that variant.
|
|
16343
|
-
def
|
|
16344
|
-
return isinstance(self, ExternalSecretToSplit.
|
|
17084
|
+
def is_secret_source(self) -> bool:
|
|
17085
|
+
return isinstance(self, ExternalSecretToSplit.SECRET_SOURCE)
|
|
16345
17086
|
def is_preimage(self) -> bool:
|
|
16346
17087
|
return isinstance(self, ExternalSecretToSplit.PREIMAGE)
|
|
16347
17088
|
|
|
@@ -16349,7 +17090,7 @@ class ExternalSecretToSplit:
|
|
|
16349
17090
|
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
16350
17091
|
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
16351
17092
|
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
16352
|
-
ExternalSecretToSplit.
|
|
17093
|
+
ExternalSecretToSplit.SECRET_SOURCE = type("ExternalSecretToSplit.SECRET_SOURCE", (ExternalSecretToSplit.SECRET_SOURCE, ExternalSecretToSplit,), {}) # type: ignore
|
|
16353
17094
|
ExternalSecretToSplit.PREIMAGE = type("ExternalSecretToSplit.PREIMAGE", (ExternalSecretToSplit.PREIMAGE, ExternalSecretToSplit,), {}) # type: ignore
|
|
16354
17095
|
|
|
16355
17096
|
|
|
@@ -16360,8 +17101,8 @@ class _UniffiConverterTypeExternalSecretToSplit(_UniffiConverterRustBuffer):
|
|
|
16360
17101
|
def read(buf):
|
|
16361
17102
|
variant = buf.read_i32()
|
|
16362
17103
|
if variant == 1:
|
|
16363
|
-
return ExternalSecretToSplit.
|
|
16364
|
-
|
|
17104
|
+
return ExternalSecretToSplit.SECRET_SOURCE(
|
|
17105
|
+
_UniffiConverterTypeExternalSecretSource.read(buf),
|
|
16365
17106
|
)
|
|
16366
17107
|
if variant == 2:
|
|
16367
17108
|
return ExternalSecretToSplit.PREIMAGE(
|
|
@@ -16371,8 +17112,8 @@ class _UniffiConverterTypeExternalSecretToSplit(_UniffiConverterRustBuffer):
|
|
|
16371
17112
|
|
|
16372
17113
|
@staticmethod
|
|
16373
17114
|
def check_lower(value):
|
|
16374
|
-
if value.
|
|
16375
|
-
|
|
17115
|
+
if value.is_secret_source():
|
|
17116
|
+
_UniffiConverterTypeExternalSecretSource.check_lower(value.source)
|
|
16376
17117
|
return
|
|
16377
17118
|
if value.is_preimage():
|
|
16378
17119
|
_UniffiConverterBytes.check_lower(value.data)
|
|
@@ -16381,9 +17122,9 @@ class _UniffiConverterTypeExternalSecretToSplit(_UniffiConverterRustBuffer):
|
|
|
16381
17122
|
|
|
16382
17123
|
@staticmethod
|
|
16383
17124
|
def write(value, buf):
|
|
16384
|
-
if value.
|
|
17125
|
+
if value.is_secret_source():
|
|
16385
17126
|
buf.write_i32(1)
|
|
16386
|
-
|
|
17127
|
+
_UniffiConverterTypeExternalSecretSource.write(value.source, buf)
|
|
16387
17128
|
if value.is_preimage():
|
|
16388
17129
|
buf.write_i32(2)
|
|
16389
17130
|
_UniffiConverterBytes.write(value.data, buf)
|
|
@@ -16960,61 +17701,162 @@ class _UniffiConverterTypeInputType(_UniffiConverterRustBuffer):
|
|
|
16960
17701
|
|
|
16961
17702
|
|
|
16962
17703
|
|
|
16963
|
-
class KeySetType(enum.Enum):
|
|
16964
|
-
DEFAULT = 0
|
|
16965
|
-
|
|
16966
|
-
TAPROOT = 1
|
|
16967
|
-
|
|
16968
|
-
NATIVE_SEGWIT = 2
|
|
17704
|
+
class KeySetType(enum.Enum):
|
|
17705
|
+
DEFAULT = 0
|
|
17706
|
+
|
|
17707
|
+
TAPROOT = 1
|
|
17708
|
+
|
|
17709
|
+
NATIVE_SEGWIT = 2
|
|
17710
|
+
|
|
17711
|
+
WRAPPED_SEGWIT = 3
|
|
17712
|
+
|
|
17713
|
+
LEGACY = 4
|
|
17714
|
+
|
|
17715
|
+
|
|
17716
|
+
|
|
17717
|
+
class _UniffiConverterTypeKeySetType(_UniffiConverterRustBuffer):
|
|
17718
|
+
@staticmethod
|
|
17719
|
+
def read(buf):
|
|
17720
|
+
variant = buf.read_i32()
|
|
17721
|
+
if variant == 1:
|
|
17722
|
+
return KeySetType.DEFAULT
|
|
17723
|
+
if variant == 2:
|
|
17724
|
+
return KeySetType.TAPROOT
|
|
17725
|
+
if variant == 3:
|
|
17726
|
+
return KeySetType.NATIVE_SEGWIT
|
|
17727
|
+
if variant == 4:
|
|
17728
|
+
return KeySetType.WRAPPED_SEGWIT
|
|
17729
|
+
if variant == 5:
|
|
17730
|
+
return KeySetType.LEGACY
|
|
17731
|
+
raise InternalError("Raw enum value doesn't match any cases")
|
|
17732
|
+
|
|
17733
|
+
@staticmethod
|
|
17734
|
+
def check_lower(value):
|
|
17735
|
+
if value == KeySetType.DEFAULT:
|
|
17736
|
+
return
|
|
17737
|
+
if value == KeySetType.TAPROOT:
|
|
17738
|
+
return
|
|
17739
|
+
if value == KeySetType.NATIVE_SEGWIT:
|
|
17740
|
+
return
|
|
17741
|
+
if value == KeySetType.WRAPPED_SEGWIT:
|
|
17742
|
+
return
|
|
17743
|
+
if value == KeySetType.LEGACY:
|
|
17744
|
+
return
|
|
17745
|
+
raise ValueError(value)
|
|
17746
|
+
|
|
17747
|
+
@staticmethod
|
|
17748
|
+
def write(value, buf):
|
|
17749
|
+
if value == KeySetType.DEFAULT:
|
|
17750
|
+
buf.write_i32(1)
|
|
17751
|
+
if value == KeySetType.TAPROOT:
|
|
17752
|
+
buf.write_i32(2)
|
|
17753
|
+
if value == KeySetType.NATIVE_SEGWIT:
|
|
17754
|
+
buf.write_i32(3)
|
|
17755
|
+
if value == KeySetType.WRAPPED_SEGWIT:
|
|
17756
|
+
buf.write_i32(4)
|
|
17757
|
+
if value == KeySetType.LEGACY:
|
|
17758
|
+
buf.write_i32(5)
|
|
17759
|
+
|
|
17760
|
+
|
|
17761
|
+
|
|
17762
|
+
|
|
17763
|
+
|
|
17764
|
+
|
|
17765
|
+
|
|
17766
|
+
class LnurlCallbackStatus:
|
|
17767
|
+
"""
|
|
17768
|
+
The response from a LNURL-auth callback, indicating success or failure.
|
|
17769
|
+
"""
|
|
17770
|
+
|
|
17771
|
+
def __init__(self):
|
|
17772
|
+
raise RuntimeError("LnurlCallbackStatus cannot be instantiated directly")
|
|
17773
|
+
|
|
17774
|
+
# Each enum variant is a nested class of the enum itself.
|
|
17775
|
+
class OK:
|
|
17776
|
+
"""
|
|
17777
|
+
On-wire format is: `{"status": "OK"}`
|
|
17778
|
+
"""
|
|
17779
|
+
|
|
17780
|
+
|
|
17781
|
+
def __init__(self,):
|
|
17782
|
+
pass
|
|
17783
|
+
|
|
17784
|
+
def __str__(self):
|
|
17785
|
+
return "LnurlCallbackStatus.OK()".format()
|
|
17786
|
+
|
|
17787
|
+
def __eq__(self, other):
|
|
17788
|
+
if not other.is_ok():
|
|
17789
|
+
return False
|
|
17790
|
+
return True
|
|
17791
|
+
|
|
17792
|
+
class ERROR_STATUS:
|
|
17793
|
+
"""
|
|
17794
|
+
On-wire format is: `{"status": "ERROR", "reason": "error details..."}`
|
|
17795
|
+
"""
|
|
17796
|
+
|
|
17797
|
+
error_details: "LnurlErrorDetails"
|
|
17798
|
+
|
|
17799
|
+
def __init__(self,error_details: "LnurlErrorDetails"):
|
|
17800
|
+
self.error_details = error_details
|
|
17801
|
+
|
|
17802
|
+
def __str__(self):
|
|
17803
|
+
return "LnurlCallbackStatus.ERROR_STATUS(error_details={})".format(self.error_details)
|
|
17804
|
+
|
|
17805
|
+
def __eq__(self, other):
|
|
17806
|
+
if not other.is_error_status():
|
|
17807
|
+
return False
|
|
17808
|
+
if self.error_details != other.error_details:
|
|
17809
|
+
return False
|
|
17810
|
+
return True
|
|
16969
17811
|
|
|
16970
|
-
WRAPPED_SEGWIT = 3
|
|
16971
17812
|
|
|
16972
|
-
|
|
17813
|
+
|
|
17814
|
+
# For each variant, we have an `is_NAME` method for easily checking
|
|
17815
|
+
# whether an instance is that variant.
|
|
17816
|
+
def is_ok(self) -> bool:
|
|
17817
|
+
return isinstance(self, LnurlCallbackStatus.OK)
|
|
17818
|
+
def is_error_status(self) -> bool:
|
|
17819
|
+
return isinstance(self, LnurlCallbackStatus.ERROR_STATUS)
|
|
16973
17820
|
|
|
16974
17821
|
|
|
17822
|
+
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
17823
|
+
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
17824
|
+
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
17825
|
+
LnurlCallbackStatus.OK = type("LnurlCallbackStatus.OK", (LnurlCallbackStatus.OK, LnurlCallbackStatus,), {}) # type: ignore
|
|
17826
|
+
LnurlCallbackStatus.ERROR_STATUS = type("LnurlCallbackStatus.ERROR_STATUS", (LnurlCallbackStatus.ERROR_STATUS, LnurlCallbackStatus,), {}) # type: ignore
|
|
17827
|
+
|
|
16975
17828
|
|
|
16976
|
-
|
|
17829
|
+
|
|
17830
|
+
|
|
17831
|
+
class _UniffiConverterTypeLnurlCallbackStatus(_UniffiConverterRustBuffer):
|
|
16977
17832
|
@staticmethod
|
|
16978
17833
|
def read(buf):
|
|
16979
17834
|
variant = buf.read_i32()
|
|
16980
17835
|
if variant == 1:
|
|
16981
|
-
return
|
|
17836
|
+
return LnurlCallbackStatus.OK(
|
|
17837
|
+
)
|
|
16982
17838
|
if variant == 2:
|
|
16983
|
-
return
|
|
16984
|
-
|
|
16985
|
-
|
|
16986
|
-
if variant == 4:
|
|
16987
|
-
return KeySetType.WRAPPED_SEGWIT
|
|
16988
|
-
if variant == 5:
|
|
16989
|
-
return KeySetType.LEGACY
|
|
17839
|
+
return LnurlCallbackStatus.ERROR_STATUS(
|
|
17840
|
+
_UniffiConverterTypeLnurlErrorDetails.read(buf),
|
|
17841
|
+
)
|
|
16990
17842
|
raise InternalError("Raw enum value doesn't match any cases")
|
|
16991
17843
|
|
|
16992
17844
|
@staticmethod
|
|
16993
17845
|
def check_lower(value):
|
|
16994
|
-
if value
|
|
16995
|
-
return
|
|
16996
|
-
if value == KeySetType.TAPROOT:
|
|
16997
|
-
return
|
|
16998
|
-
if value == KeySetType.NATIVE_SEGWIT:
|
|
16999
|
-
return
|
|
17000
|
-
if value == KeySetType.WRAPPED_SEGWIT:
|
|
17846
|
+
if value.is_ok():
|
|
17001
17847
|
return
|
|
17002
|
-
if value
|
|
17848
|
+
if value.is_error_status():
|
|
17849
|
+
_UniffiConverterTypeLnurlErrorDetails.check_lower(value.error_details)
|
|
17003
17850
|
return
|
|
17004
17851
|
raise ValueError(value)
|
|
17005
17852
|
|
|
17006
17853
|
@staticmethod
|
|
17007
17854
|
def write(value, buf):
|
|
17008
|
-
if value
|
|
17855
|
+
if value.is_ok():
|
|
17009
17856
|
buf.write_i32(1)
|
|
17010
|
-
if value
|
|
17857
|
+
if value.is_error_status():
|
|
17011
17858
|
buf.write_i32(2)
|
|
17012
|
-
|
|
17013
|
-
buf.write_i32(3)
|
|
17014
|
-
if value == KeySetType.WRAPPED_SEGWIT:
|
|
17015
|
-
buf.write_i32(4)
|
|
17016
|
-
if value == KeySetType.LEGACY:
|
|
17017
|
-
buf.write_i32(5)
|
|
17859
|
+
_UniffiConverterTypeLnurlErrorDetails.write(value.error_details, buf)
|
|
17018
17860
|
|
|
17019
17861
|
|
|
17020
17862
|
|
|
@@ -17470,19 +18312,19 @@ class PaymentDetails:
|
|
|
17470
18312
|
The HTLC transfer details if the payment fulfilled an HTLC transfer
|
|
17471
18313
|
"""
|
|
17472
18314
|
|
|
17473
|
-
|
|
18315
|
+
conversion_info: "typing.Optional[ConversionInfo]"
|
|
17474
18316
|
"""
|
|
17475
|
-
The information for a
|
|
18317
|
+
The information for a conversion
|
|
17476
18318
|
"""
|
|
17477
18319
|
|
|
17478
18320
|
|
|
17479
|
-
def __init__(self,invoice_details: "typing.Optional[SparkInvoicePaymentDetails]", htlc_details: "typing.Optional[SparkHtlcDetails]",
|
|
18321
|
+
def __init__(self,invoice_details: "typing.Optional[SparkInvoicePaymentDetails]", htlc_details: "typing.Optional[SparkHtlcDetails]", conversion_info: "typing.Optional[ConversionInfo]"):
|
|
17480
18322
|
self.invoice_details = invoice_details
|
|
17481
18323
|
self.htlc_details = htlc_details
|
|
17482
|
-
self.
|
|
18324
|
+
self.conversion_info = conversion_info
|
|
17483
18325
|
|
|
17484
18326
|
def __str__(self):
|
|
17485
|
-
return "PaymentDetails.SPARK(invoice_details={}, htlc_details={},
|
|
18327
|
+
return "PaymentDetails.SPARK(invoice_details={}, htlc_details={}, conversion_info={})".format(self.invoice_details, self.htlc_details, self.conversion_info)
|
|
17486
18328
|
|
|
17487
18329
|
def __eq__(self, other):
|
|
17488
18330
|
if not other.is_spark():
|
|
@@ -17491,7 +18333,7 @@ class PaymentDetails:
|
|
|
17491
18333
|
return False
|
|
17492
18334
|
if self.htlc_details != other.htlc_details:
|
|
17493
18335
|
return False
|
|
17494
|
-
if self.
|
|
18336
|
+
if self.conversion_info != other.conversion_info:
|
|
17495
18337
|
return False
|
|
17496
18338
|
return True
|
|
17497
18339
|
|
|
@@ -17503,20 +18345,20 @@ class PaymentDetails:
|
|
|
17503
18345
|
The invoice details if the payment fulfilled a spark invoice
|
|
17504
18346
|
"""
|
|
17505
18347
|
|
|
17506
|
-
|
|
18348
|
+
conversion_info: "typing.Optional[ConversionInfo]"
|
|
17507
18349
|
"""
|
|
17508
|
-
The information for a
|
|
18350
|
+
The information for a conversion
|
|
17509
18351
|
"""
|
|
17510
18352
|
|
|
17511
18353
|
|
|
17512
|
-
def __init__(self,metadata: "TokenMetadata", tx_hash: "str", invoice_details: "typing.Optional[SparkInvoicePaymentDetails]",
|
|
18354
|
+
def __init__(self,metadata: "TokenMetadata", tx_hash: "str", invoice_details: "typing.Optional[SparkInvoicePaymentDetails]", conversion_info: "typing.Optional[ConversionInfo]"):
|
|
17513
18355
|
self.metadata = metadata
|
|
17514
18356
|
self.tx_hash = tx_hash
|
|
17515
18357
|
self.invoice_details = invoice_details
|
|
17516
|
-
self.
|
|
18358
|
+
self.conversion_info = conversion_info
|
|
17517
18359
|
|
|
17518
18360
|
def __str__(self):
|
|
17519
|
-
return "PaymentDetails.TOKEN(metadata={}, tx_hash={}, invoice_details={},
|
|
18361
|
+
return "PaymentDetails.TOKEN(metadata={}, tx_hash={}, invoice_details={}, conversion_info={})".format(self.metadata, self.tx_hash, self.invoice_details, self.conversion_info)
|
|
17520
18362
|
|
|
17521
18363
|
def __eq__(self, other):
|
|
17522
18364
|
if not other.is_token():
|
|
@@ -17527,7 +18369,7 @@ class PaymentDetails:
|
|
|
17527
18369
|
return False
|
|
17528
18370
|
if self.invoice_details != other.invoice_details:
|
|
17529
18371
|
return False
|
|
17530
|
-
if self.
|
|
18372
|
+
if self.conversion_info != other.conversion_info:
|
|
17531
18373
|
return False
|
|
17532
18374
|
return True
|
|
17533
18375
|
|
|
@@ -17677,14 +18519,14 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
|
|
|
17677
18519
|
return PaymentDetails.SPARK(
|
|
17678
18520
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.read(buf),
|
|
17679
18521
|
_UniffiConverterOptionalTypeSparkHtlcDetails.read(buf),
|
|
17680
|
-
|
|
18522
|
+
_UniffiConverterOptionalTypeConversionInfo.read(buf),
|
|
17681
18523
|
)
|
|
17682
18524
|
if variant == 2:
|
|
17683
18525
|
return PaymentDetails.TOKEN(
|
|
17684
18526
|
_UniffiConverterTypeTokenMetadata.read(buf),
|
|
17685
18527
|
_UniffiConverterString.read(buf),
|
|
17686
18528
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.read(buf),
|
|
17687
|
-
|
|
18529
|
+
_UniffiConverterOptionalTypeConversionInfo.read(buf),
|
|
17688
18530
|
)
|
|
17689
18531
|
if variant == 3:
|
|
17690
18532
|
return PaymentDetails.LIGHTNING(
|
|
@@ -17712,13 +18554,13 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
|
|
|
17712
18554
|
if value.is_spark():
|
|
17713
18555
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.check_lower(value.invoice_details)
|
|
17714
18556
|
_UniffiConverterOptionalTypeSparkHtlcDetails.check_lower(value.htlc_details)
|
|
17715
|
-
|
|
18557
|
+
_UniffiConverterOptionalTypeConversionInfo.check_lower(value.conversion_info)
|
|
17716
18558
|
return
|
|
17717
18559
|
if value.is_token():
|
|
17718
18560
|
_UniffiConverterTypeTokenMetadata.check_lower(value.metadata)
|
|
17719
18561
|
_UniffiConverterString.check_lower(value.tx_hash)
|
|
17720
18562
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.check_lower(value.invoice_details)
|
|
17721
|
-
|
|
18563
|
+
_UniffiConverterOptionalTypeConversionInfo.check_lower(value.conversion_info)
|
|
17722
18564
|
return
|
|
17723
18565
|
if value.is_lightning():
|
|
17724
18566
|
_UniffiConverterOptionalString.check_lower(value.description)
|
|
@@ -17744,13 +18586,13 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
|
|
|
17744
18586
|
buf.write_i32(1)
|
|
17745
18587
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.write(value.invoice_details, buf)
|
|
17746
18588
|
_UniffiConverterOptionalTypeSparkHtlcDetails.write(value.htlc_details, buf)
|
|
17747
|
-
|
|
18589
|
+
_UniffiConverterOptionalTypeConversionInfo.write(value.conversion_info, buf)
|
|
17748
18590
|
if value.is_token():
|
|
17749
18591
|
buf.write_i32(2)
|
|
17750
18592
|
_UniffiConverterTypeTokenMetadata.write(value.metadata, buf)
|
|
17751
18593
|
_UniffiConverterString.write(value.tx_hash, buf)
|
|
17752
18594
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.write(value.invoice_details, buf)
|
|
17753
|
-
|
|
18595
|
+
_UniffiConverterOptionalTypeConversionInfo.write(value.conversion_info, buf)
|
|
17754
18596
|
if value.is_lightning():
|
|
17755
18597
|
buf.write_i32(3)
|
|
17756
18598
|
_UniffiConverterOptionalString.write(value.description, buf)
|
|
@@ -18373,7 +19215,7 @@ class ReceivePaymentMethod:
|
|
|
18373
19215
|
|
|
18374
19216
|
expiry_time: "typing.Optional[int]"
|
|
18375
19217
|
"""
|
|
18376
|
-
The expiry time of the invoice
|
|
19218
|
+
The expiry time of the invoice as a unix timestamp in seconds
|
|
18377
19219
|
"""
|
|
18378
19220
|
|
|
18379
19221
|
description: "typing.Optional[str]"
|
|
@@ -18430,7 +19272,7 @@ class ReceivePaymentMethod:
|
|
|
18430
19272
|
amount_sats: "typing.Optional[int]"
|
|
18431
19273
|
expiry_secs: "typing.Optional[int]"
|
|
18432
19274
|
"""
|
|
18433
|
-
The expiry
|
|
19275
|
+
The expiry of the invoice as a duration in seconds
|
|
18434
19276
|
"""
|
|
18435
19277
|
|
|
18436
19278
|
|
|
@@ -20709,103 +21551,6 @@ class _UniffiConverterTypeSyncStorageError(_UniffiConverterRustBuffer):
|
|
|
20709
21551
|
|
|
20710
21552
|
|
|
20711
21553
|
|
|
20712
|
-
class TokenConversionType:
|
|
20713
|
-
def __init__(self):
|
|
20714
|
-
raise RuntimeError("TokenConversionType cannot be instantiated directly")
|
|
20715
|
-
|
|
20716
|
-
# Each enum variant is a nested class of the enum itself.
|
|
20717
|
-
class FROM_BITCOIN:
|
|
20718
|
-
"""
|
|
20719
|
-
Converting from Bitcoin to a token
|
|
20720
|
-
"""
|
|
20721
|
-
|
|
20722
|
-
|
|
20723
|
-
def __init__(self,):
|
|
20724
|
-
pass
|
|
20725
|
-
|
|
20726
|
-
def __str__(self):
|
|
20727
|
-
return "TokenConversionType.FROM_BITCOIN()".format()
|
|
20728
|
-
|
|
20729
|
-
def __eq__(self, other):
|
|
20730
|
-
if not other.is_from_bitcoin():
|
|
20731
|
-
return False
|
|
20732
|
-
return True
|
|
20733
|
-
|
|
20734
|
-
class TO_BITCOIN:
|
|
20735
|
-
"""
|
|
20736
|
-
Converting from a token to Bitcoin
|
|
20737
|
-
"""
|
|
20738
|
-
|
|
20739
|
-
from_token_identifier: "str"
|
|
20740
|
-
|
|
20741
|
-
def __init__(self,from_token_identifier: "str"):
|
|
20742
|
-
self.from_token_identifier = from_token_identifier
|
|
20743
|
-
|
|
20744
|
-
def __str__(self):
|
|
20745
|
-
return "TokenConversionType.TO_BITCOIN(from_token_identifier={})".format(self.from_token_identifier)
|
|
20746
|
-
|
|
20747
|
-
def __eq__(self, other):
|
|
20748
|
-
if not other.is_to_bitcoin():
|
|
20749
|
-
return False
|
|
20750
|
-
if self.from_token_identifier != other.from_token_identifier:
|
|
20751
|
-
return False
|
|
20752
|
-
return True
|
|
20753
|
-
|
|
20754
|
-
|
|
20755
|
-
|
|
20756
|
-
# For each variant, we have an `is_NAME` method for easily checking
|
|
20757
|
-
# whether an instance is that variant.
|
|
20758
|
-
def is_from_bitcoin(self) -> bool:
|
|
20759
|
-
return isinstance(self, TokenConversionType.FROM_BITCOIN)
|
|
20760
|
-
def is_to_bitcoin(self) -> bool:
|
|
20761
|
-
return isinstance(self, TokenConversionType.TO_BITCOIN)
|
|
20762
|
-
|
|
20763
|
-
|
|
20764
|
-
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
20765
|
-
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
20766
|
-
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
20767
|
-
TokenConversionType.FROM_BITCOIN = type("TokenConversionType.FROM_BITCOIN", (TokenConversionType.FROM_BITCOIN, TokenConversionType,), {}) # type: ignore
|
|
20768
|
-
TokenConversionType.TO_BITCOIN = type("TokenConversionType.TO_BITCOIN", (TokenConversionType.TO_BITCOIN, TokenConversionType,), {}) # type: ignore
|
|
20769
|
-
|
|
20770
|
-
|
|
20771
|
-
|
|
20772
|
-
|
|
20773
|
-
class _UniffiConverterTypeTokenConversionType(_UniffiConverterRustBuffer):
|
|
20774
|
-
@staticmethod
|
|
20775
|
-
def read(buf):
|
|
20776
|
-
variant = buf.read_i32()
|
|
20777
|
-
if variant == 1:
|
|
20778
|
-
return TokenConversionType.FROM_BITCOIN(
|
|
20779
|
-
)
|
|
20780
|
-
if variant == 2:
|
|
20781
|
-
return TokenConversionType.TO_BITCOIN(
|
|
20782
|
-
_UniffiConverterString.read(buf),
|
|
20783
|
-
)
|
|
20784
|
-
raise InternalError("Raw enum value doesn't match any cases")
|
|
20785
|
-
|
|
20786
|
-
@staticmethod
|
|
20787
|
-
def check_lower(value):
|
|
20788
|
-
if value.is_from_bitcoin():
|
|
20789
|
-
return
|
|
20790
|
-
if value.is_to_bitcoin():
|
|
20791
|
-
_UniffiConverterString.check_lower(value.from_token_identifier)
|
|
20792
|
-
return
|
|
20793
|
-
raise ValueError(value)
|
|
20794
|
-
|
|
20795
|
-
@staticmethod
|
|
20796
|
-
def write(value, buf):
|
|
20797
|
-
if value.is_from_bitcoin():
|
|
20798
|
-
buf.write_i32(1)
|
|
20799
|
-
if value.is_to_bitcoin():
|
|
20800
|
-
buf.write_i32(2)
|
|
20801
|
-
_UniffiConverterString.write(value.from_token_identifier, buf)
|
|
20802
|
-
|
|
20803
|
-
|
|
20804
|
-
|
|
20805
|
-
|
|
20806
|
-
|
|
20807
|
-
|
|
20808
|
-
|
|
20809
21554
|
class UpdateDepositPayload:
|
|
20810
21555
|
def __init__(self):
|
|
20811
21556
|
raise RuntimeError("UpdateDepositPayload cannot be instantiated directly")
|
|
@@ -21156,6 +21901,87 @@ class _UniffiConverterOptionalBytes(_UniffiConverterRustBuffer):
|
|
|
21156
21901
|
|
|
21157
21902
|
|
|
21158
21903
|
|
|
21904
|
+
class _UniffiConverterOptionalTypeConversionEstimate(_UniffiConverterRustBuffer):
|
|
21905
|
+
@classmethod
|
|
21906
|
+
def check_lower(cls, value):
|
|
21907
|
+
if value is not None:
|
|
21908
|
+
_UniffiConverterTypeConversionEstimate.check_lower(value)
|
|
21909
|
+
|
|
21910
|
+
@classmethod
|
|
21911
|
+
def write(cls, value, buf):
|
|
21912
|
+
if value is None:
|
|
21913
|
+
buf.write_u8(0)
|
|
21914
|
+
return
|
|
21915
|
+
|
|
21916
|
+
buf.write_u8(1)
|
|
21917
|
+
_UniffiConverterTypeConversionEstimate.write(value, buf)
|
|
21918
|
+
|
|
21919
|
+
@classmethod
|
|
21920
|
+
def read(cls, buf):
|
|
21921
|
+
flag = buf.read_u8()
|
|
21922
|
+
if flag == 0:
|
|
21923
|
+
return None
|
|
21924
|
+
elif flag == 1:
|
|
21925
|
+
return _UniffiConverterTypeConversionEstimate.read(buf)
|
|
21926
|
+
else:
|
|
21927
|
+
raise InternalError("Unexpected flag byte for optional type")
|
|
21928
|
+
|
|
21929
|
+
|
|
21930
|
+
|
|
21931
|
+
class _UniffiConverterOptionalTypeConversionInfo(_UniffiConverterRustBuffer):
|
|
21932
|
+
@classmethod
|
|
21933
|
+
def check_lower(cls, value):
|
|
21934
|
+
if value is not None:
|
|
21935
|
+
_UniffiConverterTypeConversionInfo.check_lower(value)
|
|
21936
|
+
|
|
21937
|
+
@classmethod
|
|
21938
|
+
def write(cls, value, buf):
|
|
21939
|
+
if value is None:
|
|
21940
|
+
buf.write_u8(0)
|
|
21941
|
+
return
|
|
21942
|
+
|
|
21943
|
+
buf.write_u8(1)
|
|
21944
|
+
_UniffiConverterTypeConversionInfo.write(value, buf)
|
|
21945
|
+
|
|
21946
|
+
@classmethod
|
|
21947
|
+
def read(cls, buf):
|
|
21948
|
+
flag = buf.read_u8()
|
|
21949
|
+
if flag == 0:
|
|
21950
|
+
return None
|
|
21951
|
+
elif flag == 1:
|
|
21952
|
+
return _UniffiConverterTypeConversionInfo.read(buf)
|
|
21953
|
+
else:
|
|
21954
|
+
raise InternalError("Unexpected flag byte for optional type")
|
|
21955
|
+
|
|
21956
|
+
|
|
21957
|
+
|
|
21958
|
+
class _UniffiConverterOptionalTypeConversionOptions(_UniffiConverterRustBuffer):
|
|
21959
|
+
@classmethod
|
|
21960
|
+
def check_lower(cls, value):
|
|
21961
|
+
if value is not None:
|
|
21962
|
+
_UniffiConverterTypeConversionOptions.check_lower(value)
|
|
21963
|
+
|
|
21964
|
+
@classmethod
|
|
21965
|
+
def write(cls, value, buf):
|
|
21966
|
+
if value is None:
|
|
21967
|
+
buf.write_u8(0)
|
|
21968
|
+
return
|
|
21969
|
+
|
|
21970
|
+
buf.write_u8(1)
|
|
21971
|
+
_UniffiConverterTypeConversionOptions.write(value, buf)
|
|
21972
|
+
|
|
21973
|
+
@classmethod
|
|
21974
|
+
def read(cls, buf):
|
|
21975
|
+
flag = buf.read_u8()
|
|
21976
|
+
if flag == 0:
|
|
21977
|
+
return None
|
|
21978
|
+
elif flag == 1:
|
|
21979
|
+
return _UniffiConverterTypeConversionOptions.read(buf)
|
|
21980
|
+
else:
|
|
21981
|
+
raise InternalError("Unexpected flag byte for optional type")
|
|
21982
|
+
|
|
21983
|
+
|
|
21984
|
+
|
|
21159
21985
|
class _UniffiConverterOptionalTypeCredentials(_UniffiConverterRustBuffer):
|
|
21160
21986
|
@classmethod
|
|
21161
21987
|
def check_lower(cls, value):
|
|
@@ -21507,38 +22333,11 @@ class _UniffiConverterOptionalTypeSymbol(_UniffiConverterRustBuffer):
|
|
|
21507
22333
|
|
|
21508
22334
|
|
|
21509
22335
|
|
|
21510
|
-
class
|
|
21511
|
-
@classmethod
|
|
21512
|
-
def check_lower(cls, value):
|
|
21513
|
-
if value is not None:
|
|
21514
|
-
_UniffiConverterTypeTokenConversionInfo.check_lower(value)
|
|
21515
|
-
|
|
21516
|
-
@classmethod
|
|
21517
|
-
def write(cls, value, buf):
|
|
21518
|
-
if value is None:
|
|
21519
|
-
buf.write_u8(0)
|
|
21520
|
-
return
|
|
21521
|
-
|
|
21522
|
-
buf.write_u8(1)
|
|
21523
|
-
_UniffiConverterTypeTokenConversionInfo.write(value, buf)
|
|
21524
|
-
|
|
21525
|
-
@classmethod
|
|
21526
|
-
def read(cls, buf):
|
|
21527
|
-
flag = buf.read_u8()
|
|
21528
|
-
if flag == 0:
|
|
21529
|
-
return None
|
|
21530
|
-
elif flag == 1:
|
|
21531
|
-
return _UniffiConverterTypeTokenConversionInfo.read(buf)
|
|
21532
|
-
else:
|
|
21533
|
-
raise InternalError("Unexpected flag byte for optional type")
|
|
21534
|
-
|
|
21535
|
-
|
|
21536
|
-
|
|
21537
|
-
class _UniffiConverterOptionalTypeTokenConversionOptions(_UniffiConverterRustBuffer):
|
|
22336
|
+
class _UniffiConverterOptionalTypeAmount(_UniffiConverterRustBuffer):
|
|
21538
22337
|
@classmethod
|
|
21539
22338
|
def check_lower(cls, value):
|
|
21540
22339
|
if value is not None:
|
|
21541
|
-
|
|
22340
|
+
_UniffiConverterTypeAmount.check_lower(value)
|
|
21542
22341
|
|
|
21543
22342
|
@classmethod
|
|
21544
22343
|
def write(cls, value, buf):
|
|
@@ -21547,7 +22346,7 @@ class _UniffiConverterOptionalTypeTokenConversionOptions(_UniffiConverterRustBuf
|
|
|
21547
22346
|
return
|
|
21548
22347
|
|
|
21549
22348
|
buf.write_u8(1)
|
|
21550
|
-
|
|
22349
|
+
_UniffiConverterTypeAmount.write(value, buf)
|
|
21551
22350
|
|
|
21552
22351
|
@classmethod
|
|
21553
22352
|
def read(cls, buf):
|
|
@@ -21555,17 +22354,17 @@ class _UniffiConverterOptionalTypeTokenConversionOptions(_UniffiConverterRustBuf
|
|
|
21555
22354
|
if flag == 0:
|
|
21556
22355
|
return None
|
|
21557
22356
|
elif flag == 1:
|
|
21558
|
-
return
|
|
22357
|
+
return _UniffiConverterTypeAmount.read(buf)
|
|
21559
22358
|
else:
|
|
21560
22359
|
raise InternalError("Unexpected flag byte for optional type")
|
|
21561
22360
|
|
|
21562
22361
|
|
|
21563
22362
|
|
|
21564
|
-
class
|
|
22363
|
+
class _UniffiConverterOptionalTypeAssetFilter(_UniffiConverterRustBuffer):
|
|
21565
22364
|
@classmethod
|
|
21566
22365
|
def check_lower(cls, value):
|
|
21567
22366
|
if value is not None:
|
|
21568
|
-
|
|
22367
|
+
_UniffiConverterTypeAssetFilter.check_lower(value)
|
|
21569
22368
|
|
|
21570
22369
|
@classmethod
|
|
21571
22370
|
def write(cls, value, buf):
|
|
@@ -21574,7 +22373,7 @@ class _UniffiConverterOptionalTypeAmount(_UniffiConverterRustBuffer):
|
|
|
21574
22373
|
return
|
|
21575
22374
|
|
|
21576
22375
|
buf.write_u8(1)
|
|
21577
|
-
|
|
22376
|
+
_UniffiConverterTypeAssetFilter.write(value, buf)
|
|
21578
22377
|
|
|
21579
22378
|
@classmethod
|
|
21580
22379
|
def read(cls, buf):
|
|
@@ -21582,17 +22381,17 @@ class _UniffiConverterOptionalTypeAmount(_UniffiConverterRustBuffer):
|
|
|
21582
22381
|
if flag == 0:
|
|
21583
22382
|
return None
|
|
21584
22383
|
elif flag == 1:
|
|
21585
|
-
return
|
|
22384
|
+
return _UniffiConverterTypeAssetFilter.read(buf)
|
|
21586
22385
|
else:
|
|
21587
22386
|
raise InternalError("Unexpected flag byte for optional type")
|
|
21588
22387
|
|
|
21589
22388
|
|
|
21590
22389
|
|
|
21591
|
-
class
|
|
22390
|
+
class _UniffiConverterOptionalTypeConversionPurpose(_UniffiConverterRustBuffer):
|
|
21592
22391
|
@classmethod
|
|
21593
22392
|
def check_lower(cls, value):
|
|
21594
22393
|
if value is not None:
|
|
21595
|
-
|
|
22394
|
+
_UniffiConverterTypeConversionPurpose.check_lower(value)
|
|
21596
22395
|
|
|
21597
22396
|
@classmethod
|
|
21598
22397
|
def write(cls, value, buf):
|
|
@@ -21601,7 +22400,7 @@ class _UniffiConverterOptionalTypeAssetFilter(_UniffiConverterRustBuffer):
|
|
|
21601
22400
|
return
|
|
21602
22401
|
|
|
21603
22402
|
buf.write_u8(1)
|
|
21604
|
-
|
|
22403
|
+
_UniffiConverterTypeConversionPurpose.write(value, buf)
|
|
21605
22404
|
|
|
21606
22405
|
@classmethod
|
|
21607
22406
|
def read(cls, buf):
|
|
@@ -21609,7 +22408,7 @@ class _UniffiConverterOptionalTypeAssetFilter(_UniffiConverterRustBuffer):
|
|
|
21609
22408
|
if flag == 0:
|
|
21610
22409
|
return None
|
|
21611
22410
|
elif flag == 1:
|
|
21612
|
-
return
|
|
22411
|
+
return _UniffiConverterTypeConversionPurpose.read(buf)
|
|
21613
22412
|
else:
|
|
21614
22413
|
raise InternalError("Unexpected flag byte for optional type")
|
|
21615
22414
|
|
|
@@ -23072,12 +23871,16 @@ __all__ = [
|
|
|
23072
23871
|
"BitcoinNetwork",
|
|
23073
23872
|
"ChainApiType",
|
|
23074
23873
|
"ChainServiceError",
|
|
23874
|
+
"ConversionPurpose",
|
|
23875
|
+
"ConversionStatus",
|
|
23876
|
+
"ConversionType",
|
|
23075
23877
|
"DepositClaimError",
|
|
23076
|
-
"
|
|
23878
|
+
"ExternalSecretSource",
|
|
23077
23879
|
"ExternalSecretToSplit",
|
|
23078
23880
|
"Fee",
|
|
23079
23881
|
"InputType",
|
|
23080
23882
|
"KeySetType",
|
|
23883
|
+
"LnurlCallbackStatus",
|
|
23081
23884
|
"MaxFee",
|
|
23082
23885
|
"Network",
|
|
23083
23886
|
"OnchainConfirmationSpeed",
|
|
@@ -23102,7 +23905,6 @@ __all__ = [
|
|
|
23102
23905
|
"SuccessAction",
|
|
23103
23906
|
"SuccessActionProcessed",
|
|
23104
23907
|
"SyncStorageError",
|
|
23105
|
-
"TokenConversionType",
|
|
23106
23908
|
"UpdateDepositPayload",
|
|
23107
23909
|
"AesSuccessActionData",
|
|
23108
23910
|
"AesSuccessActionDataDecrypted",
|
|
@@ -23130,13 +23932,16 @@ __all__ = [
|
|
|
23130
23932
|
"Config",
|
|
23131
23933
|
"ConnectRequest",
|
|
23132
23934
|
"ConnectWithSignerRequest",
|
|
23935
|
+
"ConversionEstimate",
|
|
23936
|
+
"ConversionInfo",
|
|
23937
|
+
"ConversionOptions",
|
|
23133
23938
|
"CreateIssuerTokenRequest",
|
|
23134
23939
|
"Credentials",
|
|
23135
23940
|
"CurrencyInfo",
|
|
23136
23941
|
"DepositInfo",
|
|
23137
23942
|
"EcdsaSignatureBytes",
|
|
23138
23943
|
"ExternalAggregateFrostRequest",
|
|
23139
|
-
"
|
|
23944
|
+
"ExternalEncryptedSecret",
|
|
23140
23945
|
"ExternalFrostCommitments",
|
|
23141
23946
|
"ExternalFrostSignature",
|
|
23142
23947
|
"ExternalFrostSignatureShare",
|
|
@@ -23148,8 +23953,8 @@ __all__ = [
|
|
|
23148
23953
|
"ExternalSigningCommitments",
|
|
23149
23954
|
"ExternalTreeNodeId",
|
|
23150
23955
|
"ExternalVerifiableSecretShare",
|
|
23151
|
-
"
|
|
23152
|
-
"
|
|
23956
|
+
"FetchConversionLimitsRequest",
|
|
23957
|
+
"FetchConversionLimitsResponse",
|
|
23153
23958
|
"FiatCurrency",
|
|
23154
23959
|
"FreezeIssuerTokenRequest",
|
|
23155
23960
|
"FreezeIssuerTokenResponse",
|
|
@@ -23159,6 +23964,7 @@ __all__ = [
|
|
|
23159
23964
|
"GetPaymentResponse",
|
|
23160
23965
|
"GetTokensMetadataRequest",
|
|
23161
23966
|
"GetTokensMetadataResponse",
|
|
23967
|
+
"HashedMessageBytes",
|
|
23162
23968
|
"IdentifierCommitmentPair",
|
|
23163
23969
|
"IdentifierPublicKeyPair",
|
|
23164
23970
|
"IdentifierSignaturePair",
|
|
@@ -23173,6 +23979,7 @@ __all__ = [
|
|
|
23173
23979
|
"ListUnclaimedDepositsRequest",
|
|
23174
23980
|
"ListUnclaimedDepositsResponse",
|
|
23175
23981
|
"LnurlAuthRequestDetails",
|
|
23982
|
+
"LnurlErrorDetails",
|
|
23176
23983
|
"LnurlPayInfo",
|
|
23177
23984
|
"LnurlPayRequest",
|
|
23178
23985
|
"LnurlPayRequestDetails",
|
|
@@ -23185,6 +23992,7 @@ __all__ = [
|
|
|
23185
23992
|
"LocaleOverrides",
|
|
23186
23993
|
"LocalizedName",
|
|
23187
23994
|
"LogEntry",
|
|
23995
|
+
"MessageBytes",
|
|
23188
23996
|
"MessageSuccessActionData",
|
|
23189
23997
|
"MintIssuerTokenRequest",
|
|
23190
23998
|
"OptimizationConfig",
|
|
@@ -23197,7 +24005,6 @@ __all__ = [
|
|
|
23197
24005
|
"PrepareLnurlPayResponse",
|
|
23198
24006
|
"PrepareSendPaymentRequest",
|
|
23199
24007
|
"PrepareSendPaymentResponse",
|
|
23200
|
-
"PrivateKeyBytes",
|
|
23201
24008
|
"ProvisionalPayment",
|
|
23202
24009
|
"PublicKeyBytes",
|
|
23203
24010
|
"Rate",
|
|
@@ -23213,6 +24020,7 @@ __all__ = [
|
|
|
23213
24020
|
"RegisterLightningAddressRequest",
|
|
23214
24021
|
"RestResponse",
|
|
23215
24022
|
"SchnorrSignatureBytes",
|
|
24023
|
+
"SecretBytes",
|
|
23216
24024
|
"SendOnchainFeeQuote",
|
|
23217
24025
|
"SendOnchainSpeedFeeQuote",
|
|
23218
24026
|
"SendPaymentRequest",
|
|
@@ -23230,8 +24038,6 @@ __all__ = [
|
|
|
23230
24038
|
"SyncWalletRequest",
|
|
23231
24039
|
"SyncWalletResponse",
|
|
23232
24040
|
"TokenBalance",
|
|
23233
|
-
"TokenConversionInfo",
|
|
23234
|
-
"TokenConversionOptions",
|
|
23235
24041
|
"TokenMetadata",
|
|
23236
24042
|
"TxStatus",
|
|
23237
24043
|
"UnfreezeIssuerTokenRequest",
|