@atomiqlabs/sdk 8.6.5 → 8.6.7

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.
@@ -243,6 +243,7 @@ export type SpvFromBTCPrepare = SwapInit & {
243
243
  exactOut: boolean;
244
244
  callerFeeRate: Promise<bigint>;
245
245
  frontingFeeRate: bigint;
246
+ stickyAddress?: boolean;
246
247
  };
247
248
  declare const SpvFromBTCInitResponseSchema: {
248
249
  readonly txId: FieldTypeEnum.String;
@@ -543,7 +543,8 @@ class IntermediaryAPI {
543
543
  gasAmount: init.gasAmount.toString(10),
544
544
  gasToken: init.gasToken,
545
545
  frontingFeeRate: init.frontingFeeRate.toString(10),
546
- callerFeeRate: init.callerFeeRate.then(val => val.toString(10))
546
+ callerFeeRate: init.callerFeeRate.then(val => val.toString(10)),
547
+ stickyAddress: init.stickyAddress
547
548
  }, {
548
549
  code: SchemaVerifier_1.FieldTypeEnum.Number,
549
550
  msg: SchemaVerifier_1.FieldTypeEnum.String,
@@ -46,6 +46,13 @@ export type SpvFromBTCOptions = {
46
46
  * the settlement gas fee cost)
47
47
  */
48
48
  feeSafetyFactor?: number;
49
+ /**
50
+ * Instruct the LP to create a "sticky address" for your destination wallet address. After the first successful
51
+ * swap with that LP, the used bitcoin address will be permanently linked to your destination wallet address. So
52
+ * all subsequent swaps to the same address will yield the same LP deposit bitcoin address. Useful for corporate
53
+ * whitelist-only wallets
54
+ */
55
+ stickyAddress?: boolean;
49
56
  /**
50
57
  * @deprecated Use `maxAllowedBitcoinFeeRate` instead!
51
58
  */
@@ -460,6 +460,7 @@ class SpvFromBTCWrapper extends ISwapWrapper_1.ISwapWrapper {
460
460
  gasAmount: _options.gasAmount,
461
461
  callerFeeRate: (0, Utils_1.throwIfUndefined)(callerFeePrefetchPromise, "Caller fee prefetch failed!"),
462
462
  frontingFeeRate: 0n,
463
+ stickyAddress: options?.stickyAddress,
463
464
  additionalParams
464
465
  }, this._options.postRequestTimeout, abortController.signal, retryCount > 0 ? false : undefined);
465
466
  }, undefined, e => e instanceof RequestError_1.RequestError, abortController.signal);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomiqlabs/sdk",
3
- "version": "8.6.5",
3
+ "version": "8.6.7",
4
4
  "description": "atomiq labs SDK for cross-chain swaps between smart chains and bitcoin",
5
5
  "main": "./dist/index.js",
6
6
  "types:": "./dist/index.d.ts",
@@ -309,7 +309,8 @@ export type SpvFromBTCPrepare = SwapInit & {
309
309
  gasToken: string,
310
310
  exactOut: boolean,
311
311
  callerFeeRate: Promise<bigint>,
312
- frontingFeeRate: bigint
312
+ frontingFeeRate: bigint,
313
+ stickyAddress?: boolean
313
314
  }
314
315
 
315
316
  const SpvFromBTCInitResponseSchema = {
@@ -877,7 +878,8 @@ export class IntermediaryAPI {
877
878
  gasAmount: init.gasAmount.toString(10),
878
879
  gasToken: init.gasToken,
879
880
  frontingFeeRate: init.frontingFeeRate.toString(10),
880
- callerFeeRate: init.callerFeeRate.then(val => val.toString(10))
881
+ callerFeeRate: init.callerFeeRate.then(val => val.toString(10)),
882
+ stickyAddress: init.stickyAddress
881
883
  }, {
882
884
  code: FieldTypeEnum.Number,
883
885
  msg: FieldTypeEnum.String,
@@ -68,6 +68,13 @@ export type SpvFromBTCOptions = {
68
68
  * the settlement gas fee cost)
69
69
  */
70
70
  feeSafetyFactor?: number,
71
+ /**
72
+ * Instruct the LP to create a "sticky address" for your destination wallet address. After the first successful
73
+ * swap with that LP, the used bitcoin address will be permanently linked to your destination wallet address. So
74
+ * all subsequent swaps to the same address will yield the same LP deposit bitcoin address. Useful for corporate
75
+ * whitelist-only wallets
76
+ */
77
+ stickyAddress?: boolean,
71
78
 
72
79
  /**
73
80
  * @deprecated Use `maxAllowedBitcoinFeeRate` instead!
@@ -633,6 +640,7 @@ export class SpvFromBTCWrapper<
633
640
  gasAmount: _options.gasAmount,
634
641
  callerFeeRate: throwIfUndefined(callerFeePrefetchPromise, "Caller fee prefetch failed!"),
635
642
  frontingFeeRate: 0n,
643
+ stickyAddress: options?.stickyAddress,
636
644
  additionalParams
637
645
  },
638
646
  this._options.postRequestTimeout, abortController.signal, retryCount>0 ? false : undefined