breez-sdk-spark 0.7.2__cp312-cp312-manylinux_2_31_x86_64.whl → 0.7.7__cp312-cp312-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 +1462 -690
- breez_sdk_spark/libbreez_sdk_spark_bindings.so +0 -0
- {breez_sdk_spark-0.7.2.dist-info → breez_sdk_spark-0.7.7.dist-info}/METADATA +1 -1
- breez_sdk_spark-0.7.7.dist-info/RECORD +8 -0
- breez_sdk_spark-0.7.2.dist-info/RECORD +0 -8
- {breez_sdk_spark-0.7.2.dist-info → breez_sdk_spark-0.7.7.dist-info}/WHEEL +0 -0
- {breez_sdk_spark-0.7.2.dist-info → breez_sdk_spark-0.7.7.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() != 62425:
|
|
571
575
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
572
|
-
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_key() !=
|
|
576
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_key() != 24906:
|
|
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_key_encrypted() != 50023:
|
|
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_key() != 61854:
|
|
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() != 15562:
|
|
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_secret_keys() != 4979:
|
|
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() != 6228:
|
|
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_key_for_receiver() != 43011:
|
|
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_key_source() != 35440:
|
|
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() != 2993:
|
|
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() != 27769:
|
|
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_key", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD10),
|
|
946
|
+
("static_deposit_secret_key_encrypted", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD11),
|
|
947
|
+
("static_deposit_secret_key", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD12),
|
|
948
|
+
("static_deposit_signing_key", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD13),
|
|
949
|
+
("subtract_secret_keys", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD14),
|
|
950
|
+
("split_secret_with_proofs", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD15),
|
|
951
|
+
("encrypt_secret_key_for_receiver", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD16),
|
|
952
|
+
("public_key_from_secret_key_source", _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,28 +1259,34 @@ _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,
|
|
@@ -1278,55 +1296,55 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_generate_random_key.a
|
|
|
1278
1296
|
ctypes.c_void_p,
|
|
1279
1297
|
)
|
|
1280
1298
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_generate_random_key.restype = ctypes.c_uint64
|
|
1281
|
-
_UniffiLib.
|
|
1299
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_secret_key_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_key_encrypted.restype = ctypes.c_uint64
|
|
1304
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_secret_key.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_key.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_secret_keys.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_secret_keys.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_key_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_key_for_receiver.restype = ctypes.c_uint64
|
|
1333
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_public_key_from_secret_key_source.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_key_source.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
2152
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_key.argtypes = (
|
|
2129
2153
|
)
|
|
2130
2154
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_key.restype = ctypes.c_uint16
|
|
2131
|
-
_UniffiLib.
|
|
2155
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret_key_encrypted.argtypes = (
|
|
2132
2156
|
)
|
|
2133
|
-
_UniffiLib.
|
|
2134
|
-
_UniffiLib.
|
|
2157
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret_key_encrypted.restype = ctypes.c_uint16
|
|
2158
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret_key.argtypes = (
|
|
2135
2159
|
)
|
|
2136
|
-
_UniffiLib.
|
|
2137
|
-
_UniffiLib.
|
|
2160
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret_key.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_secret_keys.argtypes = (
|
|
2141
2165
|
)
|
|
2142
|
-
_UniffiLib.
|
|
2143
|
-
_UniffiLib.
|
|
2166
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_subtract_secret_keys.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_key_for_receiver.argtypes = (
|
|
2147
2171
|
)
|
|
2148
|
-
_UniffiLib.
|
|
2149
|
-
_UniffiLib.
|
|
2172
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_secret_key_for_receiver.restype = ctypes.c_uint16
|
|
2173
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_public_key_from_secret_key_source.argtypes = (
|
|
2150
2174
|
)
|
|
2151
|
-
_UniffiLib.
|
|
2175
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_public_key_from_secret_key_source.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
|
|
@@ -4105,38 +4279,40 @@ class ExternalSigner(typing.Protocol):
|
|
|
4105
4279
|
raise NotImplementedError
|
|
4106
4280
|
def generate_random_key(self, ):
|
|
4107
4281
|
"""
|
|
4108
|
-
Generates a random
|
|
4282
|
+
Generates a random secret key.
|
|
4109
4283
|
|
|
4110
4284
|
# Returns
|
|
4111
|
-
A randomly generated
|
|
4285
|
+
A randomly generated secret key source, or an error string
|
|
4112
4286
|
"""
|
|
4113
4287
|
|
|
4114
4288
|
raise NotImplementedError
|
|
4115
|
-
def
|
|
4289
|
+
def static_deposit_secret_key_encrypted(self, index: "int"):
|
|
4116
4290
|
"""
|
|
4117
|
-
Gets
|
|
4291
|
+
Gets an encrypted static deposit secret key by index.
|
|
4118
4292
|
|
|
4119
4293
|
# Arguments
|
|
4120
4294
|
* `index` - The index of the static deposit key
|
|
4121
4295
|
|
|
4122
4296
|
# Returns
|
|
4123
|
-
The
|
|
4297
|
+
The encrypted secret key, or an error string
|
|
4124
4298
|
"""
|
|
4125
4299
|
|
|
4126
4300
|
raise NotImplementedError
|
|
4127
|
-
def
|
|
4301
|
+
def static_deposit_secret_key(self, index: "int"):
|
|
4128
4302
|
"""
|
|
4129
|
-
Gets a static deposit
|
|
4303
|
+
Gets a static deposit secret key by index.
|
|
4130
4304
|
|
|
4131
4305
|
# Arguments
|
|
4132
4306
|
* `index` - The index of the static deposit key
|
|
4133
4307
|
|
|
4134
4308
|
# Returns
|
|
4135
|
-
The 32-byte
|
|
4309
|
+
The 32-byte secret key, or an error string
|
|
4310
|
+
|
|
4311
|
+
See also: [JavaScript `getStaticDepositSecretKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-secret-key)
|
|
4136
4312
|
"""
|
|
4137
4313
|
|
|
4138
4314
|
raise NotImplementedError
|
|
4139
|
-
def
|
|
4315
|
+
def static_deposit_signing_key(self, index: "int"):
|
|
4140
4316
|
"""
|
|
4141
4317
|
Gets a static deposit public key by index.
|
|
4142
4318
|
|
|
@@ -4145,23 +4321,28 @@ class ExternalSigner(typing.Protocol):
|
|
|
4145
4321
|
|
|
4146
4322
|
# Returns
|
|
4147
4323
|
The 33-byte public key, or an error string
|
|
4324
|
+
|
|
4325
|
+
See also: [JavaScript `getStaticDepositSigningKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-signing-key)
|
|
4148
4326
|
"""
|
|
4149
4327
|
|
|
4150
4328
|
raise NotImplementedError
|
|
4151
|
-
def
|
|
4329
|
+
def subtract_secret_keys(self, signing_key: "ExternalSecretKeySource",new_signing_key: "ExternalSecretKeySource"):
|
|
4152
4330
|
"""
|
|
4153
|
-
Subtracts one
|
|
4331
|
+
Subtracts one secret key from another.
|
|
4154
4332
|
|
|
4155
4333
|
# Arguments
|
|
4156
|
-
* `signing_key` - The first
|
|
4157
|
-
* `new_signing_key` - The second
|
|
4334
|
+
* `signing_key` - The first secret key source
|
|
4335
|
+
* `new_signing_key` - The second secret key source to subtract
|
|
4158
4336
|
|
|
4159
4337
|
# Returns
|
|
4160
|
-
The resulting
|
|
4338
|
+
The resulting secret key source, or an error string
|
|
4339
|
+
|
|
4340
|
+
See also: [JavaScript `subtractSplitAndEncrypt`](https://docs.spark.money/wallets/spark-signer#subtract,-split,-and-encrypt)
|
|
4341
|
+
(this method provides the subtraction step of that higher-level operation)
|
|
4161
4342
|
"""
|
|
4162
4343
|
|
|
4163
4344
|
raise NotImplementedError
|
|
4164
|
-
def
|
|
4345
|
+
def split_secret_with_proofs(self, secret: "ExternalSecretToSplit",threshold: "int",num_shares: "int"):
|
|
4165
4346
|
"""
|
|
4166
4347
|
Splits a secret with proofs using Shamir's Secret Sharing.
|
|
4167
4348
|
|
|
@@ -4172,15 +4353,17 @@ class ExternalSigner(typing.Protocol):
|
|
|
4172
4353
|
|
|
4173
4354
|
# Returns
|
|
4174
4355
|
Vector of verifiable secret shares, or an error string
|
|
4356
|
+
|
|
4357
|
+
See also: [JavaScript `splitSecretWithProofs`](https://docs.spark.money/wallets/spark-signer#split-secret-with-proofs)
|
|
4175
4358
|
"""
|
|
4176
4359
|
|
|
4177
4360
|
raise NotImplementedError
|
|
4178
|
-
def
|
|
4361
|
+
def encrypt_secret_key_for_receiver(self, secret_key: "ExternalEncryptedPrivateKey",receiver_public_key: "PublicKeyBytes"):
|
|
4179
4362
|
"""
|
|
4180
|
-
Encrypts a
|
|
4363
|
+
Encrypts a secret key for a specific receiver's public key.
|
|
4181
4364
|
|
|
4182
4365
|
# Arguments
|
|
4183
|
-
* `
|
|
4366
|
+
* `secret_key` - The encrypted secret key to re-encrypt
|
|
4184
4367
|
* `receiver_public_key` - The receiver's 33-byte public key
|
|
4185
4368
|
|
|
4186
4369
|
# Returns
|
|
@@ -4188,12 +4371,12 @@ class ExternalSigner(typing.Protocol):
|
|
|
4188
4371
|
"""
|
|
4189
4372
|
|
|
4190
4373
|
raise NotImplementedError
|
|
4191
|
-
def
|
|
4374
|
+
def public_key_from_secret_key_source(self, secret_key: "ExternalSecretKeySource"):
|
|
4192
4375
|
"""
|
|
4193
|
-
Gets the public key from a
|
|
4376
|
+
Gets the public key from a secret key source.
|
|
4194
4377
|
|
|
4195
4378
|
# Arguments
|
|
4196
|
-
* `
|
|
4379
|
+
* `secret_key` - The secret key source
|
|
4197
4380
|
|
|
4198
4381
|
# Returns
|
|
4199
4382
|
The corresponding 33-byte public key, or an error string
|
|
@@ -4209,10 +4392,12 @@ class ExternalSigner(typing.Protocol):
|
|
|
4209
4392
|
|
|
4210
4393
|
# Returns
|
|
4211
4394
|
A signature share, or an error string
|
|
4395
|
+
|
|
4396
|
+
See also: [JavaScript `signFrost`](https://docs.spark.money/wallets/spark-signer#frost-signing)
|
|
4212
4397
|
"""
|
|
4213
4398
|
|
|
4214
4399
|
raise NotImplementedError
|
|
4215
|
-
def
|
|
4400
|
+
def aggregate_frost(self, request: "ExternalAggregateFrostRequest"):
|
|
4216
4401
|
"""
|
|
4217
4402
|
Aggregates Frost signature shares into a final signature.
|
|
4218
4403
|
|
|
@@ -4221,6 +4406,8 @@ class ExternalSigner(typing.Protocol):
|
|
|
4221
4406
|
|
|
4222
4407
|
# Returns
|
|
4223
4408
|
The aggregated Frost signature, or an error string
|
|
4409
|
+
|
|
4410
|
+
See also: [JavaScript `aggregateFrost`](https://docs.spark.money/wallets/spark-signer#aggregate-frost-signatures)
|
|
4224
4411
|
"""
|
|
4225
4412
|
|
|
4226
4413
|
raise NotImplementedError
|
|
@@ -4268,6 +4455,8 @@ class ExternalSignerImpl:
|
|
|
4268
4455
|
def identity_public_key(self, ) -> "PublicKeyBytes":
|
|
4269
4456
|
"""
|
|
4270
4457
|
Returns the identity public key as 33 bytes (compressed secp256k1 key).
|
|
4458
|
+
|
|
4459
|
+
See also: [JavaScript `getIdentityPublicKey`](https://docs.spark.money/wallets/spark-signer#get-identity-public-key)
|
|
4271
4460
|
"""
|
|
4272
4461
|
|
|
4273
4462
|
return _UniffiConverterTypePublicKeyBytes.lift(
|
|
@@ -4286,6 +4475,8 @@ class ExternalSignerImpl:
|
|
|
4286
4475
|
|
|
4287
4476
|
# Returns
|
|
4288
4477
|
The derived public key as 33 bytes, or a `SignerError`
|
|
4478
|
+
|
|
4479
|
+
See also: [JavaScript `getPublicKeyFromDerivation`](https://docs.spark.money/wallets/spark-signer#get-public-key-from-derivation)
|
|
4289
4480
|
"""
|
|
4290
4481
|
|
|
4291
4482
|
_UniffiConverterString.check_lower(path)
|
|
@@ -4308,26 +4499,28 @@ _UniffiConverterTypeSignerError,
|
|
|
4308
4499
|
|
|
4309
4500
|
|
|
4310
4501
|
|
|
4311
|
-
async def sign_ecdsa(self, message: "
|
|
4502
|
+
async def sign_ecdsa(self, message: "MessageBytes",path: "str") -> "EcdsaSignatureBytes":
|
|
4312
4503
|
"""
|
|
4313
4504
|
Signs a message using ECDSA at the given derivation path.
|
|
4314
4505
|
|
|
4506
|
+
The message should be a 32-byte digest (typically a hash of the original data).
|
|
4507
|
+
|
|
4315
4508
|
# Arguments
|
|
4316
|
-
* `message` - The message to sign
|
|
4509
|
+
* `message` - The 32-byte message digest to sign
|
|
4317
4510
|
* `path` - BIP32 derivation path as a string
|
|
4318
4511
|
|
|
4319
4512
|
# Returns
|
|
4320
4513
|
64-byte compact ECDSA signature, or a `SignerError`
|
|
4321
4514
|
"""
|
|
4322
4515
|
|
|
4323
|
-
|
|
4516
|
+
_UniffiConverterTypeMessageBytes.check_lower(message)
|
|
4324
4517
|
|
|
4325
4518
|
_UniffiConverterString.check_lower(path)
|
|
4326
4519
|
|
|
4327
4520
|
return await _uniffi_rust_call_async(
|
|
4328
4521
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_sign_ecdsa(
|
|
4329
4522
|
self._uniffi_clone_pointer(),
|
|
4330
|
-
|
|
4523
|
+
_UniffiConverterTypeMessageBytes.lower(message),
|
|
4331
4524
|
_UniffiConverterString.lower(path)
|
|
4332
4525
|
),
|
|
4333
4526
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
@@ -4343,26 +4536,28 @@ _UniffiConverterTypeSignerError,
|
|
|
4343
4536
|
|
|
4344
4537
|
|
|
4345
4538
|
|
|
4346
|
-
async def sign_ecdsa_recoverable(self, message: "
|
|
4539
|
+
async def sign_ecdsa_recoverable(self, message: "MessageBytes",path: "str") -> "RecoverableEcdsaSignatureBytes":
|
|
4347
4540
|
"""
|
|
4348
4541
|
Signs a message using recoverable ECDSA at the given derivation path.
|
|
4349
4542
|
|
|
4543
|
+
The message should be a 32-byte digest (typically a hash of the original data).
|
|
4544
|
+
|
|
4350
4545
|
# Arguments
|
|
4351
|
-
* `message` - The message to sign
|
|
4546
|
+
* `message` - The 32-byte message digest to sign
|
|
4352
4547
|
* `path` - BIP32 derivation path as a string
|
|
4353
4548
|
|
|
4354
4549
|
# Returns
|
|
4355
4550
|
65 bytes: recovery ID (31 + `recovery_id`) + 64-byte signature, or a `SignerError`
|
|
4356
4551
|
"""
|
|
4357
4552
|
|
|
4358
|
-
|
|
4553
|
+
_UniffiConverterTypeMessageBytes.check_lower(message)
|
|
4359
4554
|
|
|
4360
4555
|
_UniffiConverterString.check_lower(path)
|
|
4361
4556
|
|
|
4362
4557
|
return await _uniffi_rust_call_async(
|
|
4363
4558
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_sign_ecdsa_recoverable(
|
|
4364
4559
|
self._uniffi_clone_pointer(),
|
|
4365
|
-
|
|
4560
|
+
_UniffiConverterTypeMessageBytes.lower(message),
|
|
4366
4561
|
_UniffiConverterString.lower(path)
|
|
4367
4562
|
),
|
|
4368
4563
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
@@ -4378,7 +4573,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4378
4573
|
|
|
4379
4574
|
|
|
4380
4575
|
|
|
4381
|
-
async def
|
|
4576
|
+
async def encrypt_ecies(self, message: "bytes",path: "str") -> "bytes":
|
|
4382
4577
|
"""
|
|
4383
4578
|
Encrypts a message using ECIES at the given derivation path.
|
|
4384
4579
|
|
|
@@ -4395,7 +4590,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4395
4590
|
_UniffiConverterString.check_lower(path)
|
|
4396
4591
|
|
|
4397
4592
|
return await _uniffi_rust_call_async(
|
|
4398
|
-
_UniffiLib.
|
|
4593
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_encrypt_ecies(
|
|
4399
4594
|
self._uniffi_clone_pointer(),
|
|
4400
4595
|
_UniffiConverterBytes.lower(message),
|
|
4401
4596
|
_UniffiConverterString.lower(path)
|
|
@@ -4413,7 +4608,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4413
4608
|
|
|
4414
4609
|
|
|
4415
4610
|
|
|
4416
|
-
async def
|
|
4611
|
+
async def decrypt_ecies(self, message: "bytes",path: "str") -> "bytes":
|
|
4417
4612
|
"""
|
|
4418
4613
|
Decrypts a message using ECIES at the given derivation path.
|
|
4419
4614
|
|
|
@@ -4423,6 +4618,8 @@ _UniffiConverterTypeSignerError,
|
|
|
4423
4618
|
|
|
4424
4619
|
# Returns
|
|
4425
4620
|
Decrypted data, or a `SignerError`
|
|
4621
|
+
|
|
4622
|
+
See also: [JavaScript `decryptEcies`](https://docs.spark.money/wallets/spark-signer#decrypt-ecies)
|
|
4426
4623
|
"""
|
|
4427
4624
|
|
|
4428
4625
|
_UniffiConverterBytes.check_lower(message)
|
|
@@ -4430,7 +4627,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4430
4627
|
_UniffiConverterString.check_lower(path)
|
|
4431
4628
|
|
|
4432
4629
|
return await _uniffi_rust_call_async(
|
|
4433
|
-
_UniffiLib.
|
|
4630
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_decrypt_ecies(
|
|
4434
4631
|
self._uniffi_clone_pointer(),
|
|
4435
4632
|
_UniffiConverterBytes.lower(message),
|
|
4436
4633
|
_UniffiConverterString.lower(path)
|
|
@@ -4483,16 +4680,55 @@ _UniffiConverterTypeSignerError,
|
|
|
4483
4680
|
|
|
4484
4681
|
|
|
4485
4682
|
|
|
4486
|
-
async def
|
|
4683
|
+
async def hmac_sha256(self, message: "bytes",path: "str") -> "HashedMessageBytes":
|
|
4684
|
+
"""
|
|
4685
|
+
HMAC-SHA256 of a message at the given derivation path.
|
|
4686
|
+
|
|
4687
|
+
# Arguments
|
|
4688
|
+
* `message` - The message to hash
|
|
4689
|
+
* `path` - BIP32 derivation path as a string
|
|
4690
|
+
|
|
4691
|
+
# Returns
|
|
4692
|
+
32-byte HMAC-SHA256, or a `SignerError`
|
|
4693
|
+
|
|
4694
|
+
See also: [JavaScript `htlcHMAC`](https://docs.spark.money/wallets/spark-signer#generate-htlc-hmac)
|
|
4695
|
+
"""
|
|
4696
|
+
|
|
4697
|
+
_UniffiConverterBytes.check_lower(message)
|
|
4698
|
+
|
|
4699
|
+
_UniffiConverterString.check_lower(path)
|
|
4700
|
+
|
|
4701
|
+
return await _uniffi_rust_call_async(
|
|
4702
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_hmac_sha256(
|
|
4703
|
+
self._uniffi_clone_pointer(),
|
|
4704
|
+
_UniffiConverterBytes.lower(message),
|
|
4705
|
+
_UniffiConverterString.lower(path)
|
|
4706
|
+
),
|
|
4707
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
4708
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
4709
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
4710
|
+
# lift function
|
|
4711
|
+
_UniffiConverterTypeHashedMessageBytes.lift,
|
|
4712
|
+
|
|
4713
|
+
# Error FFI converter
|
|
4714
|
+
_UniffiConverterTypeSignerError,
|
|
4715
|
+
|
|
4716
|
+
)
|
|
4717
|
+
|
|
4718
|
+
|
|
4719
|
+
|
|
4720
|
+
async def generate_random_signing_commitment(self, ) -> "ExternalFrostCommitments":
|
|
4487
4721
|
"""
|
|
4488
4722
|
Generates Frost signing commitments for multi-party signing.
|
|
4489
4723
|
|
|
4490
4724
|
# Returns
|
|
4491
4725
|
Frost commitments with nonces, or a `SignerError`
|
|
4726
|
+
|
|
4727
|
+
See also: [JavaScript `getRandomSigningCommitment`](https://docs.spark.money/wallets/spark-signer#get-random-signing-commitment)
|
|
4492
4728
|
"""
|
|
4493
4729
|
|
|
4494
4730
|
return await _uniffi_rust_call_async(
|
|
4495
|
-
_UniffiLib.
|
|
4731
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_generate_random_signing_commitment(
|
|
4496
4732
|
self._uniffi_clone_pointer(),
|
|
4497
4733
|
),
|
|
4498
4734
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
@@ -4539,12 +4775,12 @@ _UniffiConverterTypeSignerError,
|
|
|
4539
4775
|
|
|
4540
4776
|
|
|
4541
4777
|
|
|
4542
|
-
async def generate_random_key(self, ) -> "
|
|
4778
|
+
async def generate_random_key(self, ) -> "ExternalSecretKeySource":
|
|
4543
4779
|
"""
|
|
4544
|
-
Generates a random
|
|
4780
|
+
Generates a random secret key.
|
|
4545
4781
|
|
|
4546
4782
|
# Returns
|
|
4547
|
-
A randomly generated
|
|
4783
|
+
A randomly generated secret key source, or an error string
|
|
4548
4784
|
"""
|
|
4549
4785
|
|
|
4550
4786
|
return await _uniffi_rust_call_async(
|
|
@@ -4555,7 +4791,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4555
4791
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
4556
4792
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
4557
4793
|
# lift function
|
|
4558
|
-
|
|
4794
|
+
_UniffiConverterTypeExternalSecretKeySource.lift,
|
|
4559
4795
|
|
|
4560
4796
|
# Error FFI converter
|
|
4561
4797
|
_UniffiConverterTypeSignerError,
|
|
@@ -4564,21 +4800,21 @@ _UniffiConverterTypeSignerError,
|
|
|
4564
4800
|
|
|
4565
4801
|
|
|
4566
4802
|
|
|
4567
|
-
async def
|
|
4803
|
+
async def static_deposit_secret_key_encrypted(self, index: "int") -> "ExternalSecretKeySource":
|
|
4568
4804
|
"""
|
|
4569
|
-
Gets
|
|
4805
|
+
Gets an encrypted static deposit secret key by index.
|
|
4570
4806
|
|
|
4571
4807
|
# Arguments
|
|
4572
4808
|
* `index` - The index of the static deposit key
|
|
4573
4809
|
|
|
4574
4810
|
# Returns
|
|
4575
|
-
The
|
|
4811
|
+
The encrypted secret key, or an error string
|
|
4576
4812
|
"""
|
|
4577
4813
|
|
|
4578
4814
|
_UniffiConverterUInt32.check_lower(index)
|
|
4579
4815
|
|
|
4580
4816
|
return await _uniffi_rust_call_async(
|
|
4581
|
-
_UniffiLib.
|
|
4817
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_secret_key_encrypted(
|
|
4582
4818
|
self._uniffi_clone_pointer(),
|
|
4583
4819
|
_UniffiConverterUInt32.lower(index)
|
|
4584
4820
|
),
|
|
@@ -4586,7 +4822,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4586
4822
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
4587
4823
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
4588
4824
|
# lift function
|
|
4589
|
-
|
|
4825
|
+
_UniffiConverterTypeExternalSecretKeySource.lift,
|
|
4590
4826
|
|
|
4591
4827
|
# Error FFI converter
|
|
4592
4828
|
_UniffiConverterTypeSignerError,
|
|
@@ -4595,21 +4831,23 @@ _UniffiConverterTypeSignerError,
|
|
|
4595
4831
|
|
|
4596
4832
|
|
|
4597
4833
|
|
|
4598
|
-
async def
|
|
4834
|
+
async def static_deposit_secret_key(self, index: "int") -> "PrivateKeyBytes":
|
|
4599
4835
|
"""
|
|
4600
|
-
Gets a static deposit
|
|
4836
|
+
Gets a static deposit secret key by index.
|
|
4601
4837
|
|
|
4602
4838
|
# Arguments
|
|
4603
4839
|
* `index` - The index of the static deposit key
|
|
4604
4840
|
|
|
4605
4841
|
# Returns
|
|
4606
|
-
The 32-byte
|
|
4842
|
+
The 32-byte secret key, or an error string
|
|
4843
|
+
|
|
4844
|
+
See also: [JavaScript `getStaticDepositSecretKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-secret-key)
|
|
4607
4845
|
"""
|
|
4608
4846
|
|
|
4609
4847
|
_UniffiConverterUInt32.check_lower(index)
|
|
4610
4848
|
|
|
4611
4849
|
return await _uniffi_rust_call_async(
|
|
4612
|
-
_UniffiLib.
|
|
4850
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_secret_key(
|
|
4613
4851
|
self._uniffi_clone_pointer(),
|
|
4614
4852
|
_UniffiConverterUInt32.lower(index)
|
|
4615
4853
|
),
|
|
@@ -4626,7 +4864,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4626
4864
|
|
|
4627
4865
|
|
|
4628
4866
|
|
|
4629
|
-
async def
|
|
4867
|
+
async def static_deposit_signing_key(self, index: "int") -> "PublicKeyBytes":
|
|
4630
4868
|
"""
|
|
4631
4869
|
Gets a static deposit public key by index.
|
|
4632
4870
|
|
|
@@ -4635,12 +4873,14 @@ _UniffiConverterTypeSignerError,
|
|
|
4635
4873
|
|
|
4636
4874
|
# Returns
|
|
4637
4875
|
The 33-byte public key, or an error string
|
|
4876
|
+
|
|
4877
|
+
See also: [JavaScript `getStaticDepositSigningKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-signing-key)
|
|
4638
4878
|
"""
|
|
4639
4879
|
|
|
4640
4880
|
_UniffiConverterUInt32.check_lower(index)
|
|
4641
4881
|
|
|
4642
4882
|
return await _uniffi_rust_call_async(
|
|
4643
|
-
_UniffiLib.
|
|
4883
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_signing_key(
|
|
4644
4884
|
self._uniffi_clone_pointer(),
|
|
4645
4885
|
_UniffiConverterUInt32.lower(index)
|
|
4646
4886
|
),
|
|
@@ -4657,33 +4897,36 @@ _UniffiConverterTypeSignerError,
|
|
|
4657
4897
|
|
|
4658
4898
|
|
|
4659
4899
|
|
|
4660
|
-
async def
|
|
4900
|
+
async def subtract_secret_keys(self, signing_key: "ExternalSecretKeySource",new_signing_key: "ExternalSecretKeySource") -> "ExternalSecretKeySource":
|
|
4661
4901
|
"""
|
|
4662
|
-
Subtracts one
|
|
4902
|
+
Subtracts one secret key from another.
|
|
4663
4903
|
|
|
4664
4904
|
# Arguments
|
|
4665
|
-
* `signing_key` - The first
|
|
4666
|
-
* `new_signing_key` - The second
|
|
4905
|
+
* `signing_key` - The first secret key source
|
|
4906
|
+
* `new_signing_key` - The second secret key source to subtract
|
|
4667
4907
|
|
|
4668
4908
|
# Returns
|
|
4669
|
-
The resulting
|
|
4909
|
+
The resulting secret key source, or an error string
|
|
4910
|
+
|
|
4911
|
+
See also: [JavaScript `subtractSplitAndEncrypt`](https://docs.spark.money/wallets/spark-signer#subtract,-split,-and-encrypt)
|
|
4912
|
+
(this method provides the subtraction step of that higher-level operation)
|
|
4670
4913
|
"""
|
|
4671
4914
|
|
|
4672
|
-
|
|
4915
|
+
_UniffiConverterTypeExternalSecretKeySource.check_lower(signing_key)
|
|
4673
4916
|
|
|
4674
|
-
|
|
4917
|
+
_UniffiConverterTypeExternalSecretKeySource.check_lower(new_signing_key)
|
|
4675
4918
|
|
|
4676
4919
|
return await _uniffi_rust_call_async(
|
|
4677
|
-
_UniffiLib.
|
|
4920
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_subtract_secret_keys(
|
|
4678
4921
|
self._uniffi_clone_pointer(),
|
|
4679
|
-
|
|
4680
|
-
|
|
4922
|
+
_UniffiConverterTypeExternalSecretKeySource.lower(signing_key),
|
|
4923
|
+
_UniffiConverterTypeExternalSecretKeySource.lower(new_signing_key)
|
|
4681
4924
|
),
|
|
4682
4925
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
4683
4926
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
4684
4927
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
4685
4928
|
# lift function
|
|
4686
|
-
|
|
4929
|
+
_UniffiConverterTypeExternalSecretKeySource.lift,
|
|
4687
4930
|
|
|
4688
4931
|
# Error FFI converter
|
|
4689
4932
|
_UniffiConverterTypeSignerError,
|
|
@@ -4692,7 +4935,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4692
4935
|
|
|
4693
4936
|
|
|
4694
4937
|
|
|
4695
|
-
async def
|
|
4938
|
+
async def split_secret_with_proofs(self, secret: "ExternalSecretToSplit",threshold: "int",num_shares: "int") -> "typing.List[ExternalVerifiableSecretShare]":
|
|
4696
4939
|
"""
|
|
4697
4940
|
Splits a secret with proofs using Shamir's Secret Sharing.
|
|
4698
4941
|
|
|
@@ -4703,6 +4946,8 @@ _UniffiConverterTypeSignerError,
|
|
|
4703
4946
|
|
|
4704
4947
|
# Returns
|
|
4705
4948
|
Vector of verifiable secret shares, or an error string
|
|
4949
|
+
|
|
4950
|
+
See also: [JavaScript `splitSecretWithProofs`](https://docs.spark.money/wallets/spark-signer#split-secret-with-proofs)
|
|
4706
4951
|
"""
|
|
4707
4952
|
|
|
4708
4953
|
_UniffiConverterTypeExternalSecretToSplit.check_lower(secret)
|
|
@@ -4712,7 +4957,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4712
4957
|
_UniffiConverterUInt32.check_lower(num_shares)
|
|
4713
4958
|
|
|
4714
4959
|
return await _uniffi_rust_call_async(
|
|
4715
|
-
_UniffiLib.
|
|
4960
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_split_secret_with_proofs(
|
|
4716
4961
|
self._uniffi_clone_pointer(),
|
|
4717
4962
|
_UniffiConverterTypeExternalSecretToSplit.lower(secret),
|
|
4718
4963
|
_UniffiConverterUInt32.lower(threshold),
|
|
@@ -4731,26 +4976,26 @@ _UniffiConverterTypeSignerError,
|
|
|
4731
4976
|
|
|
4732
4977
|
|
|
4733
4978
|
|
|
4734
|
-
async def
|
|
4979
|
+
async def encrypt_secret_key_for_receiver(self, secret_key: "ExternalEncryptedPrivateKey",receiver_public_key: "PublicKeyBytes") -> "bytes":
|
|
4735
4980
|
"""
|
|
4736
|
-
Encrypts a
|
|
4981
|
+
Encrypts a secret key for a specific receiver's public key.
|
|
4737
4982
|
|
|
4738
4983
|
# Arguments
|
|
4739
|
-
* `
|
|
4984
|
+
* `secret_key` - The encrypted secret key to re-encrypt
|
|
4740
4985
|
* `receiver_public_key` - The receiver's 33-byte public key
|
|
4741
4986
|
|
|
4742
4987
|
# Returns
|
|
4743
4988
|
Encrypted data for the receiver, or an error string
|
|
4744
4989
|
"""
|
|
4745
4990
|
|
|
4746
|
-
_UniffiConverterTypeExternalEncryptedPrivateKey.check_lower(
|
|
4991
|
+
_UniffiConverterTypeExternalEncryptedPrivateKey.check_lower(secret_key)
|
|
4747
4992
|
|
|
4748
4993
|
_UniffiConverterTypePublicKeyBytes.check_lower(receiver_public_key)
|
|
4749
4994
|
|
|
4750
4995
|
return await _uniffi_rust_call_async(
|
|
4751
|
-
_UniffiLib.
|
|
4996
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_encrypt_secret_key_for_receiver(
|
|
4752
4997
|
self._uniffi_clone_pointer(),
|
|
4753
|
-
_UniffiConverterTypeExternalEncryptedPrivateKey.lower(
|
|
4998
|
+
_UniffiConverterTypeExternalEncryptedPrivateKey.lower(secret_key),
|
|
4754
4999
|
_UniffiConverterTypePublicKeyBytes.lower(receiver_public_key)
|
|
4755
5000
|
),
|
|
4756
5001
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
@@ -4766,23 +5011,23 @@ _UniffiConverterTypeSignerError,
|
|
|
4766
5011
|
|
|
4767
5012
|
|
|
4768
5013
|
|
|
4769
|
-
async def
|
|
5014
|
+
async def public_key_from_secret_key_source(self, secret_key: "ExternalSecretKeySource") -> "PublicKeyBytes":
|
|
4770
5015
|
"""
|
|
4771
|
-
Gets the public key from a
|
|
5016
|
+
Gets the public key from a secret key source.
|
|
4772
5017
|
|
|
4773
5018
|
# Arguments
|
|
4774
|
-
* `
|
|
5019
|
+
* `secret_key` - The secret key source
|
|
4775
5020
|
|
|
4776
5021
|
# Returns
|
|
4777
5022
|
The corresponding 33-byte public key, or an error string
|
|
4778
5023
|
"""
|
|
4779
5024
|
|
|
4780
|
-
|
|
5025
|
+
_UniffiConverterTypeExternalSecretKeySource.check_lower(secret_key)
|
|
4781
5026
|
|
|
4782
5027
|
return await _uniffi_rust_call_async(
|
|
4783
|
-
_UniffiLib.
|
|
5028
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_public_key_from_secret_key_source(
|
|
4784
5029
|
self._uniffi_clone_pointer(),
|
|
4785
|
-
|
|
5030
|
+
_UniffiConverterTypeExternalSecretKeySource.lower(secret_key)
|
|
4786
5031
|
),
|
|
4787
5032
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
4788
5033
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
@@ -4806,6 +5051,8 @@ _UniffiConverterTypeSignerError,
|
|
|
4806
5051
|
|
|
4807
5052
|
# Returns
|
|
4808
5053
|
A signature share, or an error string
|
|
5054
|
+
|
|
5055
|
+
See also: [JavaScript `signFrost`](https://docs.spark.money/wallets/spark-signer#frost-signing)
|
|
4809
5056
|
"""
|
|
4810
5057
|
|
|
4811
5058
|
_UniffiConverterTypeExternalSignFrostRequest.check_lower(request)
|
|
@@ -4828,7 +5075,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4828
5075
|
|
|
4829
5076
|
|
|
4830
5077
|
|
|
4831
|
-
async def
|
|
5078
|
+
async def aggregate_frost(self, request: "ExternalAggregateFrostRequest") -> "ExternalFrostSignature":
|
|
4832
5079
|
"""
|
|
4833
5080
|
Aggregates Frost signature shares into a final signature.
|
|
4834
5081
|
|
|
@@ -4837,12 +5084,14 @@ _UniffiConverterTypeSignerError,
|
|
|
4837
5084
|
|
|
4838
5085
|
# Returns
|
|
4839
5086
|
The aggregated Frost signature, or an error string
|
|
5087
|
+
|
|
5088
|
+
See also: [JavaScript `aggregateFrost`](https://docs.spark.money/wallets/spark-signer#aggregate-frost-signatures)
|
|
4840
5089
|
"""
|
|
4841
5090
|
|
|
4842
5091
|
_UniffiConverterTypeExternalAggregateFrostRequest.check_lower(request)
|
|
4843
5092
|
|
|
4844
5093
|
return await _uniffi_rust_call_async(
|
|
4845
|
-
_UniffiLib.
|
|
5094
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_aggregate_frost(
|
|
4846
5095
|
self._uniffi_clone_pointer(),
|
|
4847
5096
|
_UniffiConverterTypeExternalAggregateFrostRequest.lower(request)
|
|
4848
5097
|
),
|
|
@@ -4932,7 +5181,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
4932
5181
|
):
|
|
4933
5182
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
4934
5183
|
def make_call():
|
|
4935
|
-
args = (
|
|
5184
|
+
args = (_UniffiConverterTypeMessageBytes.lift(message), _UniffiConverterString.lift(path), )
|
|
4936
5185
|
method = uniffi_obj.sign_ecdsa
|
|
4937
5186
|
return method(*args)
|
|
4938
5187
|
|
|
@@ -4967,7 +5216,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
4967
5216
|
):
|
|
4968
5217
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
4969
5218
|
def make_call():
|
|
4970
|
-
args = (
|
|
5219
|
+
args = (_UniffiConverterTypeMessageBytes.lift(message), _UniffiConverterString.lift(path), )
|
|
4971
5220
|
method = uniffi_obj.sign_ecdsa_recoverable
|
|
4972
5221
|
return method(*args)
|
|
4973
5222
|
|
|
@@ -4992,7 +5241,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
4992
5241
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
4993
5242
|
|
|
4994
5243
|
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD4
|
|
4995
|
-
def
|
|
5244
|
+
def encrypt_ecies(
|
|
4996
5245
|
uniffi_handle,
|
|
4997
5246
|
message,
|
|
4998
5247
|
path,
|
|
@@ -5003,7 +5252,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5003
5252
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5004
5253
|
def make_call():
|
|
5005
5254
|
args = (_UniffiConverterBytes.lift(message), _UniffiConverterString.lift(path), )
|
|
5006
|
-
method = uniffi_obj.
|
|
5255
|
+
method = uniffi_obj.encrypt_ecies
|
|
5007
5256
|
return method(*args)
|
|
5008
5257
|
|
|
5009
5258
|
|
|
@@ -5027,7 +5276,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5027
5276
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5028
5277
|
|
|
5029
5278
|
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD5
|
|
5030
|
-
def
|
|
5279
|
+
def decrypt_ecies(
|
|
5031
5280
|
uniffi_handle,
|
|
5032
5281
|
message,
|
|
5033
5282
|
path,
|
|
@@ -5038,7 +5287,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5038
5287
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5039
5288
|
def make_call():
|
|
5040
5289
|
args = (_UniffiConverterBytes.lift(message), _UniffiConverterString.lift(path), )
|
|
5041
|
-
method = uniffi_obj.
|
|
5290
|
+
method = uniffi_obj.decrypt_ecies
|
|
5042
5291
|
return method(*args)
|
|
5043
5292
|
|
|
5044
5293
|
|
|
@@ -5097,7 +5346,42 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5097
5346
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5098
5347
|
|
|
5099
5348
|
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD7
|
|
5100
|
-
def
|
|
5349
|
+
def hmac_sha256(
|
|
5350
|
+
uniffi_handle,
|
|
5351
|
+
message,
|
|
5352
|
+
path,
|
|
5353
|
+
uniffi_future_callback,
|
|
5354
|
+
uniffi_callback_data,
|
|
5355
|
+
uniffi_out_return,
|
|
5356
|
+
):
|
|
5357
|
+
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5358
|
+
def make_call():
|
|
5359
|
+
args = (_UniffiConverterBytes.lift(message), _UniffiConverterString.lift(path), )
|
|
5360
|
+
method = uniffi_obj.hmac_sha256
|
|
5361
|
+
return method(*args)
|
|
5362
|
+
|
|
5363
|
+
|
|
5364
|
+
def handle_success(return_value):
|
|
5365
|
+
uniffi_future_callback(
|
|
5366
|
+
uniffi_callback_data,
|
|
5367
|
+
_UniffiForeignFutureStructRustBuffer(
|
|
5368
|
+
_UniffiConverterTypeHashedMessageBytes.lower(return_value),
|
|
5369
|
+
_UniffiRustCallStatus.default()
|
|
5370
|
+
)
|
|
5371
|
+
)
|
|
5372
|
+
|
|
5373
|
+
def handle_error(status_code, rust_buffer):
|
|
5374
|
+
uniffi_future_callback(
|
|
5375
|
+
uniffi_callback_data,
|
|
5376
|
+
_UniffiForeignFutureStructRustBuffer(
|
|
5377
|
+
_UniffiRustBuffer.default(),
|
|
5378
|
+
_UniffiRustCallStatus(status_code, rust_buffer),
|
|
5379
|
+
)
|
|
5380
|
+
)
|
|
5381
|
+
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5382
|
+
|
|
5383
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD8
|
|
5384
|
+
def generate_random_signing_commitment(
|
|
5101
5385
|
uniffi_handle,
|
|
5102
5386
|
uniffi_future_callback,
|
|
5103
5387
|
uniffi_callback_data,
|
|
@@ -5106,7 +5390,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5106
5390
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5107
5391
|
def make_call():
|
|
5108
5392
|
args = ()
|
|
5109
|
-
method = uniffi_obj.
|
|
5393
|
+
method = uniffi_obj.generate_random_signing_commitment
|
|
5110
5394
|
return method(*args)
|
|
5111
5395
|
|
|
5112
5396
|
|
|
@@ -5129,7 +5413,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5129
5413
|
)
|
|
5130
5414
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5131
5415
|
|
|
5132
|
-
@
|
|
5416
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD9
|
|
5133
5417
|
def get_public_key_for_node(
|
|
5134
5418
|
uniffi_handle,
|
|
5135
5419
|
id,
|
|
@@ -5163,7 +5447,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5163
5447
|
)
|
|
5164
5448
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5165
5449
|
|
|
5166
|
-
@
|
|
5450
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD10
|
|
5167
5451
|
def generate_random_key(
|
|
5168
5452
|
uniffi_handle,
|
|
5169
5453
|
uniffi_future_callback,
|
|
@@ -5181,7 +5465,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5181
5465
|
uniffi_future_callback(
|
|
5182
5466
|
uniffi_callback_data,
|
|
5183
5467
|
_UniffiForeignFutureStructRustBuffer(
|
|
5184
|
-
|
|
5468
|
+
_UniffiConverterTypeExternalSecretKeySource.lower(return_value),
|
|
5185
5469
|
_UniffiRustCallStatus.default()
|
|
5186
5470
|
)
|
|
5187
5471
|
)
|
|
@@ -5196,8 +5480,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5196
5480
|
)
|
|
5197
5481
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5198
5482
|
|
|
5199
|
-
@
|
|
5200
|
-
def
|
|
5483
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD11
|
|
5484
|
+
def static_deposit_secret_key_encrypted(
|
|
5201
5485
|
uniffi_handle,
|
|
5202
5486
|
index,
|
|
5203
5487
|
uniffi_future_callback,
|
|
@@ -5207,7 +5491,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5207
5491
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5208
5492
|
def make_call():
|
|
5209
5493
|
args = (_UniffiConverterUInt32.lift(index), )
|
|
5210
|
-
method = uniffi_obj.
|
|
5494
|
+
method = uniffi_obj.static_deposit_secret_key_encrypted
|
|
5211
5495
|
return method(*args)
|
|
5212
5496
|
|
|
5213
5497
|
|
|
@@ -5215,7 +5499,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5215
5499
|
uniffi_future_callback(
|
|
5216
5500
|
uniffi_callback_data,
|
|
5217
5501
|
_UniffiForeignFutureStructRustBuffer(
|
|
5218
|
-
|
|
5502
|
+
_UniffiConverterTypeExternalSecretKeySource.lower(return_value),
|
|
5219
5503
|
_UniffiRustCallStatus.default()
|
|
5220
5504
|
)
|
|
5221
5505
|
)
|
|
@@ -5230,8 +5514,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5230
5514
|
)
|
|
5231
5515
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5232
5516
|
|
|
5233
|
-
@
|
|
5234
|
-
def
|
|
5517
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD12
|
|
5518
|
+
def static_deposit_secret_key(
|
|
5235
5519
|
uniffi_handle,
|
|
5236
5520
|
index,
|
|
5237
5521
|
uniffi_future_callback,
|
|
@@ -5241,7 +5525,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5241
5525
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5242
5526
|
def make_call():
|
|
5243
5527
|
args = (_UniffiConverterUInt32.lift(index), )
|
|
5244
|
-
method = uniffi_obj.
|
|
5528
|
+
method = uniffi_obj.static_deposit_secret_key
|
|
5245
5529
|
return method(*args)
|
|
5246
5530
|
|
|
5247
5531
|
|
|
@@ -5264,8 +5548,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5264
5548
|
)
|
|
5265
5549
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5266
5550
|
|
|
5267
|
-
@
|
|
5268
|
-
def
|
|
5551
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD13
|
|
5552
|
+
def static_deposit_signing_key(
|
|
5269
5553
|
uniffi_handle,
|
|
5270
5554
|
index,
|
|
5271
5555
|
uniffi_future_callback,
|
|
@@ -5275,7 +5559,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5275
5559
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5276
5560
|
def make_call():
|
|
5277
5561
|
args = (_UniffiConverterUInt32.lift(index), )
|
|
5278
|
-
method = uniffi_obj.
|
|
5562
|
+
method = uniffi_obj.static_deposit_signing_key
|
|
5279
5563
|
return method(*args)
|
|
5280
5564
|
|
|
5281
5565
|
|
|
@@ -5298,8 +5582,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5298
5582
|
)
|
|
5299
5583
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5300
5584
|
|
|
5301
|
-
@
|
|
5302
|
-
def
|
|
5585
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD14
|
|
5586
|
+
def subtract_secret_keys(
|
|
5303
5587
|
uniffi_handle,
|
|
5304
5588
|
signing_key,
|
|
5305
5589
|
new_signing_key,
|
|
@@ -5309,8 +5593,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5309
5593
|
):
|
|
5310
5594
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5311
5595
|
def make_call():
|
|
5312
|
-
args = (
|
|
5313
|
-
method = uniffi_obj.
|
|
5596
|
+
args = (_UniffiConverterTypeExternalSecretKeySource.lift(signing_key), _UniffiConverterTypeExternalSecretKeySource.lift(new_signing_key), )
|
|
5597
|
+
method = uniffi_obj.subtract_secret_keys
|
|
5314
5598
|
return method(*args)
|
|
5315
5599
|
|
|
5316
5600
|
|
|
@@ -5318,7 +5602,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5318
5602
|
uniffi_future_callback(
|
|
5319
5603
|
uniffi_callback_data,
|
|
5320
5604
|
_UniffiForeignFutureStructRustBuffer(
|
|
5321
|
-
|
|
5605
|
+
_UniffiConverterTypeExternalSecretKeySource.lower(return_value),
|
|
5322
5606
|
_UniffiRustCallStatus.default()
|
|
5323
5607
|
)
|
|
5324
5608
|
)
|
|
@@ -5333,8 +5617,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5333
5617
|
)
|
|
5334
5618
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5335
5619
|
|
|
5336
|
-
@
|
|
5337
|
-
def
|
|
5620
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD15
|
|
5621
|
+
def split_secret_with_proofs(
|
|
5338
5622
|
uniffi_handle,
|
|
5339
5623
|
secret,
|
|
5340
5624
|
threshold,
|
|
@@ -5346,7 +5630,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5346
5630
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5347
5631
|
def make_call():
|
|
5348
5632
|
args = (_UniffiConverterTypeExternalSecretToSplit.lift(secret), _UniffiConverterUInt32.lift(threshold), _UniffiConverterUInt32.lift(num_shares), )
|
|
5349
|
-
method = uniffi_obj.
|
|
5633
|
+
method = uniffi_obj.split_secret_with_proofs
|
|
5350
5634
|
return method(*args)
|
|
5351
5635
|
|
|
5352
5636
|
|
|
@@ -5369,10 +5653,10 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5369
5653
|
)
|
|
5370
5654
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5371
5655
|
|
|
5372
|
-
@
|
|
5373
|
-
def
|
|
5656
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD16
|
|
5657
|
+
def encrypt_secret_key_for_receiver(
|
|
5374
5658
|
uniffi_handle,
|
|
5375
|
-
|
|
5659
|
+
secret_key,
|
|
5376
5660
|
receiver_public_key,
|
|
5377
5661
|
uniffi_future_callback,
|
|
5378
5662
|
uniffi_callback_data,
|
|
@@ -5380,8 +5664,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5380
5664
|
):
|
|
5381
5665
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5382
5666
|
def make_call():
|
|
5383
|
-
args = (_UniffiConverterTypeExternalEncryptedPrivateKey.lift(
|
|
5384
|
-
method = uniffi_obj.
|
|
5667
|
+
args = (_UniffiConverterTypeExternalEncryptedPrivateKey.lift(secret_key), _UniffiConverterTypePublicKeyBytes.lift(receiver_public_key), )
|
|
5668
|
+
method = uniffi_obj.encrypt_secret_key_for_receiver
|
|
5385
5669
|
return method(*args)
|
|
5386
5670
|
|
|
5387
5671
|
|
|
@@ -5404,18 +5688,18 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5404
5688
|
)
|
|
5405
5689
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5406
5690
|
|
|
5407
|
-
@
|
|
5408
|
-
def
|
|
5691
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD17
|
|
5692
|
+
def public_key_from_secret_key_source(
|
|
5409
5693
|
uniffi_handle,
|
|
5410
|
-
|
|
5694
|
+
secret_key,
|
|
5411
5695
|
uniffi_future_callback,
|
|
5412
5696
|
uniffi_callback_data,
|
|
5413
5697
|
uniffi_out_return,
|
|
5414
5698
|
):
|
|
5415
5699
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5416
5700
|
def make_call():
|
|
5417
|
-
args = (
|
|
5418
|
-
method = uniffi_obj.
|
|
5701
|
+
args = (_UniffiConverterTypeExternalSecretKeySource.lift(secret_key), )
|
|
5702
|
+
method = uniffi_obj.public_key_from_secret_key_source
|
|
5419
5703
|
return method(*args)
|
|
5420
5704
|
|
|
5421
5705
|
|
|
@@ -5438,7 +5722,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5438
5722
|
)
|
|
5439
5723
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5440
5724
|
|
|
5441
|
-
@
|
|
5725
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD18
|
|
5442
5726
|
def sign_frost(
|
|
5443
5727
|
uniffi_handle,
|
|
5444
5728
|
request,
|
|
@@ -5472,8 +5756,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5472
5756
|
)
|
|
5473
5757
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5474
5758
|
|
|
5475
|
-
@
|
|
5476
|
-
def
|
|
5759
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD19
|
|
5760
|
+
def aggregate_frost(
|
|
5477
5761
|
uniffi_handle,
|
|
5478
5762
|
request,
|
|
5479
5763
|
uniffi_future_callback,
|
|
@@ -5483,7 +5767,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5483
5767
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5484
5768
|
def make_call():
|
|
5485
5769
|
args = (_UniffiConverterTypeExternalAggregateFrostRequest.lift(request), )
|
|
5486
|
-
method = uniffi_obj.
|
|
5770
|
+
method = uniffi_obj.aggregate_frost
|
|
5487
5771
|
return method(*args)
|
|
5488
5772
|
|
|
5489
5773
|
|
|
@@ -5516,21 +5800,22 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5516
5800
|
derive_public_key,
|
|
5517
5801
|
sign_ecdsa,
|
|
5518
5802
|
sign_ecdsa_recoverable,
|
|
5519
|
-
|
|
5520
|
-
|
|
5803
|
+
encrypt_ecies,
|
|
5804
|
+
decrypt_ecies,
|
|
5521
5805
|
sign_hash_schnorr,
|
|
5522
|
-
|
|
5806
|
+
hmac_sha256,
|
|
5807
|
+
generate_random_signing_commitment,
|
|
5523
5808
|
get_public_key_for_node,
|
|
5524
5809
|
generate_random_key,
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5810
|
+
static_deposit_secret_key_encrypted,
|
|
5811
|
+
static_deposit_secret_key,
|
|
5812
|
+
static_deposit_signing_key,
|
|
5813
|
+
subtract_secret_keys,
|
|
5814
|
+
split_secret_with_proofs,
|
|
5815
|
+
encrypt_secret_key_for_receiver,
|
|
5816
|
+
public_key_from_secret_key_source,
|
|
5532
5817
|
sign_frost,
|
|
5533
|
-
|
|
5818
|
+
aggregate_frost,
|
|
5534
5819
|
_uniffi_free
|
|
5535
5820
|
)
|
|
5536
5821
|
# Send Rust a pointer to the VTable. Note: this means we need to keep the struct alive forever,
|
|
@@ -10119,71 +10404,283 @@ class _UniffiConverterTypeConnectWithSignerRequest(_UniffiConverterRustBuffer):
|
|
|
10119
10404
|
_UniffiConverterString.write(value.storage_dir, buf)
|
|
10120
10405
|
|
|
10121
10406
|
|
|
10122
|
-
class
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10407
|
+
class ConversionEstimate:
|
|
10408
|
+
"""
|
|
10409
|
+
Response from estimating a conversion, used when preparing a payment that requires conversion
|
|
10410
|
+
"""
|
|
10411
|
+
|
|
10412
|
+
options: "ConversionOptions"
|
|
10413
|
+
"""
|
|
10414
|
+
The conversion options used for the estimate
|
|
10415
|
+
"""
|
|
10416
|
+
|
|
10417
|
+
amount: "U128"
|
|
10418
|
+
"""
|
|
10419
|
+
The estimated amount to be received from the conversion
|
|
10420
|
+
Denominated in satoshis if converting from Bitcoin, otherwise in the token base units.
|
|
10421
|
+
"""
|
|
10422
|
+
|
|
10423
|
+
fee: "U128"
|
|
10424
|
+
"""
|
|
10425
|
+
The fee estimated for the conversion
|
|
10426
|
+
Denominated in satoshis if converting from Bitcoin, otherwise in the token base units.
|
|
10427
|
+
"""
|
|
10428
|
+
|
|
10429
|
+
def __init__(self, *, options: "ConversionOptions", amount: "U128", fee: "U128"):
|
|
10430
|
+
self.options = options
|
|
10431
|
+
self.amount = amount
|
|
10432
|
+
self.fee = fee
|
|
10134
10433
|
|
|
10135
10434
|
def __str__(self):
|
|
10136
|
-
return "
|
|
10435
|
+
return "ConversionEstimate(options={}, amount={}, fee={})".format(self.options, self.amount, self.fee)
|
|
10137
10436
|
|
|
10138
10437
|
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:
|
|
10438
|
+
if self.options != other.options:
|
|
10144
10439
|
return False
|
|
10145
|
-
if self.
|
|
10440
|
+
if self.amount != other.amount:
|
|
10146
10441
|
return False
|
|
10147
|
-
if self.
|
|
10442
|
+
if self.fee != other.fee:
|
|
10148
10443
|
return False
|
|
10149
10444
|
return True
|
|
10150
10445
|
|
|
10151
|
-
class
|
|
10446
|
+
class _UniffiConverterTypeConversionEstimate(_UniffiConverterRustBuffer):
|
|
10152
10447
|
@staticmethod
|
|
10153
10448
|
def read(buf):
|
|
10154
|
-
return
|
|
10155
|
-
|
|
10156
|
-
|
|
10157
|
-
|
|
10158
|
-
is_freezable=_UniffiConverterBool.read(buf),
|
|
10159
|
-
max_supply=_UniffiConverterTypeU128.read(buf),
|
|
10449
|
+
return ConversionEstimate(
|
|
10450
|
+
options=_UniffiConverterTypeConversionOptions.read(buf),
|
|
10451
|
+
amount=_UniffiConverterTypeU128.read(buf),
|
|
10452
|
+
fee=_UniffiConverterTypeU128.read(buf),
|
|
10160
10453
|
)
|
|
10161
10454
|
|
|
10162
10455
|
@staticmethod
|
|
10163
10456
|
def check_lower(value):
|
|
10164
|
-
|
|
10165
|
-
|
|
10166
|
-
|
|
10167
|
-
_UniffiConverterBool.check_lower(value.is_freezable)
|
|
10168
|
-
_UniffiConverterTypeU128.check_lower(value.max_supply)
|
|
10457
|
+
_UniffiConverterTypeConversionOptions.check_lower(value.options)
|
|
10458
|
+
_UniffiConverterTypeU128.check_lower(value.amount)
|
|
10459
|
+
_UniffiConverterTypeU128.check_lower(value.fee)
|
|
10169
10460
|
|
|
10170
10461
|
@staticmethod
|
|
10171
10462
|
def write(value, buf):
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
_UniffiConverterBool.write(value.is_freezable, buf)
|
|
10176
|
-
_UniffiConverterTypeU128.write(value.max_supply, buf)
|
|
10177
|
-
|
|
10463
|
+
_UniffiConverterTypeConversionOptions.write(value.options, buf)
|
|
10464
|
+
_UniffiConverterTypeU128.write(value.amount, buf)
|
|
10465
|
+
_UniffiConverterTypeU128.write(value.fee, buf)
|
|
10178
10466
|
|
|
10179
|
-
class Credentials:
|
|
10180
|
-
username: "str"
|
|
10181
|
-
password: "str"
|
|
10182
|
-
def __init__(self, *, username: "str", password: "str"):
|
|
10183
|
-
self.username = username
|
|
10184
|
-
self.password = password
|
|
10185
10467
|
|
|
10186
|
-
|
|
10468
|
+
class ConversionInfo:
|
|
10469
|
+
pool_id: "str"
|
|
10470
|
+
"""
|
|
10471
|
+
The pool id associated with the conversion
|
|
10472
|
+
"""
|
|
10473
|
+
|
|
10474
|
+
conversion_id: "str"
|
|
10475
|
+
"""
|
|
10476
|
+
The conversion id shared by both sides of the conversion
|
|
10477
|
+
"""
|
|
10478
|
+
|
|
10479
|
+
status: "ConversionStatus"
|
|
10480
|
+
"""
|
|
10481
|
+
The status of the conversion
|
|
10482
|
+
"""
|
|
10483
|
+
|
|
10484
|
+
fee: "typing.Optional[U128]"
|
|
10485
|
+
"""
|
|
10486
|
+
The fee paid for the conversion
|
|
10487
|
+
Denominated in satoshis if converting from Bitcoin, otherwise in the token base units.
|
|
10488
|
+
"""
|
|
10489
|
+
|
|
10490
|
+
purpose: "typing.Optional[ConversionPurpose]"
|
|
10491
|
+
"""
|
|
10492
|
+
The purpose of the conversion
|
|
10493
|
+
"""
|
|
10494
|
+
|
|
10495
|
+
def __init__(self, *, pool_id: "str", conversion_id: "str", status: "ConversionStatus", fee: "typing.Optional[U128]", purpose: "typing.Optional[ConversionPurpose]"):
|
|
10496
|
+
self.pool_id = pool_id
|
|
10497
|
+
self.conversion_id = conversion_id
|
|
10498
|
+
self.status = status
|
|
10499
|
+
self.fee = fee
|
|
10500
|
+
self.purpose = purpose
|
|
10501
|
+
|
|
10502
|
+
def __str__(self):
|
|
10503
|
+
return "ConversionInfo(pool_id={}, conversion_id={}, status={}, fee={}, purpose={})".format(self.pool_id, self.conversion_id, self.status, self.fee, self.purpose)
|
|
10504
|
+
|
|
10505
|
+
def __eq__(self, other):
|
|
10506
|
+
if self.pool_id != other.pool_id:
|
|
10507
|
+
return False
|
|
10508
|
+
if self.conversion_id != other.conversion_id:
|
|
10509
|
+
return False
|
|
10510
|
+
if self.status != other.status:
|
|
10511
|
+
return False
|
|
10512
|
+
if self.fee != other.fee:
|
|
10513
|
+
return False
|
|
10514
|
+
if self.purpose != other.purpose:
|
|
10515
|
+
return False
|
|
10516
|
+
return True
|
|
10517
|
+
|
|
10518
|
+
class _UniffiConverterTypeConversionInfo(_UniffiConverterRustBuffer):
|
|
10519
|
+
@staticmethod
|
|
10520
|
+
def read(buf):
|
|
10521
|
+
return ConversionInfo(
|
|
10522
|
+
pool_id=_UniffiConverterString.read(buf),
|
|
10523
|
+
conversion_id=_UniffiConverterString.read(buf),
|
|
10524
|
+
status=_UniffiConverterTypeConversionStatus.read(buf),
|
|
10525
|
+
fee=_UniffiConverterOptionalTypeU128.read(buf),
|
|
10526
|
+
purpose=_UniffiConverterOptionalTypeConversionPurpose.read(buf),
|
|
10527
|
+
)
|
|
10528
|
+
|
|
10529
|
+
@staticmethod
|
|
10530
|
+
def check_lower(value):
|
|
10531
|
+
_UniffiConverterString.check_lower(value.pool_id)
|
|
10532
|
+
_UniffiConverterString.check_lower(value.conversion_id)
|
|
10533
|
+
_UniffiConverterTypeConversionStatus.check_lower(value.status)
|
|
10534
|
+
_UniffiConverterOptionalTypeU128.check_lower(value.fee)
|
|
10535
|
+
_UniffiConverterOptionalTypeConversionPurpose.check_lower(value.purpose)
|
|
10536
|
+
|
|
10537
|
+
@staticmethod
|
|
10538
|
+
def write(value, buf):
|
|
10539
|
+
_UniffiConverterString.write(value.pool_id, buf)
|
|
10540
|
+
_UniffiConverterString.write(value.conversion_id, buf)
|
|
10541
|
+
_UniffiConverterTypeConversionStatus.write(value.status, buf)
|
|
10542
|
+
_UniffiConverterOptionalTypeU128.write(value.fee, buf)
|
|
10543
|
+
_UniffiConverterOptionalTypeConversionPurpose.write(value.purpose, buf)
|
|
10544
|
+
|
|
10545
|
+
|
|
10546
|
+
class ConversionOptions:
|
|
10547
|
+
"""
|
|
10548
|
+
Options for conversion when fulfilling a payment. When set, the SDK will
|
|
10549
|
+
perform a conversion before fulfilling the payment. If not set, the payment
|
|
10550
|
+
will only be fulfilled if the wallet has sufficient balance of the required asset.
|
|
10551
|
+
"""
|
|
10552
|
+
|
|
10553
|
+
conversion_type: "ConversionType"
|
|
10554
|
+
"""
|
|
10555
|
+
The type of conversion to perform when fulfilling the payment
|
|
10556
|
+
"""
|
|
10557
|
+
|
|
10558
|
+
max_slippage_bps: "typing.Optional[int]"
|
|
10559
|
+
"""
|
|
10560
|
+
The optional maximum slippage in basis points (1/100 of a percent) allowed when
|
|
10561
|
+
a conversion is needed to fulfill the payment. Defaults to 50 bps (0.5%) if not set.
|
|
10562
|
+
The conversion will fail if the actual amount received is less than
|
|
10563
|
+
`estimated_amount * (1 - max_slippage_bps / 10_000)`.
|
|
10564
|
+
"""
|
|
10565
|
+
|
|
10566
|
+
completion_timeout_secs: "typing.Optional[int]"
|
|
10567
|
+
"""
|
|
10568
|
+
The optional timeout in seconds to wait for the conversion to complete
|
|
10569
|
+
when fulfilling the payment. This timeout only concerns waiting for the received
|
|
10570
|
+
payment of the conversion. If the timeout is reached before the conversion
|
|
10571
|
+
is complete, the payment will fail. Defaults to 30 seconds if not set.
|
|
10572
|
+
"""
|
|
10573
|
+
|
|
10574
|
+
def __init__(self, *, conversion_type: "ConversionType", max_slippage_bps: "typing.Optional[int]" = _DEFAULT, completion_timeout_secs: "typing.Optional[int]" = _DEFAULT):
|
|
10575
|
+
self.conversion_type = conversion_type
|
|
10576
|
+
if max_slippage_bps is _DEFAULT:
|
|
10577
|
+
self.max_slippage_bps = None
|
|
10578
|
+
else:
|
|
10579
|
+
self.max_slippage_bps = max_slippage_bps
|
|
10580
|
+
if completion_timeout_secs is _DEFAULT:
|
|
10581
|
+
self.completion_timeout_secs = None
|
|
10582
|
+
else:
|
|
10583
|
+
self.completion_timeout_secs = completion_timeout_secs
|
|
10584
|
+
|
|
10585
|
+
def __str__(self):
|
|
10586
|
+
return "ConversionOptions(conversion_type={}, max_slippage_bps={}, completion_timeout_secs={})".format(self.conversion_type, self.max_slippage_bps, self.completion_timeout_secs)
|
|
10587
|
+
|
|
10588
|
+
def __eq__(self, other):
|
|
10589
|
+
if self.conversion_type != other.conversion_type:
|
|
10590
|
+
return False
|
|
10591
|
+
if self.max_slippage_bps != other.max_slippage_bps:
|
|
10592
|
+
return False
|
|
10593
|
+
if self.completion_timeout_secs != other.completion_timeout_secs:
|
|
10594
|
+
return False
|
|
10595
|
+
return True
|
|
10596
|
+
|
|
10597
|
+
class _UniffiConverterTypeConversionOptions(_UniffiConverterRustBuffer):
|
|
10598
|
+
@staticmethod
|
|
10599
|
+
def read(buf):
|
|
10600
|
+
return ConversionOptions(
|
|
10601
|
+
conversion_type=_UniffiConverterTypeConversionType.read(buf),
|
|
10602
|
+
max_slippage_bps=_UniffiConverterOptionalUInt32.read(buf),
|
|
10603
|
+
completion_timeout_secs=_UniffiConverterOptionalUInt32.read(buf),
|
|
10604
|
+
)
|
|
10605
|
+
|
|
10606
|
+
@staticmethod
|
|
10607
|
+
def check_lower(value):
|
|
10608
|
+
_UniffiConverterTypeConversionType.check_lower(value.conversion_type)
|
|
10609
|
+
_UniffiConverterOptionalUInt32.check_lower(value.max_slippage_bps)
|
|
10610
|
+
_UniffiConverterOptionalUInt32.check_lower(value.completion_timeout_secs)
|
|
10611
|
+
|
|
10612
|
+
@staticmethod
|
|
10613
|
+
def write(value, buf):
|
|
10614
|
+
_UniffiConverterTypeConversionType.write(value.conversion_type, buf)
|
|
10615
|
+
_UniffiConverterOptionalUInt32.write(value.max_slippage_bps, buf)
|
|
10616
|
+
_UniffiConverterOptionalUInt32.write(value.completion_timeout_secs, buf)
|
|
10617
|
+
|
|
10618
|
+
|
|
10619
|
+
class CreateIssuerTokenRequest:
|
|
10620
|
+
name: "str"
|
|
10621
|
+
ticker: "str"
|
|
10622
|
+
decimals: "int"
|
|
10623
|
+
is_freezable: "bool"
|
|
10624
|
+
max_supply: "U128"
|
|
10625
|
+
def __init__(self, *, name: "str", ticker: "str", decimals: "int", is_freezable: "bool", max_supply: "U128"):
|
|
10626
|
+
self.name = name
|
|
10627
|
+
self.ticker = ticker
|
|
10628
|
+
self.decimals = decimals
|
|
10629
|
+
self.is_freezable = is_freezable
|
|
10630
|
+
self.max_supply = max_supply
|
|
10631
|
+
|
|
10632
|
+
def __str__(self):
|
|
10633
|
+
return "CreateIssuerTokenRequest(name={}, ticker={}, decimals={}, is_freezable={}, max_supply={})".format(self.name, self.ticker, self.decimals, self.is_freezable, self.max_supply)
|
|
10634
|
+
|
|
10635
|
+
def __eq__(self, other):
|
|
10636
|
+
if self.name != other.name:
|
|
10637
|
+
return False
|
|
10638
|
+
if self.ticker != other.ticker:
|
|
10639
|
+
return False
|
|
10640
|
+
if self.decimals != other.decimals:
|
|
10641
|
+
return False
|
|
10642
|
+
if self.is_freezable != other.is_freezable:
|
|
10643
|
+
return False
|
|
10644
|
+
if self.max_supply != other.max_supply:
|
|
10645
|
+
return False
|
|
10646
|
+
return True
|
|
10647
|
+
|
|
10648
|
+
class _UniffiConverterTypeCreateIssuerTokenRequest(_UniffiConverterRustBuffer):
|
|
10649
|
+
@staticmethod
|
|
10650
|
+
def read(buf):
|
|
10651
|
+
return CreateIssuerTokenRequest(
|
|
10652
|
+
name=_UniffiConverterString.read(buf),
|
|
10653
|
+
ticker=_UniffiConverterString.read(buf),
|
|
10654
|
+
decimals=_UniffiConverterUInt32.read(buf),
|
|
10655
|
+
is_freezable=_UniffiConverterBool.read(buf),
|
|
10656
|
+
max_supply=_UniffiConverterTypeU128.read(buf),
|
|
10657
|
+
)
|
|
10658
|
+
|
|
10659
|
+
@staticmethod
|
|
10660
|
+
def check_lower(value):
|
|
10661
|
+
_UniffiConverterString.check_lower(value.name)
|
|
10662
|
+
_UniffiConverterString.check_lower(value.ticker)
|
|
10663
|
+
_UniffiConverterUInt32.check_lower(value.decimals)
|
|
10664
|
+
_UniffiConverterBool.check_lower(value.is_freezable)
|
|
10665
|
+
_UniffiConverterTypeU128.check_lower(value.max_supply)
|
|
10666
|
+
|
|
10667
|
+
@staticmethod
|
|
10668
|
+
def write(value, buf):
|
|
10669
|
+
_UniffiConverterString.write(value.name, buf)
|
|
10670
|
+
_UniffiConverterString.write(value.ticker, buf)
|
|
10671
|
+
_UniffiConverterUInt32.write(value.decimals, buf)
|
|
10672
|
+
_UniffiConverterBool.write(value.is_freezable, buf)
|
|
10673
|
+
_UniffiConverterTypeU128.write(value.max_supply, buf)
|
|
10674
|
+
|
|
10675
|
+
|
|
10676
|
+
class Credentials:
|
|
10677
|
+
username: "str"
|
|
10678
|
+
password: "str"
|
|
10679
|
+
def __init__(self, *, username: "str", password: "str"):
|
|
10680
|
+
self.username = username
|
|
10681
|
+
self.password = password
|
|
10682
|
+
|
|
10683
|
+
def __str__(self):
|
|
10187
10684
|
return "Credentials(username={}, password={})".format(self.username, self.password)
|
|
10188
10685
|
|
|
10189
10686
|
def __eq__(self, other):
|
|
@@ -10887,7 +11384,7 @@ class ExternalSignFrostRequest:
|
|
|
10887
11384
|
The public key (33 bytes compressed)
|
|
10888
11385
|
"""
|
|
10889
11386
|
|
|
10890
|
-
private_key: "
|
|
11387
|
+
private_key: "ExternalSecretKeySource"
|
|
10891
11388
|
"""
|
|
10892
11389
|
The private key source
|
|
10893
11390
|
"""
|
|
@@ -10912,7 +11409,7 @@ class ExternalSignFrostRequest:
|
|
|
10912
11409
|
Optional adaptor public key (33 bytes compressed)
|
|
10913
11410
|
"""
|
|
10914
11411
|
|
|
10915
|
-
def __init__(self, *, message: "bytes", public_key: "bytes", private_key: "
|
|
11412
|
+
def __init__(self, *, message: "bytes", public_key: "bytes", private_key: "ExternalSecretKeySource", verifying_key: "bytes", self_nonce_commitment: "ExternalFrostCommitments", statechain_commitments: "typing.List[IdentifierCommitmentPair]", adaptor_public_key: "typing.Optional[bytes]"):
|
|
10916
11413
|
self.message = message
|
|
10917
11414
|
self.public_key = public_key
|
|
10918
11415
|
self.private_key = private_key
|
|
@@ -10947,7 +11444,7 @@ class _UniffiConverterTypeExternalSignFrostRequest(_UniffiConverterRustBuffer):
|
|
|
10947
11444
|
return ExternalSignFrostRequest(
|
|
10948
11445
|
message=_UniffiConverterBytes.read(buf),
|
|
10949
11446
|
public_key=_UniffiConverterBytes.read(buf),
|
|
10950
|
-
private_key=
|
|
11447
|
+
private_key=_UniffiConverterTypeExternalSecretKeySource.read(buf),
|
|
10951
11448
|
verifying_key=_UniffiConverterBytes.read(buf),
|
|
10952
11449
|
self_nonce_commitment=_UniffiConverterTypeExternalFrostCommitments.read(buf),
|
|
10953
11450
|
statechain_commitments=_UniffiConverterSequenceTypeIdentifierCommitmentPair.read(buf),
|
|
@@ -10958,7 +11455,7 @@ class _UniffiConverterTypeExternalSignFrostRequest(_UniffiConverterRustBuffer):
|
|
|
10958
11455
|
def check_lower(value):
|
|
10959
11456
|
_UniffiConverterBytes.check_lower(value.message)
|
|
10960
11457
|
_UniffiConverterBytes.check_lower(value.public_key)
|
|
10961
|
-
|
|
11458
|
+
_UniffiConverterTypeExternalSecretKeySource.check_lower(value.private_key)
|
|
10962
11459
|
_UniffiConverterBytes.check_lower(value.verifying_key)
|
|
10963
11460
|
_UniffiConverterTypeExternalFrostCommitments.check_lower(value.self_nonce_commitment)
|
|
10964
11461
|
_UniffiConverterSequenceTypeIdentifierCommitmentPair.check_lower(value.statechain_commitments)
|
|
@@ -10968,7 +11465,7 @@ class _UniffiConverterTypeExternalSignFrostRequest(_UniffiConverterRustBuffer):
|
|
|
10968
11465
|
def write(value, buf):
|
|
10969
11466
|
_UniffiConverterBytes.write(value.message, buf)
|
|
10970
11467
|
_UniffiConverterBytes.write(value.public_key, buf)
|
|
10971
|
-
|
|
11468
|
+
_UniffiConverterTypeExternalSecretKeySource.write(value.private_key, buf)
|
|
10972
11469
|
_UniffiConverterBytes.write(value.verifying_key, buf)
|
|
10973
11470
|
_UniffiConverterTypeExternalFrostCommitments.write(value.self_nonce_commitment, buf)
|
|
10974
11471
|
_UniffiConverterSequenceTypeIdentifierCommitmentPair.write(value.statechain_commitments, buf)
|
|
@@ -11108,8 +11605,8 @@ class _UniffiConverterTypeExternalVerifiableSecretShare(_UniffiConverterRustBuff
|
|
|
11108
11605
|
_UniffiConverterSequenceBytes.write(value.proofs, buf)
|
|
11109
11606
|
|
|
11110
11607
|
|
|
11111
|
-
class
|
|
11112
|
-
conversion_type: "
|
|
11608
|
+
class FetchConversionLimitsRequest:
|
|
11609
|
+
conversion_type: "ConversionType"
|
|
11113
11610
|
"""
|
|
11114
11611
|
The type of conversion, either from or to Bitcoin.
|
|
11115
11612
|
"""
|
|
@@ -11119,7 +11616,7 @@ class FetchTokenConversionLimitsRequest:
|
|
|
11119
11616
|
The token identifier when converting to a token.
|
|
11120
11617
|
"""
|
|
11121
11618
|
|
|
11122
|
-
def __init__(self, *, conversion_type: "
|
|
11619
|
+
def __init__(self, *, conversion_type: "ConversionType", token_identifier: "typing.Optional[str]" = _DEFAULT):
|
|
11123
11620
|
self.conversion_type = conversion_type
|
|
11124
11621
|
if token_identifier is _DEFAULT:
|
|
11125
11622
|
self.token_identifier = None
|
|
@@ -11127,7 +11624,7 @@ class FetchTokenConversionLimitsRequest:
|
|
|
11127
11624
|
self.token_identifier = token_identifier
|
|
11128
11625
|
|
|
11129
11626
|
def __str__(self):
|
|
11130
|
-
return "
|
|
11627
|
+
return "FetchConversionLimitsRequest(conversion_type={}, token_identifier={})".format(self.conversion_type, self.token_identifier)
|
|
11131
11628
|
|
|
11132
11629
|
def __eq__(self, other):
|
|
11133
11630
|
if self.conversion_type != other.conversion_type:
|
|
@@ -11136,26 +11633,26 @@ class FetchTokenConversionLimitsRequest:
|
|
|
11136
11633
|
return False
|
|
11137
11634
|
return True
|
|
11138
11635
|
|
|
11139
|
-
class
|
|
11636
|
+
class _UniffiConverterTypeFetchConversionLimitsRequest(_UniffiConverterRustBuffer):
|
|
11140
11637
|
@staticmethod
|
|
11141
11638
|
def read(buf):
|
|
11142
|
-
return
|
|
11143
|
-
conversion_type=
|
|
11639
|
+
return FetchConversionLimitsRequest(
|
|
11640
|
+
conversion_type=_UniffiConverterTypeConversionType.read(buf),
|
|
11144
11641
|
token_identifier=_UniffiConverterOptionalString.read(buf),
|
|
11145
11642
|
)
|
|
11146
11643
|
|
|
11147
11644
|
@staticmethod
|
|
11148
11645
|
def check_lower(value):
|
|
11149
|
-
|
|
11646
|
+
_UniffiConverterTypeConversionType.check_lower(value.conversion_type)
|
|
11150
11647
|
_UniffiConverterOptionalString.check_lower(value.token_identifier)
|
|
11151
11648
|
|
|
11152
11649
|
@staticmethod
|
|
11153
11650
|
def write(value, buf):
|
|
11154
|
-
|
|
11651
|
+
_UniffiConverterTypeConversionType.write(value.conversion_type, buf)
|
|
11155
11652
|
_UniffiConverterOptionalString.write(value.token_identifier, buf)
|
|
11156
11653
|
|
|
11157
11654
|
|
|
11158
|
-
class
|
|
11655
|
+
class FetchConversionLimitsResponse:
|
|
11159
11656
|
min_from_amount: "typing.Optional[U128]"
|
|
11160
11657
|
"""
|
|
11161
11658
|
The minimum amount to be converted.
|
|
@@ -11173,7 +11670,7 @@ class FetchTokenConversionLimitsResponse:
|
|
|
11173
11670
|
self.min_to_amount = min_to_amount
|
|
11174
11671
|
|
|
11175
11672
|
def __str__(self):
|
|
11176
|
-
return "
|
|
11673
|
+
return "FetchConversionLimitsResponse(min_from_amount={}, min_to_amount={})".format(self.min_from_amount, self.min_to_amount)
|
|
11177
11674
|
|
|
11178
11675
|
def __eq__(self, other):
|
|
11179
11676
|
if self.min_from_amount != other.min_from_amount:
|
|
@@ -11182,10 +11679,10 @@ class FetchTokenConversionLimitsResponse:
|
|
|
11182
11679
|
return False
|
|
11183
11680
|
return True
|
|
11184
11681
|
|
|
11185
|
-
class
|
|
11682
|
+
class _UniffiConverterTypeFetchConversionLimitsResponse(_UniffiConverterRustBuffer):
|
|
11186
11683
|
@staticmethod
|
|
11187
11684
|
def read(buf):
|
|
11188
|
-
return
|
|
11685
|
+
return FetchConversionLimitsResponse(
|
|
11189
11686
|
min_from_amount=_UniffiConverterOptionalTypeU128.read(buf),
|
|
11190
11687
|
min_to_amount=_UniffiConverterOptionalTypeU128.read(buf),
|
|
11191
11688
|
)
|
|
@@ -11503,6 +12000,35 @@ class _UniffiConverterTypeGetTokensMetadataResponse(_UniffiConverterRustBuffer):
|
|
|
11503
12000
|
_UniffiConverterSequenceTypeTokenMetadata.write(value.tokens_metadata, buf)
|
|
11504
12001
|
|
|
11505
12002
|
|
|
12003
|
+
class HashedMessageBytes:
|
|
12004
|
+
bytes: "bytes"
|
|
12005
|
+
def __init__(self, *, bytes: "bytes"):
|
|
12006
|
+
self.bytes = bytes
|
|
12007
|
+
|
|
12008
|
+
def __str__(self):
|
|
12009
|
+
return "HashedMessageBytes(bytes={})".format(self.bytes)
|
|
12010
|
+
|
|
12011
|
+
def __eq__(self, other):
|
|
12012
|
+
if self.bytes != other.bytes:
|
|
12013
|
+
return False
|
|
12014
|
+
return True
|
|
12015
|
+
|
|
12016
|
+
class _UniffiConverterTypeHashedMessageBytes(_UniffiConverterRustBuffer):
|
|
12017
|
+
@staticmethod
|
|
12018
|
+
def read(buf):
|
|
12019
|
+
return HashedMessageBytes(
|
|
12020
|
+
bytes=_UniffiConverterBytes.read(buf),
|
|
12021
|
+
)
|
|
12022
|
+
|
|
12023
|
+
@staticmethod
|
|
12024
|
+
def check_lower(value):
|
|
12025
|
+
_UniffiConverterBytes.check_lower(value.bytes)
|
|
12026
|
+
|
|
12027
|
+
@staticmethod
|
|
12028
|
+
def write(value, buf):
|
|
12029
|
+
_UniffiConverterBytes.write(value.bytes, buf)
|
|
12030
|
+
|
|
12031
|
+
|
|
11506
12032
|
class IdentifierCommitmentPair:
|
|
11507
12033
|
"""
|
|
11508
12034
|
FFI-safe wrapper for (Identifier, `SigningCommitments`) pair
|
|
@@ -12181,6 +12707,39 @@ class _UniffiConverterTypeLnurlAuthRequestDetails(_UniffiConverterRustBuffer):
|
|
|
12181
12707
|
_UniffiConverterString.write(value.url, buf)
|
|
12182
12708
|
|
|
12183
12709
|
|
|
12710
|
+
class LnurlErrorDetails:
|
|
12711
|
+
"""
|
|
12712
|
+
LNURL error details
|
|
12713
|
+
"""
|
|
12714
|
+
|
|
12715
|
+
reason: "str"
|
|
12716
|
+
def __init__(self, *, reason: "str"):
|
|
12717
|
+
self.reason = reason
|
|
12718
|
+
|
|
12719
|
+
def __str__(self):
|
|
12720
|
+
return "LnurlErrorDetails(reason={})".format(self.reason)
|
|
12721
|
+
|
|
12722
|
+
def __eq__(self, other):
|
|
12723
|
+
if self.reason != other.reason:
|
|
12724
|
+
return False
|
|
12725
|
+
return True
|
|
12726
|
+
|
|
12727
|
+
class _UniffiConverterTypeLnurlErrorDetails(_UniffiConverterRustBuffer):
|
|
12728
|
+
@staticmethod
|
|
12729
|
+
def read(buf):
|
|
12730
|
+
return LnurlErrorDetails(
|
|
12731
|
+
reason=_UniffiConverterString.read(buf),
|
|
12732
|
+
)
|
|
12733
|
+
|
|
12734
|
+
@staticmethod
|
|
12735
|
+
def check_lower(value):
|
|
12736
|
+
_UniffiConverterString.check_lower(value.reason)
|
|
12737
|
+
|
|
12738
|
+
@staticmethod
|
|
12739
|
+
def write(value, buf):
|
|
12740
|
+
_UniffiConverterString.write(value.reason, buf)
|
|
12741
|
+
|
|
12742
|
+
|
|
12184
12743
|
class LnurlPayInfo:
|
|
12185
12744
|
"""
|
|
12186
12745
|
Represents the payment LNURL info
|
|
@@ -12827,6 +13386,39 @@ class _UniffiConverterTypeLogEntry(_UniffiConverterRustBuffer):
|
|
|
12827
13386
|
_UniffiConverterString.write(value.level, buf)
|
|
12828
13387
|
|
|
12829
13388
|
|
|
13389
|
+
class MessageBytes:
|
|
13390
|
+
"""
|
|
13391
|
+
FFI-safe representation of a 32-byte message digest for ECDSA signing
|
|
13392
|
+
"""
|
|
13393
|
+
|
|
13394
|
+
bytes: "bytes"
|
|
13395
|
+
def __init__(self, *, bytes: "bytes"):
|
|
13396
|
+
self.bytes = bytes
|
|
13397
|
+
|
|
13398
|
+
def __str__(self):
|
|
13399
|
+
return "MessageBytes(bytes={})".format(self.bytes)
|
|
13400
|
+
|
|
13401
|
+
def __eq__(self, other):
|
|
13402
|
+
if self.bytes != other.bytes:
|
|
13403
|
+
return False
|
|
13404
|
+
return True
|
|
13405
|
+
|
|
13406
|
+
class _UniffiConverterTypeMessageBytes(_UniffiConverterRustBuffer):
|
|
13407
|
+
@staticmethod
|
|
13408
|
+
def read(buf):
|
|
13409
|
+
return MessageBytes(
|
|
13410
|
+
bytes=_UniffiConverterBytes.read(buf),
|
|
13411
|
+
)
|
|
13412
|
+
|
|
13413
|
+
@staticmethod
|
|
13414
|
+
def check_lower(value):
|
|
13415
|
+
_UniffiConverterBytes.check_lower(value.bytes)
|
|
13416
|
+
|
|
13417
|
+
@staticmethod
|
|
13418
|
+
def write(value, buf):
|
|
13419
|
+
_UniffiConverterBytes.write(value.bytes, buf)
|
|
13420
|
+
|
|
13421
|
+
|
|
12830
13422
|
class MessageSuccessActionData:
|
|
12831
13423
|
message: "str"
|
|
12832
13424
|
def __init__(self, *, message: "str"):
|
|
@@ -13143,16 +13735,16 @@ class PaymentMetadata:
|
|
|
13143
13735
|
lnurl_pay_info: "typing.Optional[LnurlPayInfo]"
|
|
13144
13736
|
lnurl_withdraw_info: "typing.Optional[LnurlWithdrawInfo]"
|
|
13145
13737
|
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]",
|
|
13738
|
+
conversion_info: "typing.Optional[ConversionInfo]"
|
|
13739
|
+
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
13740
|
self.parent_payment_id = parent_payment_id
|
|
13149
13741
|
self.lnurl_pay_info = lnurl_pay_info
|
|
13150
13742
|
self.lnurl_withdraw_info = lnurl_withdraw_info
|
|
13151
13743
|
self.lnurl_description = lnurl_description
|
|
13152
|
-
self.
|
|
13744
|
+
self.conversion_info = conversion_info
|
|
13153
13745
|
|
|
13154
13746
|
def __str__(self):
|
|
13155
|
-
return "PaymentMetadata(parent_payment_id={}, lnurl_pay_info={}, lnurl_withdraw_info={}, lnurl_description={},
|
|
13747
|
+
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
13748
|
|
|
13157
13749
|
def __eq__(self, other):
|
|
13158
13750
|
if self.parent_payment_id != other.parent_payment_id:
|
|
@@ -13163,7 +13755,7 @@ class PaymentMetadata:
|
|
|
13163
13755
|
return False
|
|
13164
13756
|
if self.lnurl_description != other.lnurl_description:
|
|
13165
13757
|
return False
|
|
13166
|
-
if self.
|
|
13758
|
+
if self.conversion_info != other.conversion_info:
|
|
13167
13759
|
return False
|
|
13168
13760
|
return True
|
|
13169
13761
|
|
|
@@ -13175,7 +13767,7 @@ class _UniffiConverterTypePaymentMetadata(_UniffiConverterRustBuffer):
|
|
|
13175
13767
|
lnurl_pay_info=_UniffiConverterOptionalTypeLnurlPayInfo.read(buf),
|
|
13176
13768
|
lnurl_withdraw_info=_UniffiConverterOptionalTypeLnurlWithdrawInfo.read(buf),
|
|
13177
13769
|
lnurl_description=_UniffiConverterOptionalString.read(buf),
|
|
13178
|
-
|
|
13770
|
+
conversion_info=_UniffiConverterOptionalTypeConversionInfo.read(buf),
|
|
13179
13771
|
)
|
|
13180
13772
|
|
|
13181
13773
|
@staticmethod
|
|
@@ -13184,7 +13776,7 @@ class _UniffiConverterTypePaymentMetadata(_UniffiConverterRustBuffer):
|
|
|
13184
13776
|
_UniffiConverterOptionalTypeLnurlPayInfo.check_lower(value.lnurl_pay_info)
|
|
13185
13777
|
_UniffiConverterOptionalTypeLnurlWithdrawInfo.check_lower(value.lnurl_withdraw_info)
|
|
13186
13778
|
_UniffiConverterOptionalString.check_lower(value.lnurl_description)
|
|
13187
|
-
|
|
13779
|
+
_UniffiConverterOptionalTypeConversionInfo.check_lower(value.conversion_info)
|
|
13188
13780
|
|
|
13189
13781
|
@staticmethod
|
|
13190
13782
|
def write(value, buf):
|
|
@@ -13192,7 +13784,7 @@ class _UniffiConverterTypePaymentMetadata(_UniffiConverterRustBuffer):
|
|
|
13192
13784
|
_UniffiConverterOptionalTypeLnurlPayInfo.write(value.lnurl_pay_info, buf)
|
|
13193
13785
|
_UniffiConverterOptionalTypeLnurlWithdrawInfo.write(value.lnurl_withdraw_info, buf)
|
|
13194
13786
|
_UniffiConverterOptionalString.write(value.lnurl_description, buf)
|
|
13195
|
-
|
|
13787
|
+
_UniffiConverterOptionalTypeConversionInfo.write(value.conversion_info, buf)
|
|
13196
13788
|
|
|
13197
13789
|
|
|
13198
13790
|
class PaymentRequestSource:
|
|
@@ -13365,12 +13957,12 @@ class PrepareSendPaymentRequest:
|
|
|
13365
13957
|
May only be provided if the payment request is a spark address.
|
|
13366
13958
|
"""
|
|
13367
13959
|
|
|
13368
|
-
|
|
13960
|
+
conversion_options: "typing.Optional[ConversionOptions]"
|
|
13369
13961
|
"""
|
|
13370
|
-
If provided, the payment will include a
|
|
13962
|
+
If provided, the payment will include a conversion step before sending the payment
|
|
13371
13963
|
"""
|
|
13372
13964
|
|
|
13373
|
-
def __init__(self, *, payment_request: "str", amount: "typing.Optional[U128]" = _DEFAULT, token_identifier: "typing.Optional[str]" = _DEFAULT,
|
|
13965
|
+
def __init__(self, *, payment_request: "str", amount: "typing.Optional[U128]" = _DEFAULT, token_identifier: "typing.Optional[str]" = _DEFAULT, conversion_options: "typing.Optional[ConversionOptions]" = _DEFAULT):
|
|
13374
13966
|
self.payment_request = payment_request
|
|
13375
13967
|
if amount is _DEFAULT:
|
|
13376
13968
|
self.amount = None
|
|
@@ -13380,13 +13972,13 @@ class PrepareSendPaymentRequest:
|
|
|
13380
13972
|
self.token_identifier = None
|
|
13381
13973
|
else:
|
|
13382
13974
|
self.token_identifier = token_identifier
|
|
13383
|
-
if
|
|
13384
|
-
self.
|
|
13975
|
+
if conversion_options is _DEFAULT:
|
|
13976
|
+
self.conversion_options = None
|
|
13385
13977
|
else:
|
|
13386
|
-
self.
|
|
13978
|
+
self.conversion_options = conversion_options
|
|
13387
13979
|
|
|
13388
13980
|
def __str__(self):
|
|
13389
|
-
return "PrepareSendPaymentRequest(payment_request={}, amount={}, token_identifier={},
|
|
13981
|
+
return "PrepareSendPaymentRequest(payment_request={}, amount={}, token_identifier={}, conversion_options={})".format(self.payment_request, self.amount, self.token_identifier, self.conversion_options)
|
|
13390
13982
|
|
|
13391
13983
|
def __eq__(self, other):
|
|
13392
13984
|
if self.payment_request != other.payment_request:
|
|
@@ -13395,7 +13987,7 @@ class PrepareSendPaymentRequest:
|
|
|
13395
13987
|
return False
|
|
13396
13988
|
if self.token_identifier != other.token_identifier:
|
|
13397
13989
|
return False
|
|
13398
|
-
if self.
|
|
13990
|
+
if self.conversion_options != other.conversion_options:
|
|
13399
13991
|
return False
|
|
13400
13992
|
return True
|
|
13401
13993
|
|
|
@@ -13406,7 +13998,7 @@ class _UniffiConverterTypePrepareSendPaymentRequest(_UniffiConverterRustBuffer):
|
|
|
13406
13998
|
payment_request=_UniffiConverterString.read(buf),
|
|
13407
13999
|
amount=_UniffiConverterOptionalTypeU128.read(buf),
|
|
13408
14000
|
token_identifier=_UniffiConverterOptionalString.read(buf),
|
|
13409
|
-
|
|
14001
|
+
conversion_options=_UniffiConverterOptionalTypeConversionOptions.read(buf),
|
|
13410
14002
|
)
|
|
13411
14003
|
|
|
13412
14004
|
@staticmethod
|
|
@@ -13414,14 +14006,14 @@ class _UniffiConverterTypePrepareSendPaymentRequest(_UniffiConverterRustBuffer):
|
|
|
13414
14006
|
_UniffiConverterString.check_lower(value.payment_request)
|
|
13415
14007
|
_UniffiConverterOptionalTypeU128.check_lower(value.amount)
|
|
13416
14008
|
_UniffiConverterOptionalString.check_lower(value.token_identifier)
|
|
13417
|
-
|
|
14009
|
+
_UniffiConverterOptionalTypeConversionOptions.check_lower(value.conversion_options)
|
|
13418
14010
|
|
|
13419
14011
|
@staticmethod
|
|
13420
14012
|
def write(value, buf):
|
|
13421
14013
|
_UniffiConverterString.write(value.payment_request, buf)
|
|
13422
14014
|
_UniffiConverterOptionalTypeU128.write(value.amount, buf)
|
|
13423
14015
|
_UniffiConverterOptionalString.write(value.token_identifier, buf)
|
|
13424
|
-
|
|
14016
|
+
_UniffiConverterOptionalTypeConversionOptions.write(value.conversion_options, buf)
|
|
13425
14017
|
|
|
13426
14018
|
|
|
13427
14019
|
class PrepareSendPaymentResponse:
|
|
@@ -13438,25 +14030,19 @@ class PrepareSendPaymentResponse:
|
|
|
13438
14030
|
If empty, it is a Bitcoin payment.
|
|
13439
14031
|
"""
|
|
13440
14032
|
|
|
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]"
|
|
14033
|
+
conversion_estimate: "typing.Optional[ConversionEstimate]"
|
|
13447
14034
|
"""
|
|
13448
|
-
|
|
14035
|
+
When set, the payment will include a conversion step before sending the payment
|
|
13449
14036
|
"""
|
|
13450
14037
|
|
|
13451
|
-
def __init__(self, *, payment_method: "SendPaymentMethod", amount: "U128", token_identifier: "typing.Optional[str]",
|
|
14038
|
+
def __init__(self, *, payment_method: "SendPaymentMethod", amount: "U128", token_identifier: "typing.Optional[str]", conversion_estimate: "typing.Optional[ConversionEstimate]"):
|
|
13452
14039
|
self.payment_method = payment_method
|
|
13453
14040
|
self.amount = amount
|
|
13454
14041
|
self.token_identifier = token_identifier
|
|
13455
|
-
self.
|
|
13456
|
-
self.token_conversion_fee = token_conversion_fee
|
|
14042
|
+
self.conversion_estimate = conversion_estimate
|
|
13457
14043
|
|
|
13458
14044
|
def __str__(self):
|
|
13459
|
-
return "PrepareSendPaymentResponse(payment_method={}, amount={}, token_identifier={},
|
|
14045
|
+
return "PrepareSendPaymentResponse(payment_method={}, amount={}, token_identifier={}, conversion_estimate={})".format(self.payment_method, self.amount, self.token_identifier, self.conversion_estimate)
|
|
13460
14046
|
|
|
13461
14047
|
def __eq__(self, other):
|
|
13462
14048
|
if self.payment_method != other.payment_method:
|
|
@@ -13465,9 +14051,7 @@ class PrepareSendPaymentResponse:
|
|
|
13465
14051
|
return False
|
|
13466
14052
|
if self.token_identifier != other.token_identifier:
|
|
13467
14053
|
return False
|
|
13468
|
-
if self.
|
|
13469
|
-
return False
|
|
13470
|
-
if self.token_conversion_fee != other.token_conversion_fee:
|
|
14054
|
+
if self.conversion_estimate != other.conversion_estimate:
|
|
13471
14055
|
return False
|
|
13472
14056
|
return True
|
|
13473
14057
|
|
|
@@ -13478,8 +14062,7 @@ class _UniffiConverterTypePrepareSendPaymentResponse(_UniffiConverterRustBuffer)
|
|
|
13478
14062
|
payment_method=_UniffiConverterTypeSendPaymentMethod.read(buf),
|
|
13479
14063
|
amount=_UniffiConverterTypeU128.read(buf),
|
|
13480
14064
|
token_identifier=_UniffiConverterOptionalString.read(buf),
|
|
13481
|
-
|
|
13482
|
-
token_conversion_fee=_UniffiConverterOptionalTypeU128.read(buf),
|
|
14065
|
+
conversion_estimate=_UniffiConverterOptionalTypeConversionEstimate.read(buf),
|
|
13483
14066
|
)
|
|
13484
14067
|
|
|
13485
14068
|
@staticmethod
|
|
@@ -13487,16 +14070,14 @@ class _UniffiConverterTypePrepareSendPaymentResponse(_UniffiConverterRustBuffer)
|
|
|
13487
14070
|
_UniffiConverterTypeSendPaymentMethod.check_lower(value.payment_method)
|
|
13488
14071
|
_UniffiConverterTypeU128.check_lower(value.amount)
|
|
13489
14072
|
_UniffiConverterOptionalString.check_lower(value.token_identifier)
|
|
13490
|
-
|
|
13491
|
-
_UniffiConverterOptionalTypeU128.check_lower(value.token_conversion_fee)
|
|
14073
|
+
_UniffiConverterOptionalTypeConversionEstimate.check_lower(value.conversion_estimate)
|
|
13492
14074
|
|
|
13493
14075
|
@staticmethod
|
|
13494
14076
|
def write(value, buf):
|
|
13495
14077
|
_UniffiConverterTypeSendPaymentMethod.write(value.payment_method, buf)
|
|
13496
14078
|
_UniffiConverterTypeU128.write(value.amount, buf)
|
|
13497
14079
|
_UniffiConverterOptionalString.write(value.token_identifier, buf)
|
|
13498
|
-
|
|
13499
|
-
_UniffiConverterOptionalTypeU128.write(value.token_conversion_fee, buf)
|
|
14080
|
+
_UniffiConverterOptionalTypeConversionEstimate.write(value.conversion_estimate, buf)
|
|
13500
14081
|
|
|
13501
14082
|
|
|
13502
14083
|
class PrivateKeyBytes:
|
|
@@ -14572,7 +15153,7 @@ class SparkHtlcDetails:
|
|
|
14572
15153
|
|
|
14573
15154
|
expiry_time: "int"
|
|
14574
15155
|
"""
|
|
14575
|
-
The expiry time of the HTLC
|
|
15156
|
+
The expiry time of the HTLC as a unix timestamp in seconds
|
|
14576
15157
|
"""
|
|
14577
15158
|
|
|
14578
15159
|
status: "SparkHtlcStatus"
|
|
@@ -14694,7 +15275,7 @@ class SparkInvoiceDetails:
|
|
|
14694
15275
|
|
|
14695
15276
|
expiry_time: "typing.Optional[int]"
|
|
14696
15277
|
"""
|
|
14697
|
-
Optional expiry time. If not provided, the invoice will never expire.
|
|
15278
|
+
Optional expiry time as a unix timestamp in seconds. If not provided, the invoice will never expire.
|
|
14698
15279
|
"""
|
|
14699
15280
|
|
|
14700
15281
|
description: "typing.Optional[str]"
|
|
@@ -14964,146 +15545,6 @@ class _UniffiConverterTypeTokenBalance(_UniffiConverterRustBuffer):
|
|
|
14964
15545
|
_UniffiConverterTypeTokenMetadata.write(value.token_metadata, buf)
|
|
14965
15546
|
|
|
14966
15547
|
|
|
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
15548
|
class TokenMetadata:
|
|
15108
15549
|
identifier: "str"
|
|
15109
15550
|
issuer_public_key: "str"
|
|
@@ -16021,6 +16462,272 @@ class _UniffiConverterTypeChainServiceError(_UniffiConverterRustBuffer):
|
|
|
16021
16462
|
|
|
16022
16463
|
|
|
16023
16464
|
|
|
16465
|
+
class ConversionPurpose:
|
|
16466
|
+
"""
|
|
16467
|
+
The purpose of the conversion, which is used to provide context for the conversion
|
|
16468
|
+
if its related to an ongoing payment or a self-transfer.
|
|
16469
|
+
"""
|
|
16470
|
+
|
|
16471
|
+
def __init__(self):
|
|
16472
|
+
raise RuntimeError("ConversionPurpose cannot be instantiated directly")
|
|
16473
|
+
|
|
16474
|
+
# Each enum variant is a nested class of the enum itself.
|
|
16475
|
+
class ONGOING_PAYMENT:
|
|
16476
|
+
"""
|
|
16477
|
+
Conversion is associated with an ongoing payment
|
|
16478
|
+
"""
|
|
16479
|
+
|
|
16480
|
+
payment_request: "str"
|
|
16481
|
+
"""
|
|
16482
|
+
The payment request of the ongoing payment
|
|
16483
|
+
"""
|
|
16484
|
+
|
|
16485
|
+
|
|
16486
|
+
def __init__(self,payment_request: "str"):
|
|
16487
|
+
self.payment_request = payment_request
|
|
16488
|
+
|
|
16489
|
+
def __str__(self):
|
|
16490
|
+
return "ConversionPurpose.ONGOING_PAYMENT(payment_request={})".format(self.payment_request)
|
|
16491
|
+
|
|
16492
|
+
def __eq__(self, other):
|
|
16493
|
+
if not other.is_ongoing_payment():
|
|
16494
|
+
return False
|
|
16495
|
+
if self.payment_request != other.payment_request:
|
|
16496
|
+
return False
|
|
16497
|
+
return True
|
|
16498
|
+
|
|
16499
|
+
class SELF_TRANSFER:
|
|
16500
|
+
"""
|
|
16501
|
+
Conversion is for self-transfer
|
|
16502
|
+
"""
|
|
16503
|
+
|
|
16504
|
+
|
|
16505
|
+
def __init__(self,):
|
|
16506
|
+
pass
|
|
16507
|
+
|
|
16508
|
+
def __str__(self):
|
|
16509
|
+
return "ConversionPurpose.SELF_TRANSFER()".format()
|
|
16510
|
+
|
|
16511
|
+
def __eq__(self, other):
|
|
16512
|
+
if not other.is_self_transfer():
|
|
16513
|
+
return False
|
|
16514
|
+
return True
|
|
16515
|
+
|
|
16516
|
+
|
|
16517
|
+
|
|
16518
|
+
# For each variant, we have an `is_NAME` method for easily checking
|
|
16519
|
+
# whether an instance is that variant.
|
|
16520
|
+
def is_ongoing_payment(self) -> bool:
|
|
16521
|
+
return isinstance(self, ConversionPurpose.ONGOING_PAYMENT)
|
|
16522
|
+
def is_self_transfer(self) -> bool:
|
|
16523
|
+
return isinstance(self, ConversionPurpose.SELF_TRANSFER)
|
|
16524
|
+
|
|
16525
|
+
|
|
16526
|
+
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
16527
|
+
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
16528
|
+
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
16529
|
+
ConversionPurpose.ONGOING_PAYMENT = type("ConversionPurpose.ONGOING_PAYMENT", (ConversionPurpose.ONGOING_PAYMENT, ConversionPurpose,), {}) # type: ignore
|
|
16530
|
+
ConversionPurpose.SELF_TRANSFER = type("ConversionPurpose.SELF_TRANSFER", (ConversionPurpose.SELF_TRANSFER, ConversionPurpose,), {}) # type: ignore
|
|
16531
|
+
|
|
16532
|
+
|
|
16533
|
+
|
|
16534
|
+
|
|
16535
|
+
class _UniffiConverterTypeConversionPurpose(_UniffiConverterRustBuffer):
|
|
16536
|
+
@staticmethod
|
|
16537
|
+
def read(buf):
|
|
16538
|
+
variant = buf.read_i32()
|
|
16539
|
+
if variant == 1:
|
|
16540
|
+
return ConversionPurpose.ONGOING_PAYMENT(
|
|
16541
|
+
_UniffiConverterString.read(buf),
|
|
16542
|
+
)
|
|
16543
|
+
if variant == 2:
|
|
16544
|
+
return ConversionPurpose.SELF_TRANSFER(
|
|
16545
|
+
)
|
|
16546
|
+
raise InternalError("Raw enum value doesn't match any cases")
|
|
16547
|
+
|
|
16548
|
+
@staticmethod
|
|
16549
|
+
def check_lower(value):
|
|
16550
|
+
if value.is_ongoing_payment():
|
|
16551
|
+
_UniffiConverterString.check_lower(value.payment_request)
|
|
16552
|
+
return
|
|
16553
|
+
if value.is_self_transfer():
|
|
16554
|
+
return
|
|
16555
|
+
raise ValueError(value)
|
|
16556
|
+
|
|
16557
|
+
@staticmethod
|
|
16558
|
+
def write(value, buf):
|
|
16559
|
+
if value.is_ongoing_payment():
|
|
16560
|
+
buf.write_i32(1)
|
|
16561
|
+
_UniffiConverterString.write(value.payment_request, buf)
|
|
16562
|
+
if value.is_self_transfer():
|
|
16563
|
+
buf.write_i32(2)
|
|
16564
|
+
|
|
16565
|
+
|
|
16566
|
+
|
|
16567
|
+
|
|
16568
|
+
|
|
16569
|
+
|
|
16570
|
+
|
|
16571
|
+
class ConversionStatus(enum.Enum):
|
|
16572
|
+
"""
|
|
16573
|
+
The status of the conversion
|
|
16574
|
+
"""
|
|
16575
|
+
|
|
16576
|
+
COMPLETED = 0
|
|
16577
|
+
"""
|
|
16578
|
+
The conversion was successful
|
|
16579
|
+
"""
|
|
16580
|
+
|
|
16581
|
+
|
|
16582
|
+
REFUND_NEEDED = 1
|
|
16583
|
+
"""
|
|
16584
|
+
The conversion failed and no refund was made yet, which requires action by the SDK to
|
|
16585
|
+
perform the refund. This can happen if there was a failure during the conversion process.
|
|
16586
|
+
"""
|
|
16587
|
+
|
|
16588
|
+
|
|
16589
|
+
REFUNDED = 2
|
|
16590
|
+
"""
|
|
16591
|
+
The conversion failed and a refund was made
|
|
16592
|
+
"""
|
|
16593
|
+
|
|
16594
|
+
|
|
16595
|
+
|
|
16596
|
+
|
|
16597
|
+
class _UniffiConverterTypeConversionStatus(_UniffiConverterRustBuffer):
|
|
16598
|
+
@staticmethod
|
|
16599
|
+
def read(buf):
|
|
16600
|
+
variant = buf.read_i32()
|
|
16601
|
+
if variant == 1:
|
|
16602
|
+
return ConversionStatus.COMPLETED
|
|
16603
|
+
if variant == 2:
|
|
16604
|
+
return ConversionStatus.REFUND_NEEDED
|
|
16605
|
+
if variant == 3:
|
|
16606
|
+
return ConversionStatus.REFUNDED
|
|
16607
|
+
raise InternalError("Raw enum value doesn't match any cases")
|
|
16608
|
+
|
|
16609
|
+
@staticmethod
|
|
16610
|
+
def check_lower(value):
|
|
16611
|
+
if value == ConversionStatus.COMPLETED:
|
|
16612
|
+
return
|
|
16613
|
+
if value == ConversionStatus.REFUND_NEEDED:
|
|
16614
|
+
return
|
|
16615
|
+
if value == ConversionStatus.REFUNDED:
|
|
16616
|
+
return
|
|
16617
|
+
raise ValueError(value)
|
|
16618
|
+
|
|
16619
|
+
@staticmethod
|
|
16620
|
+
def write(value, buf):
|
|
16621
|
+
if value == ConversionStatus.COMPLETED:
|
|
16622
|
+
buf.write_i32(1)
|
|
16623
|
+
if value == ConversionStatus.REFUND_NEEDED:
|
|
16624
|
+
buf.write_i32(2)
|
|
16625
|
+
if value == ConversionStatus.REFUNDED:
|
|
16626
|
+
buf.write_i32(3)
|
|
16627
|
+
|
|
16628
|
+
|
|
16629
|
+
|
|
16630
|
+
|
|
16631
|
+
|
|
16632
|
+
|
|
16633
|
+
|
|
16634
|
+
class ConversionType:
|
|
16635
|
+
def __init__(self):
|
|
16636
|
+
raise RuntimeError("ConversionType cannot be instantiated directly")
|
|
16637
|
+
|
|
16638
|
+
# Each enum variant is a nested class of the enum itself.
|
|
16639
|
+
class FROM_BITCOIN:
|
|
16640
|
+
"""
|
|
16641
|
+
Converting from Bitcoin to a token
|
|
16642
|
+
"""
|
|
16643
|
+
|
|
16644
|
+
|
|
16645
|
+
def __init__(self,):
|
|
16646
|
+
pass
|
|
16647
|
+
|
|
16648
|
+
def __str__(self):
|
|
16649
|
+
return "ConversionType.FROM_BITCOIN()".format()
|
|
16650
|
+
|
|
16651
|
+
def __eq__(self, other):
|
|
16652
|
+
if not other.is_from_bitcoin():
|
|
16653
|
+
return False
|
|
16654
|
+
return True
|
|
16655
|
+
|
|
16656
|
+
class TO_BITCOIN:
|
|
16657
|
+
"""
|
|
16658
|
+
Converting from a token to Bitcoin
|
|
16659
|
+
"""
|
|
16660
|
+
|
|
16661
|
+
from_token_identifier: "str"
|
|
16662
|
+
|
|
16663
|
+
def __init__(self,from_token_identifier: "str"):
|
|
16664
|
+
self.from_token_identifier = from_token_identifier
|
|
16665
|
+
|
|
16666
|
+
def __str__(self):
|
|
16667
|
+
return "ConversionType.TO_BITCOIN(from_token_identifier={})".format(self.from_token_identifier)
|
|
16668
|
+
|
|
16669
|
+
def __eq__(self, other):
|
|
16670
|
+
if not other.is_to_bitcoin():
|
|
16671
|
+
return False
|
|
16672
|
+
if self.from_token_identifier != other.from_token_identifier:
|
|
16673
|
+
return False
|
|
16674
|
+
return True
|
|
16675
|
+
|
|
16676
|
+
|
|
16677
|
+
|
|
16678
|
+
# For each variant, we have an `is_NAME` method for easily checking
|
|
16679
|
+
# whether an instance is that variant.
|
|
16680
|
+
def is_from_bitcoin(self) -> bool:
|
|
16681
|
+
return isinstance(self, ConversionType.FROM_BITCOIN)
|
|
16682
|
+
def is_to_bitcoin(self) -> bool:
|
|
16683
|
+
return isinstance(self, ConversionType.TO_BITCOIN)
|
|
16684
|
+
|
|
16685
|
+
|
|
16686
|
+
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
16687
|
+
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
16688
|
+
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
16689
|
+
ConversionType.FROM_BITCOIN = type("ConversionType.FROM_BITCOIN", (ConversionType.FROM_BITCOIN, ConversionType,), {}) # type: ignore
|
|
16690
|
+
ConversionType.TO_BITCOIN = type("ConversionType.TO_BITCOIN", (ConversionType.TO_BITCOIN, ConversionType,), {}) # type: ignore
|
|
16691
|
+
|
|
16692
|
+
|
|
16693
|
+
|
|
16694
|
+
|
|
16695
|
+
class _UniffiConverterTypeConversionType(_UniffiConverterRustBuffer):
|
|
16696
|
+
@staticmethod
|
|
16697
|
+
def read(buf):
|
|
16698
|
+
variant = buf.read_i32()
|
|
16699
|
+
if variant == 1:
|
|
16700
|
+
return ConversionType.FROM_BITCOIN(
|
|
16701
|
+
)
|
|
16702
|
+
if variant == 2:
|
|
16703
|
+
return ConversionType.TO_BITCOIN(
|
|
16704
|
+
_UniffiConverterString.read(buf),
|
|
16705
|
+
)
|
|
16706
|
+
raise InternalError("Raw enum value doesn't match any cases")
|
|
16707
|
+
|
|
16708
|
+
@staticmethod
|
|
16709
|
+
def check_lower(value):
|
|
16710
|
+
if value.is_from_bitcoin():
|
|
16711
|
+
return
|
|
16712
|
+
if value.is_to_bitcoin():
|
|
16713
|
+
_UniffiConverterString.check_lower(value.from_token_identifier)
|
|
16714
|
+
return
|
|
16715
|
+
raise ValueError(value)
|
|
16716
|
+
|
|
16717
|
+
@staticmethod
|
|
16718
|
+
def write(value, buf):
|
|
16719
|
+
if value.is_from_bitcoin():
|
|
16720
|
+
buf.write_i32(1)
|
|
16721
|
+
if value.is_to_bitcoin():
|
|
16722
|
+
buf.write_i32(2)
|
|
16723
|
+
_UniffiConverterString.write(value.from_token_identifier, buf)
|
|
16724
|
+
|
|
16725
|
+
|
|
16726
|
+
|
|
16727
|
+
|
|
16728
|
+
|
|
16729
|
+
|
|
16730
|
+
|
|
16024
16731
|
class DepositClaimError:
|
|
16025
16732
|
def __init__(self):
|
|
16026
16733
|
raise RuntimeError("DepositClaimError cannot be instantiated directly")
|
|
@@ -16180,13 +16887,13 @@ class _UniffiConverterTypeDepositClaimError(_UniffiConverterRustBuffer):
|
|
|
16180
16887
|
|
|
16181
16888
|
|
|
16182
16889
|
|
|
16183
|
-
class
|
|
16890
|
+
class ExternalSecretKeySource:
|
|
16184
16891
|
"""
|
|
16185
|
-
FFI-safe representation of `spark_wallet::
|
|
16892
|
+
FFI-safe representation of `spark_wallet::SecretKeySource`
|
|
16186
16893
|
"""
|
|
16187
16894
|
|
|
16188
16895
|
def __init__(self):
|
|
16189
|
-
raise RuntimeError("
|
|
16896
|
+
raise RuntimeError("ExternalSecretKeySource cannot be instantiated directly")
|
|
16190
16897
|
|
|
16191
16898
|
# Each enum variant is a nested class of the enum itself.
|
|
16192
16899
|
class DERIVED:
|
|
@@ -16200,7 +16907,7 @@ class ExternalPrivateKeySource:
|
|
|
16200
16907
|
self.node_id = node_id
|
|
16201
16908
|
|
|
16202
16909
|
def __str__(self):
|
|
16203
|
-
return "
|
|
16910
|
+
return "ExternalSecretKeySource.DERIVED(node_id={})".format(self.node_id)
|
|
16204
16911
|
|
|
16205
16912
|
def __eq__(self, other):
|
|
16206
16913
|
if not other.is_derived():
|
|
@@ -16220,7 +16927,7 @@ class ExternalPrivateKeySource:
|
|
|
16220
16927
|
self.key = key
|
|
16221
16928
|
|
|
16222
16929
|
def __str__(self):
|
|
16223
|
-
return "
|
|
16930
|
+
return "ExternalSecretKeySource.ENCRYPTED(key={})".format(self.key)
|
|
16224
16931
|
|
|
16225
16932
|
def __eq__(self, other):
|
|
16226
16933
|
if not other.is_encrypted():
|
|
@@ -16234,30 +16941,30 @@ class ExternalPrivateKeySource:
|
|
|
16234
16941
|
# For each variant, we have an `is_NAME` method for easily checking
|
|
16235
16942
|
# whether an instance is that variant.
|
|
16236
16943
|
def is_derived(self) -> bool:
|
|
16237
|
-
return isinstance(self,
|
|
16944
|
+
return isinstance(self, ExternalSecretKeySource.DERIVED)
|
|
16238
16945
|
def is_encrypted(self) -> bool:
|
|
16239
|
-
return isinstance(self,
|
|
16946
|
+
return isinstance(self, ExternalSecretKeySource.ENCRYPTED)
|
|
16240
16947
|
|
|
16241
16948
|
|
|
16242
16949
|
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
16243
16950
|
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
16244
16951
|
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
16245
|
-
|
|
16246
|
-
|
|
16952
|
+
ExternalSecretKeySource.DERIVED = type("ExternalSecretKeySource.DERIVED", (ExternalSecretKeySource.DERIVED, ExternalSecretKeySource,), {}) # type: ignore
|
|
16953
|
+
ExternalSecretKeySource.ENCRYPTED = type("ExternalSecretKeySource.ENCRYPTED", (ExternalSecretKeySource.ENCRYPTED, ExternalSecretKeySource,), {}) # type: ignore
|
|
16247
16954
|
|
|
16248
16955
|
|
|
16249
16956
|
|
|
16250
16957
|
|
|
16251
|
-
class
|
|
16958
|
+
class _UniffiConverterTypeExternalSecretKeySource(_UniffiConverterRustBuffer):
|
|
16252
16959
|
@staticmethod
|
|
16253
16960
|
def read(buf):
|
|
16254
16961
|
variant = buf.read_i32()
|
|
16255
16962
|
if variant == 1:
|
|
16256
|
-
return
|
|
16963
|
+
return ExternalSecretKeySource.DERIVED(
|
|
16257
16964
|
_UniffiConverterTypeExternalTreeNodeId.read(buf),
|
|
16258
16965
|
)
|
|
16259
16966
|
if variant == 2:
|
|
16260
|
-
return
|
|
16967
|
+
return ExternalSecretKeySource.ENCRYPTED(
|
|
16261
16968
|
_UniffiConverterTypeExternalEncryptedPrivateKey.read(buf),
|
|
16262
16969
|
)
|
|
16263
16970
|
raise InternalError("Raw enum value doesn't match any cases")
|
|
@@ -16301,9 +17008,9 @@ class ExternalSecretToSplit:
|
|
|
16301
17008
|
A private key to split
|
|
16302
17009
|
"""
|
|
16303
17010
|
|
|
16304
|
-
source: "
|
|
17011
|
+
source: "ExternalSecretKeySource"
|
|
16305
17012
|
|
|
16306
|
-
def __init__(self,source: "
|
|
17013
|
+
def __init__(self,source: "ExternalSecretKeySource"):
|
|
16307
17014
|
self.source = source
|
|
16308
17015
|
|
|
16309
17016
|
def __str__(self):
|
|
@@ -16361,7 +17068,7 @@ class _UniffiConverterTypeExternalSecretToSplit(_UniffiConverterRustBuffer):
|
|
|
16361
17068
|
variant = buf.read_i32()
|
|
16362
17069
|
if variant == 1:
|
|
16363
17070
|
return ExternalSecretToSplit.PRIVATE_KEY(
|
|
16364
|
-
|
|
17071
|
+
_UniffiConverterTypeExternalSecretKeySource.read(buf),
|
|
16365
17072
|
)
|
|
16366
17073
|
if variant == 2:
|
|
16367
17074
|
return ExternalSecretToSplit.PREIMAGE(
|
|
@@ -16372,7 +17079,7 @@ class _UniffiConverterTypeExternalSecretToSplit(_UniffiConverterRustBuffer):
|
|
|
16372
17079
|
@staticmethod
|
|
16373
17080
|
def check_lower(value):
|
|
16374
17081
|
if value.is_private_key():
|
|
16375
|
-
|
|
17082
|
+
_UniffiConverterTypeExternalSecretKeySource.check_lower(value.source)
|
|
16376
17083
|
return
|
|
16377
17084
|
if value.is_preimage():
|
|
16378
17085
|
_UniffiConverterBytes.check_lower(value.data)
|
|
@@ -16383,7 +17090,7 @@ class _UniffiConverterTypeExternalSecretToSplit(_UniffiConverterRustBuffer):
|
|
|
16383
17090
|
def write(value, buf):
|
|
16384
17091
|
if value.is_private_key():
|
|
16385
17092
|
buf.write_i32(1)
|
|
16386
|
-
|
|
17093
|
+
_UniffiConverterTypeExternalSecretKeySource.write(value.source, buf)
|
|
16387
17094
|
if value.is_preimage():
|
|
16388
17095
|
buf.write_i32(2)
|
|
16389
17096
|
_UniffiConverterBytes.write(value.data, buf)
|
|
@@ -16960,61 +17667,162 @@ class _UniffiConverterTypeInputType(_UniffiConverterRustBuffer):
|
|
|
16960
17667
|
|
|
16961
17668
|
|
|
16962
17669
|
|
|
16963
|
-
class KeySetType(enum.Enum):
|
|
16964
|
-
DEFAULT = 0
|
|
16965
|
-
|
|
16966
|
-
TAPROOT = 1
|
|
16967
|
-
|
|
16968
|
-
NATIVE_SEGWIT = 2
|
|
17670
|
+
class KeySetType(enum.Enum):
|
|
17671
|
+
DEFAULT = 0
|
|
17672
|
+
|
|
17673
|
+
TAPROOT = 1
|
|
17674
|
+
|
|
17675
|
+
NATIVE_SEGWIT = 2
|
|
17676
|
+
|
|
17677
|
+
WRAPPED_SEGWIT = 3
|
|
17678
|
+
|
|
17679
|
+
LEGACY = 4
|
|
17680
|
+
|
|
17681
|
+
|
|
17682
|
+
|
|
17683
|
+
class _UniffiConverterTypeKeySetType(_UniffiConverterRustBuffer):
|
|
17684
|
+
@staticmethod
|
|
17685
|
+
def read(buf):
|
|
17686
|
+
variant = buf.read_i32()
|
|
17687
|
+
if variant == 1:
|
|
17688
|
+
return KeySetType.DEFAULT
|
|
17689
|
+
if variant == 2:
|
|
17690
|
+
return KeySetType.TAPROOT
|
|
17691
|
+
if variant == 3:
|
|
17692
|
+
return KeySetType.NATIVE_SEGWIT
|
|
17693
|
+
if variant == 4:
|
|
17694
|
+
return KeySetType.WRAPPED_SEGWIT
|
|
17695
|
+
if variant == 5:
|
|
17696
|
+
return KeySetType.LEGACY
|
|
17697
|
+
raise InternalError("Raw enum value doesn't match any cases")
|
|
17698
|
+
|
|
17699
|
+
@staticmethod
|
|
17700
|
+
def check_lower(value):
|
|
17701
|
+
if value == KeySetType.DEFAULT:
|
|
17702
|
+
return
|
|
17703
|
+
if value == KeySetType.TAPROOT:
|
|
17704
|
+
return
|
|
17705
|
+
if value == KeySetType.NATIVE_SEGWIT:
|
|
17706
|
+
return
|
|
17707
|
+
if value == KeySetType.WRAPPED_SEGWIT:
|
|
17708
|
+
return
|
|
17709
|
+
if value == KeySetType.LEGACY:
|
|
17710
|
+
return
|
|
17711
|
+
raise ValueError(value)
|
|
17712
|
+
|
|
17713
|
+
@staticmethod
|
|
17714
|
+
def write(value, buf):
|
|
17715
|
+
if value == KeySetType.DEFAULT:
|
|
17716
|
+
buf.write_i32(1)
|
|
17717
|
+
if value == KeySetType.TAPROOT:
|
|
17718
|
+
buf.write_i32(2)
|
|
17719
|
+
if value == KeySetType.NATIVE_SEGWIT:
|
|
17720
|
+
buf.write_i32(3)
|
|
17721
|
+
if value == KeySetType.WRAPPED_SEGWIT:
|
|
17722
|
+
buf.write_i32(4)
|
|
17723
|
+
if value == KeySetType.LEGACY:
|
|
17724
|
+
buf.write_i32(5)
|
|
17725
|
+
|
|
17726
|
+
|
|
17727
|
+
|
|
17728
|
+
|
|
17729
|
+
|
|
17730
|
+
|
|
17731
|
+
|
|
17732
|
+
class LnurlCallbackStatus:
|
|
17733
|
+
"""
|
|
17734
|
+
The response from a LNURL-auth callback, indicating success or failure.
|
|
17735
|
+
"""
|
|
17736
|
+
|
|
17737
|
+
def __init__(self):
|
|
17738
|
+
raise RuntimeError("LnurlCallbackStatus cannot be instantiated directly")
|
|
17739
|
+
|
|
17740
|
+
# Each enum variant is a nested class of the enum itself.
|
|
17741
|
+
class OK:
|
|
17742
|
+
"""
|
|
17743
|
+
On-wire format is: `{"status": "OK"}`
|
|
17744
|
+
"""
|
|
17745
|
+
|
|
17746
|
+
|
|
17747
|
+
def __init__(self,):
|
|
17748
|
+
pass
|
|
17749
|
+
|
|
17750
|
+
def __str__(self):
|
|
17751
|
+
return "LnurlCallbackStatus.OK()".format()
|
|
17752
|
+
|
|
17753
|
+
def __eq__(self, other):
|
|
17754
|
+
if not other.is_ok():
|
|
17755
|
+
return False
|
|
17756
|
+
return True
|
|
17757
|
+
|
|
17758
|
+
class ERROR_STATUS:
|
|
17759
|
+
"""
|
|
17760
|
+
On-wire format is: `{"status": "ERROR", "reason": "error details..."}`
|
|
17761
|
+
"""
|
|
17762
|
+
|
|
17763
|
+
error_details: "LnurlErrorDetails"
|
|
17764
|
+
|
|
17765
|
+
def __init__(self,error_details: "LnurlErrorDetails"):
|
|
17766
|
+
self.error_details = error_details
|
|
17767
|
+
|
|
17768
|
+
def __str__(self):
|
|
17769
|
+
return "LnurlCallbackStatus.ERROR_STATUS(error_details={})".format(self.error_details)
|
|
17770
|
+
|
|
17771
|
+
def __eq__(self, other):
|
|
17772
|
+
if not other.is_error_status():
|
|
17773
|
+
return False
|
|
17774
|
+
if self.error_details != other.error_details:
|
|
17775
|
+
return False
|
|
17776
|
+
return True
|
|
16969
17777
|
|
|
16970
|
-
WRAPPED_SEGWIT = 3
|
|
16971
17778
|
|
|
16972
|
-
|
|
17779
|
+
|
|
17780
|
+
# For each variant, we have an `is_NAME` method for easily checking
|
|
17781
|
+
# whether an instance is that variant.
|
|
17782
|
+
def is_ok(self) -> bool:
|
|
17783
|
+
return isinstance(self, LnurlCallbackStatus.OK)
|
|
17784
|
+
def is_error_status(self) -> bool:
|
|
17785
|
+
return isinstance(self, LnurlCallbackStatus.ERROR_STATUS)
|
|
16973
17786
|
|
|
16974
17787
|
|
|
17788
|
+
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
17789
|
+
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
17790
|
+
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
17791
|
+
LnurlCallbackStatus.OK = type("LnurlCallbackStatus.OK", (LnurlCallbackStatus.OK, LnurlCallbackStatus,), {}) # type: ignore
|
|
17792
|
+
LnurlCallbackStatus.ERROR_STATUS = type("LnurlCallbackStatus.ERROR_STATUS", (LnurlCallbackStatus.ERROR_STATUS, LnurlCallbackStatus,), {}) # type: ignore
|
|
17793
|
+
|
|
16975
17794
|
|
|
16976
|
-
|
|
17795
|
+
|
|
17796
|
+
|
|
17797
|
+
class _UniffiConverterTypeLnurlCallbackStatus(_UniffiConverterRustBuffer):
|
|
16977
17798
|
@staticmethod
|
|
16978
17799
|
def read(buf):
|
|
16979
17800
|
variant = buf.read_i32()
|
|
16980
17801
|
if variant == 1:
|
|
16981
|
-
return
|
|
17802
|
+
return LnurlCallbackStatus.OK(
|
|
17803
|
+
)
|
|
16982
17804
|
if variant == 2:
|
|
16983
|
-
return
|
|
16984
|
-
|
|
16985
|
-
|
|
16986
|
-
if variant == 4:
|
|
16987
|
-
return KeySetType.WRAPPED_SEGWIT
|
|
16988
|
-
if variant == 5:
|
|
16989
|
-
return KeySetType.LEGACY
|
|
17805
|
+
return LnurlCallbackStatus.ERROR_STATUS(
|
|
17806
|
+
_UniffiConverterTypeLnurlErrorDetails.read(buf),
|
|
17807
|
+
)
|
|
16990
17808
|
raise InternalError("Raw enum value doesn't match any cases")
|
|
16991
17809
|
|
|
16992
17810
|
@staticmethod
|
|
16993
17811
|
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:
|
|
17812
|
+
if value.is_ok():
|
|
17001
17813
|
return
|
|
17002
|
-
if value
|
|
17814
|
+
if value.is_error_status():
|
|
17815
|
+
_UniffiConverterTypeLnurlErrorDetails.check_lower(value.error_details)
|
|
17003
17816
|
return
|
|
17004
17817
|
raise ValueError(value)
|
|
17005
17818
|
|
|
17006
17819
|
@staticmethod
|
|
17007
17820
|
def write(value, buf):
|
|
17008
|
-
if value
|
|
17821
|
+
if value.is_ok():
|
|
17009
17822
|
buf.write_i32(1)
|
|
17010
|
-
if value
|
|
17823
|
+
if value.is_error_status():
|
|
17011
17824
|
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)
|
|
17825
|
+
_UniffiConverterTypeLnurlErrorDetails.write(value.error_details, buf)
|
|
17018
17826
|
|
|
17019
17827
|
|
|
17020
17828
|
|
|
@@ -17470,19 +18278,19 @@ class PaymentDetails:
|
|
|
17470
18278
|
The HTLC transfer details if the payment fulfilled an HTLC transfer
|
|
17471
18279
|
"""
|
|
17472
18280
|
|
|
17473
|
-
|
|
18281
|
+
conversion_info: "typing.Optional[ConversionInfo]"
|
|
17474
18282
|
"""
|
|
17475
|
-
The information for a
|
|
18283
|
+
The information for a conversion
|
|
17476
18284
|
"""
|
|
17477
18285
|
|
|
17478
18286
|
|
|
17479
|
-
def __init__(self,invoice_details: "typing.Optional[SparkInvoicePaymentDetails]", htlc_details: "typing.Optional[SparkHtlcDetails]",
|
|
18287
|
+
def __init__(self,invoice_details: "typing.Optional[SparkInvoicePaymentDetails]", htlc_details: "typing.Optional[SparkHtlcDetails]", conversion_info: "typing.Optional[ConversionInfo]"):
|
|
17480
18288
|
self.invoice_details = invoice_details
|
|
17481
18289
|
self.htlc_details = htlc_details
|
|
17482
|
-
self.
|
|
18290
|
+
self.conversion_info = conversion_info
|
|
17483
18291
|
|
|
17484
18292
|
def __str__(self):
|
|
17485
|
-
return "PaymentDetails.SPARK(invoice_details={}, htlc_details={},
|
|
18293
|
+
return "PaymentDetails.SPARK(invoice_details={}, htlc_details={}, conversion_info={})".format(self.invoice_details, self.htlc_details, self.conversion_info)
|
|
17486
18294
|
|
|
17487
18295
|
def __eq__(self, other):
|
|
17488
18296
|
if not other.is_spark():
|
|
@@ -17491,7 +18299,7 @@ class PaymentDetails:
|
|
|
17491
18299
|
return False
|
|
17492
18300
|
if self.htlc_details != other.htlc_details:
|
|
17493
18301
|
return False
|
|
17494
|
-
if self.
|
|
18302
|
+
if self.conversion_info != other.conversion_info:
|
|
17495
18303
|
return False
|
|
17496
18304
|
return True
|
|
17497
18305
|
|
|
@@ -17503,20 +18311,20 @@ class PaymentDetails:
|
|
|
17503
18311
|
The invoice details if the payment fulfilled a spark invoice
|
|
17504
18312
|
"""
|
|
17505
18313
|
|
|
17506
|
-
|
|
18314
|
+
conversion_info: "typing.Optional[ConversionInfo]"
|
|
17507
18315
|
"""
|
|
17508
|
-
The information for a
|
|
18316
|
+
The information for a conversion
|
|
17509
18317
|
"""
|
|
17510
18318
|
|
|
17511
18319
|
|
|
17512
|
-
def __init__(self,metadata: "TokenMetadata", tx_hash: "str", invoice_details: "typing.Optional[SparkInvoicePaymentDetails]",
|
|
18320
|
+
def __init__(self,metadata: "TokenMetadata", tx_hash: "str", invoice_details: "typing.Optional[SparkInvoicePaymentDetails]", conversion_info: "typing.Optional[ConversionInfo]"):
|
|
17513
18321
|
self.metadata = metadata
|
|
17514
18322
|
self.tx_hash = tx_hash
|
|
17515
18323
|
self.invoice_details = invoice_details
|
|
17516
|
-
self.
|
|
18324
|
+
self.conversion_info = conversion_info
|
|
17517
18325
|
|
|
17518
18326
|
def __str__(self):
|
|
17519
|
-
return "PaymentDetails.TOKEN(metadata={}, tx_hash={}, invoice_details={},
|
|
18327
|
+
return "PaymentDetails.TOKEN(metadata={}, tx_hash={}, invoice_details={}, conversion_info={})".format(self.metadata, self.tx_hash, self.invoice_details, self.conversion_info)
|
|
17520
18328
|
|
|
17521
18329
|
def __eq__(self, other):
|
|
17522
18330
|
if not other.is_token():
|
|
@@ -17527,7 +18335,7 @@ class PaymentDetails:
|
|
|
17527
18335
|
return False
|
|
17528
18336
|
if self.invoice_details != other.invoice_details:
|
|
17529
18337
|
return False
|
|
17530
|
-
if self.
|
|
18338
|
+
if self.conversion_info != other.conversion_info:
|
|
17531
18339
|
return False
|
|
17532
18340
|
return True
|
|
17533
18341
|
|
|
@@ -17677,14 +18485,14 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
|
|
|
17677
18485
|
return PaymentDetails.SPARK(
|
|
17678
18486
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.read(buf),
|
|
17679
18487
|
_UniffiConverterOptionalTypeSparkHtlcDetails.read(buf),
|
|
17680
|
-
|
|
18488
|
+
_UniffiConverterOptionalTypeConversionInfo.read(buf),
|
|
17681
18489
|
)
|
|
17682
18490
|
if variant == 2:
|
|
17683
18491
|
return PaymentDetails.TOKEN(
|
|
17684
18492
|
_UniffiConverterTypeTokenMetadata.read(buf),
|
|
17685
18493
|
_UniffiConverterString.read(buf),
|
|
17686
18494
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.read(buf),
|
|
17687
|
-
|
|
18495
|
+
_UniffiConverterOptionalTypeConversionInfo.read(buf),
|
|
17688
18496
|
)
|
|
17689
18497
|
if variant == 3:
|
|
17690
18498
|
return PaymentDetails.LIGHTNING(
|
|
@@ -17712,13 +18520,13 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
|
|
|
17712
18520
|
if value.is_spark():
|
|
17713
18521
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.check_lower(value.invoice_details)
|
|
17714
18522
|
_UniffiConverterOptionalTypeSparkHtlcDetails.check_lower(value.htlc_details)
|
|
17715
|
-
|
|
18523
|
+
_UniffiConverterOptionalTypeConversionInfo.check_lower(value.conversion_info)
|
|
17716
18524
|
return
|
|
17717
18525
|
if value.is_token():
|
|
17718
18526
|
_UniffiConverterTypeTokenMetadata.check_lower(value.metadata)
|
|
17719
18527
|
_UniffiConverterString.check_lower(value.tx_hash)
|
|
17720
18528
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.check_lower(value.invoice_details)
|
|
17721
|
-
|
|
18529
|
+
_UniffiConverterOptionalTypeConversionInfo.check_lower(value.conversion_info)
|
|
17722
18530
|
return
|
|
17723
18531
|
if value.is_lightning():
|
|
17724
18532
|
_UniffiConverterOptionalString.check_lower(value.description)
|
|
@@ -17744,13 +18552,13 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
|
|
|
17744
18552
|
buf.write_i32(1)
|
|
17745
18553
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.write(value.invoice_details, buf)
|
|
17746
18554
|
_UniffiConverterOptionalTypeSparkHtlcDetails.write(value.htlc_details, buf)
|
|
17747
|
-
|
|
18555
|
+
_UniffiConverterOptionalTypeConversionInfo.write(value.conversion_info, buf)
|
|
17748
18556
|
if value.is_token():
|
|
17749
18557
|
buf.write_i32(2)
|
|
17750
18558
|
_UniffiConverterTypeTokenMetadata.write(value.metadata, buf)
|
|
17751
18559
|
_UniffiConverterString.write(value.tx_hash, buf)
|
|
17752
18560
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.write(value.invoice_details, buf)
|
|
17753
|
-
|
|
18561
|
+
_UniffiConverterOptionalTypeConversionInfo.write(value.conversion_info, buf)
|
|
17754
18562
|
if value.is_lightning():
|
|
17755
18563
|
buf.write_i32(3)
|
|
17756
18564
|
_UniffiConverterOptionalString.write(value.description, buf)
|
|
@@ -18373,7 +19181,7 @@ class ReceivePaymentMethod:
|
|
|
18373
19181
|
|
|
18374
19182
|
expiry_time: "typing.Optional[int]"
|
|
18375
19183
|
"""
|
|
18376
|
-
The expiry time of the invoice
|
|
19184
|
+
The expiry time of the invoice as a unix timestamp in seconds
|
|
18377
19185
|
"""
|
|
18378
19186
|
|
|
18379
19187
|
description: "typing.Optional[str]"
|
|
@@ -18430,7 +19238,7 @@ class ReceivePaymentMethod:
|
|
|
18430
19238
|
amount_sats: "typing.Optional[int]"
|
|
18431
19239
|
expiry_secs: "typing.Optional[int]"
|
|
18432
19240
|
"""
|
|
18433
|
-
The expiry
|
|
19241
|
+
The expiry of the invoice as a duration in seconds
|
|
18434
19242
|
"""
|
|
18435
19243
|
|
|
18436
19244
|
|
|
@@ -20709,103 +21517,6 @@ class _UniffiConverterTypeSyncStorageError(_UniffiConverterRustBuffer):
|
|
|
20709
21517
|
|
|
20710
21518
|
|
|
20711
21519
|
|
|
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
21520
|
class UpdateDepositPayload:
|
|
20810
21521
|
def __init__(self):
|
|
20811
21522
|
raise RuntimeError("UpdateDepositPayload cannot be instantiated directly")
|
|
@@ -21156,6 +21867,87 @@ class _UniffiConverterOptionalBytes(_UniffiConverterRustBuffer):
|
|
|
21156
21867
|
|
|
21157
21868
|
|
|
21158
21869
|
|
|
21870
|
+
class _UniffiConverterOptionalTypeConversionEstimate(_UniffiConverterRustBuffer):
|
|
21871
|
+
@classmethod
|
|
21872
|
+
def check_lower(cls, value):
|
|
21873
|
+
if value is not None:
|
|
21874
|
+
_UniffiConverterTypeConversionEstimate.check_lower(value)
|
|
21875
|
+
|
|
21876
|
+
@classmethod
|
|
21877
|
+
def write(cls, value, buf):
|
|
21878
|
+
if value is None:
|
|
21879
|
+
buf.write_u8(0)
|
|
21880
|
+
return
|
|
21881
|
+
|
|
21882
|
+
buf.write_u8(1)
|
|
21883
|
+
_UniffiConverterTypeConversionEstimate.write(value, buf)
|
|
21884
|
+
|
|
21885
|
+
@classmethod
|
|
21886
|
+
def read(cls, buf):
|
|
21887
|
+
flag = buf.read_u8()
|
|
21888
|
+
if flag == 0:
|
|
21889
|
+
return None
|
|
21890
|
+
elif flag == 1:
|
|
21891
|
+
return _UniffiConverterTypeConversionEstimate.read(buf)
|
|
21892
|
+
else:
|
|
21893
|
+
raise InternalError("Unexpected flag byte for optional type")
|
|
21894
|
+
|
|
21895
|
+
|
|
21896
|
+
|
|
21897
|
+
class _UniffiConverterOptionalTypeConversionInfo(_UniffiConverterRustBuffer):
|
|
21898
|
+
@classmethod
|
|
21899
|
+
def check_lower(cls, value):
|
|
21900
|
+
if value is not None:
|
|
21901
|
+
_UniffiConverterTypeConversionInfo.check_lower(value)
|
|
21902
|
+
|
|
21903
|
+
@classmethod
|
|
21904
|
+
def write(cls, value, buf):
|
|
21905
|
+
if value is None:
|
|
21906
|
+
buf.write_u8(0)
|
|
21907
|
+
return
|
|
21908
|
+
|
|
21909
|
+
buf.write_u8(1)
|
|
21910
|
+
_UniffiConverterTypeConversionInfo.write(value, buf)
|
|
21911
|
+
|
|
21912
|
+
@classmethod
|
|
21913
|
+
def read(cls, buf):
|
|
21914
|
+
flag = buf.read_u8()
|
|
21915
|
+
if flag == 0:
|
|
21916
|
+
return None
|
|
21917
|
+
elif flag == 1:
|
|
21918
|
+
return _UniffiConverterTypeConversionInfo.read(buf)
|
|
21919
|
+
else:
|
|
21920
|
+
raise InternalError("Unexpected flag byte for optional type")
|
|
21921
|
+
|
|
21922
|
+
|
|
21923
|
+
|
|
21924
|
+
class _UniffiConverterOptionalTypeConversionOptions(_UniffiConverterRustBuffer):
|
|
21925
|
+
@classmethod
|
|
21926
|
+
def check_lower(cls, value):
|
|
21927
|
+
if value is not None:
|
|
21928
|
+
_UniffiConverterTypeConversionOptions.check_lower(value)
|
|
21929
|
+
|
|
21930
|
+
@classmethod
|
|
21931
|
+
def write(cls, value, buf):
|
|
21932
|
+
if value is None:
|
|
21933
|
+
buf.write_u8(0)
|
|
21934
|
+
return
|
|
21935
|
+
|
|
21936
|
+
buf.write_u8(1)
|
|
21937
|
+
_UniffiConverterTypeConversionOptions.write(value, buf)
|
|
21938
|
+
|
|
21939
|
+
@classmethod
|
|
21940
|
+
def read(cls, buf):
|
|
21941
|
+
flag = buf.read_u8()
|
|
21942
|
+
if flag == 0:
|
|
21943
|
+
return None
|
|
21944
|
+
elif flag == 1:
|
|
21945
|
+
return _UniffiConverterTypeConversionOptions.read(buf)
|
|
21946
|
+
else:
|
|
21947
|
+
raise InternalError("Unexpected flag byte for optional type")
|
|
21948
|
+
|
|
21949
|
+
|
|
21950
|
+
|
|
21159
21951
|
class _UniffiConverterOptionalTypeCredentials(_UniffiConverterRustBuffer):
|
|
21160
21952
|
@classmethod
|
|
21161
21953
|
def check_lower(cls, value):
|
|
@@ -21507,38 +22299,11 @@ class _UniffiConverterOptionalTypeSymbol(_UniffiConverterRustBuffer):
|
|
|
21507
22299
|
|
|
21508
22300
|
|
|
21509
22301
|
|
|
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):
|
|
22302
|
+
class _UniffiConverterOptionalTypeAmount(_UniffiConverterRustBuffer):
|
|
21538
22303
|
@classmethod
|
|
21539
22304
|
def check_lower(cls, value):
|
|
21540
22305
|
if value is not None:
|
|
21541
|
-
|
|
22306
|
+
_UniffiConverterTypeAmount.check_lower(value)
|
|
21542
22307
|
|
|
21543
22308
|
@classmethod
|
|
21544
22309
|
def write(cls, value, buf):
|
|
@@ -21547,7 +22312,7 @@ class _UniffiConverterOptionalTypeTokenConversionOptions(_UniffiConverterRustBuf
|
|
|
21547
22312
|
return
|
|
21548
22313
|
|
|
21549
22314
|
buf.write_u8(1)
|
|
21550
|
-
|
|
22315
|
+
_UniffiConverterTypeAmount.write(value, buf)
|
|
21551
22316
|
|
|
21552
22317
|
@classmethod
|
|
21553
22318
|
def read(cls, buf):
|
|
@@ -21555,17 +22320,17 @@ class _UniffiConverterOptionalTypeTokenConversionOptions(_UniffiConverterRustBuf
|
|
|
21555
22320
|
if flag == 0:
|
|
21556
22321
|
return None
|
|
21557
22322
|
elif flag == 1:
|
|
21558
|
-
return
|
|
22323
|
+
return _UniffiConverterTypeAmount.read(buf)
|
|
21559
22324
|
else:
|
|
21560
22325
|
raise InternalError("Unexpected flag byte for optional type")
|
|
21561
22326
|
|
|
21562
22327
|
|
|
21563
22328
|
|
|
21564
|
-
class
|
|
22329
|
+
class _UniffiConverterOptionalTypeAssetFilter(_UniffiConverterRustBuffer):
|
|
21565
22330
|
@classmethod
|
|
21566
22331
|
def check_lower(cls, value):
|
|
21567
22332
|
if value is not None:
|
|
21568
|
-
|
|
22333
|
+
_UniffiConverterTypeAssetFilter.check_lower(value)
|
|
21569
22334
|
|
|
21570
22335
|
@classmethod
|
|
21571
22336
|
def write(cls, value, buf):
|
|
@@ -21574,7 +22339,7 @@ class _UniffiConverterOptionalTypeAmount(_UniffiConverterRustBuffer):
|
|
|
21574
22339
|
return
|
|
21575
22340
|
|
|
21576
22341
|
buf.write_u8(1)
|
|
21577
|
-
|
|
22342
|
+
_UniffiConverterTypeAssetFilter.write(value, buf)
|
|
21578
22343
|
|
|
21579
22344
|
@classmethod
|
|
21580
22345
|
def read(cls, buf):
|
|
@@ -21582,17 +22347,17 @@ class _UniffiConverterOptionalTypeAmount(_UniffiConverterRustBuffer):
|
|
|
21582
22347
|
if flag == 0:
|
|
21583
22348
|
return None
|
|
21584
22349
|
elif flag == 1:
|
|
21585
|
-
return
|
|
22350
|
+
return _UniffiConverterTypeAssetFilter.read(buf)
|
|
21586
22351
|
else:
|
|
21587
22352
|
raise InternalError("Unexpected flag byte for optional type")
|
|
21588
22353
|
|
|
21589
22354
|
|
|
21590
22355
|
|
|
21591
|
-
class
|
|
22356
|
+
class _UniffiConverterOptionalTypeConversionPurpose(_UniffiConverterRustBuffer):
|
|
21592
22357
|
@classmethod
|
|
21593
22358
|
def check_lower(cls, value):
|
|
21594
22359
|
if value is not None:
|
|
21595
|
-
|
|
22360
|
+
_UniffiConverterTypeConversionPurpose.check_lower(value)
|
|
21596
22361
|
|
|
21597
22362
|
@classmethod
|
|
21598
22363
|
def write(cls, value, buf):
|
|
@@ -21601,7 +22366,7 @@ class _UniffiConverterOptionalTypeAssetFilter(_UniffiConverterRustBuffer):
|
|
|
21601
22366
|
return
|
|
21602
22367
|
|
|
21603
22368
|
buf.write_u8(1)
|
|
21604
|
-
|
|
22369
|
+
_UniffiConverterTypeConversionPurpose.write(value, buf)
|
|
21605
22370
|
|
|
21606
22371
|
@classmethod
|
|
21607
22372
|
def read(cls, buf):
|
|
@@ -21609,7 +22374,7 @@ class _UniffiConverterOptionalTypeAssetFilter(_UniffiConverterRustBuffer):
|
|
|
21609
22374
|
if flag == 0:
|
|
21610
22375
|
return None
|
|
21611
22376
|
elif flag == 1:
|
|
21612
|
-
return
|
|
22377
|
+
return _UniffiConverterTypeConversionPurpose.read(buf)
|
|
21613
22378
|
else:
|
|
21614
22379
|
raise InternalError("Unexpected flag byte for optional type")
|
|
21615
22380
|
|
|
@@ -23072,12 +23837,16 @@ __all__ = [
|
|
|
23072
23837
|
"BitcoinNetwork",
|
|
23073
23838
|
"ChainApiType",
|
|
23074
23839
|
"ChainServiceError",
|
|
23840
|
+
"ConversionPurpose",
|
|
23841
|
+
"ConversionStatus",
|
|
23842
|
+
"ConversionType",
|
|
23075
23843
|
"DepositClaimError",
|
|
23076
|
-
"
|
|
23844
|
+
"ExternalSecretKeySource",
|
|
23077
23845
|
"ExternalSecretToSplit",
|
|
23078
23846
|
"Fee",
|
|
23079
23847
|
"InputType",
|
|
23080
23848
|
"KeySetType",
|
|
23849
|
+
"LnurlCallbackStatus",
|
|
23081
23850
|
"MaxFee",
|
|
23082
23851
|
"Network",
|
|
23083
23852
|
"OnchainConfirmationSpeed",
|
|
@@ -23102,7 +23871,6 @@ __all__ = [
|
|
|
23102
23871
|
"SuccessAction",
|
|
23103
23872
|
"SuccessActionProcessed",
|
|
23104
23873
|
"SyncStorageError",
|
|
23105
|
-
"TokenConversionType",
|
|
23106
23874
|
"UpdateDepositPayload",
|
|
23107
23875
|
"AesSuccessActionData",
|
|
23108
23876
|
"AesSuccessActionDataDecrypted",
|
|
@@ -23130,6 +23898,9 @@ __all__ = [
|
|
|
23130
23898
|
"Config",
|
|
23131
23899
|
"ConnectRequest",
|
|
23132
23900
|
"ConnectWithSignerRequest",
|
|
23901
|
+
"ConversionEstimate",
|
|
23902
|
+
"ConversionInfo",
|
|
23903
|
+
"ConversionOptions",
|
|
23133
23904
|
"CreateIssuerTokenRequest",
|
|
23134
23905
|
"Credentials",
|
|
23135
23906
|
"CurrencyInfo",
|
|
@@ -23148,8 +23919,8 @@ __all__ = [
|
|
|
23148
23919
|
"ExternalSigningCommitments",
|
|
23149
23920
|
"ExternalTreeNodeId",
|
|
23150
23921
|
"ExternalVerifiableSecretShare",
|
|
23151
|
-
"
|
|
23152
|
-
"
|
|
23922
|
+
"FetchConversionLimitsRequest",
|
|
23923
|
+
"FetchConversionLimitsResponse",
|
|
23153
23924
|
"FiatCurrency",
|
|
23154
23925
|
"FreezeIssuerTokenRequest",
|
|
23155
23926
|
"FreezeIssuerTokenResponse",
|
|
@@ -23159,6 +23930,7 @@ __all__ = [
|
|
|
23159
23930
|
"GetPaymentResponse",
|
|
23160
23931
|
"GetTokensMetadataRequest",
|
|
23161
23932
|
"GetTokensMetadataResponse",
|
|
23933
|
+
"HashedMessageBytes",
|
|
23162
23934
|
"IdentifierCommitmentPair",
|
|
23163
23935
|
"IdentifierPublicKeyPair",
|
|
23164
23936
|
"IdentifierSignaturePair",
|
|
@@ -23173,6 +23945,7 @@ __all__ = [
|
|
|
23173
23945
|
"ListUnclaimedDepositsRequest",
|
|
23174
23946
|
"ListUnclaimedDepositsResponse",
|
|
23175
23947
|
"LnurlAuthRequestDetails",
|
|
23948
|
+
"LnurlErrorDetails",
|
|
23176
23949
|
"LnurlPayInfo",
|
|
23177
23950
|
"LnurlPayRequest",
|
|
23178
23951
|
"LnurlPayRequestDetails",
|
|
@@ -23185,6 +23958,7 @@ __all__ = [
|
|
|
23185
23958
|
"LocaleOverrides",
|
|
23186
23959
|
"LocalizedName",
|
|
23187
23960
|
"LogEntry",
|
|
23961
|
+
"MessageBytes",
|
|
23188
23962
|
"MessageSuccessActionData",
|
|
23189
23963
|
"MintIssuerTokenRequest",
|
|
23190
23964
|
"OptimizationConfig",
|
|
@@ -23230,8 +24004,6 @@ __all__ = [
|
|
|
23230
24004
|
"SyncWalletRequest",
|
|
23231
24005
|
"SyncWalletResponse",
|
|
23232
24006
|
"TokenBalance",
|
|
23233
|
-
"TokenConversionInfo",
|
|
23234
|
-
"TokenConversionOptions",
|
|
23235
24007
|
"TokenMetadata",
|
|
23236
24008
|
"TxStatus",
|
|
23237
24009
|
"UnfreezeIssuerTokenRequest",
|