@apex_labs/sdk 0.1.0 → 0.1.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.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { BigintIsh, Token, Price, CurrencyAmount, Percent, Currency as Currency$1, TradeType, NativeCurrency } from '@pancakeswap/sdk';
1
+ import { BigintIsh as BigintIsh$1, Token, Price, CurrencyAmount, Percent, Currency as Currency$1, TradeType, NativeCurrency } from '@pancakeswap/sdk';
2
2
  import { Hash, Address, Hex } from 'viem';
3
3
  import * as _pancakeswap_swap_sdk_core from '@pancakeswap/swap-sdk-core';
4
- import { Currency, Token as Token$1, Price as Price$1, BigintIsh as BigintIsh$1, CurrencyAmount as CurrencyAmount$1, Percent as Percent$1, Fraction, TradeType as TradeType$1 } from '@pancakeswap/swap-sdk-core';
4
+ import { Currency, Token as Token$1, Price as Price$1, BigintIsh as BigintIsh$2, CurrencyAmount as CurrencyAmount$1, Percent as Percent$1, Fraction, TradeType as TradeType$1 } from '@pancakeswap/swap-sdk-core';
5
5
 
6
6
  /**
7
7
  * To compute Pool address use DEPLOYER_ADDRESSES instead
@@ -113,8 +113,8 @@ declare const TICK_SPACINGS: {
113
113
 
114
114
  interface TickConstructorArgs {
115
115
  index: number;
116
- liquidityGross: BigintIsh;
117
- liquidityNet: BigintIsh;
116
+ liquidityGross: BigintIsh$1;
117
+ liquidityNet: BigintIsh$1;
118
118
  }
119
119
  declare class Tick {
120
120
  readonly index: number;
@@ -132,7 +132,7 @@ interface TickDataProvider {
132
132
  * @param tick the tick to load
133
133
  */
134
134
  getTick(tick: number): Promise<{
135
- liquidityNet: BigintIsh;
135
+ liquidityNet: BigintIsh$1;
136
136
  }>;
137
137
  /**
138
138
  * Return the next tick that is initialized within a single word
@@ -149,7 +149,7 @@ interface TickDataProvider {
149
149
  declare class NoTickDataProvider implements TickDataProvider {
150
150
  private static ERROR_MESSAGE;
151
151
  getTick(_tick: number): Promise<{
152
- liquidityNet: BigintIsh;
152
+ liquidityNet: BigintIsh$1;
153
153
  }>;
154
154
  nextInitializedTickWithinOneWord(_tick: number, _lte: boolean, _tickSpacing: number): Promise<[number, boolean]>;
155
155
  }
@@ -179,7 +179,7 @@ declare class Pool {
179
179
  * @param tickCurrent The current tick of the pool
180
180
  * @param ticks The current state of the pool ticks or a data provider that can return tick data
181
181
  */
182
- constructor(tokenA: Token, tokenB: Token, fee: FeeAmount, sqrtRatioX96: BigintIsh, liquidity: BigintIsh, tickCurrent: number, ticks?: TickDataProvider | (Tick | TickConstructorArgs)[]);
182
+ constructor(tokenA: Token, tokenB: Token, fee: FeeAmount, sqrtRatioX96: BigintIsh$1, liquidity: BigintIsh$1, tickCurrent: number, ticks?: TickDataProvider | (Tick | TickConstructorArgs)[]);
183
183
  /**
184
184
  * Returns true if the token is either token0 or token1
185
185
  * @param token The token to check
@@ -243,7 +243,7 @@ interface PositionConstructorArgs {
243
243
  pool: Pool;
244
244
  tickLower: number;
245
245
  tickUpper: number;
246
- liquidity: BigintIsh;
246
+ liquidity: BigintIsh$1;
247
247
  }
248
248
  /**
249
249
  * Represents a position on a Pancake V3 Pool
@@ -330,8 +330,8 @@ declare class Position {
330
330
  pool: Pool;
331
331
  tickLower: number;
332
332
  tickUpper: number;
333
- amount0: BigintIsh;
334
- amount1: BigintIsh;
333
+ amount0: BigintIsh$1;
334
+ amount1: BigintIsh$1;
335
335
  useFullPrecision: boolean;
336
336
  }): Position;
337
337
  /**
@@ -348,7 +348,7 @@ declare class Position {
348
348
  pool: Pool;
349
349
  tickLower: number;
350
350
  tickUpper: number;
351
- amount0: BigintIsh;
351
+ amount0: BigintIsh$1;
352
352
  useFullPrecision: boolean;
353
353
  }): Position;
354
354
  /**
@@ -363,7 +363,7 @@ declare class Position {
363
363
  pool: Pool;
364
364
  tickLower: number;
365
365
  tickUpper: number;
366
- amount1: BigintIsh;
366
+ amount1: BigintIsh$1;
367
367
  }): Position;
368
368
  }
369
369
 
@@ -617,8 +617,8 @@ declare class TickListDataProvider implements TickDataProvider {
617
617
  private ticks;
618
618
  constructor(ticks: (Tick | TickConstructorArgs)[]);
619
619
  getTick(tick: number): Promise<{
620
- liquidityNet: BigintIsh;
621
- liquidityGross: BigintIsh;
620
+ liquidityNet: BigintIsh$1;
621
+ liquidityGross: BigintIsh$1;
622
622
  }>;
623
623
  nextInitializedTickWithinOneWord(tick: number, lte: boolean, tickSpacing: number): Promise<[number, boolean]>;
624
624
  }
@@ -626,11 +626,11 @@ declare class TickListDataProvider implements TickDataProvider {
626
626
  /**
627
627
  * Returns the current price of the given tokens
628
628
  */
629
- declare const getCurrency0Price: ([currency0, currency1]: [Currency, Currency], currentSqrtRatioX96: BigintIsh) => Price<Currency, Currency>;
629
+ declare const getCurrency0Price: ([currency0, currency1]: [Currency, Currency], currentSqrtRatioX96: BigintIsh$1) => Price<Currency, Currency>;
630
630
  /**
631
631
  * Returns the current price of the given tokens
632
632
  */
633
- declare const getCurrency1Price: ([currency0, currency1]: [Currency, Currency], currentSqrtRatioX96: BigintIsh) => Price<Currency, Currency>;
633
+ declare const getCurrency1Price: ([currency0, currency1]: [Currency, Currency], currentSqrtRatioX96: BigintIsh$1) => Price<Currency, Currency>;
634
634
 
635
635
  type PoolState = {
636
636
  currency0: Currency;
@@ -646,8 +646,8 @@ declare const getPool: ({ currencyA, currencyB, fee, sqrtRatioX96, liquidity, ti
646
646
  currencyA: Currency;
647
647
  currencyB: Currency;
648
648
  fee: number;
649
- sqrtRatioX96: BigintIsh$1;
650
- liquidity: BigintIsh$1;
649
+ sqrtRatioX96: BigintIsh$2;
650
+ liquidity: BigintIsh$2;
651
651
  tickCurrent: number;
652
652
  tickSpacing: number;
653
653
  ticks?: TickDataProvider | (Tick | TickConstructorArgs)[];
@@ -706,7 +706,7 @@ interface MethodParameters {
706
706
  * @param bigintIsh
707
707
  * @returns The hex encoded calldata
708
708
  */
709
- declare function toHex(bigintIsh: BigintIsh): Hex;
709
+ declare function toHex(bigintIsh: BigintIsh$1): Hex;
710
710
 
711
711
  /**
712
712
  * Computes a pool address
@@ -738,7 +738,7 @@ declare function encodeRouteToPath(route: Route<Currency, Currency>, exactOutput
738
738
  * @param amount0 The denominator amount i.e., the amount of token0
739
739
  * @returns The sqrt ratio
740
740
  */
741
- declare function encodeSqrtRatioX96(amount1: BigintIsh$1, amount0: BigintIsh$1): bigint;
741
+ declare function encodeSqrtRatioX96(amount1: BigintIsh$2, amount0: BigintIsh$2): bigint;
742
742
 
743
743
  declare abstract class FullMath {
744
744
  /**
@@ -775,7 +775,7 @@ declare abstract class LiquidityMath {
775
775
  * @param amount0 The token0 amount
776
776
  * @returns liquidity for amount0, imprecise
777
777
  */
778
- declare function maxLiquidityForAmount0Imprecise(sqrtRatioAX96: bigint, sqrtRatioBX96: bigint, amount0: BigintIsh): bigint;
778
+ declare function maxLiquidityForAmount0Imprecise(sqrtRatioAX96: bigint, sqrtRatioBX96: bigint, amount0: BigintIsh$1): bigint;
779
779
  /**
780
780
  * Returns a precise maximum amount of liquidity received for a given amount of token 0 by dividing by Q64 instead of Q96 in the intermediate step,
781
781
  * and shifting the subtracted ratio left by 32 bits.
@@ -784,7 +784,7 @@ declare function maxLiquidityForAmount0Imprecise(sqrtRatioAX96: bigint, sqrtRati
784
784
  * @param amount0 The token0 amount
785
785
  * @returns liquidity for amount0, precise
786
786
  */
787
- declare function maxLiquidityForAmount0Precise(sqrtRatioAX96: bigint, sqrtRatioBX96: bigint, amount0: BigintIsh): bigint;
787
+ declare function maxLiquidityForAmount0Precise(sqrtRatioAX96: bigint, sqrtRatioBX96: bigint, amount0: BigintIsh$1): bigint;
788
788
  /**
789
789
  * Computes the maximum amount of liquidity received for a given amount of token1
790
790
  * @param sqrtRatioAX96 The price at the lower tick boundary
@@ -792,7 +792,7 @@ declare function maxLiquidityForAmount0Precise(sqrtRatioAX96: bigint, sqrtRatioB
792
792
  * @param amount1 The token1 amount
793
793
  * @returns liquidity for amount1
794
794
  */
795
- declare function maxLiquidityForAmount1(sqrtRatioAX96: bigint, sqrtRatioBX96: bigint, amount1: BigintIsh): bigint;
795
+ declare function maxLiquidityForAmount1(sqrtRatioAX96: bigint, sqrtRatioBX96: bigint, amount1: BigintIsh$1): bigint;
796
796
  /**
797
797
  * Computes the maximum amount of liquidity received for a given amount of token0, token1,
798
798
  * and the prices at the tick boundaries.
@@ -804,7 +804,7 @@ declare function maxLiquidityForAmount1(sqrtRatioAX96: bigint, sqrtRatioBX96: bi
804
804
  * @param useFullPrecision if false, liquidity will be maximized according to what the router can calculate,
805
805
  * not what core can theoretically support
806
806
  */
807
- declare function maxLiquidityForAmounts(sqrtRatioCurrentX96: bigint, sqrtRatioAX96: bigint, sqrtRatioBX96: bigint, amount0: BigintIsh, amount1: BigintIsh, useFullPrecision: boolean): bigint;
807
+ declare function maxLiquidityForAmounts(sqrtRatioCurrentX96: bigint, sqrtRatioAX96: bigint, sqrtRatioBX96: bigint, amount0: BigintIsh$1, amount1: BigintIsh$1, useFullPrecision: boolean): bigint;
808
808
 
809
809
  declare function mostSignificantBit(x: bigint): number;
810
810
 
@@ -1017,15 +1017,15 @@ interface StandardPermitArguments {
1017
1017
  v: 0 | 1 | 27 | 28;
1018
1018
  r: Hash;
1019
1019
  s: Hash;
1020
- amount: BigintIsh$1;
1021
- deadline: BigintIsh$1;
1020
+ amount: BigintIsh$2;
1021
+ deadline: BigintIsh$2;
1022
1022
  }
1023
1023
  interface AllowedPermitArguments {
1024
1024
  v: 0 | 1 | 27 | 28;
1025
1025
  r: Hash;
1026
1026
  s: Hash;
1027
- nonce: BigintIsh$1;
1028
- expiry: BigintIsh$1;
1027
+ nonce: BigintIsh$2;
1028
+ expiry: BigintIsh$2;
1029
1029
  }
1030
1030
  type PermitOptions = StandardPermitArguments | AllowedPermitArguments;
1031
1031
  declare abstract class SelfPermit {
@@ -1172,7 +1172,7 @@ interface IncreaseSpecificOptions {
1172
1172
  /**
1173
1173
  * Indicates the ID of the position to increase liquidity for.
1174
1174
  */
1175
- tokenId: BigintIsh;
1175
+ tokenId: BigintIsh$1;
1176
1176
  }
1177
1177
  /**
1178
1178
  * Options for producing the calldata to add liquidity.
@@ -1185,7 +1185,7 @@ interface CommonAddLiquidityOptions {
1185
1185
  /**
1186
1186
  * When the transaction expires, in epoch seconds.
1187
1187
  */
1188
- deadline: BigintIsh;
1188
+ deadline: BigintIsh$1;
1189
1189
  /**
1190
1190
  * Whether to spend ether. If true, one of the pool tokens must be WETH, by default false
1191
1191
  */
@@ -1214,7 +1214,7 @@ interface SafeTransferOptions {
1214
1214
  /**
1215
1215
  * The id of the token being sent.
1216
1216
  */
1217
- tokenId: BigintIsh;
1217
+ tokenId: BigintIsh$1;
1218
1218
  /**
1219
1219
  * The optional parameter that passes data to the `onERC721Received` call for the staker
1220
1220
  */
@@ -1225,7 +1225,7 @@ interface CollectOptions {
1225
1225
  /**
1226
1226
  * Indicates the ID of the position to collect for.
1227
1227
  */
1228
- tokenId: BigintIsh;
1228
+ tokenId: BigintIsh$1;
1229
1229
  /**
1230
1230
  * Expected value of tokensOwed0, including as-of-yet-unaccounted-for fees/liquidity value to be burned
1231
1231
  */
@@ -1243,7 +1243,7 @@ interface NFTPermitOptions {
1243
1243
  v: 0 | 1 | 27 | 28;
1244
1244
  r: `0x${string}`;
1245
1245
  s: `0x${string}`;
1246
- deadline: BigintIsh;
1246
+ deadline: BigintIsh$1;
1247
1247
  spender: string;
1248
1248
  }
1249
1249
  /**
@@ -1253,7 +1253,7 @@ interface RemoveLiquidityOptions {
1253
1253
  /**
1254
1254
  * The ID of the token to exit
1255
1255
  */
1256
- tokenId: BigintIsh;
1256
+ tokenId: BigintIsh$1;
1257
1257
  /**
1258
1258
  * The percentage of position liquidity to exit.
1259
1259
  */
@@ -1265,7 +1265,7 @@ interface RemoveLiquidityOptions {
1265
1265
  /**
1266
1266
  * When the transaction expires, in epoch seconds.
1267
1267
  */
1268
- deadline: BigintIsh;
1268
+ deadline: BigintIsh$1;
1269
1269
  /**
1270
1270
  * Whether the NFT should be burned if the entire position is being exited, by default false.
1271
1271
  */
@@ -2243,11 +2243,11 @@ declare abstract class NonfungiblePositionManager {
2243
2243
  }
2244
2244
 
2245
2245
  interface WidthDrawOptions {
2246
- tokenId: BigintIsh;
2246
+ tokenId: BigintIsh$1;
2247
2247
  to: string;
2248
2248
  }
2249
2249
  interface HarvestOptions {
2250
- tokenId: BigintIsh;
2250
+ tokenId: BigintIsh$1;
2251
2251
  to: string;
2252
2252
  }
2253
2253
  declare abstract class MasterChefV3 {
@@ -3633,7 +3633,7 @@ interface QuoteOptions {
3633
3633
  /**
3634
3634
  * The optional price limit for the trade.
3635
3635
  */
3636
- sqrtPriceLimitX96?: BigintIsh$1;
3636
+ sqrtPriceLimitX96?: BigintIsh$2;
3637
3637
  /**
3638
3638
  * The optional quoter interface to use
3639
3639
  */
@@ -4054,11 +4054,11 @@ interface IncentiveKey {
4054
4054
  /**
4055
4055
  * The time when the incentive program begins.
4056
4056
  */
4057
- startTime: BigintIsh;
4057
+ startTime: BigintIsh$1;
4058
4058
  /**
4059
4059
  * The time that the incentive program ends.
4060
4060
  */
4061
- endTime: BigintIsh;
4061
+ endTime: BigintIsh$1;
4062
4062
  /**
4063
4063
  * The address which receives any remaining reward tokens at `endTime`.
4064
4064
  */
@@ -4071,7 +4071,7 @@ interface ClaimOptions {
4071
4071
  /**
4072
4072
  * The id of the NFT
4073
4073
  */
4074
- tokenId: BigintIsh;
4074
+ tokenId: BigintIsh$1;
4075
4075
  /**
4076
4076
  * Address to send rewards to.
4077
4077
  */
@@ -4079,7 +4079,7 @@ interface ClaimOptions {
4079
4079
  /**
4080
4080
  * The amount of `rewardToken` to claim. 0 claims all.
4081
4081
  */
4082
- amount?: BigintIsh;
4082
+ amount?: BigintIsh$1;
4083
4083
  }
4084
4084
  /**
4085
4085
  * Options to specify when withdrawing a position.
@@ -4696,7 +4696,7 @@ interface SwapOptions {
4696
4696
  /**
4697
4697
  * When the transaction expires, in epoch seconds.
4698
4698
  */
4699
- deadline: BigintIsh;
4699
+ deadline: BigintIsh$1;
4700
4700
  /**
4701
4701
  * The optional permit parameters for spending the input.
4702
4702
  */
@@ -4704,7 +4704,7 @@ interface SwapOptions {
4704
4704
  /**
4705
4705
  * The optional price limit for the trade.
4706
4706
  */
4707
- sqrtPriceLimitX96?: BigintIsh;
4707
+ sqrtPriceLimitX96?: BigintIsh$1;
4708
4708
  /**
4709
4709
  * Optional information for taking a fee on output.
4710
4710
  */
@@ -10810,7 +10810,7 @@ interface ApexDeploymentConfig {
10810
10810
  }
10811
10811
 
10812
10812
  declare const APEX_CL_POOL_INIT_CODE_HASH = "0x729244f9ae271982f4db70bf3f8e3365ebd0885c52025b09324c6c1f79aae32c";
10813
- declare enum ApexFeeAmount {
10813
+ declare enum CLFeeAmount {
10814
10814
  FEE_0_01 = 100,
10815
10815
  FEE_0_02 = 200,
10816
10816
  FEE_0_05 = 500,
@@ -10820,42 +10820,50 @@ declare enum ApexFeeAmount {
10820
10820
  FEE_1_00 = 10000,
10821
10821
  FEE_2_00 = 20000
10822
10822
  }
10823
- declare const APEX_CL_TICK_SPACINGS: Record<ApexFeeAmount, number>;
10823
+ declare const CL_TICK_SPACINGS: Record<CLFeeAmount, number>;
10824
10824
  declare const APEX_CL_PROTOCOL_FEE_DENOMINATOR = 10000n;
10825
- declare function installApexFeeTiers(): void;
10826
- declare function isApexCLFeeAmount(_fee: number): _fee is ApexFeeAmount;
10827
- declare function toApexFeeAmount(_fee: number): ApexFeeAmount;
10828
- declare function asPancakeFeeAmount(_fee: ApexFeeAmount | number): FeeAmount;
10829
- declare function getApexTickSpacing(_fee: ApexFeeAmount | number): number;
10830
- interface CreateApexPoolParams {
10825
+ declare function installCLFeeTiers(): void;
10826
+ declare function isCLFeeAmount(_fee: number): _fee is CLFeeAmount;
10827
+ declare function toCLFeeAmount(_fee: number): CLFeeAmount;
10828
+ declare function asPancakeFeeAmount(_fee: CLFeeAmount | number): FeeAmount;
10829
+ declare function getCLTickSpacing(_fee: CLFeeAmount | number): number;
10830
+ interface CreateCLPoolParams {
10831
10831
  tokenA: Token;
10832
10832
  tokenB: Token;
10833
- fee: ApexFeeAmount | number;
10833
+ fee: CLFeeAmount | number;
10834
10834
  sqrtRatioX96: bigint | string | number;
10835
10835
  liquidity: bigint | string | number;
10836
10836
  tickCurrent: number;
10837
10837
  ticks?: TickDataProvider;
10838
10838
  }
10839
- declare function createApexPool(_params: CreateApexPoolParams): Pool;
10839
+ declare function createCLPool(_params: CreateCLPoolParams): Pool;
10840
10840
  interface ComputeCLPoolAddressParams {
10841
10841
  config: Pick<ApexDeploymentConfig, 'clPoolDeployer' | 'clInitCodeHash'>;
10842
10842
  tokenA: Token;
10843
10843
  tokenB: Token;
10844
- fee: ApexFeeAmount | number;
10844
+ fee: CLFeeAmount | number;
10845
10845
  }
10846
10846
  declare function computeCLPoolAddress(_params: ComputeCLPoolAddressParams): Address;
10847
+
10848
+ declare const APEX_CL_TICK_SPACINGS: Record<CLFeeAmount, number>;
10849
+ declare const installApexFeeTiers: typeof installCLFeeTiers;
10850
+ declare const isApexCLFeeAmount: typeof isCLFeeAmount;
10851
+ declare const toApexFeeAmount: typeof toCLFeeAmount;
10852
+ declare const getApexTickSpacing: typeof getCLTickSpacing;
10853
+ type CreateApexPoolParams = CreateCLPoolParams;
10854
+ declare const createApexPool: typeof createCLPool;
10847
10855
  type ComputeApexCLPoolAddressParams = ComputeCLPoolAddressParams;
10848
10856
  declare const computeApexCLPoolAddress: typeof computeCLPoolAddress;
10849
10857
 
10850
10858
  declare const APEX_CLASSIC_FEE_DENOMINATOR = 1000000n;
10851
- declare const APEX_CLASSIC_PAIR_INIT_CODE_HASH = "0x52603620cbb6c480ae58578ba02db722991cff92ab57c1aba88ef7c789ed4f67";
10859
+ declare const APEX_CLASSIC_PAIR_INIT_CODE_HASH = "0xf6b4be77658ce9f596d71610cf47612241d96a56c091415efa2ec2cdbc7c719c";
10852
10860
  interface ComputeClassicPoolAddressParams {
10853
10861
  config: Pick<ApexDeploymentConfig, 'classicFactory' | 'classicPairInitCodeHash'>;
10854
10862
  tokenA: Address;
10855
10863
  tokenB: Address;
10856
10864
  stable: boolean;
10857
10865
  }
10858
- interface ApexClassicQuoteParams {
10866
+ interface ClassicQuoteParams {
10859
10867
  amountIn: bigint | string | number;
10860
10868
  tokenIn: Address;
10861
10869
  token0: Address;
@@ -10873,111 +10881,129 @@ declare function computeCreate2Address(_from: Address, _salt: Hex, _bytecodeHash
10873
10881
  declare function computeClassicPoolAddress(_params: ComputeClassicPoolAddressParams): Address;
10874
10882
  type ComputeApexClassicPairAddressParams = ComputeClassicPoolAddressParams;
10875
10883
  declare const computeApexClassicPairAddress: typeof computeClassicPoolAddress;
10876
- declare function quoteApexClassicExactInput(_params: ApexClassicQuoteParams): bigint;
10884
+ declare function quoteClassicExactInput(_params: ClassicQuoteParams): bigint;
10885
+ type ApexClassicQuoteParams = ClassicQuoteParams;
10886
+ declare const quoteApexClassicExactInput: typeof quoteClassicExactInput;
10877
10887
 
10878
- type ApexBigintIsh = bigint | string | number;
10879
- interface ApexMethodParameters {
10888
+ type BigintIsh = bigint | string | number;
10889
+ interface CallParameters {
10880
10890
  calldata: Hex;
10881
10891
  value: Hex;
10882
10892
  }
10883
- interface ApexCLMintParams {
10893
+ interface CLMintParams {
10884
10894
  token0: Address;
10885
10895
  token1: Address;
10886
10896
  fee: number;
10887
10897
  tickLower: number;
10888
10898
  tickUpper: number;
10889
- amount0Desired: ApexBigintIsh;
10890
- amount1Desired: ApexBigintIsh;
10891
- amount0Min: ApexBigintIsh;
10892
- amount1Min: ApexBigintIsh;
10899
+ amount0Desired: BigintIsh;
10900
+ amount1Desired: BigintIsh;
10901
+ amount0Min: BigintIsh;
10902
+ amount1Min: BigintIsh;
10893
10903
  recipient: Address;
10894
- deadline: ApexBigintIsh;
10904
+ deadline: BigintIsh;
10895
10905
  }
10896
- interface ApexCLMintAndStakeParams extends Omit<ApexCLMintParams, "recipient"> {
10906
+ interface CLMintAndStakeParams extends Omit<CLMintParams, "recipient"> {
10897
10907
  account: Address;
10898
10908
  }
10899
- interface ApexCLIncreaseLiquidityParams {
10900
- tokenId: ApexBigintIsh;
10901
- amount0Desired: ApexBigintIsh;
10902
- amount1Desired: ApexBigintIsh;
10903
- amount0Min: ApexBigintIsh;
10904
- amount1Min: ApexBigintIsh;
10905
- deadline: ApexBigintIsh;
10909
+ interface CLIncreaseLiquidityParams {
10910
+ tokenId: BigintIsh;
10911
+ amount0Desired: BigintIsh;
10912
+ amount1Desired: BigintIsh;
10913
+ amount0Min: BigintIsh;
10914
+ amount1Min: BigintIsh;
10915
+ deadline: BigintIsh;
10906
10916
  }
10907
- interface ApexCLDecreaseLiquidityParams {
10908
- tokenId: ApexBigintIsh;
10909
- liquidity: ApexBigintIsh;
10910
- amount0Min: ApexBigintIsh;
10911
- amount1Min: ApexBigintIsh;
10912
- deadline: ApexBigintIsh;
10917
+ interface CLDecreaseLiquidityParams {
10918
+ tokenId: BigintIsh;
10919
+ liquidity: BigintIsh;
10920
+ amount0Min: BigintIsh;
10921
+ amount1Min: BigintIsh;
10922
+ deadline: BigintIsh;
10913
10923
  }
10914
- interface ApexCLCollectParams {
10915
- tokenId: ApexBigintIsh;
10924
+ interface CLCollectParams {
10925
+ tokenId: BigintIsh;
10916
10926
  recipient: Address;
10917
- amount0Max?: ApexBigintIsh;
10918
- amount1Max?: ApexBigintIsh;
10927
+ amount0Max?: BigintIsh;
10928
+ amount1Max?: BigintIsh;
10919
10929
  }
10920
- interface ApexCLTokenIdParams {
10921
- tokenId: ApexBigintIsh;
10930
+ interface CLTokenIdParams {
10931
+ tokenId: BigintIsh;
10922
10932
  }
10923
- interface ApexCLTokenIdToParams extends ApexCLTokenIdParams {
10933
+ interface CLTokenIdToParams extends CLTokenIdParams {
10924
10934
  to: Address;
10925
10935
  }
10926
- interface ApexCLMintAndStakeOptions {
10936
+ interface CLMintAndStakeOptions {
10927
10937
  stakingReceiver: Address;
10928
10938
  nonfungiblePositionManager: Address;
10929
- value?: ApexBigintIsh;
10939
+ value?: BigintIsh;
10930
10940
  }
10931
- declare const APEX_MAX_UINT128: bigint;
10932
- interface ApexClassicFarmPidParams {
10933
- pid: ApexBigintIsh;
10941
+ declare const MAX_UINT128: bigint;
10942
+ interface ClassicChefPidParams {
10943
+ pid: BigintIsh;
10934
10944
  }
10935
- interface ApexClassicFarmAmountParams extends ApexClassicFarmPidParams {
10936
- amount: ApexBigintIsh;
10945
+ interface ClassicChefAmountParams extends ClassicChefPidParams {
10946
+ amount: BigintIsh;
10937
10947
  }
10938
- interface ApexClassicFarmPendingParams extends ApexClassicFarmPidParams {
10948
+ interface ClassicChefPendingParams extends ClassicChefPidParams {
10939
10949
  account: Address;
10940
10950
  }
10941
- declare abstract class ApexClassicFarm {
10951
+ declare abstract class ClassicChef {
10942
10952
  private constructor();
10943
- static encodeDeposit(_params: ApexClassicFarmAmountParams): Hex;
10944
- static depositCallParameters(_params: ApexClassicFarmAmountParams): ApexMethodParameters;
10945
- static encodeWithdraw(_params: ApexClassicFarmAmountParams): Hex;
10946
- static withdrawCallParameters(_params: ApexClassicFarmAmountParams): ApexMethodParameters;
10947
- static encodeHarvest(_params: ApexClassicFarmPidParams): Hex;
10948
- static harvestCallParameters(_params: ApexClassicFarmPidParams): ApexMethodParameters;
10949
- static encodeEmergencyWithdraw(_params: ApexClassicFarmPidParams): Hex;
10950
- static emergencyWithdrawCallParameters(_params: ApexClassicFarmPidParams): ApexMethodParameters;
10951
- static encodePendingReward(_params: ApexClassicFarmPendingParams): Hex;
10953
+ static encodeDeposit(_params: ClassicChefAmountParams): Hex;
10954
+ static depositCallParameters(_params: ClassicChefAmountParams): CallParameters;
10955
+ static encodeWithdraw(_params: ClassicChefAmountParams): Hex;
10956
+ static withdrawCallParameters(_params: ClassicChefAmountParams): CallParameters;
10957
+ static encodeHarvest(_params: ClassicChefPidParams): Hex;
10958
+ static harvestCallParameters(_params: ClassicChefPidParams): CallParameters;
10959
+ static encodeEmergencyWithdraw(_params: ClassicChefPidParams): Hex;
10960
+ static emergencyWithdrawCallParameters(_params: ClassicChefPidParams): CallParameters;
10961
+ static encodePendingReward(_params: ClassicChefPendingParams): Hex;
10952
10962
  }
10953
- declare abstract class ApexCLFarm {
10963
+ declare abstract class CLMasterChef {
10954
10964
  private constructor();
10955
- static encodeMintAndStake(_params: ApexCLMintAndStakeParams, _options: ApexCLMintAndStakeOptions): Hex;
10956
- static mintAndStakeCallParameters(_params: ApexCLMintAndStakeParams, _options: ApexCLMintAndStakeOptions): ApexMethodParameters;
10957
- static encodeIncreaseLiquidity(_params: ApexCLIncreaseLiquidityParams): Hex;
10958
- static increaseLiquidityCallParameters(_params: ApexCLIncreaseLiquidityParams, _value?: ApexBigintIsh): ApexMethodParameters;
10959
- static encodeDecreaseLiquidity(_params: ApexCLDecreaseLiquidityParams): Hex;
10960
- static encodeCollectTo(_params: ApexCLCollectParams): Hex;
10961
- static collectCallParameters(_params: ApexCLCollectParams): ApexMethodParameters;
10962
- static decreaseAndCollectCallParameters(_decreaseParams: ApexCLDecreaseLiquidityParams, _collectParams: ApexCLCollectParams): ApexMethodParameters;
10963
- static closeAndBurnCallParameters(_decreaseParams: ApexCLDecreaseLiquidityParams, _collectParams: ApexCLCollectParams): ApexMethodParameters;
10964
- static encodeHarvest(_params: ApexCLTokenIdToParams): Hex;
10965
- static harvestCallParameters(_params: ApexCLTokenIdToParams): ApexMethodParameters;
10966
- static encodeWithdraw(_params: ApexCLTokenIdToParams): Hex;
10967
- static withdrawCallParameters(_params: ApexCLTokenIdToParams): ApexMethodParameters;
10968
- static encodeBurn(_params: ApexCLTokenIdParams): Hex;
10969
- static burnCallParameters(_params: ApexCLTokenIdParams): ApexMethodParameters;
10965
+ static encodeMintAndStake(_params: CLMintAndStakeParams, _options: CLMintAndStakeOptions): Hex;
10966
+ static mintAndStakeCallParameters(_params: CLMintAndStakeParams, _options: CLMintAndStakeOptions): CallParameters;
10967
+ static encodeIncreaseLiquidity(_params: CLIncreaseLiquidityParams): Hex;
10968
+ static increaseLiquidityCallParameters(_params: CLIncreaseLiquidityParams, _value?: BigintIsh): CallParameters;
10969
+ static encodeDecreaseLiquidity(_params: CLDecreaseLiquidityParams): Hex;
10970
+ static encodeCollectTo(_params: CLCollectParams): Hex;
10971
+ static collectCallParameters(_params: CLCollectParams): CallParameters;
10972
+ static decreaseAndCollectCallParameters(_decreaseParams: CLDecreaseLiquidityParams, _collectParams: CLCollectParams): CallParameters;
10973
+ static closeAndBurnCallParameters(_decreaseParams: CLDecreaseLiquidityParams, _collectParams: CLCollectParams): CallParameters;
10974
+ static encodeHarvest(_params: CLTokenIdToParams): Hex;
10975
+ static harvestCallParameters(_params: CLTokenIdToParams): CallParameters;
10976
+ static encodeWithdraw(_params: CLTokenIdToParams): Hex;
10977
+ static withdrawCallParameters(_params: CLTokenIdToParams): CallParameters;
10978
+ static encodeBurn(_params: CLTokenIdParams): Hex;
10979
+ static burnCallParameters(_params: CLTokenIdParams): CallParameters;
10970
10980
  static encodeMulticall(_calldatas: readonly Hex[]): Hex;
10971
10981
  static encodeNfpMulticall(_calldatas: readonly Hex[]): Hex;
10972
10982
  static encodeNfpRefundETH(): Hex;
10973
10983
  }
10984
+ type ApexBigintIsh = BigintIsh;
10985
+ type ApexMethodParameters = CallParameters;
10986
+ type ApexCLMintParams = CLMintParams;
10987
+ type ApexCLMintAndStakeParams = CLMintAndStakeParams;
10988
+ type ApexCLIncreaseLiquidityParams = CLIncreaseLiquidityParams;
10989
+ type ApexCLDecreaseLiquidityParams = CLDecreaseLiquidityParams;
10990
+ type ApexCLCollectParams = CLCollectParams;
10991
+ type ApexCLTokenIdParams = CLTokenIdParams;
10992
+ type ApexCLTokenIdToParams = CLTokenIdToParams;
10993
+ type ApexCLMintAndStakeOptions = CLMintAndStakeOptions;
10994
+ type ApexClassicFarmPidParams = ClassicChefPidParams;
10995
+ type ApexClassicFarmAmountParams = ClassicChefAmountParams;
10996
+ type ApexClassicFarmPendingParams = ClassicChefPendingParams;
10997
+ declare const APEX_MAX_UINT128: bigint;
10998
+ declare const ApexClassicFarm: typeof ClassicChef;
10999
+ declare const ApexCLFarm: typeof CLMasterChef;
10974
11000
 
10975
11001
  declare const APEX_MIXED_ROUTE_CLASSIC_STABLE = 8388608;
10976
11002
  declare const APEX_MIXED_ROUTE_CLASSIC_VOLATILE = 8388609;
10977
11003
  declare const APEX_MIXED_ROUTE_PANCAKE_CLASSIC_PLACEHOLDER = 8388608;
10978
11004
  declare const APEX_MIXED_ROUTE_PANCAKE_VOLATILE_FLAG = 1;
10979
11005
  declare const APEX_MIXED_ROUTE_PANCAKE_STABLE_FLAG = 2;
10980
- type ApexMixedRouteHop = {
11006
+ type MixedRouteHop = {
10981
11007
  kind: 'CL';
10982
11008
  tokenIn: Address;
10983
11009
  tokenOut: Address;
@@ -10991,108 +11017,127 @@ type ApexMixedRouteHop = {
10991
11017
  tokenIn: Address;
10992
11018
  tokenOut: Address;
10993
11019
  };
10994
- declare function encodeApexMixedRouteToPath(_hops: readonly ApexMixedRouteHop[], _exactOutput?: boolean): Hex;
10995
- declare function encodeApexMixedRouteToPancakeQuoteParams(_hops: readonly ApexMixedRouteHop[], _exactOutput?: boolean): {
11020
+ declare function encodeMixedRouteToPath(_hops: readonly MixedRouteHop[], _exactOutput?: boolean): Hex;
11021
+ declare function encodeMixedRouteToPancakeQuoteParams(_hops: readonly MixedRouteHop[], _exactOutput?: boolean): {
10996
11022
  path: Hex;
10997
11023
  flags: number[];
10998
11024
  };
10999
- declare function decodeApexMixedRoutePath(_path: Hex): ApexMixedRouteHop[];
11025
+ declare function decodeMixedRoutePath(_path: Hex): MixedRouteHop[];
11026
+ type ApexMixedRouteHop = MixedRouteHop;
11027
+ declare const encodeApexMixedRouteToPath: typeof encodeMixedRouteToPath;
11028
+ declare const encodeApexMixedRouteToPancakeQuoteParams: typeof encodeMixedRouteToPancakeQuoteParams;
11029
+ declare const decodeApexMixedRoutePath: typeof decodeMixedRoutePath;
11000
11030
 
11001
11031
  declare const APEX_CL_PROTOCOL_FEE_SPACING = 65536n;
11002
- interface ApexPackedProtocolFees {
11032
+ interface PackedProtocolFees {
11003
11033
  token0ProtocolFee: bigint;
11004
11034
  token1ProtocolFee: bigint;
11005
11035
  }
11006
- declare function packApexProtocolFees(_token0ProtocolFee: bigint | number, _token1ProtocolFee: bigint | number): bigint;
11007
- declare function parseApexProtocolFeePacked(_feeProtocol: bigint | number | string): ApexPackedProtocolFees;
11036
+ declare function packProtocolFees(_token0ProtocolFee: bigint | number, _token1ProtocolFee: bigint | number): bigint;
11037
+ declare function parseProtocolFeePacked(_feeProtocol: bigint | number | string): PackedProtocolFees;
11038
+ type ApexPackedProtocolFees = PackedProtocolFees;
11039
+ declare const packApexProtocolFees: typeof packProtocolFees;
11040
+ declare const parseApexProtocolFeePacked: typeof parseProtocolFeePacked;
11008
11041
 
11009
- type ApexSmartRouterValidation = ApexBigintIsh | Hex;
11010
- interface ApexSmartRouterOptions {
11011
- deadlineOrPreviousBlockhash: ApexSmartRouterValidation;
11012
- value?: ApexBigintIsh;
11013
- payments?: readonly ApexSmartRouterPayment[];
11042
+ type SmartRouterValidation = BigintIsh | Hex;
11043
+ interface SmartRouterOptions {
11044
+ deadlineOrPreviousBlockhash: SmartRouterValidation;
11045
+ value?: BigintIsh;
11046
+ payments?: readonly SmartRouterPayment[];
11014
11047
  }
11015
- type ApexSmartRouterPayment = {
11048
+ type SmartRouterPayment = {
11016
11049
  kind: 'REFUND_ETH';
11017
11050
  } | {
11018
11051
  kind: 'UNWRAP_WETH9';
11019
- amountMinimum: ApexBigintIsh;
11052
+ amountMinimum: BigintIsh;
11020
11053
  recipient: Address;
11021
11054
  } | {
11022
11055
  kind: 'SWEEP_TOKEN';
11023
11056
  token: Address;
11024
- amountMinimum: ApexBigintIsh;
11057
+ amountMinimum: BigintIsh;
11025
11058
  recipient: Address;
11026
11059
  };
11027
- interface ApexSmartRouterExactInputSingleParams {
11060
+ interface SmartRouterExactInputSingleParams {
11028
11061
  tokenIn: Address;
11029
11062
  tokenOut: Address;
11030
11063
  fee: number;
11031
11064
  recipient: Address;
11032
- amountIn: ApexBigintIsh;
11033
- amountOutMinimum: ApexBigintIsh;
11034
- sqrtPriceLimitX96?: ApexBigintIsh;
11065
+ amountIn: BigintIsh;
11066
+ amountOutMinimum: BigintIsh;
11067
+ sqrtPriceLimitX96?: BigintIsh;
11035
11068
  }
11036
- interface ApexSmartRouterExactInputParams {
11069
+ interface SmartRouterExactInputParams {
11037
11070
  path: Hex;
11038
11071
  recipient: Address;
11039
- amountIn: ApexBigintIsh;
11040
- amountOutMinimum: ApexBigintIsh;
11072
+ amountIn: BigintIsh;
11073
+ amountOutMinimum: BigintIsh;
11041
11074
  }
11042
- interface ApexSmartRouterExactOutputSingleParams {
11075
+ interface SmartRouterExactOutputSingleParams {
11043
11076
  tokenIn: Address;
11044
11077
  tokenOut: Address;
11045
11078
  fee: number;
11046
11079
  recipient: Address;
11047
- amountOut: ApexBigintIsh;
11048
- amountInMaximum: ApexBigintIsh;
11049
- sqrtPriceLimitX96?: ApexBigintIsh;
11080
+ amountOut: BigintIsh;
11081
+ amountInMaximum: BigintIsh;
11082
+ sqrtPriceLimitX96?: BigintIsh;
11050
11083
  }
11051
- interface ApexSmartRouterExactOutputParams {
11084
+ interface SmartRouterExactOutputParams {
11052
11085
  path: Hex;
11053
11086
  recipient: Address;
11054
- amountOut: ApexBigintIsh;
11055
- amountInMaximum: ApexBigintIsh;
11087
+ amountOut: BigintIsh;
11088
+ amountInMaximum: BigintIsh;
11056
11089
  }
11057
- interface ApexSmartRouterClassicExactInputParams {
11058
- amountIn: ApexBigintIsh;
11059
- amountOutMin: ApexBigintIsh;
11090
+ interface SmartRouterClassicExactInputParams {
11091
+ amountIn: BigintIsh;
11092
+ amountOutMin: BigintIsh;
11060
11093
  path: readonly Address[];
11061
11094
  recipient: Address;
11062
11095
  }
11063
- interface ApexSmartRouterStableExactInputParams extends ApexSmartRouterClassicExactInputParams {
11064
- flags: readonly ApexBigintIsh[];
11096
+ interface SmartRouterStableExactInputParams extends SmartRouterClassicExactInputParams {
11097
+ flags: readonly BigintIsh[];
11065
11098
  }
11066
- interface ApexSmartRouterMixedExactInputParams {
11067
- hops: readonly ApexMixedRouteHop[];
11099
+ interface SmartRouterMixedExactInputParams {
11100
+ hops: readonly MixedRouteHop[];
11068
11101
  recipient: Address;
11069
- amountIn: ApexBigintIsh;
11070
- amountOutMinimum: ApexBigintIsh;
11102
+ amountIn: BigintIsh;
11103
+ amountOutMinimum: BigintIsh;
11071
11104
  }
11072
- declare abstract class ApexSmartRouter {
11105
+ declare abstract class SmartRouter {
11073
11106
  private constructor();
11074
- static swapCallParameters(_calldata: Hex | readonly Hex[], _options: ApexSmartRouterOptions): ApexMethodParameters;
11075
- static exactInputSingleCallParameters(_params: ApexSmartRouterExactInputSingleParams, _options: ApexSmartRouterOptions): ApexMethodParameters;
11076
- static exactInputCallParameters(_params: ApexSmartRouterExactInputParams, _options: ApexSmartRouterOptions): ApexMethodParameters;
11077
- static mixedExactInputCallParameters(_params: ApexSmartRouterMixedExactInputParams, _options: ApexSmartRouterOptions): ApexMethodParameters;
11078
- static exactOutputSingleCallParameters(_params: ApexSmartRouterExactOutputSingleParams, _options: ApexSmartRouterOptions): ApexMethodParameters;
11079
- static exactOutputCallParameters(_params: ApexSmartRouterExactOutputParams, _options: ApexSmartRouterOptions): ApexMethodParameters;
11080
- static classicExactInputCallParameters(_params: ApexSmartRouterClassicExactInputParams, _options: ApexSmartRouterOptions): ApexMethodParameters;
11081
- static stableExactInputCallParameters(_params: ApexSmartRouterStableExactInputParams, _options: ApexSmartRouterOptions): ApexMethodParameters;
11082
- static encodeExactInputSingle(_params: ApexSmartRouterExactInputSingleParams): Hex;
11083
- static encodeExactInput(_params: ApexSmartRouterExactInputParams): Hex;
11084
- static encodeExactOutputSingle(_params: ApexSmartRouterExactOutputSingleParams): Hex;
11085
- static encodeExactOutput(_params: ApexSmartRouterExactOutputParams): Hex;
11086
- static encodeClassicExactInput(_params: ApexSmartRouterClassicExactInputParams): Hex;
11087
- static encodeStableExactInput(_params: ApexSmartRouterStableExactInputParams): Hex;
11088
- static encodeMulticall(_calldatas: readonly Hex[], _validation?: ApexSmartRouterValidation): Hex;
11107
+ static swapCallParameters(_calldata: Hex | readonly Hex[], _options: SmartRouterOptions): CallParameters;
11108
+ static exactInputSingleCallParameters(_params: SmartRouterExactInputSingleParams, _options: SmartRouterOptions): CallParameters;
11109
+ static exactInputCallParameters(_params: SmartRouterExactInputParams, _options: SmartRouterOptions): CallParameters;
11110
+ static mixedExactInputCallParameters(_params: SmartRouterMixedExactInputParams, _options: SmartRouterOptions): CallParameters;
11111
+ static exactOutputSingleCallParameters(_params: SmartRouterExactOutputSingleParams, _options: SmartRouterOptions): CallParameters;
11112
+ static exactOutputCallParameters(_params: SmartRouterExactOutputParams, _options: SmartRouterOptions): CallParameters;
11113
+ static classicExactInputCallParameters(_params: SmartRouterClassicExactInputParams, _options: SmartRouterOptions): CallParameters;
11114
+ static stableExactInputCallParameters(_params: SmartRouterStableExactInputParams, _options: SmartRouterOptions): CallParameters;
11115
+ static encodeExactInputSingle(_params: SmartRouterExactInputSingleParams): Hex;
11116
+ static encodeExactInput(_params: SmartRouterExactInputParams): Hex;
11117
+ static encodeExactOutputSingle(_params: SmartRouterExactOutputSingleParams): Hex;
11118
+ static encodeExactOutput(_params: SmartRouterExactOutputParams): Hex;
11119
+ static encodeClassicExactInput(_params: SmartRouterClassicExactInputParams): Hex;
11120
+ static encodeStableExactInput(_params: SmartRouterStableExactInputParams): Hex;
11121
+ static encodeMulticall(_calldatas: readonly Hex[], _validation?: SmartRouterValidation): Hex;
11089
11122
  static encodeRefundETH(): Hex;
11090
- static encodeUnwrapWETH9(_amountMinimum: ApexBigintIsh, _recipient: Address): Hex;
11091
- static encodeSweepToken(_token: Address, _amountMinimum: ApexBigintIsh, _recipient: Address): Hex;
11123
+ static encodeUnwrapWETH9(_amountMinimum: BigintIsh, _recipient: Address): Hex;
11124
+ static encodeSweepToken(_token: Address, _amountMinimum: BigintIsh, _recipient: Address): Hex;
11092
11125
  }
11126
+ type ApexSmartRouterValidation = SmartRouterValidation;
11127
+ type ApexSmartRouterOptions = SmartRouterOptions;
11128
+ type ApexSmartRouterPayment = SmartRouterPayment;
11129
+ type ApexSmartRouterExactInputSingleParams = SmartRouterExactInputSingleParams;
11130
+ type ApexSmartRouterExactInputParams = SmartRouterExactInputParams;
11131
+ type ApexSmartRouterExactOutputSingleParams = SmartRouterExactOutputSingleParams;
11132
+ type ApexSmartRouterExactOutputParams = SmartRouterExactOutputParams;
11133
+ type ApexSmartRouterClassicExactInputParams = SmartRouterClassicExactInputParams;
11134
+ type ApexSmartRouterStableExactInputParams = SmartRouterStableExactInputParams;
11135
+ type ApexSmartRouterMixedExactInputParams = SmartRouterMixedExactInputParams;
11136
+ declare const ApexSmartRouter: typeof SmartRouter;
11093
11137
 
11094
11138
  declare const APEX_VAULT_BPS = 10000;
11095
- declare function apexVaultCompoundBucket(_veNFT: Address): Address;
11139
+ declare function getApexVaultCompoundBucket(_veNFT: Address): Address;
11140
+ declare const apexVaultCompoundBucket: typeof getApexVaultCompoundBucket;
11096
11141
  interface ApexVaultRewardConfig {
11097
11142
  rewardToken: Address;
11098
11143
  bps: number;
@@ -11102,45 +11147,46 @@ interface ApexVaultUserConfigParams {
11102
11147
  compoundBps?: number;
11103
11148
  }
11104
11149
  interface ApexVaultTokenIdParams {
11105
- tokenId: ApexBigintIsh;
11150
+ tokenId: BigintIsh;
11106
11151
  }
11107
11152
  interface ApexVaultClaimParams extends ApexVaultTokenIdParams {
11108
11153
  rewardTokens: readonly Address[];
11109
11154
  }
11110
11155
  type ApexVaultClaimAndExtendLockParams = ApexVaultClaimParams;
11111
11156
  interface ApexVaultExtendLockParams extends ApexVaultTokenIdParams {
11112
- lockDuration: ApexBigintIsh;
11157
+ lockDuration: BigintIsh;
11113
11158
  }
11114
11159
  interface ApexVaultIncreaseAmountParams extends ApexVaultTokenIdParams {
11115
- amount: ApexBigintIsh;
11160
+ amount: BigintIsh;
11116
11161
  }
11117
11162
  interface VeApexTokenCreateLockParams {
11118
- amount: ApexBigintIsh;
11119
- lockDuration: ApexBigintIsh;
11163
+ amount: BigintIsh;
11164
+ lockDuration: BigintIsh;
11120
11165
  }
11121
11166
  interface VeApexTokenApprovalParams extends ApexVaultTokenIdParams {
11122
11167
  spender: Address;
11123
11168
  }
11124
- declare abstract class ApexVaultPosition {
11169
+ declare abstract class ApexVault {
11125
11170
  private constructor();
11126
- static encodeStake(_tokenId: ApexBigintIsh, _config: ApexVaultUserConfigParams): Hex;
11127
- static stakeCallParameters(_tokenId: ApexBigintIsh, _config: ApexVaultUserConfigParams): ApexMethodParameters;
11128
- static encodeSetUserConfig(_tokenId: ApexBigintIsh, _config: ApexVaultUserConfigParams): Hex;
11129
- static setUserConfigCallParameters(_tokenId: ApexBigintIsh, _config: ApexVaultUserConfigParams): ApexMethodParameters;
11171
+ static encodeStake(_tokenId: BigintIsh, _config: ApexVaultUserConfigParams): Hex;
11172
+ static stakeCallParameters(_tokenId: BigintIsh, _config: ApexVaultUserConfigParams): CallParameters;
11173
+ static encodeSetUserConfig(_tokenId: BigintIsh, _config: ApexVaultUserConfigParams): Hex;
11174
+ static setUserConfigCallParameters(_tokenId: BigintIsh, _config: ApexVaultUserConfigParams): CallParameters;
11130
11175
  static encodeClaim(_params: ApexVaultClaimParams): Hex;
11131
- static claimCallParameters(_params: ApexVaultClaimParams): ApexMethodParameters;
11176
+ static claimCallParameters(_params: ApexVaultClaimParams): CallParameters;
11132
11177
  static encodeClaimAndExtendLock(_params: ApexVaultClaimAndExtendLockParams): Hex;
11133
- static claimAndExtendLockCallParameters(_params: ApexVaultClaimAndExtendLockParams): ApexMethodParameters;
11178
+ static claimAndExtendLockCallParameters(_params: ApexVaultClaimAndExtendLockParams): CallParameters;
11134
11179
  static encodeUnstake(_params: ApexVaultTokenIdParams): Hex;
11135
- static unstakeCallParameters(_params: ApexVaultTokenIdParams): ApexMethodParameters;
11180
+ static unstakeCallParameters(_params: ApexVaultTokenIdParams): CallParameters;
11136
11181
  static encodeExtendLock(_params: ApexVaultExtendLockParams): Hex;
11137
- static extendLockCallParameters(_params: ApexVaultExtendLockParams): ApexMethodParameters;
11182
+ static extendLockCallParameters(_params: ApexVaultExtendLockParams): CallParameters;
11138
11183
  static encodeIncreaseAmount(_params: ApexVaultIncreaseAmountParams): Hex;
11139
- static increaseAmountCallParameters(_params: ApexVaultIncreaseAmountParams): ApexMethodParameters;
11184
+ static increaseAmountCallParameters(_params: ApexVaultIncreaseAmountParams): CallParameters;
11140
11185
  static encodeVeApexTokenApprove(_params: VeApexTokenApprovalParams): Hex;
11141
11186
  static encodeVeApexTokenSetApprovalForAll(_operator: Address, _approved: boolean): Hex;
11142
11187
  static encodeVeApexTokenCreateLock(_params: VeApexTokenCreateLockParams): Hex;
11143
11188
  }
11189
+ declare const ApexVaultPosition: typeof ApexVault;
11144
11190
  declare function validateApexVaultUserConfig(_config: ApexVaultUserConfigParams): void;
11145
11191
  declare function formatVaultConfig(_config: ApexVaultUserConfigParams): {
11146
11192
  rewardConfigs: {
@@ -11150,4 +11196,4 @@ declare function formatVaultConfig(_config: ApexVaultUserConfigParams): {
11150
11196
  compoundBps: number;
11151
11197
  };
11152
11198
 
11153
- export { ADDRESS_ZERO, APEX_CLASSIC_FEE_DENOMINATOR, APEX_CLASSIC_PAIR_INIT_CODE_HASH, APEX_CL_POOL_INIT_CODE_HASH, APEX_CL_PROTOCOL_FEE_DENOMINATOR, APEX_CL_PROTOCOL_FEE_SPACING, APEX_CL_TICK_SPACINGS, APEX_MAX_UINT128, APEX_MIXED_ROUTE_CLASSIC_STABLE, APEX_MIXED_ROUTE_CLASSIC_VOLATILE, APEX_MIXED_ROUTE_PANCAKE_CLASSIC_PLACEHOLDER, APEX_MIXED_ROUTE_PANCAKE_STABLE_FLAG, APEX_MIXED_ROUTE_PANCAKE_VOLATILE_FLAG, APEX_VAULT_BPS, type AddLiquidityOptions, type AllowedPermitArguments, type ApexBigintIsh, type ApexCLCollectParams, type ApexCLDecreaseLiquidityParams, ApexCLFarm, type ApexCLIncreaseLiquidityParams, type ApexCLMintAndStakeOptions, type ApexCLMintAndStakeParams, type ApexCLMintParams, type ApexCLTokenIdParams, type ApexCLTokenIdToParams, ApexClassicFarm, type ApexClassicFarmAmountParams, type ApexClassicFarmPendingParams, type ApexClassicFarmPidParams, type ApexClassicQuoteParams, type ApexDeploymentConfig, ApexFeeAmount, type ApexMethodParameters, type ApexMixedRouteHop, type ApexPackedProtocolFees, ApexSmartRouter, type ApexSmartRouterClassicExactInputParams, type ApexSmartRouterExactInputParams, type ApexSmartRouterExactInputSingleParams, type ApexSmartRouterExactOutputParams, type ApexSmartRouterExactOutputSingleParams, type ApexSmartRouterMixedExactInputParams, type ApexSmartRouterOptions, type ApexSmartRouterPayment, type ApexSmartRouterStableExactInputParams, type ApexSmartRouterValidation, type ApexVaultClaimAndExtendLockParams, type ApexVaultClaimParams, type ApexVaultExtendLockParams, type ApexVaultIncreaseAmountParams, ApexVaultPosition, type ApexVaultRewardConfig, type ApexVaultTokenIdParams, type ApexVaultUserConfigParams, type BestTradeOptions, type ClaimOptions, type CollectOptions, type CommonAddLiquidityOptions, type ComputeApexCLPoolAddressParams, type ComputeApexClassicPairAddressParams, type ComputeCLPoolAddressParams, type ComputeClassicPoolAddressParams, type CreateApexPoolParams, DEPLOYER_ADDRESSES, FACTORY_ADDRESSES, FeeAmount, FeeCalculator, type FeeOptions, FullMath, type FullWithdrawOptions, type IncentiveKey, type IncreaseOptions, type IncreaseSpecificOptions, LiquidityMath, MasterChefV3, MaxUint128, type MethodParameters, type MintOptions, type MintSpecificOptions, Multicall, type NFTPermitOptions, NFT_POSITION_MANAGER_ADDRESSES, NoTickDataProvider, NonfungiblePositionManager, POOL_INIT_CODE_HASHES, Payments, type PermitOptions, Pool, type PoolState, Position, PositionLibrary, PositionMath, type QuoteOptions, type RemoveLiquidityOptions, Route, type SafeTransferOptions, SelfPermit, SqrtPriceMath, Staker, type StandardPermitArguments, SwapMath, type SwapOptions, SwapQuoter, SwapRouter, TICK_SPACINGS, Tick, type TickConstructorArgs, type TickDataProvider, TickLibrary, TickList, TickListDataProvider, TickMath, Trade, type VeApexTokenApprovalParams, type VeApexTokenCreateLockParams, type WithdrawOptions, apexControllerAbi, apexTokenAbi, apexVaultAbi, apexVaultCompoundBucket, asPancakeFeeAmount, clFactoryAbi, clMasterChefAbi, clPoolAbi, classicChefAbi, classicFactoryAbi, classicPoolAbi, computeApexCLPoolAddress, computeApexClassicPairAddress, computeCLPoolAddress, computeClassicPoolAddress, computeCreate2Address, computePoolAddress, createApexPool, decodeApexMixedRoutePath, encodeApexMixedRouteToPancakeQuoteParams, encodeApexMixedRouteToPath, encodeRouteToPath, encodeSqrtRatioX96, feeCenterAbi, feeReceiverAbi, feeSwapperAbi, formatVaultConfig, getAmountsAtNewPrice, getAmountsByLiquidityAndPrice, getApexTickSpacing, getAverageLiquidity, getCurrency0Price, getCurrency1Price, getDependentAmount, getEstimatedLPFee, getEstimatedLPFeeByAmounts, getEstimatedLPFeeByAmountsWithProtocolFee, getEstimatedLPFeeWithProtocolFee, getInputAmount, getLiquidityByAmountsAndPrice, getLiquidityBySingleAmount, getLiquidityFromSqrtRatioX96, getLiquidityFromTick, getOutputAmount, getPool, getPriceOfCurrency, getPriceOfCurrency0, getPriceOfCurrency1, hasInvolvedCurrency, installApexFeeTiers, interfaceMulticallAbi, isApexCLFeeAmount, isMint, isPoolTickInRange, isSorted, masterChefV3ABI, maxLiquidityForAmount0Imprecise, maxLiquidityForAmount0Precise, maxLiquidityForAmount1, maxLiquidityForAmounts, mixedQuoterAbi, mostSignificantBit, nearestUsableTick, nonfungiblePositionManagerABI, nonfungiblePositionManagerAbi, normalizeAddress, packApexProtocolFees, pancakeV3PoolABI, parseApexProtocolFeePacked, parseProtocolFees, peripheryPaymentsWithFeeABI, priceToClosestTick, quoteApexClassicExactInput, quoterABI, quoterAbi, quoterV2ABI, quoterV2Abi, selfPermitABI, smartRouterAbi, sortAddresses, sqrtRatioX96ToPrice, subIn256, swap, swapRouterABI, swapRouterAbi, tickLensAbi, tickToPrice, tickToPriceV2, toApexFeeAmount, toHex, tradeComparator, v3PoolAbi, v3StakerABI, validateApexVaultUserConfig, veApexTokenAbi };
11199
+ export { ADDRESS_ZERO, APEX_CLASSIC_FEE_DENOMINATOR, APEX_CLASSIC_PAIR_INIT_CODE_HASH, APEX_CL_POOL_INIT_CODE_HASH, APEX_CL_PROTOCOL_FEE_DENOMINATOR, APEX_CL_PROTOCOL_FEE_SPACING, APEX_CL_TICK_SPACINGS, APEX_MAX_UINT128, APEX_MIXED_ROUTE_CLASSIC_STABLE, APEX_MIXED_ROUTE_CLASSIC_VOLATILE, APEX_MIXED_ROUTE_PANCAKE_CLASSIC_PLACEHOLDER, APEX_MIXED_ROUTE_PANCAKE_STABLE_FLAG, APEX_MIXED_ROUTE_PANCAKE_VOLATILE_FLAG, APEX_VAULT_BPS, type AddLiquidityOptions, type AllowedPermitArguments, type ApexBigintIsh, type ApexCLCollectParams, type ApexCLDecreaseLiquidityParams, ApexCLFarm, type ApexCLIncreaseLiquidityParams, type ApexCLMintAndStakeOptions, type ApexCLMintAndStakeParams, type ApexCLMintParams, type ApexCLTokenIdParams, type ApexCLTokenIdToParams, ApexClassicFarm, type ApexClassicFarmAmountParams, type ApexClassicFarmPendingParams, type ApexClassicFarmPidParams, type ApexClassicQuoteParams, type ApexDeploymentConfig, CLFeeAmount as ApexFeeAmount, type ApexMethodParameters, type ApexMixedRouteHop, type ApexPackedProtocolFees, ApexSmartRouter, type ApexSmartRouterClassicExactInputParams, type ApexSmartRouterExactInputParams, type ApexSmartRouterExactInputSingleParams, type ApexSmartRouterExactOutputParams, type ApexSmartRouterExactOutputSingleParams, type ApexSmartRouterMixedExactInputParams, type ApexSmartRouterOptions, type ApexSmartRouterPayment, type ApexSmartRouterStableExactInputParams, type ApexSmartRouterValidation, ApexVault, type ApexVaultClaimAndExtendLockParams, type ApexVaultClaimParams, type ApexVaultExtendLockParams, type ApexVaultIncreaseAmountParams, ApexVaultPosition, type ApexVaultRewardConfig, type ApexVaultTokenIdParams, type ApexVaultUserConfigParams, type BestTradeOptions, type BigintIsh, type CLCollectParams, type CLDecreaseLiquidityParams, CLFeeAmount, type CLIncreaseLiquidityParams, CLMasterChef, type CLMintAndStakeOptions, type CLMintAndStakeParams, type CLMintParams, type CLTokenIdParams, type CLTokenIdToParams, CL_TICK_SPACINGS, type CallParameters, type ClaimOptions, ClassicChef, type ClassicChefAmountParams, type ClassicChefPendingParams, type ClassicChefPidParams, type ClassicQuoteParams, type CollectOptions, type CommonAddLiquidityOptions, type ComputeApexCLPoolAddressParams, type ComputeApexClassicPairAddressParams, type ComputeCLPoolAddressParams, type ComputeClassicPoolAddressParams, type CreateApexPoolParams, type CreateCLPoolParams, DEPLOYER_ADDRESSES, FACTORY_ADDRESSES, FeeAmount, FeeCalculator, type FeeOptions, FullMath, type FullWithdrawOptions, type IncentiveKey, type IncreaseOptions, type IncreaseSpecificOptions, LiquidityMath, MAX_UINT128, MasterChefV3, MaxUint128, type MethodParameters, type MintOptions, type MintSpecificOptions, type MixedRouteHop, Multicall, type NFTPermitOptions, NFT_POSITION_MANAGER_ADDRESSES, NoTickDataProvider, NonfungiblePositionManager, POOL_INIT_CODE_HASHES, type PackedProtocolFees, Payments, type PermitOptions, Pool, type PoolState, Position, PositionLibrary, PositionMath, type QuoteOptions, type RemoveLiquidityOptions, Route, type SafeTransferOptions, SelfPermit, SmartRouter, type SmartRouterClassicExactInputParams, type SmartRouterExactInputParams, type SmartRouterExactInputSingleParams, type SmartRouterExactOutputParams, type SmartRouterExactOutputSingleParams, type SmartRouterMixedExactInputParams, type SmartRouterOptions, type SmartRouterPayment, type SmartRouterStableExactInputParams, type SmartRouterValidation, SqrtPriceMath, Staker, type StandardPermitArguments, SwapMath, type SwapOptions, SwapQuoter, SwapRouter, TICK_SPACINGS, Tick, type TickConstructorArgs, type TickDataProvider, TickLibrary, TickList, TickListDataProvider, TickMath, Trade, type VeApexTokenApprovalParams, type VeApexTokenCreateLockParams, type WithdrawOptions, apexControllerAbi, apexTokenAbi, apexVaultAbi, apexVaultCompoundBucket, asPancakeFeeAmount, clFactoryAbi, clMasterChefAbi, clPoolAbi, classicChefAbi, classicFactoryAbi, classicPoolAbi, computeApexCLPoolAddress, computeApexClassicPairAddress, computeCLPoolAddress, computeClassicPoolAddress, computeCreate2Address, computePoolAddress, createApexPool, createCLPool, decodeApexMixedRoutePath, decodeMixedRoutePath, encodeApexMixedRouteToPancakeQuoteParams, encodeApexMixedRouteToPath, encodeMixedRouteToPancakeQuoteParams, encodeMixedRouteToPath, encodeRouteToPath, encodeSqrtRatioX96, feeCenterAbi, feeReceiverAbi, feeSwapperAbi, formatVaultConfig, getAmountsAtNewPrice, getAmountsByLiquidityAndPrice, getApexTickSpacing, getApexVaultCompoundBucket, getAverageLiquidity, getCLTickSpacing, getCurrency0Price, getCurrency1Price, getDependentAmount, getEstimatedLPFee, getEstimatedLPFeeByAmounts, getEstimatedLPFeeByAmountsWithProtocolFee, getEstimatedLPFeeWithProtocolFee, getInputAmount, getLiquidityByAmountsAndPrice, getLiquidityBySingleAmount, getLiquidityFromSqrtRatioX96, getLiquidityFromTick, getOutputAmount, getPool, getPriceOfCurrency, getPriceOfCurrency0, getPriceOfCurrency1, hasInvolvedCurrency, installApexFeeTiers, installCLFeeTiers, interfaceMulticallAbi, isApexCLFeeAmount, isCLFeeAmount, isMint, isPoolTickInRange, isSorted, masterChefV3ABI, maxLiquidityForAmount0Imprecise, maxLiquidityForAmount0Precise, maxLiquidityForAmount1, maxLiquidityForAmounts, mixedQuoterAbi, mostSignificantBit, nearestUsableTick, nonfungiblePositionManagerABI, nonfungiblePositionManagerAbi, normalizeAddress, packApexProtocolFees, packProtocolFees, pancakeV3PoolABI, parseApexProtocolFeePacked, parseProtocolFeePacked, parseProtocolFees, peripheryPaymentsWithFeeABI, priceToClosestTick, quoteApexClassicExactInput, quoteClassicExactInput, quoterABI, quoterAbi, quoterV2ABI, quoterV2Abi, selfPermitABI, smartRouterAbi, sortAddresses, sqrtRatioX96ToPrice, subIn256, swap, swapRouterABI, swapRouterAbi, tickLensAbi, tickToPrice, tickToPriceV2, toApexFeeAmount, toCLFeeAmount, toHex, tradeComparator, v3PoolAbi, v3StakerABI, validateApexVaultUserConfig, veApexTokenAbi };