-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.ts
55 lines (52 loc) · 2.67 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import { FastifyInstance, FastifyPluginAsync } from 'fastify';
import path from 'path';
import getPositionsOwnedByRoute from './routes/getPositionsOwnedBy';
import getBundlesOwnedByRoute from './routes/getBundlesOwnedBy';
import getPoolInfoRoute from './routes/getPoolInfo';
import getPositionInfoRoute from './routes/getPositionInfo';
import getPositionsInBundleRoute from './routes/getPositionsInBundle';
import getAddLiquidityQuoteRoute from './routes/addLiquidityQuote';
import getSwapQuoteRoute from './routes/quoteSwap';
import getFeesQuoteRoute from './routes/getFeesQuote';
import getFeeRewardsQuoteRoute from './routes/getFeeRewardsQuote';
import executeSwapRoute from './routes/executeSwap';
import openPositionRoute from './routes/openPosition';
import closePositionRoute from './routes/closePosition';
import addLiquidityRoute from './routes/addLiquidity';
import removeLiquidityRoute from './routes/removeLiquidity';
import collectFeesRoute from './routes/collectFees';
import collectFeeRewardsRoute from './routes/collectFeeRewards';
import createPositionBundleRoute from './routes/createPositionBundle';
import openPositionsInBundleRoute from './routes/openPositionsInBundle';
import addLiquidityInBundleRoute from './routes/addLiquidityInBundle';
import removeLiquidityInBundleRoute from './routes/removeLiquidityInBundle';
import closePositionsInBundleRoute from './routes/closePositionsInBundle';
import deletePositionBundleRoute from './routes/deletePositionBundle';
export const orcaRoutes: FastifyPluginAsync = async (fastify: FastifyInstance) => {
// Get the folder name dynamically
const folderName = path.basename(__dirname);
// Register individual routes
getPositionsOwnedByRoute(fastify, folderName);
getBundlesOwnedByRoute(fastify, folderName);
getPoolInfoRoute(fastify, folderName);
getPositionInfoRoute(fastify, folderName);
getPositionsInBundleRoute(fastify, folderName);
getAddLiquidityQuoteRoute(fastify, folderName);
getSwapQuoteRoute(fastify, folderName);
getFeesQuoteRoute(fastify, folderName);
getFeeRewardsQuoteRoute(fastify, folderName);
executeSwapRoute(fastify, folderName);
openPositionRoute(fastify, folderName);
closePositionRoute(fastify, folderName);
addLiquidityRoute(fastify, folderName);
removeLiquidityRoute(fastify, folderName);
collectFeesRoute(fastify, folderName);
collectFeeRewardsRoute(fastify, folderName);
createPositionBundleRoute(fastify, folderName);
openPositionsInBundleRoute(fastify, folderName);
addLiquidityInBundleRoute(fastify, folderName);
removeLiquidityInBundleRoute(fastify, folderName);
closePositionsInBundleRoute(fastify, folderName);
deletePositionBundleRoute(fastify, folderName);
};
export default orcaRoutes;