@wardenswap/bestrate-sdk-beta 2.7.0 → 2.9.0

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.ts CHANGED
@@ -297,38 +297,41 @@ declare enum DexModel {
297
297
  UniswapV3 = 1,
298
298
  PancakeV3 = 2,
299
299
  VelodromeSS = 3,
300
- DMM = 4,
301
- CurvePlain = 5,
302
- CurveMeta = 6,
303
- CurvePlainSol = 7,
304
- Iron = 8,
305
- Synapse = 9,
306
- CurveMetaSol = 10,
307
- CurveCrypto = 11,
308
- CurveTriCryptoNG = 12,
309
- CurveLendingA = 13,
310
- CurveLendingCryptoZap = 14,
311
- CurveLendingCryptoTwoZap = 15,
312
- PolyDex = 16,
313
- FireBirdWeighted = 17,
314
- BalancerWeighted = 18,
315
- BalancerStable = 19,
316
- BalancerMetaStable = 20,
317
- BalancerBoostedStable = 21,
318
- BalancerLinear = 22,
319
- BalancerLiquidityBootstrapping = 23,
320
- Biswap = 24,
321
- DodoV1 = 25,
322
- DodoV2 = 26,
323
- Mdex = 27,
324
- Mars = 28,
325
- Smoothy = 29,
326
- Shibaswap = 30,
327
- GmxDex = 31,
328
- Solidly = 32,
329
- VelodromeV2 = 33,
330
- Synthetix = 34,
331
- Unknown = 35
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
 
@@ -297,38 +297,41 @@ declare enum DexModel {
297
297
  UniswapV3 = 1,
298
298
  PancakeV3 = 2,
299
299
  VelodromeSS = 3,
300
- DMM = 4,
301
- CurvePlain = 5,
302
- CurveMeta = 6,
303
- CurvePlainSol = 7,
304
- Iron = 8,
305
- Synapse = 9,
306
- CurveMetaSol = 10,
307
- CurveCrypto = 11,
308
- CurveTriCryptoNG = 12,
309
- CurveLendingA = 13,
310
- CurveLendingCryptoZap = 14,
311
- CurveLendingCryptoTwoZap = 15,
312
- PolyDex = 16,
313
- FireBirdWeighted = 17,
314
- BalancerWeighted = 18,
315
- BalancerStable = 19,
316
- BalancerMetaStable = 20,
317
- BalancerBoostedStable = 21,
318
- BalancerLinear = 22,
319
- BalancerLiquidityBootstrapping = 23,
320
- Biswap = 24,
321
- DodoV1 = 25,
322
- DodoV2 = 26,
323
- Mdex = 27,
324
- Mars = 28,
325
- Smoothy = 29,
326
- Shibaswap = 30,
327
- GmxDex = 31,
328
- Solidly = 32,
329
- VelodromeV2 = 33,
330
- Synthetix = 34,
331
- Unknown = 35
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