breez-sdk-spark 0.1.9.dev2__cp39-cp39-manylinux_2_31_aarch64.whl → 0.2.1__cp39-cp39-manylinux_2_31_aarch64.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.
Potentially problematic release.
This version of breez-sdk-spark might be problematic. Click here for more details.
- {breez_sdk_spark-0.1.9.dev2.data → breez_sdk_spark-0.2.1.data}/purelib/breez_sdk_spark/breez_sdk_common.py +330 -31
- {breez_sdk_spark-0.1.9.dev2.data → breez_sdk_spark-0.2.1.data}/purelib/breez_sdk_spark/breez_sdk_spark.py +458 -28
- {breez_sdk_spark-0.1.9.dev2.data → breez_sdk_spark-0.2.1.data}/purelib/breez_sdk_spark/libbreez_sdk_spark_bindings.so +0 -0
- {breez_sdk_spark-0.1.9.dev2.dist-info → breez_sdk_spark-0.2.1.dist-info}/METADATA +1 -1
- breez_sdk_spark-0.2.1.dist-info/RECORD +9 -0
- breez_sdk_spark-0.1.9.dev2.dist-info/RECORD +0 -9
- {breez_sdk_spark-0.1.9.dev2.data → breez_sdk_spark-0.2.1.data}/purelib/breez_sdk_spark/__init__.py +0 -0
- {breez_sdk_spark-0.1.9.dev2.data → breez_sdk_spark-0.2.1.data}/purelib/breez_sdk_spark/breez_sdk_spark_bindings.py +0 -0
- {breez_sdk_spark-0.1.9.dev2.dist-info → breez_sdk_spark-0.2.1.dist-info}/WHEEL +0 -0
- {breez_sdk_spark-0.1.9.dev2.dist-info → breez_sdk_spark-0.2.1.dist-info}/top_level.txt +0 -0
|
@@ -461,6 +461,10 @@ def _uniffi_check_contract_api_version(lib):
|
|
|
461
461
|
raise InternalError("UniFFI contract version mismatch: try cleaning and rebuilding your project")
|
|
462
462
|
|
|
463
463
|
def _uniffi_check_api_checksums(lib):
|
|
464
|
+
if lib.uniffi_breez_sdk_common_checksum_method_fiatservice_fetch_fiat_currencies() != 63089:
|
|
465
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
466
|
+
if lib.uniffi_breez_sdk_common_checksum_method_fiatservice_fetch_fiat_rates() != 48636:
|
|
467
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
464
468
|
if lib.uniffi_breez_sdk_common_checksum_method_restclient_get_request() != 1702:
|
|
465
469
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
466
470
|
if lib.uniffi_breez_sdk_common_checksum_method_restclient_post_request() != 38998:
|
|
@@ -573,12 +577,22 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure):
|
|
|
573
577
|
]
|
|
574
578
|
_UNIFFI_FOREIGN_FUTURE_COMPLETE_VOID = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureStructVoid,
|
|
575
579
|
)
|
|
580
|
+
_UNIFFI_CALLBACK_INTERFACE_FIAT_SERVICE_METHOD0 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
581
|
+
)
|
|
582
|
+
_UNIFFI_CALLBACK_INTERFACE_FIAT_SERVICE_METHOD1 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
583
|
+
)
|
|
576
584
|
_UNIFFI_CALLBACK_INTERFACE_REST_CLIENT_METHOD0 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
577
585
|
)
|
|
578
586
|
_UNIFFI_CALLBACK_INTERFACE_REST_CLIENT_METHOD1 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UniffiRustBuffer,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
579
587
|
)
|
|
580
588
|
_UNIFFI_CALLBACK_INTERFACE_REST_CLIENT_METHOD2 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UniffiRustBuffer,_UniffiRustBuffer,_UNIFFI_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER,ctypes.c_uint64,ctypes.POINTER(_UniffiForeignFuture),
|
|
581
589
|
)
|
|
590
|
+
class _UniffiVTableCallbackInterfaceFiatService(ctypes.Structure):
|
|
591
|
+
_fields_ = [
|
|
592
|
+
("fetch_fiat_currencies", _UNIFFI_CALLBACK_INTERFACE_FIAT_SERVICE_METHOD0),
|
|
593
|
+
("fetch_fiat_rates", _UNIFFI_CALLBACK_INTERFACE_FIAT_SERVICE_METHOD1),
|
|
594
|
+
("uniffi_free", _UNIFFI_CALLBACK_INTERFACE_FREE),
|
|
595
|
+
]
|
|
582
596
|
class _UniffiVTableCallbackInterfaceRestClient(ctypes.Structure):
|
|
583
597
|
_fields_ = [
|
|
584
598
|
("get_request", _UNIFFI_CALLBACK_INTERFACE_REST_CLIENT_METHOD0),
|
|
@@ -586,6 +600,28 @@ class _UniffiVTableCallbackInterfaceRestClient(ctypes.Structure):
|
|
|
586
600
|
("delete_request", _UNIFFI_CALLBACK_INTERFACE_REST_CLIENT_METHOD2),
|
|
587
601
|
("uniffi_free", _UNIFFI_CALLBACK_INTERFACE_FREE),
|
|
588
602
|
]
|
|
603
|
+
_UniffiLib.uniffi_breez_sdk_common_fn_clone_fiatservice.argtypes = (
|
|
604
|
+
ctypes.c_void_p,
|
|
605
|
+
ctypes.POINTER(_UniffiRustCallStatus),
|
|
606
|
+
)
|
|
607
|
+
_UniffiLib.uniffi_breez_sdk_common_fn_clone_fiatservice.restype = ctypes.c_void_p
|
|
608
|
+
_UniffiLib.uniffi_breez_sdk_common_fn_free_fiatservice.argtypes = (
|
|
609
|
+
ctypes.c_void_p,
|
|
610
|
+
ctypes.POINTER(_UniffiRustCallStatus),
|
|
611
|
+
)
|
|
612
|
+
_UniffiLib.uniffi_breez_sdk_common_fn_free_fiatservice.restype = None
|
|
613
|
+
_UniffiLib.uniffi_breez_sdk_common_fn_init_callback_vtable_fiatservice.argtypes = (
|
|
614
|
+
ctypes.POINTER(_UniffiVTableCallbackInterfaceFiatService),
|
|
615
|
+
)
|
|
616
|
+
_UniffiLib.uniffi_breez_sdk_common_fn_init_callback_vtable_fiatservice.restype = None
|
|
617
|
+
_UniffiLib.uniffi_breez_sdk_common_fn_method_fiatservice_fetch_fiat_currencies.argtypes = (
|
|
618
|
+
ctypes.c_void_p,
|
|
619
|
+
)
|
|
620
|
+
_UniffiLib.uniffi_breez_sdk_common_fn_method_fiatservice_fetch_fiat_currencies.restype = ctypes.c_uint64
|
|
621
|
+
_UniffiLib.uniffi_breez_sdk_common_fn_method_fiatservice_fetch_fiat_rates.argtypes = (
|
|
622
|
+
ctypes.c_void_p,
|
|
623
|
+
)
|
|
624
|
+
_UniffiLib.uniffi_breez_sdk_common_fn_method_fiatservice_fetch_fiat_rates.restype = ctypes.c_uint64
|
|
589
625
|
_UniffiLib.uniffi_breez_sdk_common_fn_clone_restclient.argtypes = (
|
|
590
626
|
ctypes.c_void_p,
|
|
591
627
|
ctypes.POINTER(_UniffiRustCallStatus),
|
|
@@ -888,6 +924,12 @@ _UniffiLib.ffi_breez_sdk_common_rust_future_complete_void.argtypes = (
|
|
|
888
924
|
ctypes.POINTER(_UniffiRustCallStatus),
|
|
889
925
|
)
|
|
890
926
|
_UniffiLib.ffi_breez_sdk_common_rust_future_complete_void.restype = None
|
|
927
|
+
_UniffiLib.uniffi_breez_sdk_common_checksum_method_fiatservice_fetch_fiat_currencies.argtypes = (
|
|
928
|
+
)
|
|
929
|
+
_UniffiLib.uniffi_breez_sdk_common_checksum_method_fiatservice_fetch_fiat_currencies.restype = ctypes.c_uint16
|
|
930
|
+
_UniffiLib.uniffi_breez_sdk_common_checksum_method_fiatservice_fetch_fiat_rates.argtypes = (
|
|
931
|
+
)
|
|
932
|
+
_UniffiLib.uniffi_breez_sdk_common_checksum_method_fiatservice_fetch_fiat_rates.restype = ctypes.c_uint16
|
|
891
933
|
_UniffiLib.uniffi_breez_sdk_common_checksum_method_restclient_get_request.argtypes = (
|
|
892
934
|
)
|
|
893
935
|
_UniffiLib.uniffi_breez_sdk_common_checksum_method_restclient_get_request.restype = ctypes.c_uint16
|
|
@@ -1010,6 +1052,243 @@ class _UniffiConverterString:
|
|
|
1010
1052
|
|
|
1011
1053
|
|
|
1012
1054
|
|
|
1055
|
+
class FiatService(typing.Protocol):
|
|
1056
|
+
"""
|
|
1057
|
+
Trait covering fiat-related functionality
|
|
1058
|
+
"""
|
|
1059
|
+
|
|
1060
|
+
def fetch_fiat_currencies(self, ):
|
|
1061
|
+
"""
|
|
1062
|
+
List all supported fiat currencies for which there is a known exchange rate.
|
|
1063
|
+
"""
|
|
1064
|
+
|
|
1065
|
+
raise NotImplementedError
|
|
1066
|
+
def fetch_fiat_rates(self, ):
|
|
1067
|
+
"""
|
|
1068
|
+
Get the live rates from the server.
|
|
1069
|
+
"""
|
|
1070
|
+
|
|
1071
|
+
raise NotImplementedError
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
class FiatServiceImpl:
|
|
1075
|
+
"""
|
|
1076
|
+
Trait covering fiat-related functionality
|
|
1077
|
+
"""
|
|
1078
|
+
|
|
1079
|
+
_pointer: ctypes.c_void_p
|
|
1080
|
+
|
|
1081
|
+
def __init__(self, *args, **kwargs):
|
|
1082
|
+
raise ValueError("This class has no default constructor")
|
|
1083
|
+
|
|
1084
|
+
def __del__(self):
|
|
1085
|
+
# In case of partial initialization of instances.
|
|
1086
|
+
pointer = getattr(self, "_pointer", None)
|
|
1087
|
+
if pointer is not None:
|
|
1088
|
+
_uniffi_rust_call(_UniffiLib.uniffi_breez_sdk_common_fn_free_fiatservice, pointer)
|
|
1089
|
+
|
|
1090
|
+
def _uniffi_clone_pointer(self):
|
|
1091
|
+
return _uniffi_rust_call(_UniffiLib.uniffi_breez_sdk_common_fn_clone_fiatservice, self._pointer)
|
|
1092
|
+
|
|
1093
|
+
# Used by alternative constructors or any methods which return this type.
|
|
1094
|
+
@classmethod
|
|
1095
|
+
def _make_instance_(cls, pointer):
|
|
1096
|
+
# Lightly yucky way to bypass the usual __init__ logic
|
|
1097
|
+
# and just create a new instance with the required pointer.
|
|
1098
|
+
inst = cls.__new__(cls)
|
|
1099
|
+
inst._pointer = pointer
|
|
1100
|
+
return inst
|
|
1101
|
+
|
|
1102
|
+
async def fetch_fiat_currencies(self, ) -> "typing.List[FiatCurrency]":
|
|
1103
|
+
"""
|
|
1104
|
+
List all supported fiat currencies for which there is a known exchange rate.
|
|
1105
|
+
"""
|
|
1106
|
+
|
|
1107
|
+
return await _uniffi_rust_call_async(
|
|
1108
|
+
_UniffiLib.uniffi_breez_sdk_common_fn_method_fiatservice_fetch_fiat_currencies(
|
|
1109
|
+
self._uniffi_clone_pointer(),
|
|
1110
|
+
),
|
|
1111
|
+
_UniffiLib.ffi_breez_sdk_common_rust_future_poll_rust_buffer,
|
|
1112
|
+
_UniffiLib.ffi_breez_sdk_common_rust_future_complete_rust_buffer,
|
|
1113
|
+
_UniffiLib.ffi_breez_sdk_common_rust_future_free_rust_buffer,
|
|
1114
|
+
# lift function
|
|
1115
|
+
_UniffiConverterSequenceTypeFiatCurrency.lift,
|
|
1116
|
+
|
|
1117
|
+
# Error FFI converter
|
|
1118
|
+
_UniffiConverterTypeServiceConnectivityError,
|
|
1119
|
+
|
|
1120
|
+
)
|
|
1121
|
+
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
async def fetch_fiat_rates(self, ) -> "typing.List[Rate]":
|
|
1125
|
+
"""
|
|
1126
|
+
Get the live rates from the server.
|
|
1127
|
+
"""
|
|
1128
|
+
|
|
1129
|
+
return await _uniffi_rust_call_async(
|
|
1130
|
+
_UniffiLib.uniffi_breez_sdk_common_fn_method_fiatservice_fetch_fiat_rates(
|
|
1131
|
+
self._uniffi_clone_pointer(),
|
|
1132
|
+
),
|
|
1133
|
+
_UniffiLib.ffi_breez_sdk_common_rust_future_poll_rust_buffer,
|
|
1134
|
+
_UniffiLib.ffi_breez_sdk_common_rust_future_complete_rust_buffer,
|
|
1135
|
+
_UniffiLib.ffi_breez_sdk_common_rust_future_free_rust_buffer,
|
|
1136
|
+
# lift function
|
|
1137
|
+
_UniffiConverterSequenceTypeRate.lift,
|
|
1138
|
+
|
|
1139
|
+
# Error FFI converter
|
|
1140
|
+
_UniffiConverterTypeServiceConnectivityError,
|
|
1141
|
+
|
|
1142
|
+
)
|
|
1143
|
+
|
|
1144
|
+
|
|
1145
|
+
# Magic number for the Rust proxy to call using the same mechanism as every other method,
|
|
1146
|
+
# to free the callback once it's dropped by Rust.
|
|
1147
|
+
_UNIFFI_IDX_CALLBACK_FREE = 0
|
|
1148
|
+
# Return codes for callback calls
|
|
1149
|
+
_UNIFFI_CALLBACK_SUCCESS = 0
|
|
1150
|
+
_UNIFFI_CALLBACK_ERROR = 1
|
|
1151
|
+
_UNIFFI_CALLBACK_UNEXPECTED_ERROR = 2
|
|
1152
|
+
|
|
1153
|
+
class _UniffiCallbackInterfaceFfiConverter:
|
|
1154
|
+
_handle_map = _UniffiHandleMap()
|
|
1155
|
+
|
|
1156
|
+
@classmethod
|
|
1157
|
+
def lift(cls, handle):
|
|
1158
|
+
return cls._handle_map.get(handle)
|
|
1159
|
+
|
|
1160
|
+
@classmethod
|
|
1161
|
+
def read(cls, buf):
|
|
1162
|
+
handle = buf.read_u64()
|
|
1163
|
+
cls.lift(handle)
|
|
1164
|
+
|
|
1165
|
+
@classmethod
|
|
1166
|
+
def check_lower(cls, cb):
|
|
1167
|
+
pass
|
|
1168
|
+
|
|
1169
|
+
@classmethod
|
|
1170
|
+
def lower(cls, cb):
|
|
1171
|
+
handle = cls._handle_map.insert(cb)
|
|
1172
|
+
return handle
|
|
1173
|
+
|
|
1174
|
+
@classmethod
|
|
1175
|
+
def write(cls, cb, buf):
|
|
1176
|
+
buf.write_u64(cls.lower(cb))
|
|
1177
|
+
|
|
1178
|
+
# Put all the bits inside a class to keep the top-level namespace clean
|
|
1179
|
+
class _UniffiTraitImplFiatService:
|
|
1180
|
+
# For each method, generate a callback function to pass to Rust
|
|
1181
|
+
|
|
1182
|
+
@_UNIFFI_CALLBACK_INTERFACE_FIAT_SERVICE_METHOD0
|
|
1183
|
+
def fetch_fiat_currencies(
|
|
1184
|
+
uniffi_handle,
|
|
1185
|
+
uniffi_future_callback,
|
|
1186
|
+
uniffi_callback_data,
|
|
1187
|
+
uniffi_out_return,
|
|
1188
|
+
):
|
|
1189
|
+
uniffi_obj = _UniffiConverterTypeFiatService._handle_map.get(uniffi_handle)
|
|
1190
|
+
def make_call():
|
|
1191
|
+
args = ()
|
|
1192
|
+
method = uniffi_obj.fetch_fiat_currencies
|
|
1193
|
+
return method(*args)
|
|
1194
|
+
|
|
1195
|
+
|
|
1196
|
+
def handle_success(return_value):
|
|
1197
|
+
uniffi_future_callback(
|
|
1198
|
+
uniffi_callback_data,
|
|
1199
|
+
_UniffiForeignFutureStructRustBuffer(
|
|
1200
|
+
_UniffiConverterSequenceTypeFiatCurrency.lower(return_value),
|
|
1201
|
+
_UniffiRustCallStatus.default()
|
|
1202
|
+
)
|
|
1203
|
+
)
|
|
1204
|
+
|
|
1205
|
+
def handle_error(status_code, rust_buffer):
|
|
1206
|
+
uniffi_future_callback(
|
|
1207
|
+
uniffi_callback_data,
|
|
1208
|
+
_UniffiForeignFutureStructRustBuffer(
|
|
1209
|
+
_UniffiRustBuffer.default(),
|
|
1210
|
+
_UniffiRustCallStatus(status_code, rust_buffer),
|
|
1211
|
+
)
|
|
1212
|
+
)
|
|
1213
|
+
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, ServiceConnectivityError, _UniffiConverterTypeServiceConnectivityError.lower)
|
|
1214
|
+
|
|
1215
|
+
@_UNIFFI_CALLBACK_INTERFACE_FIAT_SERVICE_METHOD1
|
|
1216
|
+
def fetch_fiat_rates(
|
|
1217
|
+
uniffi_handle,
|
|
1218
|
+
uniffi_future_callback,
|
|
1219
|
+
uniffi_callback_data,
|
|
1220
|
+
uniffi_out_return,
|
|
1221
|
+
):
|
|
1222
|
+
uniffi_obj = _UniffiConverterTypeFiatService._handle_map.get(uniffi_handle)
|
|
1223
|
+
def make_call():
|
|
1224
|
+
args = ()
|
|
1225
|
+
method = uniffi_obj.fetch_fiat_rates
|
|
1226
|
+
return method(*args)
|
|
1227
|
+
|
|
1228
|
+
|
|
1229
|
+
def handle_success(return_value):
|
|
1230
|
+
uniffi_future_callback(
|
|
1231
|
+
uniffi_callback_data,
|
|
1232
|
+
_UniffiForeignFutureStructRustBuffer(
|
|
1233
|
+
_UniffiConverterSequenceTypeRate.lower(return_value),
|
|
1234
|
+
_UniffiRustCallStatus.default()
|
|
1235
|
+
)
|
|
1236
|
+
)
|
|
1237
|
+
|
|
1238
|
+
def handle_error(status_code, rust_buffer):
|
|
1239
|
+
uniffi_future_callback(
|
|
1240
|
+
uniffi_callback_data,
|
|
1241
|
+
_UniffiForeignFutureStructRustBuffer(
|
|
1242
|
+
_UniffiRustBuffer.default(),
|
|
1243
|
+
_UniffiRustCallStatus(status_code, rust_buffer),
|
|
1244
|
+
)
|
|
1245
|
+
)
|
|
1246
|
+
uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, ServiceConnectivityError, _UniffiConverterTypeServiceConnectivityError.lower)
|
|
1247
|
+
|
|
1248
|
+
@_UNIFFI_CALLBACK_INTERFACE_FREE
|
|
1249
|
+
def _uniffi_free(uniffi_handle):
|
|
1250
|
+
_UniffiConverterTypeFiatService._handle_map.remove(uniffi_handle)
|
|
1251
|
+
|
|
1252
|
+
# Generate the FFI VTable. This has a field for each callback interface method.
|
|
1253
|
+
_uniffi_vtable = _UniffiVTableCallbackInterfaceFiatService(
|
|
1254
|
+
fetch_fiat_currencies,
|
|
1255
|
+
fetch_fiat_rates,
|
|
1256
|
+
_uniffi_free
|
|
1257
|
+
)
|
|
1258
|
+
# Send Rust a pointer to the VTable. Note: this means we need to keep the struct alive forever,
|
|
1259
|
+
# or else bad things will happen when Rust tries to access it.
|
|
1260
|
+
_UniffiLib.uniffi_breez_sdk_common_fn_init_callback_vtable_fiatservice(ctypes.byref(_uniffi_vtable))
|
|
1261
|
+
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
class _UniffiConverterTypeFiatService:
|
|
1265
|
+
_handle_map = _UniffiHandleMap()
|
|
1266
|
+
|
|
1267
|
+
@staticmethod
|
|
1268
|
+
def lift(value: int):
|
|
1269
|
+
return FiatServiceImpl._make_instance_(value)
|
|
1270
|
+
|
|
1271
|
+
@staticmethod
|
|
1272
|
+
def check_lower(value: FiatService):
|
|
1273
|
+
pass
|
|
1274
|
+
|
|
1275
|
+
@staticmethod
|
|
1276
|
+
def lower(value: FiatService):
|
|
1277
|
+
return _UniffiConverterTypeFiatService._handle_map.insert(value)
|
|
1278
|
+
|
|
1279
|
+
@classmethod
|
|
1280
|
+
def read(cls, buf: _UniffiRustBuffer):
|
|
1281
|
+
ptr = buf.read_u64()
|
|
1282
|
+
if ptr == 0:
|
|
1283
|
+
raise InternalError("Raw pointer value was null")
|
|
1284
|
+
return cls.lift(ptr)
|
|
1285
|
+
|
|
1286
|
+
@classmethod
|
|
1287
|
+
def write(cls, value: FiatService, buf: _UniffiRustBuffer):
|
|
1288
|
+
buf.write_u64(cls.lower(value))
|
|
1289
|
+
|
|
1290
|
+
|
|
1291
|
+
|
|
1013
1292
|
class RestClient(typing.Protocol):
|
|
1014
1293
|
def get_request(self, url: "str",headers: "typing.Optional[dict[str, str]]"):
|
|
1015
1294
|
"""
|
|
@@ -1166,38 +1445,7 @@ _UniffiConverterTypeServiceConnectivityError,
|
|
|
1166
1445
|
)
|
|
1167
1446
|
|
|
1168
1447
|
|
|
1169
|
-
# Magic number for the Rust proxy to call using the same mechanism as every other method,
|
|
1170
|
-
# to free the callback once it's dropped by Rust.
|
|
1171
|
-
_UNIFFI_IDX_CALLBACK_FREE = 0
|
|
1172
|
-
# Return codes for callback calls
|
|
1173
|
-
_UNIFFI_CALLBACK_SUCCESS = 0
|
|
1174
|
-
_UNIFFI_CALLBACK_ERROR = 1
|
|
1175
|
-
_UNIFFI_CALLBACK_UNEXPECTED_ERROR = 2
|
|
1176
|
-
|
|
1177
|
-
class _UniffiCallbackInterfaceFfiConverter:
|
|
1178
|
-
_handle_map = _UniffiHandleMap()
|
|
1179
|
-
|
|
1180
|
-
@classmethod
|
|
1181
|
-
def lift(cls, handle):
|
|
1182
|
-
return cls._handle_map.get(handle)
|
|
1183
|
-
|
|
1184
|
-
@classmethod
|
|
1185
|
-
def read(cls, buf):
|
|
1186
|
-
handle = buf.read_u64()
|
|
1187
|
-
cls.lift(handle)
|
|
1188
|
-
|
|
1189
|
-
@classmethod
|
|
1190
|
-
def check_lower(cls, cb):
|
|
1191
|
-
pass
|
|
1192
|
-
|
|
1193
|
-
@classmethod
|
|
1194
|
-
def lower(cls, cb):
|
|
1195
|
-
handle = cls._handle_map.insert(cb)
|
|
1196
|
-
return handle
|
|
1197
1448
|
|
|
1198
|
-
@classmethod
|
|
1199
|
-
def write(cls, cb, buf):
|
|
1200
|
-
buf.write_u64(cls.lower(cb))
|
|
1201
1449
|
|
|
1202
1450
|
# Put all the bits inside a class to keep the top-level namespace clean
|
|
1203
1451
|
class _UniffiTraitImplRestClient:
|
|
@@ -5045,6 +5293,31 @@ class _UniffiConverterSequenceTypeBolt12OfferBlindedPath(_UniffiConverterRustBuf
|
|
|
5045
5293
|
|
|
5046
5294
|
|
|
5047
5295
|
|
|
5296
|
+
class _UniffiConverterSequenceTypeFiatCurrency(_UniffiConverterRustBuffer):
|
|
5297
|
+
@classmethod
|
|
5298
|
+
def check_lower(cls, value):
|
|
5299
|
+
for item in value:
|
|
5300
|
+
_UniffiConverterTypeFiatCurrency.check_lower(item)
|
|
5301
|
+
|
|
5302
|
+
@classmethod
|
|
5303
|
+
def write(cls, value, buf):
|
|
5304
|
+
items = len(value)
|
|
5305
|
+
buf.write_i32(items)
|
|
5306
|
+
for item in value:
|
|
5307
|
+
_UniffiConverterTypeFiatCurrency.write(item, buf)
|
|
5308
|
+
|
|
5309
|
+
@classmethod
|
|
5310
|
+
def read(cls, buf):
|
|
5311
|
+
count = buf.read_i32()
|
|
5312
|
+
if count < 0:
|
|
5313
|
+
raise InternalError("Unexpected negative sequence length")
|
|
5314
|
+
|
|
5315
|
+
return [
|
|
5316
|
+
_UniffiConverterTypeFiatCurrency.read(buf) for i in range(count)
|
|
5317
|
+
]
|
|
5318
|
+
|
|
5319
|
+
|
|
5320
|
+
|
|
5048
5321
|
class _UniffiConverterSequenceTypeLocaleOverrides(_UniffiConverterRustBuffer):
|
|
5049
5322
|
@classmethod
|
|
5050
5323
|
def check_lower(cls, value):
|
|
@@ -5095,6 +5368,31 @@ class _UniffiConverterSequenceTypeLocalizedName(_UniffiConverterRustBuffer):
|
|
|
5095
5368
|
|
|
5096
5369
|
|
|
5097
5370
|
|
|
5371
|
+
class _UniffiConverterSequenceTypeRate(_UniffiConverterRustBuffer):
|
|
5372
|
+
@classmethod
|
|
5373
|
+
def check_lower(cls, value):
|
|
5374
|
+
for item in value:
|
|
5375
|
+
_UniffiConverterTypeRate.check_lower(item)
|
|
5376
|
+
|
|
5377
|
+
@classmethod
|
|
5378
|
+
def write(cls, value, buf):
|
|
5379
|
+
items = len(value)
|
|
5380
|
+
buf.write_i32(items)
|
|
5381
|
+
for item in value:
|
|
5382
|
+
_UniffiConverterTypeRate.write(item, buf)
|
|
5383
|
+
|
|
5384
|
+
@classmethod
|
|
5385
|
+
def read(cls, buf):
|
|
5386
|
+
count = buf.read_i32()
|
|
5387
|
+
if count < 0:
|
|
5388
|
+
raise InternalError("Unexpected negative sequence length")
|
|
5389
|
+
|
|
5390
|
+
return [
|
|
5391
|
+
_UniffiConverterTypeRate.read(buf) for i in range(count)
|
|
5392
|
+
]
|
|
5393
|
+
|
|
5394
|
+
|
|
5395
|
+
|
|
5098
5396
|
class _UniffiConverterSequenceTypeInputType(_UniffiConverterRustBuffer):
|
|
5099
5397
|
@classmethod
|
|
5100
5398
|
def check_lower(cls, value):
|
|
@@ -5310,6 +5608,7 @@ __all__ = [
|
|
|
5310
5608
|
"Symbol",
|
|
5311
5609
|
"TokensPaymentDetails",
|
|
5312
5610
|
"UrlSuccessActionData",
|
|
5611
|
+
"FiatService",
|
|
5313
5612
|
"RestClient",
|
|
5314
5613
|
]
|
|
5315
5614
|
|
|
@@ -31,22 +31,31 @@ import asyncio
|
|
|
31
31
|
import platform
|
|
32
32
|
from .breez_sdk_common import BitcoinAddressDetails
|
|
33
33
|
from .breez_sdk_common import Bolt11InvoiceDetails
|
|
34
|
+
from .breez_sdk_common import FiatCurrency
|
|
35
|
+
from .breez_sdk_common import FiatService
|
|
34
36
|
from .breez_sdk_common import InputType
|
|
35
37
|
from .breez_sdk_common import LnurlPayRequestDetails
|
|
38
|
+
from .breez_sdk_common import Rate
|
|
36
39
|
from .breez_sdk_common import RestClient
|
|
37
40
|
from .breez_sdk_common import SuccessAction
|
|
38
41
|
from .breez_sdk_common import SuccessActionProcessed
|
|
39
42
|
from .breez_sdk_common import _UniffiConverterTypeBitcoinAddressDetails
|
|
40
43
|
from .breez_sdk_common import _UniffiConverterTypeBolt11InvoiceDetails
|
|
44
|
+
from .breez_sdk_common import _UniffiConverterTypeFiatCurrency
|
|
45
|
+
from .breez_sdk_common import _UniffiConverterTypeFiatService
|
|
41
46
|
from .breez_sdk_common import _UniffiConverterTypeInputType
|
|
42
47
|
from .breez_sdk_common import _UniffiConverterTypeLnurlPayRequestDetails
|
|
48
|
+
from .breez_sdk_common import _UniffiConverterTypeRate
|
|
43
49
|
from .breez_sdk_common import _UniffiConverterTypeRestClient
|
|
44
50
|
from .breez_sdk_common import _UniffiConverterTypeSuccessAction
|
|
45
51
|
from .breez_sdk_common import _UniffiConverterTypeSuccessActionProcessed
|
|
46
52
|
from .breez_sdk_common import _UniffiRustBuffer as _UniffiRustBufferBitcoinAddressDetails
|
|
47
53
|
from .breez_sdk_common import _UniffiRustBuffer as _UniffiRustBufferBolt11InvoiceDetails
|
|
54
|
+
from .breez_sdk_common import _UniffiRustBuffer as _UniffiRustBufferFiatCurrency
|
|
55
|
+
from .breez_sdk_common import _UniffiRustBuffer as _UniffiRustBufferFiatService
|
|
48
56
|
from .breez_sdk_common import _UniffiRustBuffer as _UniffiRustBufferInputType
|
|
49
57
|
from .breez_sdk_common import _UniffiRustBuffer as _UniffiRustBufferLnurlPayRequestDetails
|
|
58
|
+
from .breez_sdk_common import _UniffiRustBuffer as _UniffiRustBufferRate
|
|
50
59
|
from .breez_sdk_common import _UniffiRustBuffer as _UniffiRustBufferRestClient
|
|
51
60
|
from .breez_sdk_common import _UniffiRustBuffer as _UniffiRustBufferSuccessAction
|
|
52
61
|
from .breez_sdk_common import _UniffiRustBuffer as _UniffiRustBufferSuccessActionProcessed
|
|
@@ -514,6 +523,10 @@ def _uniffi_check_api_checksums(lib):
|
|
|
514
523
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
515
524
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment() != 11540:
|
|
516
525
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
526
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_currencies() != 63366:
|
|
527
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
528
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_rates() != 5904:
|
|
529
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
517
530
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_payments() != 16156:
|
|
518
531
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
519
532
|
if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_unclaimed_deposits() != 22486:
|
|
@@ -546,6 +559,8 @@ def _uniffi_check_api_checksums(lib):
|
|
|
546
559
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
547
560
|
if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service() != 2848:
|
|
548
561
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
562
|
+
if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_fiat_service() != 41113:
|
|
563
|
+
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
549
564
|
if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set() != 55523:
|
|
550
565
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
551
566
|
if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client() != 61720:
|
|
@@ -574,7 +589,7 @@ def _uniffi_check_api_checksums(lib):
|
|
|
574
589
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
575
590
|
if lib.uniffi_breez_sdk_spark_checksum_method_storage_update_deposit() != 48478:
|
|
576
591
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
577
|
-
if lib.uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new() !=
|
|
592
|
+
if lib.uniffi_breez_sdk_spark_checksum_constructor_sdkbuilder_new() != 53882:
|
|
578
593
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
579
594
|
if lib.uniffi_breez_sdk_spark_checksum_method_eventlistener_on_event() != 10824:
|
|
580
595
|
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
|
|
@@ -830,6 +845,14 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_get_payment.argtypes = (
|
|
|
830
845
|
_UniffiRustBuffer,
|
|
831
846
|
)
|
|
832
847
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_get_payment.restype = ctypes.c_uint64
|
|
848
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_list_fiat_currencies.argtypes = (
|
|
849
|
+
ctypes.c_void_p,
|
|
850
|
+
)
|
|
851
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_list_fiat_currencies.restype = ctypes.c_uint64
|
|
852
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_list_fiat_rates.argtypes = (
|
|
853
|
+
ctypes.c_void_p,
|
|
854
|
+
)
|
|
855
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_list_fiat_rates.restype = ctypes.c_uint64
|
|
833
856
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_list_payments.argtypes = (
|
|
834
857
|
ctypes.c_void_p,
|
|
835
858
|
_UniffiRustBuffer,
|
|
@@ -930,6 +953,11 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_chain_service.argtyp
|
|
|
930
953
|
ctypes.c_void_p,
|
|
931
954
|
)
|
|
932
955
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_chain_service.restype = ctypes.c_uint64
|
|
956
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_fiat_service.argtypes = (
|
|
957
|
+
ctypes.c_void_p,
|
|
958
|
+
ctypes.c_void_p,
|
|
959
|
+
)
|
|
960
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_fiat_service.restype = ctypes.c_uint64
|
|
933
961
|
_UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set.argtypes = (
|
|
934
962
|
ctypes.c_void_p,
|
|
935
963
|
_UniffiRustBuffer,
|
|
@@ -1372,6 +1400,12 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_lightning_address
|
|
|
1372
1400
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment.argtypes = (
|
|
1373
1401
|
)
|
|
1374
1402
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_get_payment.restype = ctypes.c_uint16
|
|
1403
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_currencies.argtypes = (
|
|
1404
|
+
)
|
|
1405
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_currencies.restype = ctypes.c_uint16
|
|
1406
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_rates.argtypes = (
|
|
1407
|
+
)
|
|
1408
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_fiat_rates.restype = ctypes.c_uint16
|
|
1375
1409
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_payments.argtypes = (
|
|
1376
1410
|
)
|
|
1377
1411
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_breezsdk_list_payments.restype = ctypes.c_uint16
|
|
@@ -1420,6 +1454,9 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build.restype = cty
|
|
|
1420
1454
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service.argtypes = (
|
|
1421
1455
|
)
|
|
1422
1456
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service.restype = ctypes.c_uint16
|
|
1457
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_fiat_service.argtypes = (
|
|
1458
|
+
)
|
|
1459
|
+
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_fiat_service.restype = ctypes.c_uint16
|
|
1423
1460
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set.argtypes = (
|
|
1424
1461
|
)
|
|
1425
1462
|
_UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set.restype = ctypes.c_uint16
|
|
@@ -1560,6 +1597,26 @@ class _UniffiConverterString:
|
|
|
1560
1597
|
builder.write(value.encode("utf-8"))
|
|
1561
1598
|
return builder.finalize()
|
|
1562
1599
|
|
|
1600
|
+
class _UniffiConverterBytes(_UniffiConverterRustBuffer):
|
|
1601
|
+
@staticmethod
|
|
1602
|
+
def read(buf):
|
|
1603
|
+
size = buf.read_i32()
|
|
1604
|
+
if size < 0:
|
|
1605
|
+
raise InternalError("Unexpected negative byte string length")
|
|
1606
|
+
return buf.read(size)
|
|
1607
|
+
|
|
1608
|
+
@staticmethod
|
|
1609
|
+
def check_lower(value):
|
|
1610
|
+
try:
|
|
1611
|
+
memoryview(value)
|
|
1612
|
+
except TypeError:
|
|
1613
|
+
raise TypeError("a bytes-like object is required, not {!r}".format(type(value).__name__))
|
|
1614
|
+
|
|
1615
|
+
@staticmethod
|
|
1616
|
+
def write(value, buf):
|
|
1617
|
+
buf.write_i32(len(value))
|
|
1618
|
+
buf.write(value)
|
|
1619
|
+
|
|
1563
1620
|
|
|
1564
1621
|
|
|
1565
1622
|
class BitcoinChainService(typing.Protocol):
|
|
@@ -1889,6 +1946,19 @@ class BreezSdkProtocol(typing.Protocol):
|
|
|
1889
1946
|
def get_lightning_address(self, ):
|
|
1890
1947
|
raise NotImplementedError
|
|
1891
1948
|
def get_payment(self, request: "GetPaymentRequest"):
|
|
1949
|
+
raise NotImplementedError
|
|
1950
|
+
def list_fiat_currencies(self, ):
|
|
1951
|
+
"""
|
|
1952
|
+
List fiat currencies for which there is a known exchange rate,
|
|
1953
|
+
sorted by the canonical name of the currency.
|
|
1954
|
+
"""
|
|
1955
|
+
|
|
1956
|
+
raise NotImplementedError
|
|
1957
|
+
def list_fiat_rates(self, ):
|
|
1958
|
+
"""
|
|
1959
|
+
List the latest rates of fiat currencies, sorted by name.
|
|
1960
|
+
"""
|
|
1961
|
+
|
|
1892
1962
|
raise NotImplementedError
|
|
1893
1963
|
def list_payments(self, request: "ListPaymentsRequest"):
|
|
1894
1964
|
"""
|
|
@@ -2155,6 +2225,51 @@ _UniffiConverterTypeSdkError,
|
|
|
2155
2225
|
|
|
2156
2226
|
|
|
2157
2227
|
|
|
2228
|
+
async def list_fiat_currencies(self, ) -> "ListFiatCurrenciesResponse":
|
|
2229
|
+
"""
|
|
2230
|
+
List fiat currencies for which there is a known exchange rate,
|
|
2231
|
+
sorted by the canonical name of the currency.
|
|
2232
|
+
"""
|
|
2233
|
+
|
|
2234
|
+
return await _uniffi_rust_call_async(
|
|
2235
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_list_fiat_currencies(
|
|
2236
|
+
self._uniffi_clone_pointer(),
|
|
2237
|
+
),
|
|
2238
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
2239
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
2240
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
2241
|
+
# lift function
|
|
2242
|
+
_UniffiConverterTypeListFiatCurrenciesResponse.lift,
|
|
2243
|
+
|
|
2244
|
+
# Error FFI converter
|
|
2245
|
+
_UniffiConverterTypeSdkError,
|
|
2246
|
+
|
|
2247
|
+
)
|
|
2248
|
+
|
|
2249
|
+
|
|
2250
|
+
|
|
2251
|
+
async def list_fiat_rates(self, ) -> "ListFiatRatesResponse":
|
|
2252
|
+
"""
|
|
2253
|
+
List the latest rates of fiat currencies, sorted by name.
|
|
2254
|
+
"""
|
|
2255
|
+
|
|
2256
|
+
return await _uniffi_rust_call_async(
|
|
2257
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_list_fiat_rates(
|
|
2258
|
+
self._uniffi_clone_pointer(),
|
|
2259
|
+
),
|
|
2260
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_rust_buffer,
|
|
2261
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_rust_buffer,
|
|
2262
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_rust_buffer,
|
|
2263
|
+
# lift function
|
|
2264
|
+
_UniffiConverterTypeListFiatRatesResponse.lift,
|
|
2265
|
+
|
|
2266
|
+
# Error FFI converter
|
|
2267
|
+
_UniffiConverterTypeSdkError,
|
|
2268
|
+
|
|
2269
|
+
)
|
|
2270
|
+
|
|
2271
|
+
|
|
2272
|
+
|
|
2158
2273
|
async def list_payments(self, request: "ListPaymentsRequest") -> "ListPaymentsResponse":
|
|
2159
2274
|
"""
|
|
2160
2275
|
Lists payments from the storage with pagination
|
|
@@ -2511,6 +2626,14 @@ class SdkBuilderProtocol(typing.Protocol):
|
|
|
2511
2626
|
- `chain_service`: The chain service to be used.
|
|
2512
2627
|
"""
|
|
2513
2628
|
|
|
2629
|
+
raise NotImplementedError
|
|
2630
|
+
def with_fiat_service(self, fiat_service: "FiatService"):
|
|
2631
|
+
"""
|
|
2632
|
+
Sets the fiat service to be used by the SDK.
|
|
2633
|
+
Arguments:
|
|
2634
|
+
- `fiat_service`: The fiat service to be used.
|
|
2635
|
+
"""
|
|
2636
|
+
|
|
2514
2637
|
raise NotImplementedError
|
|
2515
2638
|
def with_key_set(self, key_set_type: "KeySetType",use_address_index: "bool"):
|
|
2516
2639
|
"""
|
|
@@ -2540,24 +2663,24 @@ class SdkBuilder:
|
|
|
2540
2663
|
"""
|
|
2541
2664
|
|
|
2542
2665
|
_pointer: ctypes.c_void_p
|
|
2543
|
-
def __init__(self, config: "Config",
|
|
2666
|
+
def __init__(self, config: "Config",seed: "Seed",storage: "Storage"):
|
|
2544
2667
|
"""
|
|
2545
2668
|
Creates a new `SdkBuilder` with the provided configuration.
|
|
2546
2669
|
Arguments:
|
|
2547
2670
|
- `config`: The configuration to be used.
|
|
2548
|
-
- `
|
|
2671
|
+
- `seed`: The seed for wallet generation.
|
|
2549
2672
|
- `storage`: The storage backend to be used.
|
|
2550
2673
|
"""
|
|
2551
2674
|
|
|
2552
2675
|
_UniffiConverterTypeConfig.check_lower(config)
|
|
2553
2676
|
|
|
2554
|
-
|
|
2677
|
+
_UniffiConverterTypeSeed.check_lower(seed)
|
|
2555
2678
|
|
|
2556
2679
|
_UniffiConverterTypeStorage.check_lower(storage)
|
|
2557
2680
|
|
|
2558
2681
|
self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_breez_sdk_spark_fn_constructor_sdkbuilder_new,
|
|
2559
2682
|
_UniffiConverterTypeConfig.lower(config),
|
|
2560
|
-
|
|
2683
|
+
_UniffiConverterTypeSeed.lower(seed),
|
|
2561
2684
|
_UniffiConverterTypeStorage.lower(storage))
|
|
2562
2685
|
|
|
2563
2686
|
def __del__(self):
|
|
@@ -2630,6 +2753,36 @@ _UniffiConverterTypeSdkError,
|
|
|
2630
2753
|
|
|
2631
2754
|
|
|
2632
2755
|
|
|
2756
|
+
async def with_fiat_service(self, fiat_service: "FiatService") -> None:
|
|
2757
|
+
|
|
2758
|
+
"""
|
|
2759
|
+
Sets the fiat service to be used by the SDK.
|
|
2760
|
+
Arguments:
|
|
2761
|
+
- `fiat_service`: The fiat service to be used.
|
|
2762
|
+
"""
|
|
2763
|
+
|
|
2764
|
+
_UniffiConverterTypeFiatService.check_lower(fiat_service)
|
|
2765
|
+
|
|
2766
|
+
return await _uniffi_rust_call_async(
|
|
2767
|
+
_UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_fiat_service(
|
|
2768
|
+
self._uniffi_clone_pointer(),
|
|
2769
|
+
_UniffiConverterTypeFiatService.lower(fiat_service)
|
|
2770
|
+
),
|
|
2771
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_poll_void,
|
|
2772
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_complete_void,
|
|
2773
|
+
_UniffiLib.ffi_breez_sdk_spark_rust_future_free_void,
|
|
2774
|
+
# lift function
|
|
2775
|
+
lambda val: None,
|
|
2776
|
+
|
|
2777
|
+
|
|
2778
|
+
# Error FFI converter
|
|
2779
|
+
|
|
2780
|
+
None,
|
|
2781
|
+
|
|
2782
|
+
)
|
|
2783
|
+
|
|
2784
|
+
|
|
2785
|
+
|
|
2633
2786
|
async def with_key_set(self, key_set_type: "KeySetType",use_address_index: "bool") -> None:
|
|
2634
2787
|
|
|
2635
2788
|
"""
|
|
@@ -3869,20 +4022,20 @@ class _UniffiConverterTypeConfig(_UniffiConverterRustBuffer):
|
|
|
3869
4022
|
|
|
3870
4023
|
class ConnectRequest:
|
|
3871
4024
|
config: "Config"
|
|
3872
|
-
|
|
4025
|
+
seed: "Seed"
|
|
3873
4026
|
storage_dir: "str"
|
|
3874
|
-
def __init__(self, *, config: "Config",
|
|
4027
|
+
def __init__(self, *, config: "Config", seed: "Seed", storage_dir: "str"):
|
|
3875
4028
|
self.config = config
|
|
3876
|
-
self.
|
|
4029
|
+
self.seed = seed
|
|
3877
4030
|
self.storage_dir = storage_dir
|
|
3878
4031
|
|
|
3879
4032
|
def __str__(self):
|
|
3880
|
-
return "ConnectRequest(config={},
|
|
4033
|
+
return "ConnectRequest(config={}, seed={}, storage_dir={})".format(self.config, self.seed, self.storage_dir)
|
|
3881
4034
|
|
|
3882
4035
|
def __eq__(self, other):
|
|
3883
4036
|
if self.config != other.config:
|
|
3884
4037
|
return False
|
|
3885
|
-
if self.
|
|
4038
|
+
if self.seed != other.seed:
|
|
3886
4039
|
return False
|
|
3887
4040
|
if self.storage_dir != other.storage_dir:
|
|
3888
4041
|
return False
|
|
@@ -3893,20 +4046,20 @@ class _UniffiConverterTypeConnectRequest(_UniffiConverterRustBuffer):
|
|
|
3893
4046
|
def read(buf):
|
|
3894
4047
|
return ConnectRequest(
|
|
3895
4048
|
config=_UniffiConverterTypeConfig.read(buf),
|
|
3896
|
-
|
|
4049
|
+
seed=_UniffiConverterTypeSeed.read(buf),
|
|
3897
4050
|
storage_dir=_UniffiConverterString.read(buf),
|
|
3898
4051
|
)
|
|
3899
4052
|
|
|
3900
4053
|
@staticmethod
|
|
3901
4054
|
def check_lower(value):
|
|
3902
4055
|
_UniffiConverterTypeConfig.check_lower(value.config)
|
|
3903
|
-
|
|
4056
|
+
_UniffiConverterTypeSeed.check_lower(value.seed)
|
|
3904
4057
|
_UniffiConverterString.check_lower(value.storage_dir)
|
|
3905
4058
|
|
|
3906
4059
|
@staticmethod
|
|
3907
4060
|
def write(value, buf):
|
|
3908
4061
|
_UniffiConverterTypeConfig.write(value.config, buf)
|
|
3909
|
-
|
|
4062
|
+
_UniffiConverterTypeSeed.write(value.seed, buf)
|
|
3910
4063
|
_UniffiConverterString.write(value.storage_dir, buf)
|
|
3911
4064
|
|
|
3912
4065
|
|
|
@@ -4182,6 +4335,80 @@ class _UniffiConverterTypeLightningAddressInfo(_UniffiConverterRustBuffer):
|
|
|
4182
4335
|
_UniffiConverterString.write(value.username, buf)
|
|
4183
4336
|
|
|
4184
4337
|
|
|
4338
|
+
class ListFiatCurrenciesResponse:
|
|
4339
|
+
"""
|
|
4340
|
+
Response from listing fiat currencies
|
|
4341
|
+
"""
|
|
4342
|
+
|
|
4343
|
+
currencies: "typing.List[FiatCurrency]"
|
|
4344
|
+
"""
|
|
4345
|
+
The list of fiat currencies
|
|
4346
|
+
"""
|
|
4347
|
+
|
|
4348
|
+
def __init__(self, *, currencies: "typing.List[FiatCurrency]"):
|
|
4349
|
+
self.currencies = currencies
|
|
4350
|
+
|
|
4351
|
+
def __str__(self):
|
|
4352
|
+
return "ListFiatCurrenciesResponse(currencies={})".format(self.currencies)
|
|
4353
|
+
|
|
4354
|
+
def __eq__(self, other):
|
|
4355
|
+
if self.currencies != other.currencies:
|
|
4356
|
+
return False
|
|
4357
|
+
return True
|
|
4358
|
+
|
|
4359
|
+
class _UniffiConverterTypeListFiatCurrenciesResponse(_UniffiConverterRustBuffer):
|
|
4360
|
+
@staticmethod
|
|
4361
|
+
def read(buf):
|
|
4362
|
+
return ListFiatCurrenciesResponse(
|
|
4363
|
+
currencies=_UniffiConverterSequenceTypeFiatCurrency.read(buf),
|
|
4364
|
+
)
|
|
4365
|
+
|
|
4366
|
+
@staticmethod
|
|
4367
|
+
def check_lower(value):
|
|
4368
|
+
_UniffiConverterSequenceTypeFiatCurrency.check_lower(value.currencies)
|
|
4369
|
+
|
|
4370
|
+
@staticmethod
|
|
4371
|
+
def write(value, buf):
|
|
4372
|
+
_UniffiConverterSequenceTypeFiatCurrency.write(value.currencies, buf)
|
|
4373
|
+
|
|
4374
|
+
|
|
4375
|
+
class ListFiatRatesResponse:
|
|
4376
|
+
"""
|
|
4377
|
+
Response from listing fiat rates
|
|
4378
|
+
"""
|
|
4379
|
+
|
|
4380
|
+
rates: "typing.List[Rate]"
|
|
4381
|
+
"""
|
|
4382
|
+
The list of fiat rates
|
|
4383
|
+
"""
|
|
4384
|
+
|
|
4385
|
+
def __init__(self, *, rates: "typing.List[Rate]"):
|
|
4386
|
+
self.rates = rates
|
|
4387
|
+
|
|
4388
|
+
def __str__(self):
|
|
4389
|
+
return "ListFiatRatesResponse(rates={})".format(self.rates)
|
|
4390
|
+
|
|
4391
|
+
def __eq__(self, other):
|
|
4392
|
+
if self.rates != other.rates:
|
|
4393
|
+
return False
|
|
4394
|
+
return True
|
|
4395
|
+
|
|
4396
|
+
class _UniffiConverterTypeListFiatRatesResponse(_UniffiConverterRustBuffer):
|
|
4397
|
+
@staticmethod
|
|
4398
|
+
def read(buf):
|
|
4399
|
+
return ListFiatRatesResponse(
|
|
4400
|
+
rates=_UniffiConverterSequenceTypeRate.read(buf),
|
|
4401
|
+
)
|
|
4402
|
+
|
|
4403
|
+
@staticmethod
|
|
4404
|
+
def check_lower(value):
|
|
4405
|
+
_UniffiConverterSequenceTypeRate.check_lower(value.rates)
|
|
4406
|
+
|
|
4407
|
+
@staticmethod
|
|
4408
|
+
def write(value, buf):
|
|
4409
|
+
_UniffiConverterSequenceTypeRate.write(value.rates, buf)
|
|
4410
|
+
|
|
4411
|
+
|
|
4185
4412
|
class ListPaymentsRequest:
|
|
4186
4413
|
"""
|
|
4187
4414
|
Request to list payments with pagination
|
|
@@ -4615,15 +4842,19 @@ class PaymentMetadata:
|
|
|
4615
4842
|
"""
|
|
4616
4843
|
|
|
4617
4844
|
lnurl_pay_info: "typing.Optional[LnurlPayInfo]"
|
|
4618
|
-
|
|
4845
|
+
lnurl_description: "typing.Optional[str]"
|
|
4846
|
+
def __init__(self, *, lnurl_pay_info: "typing.Optional[LnurlPayInfo]", lnurl_description: "typing.Optional[str]"):
|
|
4619
4847
|
self.lnurl_pay_info = lnurl_pay_info
|
|
4848
|
+
self.lnurl_description = lnurl_description
|
|
4620
4849
|
|
|
4621
4850
|
def __str__(self):
|
|
4622
|
-
return "PaymentMetadata(lnurl_pay_info={})".format(self.lnurl_pay_info)
|
|
4851
|
+
return "PaymentMetadata(lnurl_pay_info={}, lnurl_description={})".format(self.lnurl_pay_info, self.lnurl_description)
|
|
4623
4852
|
|
|
4624
4853
|
def __eq__(self, other):
|
|
4625
4854
|
if self.lnurl_pay_info != other.lnurl_pay_info:
|
|
4626
4855
|
return False
|
|
4856
|
+
if self.lnurl_description != other.lnurl_description:
|
|
4857
|
+
return False
|
|
4627
4858
|
return True
|
|
4628
4859
|
|
|
4629
4860
|
class _UniffiConverterTypePaymentMetadata(_UniffiConverterRustBuffer):
|
|
@@ -4631,15 +4862,18 @@ class _UniffiConverterTypePaymentMetadata(_UniffiConverterRustBuffer):
|
|
|
4631
4862
|
def read(buf):
|
|
4632
4863
|
return PaymentMetadata(
|
|
4633
4864
|
lnurl_pay_info=_UniffiConverterOptionalTypeLnurlPayInfo.read(buf),
|
|
4865
|
+
lnurl_description=_UniffiConverterOptionalString.read(buf),
|
|
4634
4866
|
)
|
|
4635
4867
|
|
|
4636
4868
|
@staticmethod
|
|
4637
4869
|
def check_lower(value):
|
|
4638
4870
|
_UniffiConverterOptionalTypeLnurlPayInfo.check_lower(value.lnurl_pay_info)
|
|
4871
|
+
_UniffiConverterOptionalString.check_lower(value.lnurl_description)
|
|
4639
4872
|
|
|
4640
4873
|
@staticmethod
|
|
4641
4874
|
def write(value, buf):
|
|
4642
4875
|
_UniffiConverterOptionalTypeLnurlPayInfo.write(value.lnurl_pay_info, buf)
|
|
4876
|
+
_UniffiConverterOptionalString.write(value.lnurl_description, buf)
|
|
4643
4877
|
|
|
4644
4878
|
|
|
4645
4879
|
class PrepareLnurlPayRequest:
|
|
@@ -4990,10 +5224,13 @@ class _UniffiConverterTypeRefundDepositResponse(_UniffiConverterRustBuffer):
|
|
|
4990
5224
|
|
|
4991
5225
|
class RegisterLightningAddressRequest:
|
|
4992
5226
|
username: "str"
|
|
4993
|
-
description: "str"
|
|
4994
|
-
def __init__(self, *, username: "str", description: "str"):
|
|
5227
|
+
description: "typing.Optional[str]"
|
|
5228
|
+
def __init__(self, *, username: "str", description: "typing.Optional[str]" = _DEFAULT):
|
|
4995
5229
|
self.username = username
|
|
4996
|
-
|
|
5230
|
+
if description is _DEFAULT:
|
|
5231
|
+
self.description = None
|
|
5232
|
+
else:
|
|
5233
|
+
self.description = description
|
|
4997
5234
|
|
|
4998
5235
|
def __str__(self):
|
|
4999
5236
|
return "RegisterLightningAddressRequest(username={}, description={})".format(self.username, self.description)
|
|
@@ -5010,18 +5247,18 @@ class _UniffiConverterTypeRegisterLightningAddressRequest(_UniffiConverterRustBu
|
|
|
5010
5247
|
def read(buf):
|
|
5011
5248
|
return RegisterLightningAddressRequest(
|
|
5012
5249
|
username=_UniffiConverterString.read(buf),
|
|
5013
|
-
description=
|
|
5250
|
+
description=_UniffiConverterOptionalString.read(buf),
|
|
5014
5251
|
)
|
|
5015
5252
|
|
|
5016
5253
|
@staticmethod
|
|
5017
5254
|
def check_lower(value):
|
|
5018
5255
|
_UniffiConverterString.check_lower(value.username)
|
|
5019
|
-
|
|
5256
|
+
_UniffiConverterOptionalString.check_lower(value.description)
|
|
5020
5257
|
|
|
5021
5258
|
@staticmethod
|
|
5022
5259
|
def write(value, buf):
|
|
5023
5260
|
_UniffiConverterString.write(value.username, buf)
|
|
5024
|
-
|
|
5261
|
+
_UniffiConverterOptionalString.write(value.description, buf)
|
|
5025
5262
|
|
|
5026
5263
|
|
|
5027
5264
|
class SendOnchainFeeQuote:
|
|
@@ -6832,6 +7069,131 @@ class _UniffiConverterTypeSdkEvent(_UniffiConverterRustBuffer):
|
|
|
6832
7069
|
|
|
6833
7070
|
|
|
6834
7071
|
|
|
7072
|
+
class Seed:
|
|
7073
|
+
"""
|
|
7074
|
+
Represents the seed for wallet generation, either as a mnemonic phrase with an optional
|
|
7075
|
+
passphrase or as raw entropy bytes.
|
|
7076
|
+
"""
|
|
7077
|
+
|
|
7078
|
+
def __init__(self):
|
|
7079
|
+
raise RuntimeError("Seed cannot be instantiated directly")
|
|
7080
|
+
|
|
7081
|
+
# Each enum variant is a nested class of the enum itself.
|
|
7082
|
+
class MNEMONIC:
|
|
7083
|
+
"""
|
|
7084
|
+
A BIP-39 mnemonic phrase with an optional passphrase.
|
|
7085
|
+
"""
|
|
7086
|
+
|
|
7087
|
+
mnemonic: "str"
|
|
7088
|
+
"""
|
|
7089
|
+
The mnemonic phrase. 12 or 24 words.
|
|
7090
|
+
"""
|
|
7091
|
+
|
|
7092
|
+
passphrase: "typing.Optional[str]"
|
|
7093
|
+
"""
|
|
7094
|
+
An optional passphrase for the mnemonic.
|
|
7095
|
+
"""
|
|
7096
|
+
|
|
7097
|
+
|
|
7098
|
+
def __init__(self,mnemonic: "str", passphrase: "typing.Optional[str]"):
|
|
7099
|
+
self.mnemonic = mnemonic
|
|
7100
|
+
self.passphrase = passphrase
|
|
7101
|
+
|
|
7102
|
+
def __str__(self):
|
|
7103
|
+
return "Seed.MNEMONIC(mnemonic={}, passphrase={})".format(self.mnemonic, self.passphrase)
|
|
7104
|
+
|
|
7105
|
+
def __eq__(self, other):
|
|
7106
|
+
if not other.is_mnemonic():
|
|
7107
|
+
return False
|
|
7108
|
+
if self.mnemonic != other.mnemonic:
|
|
7109
|
+
return False
|
|
7110
|
+
if self.passphrase != other.passphrase:
|
|
7111
|
+
return False
|
|
7112
|
+
return True
|
|
7113
|
+
|
|
7114
|
+
class ENTROPY:
|
|
7115
|
+
"""
|
|
7116
|
+
Raw entropy bytes.
|
|
7117
|
+
"""
|
|
7118
|
+
|
|
7119
|
+
def __init__(self, *values):
|
|
7120
|
+
if len(values) != 1:
|
|
7121
|
+
raise TypeError(f"Expected 1 arguments, found {len(values)}")
|
|
7122
|
+
if not isinstance(values[0], bytes):
|
|
7123
|
+
raise TypeError(f"unexpected type for tuple element 0 - expected 'bytes', got '{type(values[0])}'")
|
|
7124
|
+
self._values = values
|
|
7125
|
+
|
|
7126
|
+
def __getitem__(self, index):
|
|
7127
|
+
return self._values[index]
|
|
7128
|
+
|
|
7129
|
+
def __str__(self):
|
|
7130
|
+
return f"Seed.ENTROPY{self._values!r}"
|
|
7131
|
+
|
|
7132
|
+
def __eq__(self, other):
|
|
7133
|
+
if not other.is_entropy():
|
|
7134
|
+
return False
|
|
7135
|
+
return self._values == other._values
|
|
7136
|
+
|
|
7137
|
+
|
|
7138
|
+
# For each variant, we have an `is_NAME` method for easily checking
|
|
7139
|
+
# whether an instance is that variant.
|
|
7140
|
+
def is_mnemonic(self) -> bool:
|
|
7141
|
+
return isinstance(self, Seed.MNEMONIC)
|
|
7142
|
+
def is_entropy(self) -> bool:
|
|
7143
|
+
return isinstance(self, Seed.ENTROPY)
|
|
7144
|
+
|
|
7145
|
+
|
|
7146
|
+
# Now, a little trick - we make each nested variant class be a subclass of the main
|
|
7147
|
+
# enum class, so that method calls and instance checks etc will work intuitively.
|
|
7148
|
+
# We might be able to do this a little more neatly with a metaclass, but this'll do.
|
|
7149
|
+
Seed.MNEMONIC = type("Seed.MNEMONIC", (Seed.MNEMONIC, Seed,), {}) # type: ignore
|
|
7150
|
+
Seed.ENTROPY = type("Seed.ENTROPY", (Seed.ENTROPY, Seed,), {}) # type: ignore
|
|
7151
|
+
|
|
7152
|
+
|
|
7153
|
+
|
|
7154
|
+
|
|
7155
|
+
class _UniffiConverterTypeSeed(_UniffiConverterRustBuffer):
|
|
7156
|
+
@staticmethod
|
|
7157
|
+
def read(buf):
|
|
7158
|
+
variant = buf.read_i32()
|
|
7159
|
+
if variant == 1:
|
|
7160
|
+
return Seed.MNEMONIC(
|
|
7161
|
+
_UniffiConverterString.read(buf),
|
|
7162
|
+
_UniffiConverterOptionalString.read(buf),
|
|
7163
|
+
)
|
|
7164
|
+
if variant == 2:
|
|
7165
|
+
return Seed.ENTROPY(
|
|
7166
|
+
_UniffiConverterBytes.read(buf),
|
|
7167
|
+
)
|
|
7168
|
+
raise InternalError("Raw enum value doesn't match any cases")
|
|
7169
|
+
|
|
7170
|
+
@staticmethod
|
|
7171
|
+
def check_lower(value):
|
|
7172
|
+
if value.is_mnemonic():
|
|
7173
|
+
_UniffiConverterString.check_lower(value.mnemonic)
|
|
7174
|
+
_UniffiConverterOptionalString.check_lower(value.passphrase)
|
|
7175
|
+
return
|
|
7176
|
+
if value.is_entropy():
|
|
7177
|
+
_UniffiConverterBytes.check_lower(value._values[0])
|
|
7178
|
+
return
|
|
7179
|
+
raise ValueError(value)
|
|
7180
|
+
|
|
7181
|
+
@staticmethod
|
|
7182
|
+
def write(value, buf):
|
|
7183
|
+
if value.is_mnemonic():
|
|
7184
|
+
buf.write_i32(1)
|
|
7185
|
+
_UniffiConverterString.write(value.mnemonic, buf)
|
|
7186
|
+
_UniffiConverterOptionalString.write(value.passphrase, buf)
|
|
7187
|
+
if value.is_entropy():
|
|
7188
|
+
buf.write_i32(2)
|
|
7189
|
+
_UniffiConverterBytes.write(value._values[0], buf)
|
|
7190
|
+
|
|
7191
|
+
|
|
7192
|
+
|
|
7193
|
+
|
|
7194
|
+
|
|
7195
|
+
|
|
7196
|
+
|
|
6835
7197
|
class SendPaymentMethod:
|
|
6836
7198
|
def __init__(self):
|
|
6837
7199
|
raise RuntimeError("SendPaymentMethod cannot be instantiated directly")
|
|
@@ -7006,18 +7368,18 @@ class SendPaymentOptions:
|
|
|
7006
7368
|
return True
|
|
7007
7369
|
|
|
7008
7370
|
class BOLT11_INVOICE:
|
|
7009
|
-
|
|
7371
|
+
prefer_spark: "bool"
|
|
7010
7372
|
|
|
7011
|
-
def __init__(self,
|
|
7012
|
-
self.
|
|
7373
|
+
def __init__(self,prefer_spark: "bool"):
|
|
7374
|
+
self.prefer_spark = prefer_spark
|
|
7013
7375
|
|
|
7014
7376
|
def __str__(self):
|
|
7015
|
-
return "SendPaymentOptions.BOLT11_INVOICE(
|
|
7377
|
+
return "SendPaymentOptions.BOLT11_INVOICE(prefer_spark={})".format(self.prefer_spark)
|
|
7016
7378
|
|
|
7017
7379
|
def __eq__(self, other):
|
|
7018
7380
|
if not other.is_bolt11_invoice():
|
|
7019
7381
|
return False
|
|
7020
|
-
if self.
|
|
7382
|
+
if self.prefer_spark != other.prefer_spark:
|
|
7021
7383
|
return False
|
|
7022
7384
|
return True
|
|
7023
7385
|
|
|
@@ -7060,7 +7422,7 @@ class _UniffiConverterTypeSendPaymentOptions(_UniffiConverterRustBuffer):
|
|
|
7060
7422
|
_UniffiConverterTypeOnchainConfirmationSpeed.check_lower(value.confirmation_speed)
|
|
7061
7423
|
return
|
|
7062
7424
|
if value.is_bolt11_invoice():
|
|
7063
|
-
_UniffiConverterBool.check_lower(value.
|
|
7425
|
+
_UniffiConverterBool.check_lower(value.prefer_spark)
|
|
7064
7426
|
return
|
|
7065
7427
|
raise ValueError(value)
|
|
7066
7428
|
|
|
@@ -7071,7 +7433,7 @@ class _UniffiConverterTypeSendPaymentOptions(_UniffiConverterRustBuffer):
|
|
|
7071
7433
|
_UniffiConverterTypeOnchainConfirmationSpeed.write(value.confirmation_speed, buf)
|
|
7072
7434
|
if value.is_bolt11_invoice():
|
|
7073
7435
|
buf.write_i32(2)
|
|
7074
|
-
_UniffiConverterBool.write(value.
|
|
7436
|
+
_UniffiConverterBool.write(value.prefer_spark, buf)
|
|
7075
7437
|
|
|
7076
7438
|
|
|
7077
7439
|
|
|
@@ -7851,6 +8213,56 @@ class _UniffiConverterSequenceTypeUtxo(_UniffiConverterRustBuffer):
|
|
|
7851
8213
|
_UniffiConverterTypeUtxo.read(buf) for i in range(count)
|
|
7852
8214
|
]
|
|
7853
8215
|
|
|
8216
|
+
|
|
8217
|
+
|
|
8218
|
+
class _UniffiConverterSequenceTypeFiatCurrency(_UniffiConverterRustBuffer):
|
|
8219
|
+
@classmethod
|
|
8220
|
+
def check_lower(cls, value):
|
|
8221
|
+
for item in value:
|
|
8222
|
+
_UniffiConverterTypeFiatCurrency.check_lower(item)
|
|
8223
|
+
|
|
8224
|
+
@classmethod
|
|
8225
|
+
def write(cls, value, buf):
|
|
8226
|
+
items = len(value)
|
|
8227
|
+
buf.write_i32(items)
|
|
8228
|
+
for item in value:
|
|
8229
|
+
_UniffiConverterTypeFiatCurrency.write(item, buf)
|
|
8230
|
+
|
|
8231
|
+
@classmethod
|
|
8232
|
+
def read(cls, buf):
|
|
8233
|
+
count = buf.read_i32()
|
|
8234
|
+
if count < 0:
|
|
8235
|
+
raise InternalError("Unexpected negative sequence length")
|
|
8236
|
+
|
|
8237
|
+
return [
|
|
8238
|
+
_UniffiConverterTypeFiatCurrency.read(buf) for i in range(count)
|
|
8239
|
+
]
|
|
8240
|
+
|
|
8241
|
+
|
|
8242
|
+
|
|
8243
|
+
class _UniffiConverterSequenceTypeRate(_UniffiConverterRustBuffer):
|
|
8244
|
+
@classmethod
|
|
8245
|
+
def check_lower(cls, value):
|
|
8246
|
+
for item in value:
|
|
8247
|
+
_UniffiConverterTypeRate.check_lower(item)
|
|
8248
|
+
|
|
8249
|
+
@classmethod
|
|
8250
|
+
def write(cls, value, buf):
|
|
8251
|
+
items = len(value)
|
|
8252
|
+
buf.write_i32(items)
|
|
8253
|
+
for item in value:
|
|
8254
|
+
_UniffiConverterTypeRate.write(item, buf)
|
|
8255
|
+
|
|
8256
|
+
@classmethod
|
|
8257
|
+
def read(cls, buf):
|
|
8258
|
+
count = buf.read_i32()
|
|
8259
|
+
if count < 0:
|
|
8260
|
+
raise InternalError("Unexpected negative sequence length")
|
|
8261
|
+
|
|
8262
|
+
return [
|
|
8263
|
+
_UniffiConverterTypeRate.read(buf) for i in range(count)
|
|
8264
|
+
]
|
|
8265
|
+
|
|
7854
8266
|
# External type BitcoinAddressDetails is in namespace "breez_sdk_common", crate breez_sdk_common
|
|
7855
8267
|
|
|
7856
8268
|
|
|
@@ -7861,6 +8273,16 @@ class _UniffiConverterSequenceTypeUtxo(_UniffiConverterRustBuffer):
|
|
|
7861
8273
|
|
|
7862
8274
|
|
|
7863
8275
|
|
|
8276
|
+
# External type FiatCurrency is in namespace "breez_sdk_common", crate breez_sdk_common
|
|
8277
|
+
|
|
8278
|
+
|
|
8279
|
+
|
|
8280
|
+
|
|
8281
|
+
# External type FiatService is in namespace "breez_sdk_common", crate breez_sdk_common
|
|
8282
|
+
|
|
8283
|
+
|
|
8284
|
+
|
|
8285
|
+
|
|
7864
8286
|
# External type InputType is in namespace "breez_sdk_common", crate breez_sdk_common
|
|
7865
8287
|
|
|
7866
8288
|
|
|
@@ -7871,6 +8293,11 @@ class _UniffiConverterSequenceTypeUtxo(_UniffiConverterRustBuffer):
|
|
|
7871
8293
|
|
|
7872
8294
|
|
|
7873
8295
|
|
|
8296
|
+
# External type Rate is in namespace "breez_sdk_common", crate breez_sdk_common
|
|
8297
|
+
|
|
8298
|
+
|
|
8299
|
+
|
|
8300
|
+
|
|
7874
8301
|
# External type RestClient is in namespace "breez_sdk_common", crate breez_sdk_common
|
|
7875
8302
|
|
|
7876
8303
|
|
|
@@ -8086,6 +8513,7 @@ __all__ = [
|
|
|
8086
8513
|
"ReceivePaymentMethod",
|
|
8087
8514
|
"SdkError",
|
|
8088
8515
|
"SdkEvent",
|
|
8516
|
+
"Seed",
|
|
8089
8517
|
"SendPaymentMethod",
|
|
8090
8518
|
"SendPaymentOptions",
|
|
8091
8519
|
"StorageError",
|
|
@@ -8102,6 +8530,8 @@ __all__ = [
|
|
|
8102
8530
|
"GetPaymentRequest",
|
|
8103
8531
|
"GetPaymentResponse",
|
|
8104
8532
|
"LightningAddressInfo",
|
|
8533
|
+
"ListFiatCurrenciesResponse",
|
|
8534
|
+
"ListFiatRatesResponse",
|
|
8105
8535
|
"ListPaymentsRequest",
|
|
8106
8536
|
"ListPaymentsResponse",
|
|
8107
8537
|
"ListUnclaimedDepositsRequest",
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
breez_sdk_spark-0.2.1.data/purelib/breez_sdk_spark/__init__.py,sha256=Rmo1pY5ISvxSNwDo_RBCneMCfoYDNbB_4A7VCmQmtEI,148
|
|
2
|
+
breez_sdk_spark-0.2.1.data/purelib/breez_sdk_spark/breez_sdk_common.py,sha256=cdFqiHbDKhnyftMiQRJ30XPHUoGVHDu1gAyeM4EMg_w,202759
|
|
3
|
+
breez_sdk_spark-0.2.1.data/purelib/breez_sdk_spark/breez_sdk_spark.py,sha256=MsVDafnqF5FKS-fs5tHwFuACtTHkG6_lisSBqj-NR4E,307069
|
|
4
|
+
breez_sdk_spark-0.2.1.data/purelib/breez_sdk_spark/breez_sdk_spark_bindings.py,sha256=ysAJqyrIhXUjJIBj856CADqim5MR38CgNEIdG1Fj4qg,32901
|
|
5
|
+
breez_sdk_spark-0.2.1.data/purelib/breez_sdk_spark/libbreez_sdk_spark_bindings.so,sha256=BbiUpM1-8yZciVUJ7XdHY5PUSqWHoaupXshOwKMbSe8,25884584
|
|
6
|
+
breez_sdk_spark-0.2.1.dist-info/METADATA,sha256=lpRlzLClHQrk2WGPSZGTzsLKvho1hwPGxvJL0KJS3-8,441
|
|
7
|
+
breez_sdk_spark-0.2.1.dist-info/WHEEL,sha256=9E1_9CE2svy8tmK75w0aVb_f7oGVTQPZ0gXaDtfBM5g,113
|
|
8
|
+
breez_sdk_spark-0.2.1.dist-info/top_level.txt,sha256=EWjZB7jCSH5bjyOrFhpRFW4Jfo8ykKdxJ7tqAOytwDU,16
|
|
9
|
+
breez_sdk_spark-0.2.1.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
breez_sdk_spark-0.1.9.dev2.data/purelib/breez_sdk_spark/__init__.py,sha256=Rmo1pY5ISvxSNwDo_RBCneMCfoYDNbB_4A7VCmQmtEI,148
|
|
2
|
-
breez_sdk_spark-0.1.9.dev2.data/purelib/breez_sdk_spark/breez_sdk_common.py,sha256=4MjvVqRUxGdMOkWy_YXQ9hFaibt--rG2DfOgpBRl6ig,191744
|
|
3
|
-
breez_sdk_spark-0.1.9.dev2.data/purelib/breez_sdk_spark/breez_sdk_spark.py,sha256=F195p-cfDw5NpXgxtrUBwDeRvvRoqKnzpR3wRP7d8fo,292946
|
|
4
|
-
breez_sdk_spark-0.1.9.dev2.data/purelib/breez_sdk_spark/breez_sdk_spark_bindings.py,sha256=ysAJqyrIhXUjJIBj856CADqim5MR38CgNEIdG1Fj4qg,32901
|
|
5
|
-
breez_sdk_spark-0.1.9.dev2.data/purelib/breez_sdk_spark/libbreez_sdk_spark_bindings.so,sha256=Dtuiy_RIFaAwqX2ra0K7wdNh2-ifxvl_wil3GwFTAZc,25666200
|
|
6
|
-
breez_sdk_spark-0.1.9.dev2.dist-info/METADATA,sha256=fPLx9mrimEJ06bahSI3GeL8WmPEj3J7Ogn9bLDrbeIE,446
|
|
7
|
-
breez_sdk_spark-0.1.9.dev2.dist-info/WHEEL,sha256=9E1_9CE2svy8tmK75w0aVb_f7oGVTQPZ0gXaDtfBM5g,113
|
|
8
|
-
breez_sdk_spark-0.1.9.dev2.dist-info/top_level.txt,sha256=EWjZB7jCSH5bjyOrFhpRFW4Jfo8ykKdxJ7tqAOytwDU,16
|
|
9
|
-
breez_sdk_spark-0.1.9.dev2.dist-info/RECORD,,
|
{breez_sdk_spark-0.1.9.dev2.data → breez_sdk_spark-0.2.1.data}/purelib/breez_sdk_spark/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|