@steerprotocol/sdk 1.30.7 → 1.30.8-test-algebra-plugins.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/cjs/const/amm/configs/ammConfig.js +2 -0
- package/dist/cjs/const/amm/configs/ammConfig.js.map +1 -1
- package/dist/cjs/const/amm/configs/protocols/quickswap-integral.js +5 -0
- package/dist/cjs/const/amm/configs/protocols/quickswap-integral.js.map +1 -1
- package/dist/cjs/const/amm/configs/protocols/uniswapv4.js +32 -0
- package/dist/cjs/const/amm/configs/protocols/uniswapv4.js.map +1 -0
- package/dist/cjs/const/amm/utils/beacon.js +4 -0
- package/dist/cjs/const/amm/utils/beacon.js.map +1 -1
- package/dist/cjs/const/chain.js +7 -3
- package/dist/cjs/const/chain.js.map +1 -1
- package/dist/cjs/const/protocol.js +87 -61
- package/dist/cjs/const/protocol.js.map +1 -1
- package/dist/cjs/types.js.map +1 -1
- package/dist/esm/const/amm/configs/ammConfig.js +2 -0
- package/dist/esm/const/amm/configs/ammConfig.js.map +1 -1
- package/dist/esm/const/amm/configs/protocols/quickswap-integral.js +5 -0
- package/dist/esm/const/amm/configs/protocols/quickswap-integral.js.map +1 -1
- package/dist/esm/const/amm/configs/protocols/uniswapv4.js +32 -0
- package/dist/esm/const/amm/configs/protocols/uniswapv4.js.map +1 -0
- package/dist/esm/const/amm/utils/beacon.js +4 -0
- package/dist/esm/const/amm/utils/beacon.js.map +1 -1
- package/dist/esm/const/chain.js +7 -3
- package/dist/esm/const/chain.js.map +1 -1
- package/dist/esm/const/protocol.js +87 -61
- package/dist/esm/const/protocol.js.map +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/types/const/amm/configs/ammConfig.d.ts.map +1 -1
- package/dist/types/const/amm/configs/protocols/quickswap-integral.d.ts.map +1 -1
- package/dist/types/const/amm/configs/protocols/uniswapv4.d.ts +3 -0
- package/dist/types/const/amm/configs/protocols/uniswapv4.d.ts.map +1 -0
- package/dist/types/const/amm/utils/beacon.d.ts.map +1 -1
- package/dist/types/const/chain.d.ts +8 -4
- package/dist/types/const/chain.d.ts.map +1 -1
- package/dist/types/const/protocol.d.ts +18 -3
- package/dist/types/const/protocol.d.ts.map +1 -1
- package/dist/types/types.d.ts +5 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/const/amm/configs/ammConfig.ts +2 -0
- package/src/const/amm/configs/protocols/quickswap-integral.ts +5 -0
- package/src/const/amm/configs/protocols/uniswapv4.ts +31 -0
- package/src/const/amm/utils/beacon.ts +4 -0
- package/src/const/chain.ts +8 -4
- package/src/const/protocol.ts +31 -3
- package/src/types.ts +7 -3
|
@@ -34,6 +34,7 @@ const aerodrome_v2_js_1 = require("./protocols/aerodrome-v2.js");
|
|
|
34
34
|
const nest_js_1 = require("./protocols/nest.js");
|
|
35
35
|
const cypher_js_1 = require("./protocols/cypher.js");
|
|
36
36
|
const spark_integral_js_1 = require("./protocols/spark-integral.js");
|
|
37
|
+
const uniswapv4_js_1 = require("./protocols/uniswapv4.js");
|
|
37
38
|
const getAmmConfig = (theGraphApiKey) => {
|
|
38
39
|
return {
|
|
39
40
|
QuickSwap: (0, quickswap_js_1.quickSwapConfig)(theGraphApiKey),
|
|
@@ -97,6 +98,7 @@ const getAmmConfig = (theGraphApiKey) => {
|
|
|
97
98
|
Nest: (0, nest_js_1.nestVaultConfig)(),
|
|
98
99
|
Cypher: (0, cypher_js_1.cypherConfig)(theGraphApiKey),
|
|
99
100
|
SparkIntegral: (0, spark_integral_js_1.sparkIntegralConfig)(),
|
|
101
|
+
UniswapV4: (0, uniswapv4_js_1.uniswapV4Config)(theGraphApiKey),
|
|
100
102
|
};
|
|
101
103
|
};
|
|
102
104
|
exports.getAmmConfig = getAmmConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ammConfig.js","sourceRoot":"","sources":["../../../../../src/const/amm/configs/ammConfig.ts"],"names":[],"mappings":";;;AACA,mDA+B8B;AAC9B,2DAA2D;AAC3D,iDAAiD;AACjD,yDAAyD;AACzD,uDAAuD;AACvD,iDAAiD;AACjD,6DAA6D;AAC7D,iDAAiD;AACjD,mDAAmD;AACnD,qDAAqD;AACrD,qDAAqD;AACrD,+CAA+C;AAC/C,qDAAqD;AACrD,+DAA+D;AAC/D,2DAA2D;AAC3D,qDAAqD;AACrD,6DAA6D;AAC7D,6DAA6D;AAC7D,6DAA6D;AAC7D,mDAAmD;AACnD,mDAAmD;AACnD,mDAAmD;AACnD,uDAAuD;AACvD,uDAAuD;AACvD,uDAAuD;AACvD,yDAAyD;AACzD,qEAAqE;AACrE,8DAA8D;AAC9D,2DAA2D;AAC3D,iEAAgE;AAChE,iDAAsD;AACtD,qDAAqD;AACrD,qEAAoE;
|
|
1
|
+
{"version":3,"file":"ammConfig.js","sourceRoot":"","sources":["../../../../../src/const/amm/configs/ammConfig.ts"],"names":[],"mappings":";;;AACA,mDA+B8B;AAC9B,2DAA2D;AAC3D,iDAAiD;AACjD,yDAAyD;AACzD,uDAAuD;AACvD,iDAAiD;AACjD,6DAA6D;AAC7D,iDAAiD;AACjD,mDAAmD;AACnD,qDAAqD;AACrD,qDAAqD;AACrD,+CAA+C;AAC/C,qDAAqD;AACrD,+DAA+D;AAC/D,2DAA2D;AAC3D,qDAAqD;AACrD,6DAA6D;AAC7D,6DAA6D;AAC7D,6DAA6D;AAC7D,mDAAmD;AACnD,mDAAmD;AACnD,mDAAmD;AACnD,uDAAuD;AACvD,uDAAuD;AACvD,uDAAuD;AACvD,yDAAyD;AACzD,qEAAqE;AACrE,8DAA8D;AAC9D,2DAA2D;AAC3D,iEAAgE;AAChE,iDAAsD;AACtD,qDAAqD;AACrD,qEAAoE;AACpE,2DAA2D;AAEpD,MAAM,YAAY,GAAG,CAAC,cAAsB,EAAiB,EAAE;IACpE,OAAO;QACL,SAAS,EAAE,IAAA,8BAAe,EAAC,cAAc,CAAC;QAC1C,OAAO,EAAE,IAAA,0BAAa,EAAC,cAA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CAAC;AACJ,CAAC,CAAC;AAjEW,QAAA,YAAY,gBAiEvB","sourcesContent":["import { AMMConfigType } from '../../../types.js';\nimport {\n arthswapConfig,\n baseSwapConfig,\n basexConfig,\n crustConfig,\n equilibreConfig,\n fenixConfig,\n fusionxConfig,\n glyphConfig,\n henjinConfig,\n herculesConfig,\n horizaConfig,\n kinetixConfig,\n kimConfig,\n linehubConfig,\n lynexConfig,\n maiaConfig,\n metaVaultConfig,\n novaswapConfig,\n poolsharkConfig,\n quickSwapAlgebraConfig,\n quickSwapIntegralConfig,\n quickSwapUniv3Config,\n retroConfig,\n spark32Config,\n sparkConfig,\n supswapConfig,\n swapmodeConfig,\n swapsicleConfig,\n thrusterConfig,\n shadowConfig,\n} from './protocols/index.js';\nimport { blackholeConfig } from './protocols/blackhole.js';\nimport { beamConfig } from './protocols/beam.js';\nimport { beamswapConfig } from './protocols/beamswap.js';\nimport { camelotConfig } from './protocols/camelot.js';\nimport { dodoConfig } from './protocols/dodo.js';\nimport { dragonswapConfig } from './protocols/dragonswap.js';\nimport { eddyConfig } from './protocols/eddy.js';\nimport { forgeConfig } from './protocols/forge.js';\nimport { katanaConfig } from './protocols/katana.js';\nimport { kodiakConfig } from './protocols/kodiak.js';\nimport { kyoConfig } from './protocols/kyo.js';\nimport { ocelexConfig } from './protocols/ocelex.js';\nimport { pancakeSwapConfig } from './protocols/pancakeswap.js';\nimport { quickSwapConfig } from './protocols/quickswap.js';\nimport { sailorConfig } from './protocols/sailor.js';\nimport { silverswapConfig } from './protocols/silverswap.js';\nimport { spookyswapConfig } from './protocols/spookyswap.js';\nimport { stellaswapConfig } from './protocols/stellaswap.js';\nimport { sushiConfig } from './protocols/sushi.js';\nimport { thenaConfig } from './protocols/thena.js';\nimport { thickConfig } from './protocols/thick.js';\nimport { thickv2Config } from './protocols/thickv2.js';\nimport { uniswapConfig } from './protocols/uniswap.js';\nimport { wasabeeConfig } from './protocols/wasabee.js';\nimport { machinexConfig } from './protocols/machinex.js';\nimport { katanaIntegralConfig } from './protocols/katanaIntegral.js';\n// import { blackholeConfig } from './protocols/blackhole.js';\nimport { aerodromeConfig } from './protocols/aerodrome.js';\nimport { aerodromeV2Config } from './protocols/aerodrome-v2.js';\nimport { nestVaultConfig } from './protocols/nest.js';\nimport { cypherConfig } from './protocols/cypher.js';\nimport { sparkIntegralConfig } from './protocols/spark-integral.js';\nimport { uniswapV4Config } from './protocols/uniswapv4.js';\n\nexport const getAmmConfig = (theGraphApiKey: string): AMMConfigType => {\n return {\n QuickSwap: quickSwapConfig(theGraphApiKey),\n Uniswap: uniswapConfig(theGraphApiKey),\n Sushi: sushiConfig(theGraphApiKey),\n PancakeSwap: pancakeSwapConfig(theGraphApiKey),\n QuickSwapIntegral: quickSwapIntegralConfig(theGraphApiKey),\n Forge: forgeConfig(),\n BaseSwap: baseSwapConfig(),\n QuickSwapUniv3: quickSwapUniv3Config(),\n BaseX: basexConfig(),\n Thick: thickConfig(theGraphApiKey),\n ThickV2: thickv2Config(),\n Crust: crustConfig(),\n Thruster: thrusterConfig(),\n FusionX: fusionxConfig(),\n Kim: kimConfig(),\n SupSwap: supswapConfig(),\n SwapMode: swapmodeConfig(),\n QuickSwapAlgebra: quickSwapAlgebraConfig(),\n PoolShark: poolsharkConfig(),\n Swapsicle: swapsicleConfig(),\n Equilibre: equilibreConfig(),\n Fenix: fenixConfig(),\n LineHub: linehubConfig(),\n Henjin: henjinConfig(),\n NovaSwap: novaswapConfig(),\n Spark32: spark32Config(),\n Spark: sparkConfig(),\n Thena: thenaConfig(),\n Lynex: lynexConfig(),\n Maia: maiaConfig(),\n Retro: retroConfig(),\n Horiza: horizaConfig(),\n Kodiak: kodiakConfig(),\n Ocelex: ocelexConfig(),\n StellaSwap: stellaswapConfig(theGraphApiKey),\n BeamSwap: beamswapConfig(),\n DragonSwap: dragonswapConfig(),\n SpookySwap: spookyswapConfig(),\n SilverSwap: silverswapConfig(theGraphApiKey),\n Beam: beamConfig(),\n Kyo: kyoConfig(theGraphApiKey),\n Sailor: sailorConfig(),\n Wasabee: wasabeeConfig(),\n Eddy: eddyConfig(),\n Dodo: dodoConfig(),\n Hercules: herculesConfig(),\n Kinetix: kinetixConfig(),\n MetaVault: metaVaultConfig(),\n Camelot: camelotConfig(),\n ArthSwap: arthswapConfig(),\n Glyph: glyphConfig(),\n Katana: katanaConfig(),\n Shadow: shadowConfig(theGraphApiKey),\n MachineX: machinexConfig(theGraphApiKey),\n KatanaIntegral: katanaIntegralConfig(),\n Blackhole: blackholeConfig(),\n Aerodrome: aerodromeConfig(theGraphApiKey),\n AerodromeV2: aerodromeV2Config(theGraphApiKey),\n Nest: nestVaultConfig(),\n Cypher: cypherConfig(theGraphApiKey),\n SparkIntegral: sparkIntegralConfig(),\n UniswapV4: uniswapV4Config(theGraphApiKey),\n };\n}; "]}
|
|
@@ -6,6 +6,8 @@ const chain_js_2 = require("../../../chain.js");
|
|
|
6
6
|
const thegraph_js_1 = require("../../../thegraph.js");
|
|
7
7
|
const quickSwapIntegralConfig = (theGraphApiKey) => ({
|
|
8
8
|
beaconContract: chain_js_2.MultiPositionManagers.MultiPositionQuickSwapIntegral,
|
|
9
|
+
beaconAlgebraHook: chain_js_2.MultiPositionManagers.AlgebraHook,
|
|
10
|
+
algebraHookSupportedChains: [chain_js_1.Chain.Base],
|
|
9
11
|
subgraph: {
|
|
10
12
|
[chain_js_1.Chain.Soneium]: (0, thegraph_js_1.getTheGraphResolverUrl)('3GsT6AiuDiSzh2fXbFxUKtBxT8rBEGVdQCgHSsKMPHiu', false, theGraphApiKey),
|
|
11
13
|
[chain_js_1.Chain.Base]: (0, thegraph_js_1.getTheGraphResolverUrl)('U65NKb6BsDPGqugPAda58ebMLa1RqeMFT76fndB77oe', false, theGraphApiKey),
|
|
@@ -21,6 +23,9 @@ const quickSwapIntegralConfig = (theGraphApiKey) => ({
|
|
|
21
23
|
QuoterV2Address: {
|
|
22
24
|
[chain_js_1.Chain.Base]: '0x23E0583a3a000d567bB3848115065c1890D87fb5',
|
|
23
25
|
[chain_js_1.Chain.Soneium]: '0x22e5195BcC9b0C87f330FbCE2755B263662578E2'
|
|
26
|
+
},
|
|
27
|
+
EntryPointAddress: {
|
|
28
|
+
[chain_js_1.Chain.Base]: '0xb9ce7698cE3dCf21cc88bf7dCc1fE20C85E4226E'
|
|
24
29
|
}
|
|
25
30
|
});
|
|
26
31
|
exports.quickSwapIntegralConfig = quickSwapIntegralConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quickswap-integral.js","sourceRoot":"","sources":["../../../../../../src/const/amm/configs/protocols/quickswap-integral.ts"],"names":[],"mappings":";;;AAAA,gDAA0C;AAC1C,gDAA0D;AAC1D,sDAA8D;AAGvD,MAAM,uBAAuB,GAAG,CAAC,cAAsB,EAAgB,EAAE,CAAC,CAAC;IAChF,cAAc,EAAE,gCAAqB,CAAC,8BAA8B;IACpE,QAAQ,EAAE;QACR,CAAC,gBAAK,CAAC,OAAO,CAAC,EAAE,IAAA,oCAAsB,EAAC,8CAA8C,EAAE,KAAK,EAAE,cAAc,CAAC;QAC9G,CAAC,gBAAK,CAAC,IAAI,CAAC,EAAE,IAAA,oCAAsB,EAAC,6CAA6C,EAAE,KAAK,EAAE,cAAc,CAAC;KAC3G;IACD,cAAc,EAAE;QACd,CAAC,gBAAK,CAAC,OAAO,CAAC,EAAE,4CAA4C;QAC7D,CAAC,gBAAK,CAAC,IAAI,CAAC,EAAE,4CAA4C;KAC3D;IACD,eAAe,EAAE;QACf,CAAC,gBAAK,CAAC,OAAO,CAAC,EAAE,4CAA4C;QAC7D,CAAC,gBAAK,CAAC,IAAI,CAAC,EAAE,4CAA4C;KAC3D;IACD,eAAe,EAAE;QACf,CAAC,gBAAK,CAAC,IAAI,CAAC,EAAE,4CAA4C;QAC1D,CAAC,gBAAK,CAAC,OAAO,CAAC,EAAE,4CAA4C;KAC9D;CACF,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"quickswap-integral.js","sourceRoot":"","sources":["../../../../../../src/const/amm/configs/protocols/quickswap-integral.ts"],"names":[],"mappings":";;;AAAA,gDAA0C;AAC1C,gDAA0D;AAC1D,sDAA8D;AAGvD,MAAM,uBAAuB,GAAG,CAAC,cAAsB,EAAgB,EAAE,CAAC,CAAC;IAChF,cAAc,EAAE,gCAAqB,CAAC,8BAA8B;IACpE,iBAAiB,EAAE,gCAAqB,CAAC,WAAW;IACpD,0BAA0B,EAAE,CAAC,gBAAK,CAAC,IAAI,CAAC;IACxC,QAAQ,EAAE;QACR,CAAC,gBAAK,CAAC,OAAO,CAAC,EAAE,IAAA,oCAAsB,EAAC,8CAA8C,EAAE,KAAK,EAAE,cAAc,CAAC;QAC9G,CAAC,gBAAK,CAAC,IAAI,CAAC,EAAE,IAAA,oCAAsB,EAAC,6CAA6C,EAAE,KAAK,EAAE,cAAc,CAAC;KAC3G;IACD,cAAc,EAAE;QACd,CAAC,gBAAK,CAAC,OAAO,CAAC,EAAE,4CAA4C;QAC7D,CAAC,gBAAK,CAAC,IAAI,CAAC,EAAE,4CAA4C;KAC3D;IACD,eAAe,EAAE;QACf,CAAC,gBAAK,CAAC,OAAO,CAAC,EAAE,4CAA4C;QAC7D,CAAC,gBAAK,CAAC,IAAI,CAAC,EAAE,4CAA4C;KAC3D;IACD,eAAe,EAAE;QACf,CAAC,gBAAK,CAAC,IAAI,CAAC,EAAE,4CAA4C;QAC1D,CAAC,gBAAK,CAAC,OAAO,CAAC,EAAE,4CAA4C;KAC9D;IACD,iBAAiB,EAAE;QACjB,CAAC,gBAAK,CAAC,IAAI,CAAC,EAAE,4CAA4C;KAC3D;CACF,CAAC,CAAC;AAvBU,QAAA,uBAAuB,2BAuBjC","sourcesContent":["import { Chain } from '../../../chain.js';\nimport { MultiPositionManagers } from '../../../chain.js';\nimport { getTheGraphResolverUrl } from '../../../thegraph.js';\nimport { ProtocolInfo } from '../../../../types.js';\n\nexport const quickSwapIntegralConfig = (theGraphApiKey: string): ProtocolInfo => ({\n beaconContract: MultiPositionManagers.MultiPositionQuickSwapIntegral,\n beaconAlgebraHook: MultiPositionManagers.AlgebraHook,\n algebraHookSupportedChains: [Chain.Base],\n subgraph: {\n [Chain.Soneium]: getTheGraphResolverUrl('3GsT6AiuDiSzh2fXbFxUKtBxT8rBEGVdQCgHSsKMPHiu', false, theGraphApiKey),\n [Chain.Base]: getTheGraphResolverUrl('U65NKb6BsDPGqugPAda58ebMLa1RqeMFT76fndB77oe', false, theGraphApiKey),\n },\n factoryAddress: {\n [Chain.Soneium]: '0x8Ff309F68F6Caf77a78E9C20d2Af7Ed4bE2D7093',\n [Chain.Base]: '0xC5396866754799B9720125B104AE01d935Ab9C7b'\n },\n TickLensAddress: {\n [Chain.Soneium]: '0x9AfA76331a01b1b25289306fbD72A4e032FDFe06',\n [Chain.Base]: '0xC73e303fb323DDFB446E2Cc8c0f1B8199e7930f4'\n },\n QuoterV2Address: {\n [Chain.Base]: '0x23E0583a3a000d567bB3848115065c1890D87fb5',\n [Chain.Soneium]: '0x22e5195BcC9b0C87f330FbCE2755B263662578E2'\n },\n EntryPointAddress: {\n [Chain.Base]: '0xb9ce7698cE3dCf21cc88bf7dCc1fE20C85E4226E'\n }\n}); "]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uniswapV4Config = void 0;
|
|
4
|
+
const chain_1 = require("../../../chain");
|
|
5
|
+
const chain_2 = require("../../../chain");
|
|
6
|
+
const thegraph_1 = require("../../../thegraph");
|
|
7
|
+
const uniswapV4Config = (theGraphApiKey) => ({
|
|
8
|
+
beaconContract: chain_2.MultiPositionManagers.MultiPositionUniswapV4ALM,
|
|
9
|
+
subgraph: {
|
|
10
|
+
[chain_1.Chain.Unichain]: (0, thegraph_1.getTheGraphResolverUrl)(`EoCvJ5tyMLMJcTnLQwWpjAtPdn74PcrZgzfcT5bYxNBH`, false, theGraphApiKey),
|
|
11
|
+
},
|
|
12
|
+
PoolManager: {
|
|
13
|
+
[chain_1.Chain.Unichain]: '0x1f98400000000000000000000000000000000004',
|
|
14
|
+
},
|
|
15
|
+
PositionDescriptor: {
|
|
16
|
+
[chain_1.Chain.Unichain]: '0x9fb28449a191cd8c03a1b7abfb0f5996ecf7f722'
|
|
17
|
+
},
|
|
18
|
+
Quoter: {
|
|
19
|
+
[chain_1.Chain.Unichain]: '0x333e3c607b141b18ff6de9f258db6e77fe7491e0'
|
|
20
|
+
},
|
|
21
|
+
StateView: {
|
|
22
|
+
[chain_1.Chain.Unichain]: '0x86e8631a016f9068c3f085faf484ee3f5fdee8f2'
|
|
23
|
+
},
|
|
24
|
+
UniversalRouter: {
|
|
25
|
+
[chain_1.Chain.Unichain]: '0xef740bf23acae26f6492b10de645d6b98dc8eaf3'
|
|
26
|
+
},
|
|
27
|
+
Permit2: {
|
|
28
|
+
[chain_1.Chain.Unichain]: '0x000000000022D473030F116dDEE9F6B43aC78BA3'
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
exports.uniswapV4Config = uniswapV4Config;
|
|
32
|
+
//# sourceMappingURL=uniswapv4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uniswapv4.js","sourceRoot":"","sources":["../../../../../../src/const/amm/configs/protocols/uniswapv4.ts"],"names":[],"mappings":";;;AAAA,0CAAuC;AACvC,0CAAuD;AACvD,gDAA2D;AAIpD,MAAM,eAAe,GAAG,CAAC,cAAsB,EAAgB,EAAE,CAAC,CAAC;IACxE,cAAc,EAAE,6BAAqB,CAAC,yBAAyB;IAE/D,QAAQ,EAAE;QACR,CAAC,aAAK,CAAC,QAAQ,CAAC,EAAE,IAAA,iCAAsB,EAAC,8CAA8C,EAAE,KAAK,EAAE,cAAc,CAAC;KAChH;IACD,WAAW,EAAE;QACX,CAAC,aAAK,CAAC,QAAQ,CAAC,EAAE,4CAA4C;KAC/D;IACD,kBAAkB,EAAE;QAClB,CAAC,aAAK,CAAC,QAAQ,CAAC,EAAE,4CAA4C;KAC/D;IACD,MAAM,EAAE;QACN,CAAC,aAAK,CAAC,QAAQ,CAAC,EAAE,4CAA4C;KAC/D;IACD,SAAS,EAAE;QACT,CAAC,aAAK,CAAC,QAAQ,CAAC,EAAE,4CAA4C;KAC/D;IACD,eAAe,EAAE;QACf,CAAC,aAAK,CAAC,QAAQ,CAAC,EAAE,4CAA4C;KAC/D;IACD,OAAO,EAAE;QACP,CAAC,aAAK,CAAC,QAAQ,CAAC,EAAE,4CAA4C;KAC/D;CACF,CAAC,CAAC;AAxBU,QAAA,eAAe,mBAwBzB","sourcesContent":["import { Chain } from '../../../chain';\nimport { MultiPositionManagers } from '../../../chain';\nimport { getTheGraphResolverUrl } from '../../../thegraph';\nimport { ProtocolInfo } from '../../../../types';\n\n\nexport const uniswapV4Config = (theGraphApiKey: string): ProtocolInfo => ({\n beaconContract: MultiPositionManagers.MultiPositionUniswapV4ALM,\n \n subgraph: {\n [Chain.Unichain]: getTheGraphResolverUrl(`EoCvJ5tyMLMJcTnLQwWpjAtPdn74PcrZgzfcT5bYxNBH`, false, theGraphApiKey),\n },\n PoolManager: {\n [Chain.Unichain]: '0x1f98400000000000000000000000000000000004',\n },\n PositionDescriptor: {\n [Chain.Unichain]: '0x9fb28449a191cd8c03a1b7abfb0f5996ecf7f722'\n },\n Quoter: {\n [Chain.Unichain]: '0x333e3c607b141b18ff6de9f258db6e77fe7491e0'\n },\n StateView: {\n [Chain.Unichain]: '0x86e8631a016f9068c3f085faf484ee3f5fdee8f2'\n },\n UniversalRouter: {\n [Chain.Unichain]: '0xef740bf23acae26f6492b10de645d6b98dc8eaf3'\n },\n Permit2: {\n [Chain.Unichain]: '0x000000000022D473030F116dDEE9F6B43aC78BA3'\n }\n}); "]}
|
|
@@ -131,7 +131,11 @@ const PROTOCOL_TO_BEACON_MAP = Object.fromEntries(Object.entries(BEACON_TO_SUPPO
|
|
|
131
131
|
const CUSTOM_BEACON_TO_PROTOCOL_MAP = {
|
|
132
132
|
[chain_js_1.StrykePositionManagers.StrykeEqualizerManager]: chain_js_1.Protocol.ThickV2,
|
|
133
133
|
[chain_js_1.StrykePositionManagers.StrykeShadowManager]: chain_js_1.Protocol.Shadow,
|
|
134
|
+
[chain_js_1.MultiPositionManagers.MultiPositionUniswapV4ALM]: chain_js_1.Protocol.UniswapV4,
|
|
135
|
+
[chain_js_1.MultiPositionManagers.MultiPositionUniswapV4HookOld]: chain_js_1.Protocol.UniswapV4,
|
|
134
136
|
[chain_js_1.MultiPositionManagers.MultiPositionBlackholeOld]: chain_js_1.Protocol.Blackhole,
|
|
137
|
+
[chain_js_1.MultiPositionManagers.MultiPositionUniswapV4Hook]: chain_js_1.Protocol.UniswapV4,
|
|
138
|
+
[chain_js_1.MultiPositionManagers.AlgebraHook]: chain_js_1.Protocol.QuickSwapIntegral,
|
|
135
139
|
[chain_js_1.MultiPositionManagers.MultiPositionAerodromeV2]: chain_js_1.Protocol.AerodromeV2,
|
|
136
140
|
[chain_js_1.MultiPositionManagers.MultiPositionNest]: chain_js_1.Protocol.Nest,
|
|
137
141
|
[chain_js_1.MultiPositionManagers.MultiPositionCypher]: chain_js_1.Protocol.Cypher,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beacon.js","sourceRoot":"","sources":["../../../../../src/const/amm/utils/beacon.ts"],"names":[],"mappings":";;;AA+JA,0DAEC;AAsCD,0DAkBC;AAxND,6CAAyF;AACzF,0DAAuD;AAEvD,MAAM,gCAAgC,GAAsC;IAC1E,KAAK,EAAE,OAA4B;IACnC,KAAK,EAAE,OAA4B;IACnC,IAAI,EAAE,MAA2B;IACjC,KAAK,EAAE,OAA4B;IACnC,SAAS,EAAE,WAAgC;IAC3C,OAAO,EAAE,SAA8B;IACvC,OAAO,EAAE,aAAkC;IAC3C,cAAc,EAAE,gBAAqC;IACrD,WAAW,EAAE,kBAAuC;IACpD,iBAAiB,EAAE,mBAAwC;IAC3D,SAAS,EAAE,WAAgC;IAC3C,OAAO,EAAE,SAA8B;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AAO,cAAc,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5C,CAAC,CAAC;AAZW,QAAA,yBAAyB,6BAYpC;AAEF;;;;;;;;;;GAUG;AACH,SAAgB,uBAAuB,CAAC,MAAc;IACpD,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,2CAA2C;IAC3C,IAAI,6BAA6B,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1C,OAAO,6BAA6B,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC;IAED,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;IAEzC,qEAAqE;IACrE,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC,IAAI,CACzE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAClC,CAAC;IAEF,MAAM,eAAe,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IAEjF,OAAO,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACrD,CAAC","sourcesContent":["import { SupportedProtocol } from '../../../types.js';\nimport { MultiPositionManagers, Protocol, StrykePositionManagers } from '../../chain.js';\nimport { getAmmConfig } from '../configs/ammConfig.js';\n\nconst BEACON_TO_SUPPORTED_PROTOCOL_MAP: Record<string, SupportedProtocol> = {\n retro: 'Retro' as SupportedProtocol,\n forge: 'Forge' as SupportedProtocol,\n maia: 'Maia' as SupportedProtocol,\n sushi: 'Sushi' as SupportedProtocol,\n uniswapv4: 'UniswapV4' as SupportedProtocol,\n uniswap: 'Uniswap' as SupportedProtocol,\n pancake: 'PancakeSwap' as SupportedProtocol,\n quickswapuniv3: 'QuickSwapUniv3' as SupportedProtocol,\n quickswap19: 'QuickSwapAlgebra' as SupportedProtocol,\n quickswapintegral: 'QuickSwapIntegral' as SupportedProtocol,\n quickswap: 'QuickSwap' as SupportedProtocol,\n kinetix: 'Kinetix' as SupportedProtocol,\n metavault: 'MetaVault' as SupportedProtocol,\n camelot: 'Camelot' as SupportedProtocol,\n lynex: 'Lynex' as SupportedProtocol,\n thena: 'Thena' as SupportedProtocol,\n horiza: 'Horiza' as SupportedProtocol,\n basex: 'BaseX' as SupportedProtocol,\n arthswap: 'ArthSwap' as SupportedProtocol,\n hercules: 'Hercules' as SupportedProtocol,\n thick: 'Thick' as SupportedProtocol,\n crust: 'Crust' as SupportedProtocol,\n thruster: 'Thruster' as SupportedProtocol,\n fusionx: 'FusionX' as SupportedProtocol,\n supswap: 'SupSwap' as SupportedProtocol,\n swapmode: 'SwapMode' as SupportedProtocol,\n baseswap: 'BaseSwap' as SupportedProtocol,\n poolshark: 'PoolShark' as SupportedProtocol,\n kim: 'Kim' as SupportedProtocol,\n swapsicle: 'Swapsicle' as SupportedProtocol,\n equilibre: 'Equilibre' as SupportedProtocol,\n fenix: 'Fenix' as SupportedProtocol,\n linehub: 'LineHub' as SupportedProtocol,\n henjin: 'Henjin' as SupportedProtocol,\n novaswap: 'NovaSwap' as SupportedProtocol,\n spark32: 'Spark32' as SupportedProtocol,\n spark: 'Spark' as SupportedProtocol,\n kodiak: 'Kodiak' as SupportedProtocol,\n ocelex: 'Ocelex' as SupportedProtocol,\n stellaswap: 'StellaSwap' as SupportedProtocol,\n beamswap: 'BeamSwap' as SupportedProtocol,\n dragonswap: 'DragonSwap' as SupportedProtocol,\n spookyswap: 'SpookySwap' as SupportedProtocol,\n silver: 'SilverSwap' as SupportedProtocol,\n thickv2: 'ThickV2' as SupportedProtocol,\n beam: 'Beam' as SupportedProtocol,\n kyo: 'Kyo' as SupportedProtocol,\n sailor: 'Sailor' as SupportedProtocol,\n wasabee: 'Wasabee' as SupportedProtocol,\n eddy: 'Eddy' as SupportedProtocol,\n dodo: 'Dodo' as SupportedProtocol,\n glyph: 'Glyph' as SupportedProtocol,\n shadow: 'Shadow' as SupportedProtocol,\n machinex: 'MachineX' as SupportedProtocol,\n katanaintegral: 'KatanaIntegral' as SupportedProtocol,\n blackhole: 'Blackhole' as SupportedProtocol,\n multiPositionAerodrome: 'Aerodrome' as SupportedProtocol,\n aerodromeStakedPositionManager: 'AerodromeV2' as SupportedProtocol,\n nest: 'Nest' as SupportedProtocol,\n cypher: 'Cypher' as SupportedProtocol,\n};\n\n\n\nconst BEACON_TO_PROTOCOL_MAP: Record<string, Protocol> = {\n retro: Protocol.Retro,\n forge: Protocol.Forge,\n maia: Protocol.Maia,\n sushi: Protocol.Sushi,\n uniswap: Protocol.Uniswap,\n pancake: Protocol.PancakeSwap,\n quickswapuniv3: Protocol.QuickSwapUniv3,\n quickswap19: Protocol.QuickSwapAlgebra,\n quickswapintegral: Protocol.QuickSwapIntegral,\n quickswap: Protocol.QuickSwap,\n kinetix: Protocol.Kinetix,\n metavault: Protocol.MetaVault,\n camelot: Protocol.Camelot,\n lynex: Protocol.Lynex,\n horiza: Protocol.Horiza,\n basex: Protocol.BaseX,\n arthswap: Protocol.ArthSwap,\n hercules: Protocol.Hercules,\n crust: Protocol.Crust,\n thruster: Protocol.Thruster,\n fusionx: Protocol.FusionX,\n poolshark: Protocol.PoolShark,\n kim: Protocol.Kim,\n swapsicle: Protocol.Swapsicle,\n equilibre: Protocol.Equilibre,\n fenix: Protocol.Fenix,\n linehub: Protocol.LineHub,\n henjin: Protocol.Henjin,\n novaswap: Protocol.NovaSwap,\n spark32: Protocol.Spark32,\n spark: Protocol.Spark,\n kodiak: Protocol.Kodiak,\n ocelex: Protocol.Ocelex,\n stellaswap: Protocol.StellaSwap,\n beamswap: Protocol.BeamSwap,\n dragonswap: Protocol.DragonSwap,\n spookyswap: Protocol.SpookySwap,\n silver: Protocol.SilverSwap,\n thickv2: Protocol.ThickV2,\n thick: Protocol.Thick,\n beam: Protocol.Beam,\n kyo: Protocol.Kyo,\n sailor: Protocol.Sailor,\n wasabee: Protocol.Wasabee,\n eddy: Protocol.Eddy,\n dodo: Protocol.Dodo,\n glyph: Protocol.Glyph,\n shadow: Protocol.Shadow,\n machinex: Protocol.MachineX,\n katanaintegral: Protocol.KatanaIntegral,\n blackhole: Protocol.Blackhole,\n multiPositionAerodrome: Protocol.Aerodrome,\n aerodromeStakedPositionManager: Protocol.AerodromeV2,\n nest: Protocol.Nest,\n cypher: Protocol.Cypher,\n sparkintegral: Protocol.SparkIntegral,\n};\n\n\n\n\n// Create reverse mapping from the existing BEACON_TO_SUPPORTED_PROTOCOL_MAP\nconst PROTOCOL_TO_BEACON_MAP = Object.fromEntries(\n Object.entries(BEACON_TO_SUPPORTED_PROTOCOL_MAP).map(([beacon, protocol]) => [protocol, beacon])\n);\n\n// Custom/special-case beacon to protocol mapping\nconst CUSTOM_BEACON_TO_PROTOCOL_MAP: Record<string, SupportedProtocol> = {\n [StrykePositionManagers.StrykeEqualizerManager]: Protocol.ThickV2,\n [StrykePositionManagers.StrykeShadowManager]: Protocol.Shadow,\n [MultiPositionManagers.MultiPositionBlackholeOld]: Protocol.Blackhole,\n [MultiPositionManagers.MultiPositionAerodromeV2]: Protocol.AerodromeV2,\n [MultiPositionManagers.MultiPositionNest]: Protocol.Nest,\n [MultiPositionManagers.MultiPositionCypher]: Protocol.Cypher,\n [MultiPositionManagers.MultiPositionSushiManaged]: Protocol.Sushi,\n [MultiPositionManagers.MultiPositionSparkIntegral]: Protocol.SparkIntegral,\n};\n\n/**`\n * Retrieves the beacon name associated with a given protocol.\n *\n * @param protocol - The supported protocol to get the beacon name for\n * @returns The beacon name string for the protocol, or empty string if not found\n * @example\n * ```typescript\n * const beaconName = getBeaconNameByProtocol('Uniswap');\n * // Returns: 'uniswap'\n * ```\n */\nexport function getBeaconNameByProtocol(protocol: SupportedProtocol): string {\n return PROTOCOL_TO_BEACON_MAP[protocol] || '';\n}\n\n/**\n * Gets the protocol configuration for a given beacon identifier.\n *\n * @param beacon - The beacon identifier string\n * @param theGraphApiKey - The Graph API key for accessing protocol data\n * @returns The protocol configuration object or null if not found\n * @example\n * ```typescript\n * const config = getProtocolConfigByBeacon('uniswap', 'api-key');\n * ```\n */\nexport const getProtocolConfigByBeacon = (beacon: string, theGraphApiKey: string) => {\n if (!beacon) return null;\n\n const beaconLower = beacon.toLowerCase();\n const matchedProtocol = Object.entries(BEACON_TO_PROTOCOL_MAP).find(([key]) =>\n beaconLower.includes(key)\n );\n\n if (!matchedProtocol) return null;\n\n const protocolConfig = getAmmConfig(theGraphApiKey);\n return protocolConfig[matchedProtocol[1]];\n};\n\n/**\n * Determines the protocol type from a given beacon identifier.\n *\n * @param beacon - The beacon identifier string\n * @returns The supported protocol type or null if not found\n * @example\n * ```typescript\n * const protocolType = getProtocolTypeByBeacon('uniswap');\n * // Returns: 'Uniswap' as SupportedProtocol\n * ```\n */\nexport function getProtocolTypeByBeacon(beacon: string): SupportedProtocol | null {\n if (!beacon) return null;\n\n // Check custom/special-case mappings first\n if (CUSTOM_BEACON_TO_PROTOCOL_MAP[beacon]) {\n return CUSTOM_BEACON_TO_PROTOCOL_MAP[beacon];\n }\n\n const beaconLower = beacon.toLowerCase();\n\n // Sort keys by length descending to prioritize more specific matches\n const sortedEntries = Object.entries(BEACON_TO_SUPPORTED_PROTOCOL_MAP).sort(\n ([a], [b]) => b.length - a.length\n );\n\n const matchedProtocol = sortedEntries.find(([key]) => beaconLower.includes(key));\n\n return matchedProtocol ? matchedProtocol[1] : null;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"beacon.js","sourceRoot":"","sources":["../../../../../src/const/amm/utils/beacon.ts"],"names":[],"mappings":";;;AAmKA,0DAEC;AAsCD,0DAkBC;AA5ND,6CAAyF;AACzF,0DAAuD;AAEvD,MAAM,gCAAgC,GAAsC;IAC1E,KAAK,EAAE,OAA4B;IACnC,KAAK,EAAE,OAA4B;IACnC,IAAI,EAAE,MAA2B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CAAC,CAAC,CAAC;IAEjF,OAAO,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACrD,CAAC","sourcesContent":["import { SupportedProtocol } from '../../../types.js';\nimport { MultiPositionManagers, Protocol, StrykePositionManagers } from '../../chain.js';\nimport { getAmmConfig } from '../configs/ammConfig.js';\n\nconst BEACON_TO_SUPPORTED_PROTOCOL_MAP: Record<string, SupportedProtocol> = {\n retro: 'Retro' as SupportedProtocol,\n forge: 'Forge' as SupportedProtocol,\n maia: 'Maia' as SupportedProtocol,\n sushi: 'Sushi' as SupportedProtocol,\n uniswapv4: 'UniswapV4' as SupportedProtocol,\n uniswap: 'Uniswap' as SupportedProtocol,\n pancake: 'PancakeSwap' as SupportedProtocol,\n quickswapuniv3: 'QuickSwapUniv3' as SupportedProtocol,\n quickswap19: 'QuickSwapAlgebra' as SupportedProtocol,\n quickswapintegral: 'QuickSwapIntegral' as SupportedProtocol,\n quickswap: 'QuickSwap' as SupportedProtocol,\n kinetix: 'Kinetix' as SupportedProtocol,\n metavault: 'MetaVault' as SupportedProtocol,\n camelot: 'Camelot' as SupportedProtocol,\n lynex: 'Lynex' as SupportedProtocol,\n thena: 'Thena' as SupportedProtocol,\n horiza: 'Horiza' as SupportedProtocol,\n basex: 'BaseX' as SupportedProtocol,\n arthswap: 'ArthSwap' as SupportedProtocol,\n hercules: 'Hercules' as SupportedProtocol,\n thick: 'Thick' as SupportedProtocol,\n crust: 'Crust' as SupportedProtocol,\n thruster: 'Thruster' as SupportedProtocol,\n fusionx: 'FusionX' as SupportedProtocol,\n supswap: 'SupSwap' as SupportedProtocol,\n swapmode: 'SwapMode' as SupportedProtocol,\n baseswap: 'BaseSwap' as SupportedProtocol,\n poolshark: 'PoolShark' as SupportedProtocol,\n kim: 'Kim' as SupportedProtocol,\n swapsicle: 'Swapsicle' as SupportedProtocol,\n equilibre: 'Equilibre' as SupportedProtocol,\n fenix: 'Fenix' as SupportedProtocol,\n linehub: 'LineHub' as SupportedProtocol,\n henjin: 'Henjin' as SupportedProtocol,\n novaswap: 'NovaSwap' as SupportedProtocol,\n spark32: 'Spark32' as SupportedProtocol,\n spark: 'Spark' as SupportedProtocol,\n kodiak: 'Kodiak' as SupportedProtocol,\n ocelex: 'Ocelex' as SupportedProtocol,\n stellaswap: 'StellaSwap' as SupportedProtocol,\n beamswap: 'BeamSwap' as SupportedProtocol,\n dragonswap: 'DragonSwap' as SupportedProtocol,\n spookyswap: 'SpookySwap' as SupportedProtocol,\n silver: 'SilverSwap' as SupportedProtocol,\n thickv2: 'ThickV2' as SupportedProtocol,\n beam: 'Beam' as SupportedProtocol,\n kyo: 'Kyo' as SupportedProtocol,\n sailor: 'Sailor' as SupportedProtocol,\n wasabee: 'Wasabee' as SupportedProtocol,\n eddy: 'Eddy' as SupportedProtocol,\n dodo: 'Dodo' as SupportedProtocol,\n glyph: 'Glyph' as SupportedProtocol,\n shadow: 'Shadow' as SupportedProtocol,\n machinex: 'MachineX' as SupportedProtocol,\n katanaintegral: 'KatanaIntegral' as SupportedProtocol,\n blackhole: 'Blackhole' as SupportedProtocol,\n multiPositionAerodrome: 'Aerodrome' as SupportedProtocol,\n aerodromeStakedPositionManager: 'AerodromeV2' as SupportedProtocol,\n nest: 'Nest' as SupportedProtocol,\n cypher: 'Cypher' as SupportedProtocol,\n};\n\n\n\nconst BEACON_TO_PROTOCOL_MAP: Record<string, Protocol> = {\n retro: Protocol.Retro,\n forge: Protocol.Forge,\n maia: Protocol.Maia,\n sushi: Protocol.Sushi,\n uniswap: Protocol.Uniswap,\n pancake: Protocol.PancakeSwap,\n quickswapuniv3: Protocol.QuickSwapUniv3,\n quickswap19: Protocol.QuickSwapAlgebra,\n quickswapintegral: Protocol.QuickSwapIntegral,\n quickswap: Protocol.QuickSwap,\n kinetix: Protocol.Kinetix,\n metavault: Protocol.MetaVault,\n camelot: Protocol.Camelot,\n lynex: Protocol.Lynex,\n horiza: Protocol.Horiza,\n basex: Protocol.BaseX,\n arthswap: Protocol.ArthSwap,\n hercules: Protocol.Hercules,\n crust: Protocol.Crust,\n thruster: Protocol.Thruster,\n fusionx: Protocol.FusionX,\n poolshark: Protocol.PoolShark,\n kim: Protocol.Kim,\n swapsicle: Protocol.Swapsicle,\n equilibre: Protocol.Equilibre,\n fenix: Protocol.Fenix,\n linehub: Protocol.LineHub,\n henjin: Protocol.Henjin,\n novaswap: Protocol.NovaSwap,\n spark32: Protocol.Spark32,\n spark: Protocol.Spark,\n kodiak: Protocol.Kodiak,\n ocelex: Protocol.Ocelex,\n stellaswap: Protocol.StellaSwap,\n beamswap: Protocol.BeamSwap,\n dragonswap: Protocol.DragonSwap,\n spookyswap: Protocol.SpookySwap,\n silver: Protocol.SilverSwap,\n thickv2: Protocol.ThickV2,\n thick: Protocol.Thick,\n beam: Protocol.Beam,\n kyo: Protocol.Kyo,\n sailor: Protocol.Sailor,\n wasabee: Protocol.Wasabee,\n eddy: Protocol.Eddy,\n dodo: Protocol.Dodo,\n glyph: Protocol.Glyph,\n shadow: Protocol.Shadow,\n machinex: Protocol.MachineX,\n katanaintegral: Protocol.KatanaIntegral,\n blackhole: Protocol.Blackhole,\n multiPositionAerodrome: Protocol.Aerodrome,\n aerodromeStakedPositionManager: Protocol.AerodromeV2,\n nest: Protocol.Nest,\n cypher: Protocol.Cypher,\n sparkintegral: Protocol.SparkIntegral,\n};\n\n\n\n\n// Create reverse mapping from the existing BEACON_TO_SUPPORTED_PROTOCOL_MAP\nconst PROTOCOL_TO_BEACON_MAP = Object.fromEntries(\n Object.entries(BEACON_TO_SUPPORTED_PROTOCOL_MAP).map(([beacon, protocol]) => [protocol, beacon])\n);\n\n// Custom/special-case beacon to protocol mapping\nconst CUSTOM_BEACON_TO_PROTOCOL_MAP: Record<string, SupportedProtocol> = {\n [StrykePositionManagers.StrykeEqualizerManager]: Protocol.ThickV2,\n [StrykePositionManagers.StrykeShadowManager]: Protocol.Shadow,\n [MultiPositionManagers.MultiPositionUniswapV4ALM]: Protocol.UniswapV4,\n [MultiPositionManagers.MultiPositionUniswapV4HookOld]: Protocol.UniswapV4,\n [MultiPositionManagers.MultiPositionBlackholeOld]: Protocol.Blackhole,\n [MultiPositionManagers.MultiPositionUniswapV4Hook]: Protocol.UniswapV4,\n [MultiPositionManagers.AlgebraHook]: Protocol.QuickSwapIntegral,\n [MultiPositionManagers.MultiPositionAerodromeV2]: Protocol.AerodromeV2,\n [MultiPositionManagers.MultiPositionNest]: Protocol.Nest,\n [MultiPositionManagers.MultiPositionCypher]: Protocol.Cypher,\n [MultiPositionManagers.MultiPositionSushiManaged]: Protocol.Sushi,\n [MultiPositionManagers.MultiPositionSparkIntegral]: Protocol.SparkIntegral,\n};\n\n/**`\n * Retrieves the beacon name associated with a given protocol.\n *\n * @param protocol - The supported protocol to get the beacon name for\n * @returns The beacon name string for the protocol, or empty string if not found\n * @example\n * ```typescript\n * const beaconName = getBeaconNameByProtocol('Uniswap');\n * // Returns: 'uniswap'\n * ```\n */\nexport function getBeaconNameByProtocol(protocol: SupportedProtocol): string {\n return PROTOCOL_TO_BEACON_MAP[protocol] || '';\n}\n\n/**\n * Gets the protocol configuration for a given beacon identifier.\n *\n * @param beacon - The beacon identifier string\n * @param theGraphApiKey - The Graph API key for accessing protocol data\n * @returns The protocol configuration object or null if not found\n * @example\n * ```typescript\n * const config = getProtocolConfigByBeacon('uniswap', 'api-key');\n * ```\n */\nexport const getProtocolConfigByBeacon = (beacon: string, theGraphApiKey: string) => {\n if (!beacon) return null;\n\n const beaconLower = beacon.toLowerCase();\n const matchedProtocol = Object.entries(BEACON_TO_PROTOCOL_MAP).find(([key]) =>\n beaconLower.includes(key)\n );\n\n if (!matchedProtocol) return null;\n\n const protocolConfig = getAmmConfig(theGraphApiKey);\n return protocolConfig[matchedProtocol[1]];\n};\n\n/**\n * Determines the protocol type from a given beacon identifier.\n *\n * @param beacon - The beacon identifier string\n * @returns The supported protocol type or null if not found\n * @example\n * ```typescript\n * const protocolType = getProtocolTypeByBeacon('uniswap');\n * // Returns: 'Uniswap' as SupportedProtocol\n * ```\n */\nexport function getProtocolTypeByBeacon(beacon: string): SupportedProtocol | null {\n if (!beacon) return null;\n\n // Check custom/special-case mappings first\n if (CUSTOM_BEACON_TO_PROTOCOL_MAP[beacon]) {\n return CUSTOM_BEACON_TO_PROTOCOL_MAP[beacon];\n }\n\n const beaconLower = beacon.toLowerCase();\n\n // Sort keys by length descending to prioritize more specific matches\n const sortedEntries = Object.entries(BEACON_TO_SUPPORTED_PROTOCOL_MAP).sort(\n ([a], [b]) => b.length - a.length\n );\n\n const matchedProtocol = sortedEntries.find(([key]) => beaconLower.includes(key));\n\n return matchedProtocol ? matchedProtocol[1] : null;\n}\n"]}
|
package/dist/cjs/const/chain.js
CHANGED
|
@@ -170,6 +170,7 @@ var Protocol;
|
|
|
170
170
|
Protocol["Nest"] = "Nest";
|
|
171
171
|
Protocol["Cypher"] = "Cypher";
|
|
172
172
|
Protocol["SparkIntegral"] = "SparkIntegral";
|
|
173
|
+
Protocol["UniswapV4"] = "UniswapV4";
|
|
173
174
|
})(Protocol || (exports.Protocol = Protocol = {}));
|
|
174
175
|
var StrykePositionManagers;
|
|
175
176
|
(function (StrykePositionManagers) {
|
|
@@ -233,9 +234,12 @@ var MultiPositionManagers;
|
|
|
233
234
|
MultiPositionManagers["MultiPositionShadow"] = "MultiPositionShadow";
|
|
234
235
|
MultiPositionManagers["MultiPositionMachineX"] = "MultiPositionMachineX";
|
|
235
236
|
MultiPositionManagers["MultiPositionKatanaIntegral"] = "MultiPositionKatanaIntegral";
|
|
236
|
-
MultiPositionManagers["
|
|
237
|
-
MultiPositionManagers["
|
|
238
|
-
MultiPositionManagers["
|
|
237
|
+
MultiPositionManagers["MultiPositionUniswapV4ALM"] = "MultiPositionUniswapV4";
|
|
238
|
+
MultiPositionManagers["MultiPositionUniswapV4Hook"] = "MultiPositionUniHookTest";
|
|
239
|
+
MultiPositionManagers["MultiPositionUniswapV4HookOld"] = "UniswapV4Hook";
|
|
240
|
+
MultiPositionManagers["MultiPositionBlackhole"] = "MultiPositionBlackHoleV1";
|
|
241
|
+
MultiPositionManagers["MultiPositionBlackholeOld"] = "MultiPositionBlackhole";
|
|
242
|
+
MultiPositionManagers["AlgebraHook"] = "AlgebraHook";
|
|
239
243
|
MultiPositionManagers["MultiPositionAerodrome"] = "MultiPositionAerodrome";
|
|
240
244
|
MultiPositionManagers["MultiPositionAerodromeV2"] = "AerodromeStakedPositionManager";
|
|
241
245
|
MultiPositionManagers["MultiPositionNest"] = "MultiPositionNest";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../../src/const/chain.ts"],"names":[],"mappings":";;;AAAA,cAAc;AACd,IAAY,KAmDX;AAnDD,WAAY,KAAK;IACf,uBAAuB;IACvB,4BAAmB,CAAA;IACnB,8BAAqB,CAAA;IACrB,8BAAqB,CAAA;IACrB,oBAAW,CAAA;IACX,wBAAe,CAAA;IACf,wBAAe,CAAA;IACf,oCAA2B,CAAA;IAC3B,sBAAa,CAAA;IACb,gCAAuB,CAAA;IACvB,sCAA6B,CAAA;IAC7B,sBAAa,CAAA;IACb,sBAAa,CAAA;IACb,wBAAe,CAAA;IACf,0BAAiB,CAAA;IACjB,wBAAe,CAAA;IACf,wBAAe,CAAA;IACf,0BAAiB,CAAA;IACjB,kCAAyB,CAAA;IACzB,0BAAiB,CAAA;IACjB,kCAAyB,CAAA;IACzB,wBAAe,CAAA;IACf,sBAAa,CAAA;IACb,0BAAiB,CAAA;IACjB,wBAAe,CAAA;IACf,gCAAuB,CAAA;IACvB,wBAAe,CAAA;IACf,kCAAyB,CAAA;IACzB,wBAAe,CAAA;IACf,4CAAmC,CAAA;IACnC,8BAAqB,CAAA;IACrB,8BAAqB,CAAA;IACrB,4BAAmB,CAAA;IACnB,8BAAqB,CAAA;IACrB,oBAAW,CAAA;IACX,wBAAe,CAAA;IACf,sBAAa,CAAA;IACb,4BAAmB,CAAA;I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AC3C,oEAA2C,CAAA;IAC3C,4EAAmD,CAAA;IACnD,wEAA+C,CAAA;IAC/C,4EAAmD,CAAA;IACnD,4EAAmD,CAAA;IACnD,4EAAmD,CAAA;IACnD,sEAA6C,CAAA;IAC7C,gEAAuC,CAAA;IACvC,0FAAiE,CAAA;IACjE,8DAAqC,CAAA;IACrC,oEAA2C,CAAA;IAC3C,sEAA6C,CAAA;IAC7C,gEAAuC,CAAA;IACvC,gEAAuC,CAAA;IACvC,kEAAyC,CAAA;IACzC,oEAA2C,CAAA;IAC3C,oEAA2C,CAAA;IAC3C,wEAA+C,CAAA;IAC/C,oFAA2D,CAAA;IAC3D,0EAAiD,CAAA;IACjD,+EAAsD,CAAA;IACtD,+EAAsD,CAAA;IACtD,0EAAiD,CAAA;IACjD,oFAA2D,CAAA;IAC3D,gEAAuC,CAAA;IACvC,oEAA2C,CAAA;IAC3C,gFAAuD,CAAA;IACvD,kFAAuD,CAAA;AACzD,CAAC,EAjEW,qBAAqB,qCAArB,qBAAqB,QAiEhC","sourcesContent":["// Chain types\nexport enum Chain {\n // Mainnet = 'Mainnet',\n Polygon = 'Polygon',\n Arbitrum = 'Arbitrum',\n Optimism = 'Optimism',\n BSC = 'BSC',\n Evmos = 'Evmos',\n Metis = 'Metis',\n Thundercore = 'Thundercore',\n Base = 'Base',\n Avalanche = 'Avalanche',\n PolygonzkEVM = 'PolygonzkEVM',\n Celo = 'Celo',\n Kava = 'Kava',\n Linea = 'Linea',\n Scroll = 'Scroll',\n Manta = 'Manta',\n Astar = 'Astar',\n Fantom = 'Fantom',\n OkxTestnet = 'OkxTestnet',\n Mantle = 'Mantle',\n AstarZkevm = 'AstarZkevm',\n Blast = 'Blast',\n Mode = 'Mode',\n XLayer = 'XLayer',\n Telos = 'Telos',\n Rootstock = 'Rootstock',\n Taiko = 'Taiko',\n ZklinkNova = 'ZklinkNova',\n Flare = 'Flare',\n BeraChainBartio = 'BeraChainBartio',\n Filecoin = 'Filecoin',\n Apechain = 'Apechain',\n Zircuit = 'Zircuit',\n Moonbeam = 'Moonbeam',\n Sei = 'Sei',\n Sonic = 'Sonic',\n Zeta = 'Zeta',\n Soneium = 'Soneium',\n Mainnet = 'Mainnet',\n Bera = 'Bera',\n Unichain = 'Unichain',\n TataraTestnet = 'TataraTestnet',\n Hemi = 'Hemi',\n Core = 'Core',\n Peaq = 'Peaq',\n Katana = 'Katana',\n Ronin='Ronin',\n Saga='Saga',\n Nibiru='Nibiru',\n Hyperevm='Hyperevm'\n}\n\nexport const ChainId: {\n [key in Chain]: number;\n} = {\n Polygon: 137,\n Arbitrum: 42161,\n Optimism: 10,\n BSC: 56,\n Evmos: 9001,\n Metis: 1088,\n Avalanche: 43114,\n Thundercore: 108,\n PolygonzkEVM: 1101,\n Celo: 42220,\n Kava: 2222,\n Linea: 59144,\n Scroll: 534352,\n Manta: 169,\n Astar: 592,\n Mantle: 5000,\n Fantom: 250,\n AstarZkevm: 3776,\n Blast: 81457,\n Mode: 34443,\n Telos: 40,\n Base: 8453,\n XLayer: 196,\n Rootstock: 30,\n Taiko: 167000,\n ZklinkNova: 810180,\n Flare: 14,\n BeraChainBartio: 80084,\n Filecoin: 314,\n Apechain: 33139,\n Zircuit: 48900,\n Moonbeam: 1284,\n Sei: 1329,\n Sonic: 146,\n Bera: 80094,\n Zeta: 7000,\n Soneium: 1868,\n Mainnet: 1,\n Unichain: 130,\n TataraTestnet: 129399,\n Hemi: 43111,\n OkxTestnet: 195,\n Core: 1116,\n Peaq: 3338,\n Katana: 747474,\n Ronin: 2020,\n Saga: 5464,\n Nibiru: 6900,\n Hyperevm: 999\n};\n\n// Protocol types\nexport enum Protocol {\n QuickSwap = 'QuickSwap',\n Uniswap = 'Uniswap',\n Sushi = 'Sushi',\n Forge = 'Forge',\n PancakeSwap = 'PancakeSwap',\n Maia = 'Maia',\n Retro = 'Retro',\n Kinetix = 'Kinetix',\n MetaVault = 'MetaVault',\n QuickSwapUniv3 = 'QuickSwapUniv3',\n Camelot = 'Camelot',\n Lynex = 'Lynex',\n Thena = 'Thena',\n Horiza = 'Horiza',\n BaseX = 'BaseX',\n ArthSwap = 'ArthSwap',\n Hercules = 'Hercules',\n Thick = 'Thick',\n Crust = 'Crust',\n Thruster = 'Thruster',\n FusionX = 'FusionX',\n SupSwap = 'SupSwap',\n SwapMode = 'SwapMode',\n BaseSwap = 'BaseSwap',\n PoolShark = 'PoolShark',\n Kim = 'Kim',\n Swapsicle = 'Swapsicle',\n Equilibre = 'Equilibre',\n QuickSwapAlgebra = 'QuickSwapAlgebra',\n Fenix = 'Fenix',\n LineHub = 'LineHub',\n Henjin = 'Henjin',\n NovaSwap = 'NovaSwap',\n Spark = 'Spark',\n Spark32 = 'Spark32',\n Kodiak = 'Kodiak',\n Ocelex = 'Ocelex',\n StellaSwap = 'StellaSwap',\n BeamSwap = 'BeamSwap',\n DragonSwap = 'DragonSwap',\n SpookySwap = 'SpookySwap',\n SilverSwap = 'SilverSwap',\n ThickV2 = 'ThickV2',\n Beam = 'Beam',\n QuickSwapIntegral = 'QuickSwapIntegral',\n Kyo = 'Kyo',\n Wasabee = 'Wasabee',\n Katana = 'Katana',\n Eddy = 'Eddy',\n Dodo = 'Dodo',\n Glyph = 'Glyph',\n Sailor = 'Sailor',\n Shadow = 'Shadow',\n MachineX = 'MachineX',\n KatanaIntegral = 'KatanaIntegral',\n Blackhole = 'Blackhole',\n Aerodrome = 'Aerodrome',\n AerodromeV2 = 'AerodromeV2',\n Nest = 'Nest',\n Cypher = 'Cypher',\n SparkIntegral='SparkIntegral'\n}\n\nexport enum StrykePositionManagers {\n StrykeEqualizerManager= 'StrykeEqualizerPositionManager',\n StrykeShadowManager = 'StrykeShadowManager'\n}\n\nexport enum MultiPositionManagers {\n MultiPositionUniswapV3 = 'MultiPositionUniswapV3',\n MultiPositionSushi = 'MultiPositionSushi',\n MultiPositionForge = 'MultiPositionForge',\n MultiPositionMAIA = 'MultiPositionMAIA',\n MultiPositionPancake = 'MultiPositionPancake',\n MultiPositionRetro = 'MultiPositionRetro',\n MultiPositionKinetix = 'MultiPositionKinetix',\n MultiPositionQuickSwap = 'MultiPositionQuickSwap',\n MultiPositionQuickSwapUniv3 = 'MultiPositionQuickSwapUniv3',\n MultiPositionMetaVault = 'MultiPositionMetaVault',\n MultiPositionCamelot = 'MultiPositionCamelot',\n MultiPositionLynex = 'MultiPositionLynex',\n MultiPositionThena = 'MultiPositionThena',\n MultiPositionHoriza = 'MultiPositionHoriza',\n MultiPositionBaseX = 'MultiPositionBasex',\n MultiPositionArthSwap = 'MultiPositionArthSwap',\n MultiPositionHercules = 'MultiPositionHercules',\n MultiPositionThick = 'MultiPositionThick',\n MultiPositionCrust = 'MultiPositionCrust',\n MultiPositionThruster = 'MultiPositionThruster',\n MultiPositionFusionX = 'MultiPositionFusionx',\n MultiPositionSupSwap = 'MultiPositionSupSwap',\n MultiPositionSwapMode = 'MultiPositionSwapMode',\n MultiPositionBaseSwap = 'MultiPositionBaseSwap',\n MultiPositionQuickswap19 = 'MultiPositionQuickSwap19',\n MultiPositionPoolShark = 'MultiPositionPoolShark',\n MultiPositionKim = 'MultiPositionKim',\n MultiPositionSwasicle = 'MultiPositionSwapsicle',\n MultiPositionEquilibre = 'MultiPositionEquilibre',\n MultiPositionFenix = 'MultiPositionFenix',\n MultiPositionLineHub = 'MultiPositionLineHub',\n MultiPositionHenjin = 'MultiPositionHenjin',\n MultiPositionNovaSwap = 'MultiPositionNovaSwap',\n MultiPositionSpark = 'MultiPositionSpark',\n MultiPositionSpark32 = 'MultipositionSpark32',\n MultiPositionKodiak = 'MultiPositionKodiak',\n MultiPositionOcelex = 'MultiPositionOcelex',\n MultiPositionStellaSwap = 'MultiPositionStellaSwap',\n MultiPositionBeamSwap = 'MultiPositionBeamSwap',\n MultiPositionDragonSwap = 'MultiPositionDragonSwap',\n MultiPositionSpookySwap = 'MultiPositionSpookySwap',\n MultiPositionSilverSwap = 'MultiPositionSilverSwap',\n MultiPositionThickV2 = 'MultiPositionThickV2',\n MultiPositionBeam = 'MultiPositionBeam',\n MultiPositionQuickSwapIntegral = 'MultiPositionQuickSwapIntegral',\n MultiPositionKyo = 'MultiPositionKyo',\n MultiPositionSailor = 'MultiPositionSailor',\n MultiPositionWasabee = 'MultiPositionWasabee',\n MultiPositionEddy = 'MultiPositionEddy',\n MultiPositionDodo = 'MultiPositionDodo',\n MultiPositionGlyph = 'MultiPositionGlyph',\n MultiPositionKatana = 'MultiPositionKatana',\n MultiPositionShadow = 'MultiPositionShadow',\n MultiPositionMachineX = 'MultiPositionMachineX',\n MultiPositionKatanaIntegral = 'MultiPositionKatanaIntegral',\n MultiPositionBlackhole = 'MultiPositionBlackHole',\n MultiPositionBlackholeOld = 'MultiPositionBlackHoleV1',\n MultiPositionBlackholeOldVw = 'MultiPositionBlackhole',\n MultiPositionAerodrome = 'MultiPositionAerodrome',\n MultiPositionAerodromeV2 = 'AerodromeStakedPositionManager',\n MultiPositionNest = 'MultiPositionNest',\n MultiPositionCypher = 'MultiPositionCypher',\n MultiPositionSushiManaged = 'MultiPositionSushiManaged',\n MultiPositionSparkIntegral='MultiPositionSparkIntegral'\n}\n\n"]}
|
|
1
|
+
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../../src/const/chain.ts"],"names":[],"mappings":";;;AAAA,cAAc;AACd,IAAY,KAmDX;AAnDD,WAAY,KAAK;IACf,uBAAuB;IACvB,4BAAmB,CAAA;IACnB,8BAAqB,CAAA;IACrB,8BAAqB,CAAA;IACrB,oBAAW,CAAA;IACX,wBAAe,CAAA;IACf,wBAAe,CAAA;IACf,oCAA2B,CAAA;IAC3B,sBAAa,CAAA;IACb,gCAAuB,CAAA;IACvB,sCAA6B,CAAA;IAC7B,sBAAa,CAAA;IACb,sBAAa,CAAA;IACb,wBAAe,CAAA;IACf,0BAAiB,CAAA;IACjB,wBAAe,CAAA;IACf,wBAAe,CAAA;IACf,0BAAiB,CAAA;IACjB,kCAAyB,CAAA;IACzB,0BAAiB,CAAA;IACjB,kCAAyB,CAAA;I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C,CAAA;IAC/C,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,wEAA+C,CAAA;IAC/C,wEAA+C,CAAA;IAC/C,8EAAqD,CAAA;IACrD,0EAAiD,CAAA;IACjD,8DAAqC,CAAA;IACrC,yEAAgD,CAAA;IAChD,0EAAiD,CAAA;IACjD,kEAAyC,CAAA;IACzC,sEAA6C,CAAA;IAC7C,oEAA2C,CAAA;IAC3C,wEAA+C,CAAA;IAC/C,kEAAyC,CAAA;IACzC,sEAA6C,CAAA;IAC7C,oEAA2C,CAAA;IAC3C,oEAA2C,CAAA;IAC3C,4EAAmD,CAAA;IACnD,wEAA+C,CAAA;IAC/C,4EAAmD,CAAA;IACnD,4EAAmD,CAAA;IACnD,4EAAmD,CAAA;IACnD,sEAA6C,CAAA;IAC7C,gEAAuC,CAAA;IACvC,0FAAiE,CAAA;IACjE,8DAAqC,CAAA;IACrC,oEAA2C,CAAA;IAC3C,sEAA6C,CAAA;IAC7C,gEAAuC,CAAA;IACvC,gEAAuC,CAAA;IACvC,kEAAyC,CAAA;IACzC,oEAA2C,CAAA;IAC3C,oEAA2C,CAAA;IAC3C,wEAA+C,CAAA;IAC/C,oFAA2D,CAAA;IAC3D,6EAAoD,CAAA;IACpD,gFAAuD,CAAA;IACvD,wEAA+C,CAAA;IAC/C,4EAAmD,CAAA;IACnD,6EAAoD,CAAA;IACpD,oDAA2B,CAAA;IAC3B,0EAAiD,CAAA;IACjD,oFAA2D,CAAA;IAC3D,gEAAuC,CAAA;IACvC,oEAA2C,CAAA;IAC3C,gFAAuD,CAAA;IACvD,kFAAuD,CAAA;AACzD,CAAC,EApEW,qBAAqB,qCAArB,qBAAqB,QAoEhC","sourcesContent":["// Chain types\nexport enum Chain {\n // Mainnet = 'Mainnet',\n Polygon = 'Polygon',\n Arbitrum = 'Arbitrum',\n Optimism = 'Optimism',\n BSC = 'BSC',\n Evmos = 'Evmos',\n Metis = 'Metis',\n Thundercore = 'Thundercore',\n Base = 'Base',\n Avalanche = 'Avalanche',\n PolygonzkEVM = 'PolygonzkEVM',\n Celo = 'Celo',\n Kava = 'Kava',\n Linea = 'Linea',\n Scroll = 'Scroll',\n Manta = 'Manta',\n Astar = 'Astar',\n Fantom = 'Fantom',\n OkxTestnet = 'OkxTestnet',\n Mantle = 'Mantle',\n AstarZkevm = 'AstarZkevm',\n Blast = 'Blast',\n Mode = 'Mode',\n XLayer = 'XLayer',\n Telos = 'Telos',\n Rootstock = 'Rootstock',\n Taiko = 'Taiko',\n ZklinkNova = 'ZklinkNova',\n Flare = 'Flare',\n BeraChainBartio = 'BeraChainBartio',\n Filecoin = 'Filecoin',\n Apechain = 'Apechain',\n Zircuit = 'Zircuit',\n Moonbeam = 'Moonbeam',\n Sei = 'Sei',\n Sonic = 'Sonic',\n Zeta = 'Zeta',\n Soneium = 'Soneium',\n Mainnet = 'Mainnet',\n Bera = 'Bera',\n Unichain = 'Unichain',\n TataraTestnet = 'TataraTestnet',\n Hemi = 'Hemi',\n Core = 'Core',\n Peaq = 'Peaq',\n Katana = 'Katana',\n Ronin='Ronin',\n Saga='Saga',\n Nibiru='Nibiru',\n Hyperevm='Hyperevm'\n}\n\nexport const ChainId: {\n [key in Chain]: number;\n} = {\n Polygon: 137,\n Arbitrum: 42161,\n Optimism: 10,\n BSC: 56,\n Evmos: 9001,\n Metis: 1088,\n Avalanche: 43114,\n Thundercore: 108,\n PolygonzkEVM: 1101,\n Celo: 42220,\n Kava: 2222,\n Linea: 59144,\n Scroll: 534352,\n Manta: 169,\n Astar: 592,\n Mantle: 5000,\n Fantom: 250,\n AstarZkevm: 3776,\n Blast: 81457,\n Mode: 34443,\n Telos: 40,\n Base: 8453,\n XLayer: 196,\n Rootstock: 30,\n Taiko: 167000,\n ZklinkNova: 810180,\n Flare: 14,\n BeraChainBartio: 80084,\n Filecoin: 314,\n Apechain: 33139,\n Zircuit: 48900,\n Moonbeam: 1284,\n Sei: 1329,\n Sonic: 146,\n Bera: 80094,\n Zeta: 7000,\n Soneium: 1868,\n Mainnet: 1,\n Unichain: 130,\n TataraTestnet: 129399,\n Hemi: 43111,\n OkxTestnet: 195,\n Core: 1116,\n Peaq: 3338,\n Katana: 747474,\n Ronin: 2020,\n Saga: 5464,\n Nibiru: 6900,\n Hyperevm: 999\n};\n\n// Protocol types\nexport enum Protocol {\n QuickSwap = 'QuickSwap',\n Uniswap = 'Uniswap',\n Sushi = 'Sushi',\n Forge = 'Forge',\n PancakeSwap = 'PancakeSwap',\n Maia = 'Maia',\n Retro = 'Retro',\n Kinetix = 'Kinetix',\n MetaVault = 'MetaVault',\n QuickSwapUniv3 = 'QuickSwapUniv3',\n Camelot = 'Camelot',\n Lynex = 'Lynex',\n Thena = 'Thena',\n Horiza = 'Horiza',\n BaseX = 'BaseX',\n ArthSwap = 'ArthSwap',\n Hercules = 'Hercules',\n Thick = 'Thick',\n Crust = 'Crust',\n Thruster = 'Thruster',\n FusionX = 'FusionX',\n SupSwap = 'SupSwap',\n SwapMode = 'SwapMode',\n BaseSwap = 'BaseSwap',\n PoolShark = 'PoolShark',\n Kim = 'Kim',\n Swapsicle = 'Swapsicle',\n Equilibre = 'Equilibre',\n QuickSwapAlgebra = 'QuickSwapAlgebra',\n Fenix = 'Fenix',\n LineHub = 'LineHub',\n Henjin = 'Henjin',\n NovaSwap = 'NovaSwap',\n Spark = 'Spark',\n Spark32 = 'Spark32',\n Kodiak = 'Kodiak',\n Ocelex = 'Ocelex',\n StellaSwap = 'StellaSwap',\n BeamSwap = 'BeamSwap',\n DragonSwap = 'DragonSwap',\n SpookySwap = 'SpookySwap',\n SilverSwap = 'SilverSwap',\n ThickV2 = 'ThickV2',\n Beam = 'Beam',\n QuickSwapIntegral = 'QuickSwapIntegral',\n Kyo = 'Kyo',\n Wasabee = 'Wasabee',\n Katana = 'Katana',\n Eddy = 'Eddy',\n Dodo = 'Dodo',\n Glyph = 'Glyph',\n Sailor = 'Sailor',\n Shadow = 'Shadow',\n MachineX = 'MachineX',\n KatanaIntegral = 'KatanaIntegral',\n Blackhole = 'Blackhole',\n Aerodrome = 'Aerodrome',\n AerodromeV2 = 'AerodromeV2',\n Nest = 'Nest',\n Cypher = 'Cypher',\n SparkIntegral='SparkIntegral',\n UniswapV4 = 'UniswapV4',\n}\n\nexport enum StrykePositionManagers {\n StrykeEqualizerManager= 'StrykeEqualizerPositionManager',\n StrykeShadowManager = 'StrykeShadowManager'\n}\n\nexport enum MultiPositionManagers {\n MultiPositionUniswapV3 = 'MultiPositionUniswapV3',\n MultiPositionSushi = 'MultiPositionSushi',\n MultiPositionForge = 'MultiPositionForge',\n MultiPositionMAIA = 'MultiPositionMAIA',\n MultiPositionPancake = 'MultiPositionPancake',\n MultiPositionRetro = 'MultiPositionRetro',\n MultiPositionKinetix = 'MultiPositionKinetix',\n MultiPositionQuickSwap = 'MultiPositionQuickSwap',\n MultiPositionQuickSwapUniv3 = 'MultiPositionQuickSwapUniv3',\n MultiPositionMetaVault = 'MultiPositionMetaVault',\n MultiPositionCamelot = 'MultiPositionCamelot',\n MultiPositionLynex = 'MultiPositionLynex',\n MultiPositionThena = 'MultiPositionThena',\n MultiPositionHoriza = 'MultiPositionHoriza',\n MultiPositionBaseX = 'MultiPositionBasex',\n MultiPositionArthSwap = 'MultiPositionArthSwap',\n MultiPositionHercules = 'MultiPositionHercules',\n MultiPositionThick = 'MultiPositionThick',\n MultiPositionCrust = 'MultiPositionCrust',\n MultiPositionThruster = 'MultiPositionThruster',\n MultiPositionFusionX = 'MultiPositionFusionx',\n MultiPositionSupSwap = 'MultiPositionSupSwap',\n MultiPositionSwapMode = 'MultiPositionSwapMode',\n MultiPositionBaseSwap = 'MultiPositionBaseSwap',\n MultiPositionQuickswap19 = 'MultiPositionQuickSwap19',\n MultiPositionPoolShark = 'MultiPositionPoolShark',\n MultiPositionKim = 'MultiPositionKim',\n MultiPositionSwasicle = 'MultiPositionSwapsicle',\n MultiPositionEquilibre = 'MultiPositionEquilibre',\n MultiPositionFenix = 'MultiPositionFenix',\n MultiPositionLineHub = 'MultiPositionLineHub',\n MultiPositionHenjin = 'MultiPositionHenjin',\n MultiPositionNovaSwap = 'MultiPositionNovaSwap',\n MultiPositionSpark = 'MultiPositionSpark',\n MultiPositionSpark32 = 'MultipositionSpark32',\n MultiPositionKodiak = 'MultiPositionKodiak',\n MultiPositionOcelex = 'MultiPositionOcelex',\n MultiPositionStellaSwap = 'MultiPositionStellaSwap',\n MultiPositionBeamSwap = 'MultiPositionBeamSwap',\n MultiPositionDragonSwap = 'MultiPositionDragonSwap',\n MultiPositionSpookySwap = 'MultiPositionSpookySwap',\n MultiPositionSilverSwap = 'MultiPositionSilverSwap',\n MultiPositionThickV2 = 'MultiPositionThickV2',\n MultiPositionBeam = 'MultiPositionBeam',\n MultiPositionQuickSwapIntegral = 'MultiPositionQuickSwapIntegral',\n MultiPositionKyo = 'MultiPositionKyo',\n MultiPositionSailor = 'MultiPositionSailor',\n MultiPositionWasabee = 'MultiPositionWasabee',\n MultiPositionEddy = 'MultiPositionEddy',\n MultiPositionDodo = 'MultiPositionDodo',\n MultiPositionGlyph = 'MultiPositionGlyph',\n MultiPositionKatana = 'MultiPositionKatana',\n MultiPositionShadow = 'MultiPositionShadow',\n MultiPositionMachineX = 'MultiPositionMachineX',\n MultiPositionKatanaIntegral = 'MultiPositionKatanaIntegral',\n MultiPositionUniswapV4ALM = 'MultiPositionUniswapV4',\n MultiPositionUniswapV4Hook = 'MultiPositionUniHookTest',\n MultiPositionUniswapV4HookOld = 'UniswapV4Hook',\n MultiPositionBlackhole = 'MultiPositionBlackHoleV1',\n MultiPositionBlackholeOld = 'MultiPositionBlackhole',\n AlgebraHook = 'AlgebraHook',\n MultiPositionAerodrome = 'MultiPositionAerodrome',\n MultiPositionAerodromeV2 = 'AerodromeStakedPositionManager',\n MultiPositionNest = 'MultiPositionNest',\n MultiPositionCypher = 'MultiPositionCypher',\n MultiPositionSushiManaged = 'MultiPositionSushiManaged',\n MultiPositionSparkIntegral='MultiPositionSparkIntegral'\n}\n\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getProtcolTypeByAmmType = exports.isAlgebraIntegralV2Protocol = exports.isAerodromeVault = exports.isPoolSharkProtocol = exports.isAlgebraIntegralProtocol = exports.isAlgebraDirectionProtocol = exports.isThickV2Protocol = exports.isShadowProtocol = exports.isAlgebraProtocol = exports.ALGEBRA_INTEGRAL_V_2_0_PROTOCOLS = exports.AERODROME_PROTOCOLS = exports.ALGEBRA_INTEGRAL_PROTOCOLS = exports.POOLSHARK_PROTOCOLS = exports.DIRECTIONAL_ALGEBRA_PROTOCOLS = exports.SHADOW_PROTOCOLS = exports.ALGEBRA_PROTOCOLS = exports.StakingProtocol = void 0;
|
|
3
|
+
exports.isAlgebraHookSupported = exports.getProtcolTypeByAmmType = exports.isAlgebraIntegralV2Protocol = exports.isAerodromeVault = exports.isPoolSharkProtocol = exports.isAlgebraIntegralProtocol = exports.isAlgebraDirectionProtocol = exports.isThickV2Protocol = exports.isShadowProtocol = exports.isAlgebraProtocol = exports.ALGEBRA_INTEGRAL_V_2_0_PROTOCOLS = exports.AERODROME_PROTOCOLS = exports.ALGEBRA_INTEGRAL_PROTOCOLS = exports.POOLSHARK_PROTOCOLS = exports.DIRECTIONAL_ALGEBRA_PROTOCOLS = exports.SHADOW_PROTOCOLS = exports.ALGEBRA_PROTOCOLS = exports.StakingProtocol = void 0;
|
|
4
4
|
exports.isValidStakingProtocol = isValidStakingProtocol;
|
|
5
5
|
exports.normalizeProtocol = normalizeProtocol;
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const types_1 = require("../base/vault/single-asset/types");
|
|
7
|
+
const chain_1 = require("./chain");
|
|
8
8
|
/**
|
|
9
9
|
* Enum representing supported staking protocols
|
|
10
10
|
*/
|
|
@@ -61,71 +61,71 @@ function normalizeProtocol(protocol) {
|
|
|
61
61
|
* List of protocols that implement the Algebra interface
|
|
62
62
|
*/
|
|
63
63
|
exports.ALGEBRA_PROTOCOLS = [
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
64
|
+
chain_1.Protocol.QuickSwap,
|
|
65
|
+
chain_1.Protocol.Wasabee,
|
|
66
|
+
chain_1.Protocol.Beam,
|
|
67
|
+
chain_1.Protocol.QuickSwapIntegral,
|
|
68
|
+
chain_1.Protocol.SilverSwap,
|
|
69
|
+
chain_1.Protocol.Ocelex,
|
|
70
|
+
chain_1.Protocol.Henjin,
|
|
71
|
+
chain_1.Protocol.Camelot,
|
|
72
|
+
chain_1.Protocol.Ocelex,
|
|
73
|
+
chain_1.Protocol.Lynex,
|
|
74
|
+
chain_1.Protocol.Thena,
|
|
75
|
+
chain_1.Protocol.Hercules,
|
|
76
|
+
chain_1.Protocol.QuickSwapAlgebra,
|
|
77
|
+
chain_1.Protocol.Kim,
|
|
78
|
+
chain_1.Protocol.Swapsicle,
|
|
79
|
+
chain_1.Protocol.Fenix,
|
|
80
|
+
chain_1.Protocol.StellaSwap,
|
|
81
|
+
chain_1.Protocol.Glyph,
|
|
82
|
+
chain_1.Protocol.KatanaIntegral,
|
|
83
|
+
chain_1.Protocol.Blackhole,
|
|
84
|
+
chain_1.Protocol.Nest,
|
|
85
|
+
chain_1.Protocol.Cypher,
|
|
86
|
+
chain_1.Protocol.SparkIntegral,
|
|
87
87
|
];
|
|
88
|
-
exports.SHADOW_PROTOCOLS = [
|
|
88
|
+
exports.SHADOW_PROTOCOLS = [chain_1.Protocol.Shadow, chain_1.Protocol.MachineX];
|
|
89
89
|
/**
|
|
90
90
|
* List of protocols that implement directional Algebra interface
|
|
91
91
|
*/
|
|
92
|
-
exports.DIRECTIONAL_ALGEBRA_PROTOCOLS = [
|
|
92
|
+
exports.DIRECTIONAL_ALGEBRA_PROTOCOLS = [chain_1.Protocol.Camelot, chain_1.Protocol.Hercules];
|
|
93
93
|
/**
|
|
94
94
|
* List of protocols that implement the PoolShark interface
|
|
95
95
|
*/
|
|
96
|
-
exports.POOLSHARK_PROTOCOLS = [
|
|
96
|
+
exports.POOLSHARK_PROTOCOLS = [chain_1.Protocol.PoolShark];
|
|
97
97
|
/**
|
|
98
98
|
* List of protocols that implement the Algebra Integral interface
|
|
99
99
|
*/
|
|
100
100
|
exports.ALGEBRA_INTEGRAL_PROTOCOLS = [
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
101
|
+
chain_1.Protocol.Kim,
|
|
102
|
+
chain_1.Protocol.Wasabee,
|
|
103
|
+
chain_1.Protocol.Swapsicle,
|
|
104
|
+
chain_1.Protocol.QuickSwapIntegral,
|
|
105
|
+
chain_1.Protocol.Fenix,
|
|
106
|
+
chain_1.Protocol.Henjin,
|
|
107
|
+
chain_1.Protocol.SilverSwap,
|
|
108
|
+
chain_1.Protocol.Beam,
|
|
109
|
+
chain_1.Protocol.Glyph,
|
|
110
|
+
chain_1.Protocol.KatanaIntegral,
|
|
111
|
+
chain_1.Protocol.Blackhole,
|
|
112
|
+
chain_1.Protocol.Nest,
|
|
113
|
+
chain_1.Protocol.Cypher,
|
|
114
|
+
chain_1.Protocol.SparkIntegral,
|
|
115
115
|
];
|
|
116
|
-
exports.AERODROME_PROTOCOLS = [
|
|
116
|
+
exports.AERODROME_PROTOCOLS = [chain_1.Protocol.Aerodrome, chain_1.Protocol.AerodromeV2, chain_1.Protocol.Cypher];
|
|
117
117
|
exports.ALGEBRA_INTEGRAL_V_2_0_PROTOCOLS = [
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
118
|
+
chain_1.Protocol.QuickSwapIntegral,
|
|
119
|
+
chain_1.Protocol.Wasabee,
|
|
120
|
+
chain_1.Protocol.KatanaIntegral,
|
|
121
|
+
chain_1.Protocol.Blackhole,
|
|
122
|
+
chain_1.Protocol.Cypher,
|
|
123
|
+
chain_1.Protocol.SparkIntegral,
|
|
124
124
|
];
|
|
125
125
|
/**
|
|
126
126
|
* List of protocols that implement the Thick interface
|
|
127
127
|
*/
|
|
128
|
-
const THICK_PROTOCOLS = [
|
|
128
|
+
const THICK_PROTOCOLS = [chain_1.Protocol.ThickV2];
|
|
129
129
|
/**
|
|
130
130
|
* Checks if a protocol implements the Algebra interface.
|
|
131
131
|
*
|
|
@@ -195,22 +195,48 @@ const isAlgebraIntegralV2Protocol = (protocol) => {
|
|
|
195
195
|
};
|
|
196
196
|
exports.isAlgebraIntegralV2Protocol = isAlgebraIntegralV2Protocol;
|
|
197
197
|
const getProtcolTypeByAmmType = (ammType) => {
|
|
198
|
-
if (ammType ===
|
|
199
|
-
return
|
|
198
|
+
if (ammType === types_1.AMMType.Algebra) {
|
|
199
|
+
return chain_1.Protocol.QuickSwap;
|
|
200
200
|
}
|
|
201
|
-
if (ammType ===
|
|
202
|
-
return
|
|
201
|
+
if (ammType === types_1.AMMType.AlgebraDirectional) {
|
|
202
|
+
return chain_1.Protocol.Camelot;
|
|
203
203
|
}
|
|
204
|
-
if (ammType ===
|
|
205
|
-
return
|
|
204
|
+
if (ammType === types_1.AMMType.AlgebraIntegral) {
|
|
205
|
+
return chain_1.Protocol.QuickSwapIntegral;
|
|
206
206
|
}
|
|
207
|
-
if (ammType ===
|
|
208
|
-
return
|
|
207
|
+
if (ammType === types_1.AMMType.UniswapV3) {
|
|
208
|
+
return chain_1.Protocol.Uniswap;
|
|
209
209
|
}
|
|
210
|
-
if (ammType ===
|
|
211
|
-
return
|
|
210
|
+
if (ammType === types_1.AMMType.Aerodrome) {
|
|
211
|
+
return chain_1.Protocol.Aerodrome;
|
|
212
212
|
}
|
|
213
213
|
throw Error('Protocol type not found');
|
|
214
214
|
};
|
|
215
215
|
exports.getProtcolTypeByAmmType = getProtcolTypeByAmmType;
|
|
216
|
+
/**
|
|
217
|
+
* Checks if a protocol supports algebraHook for a given chain.
|
|
218
|
+
*
|
|
219
|
+
* @param protocolInfo - The protocol information object
|
|
220
|
+
* @param chain - The chain to check for algebraHook support
|
|
221
|
+
* @returns True if the protocol supports algebraHook on the given chain, false otherwise
|
|
222
|
+
* @example
|
|
223
|
+
* ```typescript
|
|
224
|
+
* const protocolInfo = `getProtocolInfoBy`Name('QuickSwapIntegral', 'api-key');
|
|
225
|
+
* if (isAlgebraHookSupported(protocolInfo, Chain.Base)) {
|
|
226
|
+
* // Protocol supports algebraHook on Base chain
|
|
227
|
+
* }
|
|
228
|
+
* ```
|
|
229
|
+
*/
|
|
230
|
+
const isAlgebraHookSupported = (protocolInfo, chain) => {
|
|
231
|
+
if (!protocolInfo) {
|
|
232
|
+
return false;
|
|
233
|
+
}
|
|
234
|
+
// Check if the protocol has algebraHook supported chains defined
|
|
235
|
+
if (protocolInfo.algebraHookSupportedChains && Array.isArray(protocolInfo.algebraHookSupportedChains)) {
|
|
236
|
+
return protocolInfo.algebraHookSupportedChains.includes(chain);
|
|
237
|
+
}
|
|
238
|
+
// Fallback: if no specific chains are defined but beaconAlgebraHook exists, assume it's supported
|
|
239
|
+
return !!protocolInfo.beaconAlgebraHook;
|
|
240
|
+
};
|
|
241
|
+
exports.isAlgebraHookSupported = isAlgebraHookSupported;
|
|
216
242
|
//# sourceMappingURL=protocol.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/const/protocol.ts"],"names":[],"mappings":";;;AAgCA,wDAIC;AAcD,8CAMC;AAxDD,kE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E;IACjE,OAAO,2BAAmB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAChD,CAAC,CAAC;AAFW,QAAA,mBAAmB,uBAE9B;AAGK,MAAM,gBAAgB,GAAG,CAAC,QAA2B,EAAW,EAAE;IACrE,OAAO,2BAAmB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAClD,CAAC,CAAA;AAFY,QAAA,gBAAgB,oBAE5B;AAEM,MAAM,2BAA2B,GAAG,CAAC,QAA2B,EAAW,EAAE;IAClF,OAAO,wCAAgC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC7D,CAAC,CAAA;AAFY,QAAA,2BAA2B,+BAEvC;AAEM,MAAM,uBAAuB,GAAG,CAAC,OAAgB,EAAY,EAAE;IAEpE,IAAI,OAAO,KAAK,kBAAO,CAAC,OAAO,EAAE,CAAC;QAChC,OAAO,mBAAQ,CAAC,SAAS,CAAA;IAC3B,CAAC;IAED,IAAI,OAAO,KAAK,kBAAO,CAAC,kBAAkB,EAAE,CAAC;QAC3C,OAAO,mBAAQ,CAAC,OAAO,CAAA;IACzB,CAAC;IAED,IAAI,OAAO,KAAK,kBAAO,CAAC,eAAe,EAAE,CAAC;QACxC,OAAO,mBAAQ,CAAC,iBAAiB,CAAA;IACnC,CAAC;IAED,IAAI,OAAO,KAAK,kBAAO,CAAC,SAAS,EAAE,CAAC;QAClC,OAAO,mBAAQ,CAAC,OAAO,CAAA;IACzB,CAAC;IAED,IAAI,OAAO,KAAK,kBAAO,CAAC,SAAS,EAAE,CAAC;QAClC,OAAO,mBAAQ,CAAC,SAAS,CAAA;IAC3B,CAAC;IAED,MAAM,KAAK,CAAC,yBAAyB,CAAC,CAAA;AACxC,CAAC,CAAA;AAvBY,QAAA,uBAAuB,2BAuBnC","sourcesContent":["import { AMMType } from '../base/vault/single-asset/types.js';\nimport { SupportedProtocol } from '../types.js';\nimport { Protocol } from './chain.js';\n\n/**\n * Enum representing supported staking protocols\n */\nexport enum StakingProtocol {\n Forge = 'Forge',\n Kinetix = 'Kinetix',\n Uniswap = 'Uniswap',\n SushiSwap = 'SushiSwap',\n QuickSwapV3 = 'QuickSwapV3',\n ArthSwap = 'ArthSwap',\n arthswap = 'arthswap',\n Swapsicle = 'Swapsicle',\n Spark = 'Spark',\n Spark32 = 'Spark32',\n}\n\n/**\n * Checks if a given string is a valid StakingProtocol enum value.\n *\n * @param protocol - The protocol string to validate\n * @returns True if the protocol is a valid StakingProtocol, false otherwise\n * @example\n * ```typescript\n * if (isValidStakingProtocol('Uniswap')) {\n * // Handle valid protocol\n * }\n * ```\n */\nexport function isValidStakingProtocol(protocol: string): protocol is StakingProtocol {\n // Convert the input protocol to title case (first letter uppercase, rest lowercase)\n const normalizedProtocol = protocol.charAt(0).toUpperCase() + protocol.slice(1).toLowerCase();\n return Object.values(StakingProtocol).includes(normalizedProtocol as StakingProtocol);\n}\n\n/**\n * Normalizes a protocol string to its corresponding StakingProtocol enum value.\n *\n * @param protocol - The protocol string to normalize\n * @returns The normalized StakingProtocol enum value\n * @throws Error if the protocol string is invalid\n * @example\n * ```typescript\n * const protocol = normalizeProtocol('uniswap');\n * // Returns: StakingProtocol.Uniswap\n * ```\n */\nexport function normalizeProtocol(protocol: string): StakingProtocol {\n const normalizedProtocol = protocol.charAt(0).toUpperCase() + protocol.slice(1).toLowerCase();\n if (!isValidStakingProtocol(normalizedProtocol)) {\n throw new Error(`Invalid protocol: ${protocol}`);\n }\n return normalizedProtocol as StakingProtocol;\n}\n\n/**\n * List of protocols that implement the Algebra interface\n */\n\n\nexport const ALGEBRA_PROTOCOLS = [\n Protocol.QuickSwap,\n Protocol.Wasabee,\n Protocol.Beam,\n Protocol.QuickSwapIntegral,\n Protocol.SilverSwap,\n Protocol.Ocelex,\n Protocol.Henjin,\n Protocol.Camelot,\n Protocol.Ocelex,\n Protocol.Lynex,\n Protocol.Thena,\n Protocol.Hercules,\n Protocol.QuickSwapAlgebra,\n Protocol.Kim,\n Protocol.Swapsicle,\n Protocol.Fenix,\n Protocol.StellaSwap,\n Protocol.Glyph,\n Protocol.KatanaIntegral,\n Protocol.Blackhole,\n Protocol.Nest,\n Protocol.Cypher,\n Protocol.SparkIntegral,\n];\n\nexport const SHADOW_PROTOCOLS = [Protocol.Shadow, Protocol.MachineX];\n\n/**\n * List of protocols that implement directional Algebra interface\n */\nexport const DIRECTIONAL_ALGEBRA_PROTOCOLS = [Protocol.Camelot, Protocol.Hercules];\n\n/**\n * List of protocols that implement the PoolShark interface\n */\nexport const POOLSHARK_PROTOCOLS = [Protocol.PoolShark];\n\n/**\n * List of protocols that implement the Algebra Integral interface\n */\nexport const ALGEBRA_INTEGRAL_PROTOCOLS = [\n Protocol.Kim,\n Protocol.Wasabee,\n Protocol.Swapsicle,\n Protocol.QuickSwapIntegral,\n Protocol.Fenix,\n Protocol.Henjin,\n Protocol.SilverSwap,\n Protocol.Beam,\n Protocol.Glyph,\n Protocol.KatanaIntegral,\n Protocol.Blackhole,\n Protocol.Nest,\n Protocol.Cypher,\n Protocol.SparkIntegral,\n];\n\nexport const AERODROME_PROTOCOLS = [Protocol.Aerodrome, Protocol.AerodromeV2, Protocol.Cypher];\n\nexport const ALGEBRA_INTEGRAL_V_2_0_PROTOCOLS = [\n Protocol.QuickSwapIntegral,\n Protocol.Wasabee,\n Protocol.KatanaIntegral,\n Protocol.Blackhole,\n Protocol.Cypher,\n Protocol.SparkIntegral,\n]\n\n/**\n * List of protocols that implement the Thick interface\n */\nconst THICK_PROTOCOLS = [Protocol.ThickV2];\n\n/**\n * Checks if a protocol implements the Algebra interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements Algebra, false otherwise\n */\nexport const isAlgebraProtocol = (protocol: SupportedProtocol) => {\n return ALGEBRA_PROTOCOLS.includes(protocol);\n};\n\n\n/**\n * Checks if a protocol implements the Shadow interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements Shadow, false otherwise\n */\nexport const isShadowProtocol = (protocol: SupportedProtocol) => {\n return SHADOW_PROTOCOLS.includes(protocol);\n};\n\n/**\n * Checks if a protocol implements the ThickV2 interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements ThickV2, false otherwise\n */\nexport const isThickV2Protocol = (protocol: SupportedProtocol) => {\n return THICK_PROTOCOLS.includes(protocol);\n};\n\n/**\n * Checks if a protocol implements the Algebra Direction interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements Algebra Direction, false otherwise\n */\nexport const isAlgebraDirectionProtocol = (protocol: SupportedProtocol) => {\n return DIRECTIONAL_ALGEBRA_PROTOCOLS.includes(protocol);\n};\n\n/**\n * Checks if a protocol implements the Algebra Integral interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements Algebra Integral, false otherwise\n */\nexport const isAlgebraIntegralProtocol = (protocol: SupportedProtocol) => {\n return ALGEBRA_INTEGRAL_PROTOCOLS.includes(protocol);\n};\n\n\n/**\n * Checks if a protocol implements the PoolShark interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements PoolShark, false otherwise\n */\nexport const isPoolSharkProtocol = (protocol: SupportedProtocol) => {\n return POOLSHARK_PROTOCOLS.includes(protocol);\n};\n\n\nexport const isAerodromeVault = (protocol: SupportedProtocol): boolean => {\n return AERODROME_PROTOCOLS.includes(protocol);\n}\n\nexport const isAlgebraIntegralV2Protocol = (protocol: SupportedProtocol): boolean => {\n return ALGEBRA_INTEGRAL_V_2_0_PROTOCOLS.includes(protocol);\n}\n\nexport const getProtcolTypeByAmmType = (ammType: AMMType): Protocol => {\n\n if (ammType === AMMType.Algebra) {\n return Protocol.QuickSwap\n }\n\n if (ammType === AMMType.AlgebraDirectional) {\n return Protocol.Camelot\n }\n\n if (ammType === AMMType.AlgebraIntegral) {\n return Protocol.QuickSwapIntegral\n }\n\n if (ammType === AMMType.UniswapV3) {\n return Protocol.Uniswap\n }\n\n if (ammType === AMMType.Aerodrome) {\n return Protocol.Aerodrome\n }\n\n throw Error('Protocol type not found')\n} "]}
|
|
1
|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AACI,MAAM,sBAAsB,GAAG,CAAC,YAAsC,EAAE,KAAY,EAAW,EAAE;IACtG,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,iEAAiE;IACjE,IAAI,YAAY,CAAC,0BAA0B,IAAI,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,0BAA0B,CAAC,EAAE,CAAC;QACtG,OAAO,YAAY,CAAC,0BAA0B,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACjE,CAAC;IAED,kGAAkG;IAClG,OAAO,CAAC,CAAC,YAAY,CAAC,iBAAiB,CAAC;AAC1C,CAAC,CAAA;AAZY,QAAA,sBAAsB,0BAYlC","sourcesContent":["import { AMMType } from '../base/vault/single-asset/types';\nimport { SupportedProtocol, ProtocolInfo } from '../types';\nimport { Protocol, Chain } from './chain';\n\n/**\n * Enum representing supported staking protocols\n */\nexport enum StakingProtocol {\n Forge = 'Forge',\n Kinetix = 'Kinetix',\n Uniswap = 'Uniswap',\n SushiSwap = 'SushiSwap',\n QuickSwapV3 = 'QuickSwapV3',\n ArthSwap = 'ArthSwap',\n arthswap = 'arthswap',\n Swapsicle = 'Swapsicle',\n Spark = 'Spark',\n Spark32 = 'Spark32',\n}\n\n/**\n * Checks if a given string is a valid StakingProtocol enum value.\n *\n * @param protocol - The protocol string to validate\n * @returns True if the protocol is a valid StakingProtocol, false otherwise\n * @example\n * ```typescript\n * if (isValidStakingProtocol('Uniswap')) {\n * // Handle valid protocol\n * }\n * ```\n */\nexport function isValidStakingProtocol(protocol: string): protocol is StakingProtocol {\n // Convert the input protocol to title case (first letter uppercase, rest lowercase)\n const normalizedProtocol = protocol.charAt(0).toUpperCase() + protocol.slice(1).toLowerCase();\n return Object.values(StakingProtocol).includes(normalizedProtocol as StakingProtocol);\n}\n\n/**\n * Normalizes a protocol string to its corresponding StakingProtocol enum value.\n *\n * @param protocol - The protocol string to normalize\n * @returns The normalized StakingProtocol enum value\n * @throws Error if the protocol string is invalid\n * @example\n * ```typescript\n * const protocol = normalizeProtocol('uniswap');\n * // Returns: StakingProtocol.Uniswap\n * ```\n */\nexport function normalizeProtocol(protocol: string): StakingProtocol {\n const normalizedProtocol = protocol.charAt(0).toUpperCase() + protocol.slice(1).toLowerCase();\n if (!isValidStakingProtocol(normalizedProtocol)) {\n throw new Error(`Invalid protocol: ${protocol}`);\n }\n return normalizedProtocol as StakingProtocol;\n}\n\n/**\n * List of protocols that implement the Algebra interface\n */\n\n\nexport const ALGEBRA_PROTOCOLS = [\n Protocol.QuickSwap,\n Protocol.Wasabee,\n Protocol.Beam,\n Protocol.QuickSwapIntegral,\n Protocol.SilverSwap,\n Protocol.Ocelex,\n Protocol.Henjin,\n Protocol.Camelot,\n Protocol.Ocelex,\n Protocol.Lynex,\n Protocol.Thena,\n Protocol.Hercules,\n Protocol.QuickSwapAlgebra,\n Protocol.Kim,\n Protocol.Swapsicle,\n Protocol.Fenix,\n Protocol.StellaSwap,\n Protocol.Glyph,\n Protocol.KatanaIntegral,\n Protocol.Blackhole,\n Protocol.Nest,\n Protocol.Cypher,\n Protocol.SparkIntegral,\n];\n\nexport const SHADOW_PROTOCOLS = [Protocol.Shadow, Protocol.MachineX];\n\n/**\n * List of protocols that implement directional Algebra interface\n */\nexport const DIRECTIONAL_ALGEBRA_PROTOCOLS = [Protocol.Camelot, Protocol.Hercules];\n\n/**\n * List of protocols that implement the PoolShark interface\n */\nexport const POOLSHARK_PROTOCOLS = [Protocol.PoolShark];\n\n/**\n * List of protocols that implement the Algebra Integral interface\n */\nexport const ALGEBRA_INTEGRAL_PROTOCOLS = [\n Protocol.Kim,\n Protocol.Wasabee,\n Protocol.Swapsicle,\n Protocol.QuickSwapIntegral,\n Protocol.Fenix,\n Protocol.Henjin,\n Protocol.SilverSwap,\n Protocol.Beam,\n Protocol.Glyph,\n Protocol.KatanaIntegral,\n Protocol.Blackhole,\n Protocol.Nest,\n Protocol.Cypher,\n Protocol.SparkIntegral,\n];\n\nexport const AERODROME_PROTOCOLS = [Protocol.Aerodrome, Protocol.AerodromeV2, Protocol.Cypher];\n\nexport const ALGEBRA_INTEGRAL_V_2_0_PROTOCOLS = [\n Protocol.QuickSwapIntegral,\n Protocol.Wasabee,\n Protocol.KatanaIntegral,\n Protocol.Blackhole,\n Protocol.Cypher,\n Protocol.SparkIntegral,\n]\n\n/**\n * List of protocols that implement the Thick interface\n */\nconst THICK_PROTOCOLS = [Protocol.ThickV2];\n\n/**\n * Checks if a protocol implements the Algebra interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements Algebra, false otherwise\n */\nexport const isAlgebraProtocol = (protocol: SupportedProtocol) => {\n return ALGEBRA_PROTOCOLS.includes(protocol);\n};\n\n\n/**\n * Checks if a protocol implements the Shadow interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements Shadow, false otherwise\n */\nexport const isShadowProtocol = (protocol: SupportedProtocol) => {\n return SHADOW_PROTOCOLS.includes(protocol);\n};\n\n/**\n * Checks if a protocol implements the ThickV2 interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements ThickV2, false otherwise\n */\nexport const isThickV2Protocol = (protocol: SupportedProtocol) => {\n return THICK_PROTOCOLS.includes(protocol);\n};\n\n/**\n * Checks if a protocol implements the Algebra Direction interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements Algebra Direction, false otherwise\n */\nexport const isAlgebraDirectionProtocol = (protocol: SupportedProtocol) => {\n return DIRECTIONAL_ALGEBRA_PROTOCOLS.includes(protocol);\n};\n\n/**\n * Checks if a protocol implements the Algebra Integral interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements Algebra Integral, false otherwise\n */\nexport const isAlgebraIntegralProtocol = (protocol: SupportedProtocol) => {\n return ALGEBRA_INTEGRAL_PROTOCOLS.includes(protocol);\n};\n\n\n/**\n * Checks if a protocol implements the PoolShark interface.\n *\n * @param protocol - The protocol to check\n * @returns True if the protocol implements PoolShark, false otherwise\n */\nexport const isPoolSharkProtocol = (protocol: SupportedProtocol) => {\n return POOLSHARK_PROTOCOLS.includes(protocol);\n};\n\n\nexport const isAerodromeVault = (protocol: SupportedProtocol): boolean => {\n return AERODROME_PROTOCOLS.includes(protocol);\n}\n\nexport const isAlgebraIntegralV2Protocol = (protocol: SupportedProtocol): boolean => {\n return ALGEBRA_INTEGRAL_V_2_0_PROTOCOLS.includes(protocol);\n}\n\nexport const getProtcolTypeByAmmType = (ammType: AMMType): Protocol => {\n\n if (ammType === AMMType.Algebra) {\n return Protocol.QuickSwap\n }\n\n if (ammType === AMMType.AlgebraDirectional) {\n return Protocol.Camelot\n }\n\n if (ammType === AMMType.AlgebraIntegral) {\n return Protocol.QuickSwapIntegral\n }\n\n if (ammType === AMMType.UniswapV3) {\n return Protocol.Uniswap\n }\n\n if (ammType === AMMType.Aerodrome) {\n return Protocol.Aerodrome\n }\n\n throw Error('Protocol type not found')\n}\n\n/**\n * Checks if a protocol supports algebraHook for a given chain.\n *\n * @param protocolInfo - The protocol information object\n * @param chain - The chain to check for algebraHook support\n * @returns True if the protocol supports algebraHook on the given chain, false otherwise\n * @example\n * ```typescript\n * const protocolInfo = `getProtocolInfoBy`Name('QuickSwapIntegral', 'api-key');\n * if (isAlgebraHookSupported(protocolInfo, Chain.Base)) {\n * // Protocol supports algebraHook on Base chain\n * }\n * ```\n */\nexport const isAlgebraHookSupported = (protocolInfo: ProtocolInfo | undefined, chain: Chain): boolean => {\n if (!protocolInfo) {\n return false;\n }\n \n // Check if the protocol has algebraHook supported chains defined\n if (protocolInfo.algebraHookSupportedChains && Array.isArray(protocolInfo.algebraHookSupportedChains)) {\n return protocolInfo.algebraHookSupportedChains.includes(chain);\n }\n \n // Fallback: if no specific chains are defined but beaconAlgebraHook exists, assume it's supported\n return !!protocolInfo.beaconAlgebraHook;\n} "]}
|
package/dist/cjs/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Address, Client, TestClient, WalletClient } from 'viem';\nimport { Chain, Protocol } from './const/chain.js';\n\n/**\n * Configuration object for initializing the SteerClient\n * @interface SteerConfig\n */\nexport interface SteerConfig {\n /** The environment to use for API calls */\n environment?: 'production' | 'development';\n /** The viem client for blockchain interactions */\n client: Client | TestClient;\n /** Optional wallet client for write operations */\n walletClient?: WalletClient;\n /** Optional Subgraph Studio API key for higher rate limits */\n subgraphStudioKey?: string;\n}\n\nexport interface SteerResponse<T> {\n data: T | null;\n status: number;\n success: boolean;\n error?: string;\n}\n\nexport interface BaseVaultDetails {\n vaultType: string;\n token0: Address;\n token1: Address;\n name: string;\n symbol: string;\n decimals: bigint;\n token0Name: string;\n token1Name: string;\n token0Symbol: string;\n token1Symbol: string;\n token0Decimals: bigint;\n token1Decimals: bigint;\n totalLPTokensIssued: bigint;\n token0Balance: bigint;\n token1Balance: bigint;\n vaultCreator: Address;\n}\n\nexport interface VaultDetails extends BaseVaultDetails {\n feeTier: bigint;\n}\n\nexport interface AlgebraVaultDetails extends BaseVaultDetails {\n // Algebra vaults might have additional specific fields in the future\n}\n\nexport interface VaultDetailsResponse {\n details: VaultDetails | AlgebraVaultDetails;\n ratio: number | bigint | string;\n}\n\nexport interface TokenData {\n id: Address;\n decimals: string;\n symbol: string;\n name: string;\n}\n\nexport interface PoolData {\n id: Address;\n token0: TokenData;\n token1: TokenData;\n chainId: number;\n feeTier: number;\n tickSpacing: number | bigint;\n tick?: string;\n liquidity?: string;\n volumeUSD?: string;\n volumeToken0?: string;\n volumeToken1?: string;\n totalValueLockedETH?: string;\n totalValueLockedUSD?: string;\n}\n\nexport interface Slot0 {\n price?: bigint;\n sqrtPriceX96?: bigint;\n tick: number;\n observationIndex: number | bigint;\n observationCardinality: number;\n observationCardinalityNext: number;\n feeProtocol: number;\n unlocked: boolean;\n}\n\nexport interface PoolsharkStructs {\n samples: {\n index: number;\n count: number;\n countMax: number;\n };\n feeGrowthGlobal0: bigint;\n feeGrowthGlobal1: bigint;\n secondsPerLiquidityAccum: bigint;\n price: bigint;\n liquidity: bigint;\n tickSecondsAccum: number;\n tickAtPrice: number;\n protocolSwapFee0: number;\n protocolSwapFee1: number;\n}\n\nexport interface LimitPoolState {\n price: bigint;\n liquidity: bigint;\n protocolFees: bigint;\n protocolFillFee: number;\n tickAtPrice: number;\n}\n\nexport interface PoolSharkGlobalState {\n pool: PoolsharkStructs;\n pool0: LimitPoolState;\n pool1: LimitPoolState;\n liquidityGlobal: bigint;\n positionIdNext: number;\n epoch: number;\n unlocked: number;\n}\n\nexport interface GlobalStateABI {\n price: bigint;\n tick: number;\n prevInitializedTick?: number;\n fee?: number;\n feeZto?: number;\n feeOtz?: number;\n timepointIndex: number;\n communityFee?: number;\n communityFeeToken0?: number;\n communityFeeToken1?: number;\n unlocked: boolean;\n}\n\nexport type SupportedProtocol = keyof { [chain in Protocol]: string };\nexport type SteerSupportedChains = keyof { [chain in Chain]: string }
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Address, Client, TestClient, WalletClient } from 'viem';\nimport { Chain, Protocol } from './const/chain.js';\n\n/**\n * Configuration object for initializing the SteerClient\n * @interface SteerConfig\n */\nexport interface SteerConfig {\n /** The environment to use for API calls */\n environment?: 'production' | 'development';\n /** The viem client for blockchain interactions */\n client: Client | TestClient;\n /** Optional wallet client for write operations */\n walletClient?: WalletClient;\n /** Optional Subgraph Studio API key for higher rate limits */\n subgraphStudioKey?: string;\n}\n\nexport interface SteerResponse<T> {\n data: T | null;\n status: number;\n success: boolean;\n error?: string;\n}\n\nexport interface BaseVaultDetails {\n vaultType: string;\n token0: Address;\n token1: Address;\n name: string;\n symbol: string;\n decimals: bigint;\n token0Name: string;\n token1Name: string;\n token0Symbol: string;\n token1Symbol: string;\n token0Decimals: bigint;\n token1Decimals: bigint;\n totalLPTokensIssued: bigint;\n token0Balance: bigint;\n token1Balance: bigint;\n vaultCreator: Address;\n}\n\nexport interface VaultDetails extends BaseVaultDetails {\n feeTier: bigint;\n}\n\nexport interface AlgebraVaultDetails extends BaseVaultDetails {\n // Algebra vaults might have additional specific fields in the future\n}\n\nexport interface VaultDetailsResponse {\n details: VaultDetails | AlgebraVaultDetails;\n ratio: number | bigint | string;\n}\n\nexport interface TokenData {\n id: Address;\n decimals: string;\n symbol: string;\n name: string;\n}\n\nexport interface PoolData {\n id: Address;\n token0: TokenData;\n token1: TokenData;\n chainId: number;\n feeTier: number;\n tickSpacing: number | bigint;\n tick?: string;\n liquidity?: string;\n volumeUSD?: string;\n volumeToken0?: string;\n volumeToken1?: string;\n totalValueLockedETH?: string;\n totalValueLockedUSD?: string;\n}\n\nexport interface Slot0 {\n price?: bigint;\n sqrtPriceX96?: bigint;\n tick: number;\n observationIndex: number | bigint;\n observationCardinality: number;\n observationCardinalityNext: number;\n feeProtocol: number;\n unlocked: boolean;\n}\n\nexport interface PoolsharkStructs {\n samples: {\n index: number;\n count: number;\n countMax: number;\n };\n feeGrowthGlobal0: bigint;\n feeGrowthGlobal1: bigint;\n secondsPerLiquidityAccum: bigint;\n price: bigint;\n liquidity: bigint;\n tickSecondsAccum: number;\n tickAtPrice: number;\n protocolSwapFee0: number;\n protocolSwapFee1: number;\n}\n\nexport interface LimitPoolState {\n price: bigint;\n liquidity: bigint;\n protocolFees: bigint;\n protocolFillFee: number;\n tickAtPrice: number;\n}\n\nexport interface PoolSharkGlobalState {\n pool: PoolsharkStructs;\n pool0: LimitPoolState;\n pool1: LimitPoolState;\n liquidityGlobal: bigint;\n positionIdNext: number;\n epoch: number;\n unlocked: number;\n}\n\nexport interface GlobalStateABI {\n price: bigint;\n tick: number;\n prevInitializedTick?: number;\n fee?: number;\n feeZto?: number;\n feeOtz?: number;\n timepointIndex: number;\n communityFee?: number;\n communityFeeToken0?: number;\n communityFeeToken1?: number;\n unlocked: boolean;\n} \n\nexport type SupportedProtocol = keyof { [chain in Protocol]: string };\nexport type SteerSupportedChains = keyof { [chain in Chain]: string }\n\nexport type ProtocolInfo = {\n deprecated?: boolean;\n subgraph: Partial<{ [chain in Chain]: string }>;\n factoryAddress?: Partial<{ [chain in Chain]: string }>;\n NFTManagerAddress?: Partial<{ [chain in Chain]: string }>;\n swapRouterAddress?: Partial<{ [chain in Chain]: string }>;\n TickLensAddress?: Partial<{ [chain in Chain]: string }>;\n QuoterV2Address?: Partial<{ [chain in Chain]: string }>;\n beaconContract?: string;\n strykeBeaconContract?: string;\n initCodeHash?: Partial<{ [chain in Chain]: string }>;\n PoolManager?: Partial<{ [chain in Chain]: string }>;\n PositionManager?: Partial<{ [chain in Chain]: string }>;\n Quoter?: Partial<{ [chain in Chain]: string }>;\n PositionDescriptor?: Partial<{ [chain in Chain]: string }>;\n StateView?: Partial<{ [chain in Chain]: string }>;\n UniversalRouter?: Partial<{ [chain in Chain]: string }>;\n Permit2?: Partial<{ [chain in Chain]: string }>;\n beaconContractSushiManaged?: string;\n EntryPointAddress?: Partial<{ [chain in Chain]: string}>\n beaconAlgebraHook?: string,\n algebraHookSupportedChains?: Chain[],\n}\n\n\nexport type AMMConfigType = Partial<{ [protocol in SupportedProtocol]: ProtocolInfo }>;\n\nexport interface Fee {\n feeIdentifier: string;\n feeValue: bigint;\n}\n\nexport interface FeeManagerConfigParams {\n vault: Address;\n feeIdentifiers: string[];\n feeValues: bigint[];\n withdrawers: Address[];\n}\n\nexport interface DefaultFeeManagerConfigParams extends FeeManagerConfigParams {\n totalVaultFees: bigint;\n}\n\nexport interface FeeWithdrawalParams {\n vault: Address;\n feeIdentifier: string;\n amount0: bigint;\n amount1: bigint;\n}\n\nexport interface MultipleFeeWithdrawalParams {\n vault: Address;\n feeIdentifiers: string[];\n amounts0: bigint[];\n amounts1: bigint[];\n}\n\nexport interface MultiVaultFeeWithdrawalParams {\n vaults: Address[];\n feeIdentifiers: string[][];\n amounts0: bigint[][];\n amounts1: bigint[][];\n}\n"]}
|
|
@@ -34,6 +34,7 @@ const aerodrome_v2_js_1 = require("./protocols/aerodrome-v2.js");
|
|
|
34
34
|
const nest_js_1 = require("./protocols/nest.js");
|
|
35
35
|
const cypher_js_1 = require("./protocols/cypher.js");
|
|
36
36
|
const spark_integral_js_1 = require("./protocols/spark-integral.js");
|
|
37
|
+
const uniswapv4_js_1 = require("./protocols/uniswapv4.js");
|
|
37
38
|
const getAmmConfig = (theGraphApiKey) => {
|
|
38
39
|
return {
|
|
39
40
|
QuickSwap: (0, quickswap_js_1.quickSwapConfig)(theGraphApiKey),
|
|
@@ -97,6 +98,7 @@ const getAmmConfig = (theGraphApiKey) => {
|
|
|
97
98
|
Nest: (0, nest_js_1.nestVaultConfig)(),
|
|
98
99
|
Cypher: (0, cypher_js_1.cypherConfig)(theGraphApiKey),
|
|
99
100
|
SparkIntegral: (0, spark_integral_js_1.sparkIntegralConfig)(),
|
|
101
|
+
UniswapV4: (0, uniswapv4_js_1.uniswapV4Config)(theGraphApiKey),
|
|
100
102
|
};
|
|
101
103
|
};
|
|
102
104
|
exports.getAmmConfig = getAmmConfig;
|