breez-sdk-spark 0.1.9__cp313-cp313-macosx_11_0_universal2.whl → 0.1.9.dev2__cp313-cp313-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.

Potentially problematic release.


This version of breez-sdk-spark might be problematic. Click here for more details.

@@ -461,11 +461,11 @@ 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_restclient_get() != 32450:
464
+ if lib.uniffi_breez_sdk_common_checksum_method_restclient_get_request() != 1702:
465
465
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
466
- if lib.uniffi_breez_sdk_common_checksum_method_restclient_post() != 14213:
466
+ if lib.uniffi_breez_sdk_common_checksum_method_restclient_post_request() != 38998:
467
467
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
468
- if lib.uniffi_breez_sdk_common_checksum_method_restclient_delete() != 56210:
468
+ if lib.uniffi_breez_sdk_common_checksum_method_restclient_delete_request() != 26893:
469
469
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
470
470
 
471
471
  # A ctypes library to expose the extern-C FFI definitions.
@@ -581,9 +581,9 @@ _UNIFFI_CALLBACK_INTERFACE_REST_CLIENT_METHOD2 = ctypes.CFUNCTYPE(None,ctypes.c_
581
581
  )
582
582
  class _UniffiVTableCallbackInterfaceRestClient(ctypes.Structure):
583
583
  _fields_ = [
584
- ("get", _UNIFFI_CALLBACK_INTERFACE_REST_CLIENT_METHOD0),
585
- ("post", _UNIFFI_CALLBACK_INTERFACE_REST_CLIENT_METHOD1),
586
- ("delete", _UNIFFI_CALLBACK_INTERFACE_REST_CLIENT_METHOD2),
584
+ ("get_request", _UNIFFI_CALLBACK_INTERFACE_REST_CLIENT_METHOD0),
585
+ ("post_request", _UNIFFI_CALLBACK_INTERFACE_REST_CLIENT_METHOD1),
586
+ ("delete_request", _UNIFFI_CALLBACK_INTERFACE_REST_CLIENT_METHOD2),
587
587
  ("uniffi_free", _UNIFFI_CALLBACK_INTERFACE_FREE),
588
588
  ]
589
589
  _UniffiLib.uniffi_breez_sdk_common_fn_clone_restclient.argtypes = (
@@ -600,26 +600,26 @@ _UniffiLib.uniffi_breez_sdk_common_fn_init_callback_vtable_restclient.argtypes =
600
600
  ctypes.POINTER(_UniffiVTableCallbackInterfaceRestClient),
601
601
  )
602
602
  _UniffiLib.uniffi_breez_sdk_common_fn_init_callback_vtable_restclient.restype = None
603
- _UniffiLib.uniffi_breez_sdk_common_fn_method_restclient_get.argtypes = (
603
+ _UniffiLib.uniffi_breez_sdk_common_fn_method_restclient_get_request.argtypes = (
604
604
  ctypes.c_void_p,
605
605
  _UniffiRustBuffer,
606
606
  _UniffiRustBuffer,
607
607
  )
608
- _UniffiLib.uniffi_breez_sdk_common_fn_method_restclient_get.restype = ctypes.c_uint64
609
- _UniffiLib.uniffi_breez_sdk_common_fn_method_restclient_post.argtypes = (
608
+ _UniffiLib.uniffi_breez_sdk_common_fn_method_restclient_get_request.restype = ctypes.c_uint64
609
+ _UniffiLib.uniffi_breez_sdk_common_fn_method_restclient_post_request.argtypes = (
610
610
  ctypes.c_void_p,
611
611
  _UniffiRustBuffer,
612
612
  _UniffiRustBuffer,
613
613
  _UniffiRustBuffer,
614
614
  )
615
- _UniffiLib.uniffi_breez_sdk_common_fn_method_restclient_post.restype = ctypes.c_uint64
616
- _UniffiLib.uniffi_breez_sdk_common_fn_method_restclient_delete.argtypes = (
615
+ _UniffiLib.uniffi_breez_sdk_common_fn_method_restclient_post_request.restype = ctypes.c_uint64
616
+ _UniffiLib.uniffi_breez_sdk_common_fn_method_restclient_delete_request.argtypes = (
617
617
  ctypes.c_void_p,
618
618
  _UniffiRustBuffer,
619
619
  _UniffiRustBuffer,
620
620
  _UniffiRustBuffer,
621
621
  )
622
- _UniffiLib.uniffi_breez_sdk_common_fn_method_restclient_delete.restype = ctypes.c_uint64
622
+ _UniffiLib.uniffi_breez_sdk_common_fn_method_restclient_delete_request.restype = ctypes.c_uint64
623
623
  _UniffiLib.ffi_breez_sdk_common_rustbuffer_alloc.argtypes = (
624
624
  ctypes.c_uint64,
625
625
  ctypes.POINTER(_UniffiRustCallStatus),
@@ -888,15 +888,15 @@ _UniffiLib.ffi_breez_sdk_common_rust_future_complete_void.argtypes = (
888
888
  ctypes.POINTER(_UniffiRustCallStatus),
889
889
  )
890
890
  _UniffiLib.ffi_breez_sdk_common_rust_future_complete_void.restype = None
891
- _UniffiLib.uniffi_breez_sdk_common_checksum_method_restclient_get.argtypes = (
891
+ _UniffiLib.uniffi_breez_sdk_common_checksum_method_restclient_get_request.argtypes = (
892
892
  )
893
- _UniffiLib.uniffi_breez_sdk_common_checksum_method_restclient_get.restype = ctypes.c_uint16
894
- _UniffiLib.uniffi_breez_sdk_common_checksum_method_restclient_post.argtypes = (
893
+ _UniffiLib.uniffi_breez_sdk_common_checksum_method_restclient_get_request.restype = ctypes.c_uint16
894
+ _UniffiLib.uniffi_breez_sdk_common_checksum_method_restclient_post_request.argtypes = (
895
895
  )
896
- _UniffiLib.uniffi_breez_sdk_common_checksum_method_restclient_post.restype = ctypes.c_uint16
897
- _UniffiLib.uniffi_breez_sdk_common_checksum_method_restclient_delete.argtypes = (
896
+ _UniffiLib.uniffi_breez_sdk_common_checksum_method_restclient_post_request.restype = ctypes.c_uint16
897
+ _UniffiLib.uniffi_breez_sdk_common_checksum_method_restclient_delete_request.argtypes = (
898
898
  )
899
- _UniffiLib.uniffi_breez_sdk_common_checksum_method_restclient_delete.restype = ctypes.c_uint16
899
+ _UniffiLib.uniffi_breez_sdk_common_checksum_method_restclient_delete_request.restype = ctypes.c_uint16
900
900
  _UniffiLib.ffi_breez_sdk_common_uniffi_contract_version.argtypes = (
901
901
  )
902
902
  _UniffiLib.ffi_breez_sdk_common_uniffi_contract_version.restype = ctypes.c_uint32
@@ -1011,7 +1011,7 @@ class _UniffiConverterString:
1011
1011
 
1012
1012
 
1013
1013
  class RestClient(typing.Protocol):
1014
- def get(self, url: "str",headers: "typing.Optional[dict[str, str]]"):
1014
+ def get_request(self, url: "str",headers: "typing.Optional[dict[str, str]]"):
1015
1015
  """
1016
1016
  Makes a GET request and logs on DEBUG.
1017
1017
  ### Arguments
@@ -1020,7 +1020,7 @@ class RestClient(typing.Protocol):
1020
1020
  """
1021
1021
 
1022
1022
  raise NotImplementedError
1023
- def post(self, url: "str",headers: "typing.Optional[dict[str, str]]",body: "typing.Optional[str]"):
1023
+ def post_request(self, url: "str",headers: "typing.Optional[dict[str, str]]",body: "typing.Optional[str]"):
1024
1024
  """
1025
1025
  Makes a POST request, and logs on DEBUG.
1026
1026
  ### Arguments
@@ -1030,7 +1030,7 @@ class RestClient(typing.Protocol):
1030
1030
  """
1031
1031
 
1032
1032
  raise NotImplementedError
1033
- def delete(self, url: "str",headers: "typing.Optional[dict[str, str]]",body: "typing.Optional[str]"):
1033
+ def delete_request(self, url: "str",headers: "typing.Optional[dict[str, str]]",body: "typing.Optional[str]"):
1034
1034
  """
1035
1035
  Makes a DELETE request, and logs on DEBUG.
1036
1036
  ### Arguments
@@ -1066,7 +1066,7 @@ class RestClientImpl:
1066
1066
  inst._pointer = pointer
1067
1067
  return inst
1068
1068
 
1069
- async def get(self, url: "str",headers: "typing.Optional[dict[str, str]]") -> "RestResponse":
1069
+ async def get_request(self, url: "str",headers: "typing.Optional[dict[str, str]]") -> "RestResponse":
1070
1070
  """
1071
1071
  Makes a GET request and logs on DEBUG.
1072
1072
  ### Arguments
@@ -1079,7 +1079,7 @@ class RestClientImpl:
1079
1079
  _UniffiConverterOptionalMapStringString.check_lower(headers)
1080
1080
 
1081
1081
  return await _uniffi_rust_call_async(
1082
- _UniffiLib.uniffi_breez_sdk_common_fn_method_restclient_get(
1082
+ _UniffiLib.uniffi_breez_sdk_common_fn_method_restclient_get_request(
1083
1083
  self._uniffi_clone_pointer(),
1084
1084
  _UniffiConverterString.lower(url),
1085
1085
  _UniffiConverterOptionalMapStringString.lower(headers)
@@ -1097,7 +1097,7 @@ _UniffiConverterTypeServiceConnectivityError,
1097
1097
 
1098
1098
 
1099
1099
 
1100
- async def post(self, url: "str",headers: "typing.Optional[dict[str, str]]",body: "typing.Optional[str]") -> "RestResponse":
1100
+ async def post_request(self, url: "str",headers: "typing.Optional[dict[str, str]]",body: "typing.Optional[str]") -> "RestResponse":
1101
1101
  """
1102
1102
  Makes a POST request, and logs on DEBUG.
1103
1103
  ### Arguments
@@ -1113,7 +1113,7 @@ _UniffiConverterTypeServiceConnectivityError,
1113
1113
  _UniffiConverterOptionalString.check_lower(body)
1114
1114
 
1115
1115
  return await _uniffi_rust_call_async(
1116
- _UniffiLib.uniffi_breez_sdk_common_fn_method_restclient_post(
1116
+ _UniffiLib.uniffi_breez_sdk_common_fn_method_restclient_post_request(
1117
1117
  self._uniffi_clone_pointer(),
1118
1118
  _UniffiConverterString.lower(url),
1119
1119
  _UniffiConverterOptionalMapStringString.lower(headers),
@@ -1132,7 +1132,7 @@ _UniffiConverterTypeServiceConnectivityError,
1132
1132
 
1133
1133
 
1134
1134
 
1135
- async def delete(self, url: "str",headers: "typing.Optional[dict[str, str]]",body: "typing.Optional[str]") -> "RestResponse":
1135
+ async def delete_request(self, url: "str",headers: "typing.Optional[dict[str, str]]",body: "typing.Optional[str]") -> "RestResponse":
1136
1136
  """
1137
1137
  Makes a DELETE request, and logs on DEBUG.
1138
1138
  ### Arguments
@@ -1148,7 +1148,7 @@ _UniffiConverterTypeServiceConnectivityError,
1148
1148
  _UniffiConverterOptionalString.check_lower(body)
1149
1149
 
1150
1150
  return await _uniffi_rust_call_async(
1151
- _UniffiLib.uniffi_breez_sdk_common_fn_method_restclient_delete(
1151
+ _UniffiLib.uniffi_breez_sdk_common_fn_method_restclient_delete_request(
1152
1152
  self._uniffi_clone_pointer(),
1153
1153
  _UniffiConverterString.lower(url),
1154
1154
  _UniffiConverterOptionalMapStringString.lower(headers),
@@ -1204,7 +1204,7 @@ class _UniffiTraitImplRestClient:
1204
1204
  # For each method, generate a callback function to pass to Rust
1205
1205
 
1206
1206
  @_UNIFFI_CALLBACK_INTERFACE_REST_CLIENT_METHOD0
1207
- def get(
1207
+ def get_request(
1208
1208
  uniffi_handle,
1209
1209
  url,
1210
1210
  headers,
@@ -1215,7 +1215,7 @@ class _UniffiTraitImplRestClient:
1215
1215
  uniffi_obj = _UniffiConverterTypeRestClient._handle_map.get(uniffi_handle)
1216
1216
  def make_call():
1217
1217
  args = (_UniffiConverterString.lift(url), _UniffiConverterOptionalMapStringString.lift(headers), )
1218
- method = uniffi_obj.get
1218
+ method = uniffi_obj.get_request
1219
1219
  return method(*args)
1220
1220
 
1221
1221
 
@@ -1239,7 +1239,7 @@ class _UniffiTraitImplRestClient:
1239
1239
  uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, ServiceConnectivityError, _UniffiConverterTypeServiceConnectivityError.lower)
1240
1240
 
1241
1241
  @_UNIFFI_CALLBACK_INTERFACE_REST_CLIENT_METHOD1
1242
- def post(
1242
+ def post_request(
1243
1243
  uniffi_handle,
1244
1244
  url,
1245
1245
  headers,
@@ -1251,7 +1251,7 @@ class _UniffiTraitImplRestClient:
1251
1251
  uniffi_obj = _UniffiConverterTypeRestClient._handle_map.get(uniffi_handle)
1252
1252
  def make_call():
1253
1253
  args = (_UniffiConverterString.lift(url), _UniffiConverterOptionalMapStringString.lift(headers), _UniffiConverterOptionalString.lift(body), )
1254
- method = uniffi_obj.post
1254
+ method = uniffi_obj.post_request
1255
1255
  return method(*args)
1256
1256
 
1257
1257
 
@@ -1275,7 +1275,7 @@ class _UniffiTraitImplRestClient:
1275
1275
  uniffi_out_return[0] = _uniffi_trait_interface_call_async_with_error(make_call, handle_success, handle_error, ServiceConnectivityError, _UniffiConverterTypeServiceConnectivityError.lower)
1276
1276
 
1277
1277
  @_UNIFFI_CALLBACK_INTERFACE_REST_CLIENT_METHOD2
1278
- def delete(
1278
+ def delete_request(
1279
1279
  uniffi_handle,
1280
1280
  url,
1281
1281
  headers,
@@ -1287,7 +1287,7 @@ class _UniffiTraitImplRestClient:
1287
1287
  uniffi_obj = _UniffiConverterTypeRestClient._handle_map.get(uniffi_handle)
1288
1288
  def make_call():
1289
1289
  args = (_UniffiConverterString.lift(url), _UniffiConverterOptionalMapStringString.lift(headers), _UniffiConverterOptionalString.lift(body), )
1290
- method = uniffi_obj.delete
1290
+ method = uniffi_obj.delete_request
1291
1291
  return method(*args)
1292
1292
 
1293
1293
 
@@ -1316,9 +1316,9 @@ class _UniffiTraitImplRestClient:
1316
1316
 
1317
1317
  # Generate the FFI VTable. This has a field for each callback interface method.
1318
1318
  _uniffi_vtable = _UniffiVTableCallbackInterfaceRestClient(
1319
- get,
1320
- post,
1321
- delete,
1319
+ get_request,
1320
+ post_request,
1321
+ delete_request,
1322
1322
  _uniffi_free
1323
1323
  )
1324
1324
  # Send Rust a pointer to the VTable. Note: this means we need to keep the struct alive forever,
@@ -486,7 +486,7 @@ def _uniffi_check_api_checksums(lib):
486
486
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
487
487
  if lib.uniffi_breez_sdk_spark_checksum_func_default_config() != 62194:
488
488
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
489
- if lib.uniffi_breez_sdk_spark_checksum_func_default_storage() != 30804:
489
+ if lib.uniffi_breez_sdk_spark_checksum_func_default_storage() != 46285:
490
490
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
491
491
  if lib.uniffi_breez_sdk_spark_checksum_func_init_logging() != 8518:
492
492
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
@@ -520,7 +520,7 @@ def _uniffi_check_api_checksums(lib):
520
520
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
521
521
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_lnurl_pay() != 10147:
522
522
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
523
- if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_poll_lightning_send_payment() != 5478:
523
+ if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_poll_lightning_send_payment() != 57601:
524
524
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
525
525
  if lib.uniffi_breez_sdk_spark_checksum_method_breezsdk_prepare_lnurl_pay() != 37691:
526
526
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
@@ -546,6 +546,8 @@ def _uniffi_check_api_checksums(lib):
546
546
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
547
547
  if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service() != 2848:
548
548
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
549
+ if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set() != 55523:
550
+ raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
549
551
  if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client() != 61720:
550
552
  raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
551
553
  if lib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_rest_chain_service() != 56288:
@@ -846,6 +848,7 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_lnurl_pay.restype = ctypes.
846
848
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_poll_lightning_send_payment.argtypes = (
847
849
  ctypes.c_void_p,
848
850
  _UniffiRustBuffer,
851
+ _UniffiRustBuffer,
849
852
  ctypes.POINTER(_UniffiRustCallStatus),
850
853
  )
851
854
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_poll_lightning_send_payment.restype = None
@@ -927,6 +930,12 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_chain_service.argtyp
927
930
  ctypes.c_void_p,
928
931
  )
929
932
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_chain_service.restype = ctypes.c_uint64
933
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set.argtypes = (
934
+ ctypes.c_void_p,
935
+ _UniffiRustBuffer,
936
+ ctypes.c_int8,
937
+ )
938
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set.restype = ctypes.c_uint64
930
939
  _UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_lnurl_client.argtypes = (
931
940
  ctypes.c_void_p,
932
941
  ctypes.c_void_p,
@@ -1033,8 +1042,9 @@ _UniffiLib.uniffi_breez_sdk_spark_fn_func_default_config.argtypes = (
1033
1042
  _UniffiLib.uniffi_breez_sdk_spark_fn_func_default_config.restype = _UniffiRustBuffer
1034
1043
  _UniffiLib.uniffi_breez_sdk_spark_fn_func_default_storage.argtypes = (
1035
1044
  _UniffiRustBuffer,
1045
+ ctypes.POINTER(_UniffiRustCallStatus),
1036
1046
  )
1037
- _UniffiLib.uniffi_breez_sdk_spark_fn_func_default_storage.restype = ctypes.c_uint64
1047
+ _UniffiLib.uniffi_breez_sdk_spark_fn_func_default_storage.restype = ctypes.c_void_p
1038
1048
  _UniffiLib.uniffi_breez_sdk_spark_fn_func_init_logging.argtypes = (
1039
1049
  _UniffiRustBuffer,
1040
1050
  _UniffiRustBuffer,
@@ -1410,6 +1420,9 @@ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_build.restype = cty
1410
1420
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service.argtypes = (
1411
1421
  )
1412
1422
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_chain_service.restype = ctypes.c_uint16
1423
+ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set.argtypes = (
1424
+ )
1425
+ _UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_key_set.restype = ctypes.c_uint16
1413
1426
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client.argtypes = (
1414
1427
  )
1415
1428
  _UniffiLib.uniffi_breez_sdk_spark_checksum_method_sdkbuilder_with_lnurl_client.restype = ctypes.c_uint16
@@ -1900,7 +1913,7 @@ class BreezSdkProtocol(typing.Protocol):
1900
1913
  raise NotImplementedError
1901
1914
  def lnurl_pay(self, request: "LnurlPayRequest"):
1902
1915
  raise NotImplementedError
1903
- def poll_lightning_send_payment(self, payment_id: "str"):
1916
+ def poll_lightning_send_payment(self, payment: "Payment",ssp_id: "str"):
1904
1917
  raise NotImplementedError
1905
1918
  def prepare_lnurl_pay(self, request: "PrepareLnurlPayRequest"):
1906
1919
  raise NotImplementedError
@@ -2223,11 +2236,14 @@ _UniffiConverterTypeSdkError,
2223
2236
 
2224
2237
 
2225
2238
 
2226
- def poll_lightning_send_payment(self, payment_id: "str") -> None:
2227
- _UniffiConverterString.check_lower(payment_id)
2239
+ def poll_lightning_send_payment(self, payment: "Payment",ssp_id: "str") -> None:
2240
+ _UniffiConverterTypePayment.check_lower(payment)
2241
+
2242
+ _UniffiConverterString.check_lower(ssp_id)
2228
2243
 
2229
2244
  _uniffi_rust_call(_UniffiLib.uniffi_breez_sdk_spark_fn_method_breezsdk_poll_lightning_send_payment,self._uniffi_clone_pointer(),
2230
- _UniffiConverterString.lower(payment_id))
2245
+ _UniffiConverterTypePayment.lower(payment),
2246
+ _UniffiConverterString.lower(ssp_id))
2231
2247
 
2232
2248
 
2233
2249
 
@@ -2495,6 +2511,15 @@ class SdkBuilderProtocol(typing.Protocol):
2495
2511
  - `chain_service`: The chain service to be used.
2496
2512
  """
2497
2513
 
2514
+ raise NotImplementedError
2515
+ def with_key_set(self, key_set_type: "KeySetType",use_address_index: "bool"):
2516
+ """
2517
+ Sets the key set type to be used by the SDK.
2518
+ Arguments:
2519
+ - `key_set_type`: The key set type which determines the derivation path.
2520
+ - `use_address_index`: Controls the structure of the BIP derivation path.
2521
+ """
2522
+
2498
2523
  raise NotImplementedError
2499
2524
  def with_lnurl_client(self, lnurl_client: "RestClient"):
2500
2525
  raise NotImplementedError
@@ -2605,6 +2630,40 @@ _UniffiConverterTypeSdkError,
2605
2630
 
2606
2631
 
2607
2632
 
2633
+ async def with_key_set(self, key_set_type: "KeySetType",use_address_index: "bool") -> None:
2634
+
2635
+ """
2636
+ Sets the key set type to be used by the SDK.
2637
+ Arguments:
2638
+ - `key_set_type`: The key set type which determines the derivation path.
2639
+ - `use_address_index`: Controls the structure of the BIP derivation path.
2640
+ """
2641
+
2642
+ _UniffiConverterTypeKeySetType.check_lower(key_set_type)
2643
+
2644
+ _UniffiConverterBool.check_lower(use_address_index)
2645
+
2646
+ return await _uniffi_rust_call_async(
2647
+ _UniffiLib.uniffi_breez_sdk_spark_fn_method_sdkbuilder_with_key_set(
2648
+ self._uniffi_clone_pointer(),
2649
+ _UniffiConverterTypeKeySetType.lower(key_set_type),
2650
+ _UniffiConverterBool.lower(use_address_index)
2651
+ ),
2652
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_void,
2653
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_void,
2654
+ _UniffiLib.ffi_breez_sdk_spark_rust_future_free_void,
2655
+ # lift function
2656
+ lambda val: None,
2657
+
2658
+
2659
+ # Error FFI converter
2660
+
2661
+ None,
2662
+
2663
+ )
2664
+
2665
+
2666
+
2608
2667
  async def with_lnurl_client(self, lnurl_client: "RestClient") -> None:
2609
2668
 
2610
2669
  _UniffiConverterTypeRestClient.check_lower(lnurl_client)
@@ -3744,15 +3803,23 @@ class Config:
3744
3803
  The domain used for receiving through lnurl-pay and lightning address.
3745
3804
  """
3746
3805
 
3747
- def __init__(self, *, api_key: "typing.Optional[str]", network: "Network", sync_interval_secs: "int", max_deposit_claim_fee: "typing.Optional[Fee]", lnurl_domain: "typing.Optional[str]"):
3806
+ prefer_spark_over_lightning: "bool"
3807
+ """
3808
+ When this is set to `true` we will prefer to use spark payments over
3809
+ lightning when sending and receiving. This has the benefit of lower fees
3810
+ but is at the cost of privacy.
3811
+ """
3812
+
3813
+ def __init__(self, *, api_key: "typing.Optional[str]", network: "Network", sync_interval_secs: "int", max_deposit_claim_fee: "typing.Optional[Fee]", lnurl_domain: "typing.Optional[str]", prefer_spark_over_lightning: "bool"):
3748
3814
  self.api_key = api_key
3749
3815
  self.network = network
3750
3816
  self.sync_interval_secs = sync_interval_secs
3751
3817
  self.max_deposit_claim_fee = max_deposit_claim_fee
3752
3818
  self.lnurl_domain = lnurl_domain
3819
+ self.prefer_spark_over_lightning = prefer_spark_over_lightning
3753
3820
 
3754
3821
  def __str__(self):
3755
- return "Config(api_key={}, network={}, sync_interval_secs={}, max_deposit_claim_fee={}, lnurl_domain={})".format(self.api_key, self.network, self.sync_interval_secs, self.max_deposit_claim_fee, self.lnurl_domain)
3822
+ return "Config(api_key={}, network={}, sync_interval_secs={}, max_deposit_claim_fee={}, lnurl_domain={}, prefer_spark_over_lightning={})".format(self.api_key, self.network, self.sync_interval_secs, self.max_deposit_claim_fee, self.lnurl_domain, self.prefer_spark_over_lightning)
3756
3823
 
3757
3824
  def __eq__(self, other):
3758
3825
  if self.api_key != other.api_key:
@@ -3765,6 +3832,8 @@ class Config:
3765
3832
  return False
3766
3833
  if self.lnurl_domain != other.lnurl_domain:
3767
3834
  return False
3835
+ if self.prefer_spark_over_lightning != other.prefer_spark_over_lightning:
3836
+ return False
3768
3837
  return True
3769
3838
 
3770
3839
  class _UniffiConverterTypeConfig(_UniffiConverterRustBuffer):
@@ -3776,6 +3845,7 @@ class _UniffiConverterTypeConfig(_UniffiConverterRustBuffer):
3776
3845
  sync_interval_secs=_UniffiConverterUInt32.read(buf),
3777
3846
  max_deposit_claim_fee=_UniffiConverterOptionalTypeFee.read(buf),
3778
3847
  lnurl_domain=_UniffiConverterOptionalString.read(buf),
3848
+ prefer_spark_over_lightning=_UniffiConverterBool.read(buf),
3779
3849
  )
3780
3850
 
3781
3851
  @staticmethod
@@ -3785,6 +3855,7 @@ class _UniffiConverterTypeConfig(_UniffiConverterRustBuffer):
3785
3855
  _UniffiConverterUInt32.check_lower(value.sync_interval_secs)
3786
3856
  _UniffiConverterOptionalTypeFee.check_lower(value.max_deposit_claim_fee)
3787
3857
  _UniffiConverterOptionalString.check_lower(value.lnurl_domain)
3858
+ _UniffiConverterBool.check_lower(value.prefer_spark_over_lightning)
3788
3859
 
3789
3860
  @staticmethod
3790
3861
  def write(value, buf):
@@ -3793,6 +3864,7 @@ class _UniffiConverterTypeConfig(_UniffiConverterRustBuffer):
3793
3864
  _UniffiConverterUInt32.write(value.sync_interval_secs, buf)
3794
3865
  _UniffiConverterOptionalTypeFee.write(value.max_deposit_claim_fee, buf)
3795
3866
  _UniffiConverterOptionalString.write(value.lnurl_domain, buf)
3867
+ _UniffiConverterBool.write(value.prefer_spark_over_lightning, buf)
3796
3868
 
3797
3869
 
3798
3870
  class ConnectRequest:
@@ -5615,6 +5687,68 @@ class _UniffiConverterTypeFee(_UniffiConverterRustBuffer):
5615
5687
 
5616
5688
 
5617
5689
 
5690
+ class KeySetType(enum.Enum):
5691
+ DEFAULT = 0
5692
+
5693
+ TAPROOT = 1
5694
+
5695
+ NATIVE_SEGWIT = 2
5696
+
5697
+ WRAPPED_SEGWIT = 3
5698
+
5699
+ LEGACY = 4
5700
+
5701
+
5702
+
5703
+ class _UniffiConverterTypeKeySetType(_UniffiConverterRustBuffer):
5704
+ @staticmethod
5705
+ def read(buf):
5706
+ variant = buf.read_i32()
5707
+ if variant == 1:
5708
+ return KeySetType.DEFAULT
5709
+ if variant == 2:
5710
+ return KeySetType.TAPROOT
5711
+ if variant == 3:
5712
+ return KeySetType.NATIVE_SEGWIT
5713
+ if variant == 4:
5714
+ return KeySetType.WRAPPED_SEGWIT
5715
+ if variant == 5:
5716
+ return KeySetType.LEGACY
5717
+ raise InternalError("Raw enum value doesn't match any cases")
5718
+
5719
+ @staticmethod
5720
+ def check_lower(value):
5721
+ if value == KeySetType.DEFAULT:
5722
+ return
5723
+ if value == KeySetType.TAPROOT:
5724
+ return
5725
+ if value == KeySetType.NATIVE_SEGWIT:
5726
+ return
5727
+ if value == KeySetType.WRAPPED_SEGWIT:
5728
+ return
5729
+ if value == KeySetType.LEGACY:
5730
+ return
5731
+ raise ValueError(value)
5732
+
5733
+ @staticmethod
5734
+ def write(value, buf):
5735
+ if value == KeySetType.DEFAULT:
5736
+ buf.write_i32(1)
5737
+ if value == KeySetType.TAPROOT:
5738
+ buf.write_i32(2)
5739
+ if value == KeySetType.NATIVE_SEGWIT:
5740
+ buf.write_i32(3)
5741
+ if value == KeySetType.WRAPPED_SEGWIT:
5742
+ buf.write_i32(4)
5743
+ if value == KeySetType.LEGACY:
5744
+ buf.write_i32(5)
5745
+
5746
+
5747
+
5748
+
5749
+
5750
+
5751
+
5618
5752
  class Network(enum.Enum):
5619
5753
  MAINNET = 0
5620
5754
 
@@ -6588,6 +6722,22 @@ class SdkEvent:
6588
6722
  return False
6589
6723
  return True
6590
6724
 
6725
+ class PAYMENT_FAILED:
6726
+ payment: "Payment"
6727
+
6728
+ def __init__(self,payment: "Payment"):
6729
+ self.payment = payment
6730
+
6731
+ def __str__(self):
6732
+ return "SdkEvent.PAYMENT_FAILED(payment={})".format(self.payment)
6733
+
6734
+ def __eq__(self, other):
6735
+ if not other.is_payment_failed():
6736
+ return False
6737
+ if self.payment != other.payment:
6738
+ return False
6739
+ return True
6740
+
6591
6741
 
6592
6742
 
6593
6743
  # For each variant, we have an `is_NAME` method for easily checking
@@ -6600,6 +6750,8 @@ class SdkEvent:
6600
6750
  return isinstance(self, SdkEvent.CLAIM_DEPOSITS_SUCCEEDED)
6601
6751
  def is_payment_succeeded(self) -> bool:
6602
6752
  return isinstance(self, SdkEvent.PAYMENT_SUCCEEDED)
6753
+ def is_payment_failed(self) -> bool:
6754
+ return isinstance(self, SdkEvent.PAYMENT_FAILED)
6603
6755
 
6604
6756
 
6605
6757
  # Now, a little trick - we make each nested variant class be a subclass of the main
@@ -6609,6 +6761,7 @@ SdkEvent.SYNCED = type("SdkEvent.SYNCED", (SdkEvent.SYNCED, SdkEvent,), {}) # t
6609
6761
  SdkEvent.CLAIM_DEPOSITS_FAILED = type("SdkEvent.CLAIM_DEPOSITS_FAILED", (SdkEvent.CLAIM_DEPOSITS_FAILED, SdkEvent,), {}) # type: ignore
6610
6762
  SdkEvent.CLAIM_DEPOSITS_SUCCEEDED = type("SdkEvent.CLAIM_DEPOSITS_SUCCEEDED", (SdkEvent.CLAIM_DEPOSITS_SUCCEEDED, SdkEvent,), {}) # type: ignore
6611
6763
  SdkEvent.PAYMENT_SUCCEEDED = type("SdkEvent.PAYMENT_SUCCEEDED", (SdkEvent.PAYMENT_SUCCEEDED, SdkEvent,), {}) # type: ignore
6764
+ SdkEvent.PAYMENT_FAILED = type("SdkEvent.PAYMENT_FAILED", (SdkEvent.PAYMENT_FAILED, SdkEvent,), {}) # type: ignore
6612
6765
 
6613
6766
 
6614
6767
 
@@ -6632,6 +6785,10 @@ class _UniffiConverterTypeSdkEvent(_UniffiConverterRustBuffer):
6632
6785
  return SdkEvent.PAYMENT_SUCCEEDED(
6633
6786
  _UniffiConverterTypePayment.read(buf),
6634
6787
  )
6788
+ if variant == 5:
6789
+ return SdkEvent.PAYMENT_FAILED(
6790
+ _UniffiConverterTypePayment.read(buf),
6791
+ )
6635
6792
  raise InternalError("Raw enum value doesn't match any cases")
6636
6793
 
6637
6794
  @staticmethod
@@ -6647,6 +6804,9 @@ class _UniffiConverterTypeSdkEvent(_UniffiConverterRustBuffer):
6647
6804
  if value.is_payment_succeeded():
6648
6805
  _UniffiConverterTypePayment.check_lower(value.payment)
6649
6806
  return
6807
+ if value.is_payment_failed():
6808
+ _UniffiConverterTypePayment.check_lower(value.payment)
6809
+ return
6650
6810
  raise ValueError(value)
6651
6811
 
6652
6812
  @staticmethod
@@ -6662,6 +6822,9 @@ class _UniffiConverterTypeSdkEvent(_UniffiConverterRustBuffer):
6662
6822
  if value.is_payment_succeeded():
6663
6823
  buf.write_i32(4)
6664
6824
  _UniffiConverterTypePayment.write(value.payment, buf)
6825
+ if value.is_payment_failed():
6826
+ buf.write_i32(5)
6827
+ _UniffiConverterTypePayment.write(value.payment, buf)
6665
6828
 
6666
6829
 
6667
6830
 
@@ -7870,23 +8033,13 @@ def default_config(network: "Network") -> "Config":
7870
8033
  return _UniffiConverterTypeConfig.lift(_uniffi_rust_call(_UniffiLib.uniffi_breez_sdk_spark_fn_func_default_config,
7871
8034
  _UniffiConverterTypeNetwork.lower(network)))
7872
8035
 
7873
- async def default_storage(data_dir: "str") -> "Storage":
7874
8036
 
8037
+ def default_storage(data_dir: "str") -> "Storage":
7875
8038
  _UniffiConverterString.check_lower(data_dir)
7876
8039
 
7877
- return await _uniffi_rust_call_async(
7878
- _UniffiLib.uniffi_breez_sdk_spark_fn_func_default_storage(
7879
- _UniffiConverterString.lower(data_dir)),
7880
- _UniffiLib.ffi_breez_sdk_spark_rust_future_poll_pointer,
7881
- _UniffiLib.ffi_breez_sdk_spark_rust_future_complete_pointer,
7882
- _UniffiLib.ffi_breez_sdk_spark_rust_future_free_pointer,
7883
- # lift function
7884
- _UniffiConverterTypeStorage.lift,
7885
-
7886
- # Error FFI converter
7887
- _UniffiConverterTypeSdkError,
8040
+ return _UniffiConverterTypeStorage.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeSdkError,_UniffiLib.uniffi_breez_sdk_spark_fn_func_default_storage,
8041
+ _UniffiConverterString.lower(data_dir)))
7888
8042
 
7889
- )
7890
8043
 
7891
8044
  def init_logging(log_dir: "typing.Optional[str]",app_logger: "typing.Optional[Logger]",log_filter: "typing.Optional[str]") -> None:
7892
8045
  _UniffiConverterOptionalString.check_lower(log_dir)
@@ -7923,6 +8076,7 @@ __all__ = [
7923
8076
  "ChainServiceError",
7924
8077
  "DepositClaimError",
7925
8078
  "Fee",
8079
+ "KeySetType",
7926
8080
  "Network",
7927
8081
  "OnchainConfirmationSpeed",
7928
8082
  "PaymentDetails",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: breez_sdk_spark
3
- Version: 0.1.9
3
+ Version: 0.1.9.dev2
4
4
  Summary: Python language bindings for the Breez Spark SDK
5
5
  Home-page: https://github.com/breez/spark-sdk
6
6
  Author: Breez <contact@breez.technology>
@@ -0,0 +1,9 @@
1
+ breez_sdk_spark/__init__.py,sha256=Rmo1pY5ISvxSNwDo_RBCneMCfoYDNbB_4A7VCmQmtEI,148
2
+ breez_sdk_spark/breez_sdk_common.py,sha256=4MjvVqRUxGdMOkWy_YXQ9hFaibt--rG2DfOgpBRl6ig,191744
3
+ breez_sdk_spark/breez_sdk_spark.py,sha256=F195p-cfDw5NpXgxtrUBwDeRvvRoqKnzpR3wRP7d8fo,292946
4
+ breez_sdk_spark/breez_sdk_spark_bindings.py,sha256=ysAJqyrIhXUjJIBj856CADqim5MR38CgNEIdG1Fj4qg,32901
5
+ breez_sdk_spark/libbreez_sdk_spark_bindings.dylib,sha256=BkMfwodjAqUP3CmbC8R6ESA0AQDhGolUzruw5g7DYks,31917248
6
+ breez_sdk_spark-0.1.9.dev2.dist-info/METADATA,sha256=fc-5mKAmq-LFN0QEqn0NF9qxfa5oYDNhJUGmmiPCvL8,550
7
+ breez_sdk_spark-0.1.9.dev2.dist-info/WHEEL,sha256=3s_eT7rbkGQeiKRiW_YCG21vqO2C4rGI4Jg-le1fLJ0,114
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,,
@@ -1,9 +0,0 @@
1
- breez_sdk_spark/__init__.py,sha256=Rmo1pY5ISvxSNwDo_RBCneMCfoYDNbB_4A7VCmQmtEI,148
2
- breez_sdk_spark/breez_sdk_common.py,sha256=gS3hvzeFjIGNrSREOlzdVqfdYnoPGpfJm20EOnibhso,191457
3
- breez_sdk_spark/breez_sdk_spark.py,sha256=4raf2zE-ntNbW91SkiNt1nOIMNoTIlEjksF6-iiOumE,287591
4
- breez_sdk_spark/breez_sdk_spark_bindings.py,sha256=ysAJqyrIhXUjJIBj856CADqim5MR38CgNEIdG1Fj4qg,32901
5
- breez_sdk_spark/libbreez_sdk_spark_bindings.dylib,sha256=9g7_Z2MFpB4oVAFiU-Pm8hogcPwYuteOz1X_Baje5uY,33759184
6
- breez_sdk_spark-0.1.9.dist-info/METADATA,sha256=Avbcsnk-OXgBERVJORM-Mg5jZHf2bKfjtQkkJf24LRA,545
7
- breez_sdk_spark-0.1.9.dist-info/WHEEL,sha256=3s_eT7rbkGQeiKRiW_YCG21vqO2C4rGI4Jg-le1fLJ0,114
8
- breez_sdk_spark-0.1.9.dist-info/top_level.txt,sha256=EWjZB7jCSH5bjyOrFhpRFW4Jfo8ykKdxJ7tqAOytwDU,16
9
- breez_sdk_spark-0.1.9.dist-info/RECORD,,