@cetusprotocol/aggregator-sdk 0.0.0-experimental-20250623190323 → 0.0.0-experimental-20250625180535

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/dist/index.js CHANGED
@@ -7708,14 +7708,14 @@ function parseRouterResponse(data, byAmountIn) {
7708
7708
  from: path.from,
7709
7709
  target: path.target,
7710
7710
  feeRate: path.fee_rate,
7711
- amountIn: path.amount_in,
7712
- amountOut: path.amount_out,
7711
+ amountIn: BigInt(path.amount_in).toString(),
7712
+ amountOut: BigInt(path.amount_out).toString(),
7713
7713
  extendedDetails,
7714
7714
  version
7715
7715
  };
7716
7716
  }),
7717
- amountIn: new import_bn5.default(route.amount_in.toString()),
7718
- amountOut: new import_bn5.default(route.amount_out.toString()),
7717
+ amountIn: new import_bn5.default(BigInt(route.amount_in).toString()),
7718
+ amountOut: new import_bn5.default(BigInt(route.amount_out).toString()),
7719
7719
  initialPrice: new decimal_default(route.initial_price.toString())
7720
7720
  };
7721
7721
  }),
@@ -7825,6 +7825,7 @@ function getRouterResult(endpoint, apiKey, params, overlayFee, overlayFeeReceive
7825
7825
  };
7826
7826
  }
7827
7827
  const data = yield response.json();
7828
+ console.log("sdk getRouterResult \u{1F680} ~ data:", data);
7828
7829
  const insufficientLiquidity = data.msg === "liquidity is not enough";
7829
7830
  if (data.msg && data.msg.indexOf("HoneyPot scam") > -1) {
7830
7831
  return {
@@ -7843,6 +7844,7 @@ function getRouterResult(endpoint, apiKey, params, overlayFee, overlayFeeReceive
7843
7844
  }
7844
7845
  if (data.data != null) {
7845
7846
  const res = parseRouterResponse(data.data, params.byAmountIn);
7847
+ console.log("sdk getRouterResult parseRouterResponse \u{1F680} ~ res:", res);
7846
7848
  if (overlayFee > 0 && overlayFeeReceiver !== "0x0") {
7847
7849
  if (params.byAmountIn) {
7848
7850
  const overlayFeeAmount = res.amountOut.mul(new import_bn7.default(overlayFee)).div(new import_bn7.default(1e6));
package/dist/index.mjs CHANGED
@@ -7706,14 +7706,14 @@ function parseRouterResponse(data, byAmountIn) {
7706
7706
  from: path.from,
7707
7707
  target: path.target,
7708
7708
  feeRate: path.fee_rate,
7709
- amountIn: path.amount_in,
7710
- amountOut: path.amount_out,
7709
+ amountIn: BigInt(path.amount_in).toString(),
7710
+ amountOut: BigInt(path.amount_out).toString(),
7711
7711
  extendedDetails,
7712
7712
  version
7713
7713
  };
7714
7714
  }),
7715
- amountIn: new import_bn5.default(route.amount_in.toString()),
7716
- amountOut: new import_bn5.default(route.amount_out.toString()),
7715
+ amountIn: new import_bn5.default(BigInt(route.amount_in).toString()),
7716
+ amountOut: new import_bn5.default(BigInt(route.amount_out).toString()),
7717
7717
  initialPrice: new decimal_default(route.initial_price.toString())
7718
7718
  };
7719
7719
  }),
@@ -7823,6 +7823,7 @@ function getRouterResult(endpoint, apiKey, params, overlayFee, overlayFeeReceive
7823
7823
  };
7824
7824
  }
7825
7825
  const data = yield response.json();
7826
+ console.log("sdk getRouterResult \u{1F680} ~ data:", data);
7826
7827
  const insufficientLiquidity = data.msg === "liquidity is not enough";
7827
7828
  if (data.msg && data.msg.indexOf("HoneyPot scam") > -1) {
7828
7829
  return {
@@ -7841,6 +7842,7 @@ function getRouterResult(endpoint, apiKey, params, overlayFee, overlayFeeReceive
7841
7842
  }
7842
7843
  if (data.data != null) {
7843
7844
  const res = parseRouterResponse(data.data, params.byAmountIn);
7845
+ console.log("sdk getRouterResult parseRouterResponse \u{1F680} ~ res:", res);
7844
7846
  if (overlayFee > 0 && overlayFeeReceiver !== "0x0") {
7845
7847
  if (params.byAmountIn) {
7846
7848
  const overlayFeeAmount = res.amountOut.mul(new import_bn7.default(overlayFee)).div(new import_bn7.default(1e6));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cetusprotocol/aggregator-sdk",
3
- "version": "0.0.0-experimental-20250623190323",
3
+ "version": "0.0.0-experimental-20250625180535",
4
4
  "sideEffects": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",