@wardenswap/bestrate-sdk-beta 2.6.1 → 2.8.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts CHANGED
@@ -305,29 +305,32 @@ declare enum DexModel {
305
305
  Synapse = 9,
306
306
  CurveMetaSol = 10,
307
307
  CurveCrypto = 11,
308
- CurveLendingA = 12,
309
- CurveLendingCryptoZap = 13,
310
- CurveLendingCryptoTwoZap = 14,
311
- PolyDex = 15,
312
- FireBirdWeighted = 16,
313
- BalancerWeighted = 17,
314
- BalancerStable = 18,
315
- BalancerMetaStable = 19,
316
- BalancerBoostedStable = 20,
317
- BalancerLinear = 21,
318
- BalancerLiquidityBootstrapping = 22,
319
- Biswap = 23,
320
- DodoV1 = 24,
321
- DodoV2 = 25,
322
- Mdex = 26,
323
- Mars = 27,
324
- Smoothy = 28,
325
- Shibaswap = 29,
326
- GmxDex = 30,
327
- Solidly = 31,
328
- VelodromeV2 = 32,
329
- Synthetix = 33,
330
- Unknown = 34
308
+ CurveTriCryptoNG = 12,
309
+ CurveStableNG = 13,
310
+ CurveLendingA = 14,
311
+ CurveLendingCryptoZap = 15,
312
+ CurveLendingCryptoTwoZap = 16,
313
+ CurveLido = 17,
314
+ PolyDex = 18,
315
+ FireBirdWeighted = 19,
316
+ BalancerWeighted = 20,
317
+ BalancerStable = 21,
318
+ BalancerMetaStable = 22,
319
+ BalancerBoostedStable = 23,
320
+ BalancerLinear = 24,
321
+ BalancerLiquidityBootstrapping = 25,
322
+ Biswap = 26,
323
+ DodoV1 = 27,
324
+ DodoV2 = 28,
325
+ Mdex = 29,
326
+ Mars = 30,
327
+ Smoothy = 31,
328
+ Shibaswap = 32,
329
+ GmxDex = 33,
330
+ Solidly = 34,
331
+ VelodromeV2 = 35,
332
+ Synthetix = 36,
333
+ Unknown = 37
331
334
  }
332
335
  interface UniswapV2BasedModelInfo {
333
336
  model: DexModel.UniswapV2 | DexModel.Mdex | DexModel.Biswap | DexModel.Mars | DexModel.Shibaswap;
@@ -370,6 +373,11 @@ interface CurvePlainModelInfo {
370
373
  aPrecision?: bigint;
371
374
  balancesArgs?: string;
372
375
  }
376
+ interface CurveLidoModelInfo extends Omit<CurvePlainModelInfo, 'model'> {
377
+ model: DexModel.CurveLido;
378
+ oracleAddress: string;
379
+ stethCoinIdx: number;
380
+ }
373
381
  interface CurveLendingModelInfo {
374
382
  model: DexModel.CurveLendingA;
375
383
  poolContract: string;
@@ -387,6 +395,14 @@ interface CurveMetaModelInfo extends Omit<CurvePlainModelInfo, 'isUnderlying' |
387
395
  basePoolRouteId: string;
388
396
  isCacheExists: boolean;
389
397
  }
398
+ interface CurvePlainNGModelInfo {
399
+ model: DexModel.CurveStableNG;
400
+ poolContract: string;
401
+ tokens: string[];
402
+ precision: bigint;
403
+ feeDenominator: bigint;
404
+ aPrecision: bigint;
405
+ }
390
406
  interface CurveCryptoModelInfo {
391
407
  model: DexModel.CurveCrypto;
392
408
  tokens: string[];
@@ -403,6 +419,10 @@ interface CurveCryptoModelInfo {
403
419
  poolContract: string;
404
420
  lpToken: string;
405
421
  }
422
+ interface CurveCryptoNGModelInfo extends Omit<CurveCryptoModelInfo, 'model' | 'lpToken' | 'isAPrecise' | 'feeDenominator'> {
423
+ model: DexModel.CurveTriCryptoNG;
424
+ multicallContract: string;
425
+ }
406
426
  interface CurveCryptoZapModelInfo {
407
427
  model: DexModel.CurveLendingCryptoZap;
408
428
  basePoolId: string;
@@ -510,7 +530,7 @@ interface RouteInfo {
510
530
  type RouteInfoModel = RouteInfo & {
511
531
  gas: bigint;
512
532
  isTradingAllowed: boolean;
513
- } & (UniswapV2BasedModelInfo | UniswapV3ModelInfo | PancakeV3ModelInfo | VelodromeSSModelInfo | CurvePlainModelInfo | CurveMetaModelInfo | CurveCryptoModelInfo | CurveCryptoZapModelInfo | CurveCryptoTwoZapModelInfo | CurveLendingModelInfo | DodoV2ModelInfo | SmoothyModelInfo | DMMModelInfo | BalancerWeightedModelInfo | BalancerStableModelInfo | BalancerMetaStableModelInfo | BalancerBoostedStableModelInfo | BalancerLinearModelInfo | PolyDexModelInfo | GmxDexModelInfo | SolidlyModelInfo | VelodromeV2ModelInfo | SynthetixModelInfo | {
533
+ } & (UniswapV2BasedModelInfo | UniswapV3ModelInfo | PancakeV3ModelInfo | VelodromeSSModelInfo | CurvePlainModelInfo | CurvePlainNGModelInfo | CurveMetaModelInfo | CurveCryptoModelInfo | CurveCryptoNGModelInfo | CurveCryptoZapModelInfo | CurveCryptoTwoZapModelInfo | CurveLendingModelInfo | CurveLidoModelInfo | DodoV2ModelInfo | SmoothyModelInfo | DMMModelInfo | BalancerWeightedModelInfo | BalancerStableModelInfo | BalancerMetaStableModelInfo | BalancerBoostedStableModelInfo | BalancerLinearModelInfo | PolyDexModelInfo | GmxDexModelInfo | SolidlyModelInfo | VelodromeV2ModelInfo | SynthetixModelInfo | {
514
534
  model: DexModel.Unknown;
515
535
  });
516
536
 
@@ -305,29 +305,32 @@ declare enum DexModel {
305
305
  Synapse = 9,
306
306
  CurveMetaSol = 10,
307
307
  CurveCrypto = 11,
308
- CurveLendingA = 12,
309
- CurveLendingCryptoZap = 13,
310
- CurveLendingCryptoTwoZap = 14,
311
- PolyDex = 15,
312
- FireBirdWeighted = 16,
313
- BalancerWeighted = 17,
314
- BalancerStable = 18,
315
- BalancerMetaStable = 19,
316
- BalancerBoostedStable = 20,
317
- BalancerLinear = 21,
318
- BalancerLiquidityBootstrapping = 22,
319
- Biswap = 23,
320
- DodoV1 = 24,
321
- DodoV2 = 25,
322
- Mdex = 26,
323
- Mars = 27,
324
- Smoothy = 28,
325
- Shibaswap = 29,
326
- GmxDex = 30,
327
- Solidly = 31,
328
- VelodromeV2 = 32,
329
- Synthetix = 33,
330
- Unknown = 34
308
+ CurveTriCryptoNG = 12,
309
+ CurveStableNG = 13,
310
+ CurveLendingA = 14,
311
+ CurveLendingCryptoZap = 15,
312
+ CurveLendingCryptoTwoZap = 16,
313
+ CurveLido = 17,
314
+ PolyDex = 18,
315
+ FireBirdWeighted = 19,
316
+ BalancerWeighted = 20,
317
+ BalancerStable = 21,
318
+ BalancerMetaStable = 22,
319
+ BalancerBoostedStable = 23,
320
+ BalancerLinear = 24,
321
+ BalancerLiquidityBootstrapping = 25,
322
+ Biswap = 26,
323
+ DodoV1 = 27,
324
+ DodoV2 = 28,
325
+ Mdex = 29,
326
+ Mars = 30,
327
+ Smoothy = 31,
328
+ Shibaswap = 32,
329
+ GmxDex = 33,
330
+ Solidly = 34,
331
+ VelodromeV2 = 35,
332
+ Synthetix = 36,
333
+ Unknown = 37
331
334
  }
332
335
  interface UniswapV2BasedModelInfo {
333
336
  model: DexModel.UniswapV2 | DexModel.Mdex | DexModel.Biswap | DexModel.Mars | DexModel.Shibaswap;
@@ -370,6 +373,11 @@ interface CurvePlainModelInfo {
370
373
  aPrecision?: bigint;
371
374
  balancesArgs?: string;
372
375
  }
376
+ interface CurveLidoModelInfo extends Omit<CurvePlainModelInfo, 'model'> {
377
+ model: DexModel.CurveLido;
378
+ oracleAddress: string;
379
+ stethCoinIdx: number;
380
+ }
373
381
  interface CurveLendingModelInfo {
374
382
  model: DexModel.CurveLendingA;
375
383
  poolContract: string;
@@ -387,6 +395,14 @@ interface CurveMetaModelInfo extends Omit<CurvePlainModelInfo, 'isUnderlying' |
387
395
  basePoolRouteId: string;
388
396
  isCacheExists: boolean;
389
397
  }
398
+ interface CurvePlainNGModelInfo {
399
+ model: DexModel.CurveStableNG;
400
+ poolContract: string;
401
+ tokens: string[];
402
+ precision: bigint;
403
+ feeDenominator: bigint;
404
+ aPrecision: bigint;
405
+ }
390
406
  interface CurveCryptoModelInfo {
391
407
  model: DexModel.CurveCrypto;
392
408
  tokens: string[];
@@ -403,6 +419,10 @@ interface CurveCryptoModelInfo {
403
419
  poolContract: string;
404
420
  lpToken: string;
405
421
  }
422
+ interface CurveCryptoNGModelInfo extends Omit<CurveCryptoModelInfo, 'model' | 'lpToken' | 'isAPrecise' | 'feeDenominator'> {
423
+ model: DexModel.CurveTriCryptoNG;
424
+ multicallContract: string;
425
+ }
406
426
  interface CurveCryptoZapModelInfo {
407
427
  model: DexModel.CurveLendingCryptoZap;
408
428
  basePoolId: string;
@@ -510,7 +530,7 @@ interface RouteInfo {
510
530
  type RouteInfoModel = RouteInfo & {
511
531
  gas: bigint;
512
532
  isTradingAllowed: boolean;
513
- } & (UniswapV2BasedModelInfo | UniswapV3ModelInfo | PancakeV3ModelInfo | VelodromeSSModelInfo | CurvePlainModelInfo | CurveMetaModelInfo | CurveCryptoModelInfo | CurveCryptoZapModelInfo | CurveCryptoTwoZapModelInfo | CurveLendingModelInfo | DodoV2ModelInfo | SmoothyModelInfo | DMMModelInfo | BalancerWeightedModelInfo | BalancerStableModelInfo | BalancerMetaStableModelInfo | BalancerBoostedStableModelInfo | BalancerLinearModelInfo | PolyDexModelInfo | GmxDexModelInfo | SolidlyModelInfo | VelodromeV2ModelInfo | SynthetixModelInfo | {
533
+ } & (UniswapV2BasedModelInfo | UniswapV3ModelInfo | PancakeV3ModelInfo | VelodromeSSModelInfo | CurvePlainModelInfo | CurvePlainNGModelInfo | CurveMetaModelInfo | CurveCryptoModelInfo | CurveCryptoNGModelInfo | CurveCryptoZapModelInfo | CurveCryptoTwoZapModelInfo | CurveLendingModelInfo | CurveLidoModelInfo | DodoV2ModelInfo | SmoothyModelInfo | DMMModelInfo | BalancerWeightedModelInfo | BalancerStableModelInfo | BalancerMetaStableModelInfo | BalancerBoostedStableModelInfo | BalancerLinearModelInfo | PolyDexModelInfo | GmxDexModelInfo | SolidlyModelInfo | VelodromeV2ModelInfo | SynthetixModelInfo | {
514
534
  model: DexModel.Unknown;
515
535
  });
516
536