@paraswap/dex-lib 4.6.28 → 4.6.29

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.
Files changed (129) hide show
  1. package/build/dex/ekubo/ekubo.js +1 -0
  2. package/build/dex/ekubo/ekubo.js.map +1 -1
  3. package/build/dex/idle-dao/idle-dao.d.ts +1 -0
  4. package/build/dex/idle-dao/idle-dao.js +23 -11
  5. package/build/dex/idle-dao/idle-dao.js.map +1 -1
  6. package/build/dex/maker-psm/maker-psm.d.ts +4 -41
  7. package/build/dex/maker-psm/maker-psm.js +40 -143
  8. package/build/dex/maker-psm/maker-psm.js.map +1 -1
  9. package/build/types.d.ts +1 -1
  10. package/package.json +1 -1
  11. package/build/abi/PendleRouterStatic.json +0 -19
  12. package/build/abi/apex-defi/ApexDefiFactory.abi.json +0 -1749
  13. package/build/abi/apex-defi/ApexDefiRouter.abi.json +0 -1120
  14. package/build/abi/apex-defi/ApexDefiToken.abi.json +0 -229
  15. package/build/abi/apex-defi/ApexDefiWrapper.abi.json +0 -92
  16. package/build/abi/apex-defi/ApexDefiWrapperFactory.abi.json +0 -1107
  17. package/build/abi/pangolin-v3/PangolinV3StateMulticall.abi.json +0 -796
  18. package/build/abi/pendle/pendle-deployer.abi.json +0 -520
  19. package/build/abi/pendle/pendle-oracle.abi.json +0 -413
  20. package/build/abi/ring-v2/few-wrapped-token.json +0 -587
  21. package/build/abi/ring-v2/ring-v2-factory.json +0 -125
  22. package/build/abi/ring-v2/ring-v2-pool.json +0 -461
  23. package/build/abi/ring-v2/ring-v2-router.json +0 -332
  24. package/build/abi/stabull/stabull-curve.json +0 -738
  25. package/build/abi/stabull/stabull-router.json +0 -76
  26. package/build/abi/uniswap-v4/hooks/cabalcoin-hook.abi.json +0 -682
  27. package/build/abi/uniswap-v4/hooks/fee-hook.abi.json +0 -1335
  28. package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying-factory.d.ts +0 -29
  29. package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying-factory.js +0 -153
  30. package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying-factory.js.map +0 -1
  31. package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying.d.ts +0 -40
  32. package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying.js +0 -323
  33. package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying.js.map +0 -1
  34. package/build/dex/aave-pt-to-underlying/config.d.ts +0 -3
  35. package/build/dex/aave-pt-to-underlying/config.js +0 -24
  36. package/build/dex/aave-pt-to-underlying/config.js.map +0 -1
  37. package/build/dex/aave-pt-to-underlying/constants.d.ts +0 -2
  38. package/build/dex/aave-pt-to-underlying/constants.js +0 -6
  39. package/build/dex/aave-pt-to-underlying/constants.js.map +0 -1
  40. package/build/dex/aave-pt-to-underlying/types.d.ts +0 -24
  41. package/build/dex/aave-pt-to-underlying/types.js +0 -3
  42. package/build/dex/aave-pt-to-underlying/types.js.map +0 -1
  43. package/build/dex/aave-pt-to-usdc/aave-pt-to-usdc.d.ts +0 -39
  44. package/build/dex/aave-pt-to-usdc/aave-pt-to-usdc.js +0 -244
  45. package/build/dex/aave-pt-to-usdc/aave-pt-to-usdc.js.map +0 -1
  46. package/build/dex/aave-pt-to-usdc/config.d.ts +0 -3
  47. package/build/dex/aave-pt-to-usdc/config.js +0 -47
  48. package/build/dex/aave-pt-to-usdc/config.js.map +0 -1
  49. package/build/dex/aave-pt-to-usdc/constants.d.ts +0 -2
  50. package/build/dex/aave-pt-to-usdc/constants.js +0 -6
  51. package/build/dex/aave-pt-to-usdc/constants.js.map +0 -1
  52. package/build/dex/aave-pt-to-usdc/types.d.ts +0 -22
  53. package/build/dex/aave-pt-to-usdc/types.js +0 -3
  54. package/build/dex/aave-pt-to-usdc/types.js.map +0 -1
  55. package/build/dex/apex-defi/apex-defi-factory.d.ts +0 -26
  56. package/build/dex/apex-defi/apex-defi-factory.js +0 -53
  57. package/build/dex/apex-defi/apex-defi-factory.js.map +0 -1
  58. package/build/dex/apex-defi/apex-defi-pool.d.ts +0 -55
  59. package/build/dex/apex-defi/apex-defi-pool.js +0 -247
  60. package/build/dex/apex-defi/apex-defi-pool.js.map +0 -1
  61. package/build/dex/apex-defi/apex-defi-wrapper-factory.d.ts +0 -57
  62. package/build/dex/apex-defi/apex-defi-wrapper-factory.js +0 -250
  63. package/build/dex/apex-defi/apex-defi-wrapper-factory.js.map +0 -1
  64. package/build/dex/apex-defi/apex-defi.d.ts +0 -97
  65. package/build/dex/apex-defi/apex-defi.js +0 -1021
  66. package/build/dex/apex-defi/apex-defi.js.map +0 -1
  67. package/build/dex/apex-defi/config.d.ts +0 -4
  68. package/build/dex/apex-defi/config.js +0 -138
  69. package/build/dex/apex-defi/config.js.map +0 -1
  70. package/build/dex/apex-defi/types.d.ts +0 -32
  71. package/build/dex/apex-defi/types.js +0 -3
  72. package/build/dex/apex-defi/types.js.map +0 -1
  73. package/build/dex/apex-defi/utils.d.ts +0 -46
  74. package/build/dex/apex-defi/utils.js +0 -133
  75. package/build/dex/apex-defi/utils.js.map +0 -1
  76. package/build/dex/miro-migrator/miro-migrator-state.d.ts +0 -27
  77. package/build/dex/miro-migrator/miro-migrator-state.js +0 -89
  78. package/build/dex/miro-migrator/miro-migrator-state.js.map +0 -1
  79. package/build/dex/stabull/config.d.ts +0 -3
  80. package/build/dex/stabull/config.js +0 -177
  81. package/build/dex/stabull/config.js.map +0 -1
  82. package/build/dex/stabull/stabull-pool.d.ts +0 -46
  83. package/build/dex/stabull/stabull-pool.js +0 -113
  84. package/build/dex/stabull/stabull-pool.js.map +0 -1
  85. package/build/dex/stabull/stabull.d.ts +0 -55
  86. package/build/dex/stabull/stabull.js +0 -286
  87. package/build/dex/stabull/stabull.js.map +0 -1
  88. package/build/dex/stabull/types.d.ts +0 -21
  89. package/build/dex/stabull/types.js +0 -3
  90. package/build/dex/stabull/types.js.map +0 -1
  91. package/build/dex/uniswap-v3/forks/pangolin-v3/utils.d.ts +0 -4
  92. package/build/dex/uniswap-v3/forks/pangolin-v3/utils.js +0 -56
  93. package/build/dex/uniswap-v3/forks/pangolin-v3/utils.js.map +0 -1
  94. package/build/dex/uniswap-v4/hooks/cabalcoin-hook/cabalcoin-hook-pool.d.ts +0 -7
  95. package/build/dex/uniswap-v4/hooks/cabalcoin-hook/cabalcoin-hook-pool.js +0 -28
  96. package/build/dex/uniswap-v4/hooks/cabalcoin-hook/cabalcoin-hook-pool.js.map +0 -1
  97. package/build/dex/uniswap-v4/hooks/cabalcoin-hook/types.d.ts +0 -0
  98. package/build/dex/uniswap-v4/hooks/cabalcoin-hook/types.js +0 -2
  99. package/build/dex/uniswap-v4/hooks/cabalcoin-hook/types.js.map +0 -1
  100. package/build/dex/uniswap-v4/hooks/fee-hook/fee-hook-pool.d.ts +0 -7
  101. package/build/dex/uniswap-v4/hooks/fee-hook/fee-hook-pool.js +0 -28
  102. package/build/dex/uniswap-v4/hooks/fee-hook/fee-hook-pool.js.map +0 -1
  103. package/build/dex/uniswap-v4/hooks/fee-hook/types.d.ts +0 -0
  104. package/build/dex/uniswap-v4/hooks/fee-hook/types.js +0 -2
  105. package/build/dex/uniswap-v4/hooks/fee-hook/types.js.map +0 -1
  106. package/build/dex/uniswap-v4/hooks/index.d.ts +0 -2
  107. package/build/dex/uniswap-v4/hooks/index.js +0 -8
  108. package/build/dex/uniswap-v4/hooks/index.js.map +0 -1
  109. package/build/dex/usdc-transmuter/usdc-transmuter-pool.d.ts +0 -26
  110. package/build/dex/usdc-transmuter/usdc-transmuter-pool.js +0 -75
  111. package/build/dex/usdc-transmuter/usdc-transmuter-pool.js.map +0 -1
  112. package/build/dex/usual/usual-usdc-usdc.d.ts +0 -17
  113. package/build/dex/usual/usual-usdc-usdc.js +0 -59
  114. package/build/dex/usual/usual-usdc-usdc.js.map +0 -1
  115. package/build/dex/yo/config.d.ts +0 -3
  116. package/build/dex/yo/config.js +0 -21
  117. package/build/dex/yo/config.js.map +0 -1
  118. package/build/dex/yo/types.d.ts +0 -13
  119. package/build/dex/yo/types.js +0 -3
  120. package/build/dex/yo/types.js.map +0 -1
  121. package/build/dex/yo/yo-pool.d.ts +0 -13
  122. package/build/dex/yo/yo-pool.js +0 -26
  123. package/build/dex/yo/yo-pool.js.map +0 -1
  124. package/build/dex/yo/yo.d.ts +0 -39
  125. package/build/dex/yo/yo.js +0 -248
  126. package/build/dex/yo/yo.js.map +0 -1
  127. package/build/implementations/api-paraswap-sdk.d.ts +0 -25
  128. package/build/implementations/api-paraswap-sdk.js +0 -102
  129. package/build/implementations/api-paraswap-sdk.js.map +0 -1
@@ -1,97 +0,0 @@
1
- import { AsyncOrSync } from 'ts-essentials';
2
- import { Token, Address, ExchangePrices, PoolPrices, AdapterExchangeParam, SimpleExchangeParam, PoolLiquidity, Logger, NumberAsString, TxInfo, DexExchangeParam } from '../../types';
3
- import { SwapSide, Network } from '../../constants';
4
- import { IDex } from '../../dex/idex';
5
- import { IDexHelper } from '../../dex-helper/idex-helper';
6
- import { ApexDefiData } from './types';
7
- import { SimpleExchange } from '../simple-exchange';
8
- import { ApexDefiEventPool } from './apex-defi-pool';
9
- import { Interface } from '@ethersproject/abi';
10
- import { ApexDefiFactory, OnPoolCreatedCallback } from './apex-defi-factory';
11
- import { ApexDefiWrapperFactory, OnWrapperCreatedCallback } from './apex-defi-wrapper-factory';
12
- export declare class ApexDefi extends SimpleExchange implements IDex<ApexDefiData> {
13
- readonly network: Network;
14
- readonly dexKey: string;
15
- readonly dexHelper: IDexHelper;
16
- readonly eventPools: Record<string, ApexDefiEventPool | null>;
17
- protected supportedTokensMap: {
18
- [address: string]: Token;
19
- };
20
- protected readonly factory: ApexDefiFactory;
21
- protected readonly wrapperFactory: ApexDefiWrapperFactory;
22
- readonly routerIface: Interface;
23
- readonly erc20Iface: Interface;
24
- readonly tokenIface: Interface;
25
- readonly factoryIface: Interface;
26
- readonly wrapperFactoryIface: Interface;
27
- readonly wrapperIface: Interface;
28
- feeFactor: number;
29
- readonly hasConstantPriceLargeAmounts = false;
30
- readonly needWrapNative = false;
31
- readonly isFeeOnTransferSupported = false;
32
- static dexKeysWithNetwork: {
33
- key: string;
34
- networks: Network[];
35
- }[];
36
- logger: Logger;
37
- constructor(network: Network, dexKey: string, dexHelper: IDexHelper);
38
- protected getFactoryInstance(): ApexDefiFactory;
39
- protected getWrapperFactoryInstance(): ApexDefiWrapperFactory;
40
- protected onPoolCreated(): OnPoolCreatedCallback;
41
- protected onWrapperCreated(): OnWrapperCreatedCallback;
42
- initializePricing(blockNumber: number): Promise<void>;
43
- getAdapters(side: SwapSide): {
44
- name: string;
45
- index: number;
46
- }[] | null;
47
- getPoolIdentifiers(srcToken: Token, destToken: Token, side: SwapSide, blockNumber: number): Promise<string[]>;
48
- protected getPoolIdentifier(pairAddress: Address): string;
49
- protected getPoolAddress(srcToken: Token, destToken: Token): string;
50
- getPricesVolume(srcToken: Token, destToken: Token, amounts: bigint[], side: SwapSide, blockNumber: number, limitPools?: string[]): Promise<null | ExchangePrices<ApexDefiData>>;
51
- private getDirectAVAXPairPrices;
52
- private getCrossPairTokenToTokenPrices;
53
- private getOrDiscoverPool;
54
- /**
55
- * Discover and add a pool for a given token pair
56
- * This method is called when a pool is not found in the eventPools map
57
- */
58
- private discoverPool;
59
- /**
60
- * Calculate the output amount for a sell (exact input) swap
61
- * Uses the constant product formula: amountOut = (amountIn * reserveOut) / (reserveIn + amountIn)
62
- */
63
- private getSellPrice;
64
- /**
65
- * Calculate the input amount for a buy (exact output) swap
66
- * Uses the constant product formula: amountIn = (amountOut * reserveIn * feeFactor) / ((reserveOut - amountOut) * (feeFactor - totalFee))
67
- */
68
- private getBuyPrice;
69
- private calculateCrossPairSellPrice;
70
- private calculateCrossPairBuyPrice;
71
- private calculatePrices;
72
- getCalldataGasCost(_poolPrices: PoolPrices<ApexDefiData>): number | number[];
73
- getAdapterParam(_srcToken: string, _destToken: string, _srcAmount: string, _destAmount: string, _data: ApexDefiData, _side: SwapSide): AdapterExchangeParam;
74
- getDexParam(srcToken: Address, destToken: Address, srcAmount: NumberAsString, destAmount: NumberAsString, recipient: Address, data: ApexDefiData, _side: SwapSide): DexExchangeParam;
75
- private getDirectTokenSwap;
76
- private getRouterSwap;
77
- getSimpleParam(srcToken: Address, destToken: Address, srcAmount: NumberAsString, destAmount: NumberAsString, data: ApexDefiData, _side: SwapSide): Promise<SimpleExchangeParam>;
78
- getDirectParam(_srcToken: Address, _destToken: Address, _srcAmount: NumberAsString, _destAmount: NumberAsString, _expectedAmount: NumberAsString, _data: ApexDefiData, _side: SwapSide, _permit: string, _uuid: string, _feePercent: NumberAsString, _deadline: NumberAsString, _partner: string, _beneficiary: string, _contractMethod: string): TxInfo<null>;
79
- getDirectParamV6(_srcToken: Address, _destToken: Address, _fromAmount: NumberAsString, _toAmount: NumberAsString, _quotedAmount: NumberAsString, _data: ApexDefiData, _side: SwapSide, _permit: string, _uuid: string, _partnerAndFee: string, _beneficiary: string, _blockNumber: number, _contractMethod: string): TxInfo<null>;
80
- static getDirectFunctionName(): string[];
81
- static getDirectFunctionNameV6(): string[];
82
- updatePoolState(): Promise<void>;
83
- getTopPoolsForToken(tokenAddress: Address, limit: number): Promise<PoolLiquidity[]>;
84
- private fetchAndInitPool;
85
- releaseResources(): AsyncOrSync<void>;
86
- protected _getLoweredAddresses(srcToken: Token, destToken: Token): string[];
87
- fixPathForRouter(path: Address[]): Address[];
88
- private getERC314Token;
89
- private convertAmountToERC314;
90
- private convertAmountFromERC314;
91
- private convertAmountsToERC314;
92
- private convertPricesFromERC314;
93
- private isWrapperOperation;
94
- private getWrapperPrices;
95
- private getWrapperSwap;
96
- private getWrapperSimpleParam;
97
- }