@cetusprotocol/aggregator-sdk 0.3.17 → 0.3.19

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.
Files changed (53) hide show
  1. package/dist/index.d.mts +34 -11
  2. package/dist/index.d.ts +34 -11
  3. package/dist/index.js +209 -88
  4. package/dist/index.mjs +203 -88
  5. package/dist/src/api.d.ts +2 -0
  6. package/dist/src/client.d.ts +26 -9
  7. package/dist/src/transaction/afsui.d.ts +1 -1
  8. package/dist/src/transaction/aftermath.d.ts +1 -1
  9. package/dist/src/transaction/alphafi.d.ts +7 -0
  10. package/dist/src/transaction/bluefin.d.ts +1 -1
  11. package/dist/src/transaction/bluemove.d.ts +1 -1
  12. package/dist/src/transaction/cetus.d.ts +3 -3
  13. package/dist/src/transaction/deepbook_v2.d.ts +1 -1
  14. package/dist/src/transaction/deepbook_v3.d.ts +1 -1
  15. package/dist/src/transaction/flowx_v2.d.ts +1 -1
  16. package/dist/src/transaction/flowx_v3.d.ts +1 -1
  17. package/dist/src/transaction/haedal.d.ts +1 -1
  18. package/dist/src/transaction/haedal_pmm.d.ts +1 -1
  19. package/dist/src/transaction/index.d.ts +5 -1
  20. package/dist/src/transaction/kriya_v2.d.ts +1 -1
  21. package/dist/src/transaction/kriya_v3.d.ts +1 -1
  22. package/dist/src/transaction/scallop.d.ts +1 -1
  23. package/dist/src/transaction/suilend.d.ts +1 -2
  24. package/dist/src/transaction/turbos.d.ts +1 -1
  25. package/dist/src/transaction/volo.d.ts +1 -1
  26. package/example/package.json +17 -0
  27. package/example/swap.ts +21 -0
  28. package/example/tsconfig.json +12 -0
  29. package/package.json +1 -1
  30. package/src/api.ts +7 -3
  31. package/src/client.ts +132 -42
  32. package/src/transaction/afsui.ts +6 -3
  33. package/src/transaction/aftermath.ts +6 -3
  34. package/src/transaction/alphafi.ts +50 -0
  35. package/src/transaction/bluefin.ts +6 -3
  36. package/src/transaction/bluemove.ts +5 -4
  37. package/src/transaction/cetus.ts +13 -7
  38. package/src/transaction/deepbook_v2.ts +5 -4
  39. package/src/transaction/deepbook_v3.ts +5 -3
  40. package/src/transaction/flowx_v2.ts +5 -4
  41. package/src/transaction/flowx_v3.ts +5 -3
  42. package/src/transaction/haedal.ts +5 -3
  43. package/src/transaction/haedal_pmm.ts +5 -3
  44. package/src/transaction/index.ts +20 -1
  45. package/src/transaction/kriya_v2.ts +5 -4
  46. package/src/transaction/kriya_v3.ts +5 -4
  47. package/src/transaction/scallop.ts +5 -4
  48. package/src/transaction/suilend.ts +6 -10
  49. package/src/transaction/swap.ts +1 -0
  50. package/src/transaction/turbos.ts +5 -4
  51. package/src/transaction/volo.ts +5 -3
  52. package/src/utils/coin.ts +15 -7
  53. package/tests/router.test.ts +12 -19
package/dist/index.mjs CHANGED
@@ -4999,7 +4999,7 @@ var Aftermath = class {
4999
4999
  amountLimit(exportAmountOut) {
5000
5000
  return new import_bn.default(exportAmountOut).mul(new import_bn.default(this.slippage)).div(new import_bn.default("1000000000000000000")).toString();
5001
5001
  }
5002
- swap(client, txb, path, inputCoin) {
5002
+ swap(client, txb, path, inputCoin, packages) {
5003
5003
  return __async(this, null, function* () {
5004
5004
  const { direction, from, target } = path;
5005
5005
  const [func, coinAType, coinBType] = direction ? ["swap_a2b", from, target] : ["swap_b2a", target, from];
@@ -5021,8 +5021,9 @@ var Aftermath = class {
5021
5021
  txb.pure.u64(this.slippage),
5022
5022
  inputCoin
5023
5023
  ];
5024
+ const publishedAt = getAggregatorV2PublishedAt(client.publishedAtV2(), packages);
5024
5025
  const res = txb.moveCall({
5025
- target: `${client.publishedAt()}::aftermath::${func}`,
5026
+ target: `${publishedAt}::aftermath::${func}`,
5026
5027
  typeArguments: [
5027
5028
  coinAType,
5028
5029
  coinBType,
@@ -5093,7 +5094,7 @@ var DeepbookV2 = class {
5093
5094
  };
5094
5095
  });
5095
5096
  }
5096
- swap(client, txb, path, inputCoin) {
5097
+ swap(client, txb, path, inputCoin, packages) {
5097
5098
  return __async(this, null, function* () {
5098
5099
  const { direction, from, target } = path;
5099
5100
  const [func, coinAType, coinBType] = direction ? ["swap_a2b", from, target] : ["swap_b2a", target, from];
@@ -5108,8 +5109,9 @@ var DeepbookV2 = class {
5108
5109
  accountCapRes.accountCap,
5109
5110
  txb.object(CLOCK_ADDRESS)
5110
5111
  ];
5112
+ const publishedAt = getAggregatorV2PublishedAt(client.publishedAtV2(), packages);
5111
5113
  const res = txb.moveCall({
5112
- target: `${client.publishedAt()}::deepbook::${func}`,
5114
+ target: `${publishedAt}::deepbook::${func}`,
5113
5115
  typeArguments: [coinAType, coinBType],
5114
5116
  arguments: args
5115
5117
  });
@@ -5128,13 +5130,14 @@ var KriyaV2 = class {
5128
5130
  throw new Error("Kriya amm only supported on mainnet");
5129
5131
  }
5130
5132
  }
5131
- swap(client, txb, path, inputCoin) {
5133
+ swap(client, txb, path, inputCoin, packages) {
5132
5134
  return __async(this, null, function* () {
5133
5135
  const { direction, from, target } = path;
5134
5136
  const [func, coinAType, coinBType] = direction ? ["swap_a2b", from, target] : ["swap_b2a", target, from];
5135
5137
  const args = [txb.object(path.id), inputCoin];
5138
+ const publishedAt = getAggregatorV2PublishedAt(client.publishedAtV2(), packages);
5136
5139
  const res = txb.moveCall({
5137
- target: `${client.publishedAt()}::kriya_amm::${func}`,
5140
+ target: `${publishedAt}::kriya_amm::${func}`,
5138
5141
  typeArguments: [coinAType, coinBType],
5139
5142
  arguments: args
5140
5143
  });
@@ -5151,7 +5154,7 @@ var KriyaV3 = class {
5151
5154
  }
5152
5155
  this.version = "0xf5145a7ac345ca8736cf8c76047d00d6d378f30e81be6f6eb557184d9de93c78";
5153
5156
  }
5154
- swap(client, txb, path, inputCoin) {
5157
+ swap(client, txb, path, inputCoin, packages) {
5155
5158
  return __async(this, null, function* () {
5156
5159
  const { direction, from, target } = path;
5157
5160
  const [func, coinAType, coinBType] = direction ? ["swap_a2b", from, target] : ["swap_b2a", target, from];
@@ -5161,8 +5164,9 @@ var KriyaV3 = class {
5161
5164
  txb.object(this.version),
5162
5165
  txb.object(CLOCK_ADDRESS)
5163
5166
  ];
5167
+ const publishedAt = getAggregatorV2PublishedAt(client.publishedAtV2(), packages);
5164
5168
  const res = txb.moveCall({
5165
- target: `${client.publishedAt()}::kriya_clmm::${func}`,
5169
+ target: `${publishedAt}::kriya_clmm::${func}`,
5166
5170
  typeArguments: [coinAType, coinBType],
5167
5171
  arguments: args
5168
5172
  });
@@ -5179,13 +5183,14 @@ var FlowxV2 = class {
5179
5183
  }
5180
5184
  this.container = "0xb65dcbf63fd3ad5d0ebfbf334780dc9f785eff38a4459e37ab08fa79576ee511";
5181
5185
  }
5182
- swap(client, txb, path, inputCoin) {
5186
+ swap(client, txb, path, inputCoin, packages) {
5183
5187
  return __async(this, null, function* () {
5184
5188
  const { direction, from, target } = path;
5185
5189
  const [func, coinAType, coinBType] = direction ? ["swap_a2b", from, target] : ["swap_b2a", target, from];
5186
5190
  const args = [txb.object(this.container), inputCoin];
5191
+ const publishedAt = getAggregatorV2PublishedAt(client.publishedAtV2(), packages);
5187
5192
  const res = txb.moveCall({
5188
- target: `${client.publishedAt()}::flowx_amm::${func}`,
5193
+ target: `${publishedAt}::flowx_amm::${func}`,
5189
5194
  typeArguments: [coinAType, coinBType],
5190
5195
  arguments: args
5191
5196
  });
@@ -5203,7 +5208,7 @@ var FlowxV3 = class {
5203
5208
  this.versioned = "0x67624a1533b5aff5d0dfcf5e598684350efd38134d2d245f475524c03a64e656";
5204
5209
  this.poolRegistry = "0x27565d24a4cd51127ac90e4074a841bbe356cca7bf5759ddc14a975be1632abc";
5205
5210
  }
5206
- swap(client, txb, path, inputCoin) {
5211
+ swap(client, txb, path, inputCoin, packages) {
5207
5212
  return __async(this, null, function* () {
5208
5213
  const { direction, from, target } = path;
5209
5214
  const [func, coinAType, coinBType] = direction ? ["swap_a2b", from, target] : ["swap_b2a", target, from];
@@ -5214,8 +5219,9 @@ var FlowxV3 = class {
5214
5219
  txb.object(this.versioned),
5215
5220
  txb.object(CLOCK_ADDRESS)
5216
5221
  ];
5222
+ const publishedAt = getAggregatorV2PublishedAt(client.publishedAtV2(), packages);
5217
5223
  const res = txb.moveCall({
5218
- target: `${client.publishedAt()}::flowx_clmm::${func}`,
5224
+ target: `${publishedAt}::flowx_clmm::${func}`,
5219
5225
  typeArguments: [coinAType, coinBType],
5220
5226
  arguments: args
5221
5227
  });
@@ -5232,7 +5238,7 @@ var Turbos = class {
5232
5238
  }
5233
5239
  this.versioned = "0xf1cf0e81048df168ebeb1b8030fad24b3e0b53ae827c25053fff0779c1445b6f";
5234
5240
  }
5235
- swap(client, txb, path, inputCoin) {
5241
+ swap(client, txb, path, inputCoin, packages) {
5236
5242
  return __async(this, null, function* () {
5237
5243
  const { direction, from, target } = path;
5238
5244
  const [func, coinAType, coinBType] = direction ? ["swap_a2b", from, target] : ["swap_b2a", target, from];
@@ -5249,8 +5255,9 @@ var Turbos = class {
5249
5255
  txb.object(CLOCK_ADDRESS),
5250
5256
  txb.object(this.versioned)
5251
5257
  ];
5258
+ const publishedAt = getAggregatorV2PublishedAt(client.publishedAtV2(), packages);
5252
5259
  const res = txb.moveCall({
5253
- target: `${client.publishedAt()}::turbos::${func}`,
5260
+ target: `${publishedAt}::turbos::${func}`,
5254
5261
  typeArguments: [coinAType, coinBType, path.extendedDetails.turbosFeeType],
5255
5262
  arguments: args
5256
5263
  });
@@ -5265,7 +5272,7 @@ var Cetus = class {
5265
5272
  this.globalConfig = env === 0 /* Mainnet */ ? "0xdaa46292632c3c4d8f31f23ea0f9b36a28ff3677e9684980e4438403a67a3d8f" : "0x9774e359588ead122af1c7e7f64e14ade261cfeecdb5d0eb4a5b3b4c8ab8bd3e";
5266
5273
  this.partner = partner != null ? partner : env === 0 /* Mainnet */ ? "0x639b5e433da31739e800cd085f356e64cae222966d0f1b11bd9dc76b322ff58b" : "0x1f5fa5c820f40d43fc47815ad06d95e40a1942ff72a732a92e8ef4aa8cde70a5";
5267
5274
  }
5268
- flash_swap(client, txb, path, by_amount_in) {
5275
+ flash_swap(client, txb, path, by_amount_in, packages) {
5269
5276
  const { direction, from, target } = path;
5270
5277
  const [func, coinAType, coinBType] = direction ? ["flash_swap_a2b", from, target] : ["flash_swap_b2a", target, from];
5271
5278
  let amount = by_amount_in ? path.amountIn : path.amountOut;
@@ -5277,8 +5284,9 @@ var Cetus = class {
5277
5284
  txb.pure.bool(by_amount_in),
5278
5285
  txb.object(CLOCK_ADDRESS)
5279
5286
  ];
5287
+ const publishedAt = getAggregatorV2PublishedAt(client.publishedAtV2(), packages);
5280
5288
  const res = txb.moveCall({
5281
- target: `${client.publishedAt()}::cetus::${func}`,
5289
+ target: `${publishedAt}::cetus::${func}`,
5282
5290
  typeArguments: [coinAType, coinBType],
5283
5291
  arguments: args
5284
5292
  });
@@ -5288,7 +5296,7 @@ var Cetus = class {
5288
5296
  payAmount: res[2]
5289
5297
  };
5290
5298
  }
5291
- repay_flash_swap(client, txb, path, inputCoin, receipt) {
5299
+ repay_flash_swap(client, txb, path, inputCoin, receipt, packages) {
5292
5300
  const { direction, from, target } = path;
5293
5301
  const [func, coinAType, coinBType] = direction ? ["repay_flash_swap_a2b", from, target] : ["repay_flash_swap_b2a", target, from];
5294
5302
  const args = [
@@ -5298,14 +5306,15 @@ var Cetus = class {
5298
5306
  inputCoin,
5299
5307
  receipt
5300
5308
  ];
5309
+ const publishedAt = getAggregatorV2PublishedAt(client.publishedAtV2(), packages);
5301
5310
  const res = txb.moveCall({
5302
- target: `${client.publishedAt()}::cetus::${func}`,
5311
+ target: `${publishedAt}::cetus::${func}`,
5303
5312
  typeArguments: [coinAType, coinBType],
5304
5313
  arguments: args
5305
5314
  });
5306
5315
  return res[0];
5307
5316
  }
5308
- swap(client, txb, path, inputCoin) {
5317
+ swap(client, txb, path, inputCoin, packages) {
5309
5318
  return __async(this, null, function* () {
5310
5319
  const { direction, from, target } = path;
5311
5320
  const [func, coinAType, coinBType] = direction ? ["swap_a2b", from, target] : ["swap_b2a", target, from];
@@ -5316,8 +5325,9 @@ var Cetus = class {
5316
5325
  inputCoin,
5317
5326
  txb.object(CLOCK_ADDRESS)
5318
5327
  ];
5328
+ const publishedAt = getAggregatorV2PublishedAt(client.publishedAtV2(), packages);
5319
5329
  const res = txb.moveCall({
5320
- target: `${client.publishedAt()}::cetus::${func}`,
5330
+ target: `${publishedAt}::cetus::${func}`,
5321
5331
  typeArguments: [coinAType, coinBType],
5322
5332
  arguments: args
5323
5333
  });
@@ -5665,13 +5675,21 @@ function mintZeroCoin(txb, coinType) {
5665
5675
  }
5666
5676
  function buildInputCoin(txb, allCoins, amount, coinType) {
5667
5677
  const usedCoinAsests = CoinUtils.getCoinAssets(coinType, allCoins);
5668
- if (amount === BigInt(0) && usedCoinAsests.length === 0) {
5669
- const zeroCoin = mintZeroCoin(txb, coinType);
5670
- return {
5671
- targetCoin: zeroCoin,
5672
- isMintZeroCoin: true,
5673
- targetCoinAmount: 0
5674
- };
5678
+ if (amount === BigInt(0)) {
5679
+ if (CoinUtils.isSuiCoin(coinType) || usedCoinAsests.length === 0 && !CoinUtils.isSuiCoin(coinType)) {
5680
+ const zeroCoin = mintZeroCoin(txb, coinType);
5681
+ return {
5682
+ targetCoin: zeroCoin,
5683
+ isMintZeroCoin: true,
5684
+ targetCoinAmount: 0
5685
+ };
5686
+ } else {
5687
+ return {
5688
+ targetCoin: txb.object(usedCoinAsests[0].coinObjectId),
5689
+ isMintZeroCoin: false,
5690
+ targetCoinAmount: Number(usedCoinAsests[0].balance.toString())
5691
+ };
5692
+ }
5675
5693
  }
5676
5694
  let totalCoinBalance = CoinUtils.calculateTotalBalance(usedCoinAsests);
5677
5695
  if (totalCoinBalance < amount) {
@@ -5895,7 +5913,8 @@ function swapInPools(client, params, sender, env) {
5895
5913
  initialPrice
5896
5914
  }
5897
5915
  ],
5898
- insufficientLiquidity: false
5916
+ insufficientLiquidity: false,
5917
+ byAmountIn: params.byAmountIn
5899
5918
  };
5900
5919
  const result = {
5901
5920
  isExceed: event.is_exceed,
@@ -5912,7 +5931,7 @@ var Haedal = class {
5912
5931
  throw new Error("Haedal only supported on mainnet");
5913
5932
  }
5914
5933
  }
5915
- swap(client, txb, path, inputCoin) {
5934
+ swap(client, txb, path, inputCoin, packages) {
5916
5935
  return __async(this, null, function* () {
5917
5936
  const { direction } = path;
5918
5937
  if (!direction) {
@@ -5920,8 +5939,9 @@ var Haedal = class {
5920
5939
  }
5921
5940
  const func = "swap_a2b";
5922
5941
  const args = [txb.object(path.id), txb.object("0x5"), inputCoin];
5942
+ const publishedAt = getAggregatorV2PublishedAt(client.publishedAtV2(), packages);
5923
5943
  const res = txb.moveCall({
5924
- target: `${client.publishedAt()}::haedal::${func}`,
5944
+ target: `${publishedAt}::haedal::${func}`,
5925
5945
  typeArguments: [],
5926
5946
  arguments: args
5927
5947
  });
@@ -5941,7 +5961,7 @@ var Afsui = class {
5941
5961
  this.referVault = "0x4ce9a19b594599536c53edb25d22532f82f18038dc8ef618afd00fbbfb9845ef";
5942
5962
  this.validator = "0xd30018ec3f5ff1a3c75656abf927a87d7f0529e6dc89c7ddd1bd27ecb05e3db2";
5943
5963
  }
5944
- swap(client, txb, path, inputCoin) {
5964
+ swap(client, txb, path, inputCoin, packages) {
5945
5965
  return __async(this, null, function* () {
5946
5966
  const { direction } = path;
5947
5967
  if (!direction) {
@@ -5956,8 +5976,9 @@ var Afsui = class {
5956
5976
  txb.object(this.validator),
5957
5977
  inputCoin
5958
5978
  ];
5979
+ const publishedAt = getAggregatorV2PublishedAt(client.publishedAtV2(), packages);
5959
5980
  const res = txb.moveCall({
5960
- target: `${client.publishedAt()}::afsui::${func}`,
5981
+ target: `${publishedAt}::afsui::${func}`,
5961
5982
  typeArguments: [],
5962
5983
  arguments: args
5963
5984
  });
@@ -5975,7 +5996,7 @@ var Volo = class {
5975
5996
  this.nativePool = "0x7fa2faa111b8c65bea48a23049bfd81ca8f971a262d981dcd9a17c3825cb5baf";
5976
5997
  this.metadata = "0x680cd26af32b2bde8d3361e804c53ec1d1cfe24c7f039eb7f549e8dfde389a60";
5977
5998
  }
5978
- swap(client, txb, path, inputCoin) {
5999
+ swap(client, txb, path, inputCoin, packages) {
5979
6000
  return __async(this, null, function* () {
5980
6001
  const { direction } = path;
5981
6002
  if (!direction) {
@@ -5988,8 +6009,9 @@ var Volo = class {
5988
6009
  txb.object("0x5"),
5989
6010
  inputCoin
5990
6011
  ];
6012
+ const publishedAt = getAggregatorV2PublishedAt(client.publishedAtV2(), packages);
5991
6013
  const res = txb.moveCall({
5992
- target: `${client.publishedAt()}::volo::${func}`,
6014
+ target: `${publishedAt}::volo::${func}`,
5993
6015
  typeArguments: [],
5994
6016
  arguments: args
5995
6017
  });
@@ -6006,13 +6028,14 @@ var Bluemove = class {
6006
6028
  }
6007
6029
  this.dexInfo = "0x3f2d9f724f4a1ce5e71676448dc452be9a6243dac9c5b975a588c8c867066e92";
6008
6030
  }
6009
- swap(client, txb, path, inputCoin) {
6031
+ swap(client, txb, path, inputCoin, packages) {
6010
6032
  return __async(this, null, function* () {
6011
6033
  const { direction, from, target } = path;
6012
6034
  const [func, coinAType, coinBType] = direction ? ["swap_a2b", from, target] : ["swap_b2a", target, from];
6013
6035
  const args = [txb.object(this.dexInfo), inputCoin];
6036
+ const publishedAt = getAggregatorV2PublishedAt(client.publishedAtV2(), packages);
6014
6037
  const res = txb.moveCall({
6015
- target: `${client.publishedAt()}::bluemove::${func}`,
6038
+ target: `${publishedAt}::bluemove::${func}`,
6016
6039
  typeArguments: [coinAType, coinBType],
6017
6040
  arguments: args
6018
6041
  });
@@ -6026,7 +6049,7 @@ var DeepbookV3 = class {
6026
6049
  constructor(env) {
6027
6050
  this.deepbookV3Config = env === 0 /* Mainnet */ ? "0xe4099d0cda04f3aa80028fac91a9b3dbe50d08f2ff42aa2c29473926e34ca48c" : "0xe19b5d072346cae83a037d4e3c8492068a74410a74e5830b3a68012db38296aa";
6028
6051
  }
6029
- swap(client, txb, path, inputCoin, deepbookv3DeepFee) {
6052
+ swap(client, txb, path, inputCoin, packages, deepbookv3DeepFee) {
6030
6053
  return __async(this, null, function* () {
6031
6054
  const { direction, from, target } = path;
6032
6055
  const [func, coinAType, coinBType] = direction ? ["swap_a2b", from, target] : ["swap_b2a", target, from];
@@ -6043,8 +6066,9 @@ var DeepbookV3 = class {
6043
6066
  deepFee,
6044
6067
  txb.object(CLOCK_ADDRESS)
6045
6068
  ];
6069
+ const publishedAt = getAggregatorV2ExtendPublishedAt(client.publishedAtV2Extend(), packages);
6046
6070
  const res = txb.moveCall({
6047
- target: `${client.publishedAtV2()}::deepbookv3::${func}`,
6071
+ target: `${publishedAt}::deepbookv3::${func}`,
6048
6072
  typeArguments: [coinAType, coinBType],
6049
6073
  arguments: args
6050
6074
  });
@@ -6062,7 +6086,7 @@ var Scallop = class {
6062
6086
  this.version = env === 0 /* Mainnet */ ? "0x07871c4b3c847a0f674510d4978d5cf6f960452795e8ff6f189fd2088a3f6ac7" : "0x0";
6063
6087
  this.market = env === 0 /* Mainnet */ ? "0xa757975255146dc9686aa823b7838b507f315d704f428cbadad2f4ea061939d9" : "0x0";
6064
6088
  }
6065
- swap(client, txb, path, inputCoin) {
6089
+ swap(client, txb, path, inputCoin, packages) {
6066
6090
  return __async(this, null, function* () {
6067
6091
  const { direction, from, target } = path;
6068
6092
  const [func, coinAType, coinBType] = direction ? ["swap_a2b", from, target] : ["swap_b2a", from, target];
@@ -6080,8 +6104,9 @@ var Scallop = class {
6080
6104
  inputCoin,
6081
6105
  txb.object(CLOCK_ADDRESS)
6082
6106
  ];
6107
+ const publishedAt = getAggregatorV2ExtendPublishedAt(client.publishedAtV2Extend(), packages);
6083
6108
  const res = txb.moveCall({
6084
- target: `${client.publishedAtV2()}::scallop::${func}`,
6109
+ target: `${publishedAt}::scallop::${func}`,
6085
6110
  typeArguments: [coinAType, coinBType],
6086
6111
  arguments: args
6087
6112
  });
@@ -6096,20 +6121,20 @@ var Suilend = class {
6096
6121
  if (env !== 0 /* Mainnet */) {
6097
6122
  throw new Error("Suilend only supported on mainnet");
6098
6123
  }
6099
- this.liquid_staking_pool = env === 0 /* Mainnet */ ? "0x15eda7330c8f99c30e430b4d82fd7ab2af3ead4ae17046fcb224aa9bad394f6b" : "0x0";
6100
6124
  this.sui_system_state = env === 0 /* Mainnet */ ? "0x0000000000000000000000000000000000000000000000000000000000000005" : "0x0";
6101
6125
  }
6102
- swap(client, txb, path, inputCoin) {
6126
+ swap(client, txb, path, inputCoin, packages) {
6103
6127
  return __async(this, null, function* () {
6104
6128
  const { direction, from, target } = path;
6105
6129
  const [func, springCoinType] = direction ? ["swap_a2b", target] : ["swap_b2a", from];
6106
6130
  const args = [
6107
- txb.object(this.liquid_staking_pool),
6131
+ txb.object(path.id),
6108
6132
  txb.object(this.sui_system_state),
6109
6133
  inputCoin
6110
6134
  ];
6135
+ const publishedAt = getAggregatorV2ExtendPublishedAt(client.publishedAtV2Extend(), packages);
6111
6136
  const res = txb.moveCall({
6112
- target: `${client.publishedAtV2()}::suilend::${func}`,
6137
+ target: `${publishedAt}::suilend::${func}`,
6113
6138
  typeArguments: [springCoinType],
6114
6139
  arguments: args
6115
6140
  });
@@ -6126,7 +6151,7 @@ var Bluefin = class {
6126
6151
  }
6127
6152
  this.globalConfig = "0x03db251ba509a8d5d8777b6338836082335d93eecbdd09a11e190a1cff51c352";
6128
6153
  }
6129
- swap(client, txb, path, inputCoin) {
6154
+ swap(client, txb, path, inputCoin, packages) {
6130
6155
  return __async(this, null, function* () {
6131
6156
  const { direction, from, target } = path;
6132
6157
  const [func, coinAType, coinBType] = direction ? ["swap_a2b", from, target] : ["swap_b2a", target, from];
@@ -6136,8 +6161,9 @@ var Bluefin = class {
6136
6161
  inputCoin,
6137
6162
  txb.object(CLOCK_ADDRESS)
6138
6163
  ];
6164
+ const publishedAt = getAggregatorV2ExtendPublishedAt(client.publishedAtV2Extend(), packages);
6139
6165
  const res = txb.moveCall({
6140
- target: `${client.publishedAtV2()}::bluefin::${func}`,
6166
+ target: `${publishedAt}::bluefin::${func}`,
6141
6167
  typeArguments: [coinAType, coinBType],
6142
6168
  arguments: args
6143
6169
  });
@@ -6159,7 +6185,7 @@ var HaedalPmm = class {
6159
6185
  this.pythClient = new SuiPythClient(suiClient, pythStateId, wormholeStateId);
6160
6186
  }
6161
6187
  }
6162
- swap(client, txb, path, inputCoin) {
6188
+ swap(client, txb, path, inputCoin, packages) {
6163
6189
  return __async(this, null, function* () {
6164
6190
  const { direction, from, target } = path;
6165
6191
  const [func, coinAType, coinBType] = direction ? ["swap_a2b", from, target] : ["swap_b2a", target, from];
@@ -6184,8 +6210,9 @@ var HaedalPmm = class {
6184
6210
  inputCoin,
6185
6211
  txb.object(CLOCK_ADDRESS)
6186
6212
  ];
6213
+ const publishedAt = getAggregatorV2ExtendPublishedAt(client.publishedAtV2Extend(), packages);
6187
6214
  const res = txb.moveCall({
6188
- target: `${client.publishedAtV2()}::haedalpmm::${func}`,
6215
+ target: `${publishedAt}::haedalpmm::${func}`,
6189
6216
  typeArguments: [coinAType, coinBType],
6190
6217
  arguments: args
6191
6218
  });
@@ -6194,6 +6221,34 @@ var HaedalPmm = class {
6194
6221
  }
6195
6222
  };
6196
6223
 
6224
+ // src/transaction/alphafi.ts
6225
+ var Alphafi = class {
6226
+ constructor(env) {
6227
+ if (env !== 0 /* Mainnet */) {
6228
+ throw new Error("Alphafi only supported on mainnet");
6229
+ }
6230
+ this.sui_system_state = env === 0 /* Mainnet */ ? "0x0000000000000000000000000000000000000000000000000000000000000005" : "0x0";
6231
+ }
6232
+ swap(client, txb, path, inputCoin, packages) {
6233
+ return __async(this, null, function* () {
6234
+ const { direction, from, target } = path;
6235
+ const [func, stCoinType] = direction ? ["swap_a2b", target] : ["swap_b2a", from];
6236
+ const args = [
6237
+ txb.object(path.id),
6238
+ txb.object(this.sui_system_state),
6239
+ inputCoin
6240
+ ];
6241
+ const publishedAt = getAggregatorV2ExtendPublishedAt(client.publishedAtV2Extend(), packages);
6242
+ const res = txb.moveCall({
6243
+ target: `${publishedAt}::alphafi::${func}`,
6244
+ typeArguments: [stCoinType],
6245
+ arguments: args
6246
+ });
6247
+ return res;
6248
+ });
6249
+ }
6250
+ };
6251
+
6197
6252
  // src/client.ts
6198
6253
  var CETUS = "CETUS";
6199
6254
  var DEEPBOOKV2 = "DEEPBOOK";
@@ -6212,8 +6267,16 @@ var SCALLOP = "SCALLOP";
6212
6267
  var SUILEND = "SUILEND";
6213
6268
  var BLUEFIN = "BLUEFIN";
6214
6269
  var HAEDALPMM = "HAEDALPMM";
6270
+ var ALPHAFI = "ALPHAFI";
6271
+ var SPRINGSUI = "SPRINGSUI";
6215
6272
  var DEFAULT_ENDPOINT = "https://api-sui.cetus.zone/router_v2";
6216
- var AggregatorClient10 = class {
6273
+ function isBuilderRouterSwapParams(params) {
6274
+ return Array.isArray(params.routers);
6275
+ }
6276
+ function isBuilderFastRouterSwapParams(params) {
6277
+ return Array.isArray(params.routers);
6278
+ }
6279
+ var AggregatorClient19 = class {
6217
6280
  constructor(endpoint, signer, client, env) {
6218
6281
  this.endpoint = endpoint ? processEndpoint(endpoint) : DEFAULT_ENDPOINT;
6219
6282
  this.client = client || new SuiClient({ url: getFullnodeUrl("mainnet") });
@@ -6263,7 +6326,7 @@ var AggregatorClient10 = class {
6263
6326
  return getRouterResult(this.endpoint, params);
6264
6327
  });
6265
6328
  }
6266
- expectInputSwap(txb, inputCoin, routers, amountOutLimit, partner, deepbookv3DeepFee) {
6329
+ expectInputSwap(txb, inputCoin, routers, amountOutLimit, partner, deepbookv3DeepFee, packages) {
6267
6330
  return __async(this, null, function* () {
6268
6331
  if (routers.length === 0) {
6269
6332
  throw new Error("No router found");
@@ -6280,26 +6343,29 @@ var AggregatorClient10 = class {
6280
6343
  let nextCoin = inputCoins[i];
6281
6344
  for (const path of routers[i].path) {
6282
6345
  const dex = this.newDex(path.provider, partner);
6283
- nextCoin = yield dex.swap(this, txb, path, nextCoin, deepbookv3DeepFee);
6346
+ nextCoin = yield dex.swap(this, txb, path, nextCoin, packages, deepbookv3DeepFee);
6284
6347
  }
6285
6348
  outputCoins.push(nextCoin);
6286
6349
  }
6287
- this.transferOrDestoryCoin(txb, inputCoin, inputCoinType);
6350
+ const aggregatorV2PublishedAt = getAggregatorV2PublishedAt(this.publishedAtV2(), packages);
6351
+ this.transferOrDestoryCoin(txb, inputCoin, inputCoinType, this.publishedAtV2());
6288
6352
  const mergedTargetCointhis = this.checkCoinThresholdAndMergeCoin(
6289
6353
  txb,
6290
6354
  outputCoins,
6291
6355
  outputCoinType,
6292
- amountOutLimit
6356
+ amountOutLimit,
6357
+ aggregatorV2PublishedAt
6293
6358
  );
6294
6359
  return mergedTargetCointhis;
6295
6360
  });
6296
6361
  }
6297
- expectOutputSwap(txb, inputCoin, routers, partner) {
6362
+ expectOutputSwap(txb, inputCoin, routers, partner, packages) {
6298
6363
  return __async(this, null, function* () {
6299
6364
  const returnCoins = [];
6300
6365
  const receipts = [];
6301
6366
  const targetCoins = [];
6302
6367
  const dex = new Cetus(this.env, partner);
6368
+ const aggregatorV2PublishedAt = getAggregatorV2PublishedAt(this.publishedAtV2(), packages);
6303
6369
  for (let i = 0; i < routers.length; i++) {
6304
6370
  const router = routers[i];
6305
6371
  for (let j = router.path.length - 1; j >= 0; j--) {
@@ -6322,7 +6388,7 @@ var AggregatorClient10 = class {
6322
6388
  if (j === 0) {
6323
6389
  inputCoin = repayResult;
6324
6390
  } else {
6325
- this.transferOrDestoryCoin(txb, repayResult, path.from);
6391
+ this.transferOrDestoryCoin(txb, repayResult, path.from, aggregatorV2PublishedAt);
6326
6392
  }
6327
6393
  if (j === router.path.length - 1) {
6328
6394
  targetCoins.push(nextRepayCoin);
@@ -6330,7 +6396,7 @@ var AggregatorClient10 = class {
6330
6396
  }
6331
6397
  }
6332
6398
  const inputCoinType = routers[0].path[0].from;
6333
- this.transferOrDestoryCoin(txb, inputCoin, inputCoinType);
6399
+ this.transferOrDestoryCoin(txb, inputCoin, inputCoinType, aggregatorV2PublishedAt);
6334
6400
  if (targetCoins.length > 1) {
6335
6401
  const vec = txb.makeMoveVec({ elements: targetCoins.slice(1) });
6336
6402
  txb.moveCall({
@@ -6360,16 +6426,17 @@ var AggregatorClient10 = class {
6360
6426
  routers,
6361
6427
  inputCoin,
6362
6428
  slippage,
6363
- byAmountIn,
6364
6429
  txb,
6365
6430
  partner,
6366
6431
  deepbookv3DeepFee
6367
6432
  } = params;
6368
- const amountIn = routers.reduce(
6433
+ const routerData = Array.isArray(routers) ? routers : routers.routes;
6434
+ const byAmountIn = isBuilderRouterSwapParams(params) ? params.byAmountIn : params.routers.byAmountIn;
6435
+ const amountIn = routerData.reduce(
6369
6436
  (acc, router) => acc.add(router.amountIn),
6370
6437
  new import_bn5.default(0)
6371
6438
  );
6372
- const amountOut = routers.reduce(
6439
+ const amountOut = routerData.reduce(
6373
6440
  (acc, router) => acc.add(router.amountOut),
6374
6441
  new import_bn5.default(0)
6375
6442
  );
@@ -6378,25 +6445,29 @@ var AggregatorClient10 = class {
6378
6445
  byAmountIn,
6379
6446
  slippage
6380
6447
  );
6448
+ const packages = isBuilderRouterSwapParams(params) ? void 0 : params.routers.packages;
6449
+ console.log("packages11", packages);
6450
+ const aggregatorV2PublishedAt = getAggregatorV2PublishedAt(this.publishedAtV2(), packages);
6381
6451
  if (byAmountIn) {
6382
6452
  const targetCoin2 = yield this.expectInputSwap(
6383
6453
  txb,
6384
6454
  inputCoin,
6385
- routers,
6455
+ routerData,
6386
6456
  amountLimit,
6387
6457
  partner,
6388
- deepbookv3DeepFee
6458
+ deepbookv3DeepFee,
6459
+ packages
6389
6460
  );
6390
6461
  return targetCoin2;
6391
6462
  }
6392
6463
  const splitedInputCoins = txb.splitCoins(inputCoin, [
6393
6464
  amountLimit.toString()
6394
6465
  ]);
6395
- this.transferOrDestoryCoin(txb, inputCoin, routers[0].path[0].from);
6466
+ this.transferOrDestoryCoin(txb, inputCoin, routerData[0].path[0].from, aggregatorV2PublishedAt);
6396
6467
  const targetCoin = yield this.expectOutputSwap(
6397
6468
  txb,
6398
6469
  splitedInputCoins[0],
6399
- routers,
6470
+ routerData,
6400
6471
  partner
6401
6472
  );
6402
6473
  return targetCoin;
@@ -6408,25 +6479,25 @@ var AggregatorClient10 = class {
6408
6479
  return __async(this, null, function* () {
6409
6480
  const {
6410
6481
  routers,
6411
- byAmountIn,
6412
6482
  slippage,
6413
6483
  txb,
6414
6484
  partner,
6415
- isMergeTragetCoin,
6416
6485
  refreshAllCoins,
6417
6486
  payDeepFeeAmount
6418
6487
  } = params;
6419
- const fromCoinType = routers[0].path[0].from;
6488
+ const routerData = Array.isArray(routers) ? routers : routers.routes;
6489
+ const fromCoinType = routerData[0].path[0].from;
6420
6490
  let fromCoins = yield this.getCoins(fromCoinType, refreshAllCoins);
6421
- const targetCoinType = routers[0].path[routers[0].path.length - 1].target;
6422
- const amountIn = routers.reduce(
6491
+ const targetCoinType = routerData[0].path[routerData[0].path.length - 1].target;
6492
+ const amountIn = routerData.reduce(
6423
6493
  (acc, router) => acc.add(router.amountIn),
6424
6494
  new import_bn5.default(0)
6425
6495
  );
6426
- const amountOut = routers.reduce(
6496
+ const amountOut = routerData.reduce(
6427
6497
  (acc, router) => acc.add(router.amountOut),
6428
6498
  new import_bn5.default(0)
6429
6499
  );
6500
+ const byAmountIn = isBuilderFastRouterSwapParams(params) ? params.byAmountIn : params.routers.byAmountIn;
6430
6501
  const amountLimit = CalculateAmountLimit(
6431
6502
  byAmountIn ? amountOut : amountIn,
6432
6503
  byAmountIn,
@@ -6449,16 +6520,27 @@ var AggregatorClient10 = class {
6449
6520
  this.deepbookv3DeepFeeType()
6450
6521
  ).targetCoin;
6451
6522
  }
6452
- const targetCoin = yield this.routerSwap({
6453
- routers,
6523
+ const routerSwapParams = isBuilderFastRouterSwapParams(params) ? {
6524
+ routers: routerData,
6454
6525
  inputCoin: buildFromCoinRes.targetCoin,
6455
6526
  slippage,
6456
6527
  byAmountIn,
6457
6528
  txb,
6458
6529
  partner,
6459
6530
  deepbookv3DeepFee: deepCoin
6460
- });
6461
- if (isMergeTragetCoin) {
6531
+ } : {
6532
+ routers: params.routers,
6533
+ inputCoin: buildFromCoinRes.targetCoin,
6534
+ slippage,
6535
+ byAmountIn,
6536
+ txb,
6537
+ partner,
6538
+ deepbookv3DeepFee: deepCoin
6539
+ };
6540
+ const targetCoin = yield this.routerSwap(routerSwapParams);
6541
+ if (CoinUtils.isSuiCoin(targetCoinType)) {
6542
+ txb.mergeCoins(txb.gas, [targetCoin]);
6543
+ } else {
6462
6544
  let targetCoins = yield this.getCoins(targetCoinType, refreshAllCoins);
6463
6545
  const targetCoinRes = buildInputCoin(
6464
6546
  txb,
@@ -6466,21 +6548,22 @@ var AggregatorClient10 = class {
6466
6548
  BigInt(0),
6467
6549
  targetCoinType
6468
6550
  );
6551
+ const packages = isBuilderFastRouterSwapParams(params) ? void 0 : params.routers.packages;
6552
+ const aggregatorV2PublishedAt = getAggregatorV2PublishedAt(this.publishedAtV2(), packages);
6469
6553
  txb.mergeCoins(targetCoinRes.targetCoin, [targetCoin]);
6470
6554
  if (targetCoinRes.isMintZeroCoin) {
6471
6555
  this.transferOrDestoryCoin(
6472
6556
  txb,
6473
6557
  targetCoinRes.targetCoin,
6474
- targetCoinType
6558
+ targetCoinType,
6559
+ aggregatorV2PublishedAt
6475
6560
  );
6476
6561
  }
6477
- } else {
6478
- this.transferOrDestoryCoin(txb, targetCoin, targetCoinType);
6479
6562
  }
6480
6563
  });
6481
6564
  }
6482
6565
  // Include cetus、deepbookv2、flowxv2 & v3、kriyav2 & v3、turbos、aftermath、haedal、afsui、volo、bluemove
6483
- publishedAt() {
6566
+ publishedAtV2() {
6484
6567
  if (this.env === 0 /* Mainnet */) {
6485
6568
  return "0x3fb42ddf908af45f9fc3c59eab227888ff24ba2e137b3b55bf80920fd47e11af";
6486
6569
  } else {
@@ -6488,9 +6571,9 @@ var AggregatorClient10 = class {
6488
6571
  }
6489
6572
  }
6490
6573
  // Include deepbookv3, scallop, bluefin
6491
- publishedAtV2() {
6574
+ publishedAtV2Extend() {
6492
6575
  if (this.env === 0 /* Mainnet */) {
6493
- return "0x347dd58bbd11cd82c8b386b344729717c04a998da73386e82a239cc196d5706b";
6576
+ return "0xf2fcea41dc217385019828375764fa06d9bd25e8e4726ba1962680849fb8d613";
6494
6577
  } else {
6495
6578
  return "0xabb6a81c8a216828e317719e06125de5bb2cb0fe8f9916ff8c023ca5be224c78";
6496
6579
  }
@@ -6502,14 +6585,14 @@ var AggregatorClient10 = class {
6502
6585
  return "0x36dbef866a1d62bf7328989a10fb2f07d769f4ee587c0de4a0a256e57e0a58a8::deep::DEEP";
6503
6586
  }
6504
6587
  }
6505
- transferOrDestoryCoin(txb, coin, coinType) {
6588
+ transferOrDestoryCoin(txb, coin, coinType, aggregatorV2PublishedAt) {
6506
6589
  txb.moveCall({
6507
- target: `${this.publishedAt()}::utils::transfer_or_destroy_coin`,
6590
+ target: `${aggregatorV2PublishedAt}::utils::transfer_or_destroy_coin`,
6508
6591
  typeArguments: [coinType],
6509
6592
  arguments: [coin]
6510
6593
  });
6511
6594
  }
6512
- checkCoinThresholdAndMergeCoin(txb, coins, coinType, amountLimit) {
6595
+ checkCoinThresholdAndMergeCoin(txb, coins, coinType, amountLimit, aggregatorV2PublishedAt) {
6513
6596
  let targetCoin = coins[0];
6514
6597
  if (coins.length > 1) {
6515
6598
  let vec = txb.makeMoveVec({ elements: coins.slice(1) });
@@ -6521,7 +6604,7 @@ var AggregatorClient10 = class {
6521
6604
  targetCoin = coins[0];
6522
6605
  }
6523
6606
  txb.moveCall({
6524
- target: `${this.publishedAt()}::utils::check_coin_threshold`,
6607
+ target: `${aggregatorV2PublishedAt}::utils::check_coin_threshold`,
6525
6608
  typeArguments: [coinType],
6526
6609
  arguments: [targetCoin, txb.pure.u64(amountLimit.toString())]
6527
6610
  });
@@ -6559,10 +6642,14 @@ var AggregatorClient10 = class {
6559
6642
  return new Scallop(this.env);
6560
6643
  case SUILEND:
6561
6644
  return new Suilend(this.env);
6645
+ case SPRINGSUI:
6646
+ return new Suilend(this.env);
6562
6647
  case BLUEFIN:
6563
6648
  return new Bluefin(this.env);
6564
6649
  case HAEDALPMM:
6565
6650
  return new HaedalPmm(this.env, this.client);
6651
+ case ALPHAFI:
6652
+ return new Alphafi(this.env);
6566
6653
  default:
6567
6654
  throw new Error(`Unsupported dex ${provider}`);
6568
6655
  }
@@ -6610,7 +6697,7 @@ var AggregatorClient10 = class {
6610
6697
  });
6611
6698
  }
6612
6699
  };
6613
- function parseRouterResponse(data) {
6700
+ function parseRouterResponse(data, byAmountIn) {
6614
6701
  let totalDeepFee = 0;
6615
6702
  for (const route of data.routes) {
6616
6703
  for (const path of route.path) {
@@ -6619,9 +6706,17 @@ function parseRouterResponse(data) {
6619
6706
  }
6620
6707
  }
6621
6708
  }
6709
+ let packages = void 0;
6710
+ if (data.packages != null) {
6711
+ packages = /* @__PURE__ */ new Map();
6712
+ for (const [key, value] of Object.entries(data.packages)) {
6713
+ packages.set(key, value);
6714
+ }
6715
+ }
6622
6716
  let routerData = {
6623
6717
  amountIn: new import_bn5.default(data.amount_in.toString()),
6624
6718
  amountOut: new import_bn5.default(data.amount_out.toString()),
6719
+ byAmountIn,
6625
6720
  insufficientLiquidity: false,
6626
6721
  routes: data.routes.map((route) => {
6627
6722
  return {
@@ -6661,13 +6756,30 @@ function parseRouterResponse(data) {
6661
6756
  initialPrice: new decimal_default(route.initial_price.toString())
6662
6757
  };
6663
6758
  }),
6664
- totalDeepFee
6759
+ totalDeepFee,
6760
+ packages
6665
6761
  };
6666
6762
  return routerData;
6667
6763
  }
6668
6764
 
6669
6765
  // src/transaction/index.ts
6670
6766
  var CLOCK_ADDRESS = "0x0000000000000000000000000000000000000000000000000000000000000006";
6767
+ var AGGREGATOR_V2 = "aggregator_v2";
6768
+ var AGGREGATOR_V2_EXTEND = "aggregator_v2_extend";
6769
+ function getAggregatorV2PublishedAt(aggregatorV2PublishedAt, packages) {
6770
+ var _a;
6771
+ if (packages instanceof Map) {
6772
+ return (_a = packages.get(AGGREGATOR_V2)) != null ? _a : aggregatorV2PublishedAt;
6773
+ }
6774
+ return aggregatorV2PublishedAt;
6775
+ }
6776
+ function getAggregatorV2ExtendPublishedAt(aggregatorV2ExtendPublishedAt, packages) {
6777
+ var _a;
6778
+ if (packages instanceof Map) {
6779
+ return (_a = packages.get(AGGREGATOR_V2_EXTEND)) != null ? _a : aggregatorV2ExtendPublishedAt;
6780
+ }
6781
+ return aggregatorV2ExtendPublishedAt;
6782
+ }
6671
6783
 
6672
6784
  // src/utils/msafe.ts
6673
6785
  var import_bn6 = __toESM(require_bn());
@@ -6719,6 +6831,7 @@ function getRouterResult(endpoint, params) {
6719
6831
  amountIn: ZERO,
6720
6832
  amountOut: ZERO,
6721
6833
  routes: [],
6834
+ byAmountIn: params.byAmountIn,
6722
6835
  insufficientLiquidity: false,
6723
6836
  error: {
6724
6837
  code: 10001 /* NumberTooLarge */,
@@ -6735,6 +6848,7 @@ function getRouterResult(endpoint, params) {
6735
6848
  amountIn: ZERO,
6736
6849
  amountOut: ZERO,
6737
6850
  routes: [],
6851
+ byAmountIn: params.byAmountIn,
6738
6852
  insufficientLiquidity,
6739
6853
  error: {
6740
6854
  code: 10004 /* HoneyPot */,
@@ -6745,7 +6859,7 @@ function getRouterResult(endpoint, params) {
6745
6859
  };
6746
6860
  }
6747
6861
  if (data.data != null) {
6748
- const res = parseRouterResponse(data.data);
6862
+ const res = parseRouterResponse(data.data, params.byAmountIn);
6749
6863
  return res;
6750
6864
  }
6751
6865
  return {
@@ -6753,6 +6867,7 @@ function getRouterResult(endpoint, params) {
6753
6867
  amountOut: ZERO,
6754
6868
  routes: [],
6755
6869
  insufficientLiquidity,
6870
+ byAmountIn: params.byAmountIn,
6756
6871
  error: {
6757
6872
  code: 10003 /* InsufficientLiquidity */,
6758
6873
  msg: getAggregatorServerErrorMessage(
@@ -6796,7 +6911,7 @@ function getRouter(endpoint, params) {
6796
6911
  url += `&providers=${providers.join(",")}`;
6797
6912
  }
6798
6913
  }
6799
- url += "&v=1000317";
6914
+ url += "&v=1000319";
6800
6915
  const response = yield fetch(url);
6801
6916
  return response;
6802
6917
  } catch (error) {
@@ -6886,4 +7001,4 @@ decimal.js/decimal.mjs:
6886
7001
  *)
6887
7002
  */
6888
7003
 
6889
- export { AFSUI, AFTERMATH, AggregatorClient10 as AggregatorClient, BLUEFIN, BLUEMOVE, CETUS, CLOCK_ADDRESS, DEEPBOOKV2, DEEPBOOKV3, DEFAULT_ENDPOINT, Env, FLOWXV2, FLOWXV3, HAEDAL, HAEDALPMM, KRIYA, KRIYAV3, ONE, SCALLOP, SUILEND, TEN_POW_NINE, TURBOS, TWO, U128, U64_MAX, U64_MAX_BN, VOLO, ZERO, buildInputCoin, checkInvalidSuiAddress, compareCoins, completionCoin, composeType, createTarget, dealWithFastRouterSwapParamsForMsafe, extractAddressFromType, extractStructTagFromType, fixSuiObjectId, getDeepbookV3Config, getRouterResult, isSortedSymbols, mintZeroCoin, normalizeCoinType, parseRouterResponse, patchFixSuiObjectId, printTransaction, processEndpoint, restituteMsafeFastRouterSwapParams };
7004
+ export { AFSUI, AFTERMATH, AGGREGATOR_V2, AGGREGATOR_V2_EXTEND, ALPHAFI, AggregatorClient19 as AggregatorClient, BLUEFIN, BLUEMOVE, CETUS, CLOCK_ADDRESS, DEEPBOOKV2, DEEPBOOKV3, DEFAULT_ENDPOINT, Env, FLOWXV2, FLOWXV3, HAEDAL, HAEDALPMM, KRIYA, KRIYAV3, ONE, SCALLOP, SPRINGSUI, SUILEND, TEN_POW_NINE, TURBOS, TWO, U128, U64_MAX, U64_MAX_BN, VOLO, ZERO, buildInputCoin, checkInvalidSuiAddress, compareCoins, completionCoin, composeType, createTarget, dealWithFastRouterSwapParamsForMsafe, extractAddressFromType, extractStructTagFromType, fixSuiObjectId, getAggregatorV2ExtendPublishedAt, getAggregatorV2PublishedAt, getDeepbookV3Config, getRouterResult, isSortedSymbols, mintZeroCoin, normalizeCoinType, parseRouterResponse, patchFixSuiObjectId, printTransaction, processEndpoint, restituteMsafeFastRouterSwapParams };