breez-sdk-spark 0.7.1__cp38-cp38-macosx_11_0_universal2.whl → 0.7.8__cp38-cp38-macosx_11_0_universal2.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {breez_sdk_spark-0.7.1.data → breez_sdk_spark-0.7.8.data}/purelib/breez_sdk_spark/breez_sdk_spark.py +1526 -750
- {breez_sdk_spark-0.7.1.data → breez_sdk_spark-0.7.8.data}/purelib/breez_sdk_spark/libbreez_sdk_spark_bindings.dylib +0 -0
- {breez_sdk_spark-0.7.1.dist-info → breez_sdk_spark-0.7.8.dist-info}/METADATA +1 -1
- breez_sdk_spark-0.7.8.dist-info/RECORD +8 -0
- breez_sdk_spark-0.7.1.dist-info/RECORD +0 -8
- {breez_sdk_spark-0.7.1.data → breez_sdk_spark-0.7.8.data}/purelib/breez_sdk_spark/__init__.py +0 -0
- {breez_sdk_spark-0.7.1.data → breez_sdk_spark-0.7.8.data}/purelib/breez_sdk_spark/breez_sdk_spark_bindings.py +0 -0
- {breez_sdk_spark-0.7.1.dist-info → breez_sdk_spark-0.7.8.dist-info}/WHEEL +0 -0
- {breez_sdk_spark-0.7.1.dist-info → breez_sdk_spark-0.7.8.dist-info}/top_level.txt +0 -0
{breez_sdk_spark-0.7.1.data → breez_sdk_spark-0.7.8.data}/purelib/breez_sdk_spark/breez_sdk_spark.py
RENAMED
|
@@ -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() != 63908:
|
|
573
577
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
574
|
-
if lib.
|
|
578
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret_encrypted() != 64635:
|
|
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() != 35967:
|
|
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_secrets() != 43864:
|
|
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_for_receiver() != 61924:
|
|
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() != 27909:
|
|
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_encrypted", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD11),
|
|
947
|
+
("static_deposit_secret", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD12),
|
|
948
|
+
("static_deposit_signing_key", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD13),
|
|
949
|
+
("subtract_secrets", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD14),
|
|
950
|
+
("split_secret_with_proofs", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD15),
|
|
951
|
+
("encrypt_secret_for_receiver", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD16),
|
|
952
|
+
("public_key_from_secret", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD17),
|
|
953
|
+
("sign_frost", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD18),
|
|
954
|
+
("aggregate_frost", _UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD19),
|
|
948
955
|
("uniffi_free", _UNIFFI_CALLBACK_INTERFACE_FREE),
|
|
949
956
|
]
|
|
950
957
|
class _UniffiVTableCallbackInterfaceFiatService(ctypes.Structure):
|
|
@@ -1081,11 +1088,11 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect.argtypes = (
|
|
|
1081
1088
|
ctypes.c_void_p,
|
|
1082
1089
|
)
|
|
1083
1090
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_disconnect.restype = ctypes.c_uint64
|
|
1084
|
-
_UniffiLib.
|
|
1091
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_fetch_conversion_limits.argtypes = (
|
|
1085
1092
|
ctypes.c_void_p,
|
|
1086
1093
|
_UniffiRustBuffer,
|
|
1087
1094
|
)
|
|
1088
|
-
_UniffiLib.
|
|
1095
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_fetch_conversion_limits.restype = ctypes.c_uint64
|
|
1089
1096
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_get_info.argtypes = (
|
|
1090
1097
|
ctypes.c_void_p,
|
|
1091
1098
|
_UniffiRustBuffer,
|
|
@@ -1137,6 +1144,11 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_list_unclaimed_deposits.arg
|
|
|
1137
1144
|
_UniffiRustBuffer,
|
|
1138
1145
|
)
|
|
1139
1146
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_list_unclaimed_deposits.restype = ctypes.c_uint64
|
|
1147
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_auth.argtypes = (
|
|
1148
|
+
ctypes.c_void_p,
|
|
1149
|
+
_UniffiRustBuffer,
|
|
1150
|
+
)
|
|
1151
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_auth.restype = ctypes.c_uint64
|
|
1140
1152
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_pay.argtypes = (
|
|
1141
1153
|
ctypes.c_void_p,
|
|
1142
1154
|
_UniffiRustBuffer,
|
|
@@ -1247,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_encrypted.argtypes = (
|
|
1282
1300
|
ctypes.c_void_p,
|
|
1283
1301
|
ctypes.c_uint32,
|
|
1284
1302
|
)
|
|
1285
|
-
_UniffiLib.
|
|
1286
|
-
_UniffiLib.
|
|
1303
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_secret_encrypted.restype = ctypes.c_uint64
|
|
1304
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_secret.argtypes = (
|
|
1287
1305
|
ctypes.c_void_p,
|
|
1288
1306
|
ctypes.c_uint32,
|
|
1289
1307
|
)
|
|
1290
|
-
_UniffiLib.
|
|
1291
|
-
_UniffiLib.
|
|
1308
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_secret.restype = ctypes.c_uint64
|
|
1309
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_signing_key.argtypes = (
|
|
1292
1310
|
ctypes.c_void_p,
|
|
1293
1311
|
ctypes.c_uint32,
|
|
1294
1312
|
)
|
|
1295
|
-
_UniffiLib.
|
|
1296
|
-
_UniffiLib.
|
|
1313
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_signing_key.restype = ctypes.c_uint64
|
|
1314
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_subtract_secrets.argtypes = (
|
|
1297
1315
|
ctypes.c_void_p,
|
|
1298
1316
|
_UniffiRustBuffer,
|
|
1299
1317
|
_UniffiRustBuffer,
|
|
1300
1318
|
)
|
|
1301
|
-
_UniffiLib.
|
|
1302
|
-
_UniffiLib.
|
|
1319
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_subtract_secrets.restype = ctypes.c_uint64
|
|
1320
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_split_secret_with_proofs.argtypes = (
|
|
1303
1321
|
ctypes.c_void_p,
|
|
1304
1322
|
_UniffiRustBuffer,
|
|
1305
1323
|
ctypes.c_uint32,
|
|
1306
1324
|
ctypes.c_uint32,
|
|
1307
1325
|
)
|
|
1308
|
-
_UniffiLib.
|
|
1309
|
-
_UniffiLib.
|
|
1326
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_split_secret_with_proofs.restype = ctypes.c_uint64
|
|
1327
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_encrypt_secret_for_receiver.argtypes = (
|
|
1310
1328
|
ctypes.c_void_p,
|
|
1311
1329
|
_UniffiRustBuffer,
|
|
1312
1330
|
_UniffiRustBuffer,
|
|
1313
1331
|
)
|
|
1314
|
-
_UniffiLib.
|
|
1315
|
-
_UniffiLib.
|
|
1332
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_encrypt_secret_for_receiver.restype = ctypes.c_uint64
|
|
1333
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_public_key_from_secret.argtypes = (
|
|
1316
1334
|
ctypes.c_void_p,
|
|
1317
1335
|
_UniffiRustBuffer,
|
|
1318
1336
|
)
|
|
1319
|
-
_UniffiLib.
|
|
1337
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_public_key_from_secret.restype = ctypes.c_uint64
|
|
1320
1338
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_sign_frost.argtypes = (
|
|
1321
1339
|
ctypes.c_void_p,
|
|
1322
1340
|
_UniffiRustBuffer,
|
|
1323
1341
|
)
|
|
1324
1342
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_sign_frost.restype = ctypes.c_uint64
|
|
1325
|
-
_UniffiLib.
|
|
1343
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_aggregate_frost.argtypes = (
|
|
1326
1344
|
ctypes.c_void_p,
|
|
1327
1345
|
_UniffiRustBuffer,
|
|
1328
1346
|
)
|
|
1329
|
-
_UniffiLib.
|
|
1347
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_aggregate_frost.restype = ctypes.c_uint64
|
|
1330
1348
|
_UniffiLib.uniffi_breez_sdk_spark_fn_clone_fiatservice.argtypes = (
|
|
1331
1349
|
ctypes.c_void_p,
|
|
1332
1350
|
ctypes.POINTER(_UniffiRustCallStatus),
|
|
@@ -2017,9 +2035,9 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_delete_lightning_addr
|
|
|
2017
2035
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_disconnect.argtypes = (
|
|
2018
2036
|
)
|
|
2019
2037
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_disconnect.restype = ctypes.c_uint16
|
|
2020
|
-
_UniffiLib.
|
|
2038
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_fetch_conversion_limits.argtypes = (
|
|
2021
2039
|
)
|
|
2022
|
-
_UniffiLib.
|
|
2040
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_fetch_conversion_limits.restype = ctypes.c_uint16
|
|
2023
2041
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_info.argtypes = (
|
|
2024
2042
|
)
|
|
2025
2043
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_info.restype = ctypes.c_uint16
|
|
@@ -2053,6 +2071,9 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_payments.restype
|
|
|
2053
2071
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_unclaimed_deposits.argtypes = (
|
|
2054
2072
|
)
|
|
2055
2073
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_unclaimed_deposits.restype = ctypes.c_uint16
|
|
2074
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_auth.argtypes = (
|
|
2075
|
+
)
|
|
2076
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_auth.restype = ctypes.c_uint16
|
|
2056
2077
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay.argtypes = (
|
|
2057
2078
|
)
|
|
2058
2079
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay.restype = ctypes.c_uint16
|
|
@@ -2110,51 +2131,54 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_ecdsa.rest
|
|
|
2110
2131
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_ecdsa_recoverable.argtypes = (
|
|
2111
2132
|
)
|
|
2112
2133
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_ecdsa_recoverable.restype = ctypes.c_uint16
|
|
2113
|
-
_UniffiLib.
|
|
2134
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_ecies.argtypes = (
|
|
2114
2135
|
)
|
|
2115
|
-
_UniffiLib.
|
|
2116
|
-
_UniffiLib.
|
|
2136
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_ecies.restype = ctypes.c_uint16
|
|
2137
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_decrypt_ecies.argtypes = (
|
|
2117
2138
|
)
|
|
2118
|
-
_UniffiLib.
|
|
2139
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_decrypt_ecies.restype = ctypes.c_uint16
|
|
2119
2140
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_hash_schnorr.argtypes = (
|
|
2120
2141
|
)
|
|
2121
2142
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_hash_schnorr.restype = ctypes.c_uint16
|
|
2122
|
-
_UniffiLib.
|
|
2143
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_hmac_sha256.argtypes = (
|
|
2144
|
+
)
|
|
2145
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_hmac_sha256.restype = ctypes.c_uint16
|
|
2146
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_signing_commitment.argtypes = (
|
|
2123
2147
|
)
|
|
2124
|
-
_UniffiLib.
|
|
2148
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_generate_random_signing_commitment.restype = ctypes.c_uint16
|
|
2125
2149
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_get_public_key_for_node.argtypes = (
|
|
2126
2150
|
)
|
|
2127
2151
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_get_public_key_for_node.restype = ctypes.c_uint16
|
|
2128
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_encrypted.argtypes = (
|
|
2132
2156
|
)
|
|
2133
|
-
_UniffiLib.
|
|
2134
|
-
_UniffiLib.
|
|
2157
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret_encrypted.restype = ctypes.c_uint16
|
|
2158
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret.argtypes = (
|
|
2135
2159
|
)
|
|
2136
|
-
_UniffiLib.
|
|
2137
|
-
_UniffiLib.
|
|
2160
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_secret.restype = ctypes.c_uint16
|
|
2161
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_signing_key.argtypes = (
|
|
2138
2162
|
)
|
|
2139
|
-
_UniffiLib.
|
|
2140
|
-
_UniffiLib.
|
|
2163
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_static_deposit_signing_key.restype = ctypes.c_uint16
|
|
2164
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_subtract_secrets.argtypes = (
|
|
2141
2165
|
)
|
|
2142
|
-
_UniffiLib.
|
|
2143
|
-
_UniffiLib.
|
|
2166
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_subtract_secrets.restype = ctypes.c_uint16
|
|
2167
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_split_secret_with_proofs.argtypes = (
|
|
2144
2168
|
)
|
|
2145
|
-
_UniffiLib.
|
|
2146
|
-
_UniffiLib.
|
|
2169
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_split_secret_with_proofs.restype = ctypes.c_uint16
|
|
2170
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_secret_for_receiver.argtypes = (
|
|
2147
2171
|
)
|
|
2148
|
-
_UniffiLib.
|
|
2149
|
-
_UniffiLib.
|
|
2172
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_encrypt_secret_for_receiver.restype = ctypes.c_uint16
|
|
2173
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_public_key_from_secret.argtypes = (
|
|
2150
2174
|
)
|
|
2151
|
-
_UniffiLib.
|
|
2175
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_public_key_from_secret.restype = ctypes.c_uint16
|
|
2152
2176
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_frost.argtypes = (
|
|
2153
2177
|
)
|
|
2154
2178
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_sign_frost.restype = ctypes.c_uint16
|
|
2155
|
-
_UniffiLib.
|
|
2179
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_aggregate_frost.argtypes = (
|
|
2156
2180
|
)
|
|
2157
|
-
_UniffiLib.
|
|
2181
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_externalsigner_aggregate_frost.restype = ctypes.c_uint16
|
|
2158
2182
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies.argtypes = (
|
|
2159
2183
|
)
|
|
2160
2184
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_fiatservice_fetch_fiat_currencies.restype = ctypes.c_uint16
|
|
@@ -2901,7 +2925,7 @@ class BreezSdkProtocol(typing.Protocol):
|
|
|
2901
2925
|
"""
|
|
2902
2926
|
|
|
2903
2927
|
raise NotImplementedError
|
|
2904
|
-
def
|
|
2928
|
+
def fetch_conversion_limits(self, request: "FetchConversionLimitsRequest"):
|
|
2905
2929
|
raise NotImplementedError
|
|
2906
2930
|
def get_info(self, request: "GetInfoRequest"):
|
|
2907
2931
|
"""
|
|
@@ -2977,6 +3001,58 @@ class BreezSdkProtocol(typing.Protocol):
|
|
|
2977
3001
|
|
|
2978
3002
|
raise NotImplementedError
|
|
2979
3003
|
def list_unclaimed_deposits(self, request: "ListUnclaimedDepositsRequest"):
|
|
3004
|
+
raise NotImplementedError
|
|
3005
|
+
def lnurl_auth(self, request_data: "LnurlAuthRequestDetails"):
|
|
3006
|
+
"""
|
|
3007
|
+
Performs LNURL-auth with the service.
|
|
3008
|
+
|
|
3009
|
+
This method implements the LNURL-auth protocol as specified in LUD-04 and LUD-05.
|
|
3010
|
+
It derives a domain-specific linking key, signs the challenge, and sends the
|
|
3011
|
+
authentication request to the service.
|
|
3012
|
+
|
|
3013
|
+
# Arguments
|
|
3014
|
+
|
|
3015
|
+
* `request_data` - The parsed LNURL-auth request details obtained from [`parse`]
|
|
3016
|
+
|
|
3017
|
+
# Returns
|
|
3018
|
+
|
|
3019
|
+
* `Ok(LnurlCallbackStatus::Ok)` - Authentication was successful
|
|
3020
|
+
* `Ok(LnurlCallbackStatus::ErrorStatus{reason})` - Service returned an error
|
|
3021
|
+
* `Err(SdkError)` - An error occurred during the authentication process
|
|
3022
|
+
|
|
3023
|
+
# Example
|
|
3024
|
+
|
|
3025
|
+
```rust,no_run
|
|
3026
|
+
# use breez_sdk_spark::{BreezSdk, InputType};
|
|
3027
|
+
# async fn example(sdk: BreezSdk) -> Result<(), Box<dyn std::error::Error>> {
|
|
3028
|
+
// 1. Parse the LNURL-auth string
|
|
3029
|
+
let input = sdk.parse("lnurl1...").await?;
|
|
3030
|
+
let auth_request = match input {
|
|
3031
|
+
InputType::LnurlAuth(data) => data,
|
|
3032
|
+
_ => return Err("Not an auth request".into()),
|
|
3033
|
+
};
|
|
3034
|
+
|
|
3035
|
+
// 2. Show user the domain and get confirmation
|
|
3036
|
+
println!("Authenticate with {}?", auth_request.domain);
|
|
3037
|
+
|
|
3038
|
+
// 3. Perform authentication
|
|
3039
|
+
let status = sdk.lnurl_auth(auth_request).await?;
|
|
3040
|
+
match status {
|
|
3041
|
+
breez_sdk_spark::LnurlCallbackStatus::Ok => println!("Success!"),
|
|
3042
|
+
breez_sdk_spark::LnurlCallbackStatus::ErrorStatus { error_details } => {
|
|
3043
|
+
println!("Error: {}", error_details.reason)
|
|
3044
|
+
}
|
|
3045
|
+
}
|
|
3046
|
+
# Ok(())
|
|
3047
|
+
# }
|
|
3048
|
+
```
|
|
3049
|
+
|
|
3050
|
+
# See Also
|
|
3051
|
+
|
|
3052
|
+
* LUD-04: <https://github.com/lnurl/luds/blob/luds/04.md>
|
|
3053
|
+
* LUD-05: <https://github.com/lnurl/luds/blob/luds/05.md>
|
|
3054
|
+
"""
|
|
3055
|
+
|
|
2980
3056
|
raise NotImplementedError
|
|
2981
3057
|
def lnurl_pay(self, request: "LnurlPayRequest"):
|
|
2982
3058
|
raise NotImplementedError
|
|
@@ -3313,19 +3389,19 @@ _UniffiConverterTypeSdkError,
|
|
|
3313
3389
|
|
|
3314
3390
|
|
|
3315
3391
|
|
|
3316
|
-
async def
|
|
3317
|
-
|
|
3392
|
+
async def fetch_conversion_limits(self, request: "FetchConversionLimitsRequest") -> "FetchConversionLimitsResponse":
|
|
3393
|
+
_UniffiConverterTypeFetchConversionLimitsRequest.check_lower(request)
|
|
3318
3394
|
|
|
3319
3395
|
return await _uniffi_rust_call_async(
|
|
3320
|
-
_UniffiLib.
|
|
3396
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_fetch_conversion_limits(
|
|
3321
3397
|
self._uniffi_clone_pointer(),
|
|
3322
|
-
|
|
3398
|
+
_UniffiConverterTypeFetchConversionLimitsRequest.lower(request)
|
|
3323
3399
|
),
|
|
3324
3400
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
3325
3401
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
3326
3402
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
3327
3403
|
# lift function
|
|
3328
|
-
|
|
3404
|
+
_UniffiConverterTypeFetchConversionLimitsResponse.lift,
|
|
3329
3405
|
|
|
3330
3406
|
# Error FFI converter
|
|
3331
3407
|
_UniffiConverterTypeSdkError,
|
|
@@ -3582,6 +3658,77 @@ _UniffiConverterTypeSdkError,
|
|
|
3582
3658
|
|
|
3583
3659
|
|
|
3584
3660
|
|
|
3661
|
+
async def lnurl_auth(self, request_data: "LnurlAuthRequestDetails") -> "LnurlCallbackStatus":
|
|
3662
|
+
"""
|
|
3663
|
+
Performs LNURL-auth with the service.
|
|
3664
|
+
|
|
3665
|
+
This method implements the LNURL-auth protocol as specified in LUD-04 and LUD-05.
|
|
3666
|
+
It derives a domain-specific linking key, signs the challenge, and sends the
|
|
3667
|
+
authentication request to the service.
|
|
3668
|
+
|
|
3669
|
+
# Arguments
|
|
3670
|
+
|
|
3671
|
+
* `request_data` - The parsed LNURL-auth request details obtained from [`parse`]
|
|
3672
|
+
|
|
3673
|
+
# Returns
|
|
3674
|
+
|
|
3675
|
+
* `Ok(LnurlCallbackStatus::Ok)` - Authentication was successful
|
|
3676
|
+
* `Ok(LnurlCallbackStatus::ErrorStatus{reason})` - Service returned an error
|
|
3677
|
+
* `Err(SdkError)` - An error occurred during the authentication process
|
|
3678
|
+
|
|
3679
|
+
# Example
|
|
3680
|
+
|
|
3681
|
+
```rust,no_run
|
|
3682
|
+
# use breez_sdk_spark::{BreezSdk, InputType};
|
|
3683
|
+
# async fn example(sdk: BreezSdk) -> Result<(), Box<dyn std::error::Error>> {
|
|
3684
|
+
// 1. Parse the LNURL-auth string
|
|
3685
|
+
let input = sdk.parse("lnurl1...").await?;
|
|
3686
|
+
let auth_request = match input {
|
|
3687
|
+
InputType::LnurlAuth(data) => data,
|
|
3688
|
+
_ => return Err("Not an auth request".into()),
|
|
3689
|
+
};
|
|
3690
|
+
|
|
3691
|
+
// 2. Show user the domain and get confirmation
|
|
3692
|
+
println!("Authenticate with {}?", auth_request.domain);
|
|
3693
|
+
|
|
3694
|
+
// 3. Perform authentication
|
|
3695
|
+
let status = sdk.lnurl_auth(auth_request).await?;
|
|
3696
|
+
match status {
|
|
3697
|
+
breez_sdk_spark::LnurlCallbackStatus::Ok => println!("Success!"),
|
|
3698
|
+
breez_sdk_spark::LnurlCallbackStatus::ErrorStatus { error_details } => {
|
|
3699
|
+
println!("Error: {}", error_details.reason)
|
|
3700
|
+
}
|
|
3701
|
+
}
|
|
3702
|
+
# Ok(())
|
|
3703
|
+
# }
|
|
3704
|
+
```
|
|
3705
|
+
|
|
3706
|
+
# See Also
|
|
3707
|
+
|
|
3708
|
+
* LUD-04: <https://github.com/lnurl/luds/blob/luds/04.md>
|
|
3709
|
+
* LUD-05: <https://github.com/lnurl/luds/blob/luds/05.md>
|
|
3710
|
+
"""
|
|
3711
|
+
|
|
3712
|
+
_UniffiConverterTypeLnurlAuthRequestDetails.check_lower(request_data)
|
|
3713
|
+
|
|
3714
|
+
return await _uniffi_rust_call_async(
|
|
3715
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_auth(
|
|
3716
|
+
self._uniffi_clone_pointer(),
|
|
3717
|
+
_UniffiConverterTypeLnurlAuthRequestDetails.lower(request_data)
|
|
3718
|
+
),
|
|
3719
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
3720
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
3721
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
3722
|
+
# lift function
|
|
3723
|
+
_UniffiConverterTypeLnurlCallbackStatus.lift,
|
|
3724
|
+
|
|
3725
|
+
# Error FFI converter
|
|
3726
|
+
_UniffiConverterTypeSdkError,
|
|
3727
|
+
|
|
3728
|
+
)
|
|
3729
|
+
|
|
3730
|
+
|
|
3731
|
+
|
|
3585
3732
|
async def lnurl_pay(self, request: "LnurlPayRequest") -> "LnurlPayResponse":
|
|
3586
3733
|
_UniffiConverterTypeLnurlPayRequest.check_lower(request)
|
|
3587
3734
|
|
|
@@ -4002,6 +4149,8 @@ class ExternalSigner(typing.Protocol):
|
|
|
4002
4149
|
def identity_public_key(self, ):
|
|
4003
4150
|
"""
|
|
4004
4151
|
Returns the identity public key as 33 bytes (compressed secp256k1 key).
|
|
4152
|
+
|
|
4153
|
+
See also: [JavaScript `getIdentityPublicKey`](https://docs.spark.money/wallets/spark-signer#get-identity-public-key)
|
|
4005
4154
|
"""
|
|
4006
4155
|
|
|
4007
4156
|
raise NotImplementedError
|
|
@@ -4014,15 +4163,19 @@ class ExternalSigner(typing.Protocol):
|
|
|
4014
4163
|
|
|
4015
4164
|
# Returns
|
|
4016
4165
|
The derived public key as 33 bytes, or a `SignerError`
|
|
4166
|
+
|
|
4167
|
+
See also: [JavaScript `getPublicKeyFromDerivation`](https://docs.spark.money/wallets/spark-signer#get-public-key-from-derivation)
|
|
4017
4168
|
"""
|
|
4018
4169
|
|
|
4019
4170
|
raise NotImplementedError
|
|
4020
|
-
def sign_ecdsa(self, message: "
|
|
4171
|
+
def sign_ecdsa(self, message: "MessageBytes",path: "str"):
|
|
4021
4172
|
"""
|
|
4022
4173
|
Signs a message using ECDSA at the given derivation path.
|
|
4023
4174
|
|
|
4175
|
+
The message should be a 32-byte digest (typically a hash of the original data).
|
|
4176
|
+
|
|
4024
4177
|
# Arguments
|
|
4025
|
-
* `message` - The message to sign
|
|
4178
|
+
* `message` - The 32-byte message digest to sign
|
|
4026
4179
|
* `path` - BIP32 derivation path as a string
|
|
4027
4180
|
|
|
4028
4181
|
# Returns
|
|
@@ -4030,12 +4183,14 @@ class ExternalSigner(typing.Protocol):
|
|
|
4030
4183
|
"""
|
|
4031
4184
|
|
|
4032
4185
|
raise NotImplementedError
|
|
4033
|
-
def sign_ecdsa_recoverable(self, message: "
|
|
4186
|
+
def sign_ecdsa_recoverable(self, message: "MessageBytes",path: "str"):
|
|
4034
4187
|
"""
|
|
4035
4188
|
Signs a message using recoverable ECDSA at the given derivation path.
|
|
4036
4189
|
|
|
4190
|
+
The message should be a 32-byte digest (typically a hash of the original data).
|
|
4191
|
+
|
|
4037
4192
|
# Arguments
|
|
4038
|
-
* `message` - The message to sign
|
|
4193
|
+
* `message` - The 32-byte message digest to sign
|
|
4039
4194
|
* `path` - BIP32 derivation path as a string
|
|
4040
4195
|
|
|
4041
4196
|
# Returns
|
|
@@ -4043,7 +4198,7 @@ class ExternalSigner(typing.Protocol):
|
|
|
4043
4198
|
"""
|
|
4044
4199
|
|
|
4045
4200
|
raise NotImplementedError
|
|
4046
|
-
def
|
|
4201
|
+
def encrypt_ecies(self, message: "bytes",path: "str"):
|
|
4047
4202
|
"""
|
|
4048
4203
|
Encrypts a message using ECIES at the given derivation path.
|
|
4049
4204
|
|
|
@@ -4056,7 +4211,7 @@ class ExternalSigner(typing.Protocol):
|
|
|
4056
4211
|
"""
|
|
4057
4212
|
|
|
4058
4213
|
raise NotImplementedError
|
|
4059
|
-
def
|
|
4214
|
+
def decrypt_ecies(self, message: "bytes",path: "str"):
|
|
4060
4215
|
"""
|
|
4061
4216
|
Decrypts a message using ECIES at the given derivation path.
|
|
4062
4217
|
|
|
@@ -4066,6 +4221,8 @@ class ExternalSigner(typing.Protocol):
|
|
|
4066
4221
|
|
|
4067
4222
|
# Returns
|
|
4068
4223
|
Decrypted data, or a `SignerError`
|
|
4224
|
+
|
|
4225
|
+
See also: [JavaScript `decryptEcies`](https://docs.spark.money/wallets/spark-signer#decrypt-ecies)
|
|
4069
4226
|
"""
|
|
4070
4227
|
|
|
4071
4228
|
raise NotImplementedError
|
|
@@ -4082,12 +4239,29 @@ class ExternalSigner(typing.Protocol):
|
|
|
4082
4239
|
"""
|
|
4083
4240
|
|
|
4084
4241
|
raise NotImplementedError
|
|
4085
|
-
def
|
|
4242
|
+
def hmac_sha256(self, message: "bytes",path: "str"):
|
|
4243
|
+
"""
|
|
4244
|
+
HMAC-SHA256 of a message at the given derivation path.
|
|
4245
|
+
|
|
4246
|
+
# Arguments
|
|
4247
|
+
* `message` - The message to hash
|
|
4248
|
+
* `path` - BIP32 derivation path as a string
|
|
4249
|
+
|
|
4250
|
+
# Returns
|
|
4251
|
+
32-byte HMAC-SHA256, or a `SignerError`
|
|
4252
|
+
|
|
4253
|
+
See also: [JavaScript `htlcHMAC`](https://docs.spark.money/wallets/spark-signer#generate-htlc-hmac)
|
|
4254
|
+
"""
|
|
4255
|
+
|
|
4256
|
+
raise NotImplementedError
|
|
4257
|
+
def generate_random_signing_commitment(self, ):
|
|
4086
4258
|
"""
|
|
4087
4259
|
Generates Frost signing commitments for multi-party signing.
|
|
4088
4260
|
|
|
4089
4261
|
# Returns
|
|
4090
4262
|
Frost commitments with nonces, or a `SignerError`
|
|
4263
|
+
|
|
4264
|
+
See also: [JavaScript `getRandomSigningCommitment`](https://docs.spark.money/wallets/spark-signer#get-random-signing-commitment)
|
|
4091
4265
|
"""
|
|
4092
4266
|
|
|
4093
4267
|
raise NotImplementedError
|
|
@@ -4105,38 +4279,42 @@ 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.
|
|
4109
4283
|
|
|
4110
4284
|
# Returns
|
|
4111
|
-
A randomly generated
|
|
4285
|
+
A randomly generated secret source, or an error string
|
|
4112
4286
|
"""
|
|
4113
4287
|
|
|
4114
4288
|
raise NotImplementedError
|
|
4115
|
-
def
|
|
4289
|
+
def static_deposit_secret_encrypted(self, index: "int"):
|
|
4116
4290
|
"""
|
|
4117
|
-
Gets
|
|
4291
|
+
Gets an encrypted static deposit secret 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 source, or an error string
|
|
4298
|
+
|
|
4299
|
+
This is the encrypted version of: [JavaScript `getStaticDepositSecretKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-secret-key)
|
|
4124
4300
|
"""
|
|
4125
4301
|
|
|
4126
4302
|
raise NotImplementedError
|
|
4127
|
-
def
|
|
4303
|
+
def static_deposit_secret(self, index: "int"):
|
|
4128
4304
|
"""
|
|
4129
|
-
Gets a static deposit
|
|
4305
|
+
Gets a static deposit secret by index.
|
|
4130
4306
|
|
|
4131
4307
|
# Arguments
|
|
4132
4308
|
* `index` - The index of the static deposit key
|
|
4133
4309
|
|
|
4134
4310
|
# Returns
|
|
4135
|
-
The 32-byte
|
|
4311
|
+
The 32-byte secret, or an error string
|
|
4312
|
+
|
|
4313
|
+
See also: [JavaScript `getStaticDepositSecretKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-secret-key)
|
|
4136
4314
|
"""
|
|
4137
4315
|
|
|
4138
4316
|
raise NotImplementedError
|
|
4139
|
-
def
|
|
4317
|
+
def static_deposit_signing_key(self, index: "int"):
|
|
4140
4318
|
"""
|
|
4141
4319
|
Gets a static deposit public key by index.
|
|
4142
4320
|
|
|
@@ -4145,23 +4323,28 @@ class ExternalSigner(typing.Protocol):
|
|
|
4145
4323
|
|
|
4146
4324
|
# Returns
|
|
4147
4325
|
The 33-byte public key, or an error string
|
|
4326
|
+
|
|
4327
|
+
See also: [JavaScript `getStaticDepositSigningKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-signing-key)
|
|
4148
4328
|
"""
|
|
4149
4329
|
|
|
4150
4330
|
raise NotImplementedError
|
|
4151
|
-
def
|
|
4331
|
+
def subtract_secrets(self, signing_key: "ExternalSecretSource",new_signing_key: "ExternalSecretSource"):
|
|
4152
4332
|
"""
|
|
4153
|
-
Subtracts one
|
|
4333
|
+
Subtracts one secret from another.
|
|
4154
4334
|
|
|
4155
4335
|
# Arguments
|
|
4156
|
-
* `signing_key` - The first
|
|
4157
|
-
* `new_signing_key` - The second
|
|
4336
|
+
* `signing_key` - The first secret source
|
|
4337
|
+
* `new_signing_key` - The second secret source to subtract
|
|
4158
4338
|
|
|
4159
4339
|
# Returns
|
|
4160
|
-
The resulting
|
|
4340
|
+
The resulting secret source, or an error string
|
|
4341
|
+
|
|
4342
|
+
See also: [JavaScript `subtractSplitAndEncrypt`](https://docs.spark.money/wallets/spark-signer#subtract,-split,-and-encrypt)
|
|
4343
|
+
(this method provides the subtraction step of that higher-level operation)
|
|
4161
4344
|
"""
|
|
4162
4345
|
|
|
4163
4346
|
raise NotImplementedError
|
|
4164
|
-
def
|
|
4347
|
+
def split_secret_with_proofs(self, secret: "ExternalSecretToSplit",threshold: "int",num_shares: "int"):
|
|
4165
4348
|
"""
|
|
4166
4349
|
Splits a secret with proofs using Shamir's Secret Sharing.
|
|
4167
4350
|
|
|
@@ -4172,15 +4355,17 @@ class ExternalSigner(typing.Protocol):
|
|
|
4172
4355
|
|
|
4173
4356
|
# Returns
|
|
4174
4357
|
Vector of verifiable secret shares, or an error string
|
|
4358
|
+
|
|
4359
|
+
See also: [JavaScript `splitSecretWithProofs`](https://docs.spark.money/wallets/spark-signer#split-secret-with-proofs)
|
|
4175
4360
|
"""
|
|
4176
4361
|
|
|
4177
4362
|
raise NotImplementedError
|
|
4178
|
-
def
|
|
4363
|
+
def encrypt_secret_for_receiver(self, encrypted_secret: "ExternalEncryptedSecret",receiver_public_key: "PublicKeyBytes"):
|
|
4179
4364
|
"""
|
|
4180
|
-
Encrypts a
|
|
4365
|
+
Encrypts a secret for a specific receiver's public key.
|
|
4181
4366
|
|
|
4182
4367
|
# Arguments
|
|
4183
|
-
* `
|
|
4368
|
+
* `encrypted_secret` - The encrypted secret to re-encrypt
|
|
4184
4369
|
* `receiver_public_key` - The receiver's 33-byte public key
|
|
4185
4370
|
|
|
4186
4371
|
# Returns
|
|
@@ -4188,12 +4373,12 @@ class ExternalSigner(typing.Protocol):
|
|
|
4188
4373
|
"""
|
|
4189
4374
|
|
|
4190
4375
|
raise NotImplementedError
|
|
4191
|
-
def
|
|
4376
|
+
def public_key_from_secret(self, secret: "ExternalSecretSource"):
|
|
4192
4377
|
"""
|
|
4193
|
-
Gets the public key from a
|
|
4378
|
+
Gets the public key from a secret source.
|
|
4194
4379
|
|
|
4195
4380
|
# Arguments
|
|
4196
|
-
* `
|
|
4381
|
+
* `secret` - The secret source
|
|
4197
4382
|
|
|
4198
4383
|
# Returns
|
|
4199
4384
|
The corresponding 33-byte public key, or an error string
|
|
@@ -4209,10 +4394,12 @@ class ExternalSigner(typing.Protocol):
|
|
|
4209
4394
|
|
|
4210
4395
|
# Returns
|
|
4211
4396
|
A signature share, or an error string
|
|
4397
|
+
|
|
4398
|
+
See also: [JavaScript `signFrost`](https://docs.spark.money/wallets/spark-signer#frost-signing)
|
|
4212
4399
|
"""
|
|
4213
4400
|
|
|
4214
4401
|
raise NotImplementedError
|
|
4215
|
-
def
|
|
4402
|
+
def aggregate_frost(self, request: "ExternalAggregateFrostRequest"):
|
|
4216
4403
|
"""
|
|
4217
4404
|
Aggregates Frost signature shares into a final signature.
|
|
4218
4405
|
|
|
@@ -4221,6 +4408,8 @@ class ExternalSigner(typing.Protocol):
|
|
|
4221
4408
|
|
|
4222
4409
|
# Returns
|
|
4223
4410
|
The aggregated Frost signature, or an error string
|
|
4411
|
+
|
|
4412
|
+
See also: [JavaScript `aggregateFrost`](https://docs.spark.money/wallets/spark-signer#aggregate-frost-signatures)
|
|
4224
4413
|
"""
|
|
4225
4414
|
|
|
4226
4415
|
raise NotImplementedError
|
|
@@ -4268,6 +4457,8 @@ class ExternalSignerImpl:
|
|
|
4268
4457
|
def identity_public_key(self, ) -> "PublicKeyBytes":
|
|
4269
4458
|
"""
|
|
4270
4459
|
Returns the identity public key as 33 bytes (compressed secp256k1 key).
|
|
4460
|
+
|
|
4461
|
+
See also: [JavaScript `getIdentityPublicKey`](https://docs.spark.money/wallets/spark-signer#get-identity-public-key)
|
|
4271
4462
|
"""
|
|
4272
4463
|
|
|
4273
4464
|
return _UniffiConverterTypePublicKeyBytes.lift(
|
|
@@ -4286,6 +4477,8 @@ class ExternalSignerImpl:
|
|
|
4286
4477
|
|
|
4287
4478
|
# Returns
|
|
4288
4479
|
The derived public key as 33 bytes, or a `SignerError`
|
|
4480
|
+
|
|
4481
|
+
See also: [JavaScript `getPublicKeyFromDerivation`](https://docs.spark.money/wallets/spark-signer#get-public-key-from-derivation)
|
|
4289
4482
|
"""
|
|
4290
4483
|
|
|
4291
4484
|
_UniffiConverterString.check_lower(path)
|
|
@@ -4308,26 +4501,28 @@ _UniffiConverterTypeSignerError,
|
|
|
4308
4501
|
|
|
4309
4502
|
|
|
4310
4503
|
|
|
4311
|
-
async def sign_ecdsa(self, message: "
|
|
4504
|
+
async def sign_ecdsa(self, message: "MessageBytes",path: "str") -> "EcdsaSignatureBytes":
|
|
4312
4505
|
"""
|
|
4313
4506
|
Signs a message using ECDSA at the given derivation path.
|
|
4314
4507
|
|
|
4508
|
+
The message should be a 32-byte digest (typically a hash of the original data).
|
|
4509
|
+
|
|
4315
4510
|
# Arguments
|
|
4316
|
-
* `message` - The message to sign
|
|
4511
|
+
* `message` - The 32-byte message digest to sign
|
|
4317
4512
|
* `path` - BIP32 derivation path as a string
|
|
4318
4513
|
|
|
4319
4514
|
# Returns
|
|
4320
4515
|
64-byte compact ECDSA signature, or a `SignerError`
|
|
4321
4516
|
"""
|
|
4322
4517
|
|
|
4323
|
-
|
|
4518
|
+
_UniffiConverterTypeMessageBytes.check_lower(message)
|
|
4324
4519
|
|
|
4325
4520
|
_UniffiConverterString.check_lower(path)
|
|
4326
4521
|
|
|
4327
4522
|
return await _uniffi_rust_call_async(
|
|
4328
4523
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_sign_ecdsa(
|
|
4329
4524
|
self._uniffi_clone_pointer(),
|
|
4330
|
-
|
|
4525
|
+
_UniffiConverterTypeMessageBytes.lower(message),
|
|
4331
4526
|
_UniffiConverterString.lower(path)
|
|
4332
4527
|
),
|
|
4333
4528
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
@@ -4343,26 +4538,28 @@ _UniffiConverterTypeSignerError,
|
|
|
4343
4538
|
|
|
4344
4539
|
|
|
4345
4540
|
|
|
4346
|
-
async def sign_ecdsa_recoverable(self, message: "
|
|
4541
|
+
async def sign_ecdsa_recoverable(self, message: "MessageBytes",path: "str") -> "RecoverableEcdsaSignatureBytes":
|
|
4347
4542
|
"""
|
|
4348
4543
|
Signs a message using recoverable ECDSA at the given derivation path.
|
|
4349
4544
|
|
|
4545
|
+
The message should be a 32-byte digest (typically a hash of the original data).
|
|
4546
|
+
|
|
4350
4547
|
# Arguments
|
|
4351
|
-
* `message` - The message to sign
|
|
4548
|
+
* `message` - The 32-byte message digest to sign
|
|
4352
4549
|
* `path` - BIP32 derivation path as a string
|
|
4353
4550
|
|
|
4354
4551
|
# Returns
|
|
4355
4552
|
65 bytes: recovery ID (31 + `recovery_id`) + 64-byte signature, or a `SignerError`
|
|
4356
4553
|
"""
|
|
4357
4554
|
|
|
4358
|
-
|
|
4555
|
+
_UniffiConverterTypeMessageBytes.check_lower(message)
|
|
4359
4556
|
|
|
4360
4557
|
_UniffiConverterString.check_lower(path)
|
|
4361
4558
|
|
|
4362
4559
|
return await _uniffi_rust_call_async(
|
|
4363
4560
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_sign_ecdsa_recoverable(
|
|
4364
4561
|
self._uniffi_clone_pointer(),
|
|
4365
|
-
|
|
4562
|
+
_UniffiConverterTypeMessageBytes.lower(message),
|
|
4366
4563
|
_UniffiConverterString.lower(path)
|
|
4367
4564
|
),
|
|
4368
4565
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
@@ -4378,7 +4575,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4378
4575
|
|
|
4379
4576
|
|
|
4380
4577
|
|
|
4381
|
-
async def
|
|
4578
|
+
async def encrypt_ecies(self, message: "bytes",path: "str") -> "bytes":
|
|
4382
4579
|
"""
|
|
4383
4580
|
Encrypts a message using ECIES at the given derivation path.
|
|
4384
4581
|
|
|
@@ -4395,7 +4592,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4395
4592
|
_UniffiConverterString.check_lower(path)
|
|
4396
4593
|
|
|
4397
4594
|
return await _uniffi_rust_call_async(
|
|
4398
|
-
_UniffiLib.
|
|
4595
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_encrypt_ecies(
|
|
4399
4596
|
self._uniffi_clone_pointer(),
|
|
4400
4597
|
_UniffiConverterBytes.lower(message),
|
|
4401
4598
|
_UniffiConverterString.lower(path)
|
|
@@ -4413,7 +4610,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4413
4610
|
|
|
4414
4611
|
|
|
4415
4612
|
|
|
4416
|
-
async def
|
|
4613
|
+
async def decrypt_ecies(self, message: "bytes",path: "str") -> "bytes":
|
|
4417
4614
|
"""
|
|
4418
4615
|
Decrypts a message using ECIES at the given derivation path.
|
|
4419
4616
|
|
|
@@ -4423,6 +4620,8 @@ _UniffiConverterTypeSignerError,
|
|
|
4423
4620
|
|
|
4424
4621
|
# Returns
|
|
4425
4622
|
Decrypted data, or a `SignerError`
|
|
4623
|
+
|
|
4624
|
+
See also: [JavaScript `decryptEcies`](https://docs.spark.money/wallets/spark-signer#decrypt-ecies)
|
|
4426
4625
|
"""
|
|
4427
4626
|
|
|
4428
4627
|
_UniffiConverterBytes.check_lower(message)
|
|
@@ -4430,7 +4629,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4430
4629
|
_UniffiConverterString.check_lower(path)
|
|
4431
4630
|
|
|
4432
4631
|
return await _uniffi_rust_call_async(
|
|
4433
|
-
_UniffiLib.
|
|
4632
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_decrypt_ecies(
|
|
4434
4633
|
self._uniffi_clone_pointer(),
|
|
4435
4634
|
_UniffiConverterBytes.lower(message),
|
|
4436
4635
|
_UniffiConverterString.lower(path)
|
|
@@ -4483,16 +4682,55 @@ _UniffiConverterTypeSignerError,
|
|
|
4483
4682
|
|
|
4484
4683
|
|
|
4485
4684
|
|
|
4486
|
-
async def
|
|
4685
|
+
async def hmac_sha256(self, message: "bytes",path: "str") -> "HashedMessageBytes":
|
|
4686
|
+
"""
|
|
4687
|
+
HMAC-SHA256 of a message at the given derivation path.
|
|
4688
|
+
|
|
4689
|
+
# Arguments
|
|
4690
|
+
* `message` - The message to hash
|
|
4691
|
+
* `path` - BIP32 derivation path as a string
|
|
4692
|
+
|
|
4693
|
+
# Returns
|
|
4694
|
+
32-byte HMAC-SHA256, or a `SignerError`
|
|
4695
|
+
|
|
4696
|
+
See also: [JavaScript `htlcHMAC`](https://docs.spark.money/wallets/spark-signer#generate-htlc-hmac)
|
|
4697
|
+
"""
|
|
4698
|
+
|
|
4699
|
+
_UniffiConverterBytes.check_lower(message)
|
|
4700
|
+
|
|
4701
|
+
_UniffiConverterString.check_lower(path)
|
|
4702
|
+
|
|
4703
|
+
return await _uniffi_rust_call_async(
|
|
4704
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_hmac_sha256(
|
|
4705
|
+
self._uniffi_clone_pointer(),
|
|
4706
|
+
_UniffiConverterBytes.lower(message),
|
|
4707
|
+
_UniffiConverterString.lower(path)
|
|
4708
|
+
),
|
|
4709
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
4710
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
4711
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
4712
|
+
# lift function
|
|
4713
|
+
_UniffiConverterTypeHashedMessageBytes.lift,
|
|
4714
|
+
|
|
4715
|
+
# Error FFI converter
|
|
4716
|
+
_UniffiConverterTypeSignerError,
|
|
4717
|
+
|
|
4718
|
+
)
|
|
4719
|
+
|
|
4720
|
+
|
|
4721
|
+
|
|
4722
|
+
async def generate_random_signing_commitment(self, ) -> "ExternalFrostCommitments":
|
|
4487
4723
|
"""
|
|
4488
4724
|
Generates Frost signing commitments for multi-party signing.
|
|
4489
4725
|
|
|
4490
4726
|
# Returns
|
|
4491
4727
|
Frost commitments with nonces, or a `SignerError`
|
|
4728
|
+
|
|
4729
|
+
See also: [JavaScript `getRandomSigningCommitment`](https://docs.spark.money/wallets/spark-signer#get-random-signing-commitment)
|
|
4492
4730
|
"""
|
|
4493
4731
|
|
|
4494
4732
|
return await _uniffi_rust_call_async(
|
|
4495
|
-
_UniffiLib.
|
|
4733
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_generate_random_signing_commitment(
|
|
4496
4734
|
self._uniffi_clone_pointer(),
|
|
4497
4735
|
),
|
|
4498
4736
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
@@ -4539,12 +4777,12 @@ _UniffiConverterTypeSignerError,
|
|
|
4539
4777
|
|
|
4540
4778
|
|
|
4541
4779
|
|
|
4542
|
-
async def generate_random_key(self, ) -> "
|
|
4780
|
+
async def generate_random_key(self, ) -> "ExternalSecretSource":
|
|
4543
4781
|
"""
|
|
4544
|
-
Generates a random
|
|
4782
|
+
Generates a random secret.
|
|
4545
4783
|
|
|
4546
4784
|
# Returns
|
|
4547
|
-
A randomly generated
|
|
4785
|
+
A randomly generated secret source, or an error string
|
|
4548
4786
|
"""
|
|
4549
4787
|
|
|
4550
4788
|
return await _uniffi_rust_call_async(
|
|
@@ -4555,7 +4793,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4555
4793
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
4556
4794
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
4557
4795
|
# lift function
|
|
4558
|
-
|
|
4796
|
+
_UniffiConverterTypeExternalSecretSource.lift,
|
|
4559
4797
|
|
|
4560
4798
|
# Error FFI converter
|
|
4561
4799
|
_UniffiConverterTypeSignerError,
|
|
@@ -4564,21 +4802,23 @@ _UniffiConverterTypeSignerError,
|
|
|
4564
4802
|
|
|
4565
4803
|
|
|
4566
4804
|
|
|
4567
|
-
async def
|
|
4805
|
+
async def static_deposit_secret_encrypted(self, index: "int") -> "ExternalSecretSource":
|
|
4568
4806
|
"""
|
|
4569
|
-
Gets
|
|
4807
|
+
Gets an encrypted static deposit secret by index.
|
|
4570
4808
|
|
|
4571
4809
|
# Arguments
|
|
4572
4810
|
* `index` - The index of the static deposit key
|
|
4573
4811
|
|
|
4574
4812
|
# Returns
|
|
4575
|
-
The
|
|
4813
|
+
The encrypted secret source, or an error string
|
|
4814
|
+
|
|
4815
|
+
This is the encrypted version of: [JavaScript `getStaticDepositSecretKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-secret-key)
|
|
4576
4816
|
"""
|
|
4577
4817
|
|
|
4578
4818
|
_UniffiConverterUInt32.check_lower(index)
|
|
4579
4819
|
|
|
4580
4820
|
return await _uniffi_rust_call_async(
|
|
4581
|
-
_UniffiLib.
|
|
4821
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_secret_encrypted(
|
|
4582
4822
|
self._uniffi_clone_pointer(),
|
|
4583
4823
|
_UniffiConverterUInt32.lower(index)
|
|
4584
4824
|
),
|
|
@@ -4586,7 +4826,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4586
4826
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
4587
4827
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
4588
4828
|
# lift function
|
|
4589
|
-
|
|
4829
|
+
_UniffiConverterTypeExternalSecretSource.lift,
|
|
4590
4830
|
|
|
4591
4831
|
# Error FFI converter
|
|
4592
4832
|
_UniffiConverterTypeSignerError,
|
|
@@ -4595,21 +4835,23 @@ _UniffiConverterTypeSignerError,
|
|
|
4595
4835
|
|
|
4596
4836
|
|
|
4597
4837
|
|
|
4598
|
-
async def
|
|
4838
|
+
async def static_deposit_secret(self, index: "int") -> "SecretBytes":
|
|
4599
4839
|
"""
|
|
4600
|
-
Gets a static deposit
|
|
4840
|
+
Gets a static deposit secret by index.
|
|
4601
4841
|
|
|
4602
4842
|
# Arguments
|
|
4603
4843
|
* `index` - The index of the static deposit key
|
|
4604
4844
|
|
|
4605
4845
|
# Returns
|
|
4606
|
-
The 32-byte
|
|
4846
|
+
The 32-byte secret, or an error string
|
|
4847
|
+
|
|
4848
|
+
See also: [JavaScript `getStaticDepositSecretKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-secret-key)
|
|
4607
4849
|
"""
|
|
4608
4850
|
|
|
4609
4851
|
_UniffiConverterUInt32.check_lower(index)
|
|
4610
4852
|
|
|
4611
4853
|
return await _uniffi_rust_call_async(
|
|
4612
|
-
_UniffiLib.
|
|
4854
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_secret(
|
|
4613
4855
|
self._uniffi_clone_pointer(),
|
|
4614
4856
|
_UniffiConverterUInt32.lower(index)
|
|
4615
4857
|
),
|
|
@@ -4617,7 +4859,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4617
4859
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
4618
4860
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
4619
4861
|
# lift function
|
|
4620
|
-
|
|
4862
|
+
_UniffiConverterTypeSecretBytes.lift,
|
|
4621
4863
|
|
|
4622
4864
|
# Error FFI converter
|
|
4623
4865
|
_UniffiConverterTypeSignerError,
|
|
@@ -4626,7 +4868,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4626
4868
|
|
|
4627
4869
|
|
|
4628
4870
|
|
|
4629
|
-
async def
|
|
4871
|
+
async def static_deposit_signing_key(self, index: "int") -> "PublicKeyBytes":
|
|
4630
4872
|
"""
|
|
4631
4873
|
Gets a static deposit public key by index.
|
|
4632
4874
|
|
|
@@ -4635,12 +4877,14 @@ _UniffiConverterTypeSignerError,
|
|
|
4635
4877
|
|
|
4636
4878
|
# Returns
|
|
4637
4879
|
The 33-byte public key, or an error string
|
|
4880
|
+
|
|
4881
|
+
See also: [JavaScript `getStaticDepositSigningKey`](https://docs.spark.money/wallets/spark-signer#get-static-deposit-signing-key)
|
|
4638
4882
|
"""
|
|
4639
4883
|
|
|
4640
4884
|
_UniffiConverterUInt32.check_lower(index)
|
|
4641
4885
|
|
|
4642
4886
|
return await _uniffi_rust_call_async(
|
|
4643
|
-
_UniffiLib.
|
|
4887
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_static_deposit_signing_key(
|
|
4644
4888
|
self._uniffi_clone_pointer(),
|
|
4645
4889
|
_UniffiConverterUInt32.lower(index)
|
|
4646
4890
|
),
|
|
@@ -4657,33 +4901,36 @@ _UniffiConverterTypeSignerError,
|
|
|
4657
4901
|
|
|
4658
4902
|
|
|
4659
4903
|
|
|
4660
|
-
async def
|
|
4904
|
+
async def subtract_secrets(self, signing_key: "ExternalSecretSource",new_signing_key: "ExternalSecretSource") -> "ExternalSecretSource":
|
|
4661
4905
|
"""
|
|
4662
|
-
Subtracts one
|
|
4906
|
+
Subtracts one secret from another.
|
|
4663
4907
|
|
|
4664
4908
|
# Arguments
|
|
4665
|
-
* `signing_key` - The first
|
|
4666
|
-
* `new_signing_key` - The second
|
|
4909
|
+
* `signing_key` - The first secret source
|
|
4910
|
+
* `new_signing_key` - The second secret source to subtract
|
|
4667
4911
|
|
|
4668
4912
|
# Returns
|
|
4669
|
-
The resulting
|
|
4913
|
+
The resulting secret source, or an error string
|
|
4914
|
+
|
|
4915
|
+
See also: [JavaScript `subtractSplitAndEncrypt`](https://docs.spark.money/wallets/spark-signer#subtract,-split,-and-encrypt)
|
|
4916
|
+
(this method provides the subtraction step of that higher-level operation)
|
|
4670
4917
|
"""
|
|
4671
4918
|
|
|
4672
|
-
|
|
4919
|
+
_UniffiConverterTypeExternalSecretSource.check_lower(signing_key)
|
|
4673
4920
|
|
|
4674
|
-
|
|
4921
|
+
_UniffiConverterTypeExternalSecretSource.check_lower(new_signing_key)
|
|
4675
4922
|
|
|
4676
4923
|
return await _uniffi_rust_call_async(
|
|
4677
|
-
_UniffiLib.
|
|
4924
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_subtract_secrets(
|
|
4678
4925
|
self._uniffi_clone_pointer(),
|
|
4679
|
-
|
|
4680
|
-
|
|
4926
|
+
_UniffiConverterTypeExternalSecretSource.lower(signing_key),
|
|
4927
|
+
_UniffiConverterTypeExternalSecretSource.lower(new_signing_key)
|
|
4681
4928
|
),
|
|
4682
4929
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
4683
4930
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
4684
4931
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
4685
4932
|
# lift function
|
|
4686
|
-
|
|
4933
|
+
_UniffiConverterTypeExternalSecretSource.lift,
|
|
4687
4934
|
|
|
4688
4935
|
# Error FFI converter
|
|
4689
4936
|
_UniffiConverterTypeSignerError,
|
|
@@ -4692,7 +4939,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4692
4939
|
|
|
4693
4940
|
|
|
4694
4941
|
|
|
4695
|
-
async def
|
|
4942
|
+
async def split_secret_with_proofs(self, secret: "ExternalSecretToSplit",threshold: "int",num_shares: "int") -> "typing.List[ExternalVerifiableSecretShare]":
|
|
4696
4943
|
"""
|
|
4697
4944
|
Splits a secret with proofs using Shamir's Secret Sharing.
|
|
4698
4945
|
|
|
@@ -4703,6 +4950,8 @@ _UniffiConverterTypeSignerError,
|
|
|
4703
4950
|
|
|
4704
4951
|
# Returns
|
|
4705
4952
|
Vector of verifiable secret shares, or an error string
|
|
4953
|
+
|
|
4954
|
+
See also: [JavaScript `splitSecretWithProofs`](https://docs.spark.money/wallets/spark-signer#split-secret-with-proofs)
|
|
4706
4955
|
"""
|
|
4707
4956
|
|
|
4708
4957
|
_UniffiConverterTypeExternalSecretToSplit.check_lower(secret)
|
|
@@ -4712,7 +4961,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4712
4961
|
_UniffiConverterUInt32.check_lower(num_shares)
|
|
4713
4962
|
|
|
4714
4963
|
return await _uniffi_rust_call_async(
|
|
4715
|
-
_UniffiLib.
|
|
4964
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_split_secret_with_proofs(
|
|
4716
4965
|
self._uniffi_clone_pointer(),
|
|
4717
4966
|
_UniffiConverterTypeExternalSecretToSplit.lower(secret),
|
|
4718
4967
|
_UniffiConverterUInt32.lower(threshold),
|
|
@@ -4731,26 +4980,26 @@ _UniffiConverterTypeSignerError,
|
|
|
4731
4980
|
|
|
4732
4981
|
|
|
4733
4982
|
|
|
4734
|
-
async def
|
|
4983
|
+
async def encrypt_secret_for_receiver(self, encrypted_secret: "ExternalEncryptedSecret",receiver_public_key: "PublicKeyBytes") -> "bytes":
|
|
4735
4984
|
"""
|
|
4736
|
-
Encrypts a
|
|
4985
|
+
Encrypts a secret for a specific receiver's public key.
|
|
4737
4986
|
|
|
4738
4987
|
# Arguments
|
|
4739
|
-
* `
|
|
4988
|
+
* `encrypted_secret` - The encrypted secret to re-encrypt
|
|
4740
4989
|
* `receiver_public_key` - The receiver's 33-byte public key
|
|
4741
4990
|
|
|
4742
4991
|
# Returns
|
|
4743
4992
|
Encrypted data for the receiver, or an error string
|
|
4744
4993
|
"""
|
|
4745
4994
|
|
|
4746
|
-
|
|
4995
|
+
_UniffiConverterTypeExternalEncryptedSecret.check_lower(encrypted_secret)
|
|
4747
4996
|
|
|
4748
4997
|
_UniffiConverterTypePublicKeyBytes.check_lower(receiver_public_key)
|
|
4749
4998
|
|
|
4750
4999
|
return await _uniffi_rust_call_async(
|
|
4751
|
-
_UniffiLib.
|
|
5000
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_encrypt_secret_for_receiver(
|
|
4752
5001
|
self._uniffi_clone_pointer(),
|
|
4753
|
-
|
|
5002
|
+
_UniffiConverterTypeExternalEncryptedSecret.lower(encrypted_secret),
|
|
4754
5003
|
_UniffiConverterTypePublicKeyBytes.lower(receiver_public_key)
|
|
4755
5004
|
),
|
|
4756
5005
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
@@ -4766,23 +5015,23 @@ _UniffiConverterTypeSignerError,
|
|
|
4766
5015
|
|
|
4767
5016
|
|
|
4768
5017
|
|
|
4769
|
-
async def
|
|
5018
|
+
async def public_key_from_secret(self, secret: "ExternalSecretSource") -> "PublicKeyBytes":
|
|
4770
5019
|
"""
|
|
4771
|
-
Gets the public key from a
|
|
5020
|
+
Gets the public key from a secret source.
|
|
4772
5021
|
|
|
4773
5022
|
# Arguments
|
|
4774
|
-
* `
|
|
5023
|
+
* `secret` - The secret source
|
|
4775
5024
|
|
|
4776
5025
|
# Returns
|
|
4777
5026
|
The corresponding 33-byte public key, or an error string
|
|
4778
5027
|
"""
|
|
4779
5028
|
|
|
4780
|
-
|
|
5029
|
+
_UniffiConverterTypeExternalSecretSource.check_lower(secret)
|
|
4781
5030
|
|
|
4782
5031
|
return await _uniffi_rust_call_async(
|
|
4783
|
-
_UniffiLib.
|
|
5032
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_public_key_from_secret(
|
|
4784
5033
|
self._uniffi_clone_pointer(),
|
|
4785
|
-
|
|
5034
|
+
_UniffiConverterTypeExternalSecretSource.lower(secret)
|
|
4786
5035
|
),
|
|
4787
5036
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
4788
5037
|
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
@@ -4806,6 +5055,8 @@ _UniffiConverterTypeSignerError,
|
|
|
4806
5055
|
|
|
4807
5056
|
# Returns
|
|
4808
5057
|
A signature share, or an error string
|
|
5058
|
+
|
|
5059
|
+
See also: [JavaScript `signFrost`](https://docs.spark.money/wallets/spark-signer#frost-signing)
|
|
4809
5060
|
"""
|
|
4810
5061
|
|
|
4811
5062
|
_UniffiConverterTypeExternalSignFrostRequest.check_lower(request)
|
|
@@ -4828,7 +5079,7 @@ _UniffiConverterTypeSignerError,
|
|
|
4828
5079
|
|
|
4829
5080
|
|
|
4830
5081
|
|
|
4831
|
-
async def
|
|
5082
|
+
async def aggregate_frost(self, request: "ExternalAggregateFrostRequest") -> "ExternalFrostSignature":
|
|
4832
5083
|
"""
|
|
4833
5084
|
Aggregates Frost signature shares into a final signature.
|
|
4834
5085
|
|
|
@@ -4837,12 +5088,14 @@ _UniffiConverterTypeSignerError,
|
|
|
4837
5088
|
|
|
4838
5089
|
# Returns
|
|
4839
5090
|
The aggregated Frost signature, or an error string
|
|
5091
|
+
|
|
5092
|
+
See also: [JavaScript `aggregateFrost`](https://docs.spark.money/wallets/spark-signer#aggregate-frost-signatures)
|
|
4840
5093
|
"""
|
|
4841
5094
|
|
|
4842
5095
|
_UniffiConverterTypeExternalAggregateFrostRequest.check_lower(request)
|
|
4843
5096
|
|
|
4844
5097
|
return await _uniffi_rust_call_async(
|
|
4845
|
-
_UniffiLib.
|
|
5098
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_externalsigner_aggregate_frost(
|
|
4846
5099
|
self._uniffi_clone_pointer(),
|
|
4847
5100
|
_UniffiConverterTypeExternalAggregateFrostRequest.lower(request)
|
|
4848
5101
|
),
|
|
@@ -4932,7 +5185,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
4932
5185
|
):
|
|
4933
5186
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
4934
5187
|
def make_call():
|
|
4935
|
-
args = (
|
|
5188
|
+
args = (_UniffiConverterTypeMessageBytes.lift(message), _UniffiConverterString.lift(path), )
|
|
4936
5189
|
method = uniffi_obj.sign_ecdsa
|
|
4937
5190
|
return method(*args)
|
|
4938
5191
|
|
|
@@ -4967,7 +5220,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
4967
5220
|
):
|
|
4968
5221
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
4969
5222
|
def make_call():
|
|
4970
|
-
args = (
|
|
5223
|
+
args = (_UniffiConverterTypeMessageBytes.lift(message), _UniffiConverterString.lift(path), )
|
|
4971
5224
|
method = uniffi_obj.sign_ecdsa_recoverable
|
|
4972
5225
|
return method(*args)
|
|
4973
5226
|
|
|
@@ -4992,7 +5245,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
4992
5245
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
4993
5246
|
|
|
4994
5247
|
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD4
|
|
4995
|
-
def
|
|
5248
|
+
def encrypt_ecies(
|
|
4996
5249
|
uniffi_handle,
|
|
4997
5250
|
message,
|
|
4998
5251
|
path,
|
|
@@ -5003,7 +5256,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5003
5256
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5004
5257
|
def make_call():
|
|
5005
5258
|
args = (_UniffiConverterBytes.lift(message), _UniffiConverterString.lift(path), )
|
|
5006
|
-
method = uniffi_obj.
|
|
5259
|
+
method = uniffi_obj.encrypt_ecies
|
|
5007
5260
|
return method(*args)
|
|
5008
5261
|
|
|
5009
5262
|
|
|
@@ -5027,7 +5280,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5027
5280
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5028
5281
|
|
|
5029
5282
|
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD5
|
|
5030
|
-
def
|
|
5283
|
+
def decrypt_ecies(
|
|
5031
5284
|
uniffi_handle,
|
|
5032
5285
|
message,
|
|
5033
5286
|
path,
|
|
@@ -5038,7 +5291,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5038
5291
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5039
5292
|
def make_call():
|
|
5040
5293
|
args = (_UniffiConverterBytes.lift(message), _UniffiConverterString.lift(path), )
|
|
5041
|
-
method = uniffi_obj.
|
|
5294
|
+
method = uniffi_obj.decrypt_ecies
|
|
5042
5295
|
return method(*args)
|
|
5043
5296
|
|
|
5044
5297
|
|
|
@@ -5097,7 +5350,42 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5097
5350
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5098
5351
|
|
|
5099
5352
|
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD7
|
|
5100
|
-
def
|
|
5353
|
+
def hmac_sha256(
|
|
5354
|
+
uniffi_handle,
|
|
5355
|
+
message,
|
|
5356
|
+
path,
|
|
5357
|
+
uniffi_future_callback,
|
|
5358
|
+
uniffi_callback_data,
|
|
5359
|
+
uniffi_out_return,
|
|
5360
|
+
):
|
|
5361
|
+
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5362
|
+
def make_call():
|
|
5363
|
+
args = (_UniffiConverterBytes.lift(message), _UniffiConverterString.lift(path), )
|
|
5364
|
+
method = uniffi_obj.hmac_sha256
|
|
5365
|
+
return method(*args)
|
|
5366
|
+
|
|
5367
|
+
|
|
5368
|
+
def handle_success(return_value):
|
|
5369
|
+
uniffi_future_callback(
|
|
5370
|
+
uniffi_callback_data,
|
|
5371
|
+
_UniffiForeignFutureStructRustBuffer(
|
|
5372
|
+
_UniffiConverterTypeHashedMessageBytes.lower(return_value),
|
|
5373
|
+
_UniffiRustCallStatus.default()
|
|
5374
|
+
)
|
|
5375
|
+
)
|
|
5376
|
+
|
|
5377
|
+
def handle_error(status_code, rust_buffer):
|
|
5378
|
+
uniffi_future_callback(
|
|
5379
|
+
uniffi_callback_data,
|
|
5380
|
+
_UniffiForeignFutureStructRustBuffer(
|
|
5381
|
+
_UniffiRustBuffer.default(),
|
|
5382
|
+
_UniffiRustCallStatus(status_code, rust_buffer),
|
|
5383
|
+
)
|
|
5384
|
+
)
|
|
5385
|
+
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5386
|
+
|
|
5387
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD8
|
|
5388
|
+
def generate_random_signing_commitment(
|
|
5101
5389
|
uniffi_handle,
|
|
5102
5390
|
uniffi_future_callback,
|
|
5103
5391
|
uniffi_callback_data,
|
|
@@ -5106,7 +5394,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5106
5394
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5107
5395
|
def make_call():
|
|
5108
5396
|
args = ()
|
|
5109
|
-
method = uniffi_obj.
|
|
5397
|
+
method = uniffi_obj.generate_random_signing_commitment
|
|
5110
5398
|
return method(*args)
|
|
5111
5399
|
|
|
5112
5400
|
|
|
@@ -5129,7 +5417,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5129
5417
|
)
|
|
5130
5418
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5131
5419
|
|
|
5132
|
-
@
|
|
5420
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD9
|
|
5133
5421
|
def get_public_key_for_node(
|
|
5134
5422
|
uniffi_handle,
|
|
5135
5423
|
id,
|
|
@@ -5163,7 +5451,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5163
5451
|
)
|
|
5164
5452
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5165
5453
|
|
|
5166
|
-
@
|
|
5454
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD10
|
|
5167
5455
|
def generate_random_key(
|
|
5168
5456
|
uniffi_handle,
|
|
5169
5457
|
uniffi_future_callback,
|
|
@@ -5181,7 +5469,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5181
5469
|
uniffi_future_callback(
|
|
5182
5470
|
uniffi_callback_data,
|
|
5183
5471
|
_UniffiForeignFutureStructRustBuffer(
|
|
5184
|
-
|
|
5472
|
+
_UniffiConverterTypeExternalSecretSource.lower(return_value),
|
|
5185
5473
|
_UniffiRustCallStatus.default()
|
|
5186
5474
|
)
|
|
5187
5475
|
)
|
|
@@ -5196,8 +5484,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5196
5484
|
)
|
|
5197
5485
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5198
5486
|
|
|
5199
|
-
@
|
|
5200
|
-
def
|
|
5487
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD11
|
|
5488
|
+
def static_deposit_secret_encrypted(
|
|
5201
5489
|
uniffi_handle,
|
|
5202
5490
|
index,
|
|
5203
5491
|
uniffi_future_callback,
|
|
@@ -5207,7 +5495,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5207
5495
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5208
5496
|
def make_call():
|
|
5209
5497
|
args = (_UniffiConverterUInt32.lift(index), )
|
|
5210
|
-
method = uniffi_obj.
|
|
5498
|
+
method = uniffi_obj.static_deposit_secret_encrypted
|
|
5211
5499
|
return method(*args)
|
|
5212
5500
|
|
|
5213
5501
|
|
|
@@ -5215,7 +5503,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5215
5503
|
uniffi_future_callback(
|
|
5216
5504
|
uniffi_callback_data,
|
|
5217
5505
|
_UniffiForeignFutureStructRustBuffer(
|
|
5218
|
-
|
|
5506
|
+
_UniffiConverterTypeExternalSecretSource.lower(return_value),
|
|
5219
5507
|
_UniffiRustCallStatus.default()
|
|
5220
5508
|
)
|
|
5221
5509
|
)
|
|
@@ -5230,8 +5518,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5230
5518
|
)
|
|
5231
5519
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5232
5520
|
|
|
5233
|
-
@
|
|
5234
|
-
def
|
|
5521
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD12
|
|
5522
|
+
def static_deposit_secret(
|
|
5235
5523
|
uniffi_handle,
|
|
5236
5524
|
index,
|
|
5237
5525
|
uniffi_future_callback,
|
|
@@ -5241,7 +5529,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5241
5529
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5242
5530
|
def make_call():
|
|
5243
5531
|
args = (_UniffiConverterUInt32.lift(index), )
|
|
5244
|
-
method = uniffi_obj.
|
|
5532
|
+
method = uniffi_obj.static_deposit_secret
|
|
5245
5533
|
return method(*args)
|
|
5246
5534
|
|
|
5247
5535
|
|
|
@@ -5249,7 +5537,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5249
5537
|
uniffi_future_callback(
|
|
5250
5538
|
uniffi_callback_data,
|
|
5251
5539
|
_UniffiForeignFutureStructRustBuffer(
|
|
5252
|
-
|
|
5540
|
+
_UniffiConverterTypeSecretBytes.lower(return_value),
|
|
5253
5541
|
_UniffiRustCallStatus.default()
|
|
5254
5542
|
)
|
|
5255
5543
|
)
|
|
@@ -5264,8 +5552,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5264
5552
|
)
|
|
5265
5553
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5266
5554
|
|
|
5267
|
-
@
|
|
5268
|
-
def
|
|
5555
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD13
|
|
5556
|
+
def static_deposit_signing_key(
|
|
5269
5557
|
uniffi_handle,
|
|
5270
5558
|
index,
|
|
5271
5559
|
uniffi_future_callback,
|
|
@@ -5275,7 +5563,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5275
5563
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5276
5564
|
def make_call():
|
|
5277
5565
|
args = (_UniffiConverterUInt32.lift(index), )
|
|
5278
|
-
method = uniffi_obj.
|
|
5566
|
+
method = uniffi_obj.static_deposit_signing_key
|
|
5279
5567
|
return method(*args)
|
|
5280
5568
|
|
|
5281
5569
|
|
|
@@ -5298,8 +5586,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5298
5586
|
)
|
|
5299
5587
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5300
5588
|
|
|
5301
|
-
@
|
|
5302
|
-
def
|
|
5589
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD14
|
|
5590
|
+
def subtract_secrets(
|
|
5303
5591
|
uniffi_handle,
|
|
5304
5592
|
signing_key,
|
|
5305
5593
|
new_signing_key,
|
|
@@ -5309,8 +5597,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5309
5597
|
):
|
|
5310
5598
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5311
5599
|
def make_call():
|
|
5312
|
-
args = (
|
|
5313
|
-
method = uniffi_obj.
|
|
5600
|
+
args = (_UniffiConverterTypeExternalSecretSource.lift(signing_key), _UniffiConverterTypeExternalSecretSource.lift(new_signing_key), )
|
|
5601
|
+
method = uniffi_obj.subtract_secrets
|
|
5314
5602
|
return method(*args)
|
|
5315
5603
|
|
|
5316
5604
|
|
|
@@ -5318,7 +5606,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5318
5606
|
uniffi_future_callback(
|
|
5319
5607
|
uniffi_callback_data,
|
|
5320
5608
|
_UniffiForeignFutureStructRustBuffer(
|
|
5321
|
-
|
|
5609
|
+
_UniffiConverterTypeExternalSecretSource.lower(return_value),
|
|
5322
5610
|
_UniffiRustCallStatus.default()
|
|
5323
5611
|
)
|
|
5324
5612
|
)
|
|
@@ -5333,8 +5621,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5333
5621
|
)
|
|
5334
5622
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5335
5623
|
|
|
5336
|
-
@
|
|
5337
|
-
def
|
|
5624
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD15
|
|
5625
|
+
def split_secret_with_proofs(
|
|
5338
5626
|
uniffi_handle,
|
|
5339
5627
|
secret,
|
|
5340
5628
|
threshold,
|
|
@@ -5346,7 +5634,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5346
5634
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5347
5635
|
def make_call():
|
|
5348
5636
|
args = (_UniffiConverterTypeExternalSecretToSplit.lift(secret), _UniffiConverterUInt32.lift(threshold), _UniffiConverterUInt32.lift(num_shares), )
|
|
5349
|
-
method = uniffi_obj.
|
|
5637
|
+
method = uniffi_obj.split_secret_with_proofs
|
|
5350
5638
|
return method(*args)
|
|
5351
5639
|
|
|
5352
5640
|
|
|
@@ -5369,10 +5657,10 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5369
5657
|
)
|
|
5370
5658
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5371
5659
|
|
|
5372
|
-
@
|
|
5373
|
-
def
|
|
5660
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD16
|
|
5661
|
+
def encrypt_secret_for_receiver(
|
|
5374
5662
|
uniffi_handle,
|
|
5375
|
-
|
|
5663
|
+
encrypted_secret,
|
|
5376
5664
|
receiver_public_key,
|
|
5377
5665
|
uniffi_future_callback,
|
|
5378
5666
|
uniffi_callback_data,
|
|
@@ -5380,8 +5668,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5380
5668
|
):
|
|
5381
5669
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5382
5670
|
def make_call():
|
|
5383
|
-
args = (
|
|
5384
|
-
method = uniffi_obj.
|
|
5671
|
+
args = (_UniffiConverterTypeExternalEncryptedSecret.lift(encrypted_secret), _UniffiConverterTypePublicKeyBytes.lift(receiver_public_key), )
|
|
5672
|
+
method = uniffi_obj.encrypt_secret_for_receiver
|
|
5385
5673
|
return method(*args)
|
|
5386
5674
|
|
|
5387
5675
|
|
|
@@ -5404,18 +5692,18 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5404
5692
|
)
|
|
5405
5693
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5406
5694
|
|
|
5407
|
-
@
|
|
5408
|
-
def
|
|
5695
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD17
|
|
5696
|
+
def public_key_from_secret(
|
|
5409
5697
|
uniffi_handle,
|
|
5410
|
-
|
|
5698
|
+
secret,
|
|
5411
5699
|
uniffi_future_callback,
|
|
5412
5700
|
uniffi_callback_data,
|
|
5413
5701
|
uniffi_out_return,
|
|
5414
5702
|
):
|
|
5415
5703
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5416
5704
|
def make_call():
|
|
5417
|
-
args = (
|
|
5418
|
-
method = uniffi_obj.
|
|
5705
|
+
args = (_UniffiConverterTypeExternalSecretSource.lift(secret), )
|
|
5706
|
+
method = uniffi_obj.public_key_from_secret
|
|
5419
5707
|
return method(*args)
|
|
5420
5708
|
|
|
5421
5709
|
|
|
@@ -5438,7 +5726,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5438
5726
|
)
|
|
5439
5727
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5440
5728
|
|
|
5441
|
-
@
|
|
5729
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD18
|
|
5442
5730
|
def sign_frost(
|
|
5443
5731
|
uniffi_handle,
|
|
5444
5732
|
request,
|
|
@@ -5472,8 +5760,8 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5472
5760
|
)
|
|
5473
5761
|
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, SignerError, _UniffiConverterTypeSignerError.lower)
|
|
5474
5762
|
|
|
5475
|
-
@
|
|
5476
|
-
def
|
|
5763
|
+
@_UNIFFI_CALLBACK_INTERFACE_EXTERNAL_SIGNER_METHOD19
|
|
5764
|
+
def aggregate_frost(
|
|
5477
5765
|
uniffi_handle,
|
|
5478
5766
|
request,
|
|
5479
5767
|
uniffi_future_callback,
|
|
@@ -5483,7 +5771,7 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5483
5771
|
uniffi_obj = _UniffiConverterTypeExternalSigner._handle_map.get(uniffi_handle)
|
|
5484
5772
|
def make_call():
|
|
5485
5773
|
args = (_UniffiConverterTypeExternalAggregateFrostRequest.lift(request), )
|
|
5486
|
-
method = uniffi_obj.
|
|
5774
|
+
method = uniffi_obj.aggregate_frost
|
|
5487
5775
|
return method(*args)
|
|
5488
5776
|
|
|
5489
5777
|
|
|
@@ -5516,21 +5804,22 @@ class _UniffiTraitImplExternalSigner:
|
|
|
5516
5804
|
derive_public_key,
|
|
5517
5805
|
sign_ecdsa,
|
|
5518
5806
|
sign_ecdsa_recoverable,
|
|
5519
|
-
|
|
5520
|
-
|
|
5807
|
+
encrypt_ecies,
|
|
5808
|
+
decrypt_ecies,
|
|
5521
5809
|
sign_hash_schnorr,
|
|
5522
|
-
|
|
5810
|
+
hmac_sha256,
|
|
5811
|
+
generate_random_signing_commitment,
|
|
5523
5812
|
get_public_key_for_node,
|
|
5524
5813
|
generate_random_key,
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5814
|
+
static_deposit_secret_encrypted,
|
|
5815
|
+
static_deposit_secret,
|
|
5816
|
+
static_deposit_signing_key,
|
|
5817
|
+
subtract_secrets,
|
|
5818
|
+
split_secret_with_proofs,
|
|
5819
|
+
encrypt_secret_for_receiver,
|
|
5820
|
+
public_key_from_secret,
|
|
5532
5821
|
sign_frost,
|
|
5533
|
-
|
|
5822
|
+
aggregate_frost,
|
|
5534
5823
|
_uniffi_free
|
|
5535
5824
|
)
|
|
5536
5825
|
# Send Rust a pointer to the VTable. Note: this means we need to keep the struct alive forever,
|
|
@@ -10119,68 +10408,280 @@ class _UniffiConverterTypeConnectWithSignerRequest(_UniffiConverterRustBuffer):
|
|
|
10119
10408
|
_UniffiConverterString.write(value.storage_dir, buf)
|
|
10120
10409
|
|
|
10121
10410
|
|
|
10122
|
-
class
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10411
|
+
class ConversionEstimate:
|
|
10412
|
+
"""
|
|
10413
|
+
Response from estimating a conversion, used when preparing a payment that requires conversion
|
|
10414
|
+
"""
|
|
10415
|
+
|
|
10416
|
+
options: "ConversionOptions"
|
|
10417
|
+
"""
|
|
10418
|
+
The conversion options used for the estimate
|
|
10419
|
+
"""
|
|
10420
|
+
|
|
10421
|
+
amount: "U128"
|
|
10422
|
+
"""
|
|
10423
|
+
The estimated amount to be received from the conversion
|
|
10424
|
+
Denominated in satoshis if converting from Bitcoin, otherwise in the token base units.
|
|
10425
|
+
"""
|
|
10426
|
+
|
|
10427
|
+
fee: "U128"
|
|
10428
|
+
"""
|
|
10429
|
+
The fee estimated for the conversion
|
|
10430
|
+
Denominated in satoshis if converting from Bitcoin, otherwise in the token base units.
|
|
10431
|
+
"""
|
|
10432
|
+
|
|
10433
|
+
def __init__(self, *, options: "ConversionOptions", amount: "U128", fee: "U128"):
|
|
10434
|
+
self.options = options
|
|
10435
|
+
self.amount = amount
|
|
10436
|
+
self.fee = fee
|
|
10134
10437
|
|
|
10135
10438
|
def __str__(self):
|
|
10136
|
-
return "
|
|
10439
|
+
return "ConversionEstimate(options={}, amount={}, fee={})".format(self.options, self.amount, self.fee)
|
|
10137
10440
|
|
|
10138
10441
|
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:
|
|
10442
|
+
if self.options != other.options:
|
|
10144
10443
|
return False
|
|
10145
|
-
if self.
|
|
10444
|
+
if self.amount != other.amount:
|
|
10146
10445
|
return False
|
|
10147
|
-
if self.
|
|
10446
|
+
if self.fee != other.fee:
|
|
10148
10447
|
return False
|
|
10149
10448
|
return True
|
|
10150
10449
|
|
|
10151
|
-
class
|
|
10450
|
+
class _UniffiConverterTypeConversionEstimate(_UniffiConverterRustBuffer):
|
|
10152
10451
|
@staticmethod
|
|
10153
10452
|
def read(buf):
|
|
10154
|
-
return
|
|
10155
|
-
|
|
10156
|
-
|
|
10157
|
-
|
|
10158
|
-
is_freezable=_UniffiConverterBool.read(buf),
|
|
10159
|
-
max_supply=_UniffiConverterTypeU128.read(buf),
|
|
10453
|
+
return ConversionEstimate(
|
|
10454
|
+
options=_UniffiConverterTypeConversionOptions.read(buf),
|
|
10455
|
+
amount=_UniffiConverterTypeU128.read(buf),
|
|
10456
|
+
fee=_UniffiConverterTypeU128.read(buf),
|
|
10160
10457
|
)
|
|
10161
10458
|
|
|
10162
10459
|
@staticmethod
|
|
10163
10460
|
def check_lower(value):
|
|
10164
|
-
|
|
10165
|
-
|
|
10166
|
-
|
|
10167
|
-
_UniffiConverterBool.check_lower(value.is_freezable)
|
|
10168
|
-
_UniffiConverterTypeU128.check_lower(value.max_supply)
|
|
10461
|
+
_UniffiConverterTypeConversionOptions.check_lower(value.options)
|
|
10462
|
+
_UniffiConverterTypeU128.check_lower(value.amount)
|
|
10463
|
+
_UniffiConverterTypeU128.check_lower(value.fee)
|
|
10169
10464
|
|
|
10170
10465
|
@staticmethod
|
|
10171
10466
|
def write(value, buf):
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
_UniffiConverterBool.write(value.is_freezable, buf)
|
|
10176
|
-
_UniffiConverterTypeU128.write(value.max_supply, buf)
|
|
10467
|
+
_UniffiConverterTypeConversionOptions.write(value.options, buf)
|
|
10468
|
+
_UniffiConverterTypeU128.write(value.amount, buf)
|
|
10469
|
+
_UniffiConverterTypeU128.write(value.fee, buf)
|
|
10177
10470
|
|
|
10178
10471
|
|
|
10179
|
-
class
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
|
|
10183
|
-
|
|
10472
|
+
class ConversionInfo:
|
|
10473
|
+
pool_id: "str"
|
|
10474
|
+
"""
|
|
10475
|
+
The pool id associated with the conversion
|
|
10476
|
+
"""
|
|
10477
|
+
|
|
10478
|
+
conversion_id: "str"
|
|
10479
|
+
"""
|
|
10480
|
+
The conversion id shared by both sides of the conversion
|
|
10481
|
+
"""
|
|
10482
|
+
|
|
10483
|
+
status: "ConversionStatus"
|
|
10484
|
+
"""
|
|
10485
|
+
The status of the conversion
|
|
10486
|
+
"""
|
|
10487
|
+
|
|
10488
|
+
fee: "typing.Optional[U128]"
|
|
10489
|
+
"""
|
|
10490
|
+
The fee paid for the conversion
|
|
10491
|
+
Denominated in satoshis if converting from Bitcoin, otherwise in the token base units.
|
|
10492
|
+
"""
|
|
10493
|
+
|
|
10494
|
+
purpose: "typing.Optional[ConversionPurpose]"
|
|
10495
|
+
"""
|
|
10496
|
+
The purpose of the conversion
|
|
10497
|
+
"""
|
|
10498
|
+
|
|
10499
|
+
def __init__(self, *, pool_id: "str", conversion_id: "str", status: "ConversionStatus", fee: "typing.Optional[U128]", purpose: "typing.Optional[ConversionPurpose]"):
|
|
10500
|
+
self.pool_id = pool_id
|
|
10501
|
+
self.conversion_id = conversion_id
|
|
10502
|
+
self.status = status
|
|
10503
|
+
self.fee = fee
|
|
10504
|
+
self.purpose = purpose
|
|
10505
|
+
|
|
10506
|
+
def __str__(self):
|
|
10507
|
+
return "ConversionInfo(pool_id={}, conversion_id={}, status={}, fee={}, purpose={})".format(self.pool_id, self.conversion_id, self.status, self.fee, self.purpose)
|
|
10508
|
+
|
|
10509
|
+
def __eq__(self, other):
|
|
10510
|
+
if self.pool_id != other.pool_id:
|
|
10511
|
+
return False
|
|
10512
|
+
if self.conversion_id != other.conversion_id:
|
|
10513
|
+
return False
|
|
10514
|
+
if self.status != other.status:
|
|
10515
|
+
return False
|
|
10516
|
+
if self.fee != other.fee:
|
|
10517
|
+
return False
|
|
10518
|
+
if self.purpose != other.purpose:
|
|
10519
|
+
return False
|
|
10520
|
+
return True
|
|
10521
|
+
|
|
10522
|
+
class _UniffiConverterTypeConversionInfo(_UniffiConverterRustBuffer):
|
|
10523
|
+
@staticmethod
|
|
10524
|
+
def read(buf):
|
|
10525
|
+
return ConversionInfo(
|
|
10526
|
+
pool_id=_UniffiConverterString.read(buf),
|
|
10527
|
+
conversion_id=_UniffiConverterString.read(buf),
|
|
10528
|
+
status=_UniffiConverterTypeConversionStatus.read(buf),
|
|
10529
|
+
fee=_UniffiConverterOptionalTypeU128.read(buf),
|
|
10530
|
+
purpose=_UniffiConverterOptionalTypeConversionPurpose.read(buf),
|
|
10531
|
+
)
|
|
10532
|
+
|
|
10533
|
+
@staticmethod
|
|
10534
|
+
def check_lower(value):
|
|
10535
|
+
_UniffiConverterString.check_lower(value.pool_id)
|
|
10536
|
+
_UniffiConverterString.check_lower(value.conversion_id)
|
|
10537
|
+
_UniffiConverterTypeConversionStatus.check_lower(value.status)
|
|
10538
|
+
_UniffiConverterOptionalTypeU128.check_lower(value.fee)
|
|
10539
|
+
_UniffiConverterOptionalTypeConversionPurpose.check_lower(value.purpose)
|
|
10540
|
+
|
|
10541
|
+
@staticmethod
|
|
10542
|
+
def write(value, buf):
|
|
10543
|
+
_UniffiConverterString.write(value.pool_id, buf)
|
|
10544
|
+
_UniffiConverterString.write(value.conversion_id, buf)
|
|
10545
|
+
_UniffiConverterTypeConversionStatus.write(value.status, buf)
|
|
10546
|
+
_UniffiConverterOptionalTypeU128.write(value.fee, buf)
|
|
10547
|
+
_UniffiConverterOptionalTypeConversionPurpose.write(value.purpose, buf)
|
|
10548
|
+
|
|
10549
|
+
|
|
10550
|
+
class ConversionOptions:
|
|
10551
|
+
"""
|
|
10552
|
+
Options for conversion when fulfilling a payment. When set, the SDK will
|
|
10553
|
+
perform a conversion before fulfilling the payment. If not set, the payment
|
|
10554
|
+
will only be fulfilled if the wallet has sufficient balance of the required asset.
|
|
10555
|
+
"""
|
|
10556
|
+
|
|
10557
|
+
conversion_type: "ConversionType"
|
|
10558
|
+
"""
|
|
10559
|
+
The type of conversion to perform when fulfilling the payment
|
|
10560
|
+
"""
|
|
10561
|
+
|
|
10562
|
+
max_slippage_bps: "typing.Optional[int]"
|
|
10563
|
+
"""
|
|
10564
|
+
The optional maximum slippage in basis points (1/100 of a percent) allowed when
|
|
10565
|
+
a conversion is needed to fulfill the payment. Defaults to 50 bps (0.5%) if not set.
|
|
10566
|
+
The conversion will fail if the actual amount received is less than
|
|
10567
|
+
`estimated_amount * (1 - max_slippage_bps / 10_000)`.
|
|
10568
|
+
"""
|
|
10569
|
+
|
|
10570
|
+
completion_timeout_secs: "typing.Optional[int]"
|
|
10571
|
+
"""
|
|
10572
|
+
The optional timeout in seconds to wait for the conversion to complete
|
|
10573
|
+
when fulfilling the payment. This timeout only concerns waiting for the received
|
|
10574
|
+
payment of the conversion. If the timeout is reached before the conversion
|
|
10575
|
+
is complete, the payment will fail. Defaults to 30 seconds if not set.
|
|
10576
|
+
"""
|
|
10577
|
+
|
|
10578
|
+
def __init__(self, *, conversion_type: "ConversionType", max_slippage_bps: "typing.Optional[int]" = _DEFAULT, completion_timeout_secs: "typing.Optional[int]" = _DEFAULT):
|
|
10579
|
+
self.conversion_type = conversion_type
|
|
10580
|
+
if max_slippage_bps is _DEFAULT:
|
|
10581
|
+
self.max_slippage_bps = None
|
|
10582
|
+
else:
|
|
10583
|
+
self.max_slippage_bps = max_slippage_bps
|
|
10584
|
+
if completion_timeout_secs is _DEFAULT:
|
|
10585
|
+
self.completion_timeout_secs = None
|
|
10586
|
+
else:
|
|
10587
|
+
self.completion_timeout_secs = completion_timeout_secs
|
|
10588
|
+
|
|
10589
|
+
def __str__(self):
|
|
10590
|
+
return "ConversionOptions(conversion_type={}, max_slippage_bps={}, completion_timeout_secs={})".format(self.conversion_type, self.max_slippage_bps, self.completion_timeout_secs)
|
|
10591
|
+
|
|
10592
|
+
def __eq__(self, other):
|
|
10593
|
+
if self.conversion_type != other.conversion_type:
|
|
10594
|
+
return False
|
|
10595
|
+
if self.max_slippage_bps != other.max_slippage_bps:
|
|
10596
|
+
return False
|
|
10597
|
+
if self.completion_timeout_secs != other.completion_timeout_secs:
|
|
10598
|
+
return False
|
|
10599
|
+
return True
|
|
10600
|
+
|
|
10601
|
+
class _UniffiConverterTypeConversionOptions(_UniffiConverterRustBuffer):
|
|
10602
|
+
@staticmethod
|
|
10603
|
+
def read(buf):
|
|
10604
|
+
return ConversionOptions(
|
|
10605
|
+
conversion_type=_UniffiConverterTypeConversionType.read(buf),
|
|
10606
|
+
max_slippage_bps=_UniffiConverterOptionalUInt32.read(buf),
|
|
10607
|
+
completion_timeout_secs=_UniffiConverterOptionalUInt32.read(buf),
|
|
10608
|
+
)
|
|
10609
|
+
|
|
10610
|
+
@staticmethod
|
|
10611
|
+
def check_lower(value):
|
|
10612
|
+
_UniffiConverterTypeConversionType.check_lower(value.conversion_type)
|
|
10613
|
+
_UniffiConverterOptionalUInt32.check_lower(value.max_slippage_bps)
|
|
10614
|
+
_UniffiConverterOptionalUInt32.check_lower(value.completion_timeout_secs)
|
|
10615
|
+
|
|
10616
|
+
@staticmethod
|
|
10617
|
+
def write(value, buf):
|
|
10618
|
+
_UniffiConverterTypeConversionType.write(value.conversion_type, buf)
|
|
10619
|
+
_UniffiConverterOptionalUInt32.write(value.max_slippage_bps, buf)
|
|
10620
|
+
_UniffiConverterOptionalUInt32.write(value.completion_timeout_secs, buf)
|
|
10621
|
+
|
|
10622
|
+
|
|
10623
|
+
class CreateIssuerTokenRequest:
|
|
10624
|
+
name: "str"
|
|
10625
|
+
ticker: "str"
|
|
10626
|
+
decimals: "int"
|
|
10627
|
+
is_freezable: "bool"
|
|
10628
|
+
max_supply: "U128"
|
|
10629
|
+
def __init__(self, *, name: "str", ticker: "str", decimals: "int", is_freezable: "bool", max_supply: "U128"):
|
|
10630
|
+
self.name = name
|
|
10631
|
+
self.ticker = ticker
|
|
10632
|
+
self.decimals = decimals
|
|
10633
|
+
self.is_freezable = is_freezable
|
|
10634
|
+
self.max_supply = max_supply
|
|
10635
|
+
|
|
10636
|
+
def __str__(self):
|
|
10637
|
+
return "CreateIssuerTokenRequest(name={}, ticker={}, decimals={}, is_freezable={}, max_supply={})".format(self.name, self.ticker, self.decimals, self.is_freezable, self.max_supply)
|
|
10638
|
+
|
|
10639
|
+
def __eq__(self, other):
|
|
10640
|
+
if self.name != other.name:
|
|
10641
|
+
return False
|
|
10642
|
+
if self.ticker != other.ticker:
|
|
10643
|
+
return False
|
|
10644
|
+
if self.decimals != other.decimals:
|
|
10645
|
+
return False
|
|
10646
|
+
if self.is_freezable != other.is_freezable:
|
|
10647
|
+
return False
|
|
10648
|
+
if self.max_supply != other.max_supply:
|
|
10649
|
+
return False
|
|
10650
|
+
return True
|
|
10651
|
+
|
|
10652
|
+
class _UniffiConverterTypeCreateIssuerTokenRequest(_UniffiConverterRustBuffer):
|
|
10653
|
+
@staticmethod
|
|
10654
|
+
def read(buf):
|
|
10655
|
+
return CreateIssuerTokenRequest(
|
|
10656
|
+
name=_UniffiConverterString.read(buf),
|
|
10657
|
+
ticker=_UniffiConverterString.read(buf),
|
|
10658
|
+
decimals=_UniffiConverterUInt32.read(buf),
|
|
10659
|
+
is_freezable=_UniffiConverterBool.read(buf),
|
|
10660
|
+
max_supply=_UniffiConverterTypeU128.read(buf),
|
|
10661
|
+
)
|
|
10662
|
+
|
|
10663
|
+
@staticmethod
|
|
10664
|
+
def check_lower(value):
|
|
10665
|
+
_UniffiConverterString.check_lower(value.name)
|
|
10666
|
+
_UniffiConverterString.check_lower(value.ticker)
|
|
10667
|
+
_UniffiConverterUInt32.check_lower(value.decimals)
|
|
10668
|
+
_UniffiConverterBool.check_lower(value.is_freezable)
|
|
10669
|
+
_UniffiConverterTypeU128.check_lower(value.max_supply)
|
|
10670
|
+
|
|
10671
|
+
@staticmethod
|
|
10672
|
+
def write(value, buf):
|
|
10673
|
+
_UniffiConverterString.write(value.name, buf)
|
|
10674
|
+
_UniffiConverterString.write(value.ticker, buf)
|
|
10675
|
+
_UniffiConverterUInt32.write(value.decimals, buf)
|
|
10676
|
+
_UniffiConverterBool.write(value.is_freezable, buf)
|
|
10677
|
+
_UniffiConverterTypeU128.write(value.max_supply, buf)
|
|
10678
|
+
|
|
10679
|
+
|
|
10680
|
+
class Credentials:
|
|
10681
|
+
username: "str"
|
|
10682
|
+
password: "str"
|
|
10683
|
+
def __init__(self, *, username: "str", password: "str"):
|
|
10684
|
+
self.username = username
|
|
10184
10685
|
self.password = password
|
|
10185
10686
|
|
|
10186
10687
|
def __str__(self):
|
|
@@ -10509,9 +11010,9 @@ class _UniffiConverterTypeExternalAggregateFrostRequest(_UniffiConverterRustBuff
|
|
|
10509
11010
|
_UniffiConverterOptionalBytes.write(value.adaptor_public_key, buf)
|
|
10510
11011
|
|
|
10511
11012
|
|
|
10512
|
-
class
|
|
11013
|
+
class ExternalEncryptedSecret:
|
|
10513
11014
|
"""
|
|
10514
|
-
FFI-safe representation of `spark_wallet::
|
|
11015
|
+
FFI-safe representation of `spark_wallet::EncryptedSecret`
|
|
10515
11016
|
"""
|
|
10516
11017
|
|
|
10517
11018
|
ciphertext: "bytes"
|
|
@@ -10523,17 +11024,17 @@ class ExternalEncryptedPrivateKey:
|
|
|
10523
11024
|
self.ciphertext = ciphertext
|
|
10524
11025
|
|
|
10525
11026
|
def __str__(self):
|
|
10526
|
-
return "
|
|
11027
|
+
return "ExternalEncryptedSecret(ciphertext={})".format(self.ciphertext)
|
|
10527
11028
|
|
|
10528
11029
|
def __eq__(self, other):
|
|
10529
11030
|
if self.ciphertext != other.ciphertext:
|
|
10530
11031
|
return False
|
|
10531
11032
|
return True
|
|
10532
11033
|
|
|
10533
|
-
class
|
|
11034
|
+
class _UniffiConverterTypeExternalEncryptedSecret(_UniffiConverterRustBuffer):
|
|
10534
11035
|
@staticmethod
|
|
10535
11036
|
def read(buf):
|
|
10536
|
-
return
|
|
11037
|
+
return ExternalEncryptedSecret(
|
|
10537
11038
|
ciphertext=_UniffiConverterBytes.read(buf),
|
|
10538
11039
|
)
|
|
10539
11040
|
|
|
@@ -10887,7 +11388,7 @@ class ExternalSignFrostRequest:
|
|
|
10887
11388
|
The public key (33 bytes compressed)
|
|
10888
11389
|
"""
|
|
10889
11390
|
|
|
10890
|
-
|
|
11391
|
+
secret: "ExternalSecretSource"
|
|
10891
11392
|
"""
|
|
10892
11393
|
The private key source
|
|
10893
11394
|
"""
|
|
@@ -10912,24 +11413,24 @@ class ExternalSignFrostRequest:
|
|
|
10912
11413
|
Optional adaptor public key (33 bytes compressed)
|
|
10913
11414
|
"""
|
|
10914
11415
|
|
|
10915
|
-
def __init__(self, *, message: "bytes", public_key: "bytes",
|
|
11416
|
+
def __init__(self, *, message: "bytes", public_key: "bytes", secret: "ExternalSecretSource", verifying_key: "bytes", self_nonce_commitment: "ExternalFrostCommitments", statechain_commitments: "typing.List[IdentifierCommitmentPair]", adaptor_public_key: "typing.Optional[bytes]"):
|
|
10916
11417
|
self.message = message
|
|
10917
11418
|
self.public_key = public_key
|
|
10918
|
-
self.
|
|
11419
|
+
self.secret = secret
|
|
10919
11420
|
self.verifying_key = verifying_key
|
|
10920
11421
|
self.self_nonce_commitment = self_nonce_commitment
|
|
10921
11422
|
self.statechain_commitments = statechain_commitments
|
|
10922
11423
|
self.adaptor_public_key = adaptor_public_key
|
|
10923
11424
|
|
|
10924
11425
|
def __str__(self):
|
|
10925
|
-
return "ExternalSignFrostRequest(message={}, public_key={},
|
|
11426
|
+
return "ExternalSignFrostRequest(message={}, public_key={}, secret={}, verifying_key={}, self_nonce_commitment={}, statechain_commitments={}, adaptor_public_key={})".format(self.message, self.public_key, self.secret, self.verifying_key, self.self_nonce_commitment, self.statechain_commitments, self.adaptor_public_key)
|
|
10926
11427
|
|
|
10927
11428
|
def __eq__(self, other):
|
|
10928
11429
|
if self.message != other.message:
|
|
10929
11430
|
return False
|
|
10930
11431
|
if self.public_key != other.public_key:
|
|
10931
11432
|
return False
|
|
10932
|
-
if self.
|
|
11433
|
+
if self.secret != other.secret:
|
|
10933
11434
|
return False
|
|
10934
11435
|
if self.verifying_key != other.verifying_key:
|
|
10935
11436
|
return False
|
|
@@ -10947,7 +11448,7 @@ class _UniffiConverterTypeExternalSignFrostRequest(_UniffiConverterRustBuffer):
|
|
|
10947
11448
|
return ExternalSignFrostRequest(
|
|
10948
11449
|
message=_UniffiConverterBytes.read(buf),
|
|
10949
11450
|
public_key=_UniffiConverterBytes.read(buf),
|
|
10950
|
-
|
|
11451
|
+
secret=_UniffiConverterTypeExternalSecretSource.read(buf),
|
|
10951
11452
|
verifying_key=_UniffiConverterBytes.read(buf),
|
|
10952
11453
|
self_nonce_commitment=_UniffiConverterTypeExternalFrostCommitments.read(buf),
|
|
10953
11454
|
statechain_commitments=_UniffiConverterSequenceTypeIdentifierCommitmentPair.read(buf),
|
|
@@ -10958,7 +11459,7 @@ class _UniffiConverterTypeExternalSignFrostRequest(_UniffiConverterRustBuffer):
|
|
|
10958
11459
|
def check_lower(value):
|
|
10959
11460
|
_UniffiConverterBytes.check_lower(value.message)
|
|
10960
11461
|
_UniffiConverterBytes.check_lower(value.public_key)
|
|
10961
|
-
|
|
11462
|
+
_UniffiConverterTypeExternalSecretSource.check_lower(value.secret)
|
|
10962
11463
|
_UniffiConverterBytes.check_lower(value.verifying_key)
|
|
10963
11464
|
_UniffiConverterTypeExternalFrostCommitments.check_lower(value.self_nonce_commitment)
|
|
10964
11465
|
_UniffiConverterSequenceTypeIdentifierCommitmentPair.check_lower(value.statechain_commitments)
|
|
@@ -10968,7 +11469,7 @@ class _UniffiConverterTypeExternalSignFrostRequest(_UniffiConverterRustBuffer):
|
|
|
10968
11469
|
def write(value, buf):
|
|
10969
11470
|
_UniffiConverterBytes.write(value.message, buf)
|
|
10970
11471
|
_UniffiConverterBytes.write(value.public_key, buf)
|
|
10971
|
-
|
|
11472
|
+
_UniffiConverterTypeExternalSecretSource.write(value.secret, buf)
|
|
10972
11473
|
_UniffiConverterBytes.write(value.verifying_key, buf)
|
|
10973
11474
|
_UniffiConverterTypeExternalFrostCommitments.write(value.self_nonce_commitment, buf)
|
|
10974
11475
|
_UniffiConverterSequenceTypeIdentifierCommitmentPair.write(value.statechain_commitments, buf)
|
|
@@ -11108,8 +11609,8 @@ class _UniffiConverterTypeExternalVerifiableSecretShare(_UniffiConverterRustBuff
|
|
|
11108
11609
|
_UniffiConverterSequenceBytes.write(value.proofs, buf)
|
|
11109
11610
|
|
|
11110
11611
|
|
|
11111
|
-
class
|
|
11112
|
-
conversion_type: "
|
|
11612
|
+
class FetchConversionLimitsRequest:
|
|
11613
|
+
conversion_type: "ConversionType"
|
|
11113
11614
|
"""
|
|
11114
11615
|
The type of conversion, either from or to Bitcoin.
|
|
11115
11616
|
"""
|
|
@@ -11119,7 +11620,7 @@ class FetchTokenConversionLimitsRequest:
|
|
|
11119
11620
|
The token identifier when converting to a token.
|
|
11120
11621
|
"""
|
|
11121
11622
|
|
|
11122
|
-
def __init__(self, *, conversion_type: "
|
|
11623
|
+
def __init__(self, *, conversion_type: "ConversionType", token_identifier: "typing.Optional[str]" = _DEFAULT):
|
|
11123
11624
|
self.conversion_type = conversion_type
|
|
11124
11625
|
if token_identifier is _DEFAULT:
|
|
11125
11626
|
self.token_identifier = None
|
|
@@ -11127,7 +11628,7 @@ class FetchTokenConversionLimitsRequest:
|
|
|
11127
11628
|
self.token_identifier = token_identifier
|
|
11128
11629
|
|
|
11129
11630
|
def __str__(self):
|
|
11130
|
-
return "
|
|
11631
|
+
return "FetchConversionLimitsRequest(conversion_type={}, token_identifier={})".format(self.conversion_type, self.token_identifier)
|
|
11131
11632
|
|
|
11132
11633
|
def __eq__(self, other):
|
|
11133
11634
|
if self.conversion_type != other.conversion_type:
|
|
@@ -11136,26 +11637,26 @@ class FetchTokenConversionLimitsRequest:
|
|
|
11136
11637
|
return False
|
|
11137
11638
|
return True
|
|
11138
11639
|
|
|
11139
|
-
class
|
|
11640
|
+
class _UniffiConverterTypeFetchConversionLimitsRequest(_UniffiConverterRustBuffer):
|
|
11140
11641
|
@staticmethod
|
|
11141
11642
|
def read(buf):
|
|
11142
|
-
return
|
|
11143
|
-
conversion_type=
|
|
11643
|
+
return FetchConversionLimitsRequest(
|
|
11644
|
+
conversion_type=_UniffiConverterTypeConversionType.read(buf),
|
|
11144
11645
|
token_identifier=_UniffiConverterOptionalString.read(buf),
|
|
11145
11646
|
)
|
|
11146
11647
|
|
|
11147
11648
|
@staticmethod
|
|
11148
11649
|
def check_lower(value):
|
|
11149
|
-
|
|
11650
|
+
_UniffiConverterTypeConversionType.check_lower(value.conversion_type)
|
|
11150
11651
|
_UniffiConverterOptionalString.check_lower(value.token_identifier)
|
|
11151
11652
|
|
|
11152
11653
|
@staticmethod
|
|
11153
11654
|
def write(value, buf):
|
|
11154
|
-
|
|
11655
|
+
_UniffiConverterTypeConversionType.write(value.conversion_type, buf)
|
|
11155
11656
|
_UniffiConverterOptionalString.write(value.token_identifier, buf)
|
|
11156
11657
|
|
|
11157
11658
|
|
|
11158
|
-
class
|
|
11659
|
+
class FetchConversionLimitsResponse:
|
|
11159
11660
|
min_from_amount: "typing.Optional[U128]"
|
|
11160
11661
|
"""
|
|
11161
11662
|
The minimum amount to be converted.
|
|
@@ -11173,7 +11674,7 @@ class FetchTokenConversionLimitsResponse:
|
|
|
11173
11674
|
self.min_to_amount = min_to_amount
|
|
11174
11675
|
|
|
11175
11676
|
def __str__(self):
|
|
11176
|
-
return "
|
|
11677
|
+
return "FetchConversionLimitsResponse(min_from_amount={}, min_to_amount={})".format(self.min_from_amount, self.min_to_amount)
|
|
11177
11678
|
|
|
11178
11679
|
def __eq__(self, other):
|
|
11179
11680
|
if self.min_from_amount != other.min_from_amount:
|
|
@@ -11182,10 +11683,10 @@ class FetchTokenConversionLimitsResponse:
|
|
|
11182
11683
|
return False
|
|
11183
11684
|
return True
|
|
11184
11685
|
|
|
11185
|
-
class
|
|
11686
|
+
class _UniffiConverterTypeFetchConversionLimitsResponse(_UniffiConverterRustBuffer):
|
|
11186
11687
|
@staticmethod
|
|
11187
11688
|
def read(buf):
|
|
11188
|
-
return
|
|
11689
|
+
return FetchConversionLimitsResponse(
|
|
11189
11690
|
min_from_amount=_UniffiConverterOptionalTypeU128.read(buf),
|
|
11190
11691
|
min_to_amount=_UniffiConverterOptionalTypeU128.read(buf),
|
|
11191
11692
|
)
|
|
@@ -11503,6 +12004,35 @@ class _UniffiConverterTypeGetTokensMetadataResponse(_UniffiConverterRustBuffer):
|
|
|
11503
12004
|
_UniffiConverterSequenceTypeTokenMetadata.write(value.tokens_metadata, buf)
|
|
11504
12005
|
|
|
11505
12006
|
|
|
12007
|
+
class HashedMessageBytes:
|
|
12008
|
+
bytes: "bytes"
|
|
12009
|
+
def __init__(self, *, bytes: "bytes"):
|
|
12010
|
+
self.bytes = bytes
|
|
12011
|
+
|
|
12012
|
+
def __str__(self):
|
|
12013
|
+
return "HashedMessageBytes(bytes={})".format(self.bytes)
|
|
12014
|
+
|
|
12015
|
+
def __eq__(self, other):
|
|
12016
|
+
if self.bytes != other.bytes:
|
|
12017
|
+
return False
|
|
12018
|
+
return True
|
|
12019
|
+
|
|
12020
|
+
class _UniffiConverterTypeHashedMessageBytes(_UniffiConverterRustBuffer):
|
|
12021
|
+
@staticmethod
|
|
12022
|
+
def read(buf):
|
|
12023
|
+
return HashedMessageBytes(
|
|
12024
|
+
bytes=_UniffiConverterBytes.read(buf),
|
|
12025
|
+
)
|
|
12026
|
+
|
|
12027
|
+
@staticmethod
|
|
12028
|
+
def check_lower(value):
|
|
12029
|
+
_UniffiConverterBytes.check_lower(value.bytes)
|
|
12030
|
+
|
|
12031
|
+
@staticmethod
|
|
12032
|
+
def write(value, buf):
|
|
12033
|
+
_UniffiConverterBytes.write(value.bytes, buf)
|
|
12034
|
+
|
|
12035
|
+
|
|
11506
12036
|
class IdentifierCommitmentPair:
|
|
11507
12037
|
"""
|
|
11508
12038
|
FFI-safe wrapper for (Identifier, `SigningCommitments`) pair
|
|
@@ -12181,6 +12711,39 @@ class _UniffiConverterTypeLnurlAuthRequestDetails(_UniffiConverterRustBuffer):
|
|
|
12181
12711
|
_UniffiConverterString.write(value.url, buf)
|
|
12182
12712
|
|
|
12183
12713
|
|
|
12714
|
+
class LnurlErrorDetails:
|
|
12715
|
+
"""
|
|
12716
|
+
LNURL error details
|
|
12717
|
+
"""
|
|
12718
|
+
|
|
12719
|
+
reason: "str"
|
|
12720
|
+
def __init__(self, *, reason: "str"):
|
|
12721
|
+
self.reason = reason
|
|
12722
|
+
|
|
12723
|
+
def __str__(self):
|
|
12724
|
+
return "LnurlErrorDetails(reason={})".format(self.reason)
|
|
12725
|
+
|
|
12726
|
+
def __eq__(self, other):
|
|
12727
|
+
if self.reason != other.reason:
|
|
12728
|
+
return False
|
|
12729
|
+
return True
|
|
12730
|
+
|
|
12731
|
+
class _UniffiConverterTypeLnurlErrorDetails(_UniffiConverterRustBuffer):
|
|
12732
|
+
@staticmethod
|
|
12733
|
+
def read(buf):
|
|
12734
|
+
return LnurlErrorDetails(
|
|
12735
|
+
reason=_UniffiConverterString.read(buf),
|
|
12736
|
+
)
|
|
12737
|
+
|
|
12738
|
+
@staticmethod
|
|
12739
|
+
def check_lower(value):
|
|
12740
|
+
_UniffiConverterString.check_lower(value.reason)
|
|
12741
|
+
|
|
12742
|
+
@staticmethod
|
|
12743
|
+
def write(value, buf):
|
|
12744
|
+
_UniffiConverterString.write(value.reason, buf)
|
|
12745
|
+
|
|
12746
|
+
|
|
12184
12747
|
class LnurlPayInfo:
|
|
12185
12748
|
"""
|
|
12186
12749
|
Represents the payment LNURL info
|
|
@@ -12827,6 +13390,39 @@ class _UniffiConverterTypeLogEntry(_UniffiConverterRustBuffer):
|
|
|
12827
13390
|
_UniffiConverterString.write(value.level, buf)
|
|
12828
13391
|
|
|
12829
13392
|
|
|
13393
|
+
class MessageBytes:
|
|
13394
|
+
"""
|
|
13395
|
+
FFI-safe representation of a 32-byte message digest for ECDSA signing
|
|
13396
|
+
"""
|
|
13397
|
+
|
|
13398
|
+
bytes: "bytes"
|
|
13399
|
+
def __init__(self, *, bytes: "bytes"):
|
|
13400
|
+
self.bytes = bytes
|
|
13401
|
+
|
|
13402
|
+
def __str__(self):
|
|
13403
|
+
return "MessageBytes(bytes={})".format(self.bytes)
|
|
13404
|
+
|
|
13405
|
+
def __eq__(self, other):
|
|
13406
|
+
if self.bytes != other.bytes:
|
|
13407
|
+
return False
|
|
13408
|
+
return True
|
|
13409
|
+
|
|
13410
|
+
class _UniffiConverterTypeMessageBytes(_UniffiConverterRustBuffer):
|
|
13411
|
+
@staticmethod
|
|
13412
|
+
def read(buf):
|
|
13413
|
+
return MessageBytes(
|
|
13414
|
+
bytes=_UniffiConverterBytes.read(buf),
|
|
13415
|
+
)
|
|
13416
|
+
|
|
13417
|
+
@staticmethod
|
|
13418
|
+
def check_lower(value):
|
|
13419
|
+
_UniffiConverterBytes.check_lower(value.bytes)
|
|
13420
|
+
|
|
13421
|
+
@staticmethod
|
|
13422
|
+
def write(value, buf):
|
|
13423
|
+
_UniffiConverterBytes.write(value.bytes, buf)
|
|
13424
|
+
|
|
13425
|
+
|
|
12830
13426
|
class MessageSuccessActionData:
|
|
12831
13427
|
message: "str"
|
|
12832
13428
|
def __init__(self, *, message: "str"):
|
|
@@ -13143,16 +13739,16 @@ class PaymentMetadata:
|
|
|
13143
13739
|
lnurl_pay_info: "typing.Optional[LnurlPayInfo]"
|
|
13144
13740
|
lnurl_withdraw_info: "typing.Optional[LnurlWithdrawInfo]"
|
|
13145
13741
|
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]",
|
|
13742
|
+
conversion_info: "typing.Optional[ConversionInfo]"
|
|
13743
|
+
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
13744
|
self.parent_payment_id = parent_payment_id
|
|
13149
13745
|
self.lnurl_pay_info = lnurl_pay_info
|
|
13150
13746
|
self.lnurl_withdraw_info = lnurl_withdraw_info
|
|
13151
13747
|
self.lnurl_description = lnurl_description
|
|
13152
|
-
self.
|
|
13748
|
+
self.conversion_info = conversion_info
|
|
13153
13749
|
|
|
13154
13750
|
def __str__(self):
|
|
13155
|
-
return "PaymentMetadata(parent_payment_id={}, lnurl_pay_info={}, lnurl_withdraw_info={}, lnurl_description={},
|
|
13751
|
+
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
13752
|
|
|
13157
13753
|
def __eq__(self, other):
|
|
13158
13754
|
if self.parent_payment_id != other.parent_payment_id:
|
|
@@ -13163,7 +13759,7 @@ class PaymentMetadata:
|
|
|
13163
13759
|
return False
|
|
13164
13760
|
if self.lnurl_description != other.lnurl_description:
|
|
13165
13761
|
return False
|
|
13166
|
-
if self.
|
|
13762
|
+
if self.conversion_info != other.conversion_info:
|
|
13167
13763
|
return False
|
|
13168
13764
|
return True
|
|
13169
13765
|
|
|
@@ -13175,7 +13771,7 @@ class _UniffiConverterTypePaymentMetadata(_UniffiConverterRustBuffer):
|
|
|
13175
13771
|
lnurl_pay_info=_UniffiConverterOptionalTypeLnurlPayInfo.read(buf),
|
|
13176
13772
|
lnurl_withdraw_info=_UniffiConverterOptionalTypeLnurlWithdrawInfo.read(buf),
|
|
13177
13773
|
lnurl_description=_UniffiConverterOptionalString.read(buf),
|
|
13178
|
-
|
|
13774
|
+
conversion_info=_UniffiConverterOptionalTypeConversionInfo.read(buf),
|
|
13179
13775
|
)
|
|
13180
13776
|
|
|
13181
13777
|
@staticmethod
|
|
@@ -13184,7 +13780,7 @@ class _UniffiConverterTypePaymentMetadata(_UniffiConverterRustBuffer):
|
|
|
13184
13780
|
_UniffiConverterOptionalTypeLnurlPayInfo.check_lower(value.lnurl_pay_info)
|
|
13185
13781
|
_UniffiConverterOptionalTypeLnurlWithdrawInfo.check_lower(value.lnurl_withdraw_info)
|
|
13186
13782
|
_UniffiConverterOptionalString.check_lower(value.lnurl_description)
|
|
13187
|
-
|
|
13783
|
+
_UniffiConverterOptionalTypeConversionInfo.check_lower(value.conversion_info)
|
|
13188
13784
|
|
|
13189
13785
|
@staticmethod
|
|
13190
13786
|
def write(value, buf):
|
|
@@ -13192,7 +13788,7 @@ class _UniffiConverterTypePaymentMetadata(_UniffiConverterRustBuffer):
|
|
|
13192
13788
|
_UniffiConverterOptionalTypeLnurlPayInfo.write(value.lnurl_pay_info, buf)
|
|
13193
13789
|
_UniffiConverterOptionalTypeLnurlWithdrawInfo.write(value.lnurl_withdraw_info, buf)
|
|
13194
13790
|
_UniffiConverterOptionalString.write(value.lnurl_description, buf)
|
|
13195
|
-
|
|
13791
|
+
_UniffiConverterOptionalTypeConversionInfo.write(value.conversion_info, buf)
|
|
13196
13792
|
|
|
13197
13793
|
|
|
13198
13794
|
class PaymentRequestSource:
|
|
@@ -13365,12 +13961,12 @@ class PrepareSendPaymentRequest:
|
|
|
13365
13961
|
May only be provided if the payment request is a spark address.
|
|
13366
13962
|
"""
|
|
13367
13963
|
|
|
13368
|
-
|
|
13964
|
+
conversion_options: "typing.Optional[ConversionOptions]"
|
|
13369
13965
|
"""
|
|
13370
|
-
If provided, the payment will include a
|
|
13966
|
+
If provided, the payment will include a conversion step before sending the payment
|
|
13371
13967
|
"""
|
|
13372
13968
|
|
|
13373
|
-
def __init__(self, *, payment_request: "str", amount: "typing.Optional[U128]" = _DEFAULT, token_identifier: "typing.Optional[str]" = _DEFAULT,
|
|
13969
|
+
def __init__(self, *, payment_request: "str", amount: "typing.Optional[U128]" = _DEFAULT, token_identifier: "typing.Optional[str]" = _DEFAULT, conversion_options: "typing.Optional[ConversionOptions]" = _DEFAULT):
|
|
13374
13970
|
self.payment_request = payment_request
|
|
13375
13971
|
if amount is _DEFAULT:
|
|
13376
13972
|
self.amount = None
|
|
@@ -13380,13 +13976,13 @@ class PrepareSendPaymentRequest:
|
|
|
13380
13976
|
self.token_identifier = None
|
|
13381
13977
|
else:
|
|
13382
13978
|
self.token_identifier = token_identifier
|
|
13383
|
-
if
|
|
13384
|
-
self.
|
|
13979
|
+
if conversion_options is _DEFAULT:
|
|
13980
|
+
self.conversion_options = None
|
|
13385
13981
|
else:
|
|
13386
|
-
self.
|
|
13982
|
+
self.conversion_options = conversion_options
|
|
13387
13983
|
|
|
13388
13984
|
def __str__(self):
|
|
13389
|
-
return "PrepareSendPaymentRequest(payment_request={}, amount={}, token_identifier={},
|
|
13985
|
+
return "PrepareSendPaymentRequest(payment_request={}, amount={}, token_identifier={}, conversion_options={})".format(self.payment_request, self.amount, self.token_identifier, self.conversion_options)
|
|
13390
13986
|
|
|
13391
13987
|
def __eq__(self, other):
|
|
13392
13988
|
if self.payment_request != other.payment_request:
|
|
@@ -13395,7 +13991,7 @@ class PrepareSendPaymentRequest:
|
|
|
13395
13991
|
return False
|
|
13396
13992
|
if self.token_identifier != other.token_identifier:
|
|
13397
13993
|
return False
|
|
13398
|
-
if self.
|
|
13994
|
+
if self.conversion_options != other.conversion_options:
|
|
13399
13995
|
return False
|
|
13400
13996
|
return True
|
|
13401
13997
|
|
|
@@ -13406,7 +14002,7 @@ class _UniffiConverterTypePrepareSendPaymentRequest(_UniffiConverterRustBuffer):
|
|
|
13406
14002
|
payment_request=_UniffiConverterString.read(buf),
|
|
13407
14003
|
amount=_UniffiConverterOptionalTypeU128.read(buf),
|
|
13408
14004
|
token_identifier=_UniffiConverterOptionalString.read(buf),
|
|
13409
|
-
|
|
14005
|
+
conversion_options=_UniffiConverterOptionalTypeConversionOptions.read(buf),
|
|
13410
14006
|
)
|
|
13411
14007
|
|
|
13412
14008
|
@staticmethod
|
|
@@ -13414,14 +14010,14 @@ class _UniffiConverterTypePrepareSendPaymentRequest(_UniffiConverterRustBuffer):
|
|
|
13414
14010
|
_UniffiConverterString.check_lower(value.payment_request)
|
|
13415
14011
|
_UniffiConverterOptionalTypeU128.check_lower(value.amount)
|
|
13416
14012
|
_UniffiConverterOptionalString.check_lower(value.token_identifier)
|
|
13417
|
-
|
|
14013
|
+
_UniffiConverterOptionalTypeConversionOptions.check_lower(value.conversion_options)
|
|
13418
14014
|
|
|
13419
14015
|
@staticmethod
|
|
13420
14016
|
def write(value, buf):
|
|
13421
14017
|
_UniffiConverterString.write(value.payment_request, buf)
|
|
13422
14018
|
_UniffiConverterOptionalTypeU128.write(value.amount, buf)
|
|
13423
14019
|
_UniffiConverterOptionalString.write(value.token_identifier, buf)
|
|
13424
|
-
|
|
14020
|
+
_UniffiConverterOptionalTypeConversionOptions.write(value.conversion_options, buf)
|
|
13425
14021
|
|
|
13426
14022
|
|
|
13427
14023
|
class PrepareSendPaymentResponse:
|
|
@@ -13438,25 +14034,19 @@ class PrepareSendPaymentResponse:
|
|
|
13438
14034
|
If empty, it is a Bitcoin payment.
|
|
13439
14035
|
"""
|
|
13440
14036
|
|
|
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]"
|
|
14037
|
+
conversion_estimate: "typing.Optional[ConversionEstimate]"
|
|
13447
14038
|
"""
|
|
13448
|
-
|
|
14039
|
+
When set, the payment will include a conversion step before sending the payment
|
|
13449
14040
|
"""
|
|
13450
14041
|
|
|
13451
|
-
def __init__(self, *, payment_method: "SendPaymentMethod", amount: "U128", token_identifier: "typing.Optional[str]",
|
|
14042
|
+
def __init__(self, *, payment_method: "SendPaymentMethod", amount: "U128", token_identifier: "typing.Optional[str]", conversion_estimate: "typing.Optional[ConversionEstimate]"):
|
|
13452
14043
|
self.payment_method = payment_method
|
|
13453
14044
|
self.amount = amount
|
|
13454
14045
|
self.token_identifier = token_identifier
|
|
13455
|
-
self.
|
|
13456
|
-
self.token_conversion_fee = token_conversion_fee
|
|
14046
|
+
self.conversion_estimate = conversion_estimate
|
|
13457
14047
|
|
|
13458
14048
|
def __str__(self):
|
|
13459
|
-
return "PrepareSendPaymentResponse(payment_method={}, amount={}, token_identifier={},
|
|
14049
|
+
return "PrepareSendPaymentResponse(payment_method={}, amount={}, token_identifier={}, conversion_estimate={})".format(self.payment_method, self.amount, self.token_identifier, self.conversion_estimate)
|
|
13460
14050
|
|
|
13461
14051
|
def __eq__(self, other):
|
|
13462
14052
|
if self.payment_method != other.payment_method:
|
|
@@ -13465,9 +14055,7 @@ class PrepareSendPaymentResponse:
|
|
|
13465
14055
|
return False
|
|
13466
14056
|
if self.token_identifier != other.token_identifier:
|
|
13467
14057
|
return False
|
|
13468
|
-
if self.
|
|
13469
|
-
return False
|
|
13470
|
-
if self.token_conversion_fee != other.token_conversion_fee:
|
|
14058
|
+
if self.conversion_estimate != other.conversion_estimate:
|
|
13471
14059
|
return False
|
|
13472
14060
|
return True
|
|
13473
14061
|
|
|
@@ -13478,8 +14066,7 @@ class _UniffiConverterTypePrepareSendPaymentResponse(_UniffiConverterRustBuffer)
|
|
|
13478
14066
|
payment_method=_UniffiConverterTypeSendPaymentMethod.read(buf),
|
|
13479
14067
|
amount=_UniffiConverterTypeU128.read(buf),
|
|
13480
14068
|
token_identifier=_UniffiConverterOptionalString.read(buf),
|
|
13481
|
-
|
|
13482
|
-
token_conversion_fee=_UniffiConverterOptionalTypeU128.read(buf),
|
|
14069
|
+
conversion_estimate=_UniffiConverterOptionalTypeConversionEstimate.read(buf),
|
|
13483
14070
|
)
|
|
13484
14071
|
|
|
13485
14072
|
@staticmethod
|
|
@@ -13487,55 +14074,20 @@ class _UniffiConverterTypePrepareSendPaymentResponse(_UniffiConverterRustBuffer)
|
|
|
13487
14074
|
_UniffiConverterTypeSendPaymentMethod.check_lower(value.payment_method)
|
|
13488
14075
|
_UniffiConverterTypeU128.check_lower(value.amount)
|
|
13489
14076
|
_UniffiConverterOptionalString.check_lower(value.token_identifier)
|
|
13490
|
-
|
|
13491
|
-
_UniffiConverterOptionalTypeU128.check_lower(value.token_conversion_fee)
|
|
14077
|
+
_UniffiConverterOptionalTypeConversionEstimate.check_lower(value.conversion_estimate)
|
|
13492
14078
|
|
|
13493
14079
|
@staticmethod
|
|
13494
14080
|
def write(value, buf):
|
|
13495
14081
|
_UniffiConverterTypeSendPaymentMethod.write(value.payment_method, buf)
|
|
13496
14082
|
_UniffiConverterTypeU128.write(value.amount, buf)
|
|
13497
14083
|
_UniffiConverterOptionalString.write(value.token_identifier, buf)
|
|
13498
|
-
|
|
13499
|
-
_UniffiConverterOptionalTypeU128.write(value.token_conversion_fee, buf)
|
|
14084
|
+
_UniffiConverterOptionalTypeConversionEstimate.write(value.conversion_estimate, buf)
|
|
13500
14085
|
|
|
13501
14086
|
|
|
13502
|
-
class
|
|
14087
|
+
class ProvisionalPayment:
|
|
14088
|
+
payment_id: "str"
|
|
13503
14089
|
"""
|
|
13504
|
-
|
|
13505
|
-
"""
|
|
13506
|
-
|
|
13507
|
-
bytes: "bytes"
|
|
13508
|
-
def __init__(self, *, bytes: "bytes"):
|
|
13509
|
-
self.bytes = bytes
|
|
13510
|
-
|
|
13511
|
-
def __str__(self):
|
|
13512
|
-
return "PrivateKeyBytes(bytes={})".format(self.bytes)
|
|
13513
|
-
|
|
13514
|
-
def __eq__(self, other):
|
|
13515
|
-
if self.bytes != other.bytes:
|
|
13516
|
-
return False
|
|
13517
|
-
return True
|
|
13518
|
-
|
|
13519
|
-
class _UniffiConverterTypePrivateKeyBytes(_UniffiConverterRustBuffer):
|
|
13520
|
-
@staticmethod
|
|
13521
|
-
def read(buf):
|
|
13522
|
-
return PrivateKeyBytes(
|
|
13523
|
-
bytes=_UniffiConverterBytes.read(buf),
|
|
13524
|
-
)
|
|
13525
|
-
|
|
13526
|
-
@staticmethod
|
|
13527
|
-
def check_lower(value):
|
|
13528
|
-
_UniffiConverterBytes.check_lower(value.bytes)
|
|
13529
|
-
|
|
13530
|
-
@staticmethod
|
|
13531
|
-
def write(value, buf):
|
|
13532
|
-
_UniffiConverterBytes.write(value.bytes, buf)
|
|
13533
|
-
|
|
13534
|
-
|
|
13535
|
-
class ProvisionalPayment:
|
|
13536
|
-
payment_id: "str"
|
|
13537
|
-
"""
|
|
13538
|
-
Unique identifier for the payment
|
|
14090
|
+
Unique identifier for the payment
|
|
13539
14091
|
"""
|
|
13540
14092
|
|
|
13541
14093
|
amount: "U128"
|
|
@@ -14150,6 +14702,39 @@ class _UniffiConverterTypeSchnorrSignatureBytes(_UniffiConverterRustBuffer):
|
|
|
14150
14702
|
_UniffiConverterBytes.write(value.bytes, buf)
|
|
14151
14703
|
|
|
14152
14704
|
|
|
14705
|
+
class SecretBytes:
|
|
14706
|
+
"""
|
|
14707
|
+
FFI-safe representation of a private key (32 bytes)
|
|
14708
|
+
"""
|
|
14709
|
+
|
|
14710
|
+
bytes: "bytes"
|
|
14711
|
+
def __init__(self, *, bytes: "bytes"):
|
|
14712
|
+
self.bytes = bytes
|
|
14713
|
+
|
|
14714
|
+
def __str__(self):
|
|
14715
|
+
return "SecretBytes(bytes={})".format(self.bytes)
|
|
14716
|
+
|
|
14717
|
+
def __eq__(self, other):
|
|
14718
|
+
if self.bytes != other.bytes:
|
|
14719
|
+
return False
|
|
14720
|
+
return True
|
|
14721
|
+
|
|
14722
|
+
class _UniffiConverterTypeSecretBytes(_UniffiConverterRustBuffer):
|
|
14723
|
+
@staticmethod
|
|
14724
|
+
def read(buf):
|
|
14725
|
+
return SecretBytes(
|
|
14726
|
+
bytes=_UniffiConverterBytes.read(buf),
|
|
14727
|
+
)
|
|
14728
|
+
|
|
14729
|
+
@staticmethod
|
|
14730
|
+
def check_lower(value):
|
|
14731
|
+
_UniffiConverterBytes.check_lower(value.bytes)
|
|
14732
|
+
|
|
14733
|
+
@staticmethod
|
|
14734
|
+
def write(value, buf):
|
|
14735
|
+
_UniffiConverterBytes.write(value.bytes, buf)
|
|
14736
|
+
|
|
14737
|
+
|
|
14153
14738
|
class SendOnchainFeeQuote:
|
|
14154
14739
|
id: "str"
|
|
14155
14740
|
expires_at: "int"
|
|
@@ -14572,7 +15157,7 @@ class SparkHtlcDetails:
|
|
|
14572
15157
|
|
|
14573
15158
|
expiry_time: "int"
|
|
14574
15159
|
"""
|
|
14575
|
-
The expiry time of the HTLC
|
|
15160
|
+
The expiry time of the HTLC as a unix timestamp in seconds
|
|
14576
15161
|
"""
|
|
14577
15162
|
|
|
14578
15163
|
status: "SparkHtlcStatus"
|
|
@@ -14694,7 +15279,7 @@ class SparkInvoiceDetails:
|
|
|
14694
15279
|
|
|
14695
15280
|
expiry_time: "typing.Optional[int]"
|
|
14696
15281
|
"""
|
|
14697
|
-
Optional expiry time. If not provided, the invoice will never expire.
|
|
15282
|
+
Optional expiry time as a unix timestamp in seconds. If not provided, the invoice will never expire.
|
|
14698
15283
|
"""
|
|
14699
15284
|
|
|
14700
15285
|
description: "typing.Optional[str]"
|
|
@@ -14964,146 +15549,6 @@ class _UniffiConverterTypeTokenBalance(_UniffiConverterRustBuffer):
|
|
|
14964
15549
|
_UniffiConverterTypeTokenMetadata.write(value.token_metadata, buf)
|
|
14965
15550
|
|
|
14966
15551
|
|
|
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
15552
|
class TokenMetadata:
|
|
15108
15553
|
identifier: "str"
|
|
15109
15554
|
issuer_public_key: "str"
|
|
@@ -16021,6 +16466,272 @@ class _UniffiConverterTypeChainServiceError(_UniffiConverterRustBuffer):
|
|
|
16021
16466
|
|
|
16022
16467
|
|
|
16023
16468
|
|
|
16469
|
+
class ConversionPurpose:
|
|
16470
|
+
"""
|
|
16471
|
+
The purpose of the conversion, which is used to provide context for the conversion
|
|
16472
|
+
if its related to an ongoing payment or a self-transfer.
|
|
16473
|
+
"""
|
|
16474
|
+
|
|
16475
|
+
def __init__(self):
|
|
16476
|
+
raise RuntimeError("ConversionPurpose cannot be instantiated directly")
|
|
16477
|
+
|
|
16478
|
+
# Each enum variant is a nested class of the enum itself.
|
|
16479
|
+
class ONGOING_PAYMENT:
|
|
16480
|
+
"""
|
|
16481
|
+
Conversion is associated with an ongoing payment
|
|
16482
|
+
"""
|
|
16483
|
+
|
|
16484
|
+
payment_request: "str"
|
|
16485
|
+
"""
|
|
16486
|
+
The payment request of the ongoing payment
|
|
16487
|
+
"""
|
|
16488
|
+
|
|
16489
|
+
|
|
16490
|
+
def __init__(self,payment_request: "str"):
|
|
16491
|
+
self.payment_request = payment_request
|
|
16492
|
+
|
|
16493
|
+
def __str__(self):
|
|
16494
|
+
return "ConversionPurpose.ONGOING_PAYMENT(payment_request={})".format(self.payment_request)
|
|
16495
|
+
|
|
16496
|
+
def __eq__(self, other):
|
|
16497
|
+
if not other.is_ongoing_payment():
|
|
16498
|
+
return False
|
|
16499
|
+
if self.payment_request != other.payment_request:
|
|
16500
|
+
return False
|
|
16501
|
+
return True
|
|
16502
|
+
|
|
16503
|
+
class SELF_TRANSFER:
|
|
16504
|
+
"""
|
|
16505
|
+
Conversion is for self-transfer
|
|
16506
|
+
"""
|
|
16507
|
+
|
|
16508
|
+
|
|
16509
|
+
def __init__(self,):
|
|
16510
|
+
pass
|
|
16511
|
+
|
|
16512
|
+
def __str__(self):
|
|
16513
|
+
return "ConversionPurpose.SELF_TRANSFER()".format()
|
|
16514
|
+
|
|
16515
|
+
def __eq__(self, other):
|
|
16516
|
+
if not other.is_self_transfer():
|
|
16517
|
+
return False
|
|
16518
|
+
return True
|
|
16519
|
+
|
|
16520
|
+
|
|
16521
|
+
|
|
16522
|
+
# For each variant, we have an `is_NAME` method for easily checking
|
|
16523
|
+
# whether an instance is that variant.
|
|
16524
|
+
def is_ongoing_payment(self) -> bool:
|
|
16525
|
+
return isinstance(self, ConversionPurpose.ONGOING_PAYMENT)
|
|
16526
|
+
def is_self_transfer(self) -> bool:
|
|
16527
|
+
return isinstance(self, ConversionPurpose.SELF_TRANSFER)
|
|
16528
|
+
|
|
16529
|
+
|
|
16530
|
+
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
16531
|
+
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
16532
|
+
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
16533
|
+
ConversionPurpose.ONGOING_PAYMENT = type("ConversionPurpose.ONGOING_PAYMENT", (ConversionPurpose.ONGOING_PAYMENT, ConversionPurpose,), {}) # type: ignore
|
|
16534
|
+
ConversionPurpose.SELF_TRANSFER = type("ConversionPurpose.SELF_TRANSFER", (ConversionPurpose.SELF_TRANSFER, ConversionPurpose,), {}) # type: ignore
|
|
16535
|
+
|
|
16536
|
+
|
|
16537
|
+
|
|
16538
|
+
|
|
16539
|
+
class _UniffiConverterTypeConversionPurpose(_UniffiConverterRustBuffer):
|
|
16540
|
+
@staticmethod
|
|
16541
|
+
def read(buf):
|
|
16542
|
+
variant = buf.read_i32()
|
|
16543
|
+
if variant == 1:
|
|
16544
|
+
return ConversionPurpose.ONGOING_PAYMENT(
|
|
16545
|
+
_UniffiConverterString.read(buf),
|
|
16546
|
+
)
|
|
16547
|
+
if variant == 2:
|
|
16548
|
+
return ConversionPurpose.SELF_TRANSFER(
|
|
16549
|
+
)
|
|
16550
|
+
raise InternalError("Raw enum value doesn't match any cases")
|
|
16551
|
+
|
|
16552
|
+
@staticmethod
|
|
16553
|
+
def check_lower(value):
|
|
16554
|
+
if value.is_ongoing_payment():
|
|
16555
|
+
_UniffiConverterString.check_lower(value.payment_request)
|
|
16556
|
+
return
|
|
16557
|
+
if value.is_self_transfer():
|
|
16558
|
+
return
|
|
16559
|
+
raise ValueError(value)
|
|
16560
|
+
|
|
16561
|
+
@staticmethod
|
|
16562
|
+
def write(value, buf):
|
|
16563
|
+
if value.is_ongoing_payment():
|
|
16564
|
+
buf.write_i32(1)
|
|
16565
|
+
_UniffiConverterString.write(value.payment_request, buf)
|
|
16566
|
+
if value.is_self_transfer():
|
|
16567
|
+
buf.write_i32(2)
|
|
16568
|
+
|
|
16569
|
+
|
|
16570
|
+
|
|
16571
|
+
|
|
16572
|
+
|
|
16573
|
+
|
|
16574
|
+
|
|
16575
|
+
class ConversionStatus(enum.Enum):
|
|
16576
|
+
"""
|
|
16577
|
+
The status of the conversion
|
|
16578
|
+
"""
|
|
16579
|
+
|
|
16580
|
+
COMPLETED = 0
|
|
16581
|
+
"""
|
|
16582
|
+
The conversion was successful
|
|
16583
|
+
"""
|
|
16584
|
+
|
|
16585
|
+
|
|
16586
|
+
REFUND_NEEDED = 1
|
|
16587
|
+
"""
|
|
16588
|
+
The conversion failed and no refund was made yet, which requires action by the SDK to
|
|
16589
|
+
perform the refund. This can happen if there was a failure during the conversion process.
|
|
16590
|
+
"""
|
|
16591
|
+
|
|
16592
|
+
|
|
16593
|
+
REFUNDED = 2
|
|
16594
|
+
"""
|
|
16595
|
+
The conversion failed and a refund was made
|
|
16596
|
+
"""
|
|
16597
|
+
|
|
16598
|
+
|
|
16599
|
+
|
|
16600
|
+
|
|
16601
|
+
class _UniffiConverterTypeConversionStatus(_UniffiConverterRustBuffer):
|
|
16602
|
+
@staticmethod
|
|
16603
|
+
def read(buf):
|
|
16604
|
+
variant = buf.read_i32()
|
|
16605
|
+
if variant == 1:
|
|
16606
|
+
return ConversionStatus.COMPLETED
|
|
16607
|
+
if variant == 2:
|
|
16608
|
+
return ConversionStatus.REFUND_NEEDED
|
|
16609
|
+
if variant == 3:
|
|
16610
|
+
return ConversionStatus.REFUNDED
|
|
16611
|
+
raise InternalError("Raw enum value doesn't match any cases")
|
|
16612
|
+
|
|
16613
|
+
@staticmethod
|
|
16614
|
+
def check_lower(value):
|
|
16615
|
+
if value == ConversionStatus.COMPLETED:
|
|
16616
|
+
return
|
|
16617
|
+
if value == ConversionStatus.REFUND_NEEDED:
|
|
16618
|
+
return
|
|
16619
|
+
if value == ConversionStatus.REFUNDED:
|
|
16620
|
+
return
|
|
16621
|
+
raise ValueError(value)
|
|
16622
|
+
|
|
16623
|
+
@staticmethod
|
|
16624
|
+
def write(value, buf):
|
|
16625
|
+
if value == ConversionStatus.COMPLETED:
|
|
16626
|
+
buf.write_i32(1)
|
|
16627
|
+
if value == ConversionStatus.REFUND_NEEDED:
|
|
16628
|
+
buf.write_i32(2)
|
|
16629
|
+
if value == ConversionStatus.REFUNDED:
|
|
16630
|
+
buf.write_i32(3)
|
|
16631
|
+
|
|
16632
|
+
|
|
16633
|
+
|
|
16634
|
+
|
|
16635
|
+
|
|
16636
|
+
|
|
16637
|
+
|
|
16638
|
+
class ConversionType:
|
|
16639
|
+
def __init__(self):
|
|
16640
|
+
raise RuntimeError("ConversionType cannot be instantiated directly")
|
|
16641
|
+
|
|
16642
|
+
# Each enum variant is a nested class of the enum itself.
|
|
16643
|
+
class FROM_BITCOIN:
|
|
16644
|
+
"""
|
|
16645
|
+
Converting from Bitcoin to a token
|
|
16646
|
+
"""
|
|
16647
|
+
|
|
16648
|
+
|
|
16649
|
+
def __init__(self,):
|
|
16650
|
+
pass
|
|
16651
|
+
|
|
16652
|
+
def __str__(self):
|
|
16653
|
+
return "ConversionType.FROM_BITCOIN()".format()
|
|
16654
|
+
|
|
16655
|
+
def __eq__(self, other):
|
|
16656
|
+
if not other.is_from_bitcoin():
|
|
16657
|
+
return False
|
|
16658
|
+
return True
|
|
16659
|
+
|
|
16660
|
+
class TO_BITCOIN:
|
|
16661
|
+
"""
|
|
16662
|
+
Converting from a token to Bitcoin
|
|
16663
|
+
"""
|
|
16664
|
+
|
|
16665
|
+
from_token_identifier: "str"
|
|
16666
|
+
|
|
16667
|
+
def __init__(self,from_token_identifier: "str"):
|
|
16668
|
+
self.from_token_identifier = from_token_identifier
|
|
16669
|
+
|
|
16670
|
+
def __str__(self):
|
|
16671
|
+
return "ConversionType.TO_BITCOIN(from_token_identifier={})".format(self.from_token_identifier)
|
|
16672
|
+
|
|
16673
|
+
def __eq__(self, other):
|
|
16674
|
+
if not other.is_to_bitcoin():
|
|
16675
|
+
return False
|
|
16676
|
+
if self.from_token_identifier != other.from_token_identifier:
|
|
16677
|
+
return False
|
|
16678
|
+
return True
|
|
16679
|
+
|
|
16680
|
+
|
|
16681
|
+
|
|
16682
|
+
# For each variant, we have an `is_NAME` method for easily checking
|
|
16683
|
+
# whether an instance is that variant.
|
|
16684
|
+
def is_from_bitcoin(self) -> bool:
|
|
16685
|
+
return isinstance(self, ConversionType.FROM_BITCOIN)
|
|
16686
|
+
def is_to_bitcoin(self) -> bool:
|
|
16687
|
+
return isinstance(self, ConversionType.TO_BITCOIN)
|
|
16688
|
+
|
|
16689
|
+
|
|
16690
|
+
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
16691
|
+
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
16692
|
+
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
16693
|
+
ConversionType.FROM_BITCOIN = type("ConversionType.FROM_BITCOIN", (ConversionType.FROM_BITCOIN, ConversionType,), {}) # type: ignore
|
|
16694
|
+
ConversionType.TO_BITCOIN = type("ConversionType.TO_BITCOIN", (ConversionType.TO_BITCOIN, ConversionType,), {}) # type: ignore
|
|
16695
|
+
|
|
16696
|
+
|
|
16697
|
+
|
|
16698
|
+
|
|
16699
|
+
class _UniffiConverterTypeConversionType(_UniffiConverterRustBuffer):
|
|
16700
|
+
@staticmethod
|
|
16701
|
+
def read(buf):
|
|
16702
|
+
variant = buf.read_i32()
|
|
16703
|
+
if variant == 1:
|
|
16704
|
+
return ConversionType.FROM_BITCOIN(
|
|
16705
|
+
)
|
|
16706
|
+
if variant == 2:
|
|
16707
|
+
return ConversionType.TO_BITCOIN(
|
|
16708
|
+
_UniffiConverterString.read(buf),
|
|
16709
|
+
)
|
|
16710
|
+
raise InternalError("Raw enum value doesn't match any cases")
|
|
16711
|
+
|
|
16712
|
+
@staticmethod
|
|
16713
|
+
def check_lower(value):
|
|
16714
|
+
if value.is_from_bitcoin():
|
|
16715
|
+
return
|
|
16716
|
+
if value.is_to_bitcoin():
|
|
16717
|
+
_UniffiConverterString.check_lower(value.from_token_identifier)
|
|
16718
|
+
return
|
|
16719
|
+
raise ValueError(value)
|
|
16720
|
+
|
|
16721
|
+
@staticmethod
|
|
16722
|
+
def write(value, buf):
|
|
16723
|
+
if value.is_from_bitcoin():
|
|
16724
|
+
buf.write_i32(1)
|
|
16725
|
+
if value.is_to_bitcoin():
|
|
16726
|
+
buf.write_i32(2)
|
|
16727
|
+
_UniffiConverterString.write(value.from_token_identifier, buf)
|
|
16728
|
+
|
|
16729
|
+
|
|
16730
|
+
|
|
16731
|
+
|
|
16732
|
+
|
|
16733
|
+
|
|
16734
|
+
|
|
16024
16735
|
class DepositClaimError:
|
|
16025
16736
|
def __init__(self):
|
|
16026
16737
|
raise RuntimeError("DepositClaimError cannot be instantiated directly")
|
|
@@ -16180,13 +16891,13 @@ class _UniffiConverterTypeDepositClaimError(_UniffiConverterRustBuffer):
|
|
|
16180
16891
|
|
|
16181
16892
|
|
|
16182
16893
|
|
|
16183
|
-
class
|
|
16894
|
+
class ExternalSecretSource:
|
|
16184
16895
|
"""
|
|
16185
|
-
FFI-safe representation of `spark_wallet::
|
|
16896
|
+
FFI-safe representation of `spark_wallet::SecretSource`
|
|
16186
16897
|
"""
|
|
16187
16898
|
|
|
16188
16899
|
def __init__(self):
|
|
16189
|
-
raise RuntimeError("
|
|
16900
|
+
raise RuntimeError("ExternalSecretSource cannot be instantiated directly")
|
|
16190
16901
|
|
|
16191
16902
|
# Each enum variant is a nested class of the enum itself.
|
|
16192
16903
|
class DERIVED:
|
|
@@ -16200,7 +16911,7 @@ class ExternalPrivateKeySource:
|
|
|
16200
16911
|
self.node_id = node_id
|
|
16201
16912
|
|
|
16202
16913
|
def __str__(self):
|
|
16203
|
-
return "
|
|
16914
|
+
return "ExternalSecretSource.DERIVED(node_id={})".format(self.node_id)
|
|
16204
16915
|
|
|
16205
16916
|
def __eq__(self, other):
|
|
16206
16917
|
if not other.is_derived():
|
|
@@ -16214,13 +16925,13 @@ class ExternalPrivateKeySource:
|
|
|
16214
16925
|
Encrypted private key
|
|
16215
16926
|
"""
|
|
16216
16927
|
|
|
16217
|
-
key: "
|
|
16928
|
+
key: "ExternalEncryptedSecret"
|
|
16218
16929
|
|
|
16219
|
-
def __init__(self,key: "
|
|
16930
|
+
def __init__(self,key: "ExternalEncryptedSecret"):
|
|
16220
16931
|
self.key = key
|
|
16221
16932
|
|
|
16222
16933
|
def __str__(self):
|
|
16223
|
-
return "
|
|
16934
|
+
return "ExternalSecretSource.ENCRYPTED(key={})".format(self.key)
|
|
16224
16935
|
|
|
16225
16936
|
def __eq__(self, other):
|
|
16226
16937
|
if not other.is_encrypted():
|
|
@@ -16234,31 +16945,31 @@ class ExternalPrivateKeySource:
|
|
|
16234
16945
|
# For each variant, we have an `is_NAME` method for easily checking
|
|
16235
16946
|
# whether an instance is that variant.
|
|
16236
16947
|
def is_derived(self) -> bool:
|
|
16237
|
-
return isinstance(self,
|
|
16948
|
+
return isinstance(self, ExternalSecretSource.DERIVED)
|
|
16238
16949
|
def is_encrypted(self) -> bool:
|
|
16239
|
-
return isinstance(self,
|
|
16950
|
+
return isinstance(self, ExternalSecretSource.ENCRYPTED)
|
|
16240
16951
|
|
|
16241
16952
|
|
|
16242
16953
|
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
16243
16954
|
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
16244
16955
|
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
16245
|
-
|
|
16246
|
-
|
|
16956
|
+
ExternalSecretSource.DERIVED = type("ExternalSecretSource.DERIVED", (ExternalSecretSource.DERIVED, ExternalSecretSource,), {}) # type: ignore
|
|
16957
|
+
ExternalSecretSource.ENCRYPTED = type("ExternalSecretSource.ENCRYPTED", (ExternalSecretSource.ENCRYPTED, ExternalSecretSource,), {}) # type: ignore
|
|
16247
16958
|
|
|
16248
16959
|
|
|
16249
16960
|
|
|
16250
16961
|
|
|
16251
|
-
class
|
|
16962
|
+
class _UniffiConverterTypeExternalSecretSource(_UniffiConverterRustBuffer):
|
|
16252
16963
|
@staticmethod
|
|
16253
16964
|
def read(buf):
|
|
16254
16965
|
variant = buf.read_i32()
|
|
16255
16966
|
if variant == 1:
|
|
16256
|
-
return
|
|
16967
|
+
return ExternalSecretSource.DERIVED(
|
|
16257
16968
|
_UniffiConverterTypeExternalTreeNodeId.read(buf),
|
|
16258
16969
|
)
|
|
16259
16970
|
if variant == 2:
|
|
16260
|
-
return
|
|
16261
|
-
|
|
16971
|
+
return ExternalSecretSource.ENCRYPTED(
|
|
16972
|
+
_UniffiConverterTypeExternalEncryptedSecret.read(buf),
|
|
16262
16973
|
)
|
|
16263
16974
|
raise InternalError("Raw enum value doesn't match any cases")
|
|
16264
16975
|
|
|
@@ -16268,7 +16979,7 @@ class _UniffiConverterTypeExternalPrivateKeySource(_UniffiConverterRustBuffer):
|
|
|
16268
16979
|
_UniffiConverterTypeExternalTreeNodeId.check_lower(value.node_id)
|
|
16269
16980
|
return
|
|
16270
16981
|
if value.is_encrypted():
|
|
16271
|
-
|
|
16982
|
+
_UniffiConverterTypeExternalEncryptedSecret.check_lower(value.key)
|
|
16272
16983
|
return
|
|
16273
16984
|
raise ValueError(value)
|
|
16274
16985
|
|
|
@@ -16279,7 +16990,7 @@ class _UniffiConverterTypeExternalPrivateKeySource(_UniffiConverterRustBuffer):
|
|
|
16279
16990
|
_UniffiConverterTypeExternalTreeNodeId.write(value.node_id, buf)
|
|
16280
16991
|
if value.is_encrypted():
|
|
16281
16992
|
buf.write_i32(2)
|
|
16282
|
-
|
|
16993
|
+
_UniffiConverterTypeExternalEncryptedSecret.write(value.key, buf)
|
|
16283
16994
|
|
|
16284
16995
|
|
|
16285
16996
|
|
|
@@ -16296,21 +17007,21 @@ class ExternalSecretToSplit:
|
|
|
16296
17007
|
raise RuntimeError("ExternalSecretToSplit cannot be instantiated directly")
|
|
16297
17008
|
|
|
16298
17009
|
# Each enum variant is a nested class of the enum itself.
|
|
16299
|
-
class
|
|
17010
|
+
class SECRET_SOURCE:
|
|
16300
17011
|
"""
|
|
16301
|
-
A
|
|
17012
|
+
A secret source to split
|
|
16302
17013
|
"""
|
|
16303
17014
|
|
|
16304
|
-
source: "
|
|
17015
|
+
source: "ExternalSecretSource"
|
|
16305
17016
|
|
|
16306
|
-
def __init__(self,source: "
|
|
17017
|
+
def __init__(self,source: "ExternalSecretSource"):
|
|
16307
17018
|
self.source = source
|
|
16308
17019
|
|
|
16309
17020
|
def __str__(self):
|
|
16310
|
-
return "ExternalSecretToSplit.
|
|
17021
|
+
return "ExternalSecretToSplit.SECRET_SOURCE(source={})".format(self.source)
|
|
16311
17022
|
|
|
16312
17023
|
def __eq__(self, other):
|
|
16313
|
-
if not other.
|
|
17024
|
+
if not other.is_secret_source():
|
|
16314
17025
|
return False
|
|
16315
17026
|
if self.source != other.source:
|
|
16316
17027
|
return False
|
|
@@ -16340,8 +17051,8 @@ class ExternalSecretToSplit:
|
|
|
16340
17051
|
|
|
16341
17052
|
# For each variant, we have an `is_NAME` method for easily checking
|
|
16342
17053
|
# whether an instance is that variant.
|
|
16343
|
-
def
|
|
16344
|
-
return isinstance(self, ExternalSecretToSplit.
|
|
17054
|
+
def is_secret_source(self) -> bool:
|
|
17055
|
+
return isinstance(self, ExternalSecretToSplit.SECRET_SOURCE)
|
|
16345
17056
|
def is_preimage(self) -> bool:
|
|
16346
17057
|
return isinstance(self, ExternalSecretToSplit.PREIMAGE)
|
|
16347
17058
|
|
|
@@ -16349,7 +17060,7 @@ class ExternalSecretToSplit:
|
|
|
16349
17060
|
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
16350
17061
|
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
16351
17062
|
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
16352
|
-
ExternalSecretToSplit.
|
|
17063
|
+
ExternalSecretToSplit.SECRET_SOURCE = type("ExternalSecretToSplit.SECRET_SOURCE", (ExternalSecretToSplit.SECRET_SOURCE, ExternalSecretToSplit,), {}) # type: ignore
|
|
16353
17064
|
ExternalSecretToSplit.PREIMAGE = type("ExternalSecretToSplit.PREIMAGE", (ExternalSecretToSplit.PREIMAGE, ExternalSecretToSplit,), {}) # type: ignore
|
|
16354
17065
|
|
|
16355
17066
|
|
|
@@ -16360,8 +17071,8 @@ class _UniffiConverterTypeExternalSecretToSplit(_UniffiConverterRustBuffer):
|
|
|
16360
17071
|
def read(buf):
|
|
16361
17072
|
variant = buf.read_i32()
|
|
16362
17073
|
if variant == 1:
|
|
16363
|
-
return ExternalSecretToSplit.
|
|
16364
|
-
|
|
17074
|
+
return ExternalSecretToSplit.SECRET_SOURCE(
|
|
17075
|
+
_UniffiConverterTypeExternalSecretSource.read(buf),
|
|
16365
17076
|
)
|
|
16366
17077
|
if variant == 2:
|
|
16367
17078
|
return ExternalSecretToSplit.PREIMAGE(
|
|
@@ -16371,8 +17082,8 @@ class _UniffiConverterTypeExternalSecretToSplit(_UniffiConverterRustBuffer):
|
|
|
16371
17082
|
|
|
16372
17083
|
@staticmethod
|
|
16373
17084
|
def check_lower(value):
|
|
16374
|
-
if value.
|
|
16375
|
-
|
|
17085
|
+
if value.is_secret_source():
|
|
17086
|
+
_UniffiConverterTypeExternalSecretSource.check_lower(value.source)
|
|
16376
17087
|
return
|
|
16377
17088
|
if value.is_preimage():
|
|
16378
17089
|
_UniffiConverterBytes.check_lower(value.data)
|
|
@@ -16381,9 +17092,9 @@ class _UniffiConverterTypeExternalSecretToSplit(_UniffiConverterRustBuffer):
|
|
|
16381
17092
|
|
|
16382
17093
|
@staticmethod
|
|
16383
17094
|
def write(value, buf):
|
|
16384
|
-
if value.
|
|
17095
|
+
if value.is_secret_source():
|
|
16385
17096
|
buf.write_i32(1)
|
|
16386
|
-
|
|
17097
|
+
_UniffiConverterTypeExternalSecretSource.write(value.source, buf)
|
|
16387
17098
|
if value.is_preimage():
|
|
16388
17099
|
buf.write_i32(2)
|
|
16389
17100
|
_UniffiConverterBytes.write(value.data, buf)
|
|
@@ -16960,61 +17671,162 @@ class _UniffiConverterTypeInputType(_UniffiConverterRustBuffer):
|
|
|
16960
17671
|
|
|
16961
17672
|
|
|
16962
17673
|
|
|
16963
|
-
class KeySetType(enum.Enum):
|
|
16964
|
-
DEFAULT = 0
|
|
16965
|
-
|
|
16966
|
-
TAPROOT = 1
|
|
16967
|
-
|
|
16968
|
-
NATIVE_SEGWIT = 2
|
|
17674
|
+
class KeySetType(enum.Enum):
|
|
17675
|
+
DEFAULT = 0
|
|
17676
|
+
|
|
17677
|
+
TAPROOT = 1
|
|
17678
|
+
|
|
17679
|
+
NATIVE_SEGWIT = 2
|
|
17680
|
+
|
|
17681
|
+
WRAPPED_SEGWIT = 3
|
|
17682
|
+
|
|
17683
|
+
LEGACY = 4
|
|
17684
|
+
|
|
17685
|
+
|
|
17686
|
+
|
|
17687
|
+
class _UniffiConverterTypeKeySetType(_UniffiConverterRustBuffer):
|
|
17688
|
+
@staticmethod
|
|
17689
|
+
def read(buf):
|
|
17690
|
+
variant = buf.read_i32()
|
|
17691
|
+
if variant == 1:
|
|
17692
|
+
return KeySetType.DEFAULT
|
|
17693
|
+
if variant == 2:
|
|
17694
|
+
return KeySetType.TAPROOT
|
|
17695
|
+
if variant == 3:
|
|
17696
|
+
return KeySetType.NATIVE_SEGWIT
|
|
17697
|
+
if variant == 4:
|
|
17698
|
+
return KeySetType.WRAPPED_SEGWIT
|
|
17699
|
+
if variant == 5:
|
|
17700
|
+
return KeySetType.LEGACY
|
|
17701
|
+
raise InternalError("Raw enum value doesn't match any cases")
|
|
17702
|
+
|
|
17703
|
+
@staticmethod
|
|
17704
|
+
def check_lower(value):
|
|
17705
|
+
if value == KeySetType.DEFAULT:
|
|
17706
|
+
return
|
|
17707
|
+
if value == KeySetType.TAPROOT:
|
|
17708
|
+
return
|
|
17709
|
+
if value == KeySetType.NATIVE_SEGWIT:
|
|
17710
|
+
return
|
|
17711
|
+
if value == KeySetType.WRAPPED_SEGWIT:
|
|
17712
|
+
return
|
|
17713
|
+
if value == KeySetType.LEGACY:
|
|
17714
|
+
return
|
|
17715
|
+
raise ValueError(value)
|
|
17716
|
+
|
|
17717
|
+
@staticmethod
|
|
17718
|
+
def write(value, buf):
|
|
17719
|
+
if value == KeySetType.DEFAULT:
|
|
17720
|
+
buf.write_i32(1)
|
|
17721
|
+
if value == KeySetType.TAPROOT:
|
|
17722
|
+
buf.write_i32(2)
|
|
17723
|
+
if value == KeySetType.NATIVE_SEGWIT:
|
|
17724
|
+
buf.write_i32(3)
|
|
17725
|
+
if value == KeySetType.WRAPPED_SEGWIT:
|
|
17726
|
+
buf.write_i32(4)
|
|
17727
|
+
if value == KeySetType.LEGACY:
|
|
17728
|
+
buf.write_i32(5)
|
|
17729
|
+
|
|
17730
|
+
|
|
17731
|
+
|
|
17732
|
+
|
|
17733
|
+
|
|
17734
|
+
|
|
17735
|
+
|
|
17736
|
+
class LnurlCallbackStatus:
|
|
17737
|
+
"""
|
|
17738
|
+
The response from a LNURL-auth callback, indicating success or failure.
|
|
17739
|
+
"""
|
|
17740
|
+
|
|
17741
|
+
def __init__(self):
|
|
17742
|
+
raise RuntimeError("LnurlCallbackStatus cannot be instantiated directly")
|
|
17743
|
+
|
|
17744
|
+
# Each enum variant is a nested class of the enum itself.
|
|
17745
|
+
class OK:
|
|
17746
|
+
"""
|
|
17747
|
+
On-wire format is: `{"status": "OK"}`
|
|
17748
|
+
"""
|
|
17749
|
+
|
|
17750
|
+
|
|
17751
|
+
def __init__(self,):
|
|
17752
|
+
pass
|
|
17753
|
+
|
|
17754
|
+
def __str__(self):
|
|
17755
|
+
return "LnurlCallbackStatus.OK()".format()
|
|
17756
|
+
|
|
17757
|
+
def __eq__(self, other):
|
|
17758
|
+
if not other.is_ok():
|
|
17759
|
+
return False
|
|
17760
|
+
return True
|
|
17761
|
+
|
|
17762
|
+
class ERROR_STATUS:
|
|
17763
|
+
"""
|
|
17764
|
+
On-wire format is: `{"status": "ERROR", "reason": "error details..."}`
|
|
17765
|
+
"""
|
|
17766
|
+
|
|
17767
|
+
error_details: "LnurlErrorDetails"
|
|
17768
|
+
|
|
17769
|
+
def __init__(self,error_details: "LnurlErrorDetails"):
|
|
17770
|
+
self.error_details = error_details
|
|
17771
|
+
|
|
17772
|
+
def __str__(self):
|
|
17773
|
+
return "LnurlCallbackStatus.ERROR_STATUS(error_details={})".format(self.error_details)
|
|
17774
|
+
|
|
17775
|
+
def __eq__(self, other):
|
|
17776
|
+
if not other.is_error_status():
|
|
17777
|
+
return False
|
|
17778
|
+
if self.error_details != other.error_details:
|
|
17779
|
+
return False
|
|
17780
|
+
return True
|
|
16969
17781
|
|
|
16970
|
-
WRAPPED_SEGWIT = 3
|
|
16971
17782
|
|
|
16972
|
-
|
|
17783
|
+
|
|
17784
|
+
# For each variant, we have an `is_NAME` method for easily checking
|
|
17785
|
+
# whether an instance is that variant.
|
|
17786
|
+
def is_ok(self) -> bool:
|
|
17787
|
+
return isinstance(self, LnurlCallbackStatus.OK)
|
|
17788
|
+
def is_error_status(self) -> bool:
|
|
17789
|
+
return isinstance(self, LnurlCallbackStatus.ERROR_STATUS)
|
|
16973
17790
|
|
|
16974
17791
|
|
|
17792
|
+
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
17793
|
+
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
17794
|
+
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
17795
|
+
LnurlCallbackStatus.OK = type("LnurlCallbackStatus.OK", (LnurlCallbackStatus.OK, LnurlCallbackStatus,), {}) # type: ignore
|
|
17796
|
+
LnurlCallbackStatus.ERROR_STATUS = type("LnurlCallbackStatus.ERROR_STATUS", (LnurlCallbackStatus.ERROR_STATUS, LnurlCallbackStatus,), {}) # type: ignore
|
|
17797
|
+
|
|
16975
17798
|
|
|
16976
|
-
|
|
17799
|
+
|
|
17800
|
+
|
|
17801
|
+
class _UniffiConverterTypeLnurlCallbackStatus(_UniffiConverterRustBuffer):
|
|
16977
17802
|
@staticmethod
|
|
16978
17803
|
def read(buf):
|
|
16979
17804
|
variant = buf.read_i32()
|
|
16980
17805
|
if variant == 1:
|
|
16981
|
-
return
|
|
17806
|
+
return LnurlCallbackStatus.OK(
|
|
17807
|
+
)
|
|
16982
17808
|
if variant == 2:
|
|
16983
|
-
return
|
|
16984
|
-
|
|
16985
|
-
|
|
16986
|
-
if variant == 4:
|
|
16987
|
-
return KeySetType.WRAPPED_SEGWIT
|
|
16988
|
-
if variant == 5:
|
|
16989
|
-
return KeySetType.LEGACY
|
|
17809
|
+
return LnurlCallbackStatus.ERROR_STATUS(
|
|
17810
|
+
_UniffiConverterTypeLnurlErrorDetails.read(buf),
|
|
17811
|
+
)
|
|
16990
17812
|
raise InternalError("Raw enum value doesn't match any cases")
|
|
16991
17813
|
|
|
16992
17814
|
@staticmethod
|
|
16993
17815
|
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:
|
|
17816
|
+
if value.is_ok():
|
|
17001
17817
|
return
|
|
17002
|
-
if value
|
|
17818
|
+
if value.is_error_status():
|
|
17819
|
+
_UniffiConverterTypeLnurlErrorDetails.check_lower(value.error_details)
|
|
17003
17820
|
return
|
|
17004
17821
|
raise ValueError(value)
|
|
17005
17822
|
|
|
17006
17823
|
@staticmethod
|
|
17007
17824
|
def write(value, buf):
|
|
17008
|
-
if value
|
|
17825
|
+
if value.is_ok():
|
|
17009
17826
|
buf.write_i32(1)
|
|
17010
|
-
if value
|
|
17827
|
+
if value.is_error_status():
|
|
17011
17828
|
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)
|
|
17829
|
+
_UniffiConverterTypeLnurlErrorDetails.write(value.error_details, buf)
|
|
17018
17830
|
|
|
17019
17831
|
|
|
17020
17832
|
|
|
@@ -17470,19 +18282,19 @@ class PaymentDetails:
|
|
|
17470
18282
|
The HTLC transfer details if the payment fulfilled an HTLC transfer
|
|
17471
18283
|
"""
|
|
17472
18284
|
|
|
17473
|
-
|
|
18285
|
+
conversion_info: "typing.Optional[ConversionInfo]"
|
|
17474
18286
|
"""
|
|
17475
|
-
The information for a
|
|
18287
|
+
The information for a conversion
|
|
17476
18288
|
"""
|
|
17477
18289
|
|
|
17478
18290
|
|
|
17479
|
-
def __init__(self,invoice_details: "typing.Optional[SparkInvoicePaymentDetails]", htlc_details: "typing.Optional[SparkHtlcDetails]",
|
|
18291
|
+
def __init__(self,invoice_details: "typing.Optional[SparkInvoicePaymentDetails]", htlc_details: "typing.Optional[SparkHtlcDetails]", conversion_info: "typing.Optional[ConversionInfo]"):
|
|
17480
18292
|
self.invoice_details = invoice_details
|
|
17481
18293
|
self.htlc_details = htlc_details
|
|
17482
|
-
self.
|
|
18294
|
+
self.conversion_info = conversion_info
|
|
17483
18295
|
|
|
17484
18296
|
def __str__(self):
|
|
17485
|
-
return "PaymentDetails.SPARK(invoice_details={}, htlc_details={},
|
|
18297
|
+
return "PaymentDetails.SPARK(invoice_details={}, htlc_details={}, conversion_info={})".format(self.invoice_details, self.htlc_details, self.conversion_info)
|
|
17486
18298
|
|
|
17487
18299
|
def __eq__(self, other):
|
|
17488
18300
|
if not other.is_spark():
|
|
@@ -17491,7 +18303,7 @@ class PaymentDetails:
|
|
|
17491
18303
|
return False
|
|
17492
18304
|
if self.htlc_details != other.htlc_details:
|
|
17493
18305
|
return False
|
|
17494
|
-
if self.
|
|
18306
|
+
if self.conversion_info != other.conversion_info:
|
|
17495
18307
|
return False
|
|
17496
18308
|
return True
|
|
17497
18309
|
|
|
@@ -17503,20 +18315,20 @@ class PaymentDetails:
|
|
|
17503
18315
|
The invoice details if the payment fulfilled a spark invoice
|
|
17504
18316
|
"""
|
|
17505
18317
|
|
|
17506
|
-
|
|
18318
|
+
conversion_info: "typing.Optional[ConversionInfo]"
|
|
17507
18319
|
"""
|
|
17508
|
-
The information for a
|
|
18320
|
+
The information for a conversion
|
|
17509
18321
|
"""
|
|
17510
18322
|
|
|
17511
18323
|
|
|
17512
|
-
def __init__(self,metadata: "TokenMetadata", tx_hash: "str", invoice_details: "typing.Optional[SparkInvoicePaymentDetails]",
|
|
18324
|
+
def __init__(self,metadata: "TokenMetadata", tx_hash: "str", invoice_details: "typing.Optional[SparkInvoicePaymentDetails]", conversion_info: "typing.Optional[ConversionInfo]"):
|
|
17513
18325
|
self.metadata = metadata
|
|
17514
18326
|
self.tx_hash = tx_hash
|
|
17515
18327
|
self.invoice_details = invoice_details
|
|
17516
|
-
self.
|
|
18328
|
+
self.conversion_info = conversion_info
|
|
17517
18329
|
|
|
17518
18330
|
def __str__(self):
|
|
17519
|
-
return "PaymentDetails.TOKEN(metadata={}, tx_hash={}, invoice_details={},
|
|
18331
|
+
return "PaymentDetails.TOKEN(metadata={}, tx_hash={}, invoice_details={}, conversion_info={})".format(self.metadata, self.tx_hash, self.invoice_details, self.conversion_info)
|
|
17520
18332
|
|
|
17521
18333
|
def __eq__(self, other):
|
|
17522
18334
|
if not other.is_token():
|
|
@@ -17527,7 +18339,7 @@ class PaymentDetails:
|
|
|
17527
18339
|
return False
|
|
17528
18340
|
if self.invoice_details != other.invoice_details:
|
|
17529
18341
|
return False
|
|
17530
|
-
if self.
|
|
18342
|
+
if self.conversion_info != other.conversion_info:
|
|
17531
18343
|
return False
|
|
17532
18344
|
return True
|
|
17533
18345
|
|
|
@@ -17677,14 +18489,14 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
|
|
|
17677
18489
|
return PaymentDetails.SPARK(
|
|
17678
18490
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.read(buf),
|
|
17679
18491
|
_UniffiConverterOptionalTypeSparkHtlcDetails.read(buf),
|
|
17680
|
-
|
|
18492
|
+
_UniffiConverterOptionalTypeConversionInfo.read(buf),
|
|
17681
18493
|
)
|
|
17682
18494
|
if variant == 2:
|
|
17683
18495
|
return PaymentDetails.TOKEN(
|
|
17684
18496
|
_UniffiConverterTypeTokenMetadata.read(buf),
|
|
17685
18497
|
_UniffiConverterString.read(buf),
|
|
17686
18498
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.read(buf),
|
|
17687
|
-
|
|
18499
|
+
_UniffiConverterOptionalTypeConversionInfo.read(buf),
|
|
17688
18500
|
)
|
|
17689
18501
|
if variant == 3:
|
|
17690
18502
|
return PaymentDetails.LIGHTNING(
|
|
@@ -17712,13 +18524,13 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
|
|
|
17712
18524
|
if value.is_spark():
|
|
17713
18525
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.check_lower(value.invoice_details)
|
|
17714
18526
|
_UniffiConverterOptionalTypeSparkHtlcDetails.check_lower(value.htlc_details)
|
|
17715
|
-
|
|
18527
|
+
_UniffiConverterOptionalTypeConversionInfo.check_lower(value.conversion_info)
|
|
17716
18528
|
return
|
|
17717
18529
|
if value.is_token():
|
|
17718
18530
|
_UniffiConverterTypeTokenMetadata.check_lower(value.metadata)
|
|
17719
18531
|
_UniffiConverterString.check_lower(value.tx_hash)
|
|
17720
18532
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.check_lower(value.invoice_details)
|
|
17721
|
-
|
|
18533
|
+
_UniffiConverterOptionalTypeConversionInfo.check_lower(value.conversion_info)
|
|
17722
18534
|
return
|
|
17723
18535
|
if value.is_lightning():
|
|
17724
18536
|
_UniffiConverterOptionalString.check_lower(value.description)
|
|
@@ -17744,13 +18556,13 @@ class _UniffiConverterTypePaymentDetails(_UniffiConverterRustBuffer):
|
|
|
17744
18556
|
buf.write_i32(1)
|
|
17745
18557
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.write(value.invoice_details, buf)
|
|
17746
18558
|
_UniffiConverterOptionalTypeSparkHtlcDetails.write(value.htlc_details, buf)
|
|
17747
|
-
|
|
18559
|
+
_UniffiConverterOptionalTypeConversionInfo.write(value.conversion_info, buf)
|
|
17748
18560
|
if value.is_token():
|
|
17749
18561
|
buf.write_i32(2)
|
|
17750
18562
|
_UniffiConverterTypeTokenMetadata.write(value.metadata, buf)
|
|
17751
18563
|
_UniffiConverterString.write(value.tx_hash, buf)
|
|
17752
18564
|
_UniffiConverterOptionalTypeSparkInvoicePaymentDetails.write(value.invoice_details, buf)
|
|
17753
|
-
|
|
18565
|
+
_UniffiConverterOptionalTypeConversionInfo.write(value.conversion_info, buf)
|
|
17754
18566
|
if value.is_lightning():
|
|
17755
18567
|
buf.write_i32(3)
|
|
17756
18568
|
_UniffiConverterOptionalString.write(value.description, buf)
|
|
@@ -18373,7 +19185,7 @@ class ReceivePaymentMethod:
|
|
|
18373
19185
|
|
|
18374
19186
|
expiry_time: "typing.Optional[int]"
|
|
18375
19187
|
"""
|
|
18376
|
-
The expiry time of the invoice
|
|
19188
|
+
The expiry time of the invoice as a unix timestamp in seconds
|
|
18377
19189
|
"""
|
|
18378
19190
|
|
|
18379
19191
|
description: "typing.Optional[str]"
|
|
@@ -18430,7 +19242,7 @@ class ReceivePaymentMethod:
|
|
|
18430
19242
|
amount_sats: "typing.Optional[int]"
|
|
18431
19243
|
expiry_secs: "typing.Optional[int]"
|
|
18432
19244
|
"""
|
|
18433
|
-
The expiry
|
|
19245
|
+
The expiry of the invoice as a duration in seconds
|
|
18434
19246
|
"""
|
|
18435
19247
|
|
|
18436
19248
|
|
|
@@ -20709,103 +21521,6 @@ class _UniffiConverterTypeSyncStorageError(_UniffiConverterRustBuffer):
|
|
|
20709
21521
|
|
|
20710
21522
|
|
|
20711
21523
|
|
|
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
21524
|
class UpdateDepositPayload:
|
|
20810
21525
|
def __init__(self):
|
|
20811
21526
|
raise RuntimeError("UpdateDepositPayload cannot be instantiated directly")
|
|
@@ -21156,6 +21871,87 @@ class _UniffiConverterOptionalBytes(_UniffiConverterRustBuffer):
|
|
|
21156
21871
|
|
|
21157
21872
|
|
|
21158
21873
|
|
|
21874
|
+
class _UniffiConverterOptionalTypeConversionEstimate(_UniffiConverterRustBuffer):
|
|
21875
|
+
@classmethod
|
|
21876
|
+
def check_lower(cls, value):
|
|
21877
|
+
if value is not None:
|
|
21878
|
+
_UniffiConverterTypeConversionEstimate.check_lower(value)
|
|
21879
|
+
|
|
21880
|
+
@classmethod
|
|
21881
|
+
def write(cls, value, buf):
|
|
21882
|
+
if value is None:
|
|
21883
|
+
buf.write_u8(0)
|
|
21884
|
+
return
|
|
21885
|
+
|
|
21886
|
+
buf.write_u8(1)
|
|
21887
|
+
_UniffiConverterTypeConversionEstimate.write(value, buf)
|
|
21888
|
+
|
|
21889
|
+
@classmethod
|
|
21890
|
+
def read(cls, buf):
|
|
21891
|
+
flag = buf.read_u8()
|
|
21892
|
+
if flag == 0:
|
|
21893
|
+
return None
|
|
21894
|
+
elif flag == 1:
|
|
21895
|
+
return _UniffiConverterTypeConversionEstimate.read(buf)
|
|
21896
|
+
else:
|
|
21897
|
+
raise InternalError("Unexpected flag byte for optional type")
|
|
21898
|
+
|
|
21899
|
+
|
|
21900
|
+
|
|
21901
|
+
class _UniffiConverterOptionalTypeConversionInfo(_UniffiConverterRustBuffer):
|
|
21902
|
+
@classmethod
|
|
21903
|
+
def check_lower(cls, value):
|
|
21904
|
+
if value is not None:
|
|
21905
|
+
_UniffiConverterTypeConversionInfo.check_lower(value)
|
|
21906
|
+
|
|
21907
|
+
@classmethod
|
|
21908
|
+
def write(cls, value, buf):
|
|
21909
|
+
if value is None:
|
|
21910
|
+
buf.write_u8(0)
|
|
21911
|
+
return
|
|
21912
|
+
|
|
21913
|
+
buf.write_u8(1)
|
|
21914
|
+
_UniffiConverterTypeConversionInfo.write(value, buf)
|
|
21915
|
+
|
|
21916
|
+
@classmethod
|
|
21917
|
+
def read(cls, buf):
|
|
21918
|
+
flag = buf.read_u8()
|
|
21919
|
+
if flag == 0:
|
|
21920
|
+
return None
|
|
21921
|
+
elif flag == 1:
|
|
21922
|
+
return _UniffiConverterTypeConversionInfo.read(buf)
|
|
21923
|
+
else:
|
|
21924
|
+
raise InternalError("Unexpected flag byte for optional type")
|
|
21925
|
+
|
|
21926
|
+
|
|
21927
|
+
|
|
21928
|
+
class _UniffiConverterOptionalTypeConversionOptions(_UniffiConverterRustBuffer):
|
|
21929
|
+
@classmethod
|
|
21930
|
+
def check_lower(cls, value):
|
|
21931
|
+
if value is not None:
|
|
21932
|
+
_UniffiConverterTypeConversionOptions.check_lower(value)
|
|
21933
|
+
|
|
21934
|
+
@classmethod
|
|
21935
|
+
def write(cls, value, buf):
|
|
21936
|
+
if value is None:
|
|
21937
|
+
buf.write_u8(0)
|
|
21938
|
+
return
|
|
21939
|
+
|
|
21940
|
+
buf.write_u8(1)
|
|
21941
|
+
_UniffiConverterTypeConversionOptions.write(value, buf)
|
|
21942
|
+
|
|
21943
|
+
@classmethod
|
|
21944
|
+
def read(cls, buf):
|
|
21945
|
+
flag = buf.read_u8()
|
|
21946
|
+
if flag == 0:
|
|
21947
|
+
return None
|
|
21948
|
+
elif flag == 1:
|
|
21949
|
+
return _UniffiConverterTypeConversionOptions.read(buf)
|
|
21950
|
+
else:
|
|
21951
|
+
raise InternalError("Unexpected flag byte for optional type")
|
|
21952
|
+
|
|
21953
|
+
|
|
21954
|
+
|
|
21159
21955
|
class _UniffiConverterOptionalTypeCredentials(_UniffiConverterRustBuffer):
|
|
21160
21956
|
@classmethod
|
|
21161
21957
|
def check_lower(cls, value):
|
|
@@ -21507,38 +22303,11 @@ class _UniffiConverterOptionalTypeSymbol(_UniffiConverterRustBuffer):
|
|
|
21507
22303
|
|
|
21508
22304
|
|
|
21509
22305
|
|
|
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):
|
|
22306
|
+
class _UniffiConverterOptionalTypeAmount(_UniffiConverterRustBuffer):
|
|
21538
22307
|
@classmethod
|
|
21539
22308
|
def check_lower(cls, value):
|
|
21540
22309
|
if value is not None:
|
|
21541
|
-
|
|
22310
|
+
_UniffiConverterTypeAmount.check_lower(value)
|
|
21542
22311
|
|
|
21543
22312
|
@classmethod
|
|
21544
22313
|
def write(cls, value, buf):
|
|
@@ -21547,7 +22316,7 @@ class _UniffiConverterOptionalTypeTokenConversionOptions(_UniffiConverterRustBuf
|
|
|
21547
22316
|
return
|
|
21548
22317
|
|
|
21549
22318
|
buf.write_u8(1)
|
|
21550
|
-
|
|
22319
|
+
_UniffiConverterTypeAmount.write(value, buf)
|
|
21551
22320
|
|
|
21552
22321
|
@classmethod
|
|
21553
22322
|
def read(cls, buf):
|
|
@@ -21555,17 +22324,17 @@ class _UniffiConverterOptionalTypeTokenConversionOptions(_UniffiConverterRustBuf
|
|
|
21555
22324
|
if flag == 0:
|
|
21556
22325
|
return None
|
|
21557
22326
|
elif flag == 1:
|
|
21558
|
-
return
|
|
22327
|
+
return _UniffiConverterTypeAmount.read(buf)
|
|
21559
22328
|
else:
|
|
21560
22329
|
raise InternalError("Unexpected flag byte for optional type")
|
|
21561
22330
|
|
|
21562
22331
|
|
|
21563
22332
|
|
|
21564
|
-
class
|
|
22333
|
+
class _UniffiConverterOptionalTypeAssetFilter(_UniffiConverterRustBuffer):
|
|
21565
22334
|
@classmethod
|
|
21566
22335
|
def check_lower(cls, value):
|
|
21567
22336
|
if value is not None:
|
|
21568
|
-
|
|
22337
|
+
_UniffiConverterTypeAssetFilter.check_lower(value)
|
|
21569
22338
|
|
|
21570
22339
|
@classmethod
|
|
21571
22340
|
def write(cls, value, buf):
|
|
@@ -21574,7 +22343,7 @@ class _UniffiConverterOptionalTypeAmount(_UniffiConverterRustBuffer):
|
|
|
21574
22343
|
return
|
|
21575
22344
|
|
|
21576
22345
|
buf.write_u8(1)
|
|
21577
|
-
|
|
22346
|
+
_UniffiConverterTypeAssetFilter.write(value, buf)
|
|
21578
22347
|
|
|
21579
22348
|
@classmethod
|
|
21580
22349
|
def read(cls, buf):
|
|
@@ -21582,17 +22351,17 @@ class _UniffiConverterOptionalTypeAmount(_UniffiConverterRustBuffer):
|
|
|
21582
22351
|
if flag == 0:
|
|
21583
22352
|
return None
|
|
21584
22353
|
elif flag == 1:
|
|
21585
|
-
return
|
|
22354
|
+
return _UniffiConverterTypeAssetFilter.read(buf)
|
|
21586
22355
|
else:
|
|
21587
22356
|
raise InternalError("Unexpected flag byte for optional type")
|
|
21588
22357
|
|
|
21589
22358
|
|
|
21590
22359
|
|
|
21591
|
-
class
|
|
22360
|
+
class _UniffiConverterOptionalTypeConversionPurpose(_UniffiConverterRustBuffer):
|
|
21592
22361
|
@classmethod
|
|
21593
22362
|
def check_lower(cls, value):
|
|
21594
22363
|
if value is not None:
|
|
21595
|
-
|
|
22364
|
+
_UniffiConverterTypeConversionPurpose.check_lower(value)
|
|
21596
22365
|
|
|
21597
22366
|
@classmethod
|
|
21598
22367
|
def write(cls, value, buf):
|
|
@@ -21601,7 +22370,7 @@ class _UniffiConverterOptionalTypeAssetFilter(_UniffiConverterRustBuffer):
|
|
|
21601
22370
|
return
|
|
21602
22371
|
|
|
21603
22372
|
buf.write_u8(1)
|
|
21604
|
-
|
|
22373
|
+
_UniffiConverterTypeConversionPurpose.write(value, buf)
|
|
21605
22374
|
|
|
21606
22375
|
@classmethod
|
|
21607
22376
|
def read(cls, buf):
|
|
@@ -21609,7 +22378,7 @@ class _UniffiConverterOptionalTypeAssetFilter(_UniffiConverterRustBuffer):
|
|
|
21609
22378
|
if flag == 0:
|
|
21610
22379
|
return None
|
|
21611
22380
|
elif flag == 1:
|
|
21612
|
-
return
|
|
22381
|
+
return _UniffiConverterTypeConversionPurpose.read(buf)
|
|
21613
22382
|
else:
|
|
21614
22383
|
raise InternalError("Unexpected flag byte for optional type")
|
|
21615
22384
|
|
|
@@ -23072,12 +23841,16 @@ __all__ = [
|
|
|
23072
23841
|
"BitcoinNetwork",
|
|
23073
23842
|
"ChainApiType",
|
|
23074
23843
|
"ChainServiceError",
|
|
23844
|
+
"ConversionPurpose",
|
|
23845
|
+
"ConversionStatus",
|
|
23846
|
+
"ConversionType",
|
|
23075
23847
|
"DepositClaimError",
|
|
23076
|
-
"
|
|
23848
|
+
"ExternalSecretSource",
|
|
23077
23849
|
"ExternalSecretToSplit",
|
|
23078
23850
|
"Fee",
|
|
23079
23851
|
"InputType",
|
|
23080
23852
|
"KeySetType",
|
|
23853
|
+
"LnurlCallbackStatus",
|
|
23081
23854
|
"MaxFee",
|
|
23082
23855
|
"Network",
|
|
23083
23856
|
"OnchainConfirmationSpeed",
|
|
@@ -23102,7 +23875,6 @@ __all__ = [
|
|
|
23102
23875
|
"SuccessAction",
|
|
23103
23876
|
"SuccessActionProcessed",
|
|
23104
23877
|
"SyncStorageError",
|
|
23105
|
-
"TokenConversionType",
|
|
23106
23878
|
"UpdateDepositPayload",
|
|
23107
23879
|
"AesSuccessActionData",
|
|
23108
23880
|
"AesSuccessActionDataDecrypted",
|
|
@@ -23130,13 +23902,16 @@ __all__ = [
|
|
|
23130
23902
|
"Config",
|
|
23131
23903
|
"ConnectRequest",
|
|
23132
23904
|
"ConnectWithSignerRequest",
|
|
23905
|
+
"ConversionEstimate",
|
|
23906
|
+
"ConversionInfo",
|
|
23907
|
+
"ConversionOptions",
|
|
23133
23908
|
"CreateIssuerTokenRequest",
|
|
23134
23909
|
"Credentials",
|
|
23135
23910
|
"CurrencyInfo",
|
|
23136
23911
|
"DepositInfo",
|
|
23137
23912
|
"EcdsaSignatureBytes",
|
|
23138
23913
|
"ExternalAggregateFrostRequest",
|
|
23139
|
-
"
|
|
23914
|
+
"ExternalEncryptedSecret",
|
|
23140
23915
|
"ExternalFrostCommitments",
|
|
23141
23916
|
"ExternalFrostSignature",
|
|
23142
23917
|
"ExternalFrostSignatureShare",
|
|
@@ -23148,8 +23923,8 @@ __all__ = [
|
|
|
23148
23923
|
"ExternalSigningCommitments",
|
|
23149
23924
|
"ExternalTreeNodeId",
|
|
23150
23925
|
"ExternalVerifiableSecretShare",
|
|
23151
|
-
"
|
|
23152
|
-
"
|
|
23926
|
+
"FetchConversionLimitsRequest",
|
|
23927
|
+
"FetchConversionLimitsResponse",
|
|
23153
23928
|
"FiatCurrency",
|
|
23154
23929
|
"FreezeIssuerTokenRequest",
|
|
23155
23930
|
"FreezeIssuerTokenResponse",
|
|
@@ -23159,6 +23934,7 @@ __all__ = [
|
|
|
23159
23934
|
"GetPaymentResponse",
|
|
23160
23935
|
"GetTokensMetadataRequest",
|
|
23161
23936
|
"GetTokensMetadataResponse",
|
|
23937
|
+
"HashedMessageBytes",
|
|
23162
23938
|
"IdentifierCommitmentPair",
|
|
23163
23939
|
"IdentifierPublicKeyPair",
|
|
23164
23940
|
"IdentifierSignaturePair",
|
|
@@ -23173,6 +23949,7 @@ __all__ = [
|
|
|
23173
23949
|
"ListUnclaimedDepositsRequest",
|
|
23174
23950
|
"ListUnclaimedDepositsResponse",
|
|
23175
23951
|
"LnurlAuthRequestDetails",
|
|
23952
|
+
"LnurlErrorDetails",
|
|
23176
23953
|
"LnurlPayInfo",
|
|
23177
23954
|
"LnurlPayRequest",
|
|
23178
23955
|
"LnurlPayRequestDetails",
|
|
@@ -23185,6 +23962,7 @@ __all__ = [
|
|
|
23185
23962
|
"LocaleOverrides",
|
|
23186
23963
|
"LocalizedName",
|
|
23187
23964
|
"LogEntry",
|
|
23965
|
+
"MessageBytes",
|
|
23188
23966
|
"MessageSuccessActionData",
|
|
23189
23967
|
"MintIssuerTokenRequest",
|
|
23190
23968
|
"OptimizationConfig",
|
|
@@ -23197,7 +23975,6 @@ __all__ = [
|
|
|
23197
23975
|
"PrepareLnurlPayResponse",
|
|
23198
23976
|
"PrepareSendPaymentRequest",
|
|
23199
23977
|
"PrepareSendPaymentResponse",
|
|
23200
|
-
"PrivateKeyBytes",
|
|
23201
23978
|
"ProvisionalPayment",
|
|
23202
23979
|
"PublicKeyBytes",
|
|
23203
23980
|
"Rate",
|
|
@@ -23213,6 +23990,7 @@ __all__ = [
|
|
|
23213
23990
|
"RegisterLightningAddressRequest",
|
|
23214
23991
|
"RestResponse",
|
|
23215
23992
|
"SchnorrSignatureBytes",
|
|
23993
|
+
"SecretBytes",
|
|
23216
23994
|
"SendOnchainFeeQuote",
|
|
23217
23995
|
"SendOnchainSpeedFeeQuote",
|
|
23218
23996
|
"SendPaymentRequest",
|
|
@@ -23230,8 +24008,6 @@ __all__ = [
|
|
|
23230
24008
|
"SyncWalletRequest",
|
|
23231
24009
|
"SyncWalletResponse",
|
|
23232
24010
|
"TokenBalance",
|
|
23233
|
-
"TokenConversionInfo",
|
|
23234
|
-
"TokenConversionOptions",
|
|
23235
24011
|
"TokenMetadata",
|
|
23236
24012
|
"TxStatus",
|
|
23237
24013
|
"UnfreezeIssuerTokenRequest",
|