@pancakeswap/infinity-sdk 1.0.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/LICENSE +674 -0
- package/README.md +12 -0
- package/dist/abis/BinMigratorAbi.d.ts +652 -0
- package/dist/abis/BinMigratorAbi.d.ts.map +1 -0
- package/dist/abis/BinPoolManagerAbi.d.ts +1184 -0
- package/dist/abis/BinPoolManagerAbi.d.ts.map +1 -0
- package/dist/abis/BinPositionManagerAbi.d.ts +667 -0
- package/dist/abis/BinPositionManagerAbi.d.ts.map +1 -0
- package/dist/abis/BinQuoterAbi.d.ts +644 -0
- package/dist/abis/BinQuoterAbi.d.ts.map +1 -0
- package/dist/abis/CLMigratorAbi.d.ts +650 -0
- package/dist/abis/CLMigratorAbi.d.ts.map +1 -0
- package/dist/abis/CLPoolManagerAbi.d.ts +1075 -0
- package/dist/abis/CLPoolManagerAbi.d.ts.map +1 -0
- package/dist/abis/CLPositionManagerAbi.d.ts +1130 -0
- package/dist/abis/CLPositionManagerAbi.d.ts.map +1 -0
- package/dist/abis/CLQuoterAbi.d.ts +644 -0
- package/dist/abis/CLQuoterAbi.d.ts.map +1 -0
- package/dist/abis/FarmingOffChainAbi.d.ts +982 -0
- package/dist/abis/FarmingOffChainAbi.d.ts.map +1 -0
- package/dist/abis/FarmingOffChainCLHelperAbi.d.ts +40 -0
- package/dist/abis/FarmingOffChainCLHelperAbi.d.ts.map +1 -0
- package/dist/abis/MixedQuoterAbi.d.ts +347 -0
- package/dist/abis/MixedQuoterAbi.d.ts.map +1 -0
- package/dist/abis/Permit2ForwardAbi.d.ts +124 -0
- package/dist/abis/Permit2ForwardAbi.d.ts.map +1 -0
- package/dist/abis/ProtocolFeeControllerAbi.d.ts +276 -0
- package/dist/abis/ProtocolFeeControllerAbi.d.ts.map +1 -0
- package/dist/abis/VaultAbi.d.ts +669 -0
- package/dist/abis/VaultAbi.d.ts.map +1 -0
- package/dist/abis/index.d.ts +15 -0
- package/dist/abis/index.d.ts.map +1 -0
- package/dist/constants/abiStructFragments.d.ts +15 -0
- package/dist/constants/abiStructFragments.d.ts.map +1 -0
- package/dist/constants/actions.d.ts +43 -0
- package/dist/constants/actions.d.ts.map +1 -0
- package/dist/constants/actionsAbiParameters.d.ts +244 -0
- package/dist/constants/actionsAbiParameters.d.ts.map +1 -0
- package/dist/constants/addresses.d.ts +22 -0
- package/dist/constants/addresses.d.ts.map +1 -0
- package/dist/constants/binPool.d.ts +11 -0
- package/dist/constants/binPool.d.ts.map +1 -0
- package/dist/constants/fee.d.ts +21 -0
- package/dist/constants/fee.d.ts.map +1 -0
- package/dist/constants/hooksList/bsc.d.ts +8 -0
- package/dist/constants/hooksList/bsc.d.ts.map +1 -0
- package/dist/constants/hooksList/bscTestnet.d.ts +21 -0
- package/dist/constants/hooksList/bscTestnet.d.ts.map +1 -0
- package/dist/constants/hooksList/dynamicFeeHook.d.ts +15 -0
- package/dist/constants/hooksList/dynamicFeeHook.d.ts.map +1 -0
- package/dist/constants/hooksList/index.d.ts +14 -0
- package/dist/constants/hooksList/index.d.ts.map +1 -0
- package/dist/constants/index.d.ts +11 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/internalConstants.d.ts +11 -0
- package/dist/constants/internalConstants.d.ts.map +1 -0
- package/dist/entities/index.d.ts +2 -0
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/entities/pool.d.ts +104 -0
- package/dist/entities/pool.d.ts.map +1 -0
- package/dist/functions/bin/addBinLiquidityMulticall.d.ts +22 -0
- package/dist/functions/bin/addBinLiquidityMulticall.d.ts.map +1 -0
- package/dist/functions/bin/calldatas/addLiquidity.d.ts +18 -0
- package/dist/functions/bin/calldatas/addLiquidity.d.ts.map +1 -0
- package/dist/functions/bin/calldatas/index.d.ts +7 -0
- package/dist/functions/bin/calldatas/index.d.ts.map +1 -0
- package/dist/functions/bin/calldatas/initializePool.d.ts +3 -0
- package/dist/functions/bin/calldatas/initializePool.d.ts.map +1 -0
- package/dist/functions/bin/calldatas/liquidity.d.ts +1 -0
- package/dist/functions/bin/calldatas/liquidity.d.ts.map +1 -0
- package/dist/functions/bin/calldatas/mint.d.ts +15 -0
- package/dist/functions/bin/calldatas/mint.d.ts.map +1 -0
- package/dist/functions/bin/calldatas/modifyLiquidities.d.ts +3 -0
- package/dist/functions/bin/calldatas/modifyLiquidities.d.ts.map +1 -0
- package/dist/functions/bin/calldatas/removeLiquidity.d.ts +15 -0
- package/dist/functions/bin/calldatas/removeLiquidity.d.ts.map +1 -0
- package/dist/functions/bin/calldatas/swap.d.ts +4 -0
- package/dist/functions/bin/calldatas/swap.d.ts.map +1 -0
- package/dist/functions/bin/createBinPool.d.ts +62 -0
- package/dist/functions/bin/createBinPool.d.ts.map +1 -0
- package/dist/functions/bin/decodeBinAmount.d.ts +16 -0
- package/dist/functions/bin/decodeBinAmount.d.ts.map +1 -0
- package/dist/functions/bin/getAmounts.d.ts +26 -0
- package/dist/functions/bin/getAmounts.d.ts.map +1 -0
- package/dist/functions/bin/getBinLiquidityConfigs.d.ts +7 -0
- package/dist/functions/bin/getBinLiquidityConfigs.d.ts.map +1 -0
- package/dist/functions/bin/getBinPoolTokenPrice.d.ts +4 -0
- package/dist/functions/bin/getBinPoolTokenPrice.d.ts.map +1 -0
- package/dist/functions/bin/getExternalFeeAmt.d.ts +6 -0
- package/dist/functions/bin/getExternalFeeAmt.d.ts.map +1 -0
- package/dist/functions/bin/getFeeAmount.d.ts +8 -0
- package/dist/functions/bin/getFeeAmount.d.ts.map +1 -0
- package/dist/functions/bin/getFeeAmountFrom.d.ts +9 -0
- package/dist/functions/bin/getFeeAmountFrom.d.ts.map +1 -0
- package/dist/functions/bin/getIdFromPrice.d.ts +11 -0
- package/dist/functions/bin/getIdFromPrice.d.ts.map +1 -0
- package/dist/functions/bin/getIdSlippage.d.ts +2 -0
- package/dist/functions/bin/getIdSlippage.d.ts.map +1 -0
- package/dist/functions/bin/getLiquidityShape.d.ts +32 -0
- package/dist/functions/bin/getLiquidityShape.d.ts.map +1 -0
- package/dist/functions/bin/getNextNonEmptyBin.d.ts +15 -0
- package/dist/functions/bin/getNextNonEmptyBin.d.ts.map +1 -0
- package/dist/functions/bin/getPriceFromId.d.ts +13 -0
- package/dist/functions/bin/getPriceFromId.d.ts.map +1 -0
- package/dist/functions/bin/index.d.ts +17 -0
- package/dist/functions/bin/index.d.ts.map +1 -0
- package/dist/functions/bin/liquidityConfigs.d.ts +15 -0
- package/dist/functions/bin/liquidityConfigs.d.ts.map +1 -0
- package/dist/functions/bin/parseReserveOfBin.d.ts +11 -0
- package/dist/functions/bin/parseReserveOfBin.d.ts.map +1 -0
- package/dist/functions/bin/priceConvert.d.ts +3 -0
- package/dist/functions/bin/priceConvert.d.ts.map +1 -0
- package/dist/functions/bin/swap.d.ts +20 -0
- package/dist/functions/bin/swap.d.ts.map +1 -0
- package/dist/functions/clamm/addCLLiquidityMulticall.d.ts +18 -0
- package/dist/functions/clamm/addCLLiquidityMulticall.d.ts.map +1 -0
- package/dist/functions/clamm/calldatas/burn.d.ts +4 -0
- package/dist/functions/clamm/calldatas/burn.d.ts.map +1 -0
- package/dist/functions/clamm/calldatas/claim.d.ts +9 -0
- package/dist/functions/clamm/calldatas/claim.d.ts.map +1 -0
- package/dist/functions/clamm/calldatas/decreaseLiquidity.d.ts +14 -0
- package/dist/functions/clamm/calldatas/decreaseLiquidity.d.ts.map +1 -0
- package/dist/functions/clamm/calldatas/donate.d.ts +4 -0
- package/dist/functions/clamm/calldatas/donate.d.ts.map +1 -0
- package/dist/functions/clamm/calldatas/increaseLiquidity.d.ts +4 -0
- package/dist/functions/clamm/calldatas/increaseLiquidity.d.ts.map +1 -0
- package/dist/functions/clamm/calldatas/index.d.ts +12 -0
- package/dist/functions/clamm/calldatas/index.d.ts.map +1 -0
- package/dist/functions/clamm/calldatas/initialize.d.ts +3 -0
- package/dist/functions/clamm/calldatas/initialize.d.ts.map +1 -0
- package/dist/functions/clamm/calldatas/initializePool.d.ts +3 -0
- package/dist/functions/clamm/calldatas/initializePool.d.ts.map +1 -0
- package/dist/functions/clamm/calldatas/mint.d.ts +4 -0
- package/dist/functions/clamm/calldatas/mint.d.ts.map +1 -0
- package/dist/functions/clamm/calldatas/modifyLiquidities.d.ts +3 -0
- package/dist/functions/clamm/calldatas/modifyLiquidities.d.ts.map +1 -0
- package/dist/functions/clamm/calldatas/modifyLiquidity.d.ts +10 -0
- package/dist/functions/clamm/calldatas/modifyLiquidity.d.ts.map +1 -0
- package/dist/functions/clamm/calldatas/swap.d.ts +9 -0
- package/dist/functions/clamm/calldatas/swap.d.ts.map +1 -0
- package/dist/functions/clamm/getCLPool.d.ts +6 -0
- package/dist/functions/clamm/getCLPool.d.ts.map +1 -0
- package/dist/functions/clamm/index.d.ts +5 -0
- package/dist/functions/clamm/index.d.ts.map +1 -0
- package/dist/functions/getPool.d.ts +19 -0
- package/dist/functions/getPool.d.ts.map +1 -0
- package/dist/functions/hooks/index.d.ts +2 -0
- package/dist/functions/hooks/index.d.ts.map +1 -0
- package/dist/functions/hooks/isDynamicFeeHook.d.ts +5 -0
- package/dist/functions/hooks/isDynamicFeeHook.d.ts.map +1 -0
- package/dist/functions/index.d.ts +5 -0
- package/dist/functions/index.d.ts.map +1 -0
- package/dist/functions/tick.d.ts +3 -0
- package/dist/functions/tick.d.ts.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7578 -0
- package/dist/index.mjs +7430 -0
- package/dist/types.d.ts +183 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/ActionsPlanner.d.ts +32 -0
- package/dist/utils/ActionsPlanner.d.ts.map +1 -0
- package/dist/utils/calculateSwapFee.d.ts +11 -0
- package/dist/utils/calculateSwapFee.d.ts.map +1 -0
- package/dist/utils/convertBinIdsToRelative.d.ts +12 -0
- package/dist/utils/convertBinIdsToRelative.d.ts.map +1 -0
- package/dist/utils/decodeHooksRegistration.d.ts +4 -0
- package/dist/utils/decodeHooksRegistration.d.ts.map +1 -0
- package/dist/utils/decodePoolKey.d.ts +3 -0
- package/dist/utils/decodePoolKey.d.ts.map +1 -0
- package/dist/utils/decodePoolParameters.d.ts +4 -0
- package/dist/utils/decodePoolParameters.d.ts.map +1 -0
- package/dist/utils/encodeHooksRegistration.d.ts +4 -0
- package/dist/utils/encodeHooksRegistration.d.ts.map +1 -0
- package/dist/utils/encodeMulticall.d.ts +3 -0
- package/dist/utils/encodeMulticall.d.ts.map +1 -0
- package/dist/utils/encodePermit2.d.ts +6 -0
- package/dist/utils/encodePermit2.d.ts.map +1 -0
- package/dist/utils/encodePoolKey.d.ts +9 -0
- package/dist/utils/encodePoolKey.d.ts.map +1 -0
- package/dist/utils/encodePoolParameters.d.ts +5 -0
- package/dist/utils/encodePoolParameters.d.ts.map +1 -0
- package/dist/utils/getAddLiquidityParameters.d.ts +66 -0
- package/dist/utils/getAddLiquidityParameters.d.ts.map +1 -0
- package/dist/utils/getBinIds.d.ts +9 -0
- package/dist/utils/getBinIds.d.ts.map +1 -0
- package/dist/utils/getIsInitializedByPoolKey.d.ts +4 -0
- package/dist/utils/getIsInitializedByPoolKey.d.ts.map +1 -0
- package/dist/utils/getPoolId.d.ts +10 -0
- package/dist/utils/getPoolId.d.ts.map +1 -0
- package/dist/utils/index.d.ts +17 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/isInfinitySupported.d.ts +6 -0
- package/dist/utils/isInfinitySupported.d.ts.map +1 -0
- package/dist/utils/math/TreeMath.d.ts +12 -0
- package/dist/utils/math/TreeMath.d.ts.map +1 -0
- package/dist/utils/math/index.d.ts +4 -0
- package/dist/utils/math/index.d.ts.map +1 -0
- package/dist/utils/math/mulShift.d.ts +3 -0
- package/dist/utils/math/mulShift.d.ts.map +1 -0
- package/dist/utils/math/shiftDiv.d.ts +3 -0
- package/dist/utils/math/shiftDiv.d.ts.map +1 -0
- package/dist/utils/parseProtocolFee.d.ts +4 -0
- package/dist/utils/parseProtocolFee.d.ts.map +1 -0
- package/dist/utils/poolIdToPoolKey.d.ts +17 -0
- package/dist/utils/poolIdToPoolKey.d.ts.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abiStructFragments.d.ts","sourceRoot":"","sources":["../../src/constants/abiStructFragments.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB,UAQ7B,CAAA;AAEH,eAAO,MAAM,mBAAmB,UAQ7B,CAAA;AAEH,eAAO,MAAM,0BAA0B,UAStC,CAAA;AAED,eAAO,MAAM,4CAA4C,UAWxD,CAAA;AAED,eAAO,MAAM,qCAAqC,UAUjD,CAAA;AAED,eAAO,MAAM,6CAA6C,UAWzD,CAAA;AAED,eAAO,MAAM,sCAAsC,UAUlD,CAAA;AAED,eAAO,MAAM,+CAA+C,UAgB3D,CAAA;AAED,eAAO,MAAM,mCAAmC,UAkB/C,CAAA;AACD,eAAO,MAAM,sCAAsC,UAalD,CAAA;AAED,eAAO,MAAM,6CAA6C,UAWzD,CAAA;AAED,eAAO,MAAM,sCAAsC,UAUlD,CAAA;AAED,eAAO,MAAM,8CAA8C,UAW1D,CAAA;AAED,eAAO,MAAM,uCAAuC,UAUnD,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare enum ACTIONS {
|
|
2
|
+
CL_INCREASE_LIQUIDITY = 0,
|
|
3
|
+
CL_DECREASE_LIQUIDITY = 1,
|
|
4
|
+
CL_MINT_POSITION = 2,
|
|
5
|
+
CL_BURN_POSITION = 3,
|
|
6
|
+
CL_INCREASE_LIQUIDITY_FROM_DELTAS = 4,
|
|
7
|
+
CL_MINT_POSITION_FROM_DELTAS = 5,
|
|
8
|
+
CL_SWAP_EXACT_IN_SINGLE = 6,
|
|
9
|
+
CL_SWAP_EXACT_IN = 7,
|
|
10
|
+
CL_SWAP_EXACT_OUT_SINGLE = 8,
|
|
11
|
+
CL_SWAP_EXACT_OUT = 9,
|
|
12
|
+
CL_DONATE = 10,
|
|
13
|
+
SETTLE = 11,
|
|
14
|
+
SETTLE_ALL = 12,
|
|
15
|
+
SETTLE_PAIR = 13,
|
|
16
|
+
TAKE = 14,
|
|
17
|
+
TAKE_ALL = 15,
|
|
18
|
+
TAKE_PORTION = 16,
|
|
19
|
+
TAKE_PAIR = 17,
|
|
20
|
+
CLOSE_CURRENCY = 18,
|
|
21
|
+
CLEAR_OR_TAKE = 19,
|
|
22
|
+
SWEEP = 20,
|
|
23
|
+
WRAP = 21,
|
|
24
|
+
UNWRAP = 22,
|
|
25
|
+
MINT_6909 = 23,
|
|
26
|
+
BURN_6909 = 24,
|
|
27
|
+
BIN_ADD_LIQUIDITY = 25,
|
|
28
|
+
BIN_REMOVE_LIQUIDITY = 26,
|
|
29
|
+
BIN_ADD_LIQUIDITY_FROM_DELTAS = 27,
|
|
30
|
+
BIN_SWAP_EXACT_IN_SINGLE = 28,
|
|
31
|
+
BIN_SWAP_EXACT_IN = 29,
|
|
32
|
+
BIN_SWAP_EXACT_OUT_SINGLE = 30,
|
|
33
|
+
BIN_SWAP_EXACT_OUT = 31,
|
|
34
|
+
BIN_DONATE = 32
|
|
35
|
+
}
|
|
36
|
+
export type Action = (typeof ACTIONS)[keyof typeof ACTIONS];
|
|
37
|
+
export declare const ACTION_CONSTANTS: {
|
|
38
|
+
readonly OPEN_DELTA: 0n;
|
|
39
|
+
readonly CONTRACT_BALANCE: "0x8000000000000000000000000000000000000000000000000000000000000000";
|
|
40
|
+
readonly MSG_SENDER: "0x0000000000000000000000000000000000000001";
|
|
41
|
+
readonly ADDRESS_THIS: "0x0000000000000000000000000000000000000002";
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/constants/actions.ts"],"names":[],"mappings":"AAAA,oBAAY,OAAO;IAEjB,qBAAqB,IAAO;IAC5B,qBAAqB,IAAO;IAC5B,gBAAgB,IAAO;IACvB,gBAAgB,IAAO;IACvB,iCAAiC,IAAO;IACxC,4BAA4B,IAAO;IAGnC,uBAAuB,IAAO;IAC9B,gBAAgB,IAAO;IACvB,wBAAwB,IAAO;IAC/B,iBAAiB,IAAO;IAIxB,SAAS,KAAO;IAIhB,MAAM,KAAO;IACb,UAAU,KAAO;IACjB,WAAW,KAAO;IAElB,IAAI,KAAO;IACX,QAAQ,KAAO;IACf,YAAY,KAAO;IACnB,SAAS,KAAO;IAEhB,cAAc,KAAO;IACrB,aAAa,KAAO;IACpB,KAAK,KAAO;IACZ,IAAI,KAAO;IACX,MAAM,KAAO;IAIb,SAAS,KAAO;IAChB,SAAS,KAAO;IAIhB,iBAAiB,KAAO;IACxB,oBAAoB,KAAO;IAC3B,6BAA6B,KAAO;IAEpC,wBAAwB,KAAO;IAC/B,iBAAiB,KAAO;IACxB,yBAAyB,KAAO;IAChC,kBAAkB,KAAO;IAEzB,UAAU,KAAO;CAClB;AAED,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAA;AAE3D,eAAO,MAAM,gBAAgB;;;;;CAKnB,CAAA"}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { AbiParameter, AbiParameterKind, AbiParameterToPrimitiveType, Prettify } from 'viem';
|
|
2
|
+
export declare const ACTIONS_ABI: {
|
|
3
|
+
0: readonly [{
|
|
4
|
+
readonly type: "uint256";
|
|
5
|
+
readonly name: "tokenId";
|
|
6
|
+
}, {
|
|
7
|
+
readonly type: "uint128";
|
|
8
|
+
readonly name: "liquidity";
|
|
9
|
+
}, {
|
|
10
|
+
readonly type: "uint128";
|
|
11
|
+
readonly name: "amount0Max";
|
|
12
|
+
}, {
|
|
13
|
+
readonly type: "uint128";
|
|
14
|
+
readonly name: "amount1Max";
|
|
15
|
+
}, {
|
|
16
|
+
readonly type: "bytes";
|
|
17
|
+
readonly name: "hookData";
|
|
18
|
+
}];
|
|
19
|
+
1: readonly [{
|
|
20
|
+
readonly type: "uint256";
|
|
21
|
+
readonly name: "tokenId";
|
|
22
|
+
}, {
|
|
23
|
+
readonly type: "uint128";
|
|
24
|
+
readonly name: "liquidity";
|
|
25
|
+
}, {
|
|
26
|
+
readonly type: "uint128";
|
|
27
|
+
readonly name: "amount0Min";
|
|
28
|
+
}, {
|
|
29
|
+
readonly type: "uint128";
|
|
30
|
+
readonly name: "amount1Min";
|
|
31
|
+
}, {
|
|
32
|
+
readonly type: "bytes";
|
|
33
|
+
readonly name: "hookData";
|
|
34
|
+
}];
|
|
35
|
+
2: readonly [{
|
|
36
|
+
readonly type: "PositionConfig";
|
|
37
|
+
readonly name: "positionConfig";
|
|
38
|
+
}, {
|
|
39
|
+
readonly type: "uint128";
|
|
40
|
+
readonly name: "liquidity";
|
|
41
|
+
}, {
|
|
42
|
+
readonly type: "uint128";
|
|
43
|
+
readonly name: "amount0Max";
|
|
44
|
+
}, {
|
|
45
|
+
readonly type: "uint128";
|
|
46
|
+
readonly name: "amount1Max";
|
|
47
|
+
}, {
|
|
48
|
+
readonly type: "address";
|
|
49
|
+
readonly name: "owner";
|
|
50
|
+
}, {
|
|
51
|
+
readonly type: "bytes";
|
|
52
|
+
readonly name: "hookData";
|
|
53
|
+
}];
|
|
54
|
+
3: readonly [{
|
|
55
|
+
readonly type: "uint256";
|
|
56
|
+
readonly name: "tokenId";
|
|
57
|
+
}, {
|
|
58
|
+
readonly type: "PositionConfig";
|
|
59
|
+
readonly name: "config";
|
|
60
|
+
}, {
|
|
61
|
+
readonly type: "uint128";
|
|
62
|
+
readonly name: "amount0Min";
|
|
63
|
+
}, {
|
|
64
|
+
readonly type: "uint128";
|
|
65
|
+
readonly name: "amount1Min";
|
|
66
|
+
}, {
|
|
67
|
+
readonly type: "bytes";
|
|
68
|
+
readonly name: "hookData";
|
|
69
|
+
}];
|
|
70
|
+
4: readonly [{
|
|
71
|
+
readonly type: "uint256";
|
|
72
|
+
readonly name: "tokenId";
|
|
73
|
+
}, {
|
|
74
|
+
readonly type: "uint128";
|
|
75
|
+
readonly name: "amount0Max";
|
|
76
|
+
}, {
|
|
77
|
+
readonly type: "uint128";
|
|
78
|
+
readonly name: "amount1Max";
|
|
79
|
+
}, {
|
|
80
|
+
readonly type: "bytes";
|
|
81
|
+
readonly name: "hookData";
|
|
82
|
+
}];
|
|
83
|
+
5: readonly [{
|
|
84
|
+
readonly type: "PoolKey";
|
|
85
|
+
readonly name: "poolKey";
|
|
86
|
+
}, {
|
|
87
|
+
readonly type: "int24";
|
|
88
|
+
readonly name: "tickLower";
|
|
89
|
+
}, {
|
|
90
|
+
readonly type: "int24";
|
|
91
|
+
readonly name: "tickUpper";
|
|
92
|
+
}, {
|
|
93
|
+
readonly type: "uint128";
|
|
94
|
+
readonly name: "amount0Max";
|
|
95
|
+
}, {
|
|
96
|
+
readonly type: "uint128";
|
|
97
|
+
readonly name: "amount1Max";
|
|
98
|
+
}, {
|
|
99
|
+
readonly type: "address";
|
|
100
|
+
readonly name: "owner";
|
|
101
|
+
}, {
|
|
102
|
+
readonly type: "bytes";
|
|
103
|
+
readonly name: "hookData";
|
|
104
|
+
}];
|
|
105
|
+
6: readonly [{
|
|
106
|
+
readonly type: "CLSwapExactInputSingleParams";
|
|
107
|
+
readonly name: "params";
|
|
108
|
+
}];
|
|
109
|
+
7: readonly [{
|
|
110
|
+
readonly type: "CLSwapExactInputParams";
|
|
111
|
+
readonly name: "params";
|
|
112
|
+
}];
|
|
113
|
+
8: readonly [{
|
|
114
|
+
readonly type: "CLSwapExactOutputSingleParams";
|
|
115
|
+
readonly name: "params";
|
|
116
|
+
}];
|
|
117
|
+
9: readonly [{
|
|
118
|
+
readonly type: "CLSwapExactOutputParams";
|
|
119
|
+
readonly name: "params";
|
|
120
|
+
}];
|
|
121
|
+
11: readonly [{
|
|
122
|
+
readonly type: "address";
|
|
123
|
+
readonly name: "currency";
|
|
124
|
+
}, {
|
|
125
|
+
readonly type: "uint256";
|
|
126
|
+
readonly name: "amount";
|
|
127
|
+
}, {
|
|
128
|
+
readonly type: "bool";
|
|
129
|
+
readonly name: "payerIsUser";
|
|
130
|
+
}];
|
|
131
|
+
12: readonly [{
|
|
132
|
+
readonly type: "address";
|
|
133
|
+
readonly name: "currency";
|
|
134
|
+
}, {
|
|
135
|
+
readonly type: "uint256";
|
|
136
|
+
readonly name: "maxAmount";
|
|
137
|
+
}];
|
|
138
|
+
13: readonly [{
|
|
139
|
+
readonly type: "address";
|
|
140
|
+
readonly name: "currency0";
|
|
141
|
+
}, {
|
|
142
|
+
readonly type: "address";
|
|
143
|
+
readonly name: "currency1";
|
|
144
|
+
}];
|
|
145
|
+
14: readonly [{
|
|
146
|
+
readonly type: "address";
|
|
147
|
+
readonly name: "currency";
|
|
148
|
+
}, {
|
|
149
|
+
readonly type: "address";
|
|
150
|
+
readonly name: "recipient";
|
|
151
|
+
}, {
|
|
152
|
+
readonly type: "uint256";
|
|
153
|
+
readonly name: "amount";
|
|
154
|
+
}];
|
|
155
|
+
15: readonly [{
|
|
156
|
+
readonly type: "address";
|
|
157
|
+
readonly name: "currency";
|
|
158
|
+
}, {
|
|
159
|
+
readonly type: "uint256";
|
|
160
|
+
readonly name: "minAmount";
|
|
161
|
+
}];
|
|
162
|
+
16: readonly [{
|
|
163
|
+
readonly type: "address";
|
|
164
|
+
readonly name: "currency";
|
|
165
|
+
}, {
|
|
166
|
+
readonly type: "address";
|
|
167
|
+
readonly name: "recipient";
|
|
168
|
+
}, {
|
|
169
|
+
readonly type: "uint256";
|
|
170
|
+
readonly name: "bips";
|
|
171
|
+
}];
|
|
172
|
+
17: readonly [{
|
|
173
|
+
readonly type: "address";
|
|
174
|
+
readonly name: "currency0";
|
|
175
|
+
}, {
|
|
176
|
+
readonly type: "address";
|
|
177
|
+
readonly name: "currency1";
|
|
178
|
+
}, {
|
|
179
|
+
readonly type: "address";
|
|
180
|
+
readonly name: "to";
|
|
181
|
+
}];
|
|
182
|
+
18: readonly [{
|
|
183
|
+
readonly type: "address";
|
|
184
|
+
readonly name: "currency";
|
|
185
|
+
}];
|
|
186
|
+
19: readonly [{
|
|
187
|
+
readonly type: "address";
|
|
188
|
+
readonly name: "currency";
|
|
189
|
+
}, {
|
|
190
|
+
readonly type: "uint256";
|
|
191
|
+
readonly name: "amountMax";
|
|
192
|
+
}];
|
|
193
|
+
20: readonly [{
|
|
194
|
+
readonly type: "address";
|
|
195
|
+
readonly name: "currency";
|
|
196
|
+
}, {
|
|
197
|
+
readonly type: "address";
|
|
198
|
+
readonly name: "to";
|
|
199
|
+
}];
|
|
200
|
+
21: readonly [{
|
|
201
|
+
readonly type: "uint256";
|
|
202
|
+
readonly name: "amount";
|
|
203
|
+
}];
|
|
204
|
+
22: readonly [{
|
|
205
|
+
readonly type: "uint256";
|
|
206
|
+
readonly name: "amount";
|
|
207
|
+
}];
|
|
208
|
+
25: readonly [{
|
|
209
|
+
readonly type: "BinAddLiquidityParams";
|
|
210
|
+
readonly name: "params";
|
|
211
|
+
}];
|
|
212
|
+
26: readonly [{
|
|
213
|
+
readonly type: "BinRemoveLiquidityParams";
|
|
214
|
+
readonly name: "params";
|
|
215
|
+
}];
|
|
216
|
+
27: readonly [{
|
|
217
|
+
readonly type: "BinAddLiquidityFromDeltasParams";
|
|
218
|
+
readonly name: "params";
|
|
219
|
+
}];
|
|
220
|
+
28: readonly [{
|
|
221
|
+
readonly type: "BinSwapExactInputSingleParams";
|
|
222
|
+
readonly name: "params";
|
|
223
|
+
}];
|
|
224
|
+
29: readonly [{
|
|
225
|
+
readonly type: "BinSwapExactInputParams";
|
|
226
|
+
readonly name: "params";
|
|
227
|
+
}];
|
|
228
|
+
30: readonly [{
|
|
229
|
+
readonly type: "BinSwapExactOutputSingleParams";
|
|
230
|
+
readonly name: "params";
|
|
231
|
+
}];
|
|
232
|
+
31: readonly [{
|
|
233
|
+
readonly type: "BinSwapExactOutputParams";
|
|
234
|
+
readonly name: "params";
|
|
235
|
+
}];
|
|
236
|
+
};
|
|
237
|
+
type AbiParametersToPrimitiveTypes<TAbiParameters extends readonly AbiParameter[], TAbiParameterKind extends AbiParameterKind = AbiParameterKind> = Prettify<{
|
|
238
|
+
[K in keyof TAbiParameters]: AbiParameterToPrimitiveType<TAbiParameters[K], TAbiParameterKind>;
|
|
239
|
+
}>;
|
|
240
|
+
export type InfinityABIType = typeof ACTIONS_ABI;
|
|
241
|
+
export type InfinityUsedAction = keyof InfinityABIType;
|
|
242
|
+
export type InfinityABIParametersToValuesType<TAction extends InfinityUsedAction> = AbiParametersToPrimitiveTypes<InfinityABIType[TAction]>;
|
|
243
|
+
export {};
|
|
244
|
+
//# sourceMappingURL=actionsAbiParameters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actionsAbiParameters.d.ts","sourceRoot":"","sources":["../../src/constants/actionsAbiParameters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,2BAA2B,EAAsB,QAAQ,EAAE,MAAM,MAAM,CAAA;AAkBhH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4HvB,CAAA;AAED,KAAK,6BAA6B,CAChC,cAAc,SAAS,SAAS,YAAY,EAAE,EAC9C,iBAAiB,SAAS,gBAAgB,GAAG,gBAAgB,IAC3D,QAAQ,CAAC;KACV,CAAC,IAAI,MAAM,cAAc,GAAG,2BAA2B,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC;CAC/F,CAAC,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,OAAO,WAAW,CAAA;AAChD,MAAM,MAAM,kBAAkB,GAAG,MAAM,eAAe,CAAA;AACtD,MAAM,MAAM,iCAAiC,CAAC,OAAO,SAAS,kBAAkB,IAAI,6BAA6B,CAC/G,eAAe,CAAC,OAAO,CAAC,CACzB,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ChainId } from '@pancakeswap/chains';
|
|
2
|
+
import { Address } from 'viem';
|
|
3
|
+
export declare const INFINITY_SUPPORTED_CHAINS: readonly [ChainId.BSC, ChainId.BSC_TESTNET, ChainId.SEPOLIA];
|
|
4
|
+
export type InfinitySupportedChains = (typeof INFINITY_SUPPORTED_CHAINS)[number];
|
|
5
|
+
export declare const INFI_VAULT_ADDRESSES: Record<InfinitySupportedChains, Address>;
|
|
6
|
+
export declare const INFI_CL_POOL_MANAGER_ADDRESSES: Record<InfinitySupportedChains, Address>;
|
|
7
|
+
export declare const INFI_BIN_POOL_MANAGER_ADDRESSES: Record<InfinitySupportedChains, Address>;
|
|
8
|
+
export declare const INFI_CL_POSITION_MANAGER_ADDRESSES: Record<InfinitySupportedChains, Address>;
|
|
9
|
+
export declare const INFI_BIN_POSITION_MANAGER_ADDRESSES: Record<InfinitySupportedChains, Address>;
|
|
10
|
+
export declare const INFI_CL_QUOTER_ADDRESSES: Record<InfinitySupportedChains, Address>;
|
|
11
|
+
export declare const INFI_BIN_QUOTER_ADDRESSES: Record<InfinitySupportedChains, Address>;
|
|
12
|
+
export declare const INFI_MIXED_QUOTER_ADDRESSES: Record<InfinitySupportedChains, Address>;
|
|
13
|
+
export declare const INFI_CL_MIGRATOR_ADDRESSES: Record<InfinitySupportedChains, Address>;
|
|
14
|
+
export declare const INFI_BIN_MIGRATOR_ADDRESSES: Record<InfinitySupportedChains, Address>;
|
|
15
|
+
export declare const INFI_CL_LP_FEES_HELPER_ADDRESSES: Record<InfinitySupportedChains, Address>;
|
|
16
|
+
export declare const INFI_FARMING_DISTRIBUTOR_ADDRESSES: Record<InfinitySupportedChains, Address>;
|
|
17
|
+
export declare const INFI_CL_PROTOCOL_FEE_CONTROLLER_ADDRESSES: Record<InfinitySupportedChains, Address>;
|
|
18
|
+
export declare const INFI_BIN_PROTOCOL_FEE_CONTROLLER_ADDRESSES: Record<InfinitySupportedChains, Address>;
|
|
19
|
+
export declare const INFI_CL_TICK_LENS_ADDRESSES: {
|
|
20
|
+
[key in ChainId]?: Address;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=addresses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../../src/constants/addresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAE9B,eAAO,MAAM,yBAAyB,8DAA+D,CAAA;AAErG,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEhF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,uBAAuB,EAAE,OAAO,CAIzE,CAAA;AAED,eAAO,MAAM,8BAA8B,EAAE,MAAM,CAAC,uBAAuB,EAAE,OAAO,CAInF,CAAA;AAED,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,uBAAuB,EAAE,OAAO,CAIpF,CAAA;AAED,eAAO,MAAM,kCAAkC,EAAE,MAAM,CAAC,uBAAuB,EAAE,OAAO,CAIvF,CAAA;AAED,eAAO,MAAM,mCAAmC,EAAE,MAAM,CAAC,uBAAuB,EAAE,OAAO,CAIxF,CAAA;AAED,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,uBAAuB,EAAE,OAAO,CAI7E,CAAA;AAED,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,uBAAuB,EAAE,OAAO,CAI9E,CAAA;AAED,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,uBAAuB,EAAE,OAAO,CAIhF,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,uBAAuB,EAAE,OAAO,CAI/E,CAAA;AAED,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,uBAAuB,EAAE,OAAO,CAIhF,CAAA;AAED,eAAO,MAAM,gCAAgC,EAAE,MAAM,CAAC,uBAAuB,EAAE,OAAO,CAIrF,CAAA;AAED,eAAO,MAAM,kCAAkC,EAAE,MAAM,CAAC,uBAAuB,EAAE,OAAO,CAIvF,CAAA;AAED,eAAO,MAAM,yCAAyC,EAAE,MAAM,CAAC,uBAAuB,EAAE,OAAO,CAI9F,CAAA;AAED,eAAO,MAAM,0CAA0C,EAAE,MAAM,CAAC,uBAAuB,EAAE,OAAO,CAI/F,CAAA;AAED,eAAO,MAAM,2BAA2B,EAAE;KAAG,GAAG,IAAI,OAAO,CAAC,CAAC,EAAE,OAAO;CAGrE,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constants of the BinPool
|
|
3
|
+
*/
|
|
4
|
+
export declare const SCALE_OFFSET = 128n;
|
|
5
|
+
export declare const SCALE: bigint;
|
|
6
|
+
export declare const PRECISION: bigint;
|
|
7
|
+
export declare const SQUARED_PRECISION: bigint;
|
|
8
|
+
export declare const BASIS_POINT_MAX = 10000n;
|
|
9
|
+
export declare const REAL_ID_SHIFT: bigint;
|
|
10
|
+
export declare const BIN_SHAPE_DISTRIBUTION_SUM: bigint;
|
|
11
|
+
//# sourceMappingURL=binPool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binPool.d.ts","sourceRoot":"","sources":["../../src/constants/binPool.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,YAAY,OAAO,CAAA;AAGhC,eAAO,MAAM,KAAK,QAAqB,CAAA;AAEvC,eAAO,MAAM,SAAS,QAAe,CAAA;AAErC,eAAO,MAAM,iBAAiB,QAAe,CAAA;AAE7C,eAAO,MAAM,eAAe,SAAS,CAAA;AAGrC,eAAO,MAAM,aAAa,QAAY,CAAA;AAItC,eAAO,MAAM,0BAA0B,QAAe,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* max swap fee for a pool
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* for clamm, the max fee is 100%
|
|
6
|
+
*/
|
|
7
|
+
export declare const ONE_HUNDRED_PERCENT_FEE = 1000000n;
|
|
8
|
+
/**
|
|
9
|
+
* for bin pool, the max fee is 10%
|
|
10
|
+
*/
|
|
11
|
+
export declare const TEN_PERCENT_FEE = 100000n;
|
|
12
|
+
/**
|
|
13
|
+
* Max protocol fee is 0.1% (1000 pips)
|
|
14
|
+
*/
|
|
15
|
+
export declare const MAX_PROTOCOL_FEE = 1000n;
|
|
16
|
+
/**
|
|
17
|
+
* a dynamic fee pool must have exactly same value for fee field
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare const DYNAMIC_FEE_FLAG = 8388608;
|
|
21
|
+
//# sourceMappingURL=fee.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fee.d.ts","sourceRoot":"","sources":["../../src/constants/fee.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB,WAAa,CAAA;AAEjD;;GAEG;AACH,eAAO,MAAM,eAAe,UAAW,CAAA;AAEvC;;GAEG;AACH,eAAO,MAAM,gBAAgB,QAAS,CAAA;AAEtC;;;GAGG;AACH,eAAO,MAAM,gBAAgB,UAAW,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type HookData, type PoolType } from '../../types';
|
|
2
|
+
export declare const CL_DYNAMIC_HOOK: HookData;
|
|
3
|
+
export declare const bscHooksList: HookData[];
|
|
4
|
+
/**
|
|
5
|
+
* Dynamic hook for each pool type for auto-selection on "Dynamic" fee tier
|
|
6
|
+
*/
|
|
7
|
+
export declare const bscDynamicHooks: Record<PoolType, HookData | undefined>;
|
|
8
|
+
//# sourceMappingURL=bsc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bsc.d.ts","sourceRoot":"","sources":["../../../src/constants/hooksList/bsc.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsC,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAA;AAG9F,eAAO,MAAM,eAAe,EAAE,QAmB7B,CAAA;AAqBD,eAAO,MAAM,YAAY,EAAE,QAAQ,EAoFlC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAGlE,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HOOK_CATEGORY, POOL_TYPE, type HookData, type PoolType } from '../../types';
|
|
2
|
+
export declare const CL_DYNAMIC_HOOK: {
|
|
3
|
+
address: `0x${string}`;
|
|
4
|
+
name: string;
|
|
5
|
+
poolType: POOL_TYPE;
|
|
6
|
+
description: string;
|
|
7
|
+
github: string;
|
|
8
|
+
category: HOOK_CATEGORY[];
|
|
9
|
+
isVerified: boolean;
|
|
10
|
+
isUpgradable: boolean;
|
|
11
|
+
hooksRegistration: {
|
|
12
|
+
afterInitialize: boolean;
|
|
13
|
+
beforeSwap: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const bscTestnetHooksList: HookData[];
|
|
17
|
+
/**
|
|
18
|
+
* Dynamic hook for each pool type for auto-selection on "Dynamic" fee tier
|
|
19
|
+
*/
|
|
20
|
+
export declare const bscTestnetDynamicHooks: Record<PoolType, HookData>;
|
|
21
|
+
//# sourceMappingURL=bscTestnet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bscTestnet.d.ts","sourceRoot":"","sources":["../../../src/constants/hooksList/bscTestnet.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAA;AAGpF,eAAO,MAAM,eAAe;;;;;;;;;;;;;CAa3B,CAAA;AAmBD,eAAO,MAAM,mBAAmB,EAAE,QAAQ,EA+BzC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAG7D,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Address } from 'viem';
|
|
2
|
+
import { InfinitySupportedChains } from '../addresses';
|
|
3
|
+
export declare const CL_DYNAMIC_FEE_HOOK_REGISTRATION_BITMAP: {
|
|
4
|
+
readonly 56: "0x00C2";
|
|
5
|
+
readonly 97: "0x0042";
|
|
6
|
+
readonly 11155111: "0x0042";
|
|
7
|
+
};
|
|
8
|
+
export declare const BIN_DYNAMIC_FEE_HOOK_REGISTRATION_BITMAP = "0x0046";
|
|
9
|
+
export declare const CL_DYNAMIC_FEE_HOOKS_BY_CHAIN: {
|
|
10
|
+
[key in InfinitySupportedChains]: Address;
|
|
11
|
+
};
|
|
12
|
+
export declare const BIN_DYNAMIC_FEE_HOOKS_BY_CHAIN: {
|
|
13
|
+
[key in InfinitySupportedChains]: Address;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=dynamicFeeHook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamicFeeHook.d.ts","sourceRoot":"","sources":["../../../src/constants/hooksList/dynamicFeeHook.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEtD,eAAO,MAAM,uCAAuC;;;;CAI1C,CAAA;AAEV,eAAO,MAAM,wCAAwC,WAAW,CAAA;AAEhE,eAAO,MAAM,6BAA6B,EAAE;KAAG,GAAG,IAAI,uBAAuB,GAAG,OAAO;CAItF,CAAA;AAED,eAAO,MAAM,8BAA8B,EAAE;KAAG,GAAG,IAAI,uBAAuB,GAAG,OAAO;CAIvF,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChainId } from '@pancakeswap/chains';
|
|
2
|
+
export declare const hooksList: {
|
|
3
|
+
56: import("../..").HookData[];
|
|
4
|
+
97: import("../..").HookData[];
|
|
5
|
+
11155111: never[];
|
|
6
|
+
};
|
|
7
|
+
export declare const dynamicHooksList: {
|
|
8
|
+
56: Record<"CL" | "Bin", import("../..").HookData | undefined>;
|
|
9
|
+
97: Record<"CL" | "Bin", import("../..").HookData>;
|
|
10
|
+
11155111: never[];
|
|
11
|
+
};
|
|
12
|
+
export declare function findHook(hook: string, chainId: ChainId): import("../..").HookData | undefined;
|
|
13
|
+
export * from './dynamicFeeHook';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/hooksList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAI7C,eAAO,MAAM,SAAS;;;;CAIrB,CAAA;AAED,eAAO,MAAM,gBAAgB;;;;CAI5B,CAAA;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,wCAGtD;AAED,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const MAX_TICK_SPACING: bigint;
|
|
2
|
+
export declare const MIN_TICK_SPACING = 1n;
|
|
3
|
+
export declare const MIN_BIN_STEP = 1n;
|
|
4
|
+
export declare const MAX_BIN_STEP = 100n;
|
|
5
|
+
export { ACTION_CONSTANTS, ACTIONS } from './actions';
|
|
6
|
+
export * from './actionsAbiParameters';
|
|
7
|
+
export * from './addresses';
|
|
8
|
+
export * from './binPool';
|
|
9
|
+
export * from './fee';
|
|
10
|
+
export * from './hooksList';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,QAAW,CAAA;AACxC,eAAO,MAAM,gBAAgB,KAAK,CAAA;AAElC,eAAO,MAAM,YAAY,KAAK,CAAA;AAC9B,eAAO,MAAM,YAAY,OAAO,CAAA;AAEhC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACrD,cAAc,wBAAwB,CAAA;AACtC,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA;AACrB,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Percent } from '@pancakeswap/swap-sdk-core';
|
|
2
|
+
export declare const NEGATIVE_ONE: bigint;
|
|
3
|
+
export declare const ZERO = 0n;
|
|
4
|
+
export declare const ONE = 1n;
|
|
5
|
+
export declare const Q96: bigint;
|
|
6
|
+
export declare const Q192: bigint;
|
|
7
|
+
export declare const MAX_FEE: bigint;
|
|
8
|
+
export declare const ONE_HUNDRED_PERCENT: Percent;
|
|
9
|
+
export declare const ZERO_PERCENT: Percent;
|
|
10
|
+
export declare const Q128: bigint;
|
|
11
|
+
//# sourceMappingURL=internalConstants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internalConstants.d.ts","sourceRoot":"","sources":["../../src/constants/internalConstants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAGpD,eAAO,MAAM,YAAY,QAAa,CAAA;AACtC,eAAO,MAAM,IAAI,KAAK,CAAA;AACtB,eAAO,MAAM,GAAG,KAAK,CAAA;AAGrB,eAAO,MAAM,GAAG,QAAY,CAAA;AAC5B,eAAO,MAAM,IAAI,QAAY,CAAA;AAG7B,eAAO,MAAM,OAAO,QAAY,CAAA;AAChC,eAAO,MAAM,mBAAmB,SAAmB,CAAA;AACnD,eAAO,MAAM,YAAY,SAAmB,CAAA;AAC5C,eAAO,MAAM,IAAI,QAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { BigintIsh, CurrencyAmount, Price, Token } from '@pancakeswap/swap-sdk-core';
|
|
2
|
+
import { FeeAmount, Tick, TickConstructorArgs, TickDataProvider } from '@pancakeswap/v3-sdk';
|
|
3
|
+
import { Address, Hash } from 'viem';
|
|
4
|
+
import type { PoolType } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* Represents a Infinity pool
|
|
7
|
+
*/
|
|
8
|
+
export declare class Pool {
|
|
9
|
+
readonly token0: Token;
|
|
10
|
+
readonly token1: Token;
|
|
11
|
+
readonly fee: number;
|
|
12
|
+
readonly protocolFee: number;
|
|
13
|
+
sqrtRatioX96: bigint;
|
|
14
|
+
liquidity: bigint;
|
|
15
|
+
tickCurrent: number;
|
|
16
|
+
readonly tickDataProvider: TickDataProvider;
|
|
17
|
+
readonly dynamic?: boolean;
|
|
18
|
+
feeProtocol?: number;
|
|
19
|
+
readonly poolType: PoolType;
|
|
20
|
+
readonly tickSpacing: number;
|
|
21
|
+
private _token0Price?;
|
|
22
|
+
private _token1Price?;
|
|
23
|
+
static getAddress(tokenA: Token, tokenB: Token, fee: FeeAmount, initCodeHashManualOverride?: Hash, deployerAddressOverride?: Address): `0x${string}`;
|
|
24
|
+
/**
|
|
25
|
+
* Construct a pool
|
|
26
|
+
* @param tokenA One of the tokens in the pool
|
|
27
|
+
* @param tokenB The other token in the pool
|
|
28
|
+
* @param fee The fee in hundredths of a bips of the input amount of every swap that is collected by the pool
|
|
29
|
+
* @param sqrtRatioX96 The sqrt of the current ratio of amounts of token1 to token0
|
|
30
|
+
* @param liquidity The current value of in range liquidity
|
|
31
|
+
* @param tickCurrent The current tick of the pool
|
|
32
|
+
* @param ticks The current state of the pool ticks or a data provider that can return tick data
|
|
33
|
+
*/
|
|
34
|
+
constructor({ poolType, tokenA, tokenB, fee, protocolFee, sqrtRatioX96, liquidity, tickCurrent, ticks, tickSpacing, dynamic, }: {
|
|
35
|
+
poolType: PoolType;
|
|
36
|
+
tokenA: Token;
|
|
37
|
+
tokenB: Token;
|
|
38
|
+
fee: number;
|
|
39
|
+
protocolFee: number;
|
|
40
|
+
sqrtRatioX96: BigintIsh;
|
|
41
|
+
liquidity: BigintIsh;
|
|
42
|
+
tickCurrent: number;
|
|
43
|
+
ticks?: TickDataProvider | (Tick | TickConstructorArgs)[];
|
|
44
|
+
tickSpacing: number;
|
|
45
|
+
dynamic?: boolean;
|
|
46
|
+
});
|
|
47
|
+
/**
|
|
48
|
+
* Returns true if the token is either token0 or token1
|
|
49
|
+
* @param token The token to check
|
|
50
|
+
* @returns True if token is either token0 or token
|
|
51
|
+
*/
|
|
52
|
+
involvesToken(token: Token): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Returns the current mid price of the pool in terms of token0, i.e. the ratio of token1 over token0
|
|
55
|
+
*/
|
|
56
|
+
get token0Price(): Price<Token, Token>;
|
|
57
|
+
/**
|
|
58
|
+
* Returns the current mid price of the pool in terms of token1, i.e. the ratio of token0 over token1
|
|
59
|
+
*/
|
|
60
|
+
get token1Price(): Price<Token, Token>;
|
|
61
|
+
/**
|
|
62
|
+
* Return the price of the given token in terms of the other token in the pool.
|
|
63
|
+
* @param token The token to return price of
|
|
64
|
+
* @returns The price of the given token, in terms of the other.
|
|
65
|
+
*/
|
|
66
|
+
priceOf(token: Token): Price<Token, Token>;
|
|
67
|
+
/**
|
|
68
|
+
* Returns the chain ID of the tokens in the pool.
|
|
69
|
+
*/
|
|
70
|
+
get chainId(): number;
|
|
71
|
+
/**
|
|
72
|
+
* Given an input amount of a token, return the computed output amount, and a pool with state updated after the trade
|
|
73
|
+
* @param inputAmount The input amount for which to quote the output amount
|
|
74
|
+
* @param sqrtPriceLimitX96 The Q64.96 sqrt price limit
|
|
75
|
+
* @returns The output amount and the pool with updated state
|
|
76
|
+
*/
|
|
77
|
+
getOutputAmount(inputAmount: CurrencyAmount<Token>, sqrtPriceLimitX96?: bigint): Promise<[CurrencyAmount<Token>, Pool]>;
|
|
78
|
+
/**
|
|
79
|
+
* Given a desired output amount of a token, return the computed input amount and a pool with state updated after the trade
|
|
80
|
+
* @param outputAmount the output amount for which to quote the input amount
|
|
81
|
+
* @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this value after the swap. If one for zero, the price cannot be greater than this value after the swap
|
|
82
|
+
* @returns The input amount and the pool with updated state
|
|
83
|
+
*/
|
|
84
|
+
getInputAmount(outputAmount: CurrencyAmount<Token>, sqrtPriceLimitX96?: bigint): Promise<[CurrencyAmount<Token>, Pool]>;
|
|
85
|
+
/**
|
|
86
|
+
* Given a desired output amount of a token, return the computed input amount and a pool with state updated after the trade
|
|
87
|
+
* @param outputAmount the output amount for which to quote the input amount
|
|
88
|
+
* @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this value after the swap. If one for zero, the price cannot be greater than this value after the swap
|
|
89
|
+
* @returns The input amount and the pool with updated state
|
|
90
|
+
*/
|
|
91
|
+
getInputAmountByExactOut(outputAmount: CurrencyAmount<Token>, sqrtPriceLimitX96?: bigint): Promise<[CurrencyAmount<Token>, Pool]>;
|
|
92
|
+
/**
|
|
93
|
+
* Executes a swap
|
|
94
|
+
* @param zeroForOne Whether the amount in is token0 or token1
|
|
95
|
+
* @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)
|
|
96
|
+
* @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this value after the swap. If one for zero, the price cannot be greater than this value after the swap
|
|
97
|
+
* @returns amountCalculated
|
|
98
|
+
* @returns sqrtRatioX96
|
|
99
|
+
* @returns liquidity
|
|
100
|
+
* @returns tickCurrent
|
|
101
|
+
*/
|
|
102
|
+
private swap;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=pool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pool.d.ts","sourceRoot":"","sources":["../../src/entities/pool.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Address, Hex } from 'viem';
|
|
2
|
+
import { BinLiquidityShape, PoolKey, Permit2Signature } from '../../types';
|
|
3
|
+
export type AddBinLiquidityMulticallParams = {
|
|
4
|
+
isInitialized: boolean;
|
|
5
|
+
activeIdDesired: bigint | number;
|
|
6
|
+
idSlippage: bigint | number;
|
|
7
|
+
poolKey: PoolKey<'Bin'>;
|
|
8
|
+
lowerBinId: number;
|
|
9
|
+
upperBinId: number;
|
|
10
|
+
liquidityShape: BinLiquidityShape;
|
|
11
|
+
owner: Address;
|
|
12
|
+
amount0: bigint;
|
|
13
|
+
amount1: bigint;
|
|
14
|
+
amount0Max: bigint;
|
|
15
|
+
amount1Max: bigint;
|
|
16
|
+
token0Permit2Signature: Permit2Signature | undefined;
|
|
17
|
+
token1Permit2Signature: Permit2Signature | undefined;
|
|
18
|
+
modifyPositionHookData?: Hex;
|
|
19
|
+
deadline: bigint;
|
|
20
|
+
};
|
|
21
|
+
export declare const addBinLiquidityMulticall: ({ isInitialized, activeIdDesired, idSlippage, liquidityShape, lowerBinId, upperBinId, poolKey, amount0, amount1, amount0Max, amount1Max, owner, token1Permit2Signature, token0Permit2Signature, deadline, modifyPositionHookData, }: AddBinLiquidityMulticallParams) => `0x${string}`;
|
|
22
|
+
//# sourceMappingURL=addBinLiquidityMulticall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addBinLiquidityMulticall.d.ts","sourceRoot":"","sources":["../../../src/functions/bin/addBinLiquidityMulticall.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAa,MAAM,MAAM,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAU1E,MAAM,MAAM,8BAA8B,GAAG;IAC3C,aAAa,EAAE,OAAO,CAAA;IACtB,eAAe,EAAE,MAAM,GAAG,MAAM,CAAA;IAChC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,iBAAiB,CAAA;IACjC,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,sBAAsB,EAAE,gBAAgB,GAAG,SAAS,CAAA;IACpD,sBAAsB,EAAE,gBAAgB,GAAG,SAAS,CAAA;IACpD,sBAAsB,CAAC,EAAE,GAAG,CAAA;IAC5B,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,wBAAwB,wOAiBlC,8BAA8B,kBA0ChC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Address, Hex } from 'viem';
|
|
2
|
+
import { PoolKey } from '../../../types';
|
|
3
|
+
export type BinAddLiquidityParams = {
|
|
4
|
+
poolKey: PoolKey<'Bin'>;
|
|
5
|
+
amount0: bigint;
|
|
6
|
+
amount1: bigint;
|
|
7
|
+
amount0Max: bigint;
|
|
8
|
+
amount1Max: bigint;
|
|
9
|
+
activeIdDesired: bigint;
|
|
10
|
+
idSlippage: bigint;
|
|
11
|
+
deltaIds: number[];
|
|
12
|
+
to: Address;
|
|
13
|
+
distributionX: bigint[];
|
|
14
|
+
distributionY: bigint[];
|
|
15
|
+
hookData?: Hex;
|
|
16
|
+
};
|
|
17
|
+
export declare const encodeBinPositionManagerAddLiquidityCalldata: (params: BinAddLiquidityParams, deadline: bigint) => `0x${string}`;
|
|
18
|
+
//# sourceMappingURL=addLiquidity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addLiquidity.d.ts","sourceRoot":"","sources":["../../../../src/functions/bin/calldatas/addLiquidity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAe,MAAM,MAAM,CAAA;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAKxC,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAA;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,EAAE,EAAE,OAAO,CAAA;IACX,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,QAAQ,CAAC,EAAE,GAAG,CAAA;CACf,CAAA;AACD,eAAO,MAAM,4CAA4C,WAAY,qBAAqB,YAAY,MAAM,kBAgB3G,CAAA"}
|