@breeztech/breez-sdk-spark-react-native 0.2.0 → 0.2.2-dev1

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.
@@ -1 +1 @@
1
- {"version":3,"names":["getter","globalThis","NativeBreezSdkSpark","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/breez_sdk_spark-ffi.ts"],"mappings":";;AAAA;AACA;;AAueA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,mBAAmB;AACzC,eAAeF,MAAM;;AAErB;;AAkPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,8CAGL,GAAG,IAAI;AACR,MAAMC,mCAGL,GAAG,IAAI","ignoreList":[]}
1
+ {"version":3,"names":["getter","globalThis","NativeBreezSdkSpark","isRustFutureContinuationCallbackTypeCompatible","isUniffiForeignFutureTypeCompatible"],"sourceRoot":"../../../src","sources":["generated/breez_sdk_spark-ffi.ts"],"mappings":";;AAAA;AACA;;AA4eA;AACA;AACA;AACA;AACA;AACA,MAAMA,MAAmC,GAAGA,CAAA,KACzCC,UAAU,CAASC,mBAAmB;AACzC,eAAeF,MAAM;;AAErB;;AAyPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,8CAGL,GAAG,IAAI;AACR,MAAMC,mCAGL,GAAG,IAAI","ignoreList":[]}
@@ -1224,14 +1224,16 @@ const FfiConverterTypePaymentMetadata = (() => {
1224
1224
  class FFIConverter extends AbstractFfiConverterByteArray {
1225
1225
  read(from) {
1226
1226
  return {
1227
- lnurlPayInfo: FfiConverterOptionalTypeLnurlPayInfo.read(from)
1227
+ lnurlPayInfo: FfiConverterOptionalTypeLnurlPayInfo.read(from),
1228
+ lnurlDescription: FfiConverterOptionalString.read(from)
1228
1229
  };
1229
1230
  }
1230
1231
  write(value, into) {
1231
1232
  FfiConverterOptionalTypeLnurlPayInfo.write(value.lnurlPayInfo, into);
1233
+ FfiConverterOptionalString.write(value.lnurlDescription, into);
1232
1234
  }
1233
1235
  allocationSize(value) {
1234
- return FfiConverterOptionalTypeLnurlPayInfo.allocationSize(value.lnurlPayInfo);
1236
+ return FfiConverterOptionalTypeLnurlPayInfo.allocationSize(value.lnurlPayInfo) + FfiConverterOptionalString.allocationSize(value.lnurlDescription);
1235
1237
  }
1236
1238
  }
1237
1239
  return new FFIConverter();
@@ -1603,7 +1605,9 @@ const FfiConverterTypeRefundDepositResponse = (() => {
1603
1605
  * Generated factory for {@link RegisterLightningAddressRequest} record objects.
1604
1606
  */
1605
1607
  export const RegisterLightningAddressRequest = (() => {
1606
- const defaults = () => ({});
1608
+ const defaults = () => ({
1609
+ description: undefined
1610
+ });
1607
1611
  const create = (() => {
1608
1612
  return uniffiCreateRecord(defaults);
1609
1613
  })();
@@ -1629,15 +1633,15 @@ const FfiConverterTypeRegisterLightningAddressRequest = (() => {
1629
1633
  read(from) {
1630
1634
  return {
1631
1635
  username: FfiConverterString.read(from),
1632
- description: FfiConverterString.read(from)
1636
+ description: FfiConverterOptionalString.read(from)
1633
1637
  };
1634
1638
  }
1635
1639
  write(value, into) {
1636
1640
  FfiConverterString.write(value.username, into);
1637
- FfiConverterString.write(value.description, into);
1641
+ FfiConverterOptionalString.write(value.description, into);
1638
1642
  }
1639
1643
  allocationSize(value) {
1640
- return FfiConverterString.allocationSize(value.username) + FfiConverterString.allocationSize(value.description);
1644
+ return FfiConverterString.allocationSize(value.username) + FfiConverterOptionalString.allocationSize(value.description);
1641
1645
  }
1642
1646
  }
1643
1647
  return new FFIConverter();
@@ -4500,6 +4504,19 @@ export class BitcoinChainServiceImpl extends UniffiAbstractObject {
4500
4504
  throw __error;
4501
4505
  }
4502
4506
  }
4507
+ async getTransactionStatus(txid, asyncOpts_) /*throws*/{
4508
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
4509
+ try {
4510
+ return await uniffiRustCallAsync(/*rustCaller:*/uniffiCaller, /*rustFutureFunc:*/() => {
4511
+ return nativeModule().ubrn_uniffi_breez_sdk_spark_fn_method_bitcoinchainservice_get_transaction_status(uniffiTypeBitcoinChainServiceImplObjectFactory.clonePointer(this), FfiConverterString.lower(txid));
4512
+ }, /*pollFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_poll_rust_buffer, /*cancelFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_cancel_rust_buffer, /*completeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_complete_rust_buffer, /*freeFunc:*/nativeModule().ubrn_ffi_breez_sdk_spark_rust_future_free_rust_buffer, /*liftFunc:*/FfiConverterTypeTxStatus.lift.bind(FfiConverterTypeTxStatus), /*liftString:*/FfiConverterString.lift, /*asyncOpts:*/asyncOpts_, /*errorHandler:*/FfiConverterTypeChainServiceError.lift.bind(FfiConverterTypeChainServiceError));
4513
+ } catch (__error) {
4514
+ if (uniffiIsDebug && __error instanceof Error) {
4515
+ __error.stack = __stack;
4516
+ }
4517
+ throw __error;
4518
+ }
4519
+ }
4503
4520
  async getTransactionHex(txid, asyncOpts_) /*throws*/{
4504
4521
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
4505
4522
  try {
@@ -4610,6 +4627,32 @@ const uniffiCallbackInterfaceBitcoinChainService = {
4610
4627
  const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/ChainServiceError.instanceOf, /*lowerError:*/FfiConverterTypeChainServiceError.lower.bind(FfiConverterTypeChainServiceError), /*lowerString:*/FfiConverterString.lower);
4611
4628
  return UniffiResult.success(uniffiForeignFuture);
4612
4629
  },
4630
+ getTransactionStatus: (uniffiHandle, txid, uniffiFutureCallback, uniffiCallbackData) => {
4631
+ const uniffiMakeCall = async signal => {
4632
+ const jsCallback = FfiConverterTypeBitcoinChainService.lift(uniffiHandle);
4633
+ return await jsCallback.getTransactionStatus(FfiConverterString.lift(txid), {
4634
+ signal
4635
+ });
4636
+ };
4637
+ const uniffiHandleSuccess = returnValue => {
4638
+ uniffiFutureCallback(uniffiCallbackData, /* UniffiForeignFutureStructRustBuffer */{
4639
+ returnValue: FfiConverterTypeTxStatus.lower(returnValue),
4640
+ callStatus: uniffiCaller.createCallStatus()
4641
+ });
4642
+ };
4643
+ const uniffiHandleError = (code, errorBuf) => {
4644
+ uniffiFutureCallback(uniffiCallbackData, /* UniffiForeignFutureStructRustBuffer */{
4645
+ returnValue: /*empty*/new Uint8Array(0),
4646
+ // TODO create callstatus with error.
4647
+ callStatus: {
4648
+ code,
4649
+ errorBuf
4650
+ }
4651
+ });
4652
+ };
4653
+ const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(/*makeCall:*/uniffiMakeCall, /*handleSuccess:*/uniffiHandleSuccess, /*handleError:*/uniffiHandleError, /*isErrorType:*/ChainServiceError.instanceOf, /*lowerError:*/FfiConverterTypeChainServiceError.lower.bind(FfiConverterTypeChainServiceError), /*lowerString:*/FfiConverterString.lower);
4654
+ return UniffiResult.success(uniffiForeignFuture);
4655
+ },
4613
4656
  getTransactionHex: (uniffiHandle, txid, uniffiFutureCallback, uniffiCallbackData) => {
4614
4657
  const uniffiMakeCall = async signal => {
4615
4658
  const jsCallback = FfiConverterTypeBitcoinChainService.lift(uniffiHandle);
@@ -5950,10 +5993,13 @@ function uniffiEnsureInitialized() {
5950
5993
  if (nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_address_utxos() !== 20959) {
5951
5994
  throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_address_utxos');
5952
5995
  }
5953
- if (nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_hex() !== 19571) {
5996
+ if (nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_status() !== 23018) {
5997
+ throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_status');
5998
+ }
5999
+ if (nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_hex() !== 59376) {
5954
6000
  throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_get_transaction_hex');
5955
6001
  }
5956
- if (nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction() !== 61083) {
6002
+ if (nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction() !== 65179) {
5957
6003
  throw new UniffiInternalError.ApiChecksumMismatch('uniffi_breez_sdk_spark_checksum_method_bitcoinchainservice_broadcast_transaction');
5958
6004
  }
5959
6005
  if (nativeModule().ubrn_uniffi_breez_sdk_spark_checksum_method_breezsdk_add_event_listener() !== 61844) {