@cetusprotocol/aggregator-sdk 0.14.0 → 0.14.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/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -1
- package/dist/index.mjs +6 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -5896,6 +5896,7 @@ function swapInPools(client, params, sender, env) {
|
|
|
5896
5896
|
const routeData = {
|
|
5897
5897
|
amountIn,
|
|
5898
5898
|
amountOut: new import_bn4.BN((_d = event.amount_out) != null ? _d : 0),
|
|
5899
|
+
deviationRatio: 0,
|
|
5899
5900
|
routes: [
|
|
5900
5901
|
{
|
|
5901
5902
|
path: [
|
|
@@ -7762,6 +7763,7 @@ function parseRouterResponse(data, byAmountIn) {
|
|
|
7762
7763
|
let routerData = {
|
|
7763
7764
|
amountIn: new import_bn5.default(data.amount_in.toString()),
|
|
7764
7765
|
amountOut: new import_bn5.default(data.amount_out.toString()),
|
|
7766
|
+
deviationRatio: data.deviation_ratio ? Number(data.deviation_ratio) : void 0,
|
|
7765
7767
|
byAmountIn,
|
|
7766
7768
|
insufficientLiquidity: false,
|
|
7767
7769
|
routes: data.routes.map((route) => {
|
|
@@ -7906,7 +7908,7 @@ function processEndpoint(endpoint) {
|
|
|
7906
7908
|
|
|
7907
7909
|
// src/api.ts
|
|
7908
7910
|
var import_bn7 = __toESM(require_bn());
|
|
7909
|
-
var SDK_VERSION =
|
|
7911
|
+
var SDK_VERSION = 1001402;
|
|
7910
7912
|
function getRouterResult(endpoint, apiKey, params, overlayFee, overlayFeeReceiver) {
|
|
7911
7913
|
return __async(this, null, function* () {
|
|
7912
7914
|
let response;
|
|
@@ -7929,6 +7931,7 @@ function getRouterResult(endpoint, apiKey, params, overlayFee, overlayFeeReceive
|
|
|
7929
7931
|
routes: [],
|
|
7930
7932
|
byAmountIn: params.byAmountIn,
|
|
7931
7933
|
insufficientLiquidity: false,
|
|
7934
|
+
deviationRatio: 0,
|
|
7932
7935
|
error: {
|
|
7933
7936
|
code: errorCode,
|
|
7934
7937
|
msg: getAggregatorServerErrorMessage(errorCode)
|
|
@@ -7944,6 +7947,7 @@ function getRouterResult(endpoint, apiKey, params, overlayFee, overlayFeeReceive
|
|
|
7944
7947
|
routes: [],
|
|
7945
7948
|
byAmountIn: params.byAmountIn,
|
|
7946
7949
|
insufficientLiquidity,
|
|
7950
|
+
deviationRatio: 0,
|
|
7947
7951
|
error: {
|
|
7948
7952
|
code: 10004 /* HoneyPot */,
|
|
7949
7953
|
msg: getAggregatorServerErrorMessage(
|
|
@@ -7973,6 +7977,7 @@ function getRouterResult(endpoint, apiKey, params, overlayFee, overlayFeeReceive
|
|
|
7973
7977
|
routes: [],
|
|
7974
7978
|
insufficientLiquidity,
|
|
7975
7979
|
byAmountIn: params.byAmountIn,
|
|
7980
|
+
deviationRatio: 0,
|
|
7976
7981
|
error: {
|
|
7977
7982
|
code: 10003 /* InsufficientLiquidity */,
|
|
7978
7983
|
msg: getAggregatorServerErrorMessage(
|
package/dist/index.mjs
CHANGED
|
@@ -5890,6 +5890,7 @@ function swapInPools(client, params, sender, env) {
|
|
|
5890
5890
|
const routeData = {
|
|
5891
5891
|
amountIn,
|
|
5892
5892
|
amountOut: new import_bn4.BN((_d = event.amount_out) != null ? _d : 0),
|
|
5893
|
+
deviationRatio: 0,
|
|
5893
5894
|
routes: [
|
|
5894
5895
|
{
|
|
5895
5896
|
path: [
|
|
@@ -7756,6 +7757,7 @@ function parseRouterResponse(data, byAmountIn) {
|
|
|
7756
7757
|
let routerData = {
|
|
7757
7758
|
amountIn: new import_bn5.default(data.amount_in.toString()),
|
|
7758
7759
|
amountOut: new import_bn5.default(data.amount_out.toString()),
|
|
7760
|
+
deviationRatio: data.deviation_ratio ? Number(data.deviation_ratio) : void 0,
|
|
7759
7761
|
byAmountIn,
|
|
7760
7762
|
insufficientLiquidity: false,
|
|
7761
7763
|
routes: data.routes.map((route) => {
|
|
@@ -7900,7 +7902,7 @@ function processEndpoint(endpoint) {
|
|
|
7900
7902
|
|
|
7901
7903
|
// src/api.ts
|
|
7902
7904
|
var import_bn7 = __toESM(require_bn());
|
|
7903
|
-
var SDK_VERSION =
|
|
7905
|
+
var SDK_VERSION = 1001402;
|
|
7904
7906
|
function getRouterResult(endpoint, apiKey, params, overlayFee, overlayFeeReceiver) {
|
|
7905
7907
|
return __async(this, null, function* () {
|
|
7906
7908
|
let response;
|
|
@@ -7923,6 +7925,7 @@ function getRouterResult(endpoint, apiKey, params, overlayFee, overlayFeeReceive
|
|
|
7923
7925
|
routes: [],
|
|
7924
7926
|
byAmountIn: params.byAmountIn,
|
|
7925
7927
|
insufficientLiquidity: false,
|
|
7928
|
+
deviationRatio: 0,
|
|
7926
7929
|
error: {
|
|
7927
7930
|
code: errorCode,
|
|
7928
7931
|
msg: getAggregatorServerErrorMessage(errorCode)
|
|
@@ -7938,6 +7941,7 @@ function getRouterResult(endpoint, apiKey, params, overlayFee, overlayFeeReceive
|
|
|
7938
7941
|
routes: [],
|
|
7939
7942
|
byAmountIn: params.byAmountIn,
|
|
7940
7943
|
insufficientLiquidity,
|
|
7944
|
+
deviationRatio: 0,
|
|
7941
7945
|
error: {
|
|
7942
7946
|
code: 10004 /* HoneyPot */,
|
|
7943
7947
|
msg: getAggregatorServerErrorMessage(
|
|
@@ -7967,6 +7971,7 @@ function getRouterResult(endpoint, apiKey, params, overlayFee, overlayFeeReceive
|
|
|
7967
7971
|
routes: [],
|
|
7968
7972
|
insufficientLiquidity,
|
|
7969
7973
|
byAmountIn: params.byAmountIn,
|
|
7974
|
+
deviationRatio: 0,
|
|
7970
7975
|
error: {
|
|
7971
7976
|
code: 10003 /* InsufficientLiquidity */,
|
|
7972
7977
|
msg: getAggregatorServerErrorMessage(
|