@xchainjs/xchain-mayachain-amm 4.1.2 → 4.1.4

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/lib/index.esm.js CHANGED
@@ -281,7 +281,7 @@ class MayachainAMM {
281
281
  * @returns {QuoteSwap} Quote swap result. If swap cannot be done, it returns an empty QuoteSwap with reasons.
282
282
  */
283
283
  estimateSwap(_a) {
284
- return __awaiter(this, arguments, void 0, function* ({ fromAsset, fromAddress, amount, destinationAsset, destinationAddress, affiliateAddress, affiliateBps, toleranceBps, streamingInterval, streamingQuantity, }) {
284
+ return __awaiter(this, arguments, void 0, function* ({ fromAsset, fromAddress, amount, destinationAsset, destinationAddress, affiliateAddress, affiliateBps, toleranceBps, liquidityToleranceBps, streamingInterval, streamingQuantity, }) {
285
285
  const errors = yield this.validateSwap({
286
286
  fromAsset,
287
287
  fromAddress,
@@ -327,6 +327,7 @@ class MayachainAMM {
327
327
  affiliateAddress,
328
328
  affiliateBps,
329
329
  toleranceBps,
330
+ liquidityToleranceBps,
330
331
  streamingInterval,
331
332
  streamingQuantity,
332
333
  });
@@ -393,7 +394,7 @@ class MayachainAMM {
393
394
  * @returns {TxSubmitted} Transaction hash and URL of the swap
394
395
  */
395
396
  doSwap(_a) {
396
- return __awaiter(this, arguments, void 0, function* ({ fromAsset, fromAddress, amount, destinationAsset, destinationAddress, affiliateAddress, affiliateBps, toleranceBps, streamingInterval, streamingQuantity, }) {
397
+ return __awaiter(this, arguments, void 0, function* ({ fromAsset, fromAddress, amount, destinationAsset, destinationAddress, affiliateAddress, affiliateBps, toleranceBps, liquidityToleranceBps, streamingInterval, streamingQuantity, }) {
397
398
  const quoteSwap = yield this.estimateSwap({
398
399
  fromAsset,
399
400
  fromAddress,
@@ -403,6 +404,7 @@ class MayachainAMM {
403
404
  affiliateAddress,
404
405
  affiliateBps,
405
406
  toleranceBps,
407
+ liquidityToleranceBps,
406
408
  streamingInterval,
407
409
  streamingQuantity,
408
410
  });
package/lib/index.js CHANGED
@@ -283,7 +283,7 @@ class MayachainAMM {
283
283
  * @returns {QuoteSwap} Quote swap result. If swap cannot be done, it returns an empty QuoteSwap with reasons.
284
284
  */
285
285
  estimateSwap(_a) {
286
- return __awaiter(this, arguments, void 0, function* ({ fromAsset, fromAddress, amount, destinationAsset, destinationAddress, affiliateAddress, affiliateBps, toleranceBps, streamingInterval, streamingQuantity, }) {
286
+ return __awaiter(this, arguments, void 0, function* ({ fromAsset, fromAddress, amount, destinationAsset, destinationAddress, affiliateAddress, affiliateBps, toleranceBps, liquidityToleranceBps, streamingInterval, streamingQuantity, }) {
287
287
  const errors = yield this.validateSwap({
288
288
  fromAsset,
289
289
  fromAddress,
@@ -329,6 +329,7 @@ class MayachainAMM {
329
329
  affiliateAddress,
330
330
  affiliateBps,
331
331
  toleranceBps,
332
+ liquidityToleranceBps,
332
333
  streamingInterval,
333
334
  streamingQuantity,
334
335
  });
@@ -395,7 +396,7 @@ class MayachainAMM {
395
396
  * @returns {TxSubmitted} Transaction hash and URL of the swap
396
397
  */
397
398
  doSwap(_a) {
398
- return __awaiter(this, arguments, void 0, function* ({ fromAsset, fromAddress, amount, destinationAsset, destinationAddress, affiliateAddress, affiliateBps, toleranceBps, streamingInterval, streamingQuantity, }) {
399
+ return __awaiter(this, arguments, void 0, function* ({ fromAsset, fromAddress, amount, destinationAsset, destinationAddress, affiliateAddress, affiliateBps, toleranceBps, liquidityToleranceBps, streamingInterval, streamingQuantity, }) {
399
400
  const quoteSwap = yield this.estimateSwap({
400
401
  fromAsset,
401
402
  fromAddress,
@@ -405,6 +406,7 @@ class MayachainAMM {
405
406
  affiliateAddress,
406
407
  affiliateBps,
407
408
  toleranceBps,
409
+ liquidityToleranceBps,
408
410
  streamingInterval,
409
411
  streamingQuantity,
410
412
  });
@@ -25,7 +25,7 @@ export declare class MayachainAMM {
25
25
  * @param {QuoteSwapParams} quoteSwapParams Swap parameters.
26
26
  * @returns {QuoteSwap} Quote swap result. If swap cannot be done, it returns an empty QuoteSwap with reasons.
27
27
  */
28
- estimateSwap({ fromAsset, fromAddress, amount, destinationAsset, destinationAddress, affiliateAddress, affiliateBps, toleranceBps, streamingInterval, streamingQuantity, }: QuoteSwapParams): Promise<QuoteSwap>;
28
+ estimateSwap({ fromAsset, fromAddress, amount, destinationAsset, destinationAddress, affiliateAddress, affiliateBps, toleranceBps, liquidityToleranceBps, streamingInterval, streamingQuantity, }: QuoteSwapParams): Promise<QuoteSwap>;
29
29
  /**
30
30
  * Validate swap parameters before performing a swap operation.
31
31
  *
@@ -38,7 +38,7 @@ export declare class MayachainAMM {
38
38
  * @param {QuoteSwapParams} quoteSwapParams Swap parameters
39
39
  * @returns {TxSubmitted} Transaction hash and URL of the swap
40
40
  */
41
- doSwap({ fromAsset, fromAddress, amount, destinationAsset, destinationAddress, affiliateAddress, affiliateBps, toleranceBps, streamingInterval, streamingQuantity, }: QuoteSwapParams): Promise<TxSubmitted>;
41
+ doSwap({ fromAsset, fromAddress, amount, destinationAsset, destinationAddress, affiliateAddress, affiliateBps, toleranceBps, liquidityToleranceBps, streamingInterval, streamingQuantity, }: QuoteSwapParams): Promise<TxSubmitted>;
42
42
  /**
43
43
  * Approve the Mayachain router to spend a certain amount in the asset chain.
44
44
  * @param {ApproveParams} approveParams Parameters for approving the router to spend
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xchainjs/xchain-mayachain-amm",
3
- "version": "4.1.2",
3
+ "version": "4.1.4",
4
4
  "description": "module that exposes estimating & swapping cryptocurrency assets on mayachain",
5
5
  "keywords": [
6
6
  "MAYAChain",
@@ -44,12 +44,12 @@
44
44
  "@xchainjs/xchain-ethereum": "2.0.13",
45
45
  "@xchainjs/xchain-evm": "2.0.12",
46
46
  "@xchainjs/xchain-kujira": "2.0.9",
47
- "@xchainjs/xchain-mayachain": "4.0.1",
48
- "@xchainjs/xchain-mayachain-query": "2.1.2",
47
+ "@xchainjs/xchain-mayachain": "4.1.0",
48
+ "@xchainjs/xchain-mayachain-query": "2.1.3",
49
49
  "@xchainjs/xchain-radix": "2.0.9",
50
50
  "@xchainjs/xchain-thorchain": "3.0.13",
51
51
  "@xchainjs/xchain-util": "2.0.5",
52
- "@xchainjs/xchain-wallet": "2.0.17",
52
+ "@xchainjs/xchain-wallet": "2.0.18",
53
53
  "@xchainjs/xchain-zcash": "1.0.10",
54
54
  "ethers": "^6.14.3"
55
55
  },