@mento-protocol/mento-sdk 1.0.9 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +42 -2
  2. package/dist/cjs/constants/addresses.js +0 -23
  3. package/dist/cjs/constants/index.d.ts +1 -0
  4. package/dist/cjs/constants/index.js +1 -0
  5. package/dist/cjs/constants/tradablePairs.42220.d.ts +2 -0
  6. package/dist/cjs/constants/tradablePairs.42220.js +6407 -0
  7. package/dist/cjs/constants/tradablePairs.44787.d.ts +2 -0
  8. package/dist/cjs/constants/tradablePairs.44787.js +6407 -0
  9. package/dist/cjs/constants/tradablePairs.d.ts +15 -2
  10. package/dist/cjs/constants/tradablePairs.js +48 -9093
  11. package/dist/cjs/enums/chainId.d.ts +1 -2
  12. package/dist/cjs/enums/chainId.js +0 -1
  13. package/dist/cjs/index.d.ts +4 -3
  14. package/dist/cjs/index.js +3 -2
  15. package/dist/cjs/mento.d.ts +14 -4
  16. package/dist/cjs/mento.js +36 -90
  17. package/dist/cjs/routeUtils.d.ts +304 -0
  18. package/dist/cjs/routeUtils.js +372 -0
  19. package/dist/cjs/utils.d.ts +8 -0
  20. package/dist/cjs/utils.js +18 -1
  21. package/dist/esm/constants/addresses.js +0 -23
  22. package/dist/esm/constants/index.d.ts +1 -0
  23. package/dist/esm/constants/index.js +1 -0
  24. package/dist/esm/constants/tradablePairs.42220.d.ts +2 -0
  25. package/dist/esm/constants/tradablePairs.42220.js +6404 -0
  26. package/dist/esm/constants/tradablePairs.44787.d.ts +2 -0
  27. package/dist/esm/constants/tradablePairs.44787.js +6404 -0
  28. package/dist/esm/constants/tradablePairs.d.ts +15 -2
  29. package/dist/esm/constants/tradablePairs.js +23 -9091
  30. package/dist/esm/enums/chainId.d.ts +1 -2
  31. package/dist/esm/enums/chainId.js +0 -1
  32. package/dist/esm/index.d.ts +4 -3
  33. package/dist/esm/index.js +3 -2
  34. package/dist/esm/mento.d.ts +14 -4
  35. package/dist/esm/mento.js +37 -91
  36. package/dist/esm/routeUtils.d.ts +304 -0
  37. package/dist/esm/routeUtils.js +362 -0
  38. package/dist/esm/utils.d.ts +8 -0
  39. package/dist/esm/utils.js +16 -0
  40. package/package.json +18 -6
@@ -0,0 +1,362 @@
1
+ /**
2
+ * Builds the connectivity data structures needed for route generation.
3
+ *
4
+ * Transforms a list of direct trading pairs into our ConnectivityData
5
+ * that allow us to quickly find trading routes.
6
+ *
7
+ * **Construction Process:**
8
+ *
9
+ * ```
10
+ * Input: TradablePairs = [
11
+ * { id: 'cUSD-CELO', assets: [cUSD, CELO], path: [exchange1_CELO_cUSD] },
12
+ * { id: 'CELO-cEUR', assets: [CELO, cEUR], path: [exchange2_CELO_cEUR] }
13
+ * ]
14
+ *
15
+ * Step 1 - Build addrToSymbol map:
16
+ * cUSD.address → 'cUSD'
17
+ * CELO.address → 'CELO'
18
+ * cEUR.address → 'cEUR'
19
+ *
20
+ * Step 2 - Build directPathMap (sorted alphabetically for consistency):
21
+ * 'CELO_addr-cEUR_addr' → exchange2_CELO_cEUR
22
+ * 'CELO_addr-cUSD_addr' → exchange1_CELO_cUSD
23
+ *
24
+ * Step 3 - Build bidirectional tokenGraph:
25
+ * cUSD.address → Set([CELO.address])
26
+ * CELO.address → Set([cUSD.address, cEUR.address])
27
+ * cEUR.address → Set([CELO.address])
28
+ * ```
29
+ *
30
+ * **Result**: We can now efficiently answer:
31
+ * - "What's the symbol for address X?" → addrToSymbol.get(addr)
32
+ * - "What exchange connects tokens X and Y?" → directPathMap.get(sortedAddressPairKey)
33
+ * - "What tokens can I reach from token X?" → tokenGraph.get(X)
34
+ *
35
+ * @param directPairs - Array of direct trading pairs
36
+ * @returns Connectivity data structure for efficient route generation
37
+ *
38
+ * @example
39
+ * ```typescript
40
+ * const directPairs = [
41
+ * { id: 'cUSD-CELO', assets: [cUSD, CELO], path: [exchange1] },
42
+ * { id: 'CELO-cEUR', assets: [CELO, cEUR], path: [exchange2] }
43
+ * ]
44
+ *
45
+ * const connectivityData = buildConnectivityStructures(directPairs)
46
+ *
47
+ * // Now we can efficiently find routes:
48
+ * // 1. Check if cUSD connects to anything: connectivityData.tokenGraph.get(cUSD.address) → [CELO.address]
49
+ * // 2. Check if CELO connects to cEUR: connectivityData.tokenGraph.get(CELO.address) → [cUSD.address, cEUR.address] ✓
50
+ * // 3. Get exchange details: connectivityData.directPathMap.get('CELO_addr-cEUR_addr') → exchange2_CELO_cEUR
51
+ * // Result: Found route cUSD → CELO → cEUR with exchange details
52
+ * ```
53
+ */
54
+ export function buildConnectivityStructures(directPairs) {
55
+ const addrToSymbol = new Map();
56
+ const directPathMap = new Map();
57
+ const tokenGraph = new Map();
58
+ for (const pair of directPairs) {
59
+ const [assetA, assetB] = pair.assets;
60
+ // Build address-to-symbol map for quick symbol lookups
61
+ addrToSymbol.set(assetA.address, assetA.symbol);
62
+ addrToSymbol.set(assetB.address, assetB.symbol);
63
+ // Build direct path map (sorted addresses as key for consistency)
64
+ // for quick lookup of exchange details for any token pair
65
+ const sortedAddresses = [assetA.address, assetB.address]
66
+ .sort()
67
+ .join('-');
68
+ if (!directPathMap.has(sortedAddresses)) {
69
+ directPathMap.set(sortedAddresses, pair.path[0]);
70
+ }
71
+ // Build bidirectional connectivity graph for route traversal
72
+ // Each token can reach its directly connected tokens
73
+ if (!tokenGraph.has(assetA.address))
74
+ tokenGraph.set(assetA.address, new Set());
75
+ if (!tokenGraph.has(assetB.address))
76
+ tokenGraph.set(assetB.address, new Set());
77
+ tokenGraph.get(assetA.address).add(assetB.address);
78
+ tokenGraph.get(assetB.address).add(assetA.address);
79
+ }
80
+ return { addrToSymbol, directPathMap, tokenGraph, directPairs };
81
+ }
82
+ /**
83
+ * Generates all possible routes (direct + two-hop) using connectivity data.
84
+ *
85
+ * This function implements a route discovery algorithm that:
86
+ *
87
+ * 1. **Adds all direct pairs** (single-hop routes)
88
+ * 2. **Discovers two-hop routes** using graph traversal:
89
+ * - For each token A, find its neighbors (tokens directly connected)
90
+ * - For each neighbor B, find B's neighbors
91
+ * - If B connects to token C (C ≠ A), then A->B->C is a valid route
92
+ *
93
+ * **Route Deduplication**: Multiple routes between the same token pair
94
+ * are collected in arrays, allowing the selection algorithm to choose
95
+ * the best one based on spread data or heuristics.
96
+ *
97
+ * **Canonical Pair IDs**: All pairs use alphabetically sorted symbols
98
+ * (e.g., 'cEUR-cUSD' not 'cUSD-cEUR') for consistent identification.
99
+ *
100
+ * @param connectivityData - The connectivity data from buildConnectivityStructures()
101
+ * @returns Map of pair ID -> array of possible routes for that pair
102
+ *
103
+ * @example
104
+ * ```typescript
105
+ * // Given direct pairs: cUSD-CELO, CELO-cEUR, cUSD-USDC
106
+ * const allRoutes = generateAllRoutes(connectivityData)
107
+ *
108
+ * // Results might include:
109
+ * // 'cUSD-CELO' -> [{ path: [cUSD->CELO] }] // direct route
110
+ * // 'cEUR-cUSD' -> [
111
+ * // { path: [cUSD->USDC, USDC->cEUR] } // two-hop via USDC
112
+ * // { path: [cUSD->CELO, CELO->cEUR] } // two-hop via CELO
113
+ * // ]
114
+ * ```
115
+ */
116
+ export function generateAllRoutes(connectivityData) {
117
+ const { addrToSymbol, directPathMap, tokenGraph, directPairs } = connectivityData;
118
+ const allRoutes = new Map();
119
+ // Step 1: Add all direct pairs (single-hop routes)
120
+ for (const pair of directPairs) {
121
+ if (!allRoutes.has(pair.id)) {
122
+ allRoutes.set(pair.id, []);
123
+ }
124
+ allRoutes.get(pair.id).push(pair);
125
+ }
126
+ // Step 2: Generate two-hop pairs using graph traversal
127
+ // Algorithm: For each token, explore all paths of length 2
128
+ // OUTER LOOP: "For each starting token..." (e.g., cUSD, CELO, cEUR, etc.)
129
+ for (const [start, neighbors] of tokenGraph.entries()) {
130
+ // MIDDLE LOOP: "Where can I go from the starting token?" (first hop)
131
+ // Example: If start = cUSD, neighbors might be [CELO, USDC, cKES]
132
+ for (const intermediate of neighbors) {
133
+ // Get all tokens reachable from this intermediate token (second hop destinations)
134
+ const secondHopNeighbors = tokenGraph.get(intermediate);
135
+ if (!secondHopNeighbors)
136
+ continue;
137
+ // INNER LOOP: "From the intermediate token, where can I go?" (second hop)
138
+ // Example: If intermediate = CELO, secondHopNeighbors might be [cUSD, cEUR, cBRL]
139
+ for (const end of secondHopNeighbors) {
140
+ // Skip circular routes like cUSD → CELO → cUSD (pointless)
141
+ if (end === start)
142
+ continue;
143
+ // At this point we have a potential route: start → intermediate → end
144
+ // Example: cUSD → CELO → cEUR
145
+ // Try to create a valid two-hop trading pair from this route
146
+ const twoHopPair = createTwoHopPair(start, intermediate, end, addrToSymbol, directPathMap);
147
+ // If we successfully created the pair, add it to our collection
148
+ if (twoHopPair) {
149
+ if (!allRoutes.has(twoHopPair.id)) {
150
+ allRoutes.set(twoHopPair.id, []);
151
+ }
152
+ allRoutes.get(twoHopPair.id).push(twoHopPair);
153
+ }
154
+ }
155
+ }
156
+ }
157
+ return allRoutes;
158
+ }
159
+ /**
160
+ * Creates a two-hop tradable pair if valid exchange hops exist.
161
+ *
162
+ * 1. **Validates tokens exist** in the asset map
163
+ * 2. **Finds exchange hops** for both segments of the route
164
+ * 3. **Creates canonical pair structure** with sorted symbols
165
+ *
166
+ * **Route Structure**: The resulting pair represents trading from start->end
167
+ * via intermediate token, but the assets are ordered alphabetically by symbol
168
+ * for consistency (canonical form).
169
+ *
170
+ * **Path Representation**: The path array contains the actual exchange hops
171
+ * needed to execute the trade, preserving the routing information.
172
+ *
173
+ * @param startToken - Starting token address
174
+ * @param intermediate - Intermediate token address for routing
175
+ * @param end - Destination token address
176
+ * @param assetMap - Map of token address -> Asset details
177
+ * @param directPathMap - Map of token pairs -> exchange hop details
178
+ * @returns Route if valid route exists, null otherwise
179
+ *
180
+ * @example
181
+ * ```typescript
182
+ * // Create route: cUSD -> CELO -> cEUR
183
+ * const pair = createTwoHopPair(
184
+ * '0x765D...', // cUSD address
185
+ * '0x471E...', // CELO address
186
+ * '0xD876...', // cEUR address
187
+ * addrToSymbol,
188
+ * directPathMap
189
+ * )
190
+ *
191
+ * // Result:
192
+ * // {
193
+ * // id: 'cEUR-cUSD', // alphabetical order
194
+ * // assets: [cEUR, cUSD], // alphabetical order
195
+ * // path: [ // actual routing path
196
+ * // { cUSD->CELO exchange },
197
+ * // { CELO->cEUR exchange }
198
+ * // ]
199
+ * // }
200
+ * ```
201
+ */
202
+ export function createTwoHopPair(startToken, intermediateToken, endToken, addrToSymbol, directPathMap) {
203
+ // Validate that both start and end tokens exist in our address-to-symbol map
204
+ const startSymbol = addrToSymbol.get(startToken);
205
+ const endSymbol = addrToSymbol.get(endToken);
206
+ if (!startSymbol || !endSymbol)
207
+ return null;
208
+ // Create Asset objects from address and symbol
209
+ const startAsset = { address: startToken, symbol: startSymbol };
210
+ const endAsset = { address: endToken, symbol: endSymbol };
211
+ // Find exchange hops for both segments of the two-hop route
212
+ // Keys are sorted token addresses for consistent lookup
213
+ const hop1Key = [startToken, intermediateToken].sort().join('-');
214
+ const hop2Key = [intermediateToken, endToken].sort().join('-');
215
+ const hop1 = directPathMap.get(hop1Key);
216
+ const hop2 = directPathMap.get(hop2Key);
217
+ // If either hop doesn't exist, this route is invalid
218
+ if (!hop1 || !hop2)
219
+ return null;
220
+ // Create canonical pair structure (alphabetical symbol ordering)
221
+ const sortedSymbols = [startSymbol, endSymbol].sort();
222
+ const pairId = `${sortedSymbols[0]}-${sortedSymbols[1]}`;
223
+ // Assets array follows alphabetical ordering for consistency
224
+ const assets = startSymbol <= endSymbol ? [startAsset, endAsset] : [endAsset, startAsset];
225
+ return {
226
+ id: pairId,
227
+ assets,
228
+ path: [hop1, hop2], // Preserves actual routing path for execution
229
+ };
230
+ }
231
+ /**
232
+ * Selects optimal routes from all candidates based on spread data or heuristics.
233
+ *
234
+ * This is the route optimization engine that implements the following logic:
235
+ *
236
+ * **For Single Route**: Use it directly (no optimization needed)
237
+ *
238
+ * **For Multiple Routes**:
239
+ * - If `returnAllRoutes=true`: Return all routes (used for cache generation)
240
+ * - If `returnAllRoutes=false`: Apply optimization to select the best route
241
+ *
242
+ * **Route Selection Strategy**: Delegates to `selectBestRoute()` which uses
243
+ * a multi-tier approach prioritizing cost efficiency and reliability.
244
+ *
245
+ * @param allRoutes - Map of pair ID -> array of possible routes
246
+ * @param returnAllRoutes - Whether to return all routes or optimize selection
247
+ * @param assetMap - Asset map for token symbol lookups during optimization
248
+ * @returns Array of selected optimal routes
249
+ *
250
+ * @example
251
+ * ```typescript
252
+ * // Multiple routes for cUSD-cEUR pair
253
+ * const candidates = new Map([
254
+ * ['cEUR-cUSD', [
255
+ * { path: [cUSD->CELO->cEUR], spreadData: { totalSpreadPercent: 0.5 } },
256
+ * { path: [cUSD->cREAL->cEUR], spreadData: { totalSpreadPercent: 0.3 } },
257
+ * { path: [cUSD->cEUR] } // direct route, no spread data
258
+ * ]]
259
+ * ])
260
+ *
261
+ * const optimal = selectOptimalRoutes(candidates, false, assetMap)
262
+ * // Returns the cUSD->cREAL->cEUR route (lowest spread: 0.3%)
263
+ * ```
264
+ */
265
+ export function selectOptimalRoutes(allRoutes, returnAllRoutes, addrToSymbol) {
266
+ const result = new Map();
267
+ for (const [pairId, routes] of allRoutes) {
268
+ if (routes.length === 1) {
269
+ // Only one route available - use it directly
270
+ result.set(pairId, routes[0]);
271
+ }
272
+ else if (returnAllRoutes) {
273
+ // Return all routes with unique keys (used for cache generation)
274
+ routes.forEach((route, index) => {
275
+ result.set(`${pairId}_${index}`, route);
276
+ });
277
+ }
278
+ else {
279
+ // Multiple routes - select the best one using optimization logic
280
+ const bestRoute = selectBestRoute(routes, addrToSymbol);
281
+ result.set(pairId, bestRoute);
282
+ }
283
+ }
284
+ return Array.from(result.values());
285
+ }
286
+ /**
287
+ * Selects the best route from candidates using spread data or fallback heuristics.
288
+ *
289
+ * This function implements a sophisticated route selection algorithm with
290
+ * multiple optimization tiers:
291
+ *
292
+ * **Tier 1 - Spread-Based Optimization** (Preferred):
293
+ * - Use routes with spread data (actual cost information)
294
+ * - Select route with lowest `totalSpreadPercent`
295
+ * - This provides the most cost-efficient trading
296
+ *
297
+ * **Tier 2 - Direct Route Preference** (Fallback):
298
+ * - If no spread data available, prefer direct (single-hop) routes
299
+ * - Direct routes have lower execution risk and gas costs
300
+ *
301
+ * **Tier 3 - Major Stablecoin Preference** (Final Fallback):
302
+ * - For two-hop routes, prefer those going through major stablecoins
303
+ * - Major FX currencies like cUSD and cEUR typically have better liquidity
304
+ *
305
+ * **Tier 4 - First Available** (Last Resort):
306
+ * - If no other heuristics apply, use the first route found
307
+ *
308
+ * @param candidates - Array of possible routes for the same token pair
309
+ * @param assetMap - Asset map for token symbol lookups
310
+ * @returns The optimal route selected using the tier system
311
+ *
312
+ * @example
313
+ * ```typescript
314
+ * const candidates = [
315
+ * { path: [A->B->C], spreadData: { totalSpreadPercent: 0.8 } },
316
+ * { path: [A->D->C], spreadData: { totalSpreadPercent: 0.4 } }, // Winner: lowest spread
317
+ * { path: [A->C] }, // direct route, no spread data
318
+ * ]
319
+ *
320
+ * const best = selectBestRoute(candidates, assetMap)
321
+ * // Returns the A->D->C route (0.4% spread)
322
+ * ```
323
+ */
324
+ export function selectBestRoute(candidates, addrToSymbol) {
325
+ // Tier 1: Prefer routes with spread data (lowest spread wins)
326
+ const candidatesWithSpread = candidates.filter(hasSpreadData);
327
+ if (candidatesWithSpread.length > 0) {
328
+ return candidatesWithSpread.reduce((best, current) => current.spreadData.totalSpreadPercent < best.spreadData.totalSpreadPercent
329
+ ? current
330
+ : best);
331
+ }
332
+ // Tier 2: Prefer direct routes (single-hop, lower risk)
333
+ const directRoute = candidates.find((c) => c.path.length === 1);
334
+ if (directRoute)
335
+ return directRoute;
336
+ // Tier 3: Prefer routes through major stablecoins (better liquidity)
337
+ const stablecoins = ['cUSD', 'cEUR', 'USDC', 'USDT'];
338
+ const routeWithStablecoin = candidates.find((candidate) => {
339
+ const intermediateToken = getIntermediateToken(candidate);
340
+ if (!intermediateToken)
341
+ return false;
342
+ const symbol = addrToSymbol.get(intermediateToken);
343
+ return symbol && stablecoins.includes(symbol);
344
+ });
345
+ // Tier 4: Use first available route as last resort
346
+ return routeWithStablecoin || candidates[0];
347
+ }
348
+ /**
349
+ * Extracts the intermediate token address from a two-hop route.
350
+ * In a two-hop route A->B->C, this function finds token B (the intermediate).
351
+ */
352
+ export function getIntermediateToken(route) {
353
+ // Find the common token between the two hops
354
+ const [hop1, hop2] = route.path;
355
+ return hop1.assets.find((addr) => hop2.assets.includes(addr));
356
+ }
357
+ /**
358
+ * Type guard to check if a Route has spread data.
359
+ */
360
+ export function hasSpreadData(pair) {
361
+ return 'spreadData' in pair && pair.spreadData !== undefined;
362
+ }
@@ -1,5 +1,6 @@
1
1
  import { BigNumberish, providers, Signer } from 'ethers';
2
2
  import { Address } from './interfaces';
3
+ import { TradablePair } from './mento';
3
4
  /**
4
5
  * Gets the chain ID from a signer or provider
5
6
  * @param signerOrProvider an ethers provider or signer
@@ -40,3 +41,10 @@ export declare function getSymbolFromTokenAddress(tokenAddr: Address, signerOrPr
40
41
  * @returns the populated TransactionRequest object
41
42
  */
42
43
  export declare function increaseAllowance(tokenAddr: string, spender: string, amount: BigNumberish, signerOrProvider: Signer | providers.Provider): Promise<providers.TransactionRequest>;
44
+ /**
45
+ * Find a token address by its symbol from tradable pairs
46
+ * @param pairs array of tradable pairs to search through
47
+ * @param symbol the token symbol to find (case-insensitive)
48
+ * @returns the token address if found, null otherwise
49
+ */
50
+ export declare function findTokenBySymbol(pairs: readonly TradablePair[], symbol: string): string | null;
package/dist/esm/utils.js CHANGED
@@ -101,3 +101,19 @@ export function increaseAllowance(tokenAddr, spender, amount, signerOrProvider)
101
101
  return yield contract.populateTransaction.increaseAllowance(spender, amount);
102
102
  });
103
103
  }
104
+ /**
105
+ * Find a token address by its symbol from tradable pairs
106
+ * @param pairs array of tradable pairs to search through
107
+ * @param symbol the token symbol to find (case-insensitive)
108
+ * @returns the token address if found, null otherwise
109
+ */
110
+ export function findTokenBySymbol(pairs, symbol) {
111
+ for (const pair of pairs) {
112
+ for (const asset of pair.assets) {
113
+ if (asset.symbol.toLowerCase() === symbol.toLowerCase()) {
114
+ return asset.address;
115
+ }
116
+ }
117
+ }
118
+ return null;
119
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mento-protocol/mento-sdk",
3
3
  "description": "Official SDK for interacting with the Mento Protocol",
4
- "version": "1.0.9",
4
+ "version": "1.10.1",
5
5
  "license": "MIT",
6
6
  "author": "Mento Labs",
7
7
  "keywords": [
@@ -26,13 +26,19 @@
26
26
  "build:cjs": "tsc --project ./tsconfig.json",
27
27
  "build:esm": "tsc --project ./tsconfig.esm.json",
28
28
  "clean": "rm -rf ./dist",
29
- "lint": "eslint --config ./.eslintrc.json src/**/*.ts",
29
+ "lint": "eslint --config ./.eslintrc.json 'src/**/*.ts' 'scripts/**/*.ts'",
30
+ "type-check": "tsc --noEmit --project ./tsconfig.eslint.json",
30
31
  "prettier": "prettier --config ./.prettierrc.json --write **/*.{json,md,js,ts,yml}",
31
32
  "size": "size-limit",
32
33
  "test": "jest --runInBand --verbose",
33
34
  "coverage": "jest --coverage",
34
35
  "cacheTradablePairs": "ts-node scripts/cacheTradablePairs.ts",
35
- "printTradablePairs": "ts-node scripts/printTradablePairs.ts"
36
+ "printTradablePairs": "ts-node scripts/printTradablePairs.ts",
37
+ "tradingLimits": "ts-node scripts/printTradingLimits.ts",
38
+ "poolConfigs": "ts-node scripts/printPoolConfigs.ts",
39
+ "breakerBox": "ts-node scripts/printBreakerBox.ts",
40
+ "quote": "ts-node scripts/quotes/index.ts",
41
+ "getTokenGraph": "ts-node scripts/visualizeTokenGraph.ts"
36
42
  },
37
43
  "husky": {
38
44
  "hooks": {
@@ -46,7 +52,7 @@
46
52
  ]
47
53
  },
48
54
  "engines": {
49
- "node": ">=14"
55
+ "node": ">=22"
50
56
  },
51
57
  "size-limit": [
52
58
  {
@@ -64,19 +70,25 @@
64
70
  "@size-limit/preset-small-lib": "^8.1.0",
65
71
  "@tsconfig/recommended": "^1.0.1",
66
72
  "@types/jest": "^29.4.0",
67
- "@types/node": "^18.13.0",
73
+ "@types/node": "^22.13.0",
74
+ "@types/yargs-parser": "^21.0.3",
68
75
  "@typescript-eslint/eslint-plugin": "^5.53.0",
69
76
  "@typescript-eslint/parser": "^5.53.0",
77
+ "chalk": "4.1.2",
78
+ "cli-table3": "0.6.3",
79
+ "date-fns": "^4.1.0",
70
80
  "eslint": "^8.34.0",
71
81
  "eslint-config-prettier": "^8.6.0",
72
82
  "ethers": "^5.7",
73
83
  "husky": "^8.0.2",
74
84
  "jest": "^29.4.2",
85
+ "ora": "8.2.0",
75
86
  "prettier": "^2.8.4",
76
87
  "size-limit": "^8.1.0",
77
88
  "ts-jest": "^29.0.5",
78
89
  "ts-node": "^10.9.1",
79
- "typescript": "^4.9.5"
90
+ "typescript": "^4.9.5",
91
+ "yargs-parser": "^21.1.1"
80
92
  },
81
93
  "dependencies": {
82
94
  "@mento-protocol/mento-core-ts": "^0.2.0",