@wardenswap/bestrate-sdk-beta 2.7.0 → 2.9.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +54 -33
- package/dist/index.es.d.ts +54 -33
- package/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -297,38 +297,41 @@ declare enum DexModel {
|
|
297
297
|
UniswapV3 = 1,
|
298
298
|
PancakeV3 = 2,
|
299
299
|
VelodromeSS = 3,
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
300
|
+
AlgebraV1CL = 4,
|
301
|
+
DMM = 5,
|
302
|
+
CurvePlain = 6,
|
303
|
+
CurveMeta = 7,
|
304
|
+
CurvePlainSol = 8,
|
305
|
+
Iron = 9,
|
306
|
+
Synapse = 10,
|
307
|
+
CurveMetaSol = 11,
|
308
|
+
CurveCrypto = 12,
|
309
|
+
CurveTriCryptoNG = 13,
|
310
|
+
CurveStableNG = 14,
|
311
|
+
CurveLendingA = 15,
|
312
|
+
CurveLendingCryptoZap = 16,
|
313
|
+
CurveLendingCryptoTwoZap = 17,
|
314
|
+
CurveLido = 18,
|
315
|
+
PolyDex = 19,
|
316
|
+
FireBirdWeighted = 20,
|
317
|
+
BalancerWeighted = 21,
|
318
|
+
BalancerStable = 22,
|
319
|
+
BalancerMetaStable = 23,
|
320
|
+
BalancerBoostedStable = 24,
|
321
|
+
BalancerLinear = 25,
|
322
|
+
BalancerLiquidityBootstrapping = 26,
|
323
|
+
Biswap = 27,
|
324
|
+
DodoV1 = 28,
|
325
|
+
DodoV2 = 29,
|
326
|
+
Mdex = 30,
|
327
|
+
Mars = 31,
|
328
|
+
Smoothy = 32,
|
329
|
+
Shibaswap = 33,
|
330
|
+
GmxDex = 34,
|
331
|
+
Solidly = 35,
|
332
|
+
VelodromeV2 = 36,
|
333
|
+
Synthetix = 37,
|
334
|
+
Unknown = 38
|
332
335
|
}
|
333
336
|
interface UniswapV2BasedModelInfo {
|
334
337
|
model: DexModel.UniswapV2 | DexModel.Mdex | DexModel.Biswap | DexModel.Mars | DexModel.Shibaswap;
|
@@ -345,6 +348,11 @@ interface UniswapV3ModelInfo extends Omit<UniswapV2BasedModelInfo, 'model' | 'fe
|
|
345
348
|
gasPerInitializedTick: bigint;
|
346
349
|
gasPerTick: bigint;
|
347
350
|
}
|
351
|
+
interface AlgebraV1CLModelInfo extends Omit<UniswapV3ModelInfo, 'model' | 'fee' | 'feePrecision' | 'factory'> {
|
352
|
+
model: DexModel.AlgebraV1CL;
|
353
|
+
poolDeployer: string;
|
354
|
+
quoterAddress: string;
|
355
|
+
}
|
348
356
|
interface PancakeV3ModelInfo extends Omit<UniswapV3ModelInfo, 'model' | 'factory'> {
|
349
357
|
model: DexModel.PancakeV3;
|
350
358
|
poolDeployer: string;
|
@@ -371,6 +379,11 @@ interface CurvePlainModelInfo {
|
|
371
379
|
aPrecision?: bigint;
|
372
380
|
balancesArgs?: string;
|
373
381
|
}
|
382
|
+
interface CurveLidoModelInfo extends Omit<CurvePlainModelInfo, 'model'> {
|
383
|
+
model: DexModel.CurveLido;
|
384
|
+
oracleAddress: string;
|
385
|
+
stethCoinIdx: number;
|
386
|
+
}
|
374
387
|
interface CurveLendingModelInfo {
|
375
388
|
model: DexModel.CurveLendingA;
|
376
389
|
poolContract: string;
|
@@ -388,6 +401,14 @@ interface CurveMetaModelInfo extends Omit<CurvePlainModelInfo, 'isUnderlying' |
|
|
388
401
|
basePoolRouteId: string;
|
389
402
|
isCacheExists: boolean;
|
390
403
|
}
|
404
|
+
interface CurvePlainNGModelInfo {
|
405
|
+
model: DexModel.CurveStableNG;
|
406
|
+
poolContract: string;
|
407
|
+
tokens: string[];
|
408
|
+
precision: bigint;
|
409
|
+
feeDenominator: bigint;
|
410
|
+
aPrecision: bigint;
|
411
|
+
}
|
391
412
|
interface CurveCryptoModelInfo {
|
392
413
|
model: DexModel.CurveCrypto;
|
393
414
|
tokens: string[];
|
@@ -515,7 +536,7 @@ interface RouteInfo {
|
|
515
536
|
type RouteInfoModel = RouteInfo & {
|
516
537
|
gas: bigint;
|
517
538
|
isTradingAllowed: boolean;
|
518
|
-
} & (UniswapV2BasedModelInfo | UniswapV3ModelInfo | PancakeV3ModelInfo | VelodromeSSModelInfo | CurvePlainModelInfo | CurveMetaModelInfo | CurveCryptoModelInfo | CurveCryptoNGModelInfo | CurveCryptoZapModelInfo | CurveCryptoTwoZapModelInfo | CurveLendingModelInfo | DodoV2ModelInfo | SmoothyModelInfo | DMMModelInfo | BalancerWeightedModelInfo | BalancerStableModelInfo | BalancerMetaStableModelInfo | BalancerBoostedStableModelInfo | BalancerLinearModelInfo | PolyDexModelInfo | GmxDexModelInfo | SolidlyModelInfo | VelodromeV2ModelInfo | SynthetixModelInfo | {
|
539
|
+
} & (UniswapV2BasedModelInfo | UniswapV3ModelInfo | PancakeV3ModelInfo | VelodromeSSModelInfo | AlgebraV1CLModelInfo | CurvePlainModelInfo | CurvePlainNGModelInfo | CurveMetaModelInfo | CurveCryptoModelInfo | CurveCryptoNGModelInfo | CurveCryptoZapModelInfo | CurveCryptoTwoZapModelInfo | CurveLendingModelInfo | CurveLidoModelInfo | DodoV2ModelInfo | SmoothyModelInfo | DMMModelInfo | BalancerWeightedModelInfo | BalancerStableModelInfo | BalancerMetaStableModelInfo | BalancerBoostedStableModelInfo | BalancerLinearModelInfo | PolyDexModelInfo | GmxDexModelInfo | SolidlyModelInfo | VelodromeV2ModelInfo | SynthetixModelInfo | {
|
519
540
|
model: DexModel.Unknown;
|
520
541
|
});
|
521
542
|
|
package/dist/index.es.d.ts
CHANGED
@@ -297,38 +297,41 @@ declare enum DexModel {
|
|
297
297
|
UniswapV3 = 1,
|
298
298
|
PancakeV3 = 2,
|
299
299
|
VelodromeSS = 3,
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
300
|
+
AlgebraV1CL = 4,
|
301
|
+
DMM = 5,
|
302
|
+
CurvePlain = 6,
|
303
|
+
CurveMeta = 7,
|
304
|
+
CurvePlainSol = 8,
|
305
|
+
Iron = 9,
|
306
|
+
Synapse = 10,
|
307
|
+
CurveMetaSol = 11,
|
308
|
+
CurveCrypto = 12,
|
309
|
+
CurveTriCryptoNG = 13,
|
310
|
+
CurveStableNG = 14,
|
311
|
+
CurveLendingA = 15,
|
312
|
+
CurveLendingCryptoZap = 16,
|
313
|
+
CurveLendingCryptoTwoZap = 17,
|
314
|
+
CurveLido = 18,
|
315
|
+
PolyDex = 19,
|
316
|
+
FireBirdWeighted = 20,
|
317
|
+
BalancerWeighted = 21,
|
318
|
+
BalancerStable = 22,
|
319
|
+
BalancerMetaStable = 23,
|
320
|
+
BalancerBoostedStable = 24,
|
321
|
+
BalancerLinear = 25,
|
322
|
+
BalancerLiquidityBootstrapping = 26,
|
323
|
+
Biswap = 27,
|
324
|
+
DodoV1 = 28,
|
325
|
+
DodoV2 = 29,
|
326
|
+
Mdex = 30,
|
327
|
+
Mars = 31,
|
328
|
+
Smoothy = 32,
|
329
|
+
Shibaswap = 33,
|
330
|
+
GmxDex = 34,
|
331
|
+
Solidly = 35,
|
332
|
+
VelodromeV2 = 36,
|
333
|
+
Synthetix = 37,
|
334
|
+
Unknown = 38
|
332
335
|
}
|
333
336
|
interface UniswapV2BasedModelInfo {
|
334
337
|
model: DexModel.UniswapV2 | DexModel.Mdex | DexModel.Biswap | DexModel.Mars | DexModel.Shibaswap;
|
@@ -345,6 +348,11 @@ interface UniswapV3ModelInfo extends Omit<UniswapV2BasedModelInfo, 'model' | 'fe
|
|
345
348
|
gasPerInitializedTick: bigint;
|
346
349
|
gasPerTick: bigint;
|
347
350
|
}
|
351
|
+
interface AlgebraV1CLModelInfo extends Omit<UniswapV3ModelInfo, 'model' | 'fee' | 'feePrecision' | 'factory'> {
|
352
|
+
model: DexModel.AlgebraV1CL;
|
353
|
+
poolDeployer: string;
|
354
|
+
quoterAddress: string;
|
355
|
+
}
|
348
356
|
interface PancakeV3ModelInfo extends Omit<UniswapV3ModelInfo, 'model' | 'factory'> {
|
349
357
|
model: DexModel.PancakeV3;
|
350
358
|
poolDeployer: string;
|
@@ -371,6 +379,11 @@ interface CurvePlainModelInfo {
|
|
371
379
|
aPrecision?: bigint;
|
372
380
|
balancesArgs?: string;
|
373
381
|
}
|
382
|
+
interface CurveLidoModelInfo extends Omit<CurvePlainModelInfo, 'model'> {
|
383
|
+
model: DexModel.CurveLido;
|
384
|
+
oracleAddress: string;
|
385
|
+
stethCoinIdx: number;
|
386
|
+
}
|
374
387
|
interface CurveLendingModelInfo {
|
375
388
|
model: DexModel.CurveLendingA;
|
376
389
|
poolContract: string;
|
@@ -388,6 +401,14 @@ interface CurveMetaModelInfo extends Omit<CurvePlainModelInfo, 'isUnderlying' |
|
|
388
401
|
basePoolRouteId: string;
|
389
402
|
isCacheExists: boolean;
|
390
403
|
}
|
404
|
+
interface CurvePlainNGModelInfo {
|
405
|
+
model: DexModel.CurveStableNG;
|
406
|
+
poolContract: string;
|
407
|
+
tokens: string[];
|
408
|
+
precision: bigint;
|
409
|
+
feeDenominator: bigint;
|
410
|
+
aPrecision: bigint;
|
411
|
+
}
|
391
412
|
interface CurveCryptoModelInfo {
|
392
413
|
model: DexModel.CurveCrypto;
|
393
414
|
tokens: string[];
|
@@ -515,7 +536,7 @@ interface RouteInfo {
|
|
515
536
|
type RouteInfoModel = RouteInfo & {
|
516
537
|
gas: bigint;
|
517
538
|
isTradingAllowed: boolean;
|
518
|
-
} & (UniswapV2BasedModelInfo | UniswapV3ModelInfo | PancakeV3ModelInfo | VelodromeSSModelInfo | CurvePlainModelInfo | CurveMetaModelInfo | CurveCryptoModelInfo | CurveCryptoNGModelInfo | CurveCryptoZapModelInfo | CurveCryptoTwoZapModelInfo | CurveLendingModelInfo | DodoV2ModelInfo | SmoothyModelInfo | DMMModelInfo | BalancerWeightedModelInfo | BalancerStableModelInfo | BalancerMetaStableModelInfo | BalancerBoostedStableModelInfo | BalancerLinearModelInfo | PolyDexModelInfo | GmxDexModelInfo | SolidlyModelInfo | VelodromeV2ModelInfo | SynthetixModelInfo | {
|
539
|
+
} & (UniswapV2BasedModelInfo | UniswapV3ModelInfo | PancakeV3ModelInfo | VelodromeSSModelInfo | AlgebraV1CLModelInfo | CurvePlainModelInfo | CurvePlainNGModelInfo | CurveMetaModelInfo | CurveCryptoModelInfo | CurveCryptoNGModelInfo | CurveCryptoZapModelInfo | CurveCryptoTwoZapModelInfo | CurveLendingModelInfo | CurveLidoModelInfo | DodoV2ModelInfo | SmoothyModelInfo | DMMModelInfo | BalancerWeightedModelInfo | BalancerStableModelInfo | BalancerMetaStableModelInfo | BalancerBoostedStableModelInfo | BalancerLinearModelInfo | PolyDexModelInfo | GmxDexModelInfo | SolidlyModelInfo | VelodromeV2ModelInfo | SynthetixModelInfo | {
|
519
540
|
model: DexModel.Unknown;
|
520
541
|
});
|
521
542
|
|