@breeztech/breez-sdk-spark-react-native 0.21.1 → 0.22.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breeztech/breez-sdk-spark-react-native",
3
- "version": "0.21.1",
3
+ "version": "0.22.2",
4
4
  "description": "React Native bindings for the Breez SDK - Nodeless (Spark Implementation)",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",
@@ -211,7 +211,7 @@
211
211
  "version": "0.49.0"
212
212
  },
213
213
  "checksums": {
214
- "android": "79713a56bab0aa1f9071709780051816438b5d55cca0574b4748f79e9056655d",
215
- "ios": "2f84c07585c8be34dcbe324e594bf4d9351cbca3e6c8e666f9b6cfa711646240"
214
+ "android": "17caec5462d400fcd1e6fb22b303a67fd5e6a1e43cafab53c1d045abb26eab0d",
215
+ "ios": "f8f61a9d730fe499c850e94c6f22189f5ec5fbc09679817905603579b62ce5b1"
216
216
  }
217
217
  }
@@ -12613,8 +12613,8 @@ export type RefundPendingConversionsResponse = {
12613
12613
  */
12614
12614
  refunded: /*u32*/ number;
12615
12615
  /**
12616
- * Conversions intentionally deferred (eligible but held back by a
12617
- * safety window). The next pass will retry them.
12616
+ * Conversions not clawed back this pass: held back by a safety window, or
12617
+ * found to have executed after all. Only the former are retried.
12618
12618
  */
12619
12619
  skipped: /*u32*/ number;
12620
12620
  /**
@@ -19534,6 +19534,7 @@ export const ConversionInfo = (() => {
19534
19534
  fee: U128 | undefined;
19535
19535
  purpose: ConversionPurpose | undefined;
19536
19536
  amountAdjustment: AmountAdjustmentReason | undefined;
19537
+ degradation: SwapDegradation | undefined;
19537
19538
  }>;
19538
19539
  };
19539
19540
 
@@ -19554,6 +19555,7 @@ export const ConversionInfo = (() => {
19554
19555
  fee: U128 | undefined;
19555
19556
  purpose: ConversionPurpose | undefined;
19556
19557
  amountAdjustment: AmountAdjustmentReason | undefined;
19558
+ degradation: SwapDegradation | undefined;
19557
19559
  }>;
19558
19560
  constructor(inner: {
19559
19561
  /**
@@ -19575,6 +19577,10 @@ export const ConversionInfo = (() => {
19575
19577
  /**
19576
19578
  * The reason the conversion amount was adjusted, if applicable.
19577
19579
  */ amountAdjustment: AmountAdjustmentReason | undefined;
19580
+ /**
19581
+ * How the swap departed from the signed terms, if it did. Set on a
19582
+ * conversion that completed without delivering what was signed for.
19583
+ */ degradation: SwapDegradation | undefined;
19578
19584
  }) {
19579
19585
  super('ConversionInfo', 'Amm');
19580
19586
  this.inner = Object.freeze(inner);
@@ -19600,6 +19606,10 @@ export const ConversionInfo = (() => {
19600
19606
  /**
19601
19607
  * The reason the conversion amount was adjusted, if applicable.
19602
19608
  */ amountAdjustment: AmountAdjustmentReason | undefined;
19609
+ /**
19610
+ * How the swap departed from the signed terms, if it did. Set on a
19611
+ * conversion that completed without delivering what was signed for.
19612
+ */ degradation: SwapDegradation | undefined;
19603
19613
  }): Amm_ {
19604
19614
  return new Amm_(inner);
19605
19615
  }
@@ -20019,6 +20029,7 @@ const FfiConverterTypeConversionInfo = (() => {
20019
20029
  purpose: FfiConverterOptionalTypeConversionPurpose.read(from),
20020
20030
  amountAdjustment:
20021
20031
  FfiConverterOptionalTypeAmountAdjustmentReason.read(from),
20032
+ degradation: FfiConverterOptionalTypeSwapDegradation.read(from),
20022
20033
  });
20023
20034
  case 2:
20024
20035
  return new ConversionInfo.Orchestra({
@@ -20079,6 +20090,10 @@ const FfiConverterTypeConversionInfo = (() => {
20079
20090
  inner.amountAdjustment,
20080
20091
  into
20081
20092
  );
20093
+ FfiConverterOptionalTypeSwapDegradation.write(
20094
+ inner.degradation,
20095
+ into
20096
+ );
20082
20097
  return;
20083
20098
  }
20084
20099
  case ConversionInfo_Tags.Orchestra: {
@@ -20146,6 +20161,9 @@ const FfiConverterTypeConversionInfo = (() => {
20146
20161
  size += FfiConverterOptionalTypeAmountAdjustmentReason.allocationSize(
20147
20162
  inner.amountAdjustment
20148
20163
  );
20164
+ size += FfiConverterOptionalTypeSwapDegradation.allocationSize(
20165
+ inner.degradation
20166
+ );
20149
20167
  return size;
20150
20168
  }
20151
20169
  case ConversionInfo_Tags.Orchestra: {
@@ -33143,6 +33161,61 @@ const FfiConverterTypeSuccessActionProcessed = (() => {
33143
33161
  return new FFIConverter();
33144
33162
  })();
33145
33163
 
33164
+ /**
33165
+ * How an executed swap departed from the terms the client signed.
33166
+ *
33167
+ * The input is spent either way, so the conversion completes rather than being
33168
+ * refunded. This records that it did not deliver what was signed for.
33169
+ */
33170
+ export enum SwapDegradation {
33171
+ /**
33172
+ * Delivered less than the minimum the intent signed.
33173
+ */
33174
+ BelowMinimum,
33175
+ /**
33176
+ * Delivered an asset other than the one the intent named.
33177
+ */
33178
+ UnexpectedAsset,
33179
+ /**
33180
+ * Accepted without naming the amount, the asset, or the transfer carrying
33181
+ * it.
33182
+ */
33183
+ MissingInfo,
33184
+ }
33185
+
33186
+ const FfiConverterTypeSwapDegradation = (() => {
33187
+ const ordinalConverter = FfiConverterInt32;
33188
+ type TypeName = SwapDegradation;
33189
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
33190
+ read(from: RustBuffer): TypeName {
33191
+ switch (ordinalConverter.read(from)) {
33192
+ case 1:
33193
+ return SwapDegradation.BelowMinimum;
33194
+ case 2:
33195
+ return SwapDegradation.UnexpectedAsset;
33196
+ case 3:
33197
+ return SwapDegradation.MissingInfo;
33198
+ default:
33199
+ throw new UniffiInternalError.UnexpectedEnumCase();
33200
+ }
33201
+ }
33202
+ write(value: TypeName, into: RustBuffer): void {
33203
+ switch (value) {
33204
+ case SwapDegradation.BelowMinimum:
33205
+ return ordinalConverter.write(1, into);
33206
+ case SwapDegradation.UnexpectedAsset:
33207
+ return ordinalConverter.write(2, into);
33208
+ case SwapDegradation.MissingInfo:
33209
+ return ordinalConverter.write(3, into);
33210
+ }
33211
+ }
33212
+ allocationSize(value: TypeName): number {
33213
+ return ordinalConverter.allocationSize(0);
33214
+ }
33215
+ }
33216
+ return new FFIConverter();
33217
+ })();
33218
+
33146
33219
  export enum TokenTransactionType {
33147
33220
  Transfer,
33148
33221
  Mint,
@@ -49925,6 +49998,11 @@ const FfiConverterOptionalTypeSuccessActionProcessed = new FfiConverterOptional(
49925
49998
  FfiConverterTypeSuccessActionProcessed
49926
49999
  );
49927
50000
 
50001
+ // FfiConverter for SwapDegradation | undefined
50002
+ const FfiConverterOptionalTypeSwapDegradation = new FfiConverterOptional(
50003
+ FfiConverterTypeSwapDegradation
50004
+ );
50005
+
49928
50006
  // FfiConverter for TokenTransactionType | undefined
49929
50007
  const FfiConverterOptionalTypeTokenTransactionType = new FfiConverterOptional(
49930
50008
  FfiConverterTypeTokenTransactionType
@@ -51820,6 +51898,7 @@ export default Object.freeze({
51820
51898
  FfiConverterTypeStoredCrossChainSwap,
51821
51899
  FfiConverterTypeSuccessAction,
51822
51900
  FfiConverterTypeSuccessActionProcessed,
51901
+ FfiConverterTypeSwapDegradation,
51823
51902
  FfiConverterTypeSymbol,
51824
51903
  FfiConverterTypeSyncWalletRequest,
51825
51904
  FfiConverterTypeSyncWalletResponse,