@strkfarm/sdk 1.1.65 → 1.1.67

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.
@@ -17402,6 +17402,10 @@ var RE7Strategies = [
17402
17402
  riskFactor: _stableCoinPoolRiskFactors,
17403
17403
  netRisk: _stableCoinPoolRiskFactors.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _stableCoinPoolRiskFactors.reduce((acc, curr) => acc + curr.weight, 0),
17404
17404
  notARisks: getNoRiskTags(_stableCoinPoolRiskFactors)
17405
+ },
17406
+ additionalInfo: {
17407
+ ...ETHUSDCRe7Strategy.additionalInfo,
17408
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
17405
17409
  }
17406
17410
  },
17407
17411
  {
@@ -17417,7 +17421,11 @@ var RE7Strategies = [
17417
17421
  Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
17418
17422
  Global.getDefaultTokens().find((t) => t.symbol === "ETH")
17419
17423
  ],
17420
- risk: highRisk
17424
+ risk: highRisk,
17425
+ additionalInfo: {
17426
+ ...ETHUSDCRe7Strategy.additionalInfo,
17427
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
17428
+ }
17421
17429
  },
17422
17430
  {
17423
17431
  ...ETHUSDCRe7Strategy,
@@ -17432,7 +17440,11 @@ var RE7Strategies = [
17432
17440
  Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
17433
17441
  Global.getDefaultTokens().find((t) => t.symbol === "STRK")
17434
17442
  ],
17435
- risk: highRisk
17443
+ risk: highRisk,
17444
+ additionalInfo: {
17445
+ ...ETHUSDCRe7Strategy.additionalInfo,
17446
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
17447
+ }
17436
17448
  },
17437
17449
  {
17438
17450
  ...ETHUSDCRe7Strategy,
@@ -17447,7 +17459,11 @@ var RE7Strategies = [
17447
17459
  Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
17448
17460
  Global.getDefaultTokens().find((t) => t.symbol === "WBTC")
17449
17461
  ],
17450
- risk: mediumRisk
17462
+ risk: mediumRisk,
17463
+ additionalInfo: {
17464
+ ...ETHUSDCRe7Strategy.additionalInfo,
17465
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
17466
+ }
17451
17467
  }
17452
17468
  ];
17453
17469
  var EkuboCLVaultStrategies = [
@@ -30129,7 +30145,6 @@ var UniversalStrategy = class _UniversalStrategy extends BaseStrategy {
30129
30145
  const lastReportTime = await this.contract.call("last_report_timestamp", []);
30130
30146
  const netAPY = await this.netAPY();
30131
30147
  const defispringAPY = (netAPY.splits.find((s) => s.id === "defispring")?.apy || 0) * 0.8;
30132
- if (!defispringAPY) throw new Error("DefiSpring APY not found");
30133
30148
  const timeDiff = Math.round(Date.now() / 1e3) - Number(lastReportTime);
30134
30149
  const growthRate = timeDiff * defispringAPY / (365 * 24 * 60 * 60);
30135
30150
  const rewardAssets = prevAum.multipliedBy(growthRate);
package/dist/index.js CHANGED
@@ -202,7 +202,7 @@ var Web3Number = class _Web3Number2 extends _Web3Number {
202
202
  [import_util.default.inspect.custom](depth, opts) {
203
203
  return this.toString();
204
204
  }
205
- [Symbol.for("nodejs.util.inspect.custom")](depth, inspectOptions, inspect) {
205
+ [/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")](depth, inspectOptions, inspect) {
206
206
  return this.toString();
207
207
  }
208
208
  inspect(depth, opts) {
@@ -264,8 +264,8 @@ var logger = import_winston.default.createLogger({
264
264
  // Add timestamp to log messages
265
265
  import_winston.format.printf(({ timestamp, level, message, ...meta }) => {
266
266
  let msg = `${timestamp} ${level}: ${message}`;
267
- if (meta && meta[Symbol.for("splat")]) {
268
- for (const arg of meta[Symbol.for("splat")]) {
267
+ if (meta && meta[/* @__PURE__ */ Symbol.for("splat")]) {
268
+ for (const arg of meta[/* @__PURE__ */ Symbol.for("splat")]) {
269
269
  if (arg instanceof Error) {
270
270
  msg += `
271
271
  ${arg.stack}`;
@@ -17402,6 +17402,10 @@ var RE7Strategies = [
17402
17402
  riskFactor: _stableCoinPoolRiskFactors,
17403
17403
  netRisk: _stableCoinPoolRiskFactors.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _stableCoinPoolRiskFactors.reduce((acc, curr) => acc + curr.weight, 0),
17404
17404
  notARisks: getNoRiskTags(_stableCoinPoolRiskFactors)
17405
+ },
17406
+ additionalInfo: {
17407
+ ...ETHUSDCRe7Strategy.additionalInfo,
17408
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
17405
17409
  }
17406
17410
  },
17407
17411
  {
@@ -17417,7 +17421,11 @@ var RE7Strategies = [
17417
17421
  Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
17418
17422
  Global.getDefaultTokens().find((t) => t.symbol === "ETH")
17419
17423
  ],
17420
- risk: highRisk
17424
+ risk: highRisk,
17425
+ additionalInfo: {
17426
+ ...ETHUSDCRe7Strategy.additionalInfo,
17427
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
17428
+ }
17421
17429
  },
17422
17430
  {
17423
17431
  ...ETHUSDCRe7Strategy,
@@ -17432,7 +17440,11 @@ var RE7Strategies = [
17432
17440
  Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
17433
17441
  Global.getDefaultTokens().find((t) => t.symbol === "STRK")
17434
17442
  ],
17435
- risk: highRisk
17443
+ risk: highRisk,
17444
+ additionalInfo: {
17445
+ ...ETHUSDCRe7Strategy.additionalInfo,
17446
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
17447
+ }
17436
17448
  },
17437
17449
  {
17438
17450
  ...ETHUSDCRe7Strategy,
@@ -17447,7 +17459,11 @@ var RE7Strategies = [
17447
17459
  Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
17448
17460
  Global.getDefaultTokens().find((t) => t.symbol === "WBTC")
17449
17461
  ],
17450
- risk: mediumRisk
17462
+ risk: mediumRisk,
17463
+ additionalInfo: {
17464
+ ...ETHUSDCRe7Strategy.additionalInfo,
17465
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
17466
+ }
17451
17467
  }
17452
17468
  ];
17453
17469
  var EkuboCLVaultStrategies = [
@@ -30129,7 +30145,6 @@ var UniversalStrategy = class _UniversalStrategy extends BaseStrategy {
30129
30145
  const lastReportTime = await this.contract.call("last_report_timestamp", []);
30130
30146
  const netAPY = await this.netAPY();
30131
30147
  const defispringAPY = (netAPY.splits.find((s) => s.id === "defispring")?.apy || 0) * 0.8;
30132
- if (!defispringAPY) throw new Error("DefiSpring APY not found");
30133
30148
  const timeDiff = Math.round(Date.now() / 1e3) - Number(lastReportTime);
30134
30149
  const growthRate = timeDiff * defispringAPY / (365 * 24 * 60 * 60);
30135
30150
  const rewardAssets = prevAum.multipliedBy(growthRate);
package/dist/index.mjs CHANGED
@@ -96,7 +96,7 @@ var Web3Number = class _Web3Number2 extends _Web3Number {
96
96
  [util.inspect.custom](depth, opts) {
97
97
  return this.toString();
98
98
  }
99
- [Symbol.for("nodejs.util.inspect.custom")](depth, inspectOptions, inspect) {
99
+ [/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")](depth, inspectOptions, inspect) {
100
100
  return this.toString();
101
101
  }
102
102
  inspect(depth, opts) {
@@ -158,8 +158,8 @@ var logger = winston.createLogger({
158
158
  // Add timestamp to log messages
159
159
  format.printf(({ timestamp, level, message, ...meta }) => {
160
160
  let msg = `${timestamp} ${level}: ${message}`;
161
- if (meta && meta[Symbol.for("splat")]) {
162
- for (const arg of meta[Symbol.for("splat")]) {
161
+ if (meta && meta[/* @__PURE__ */ Symbol.for("splat")]) {
162
+ for (const arg of meta[/* @__PURE__ */ Symbol.for("splat")]) {
163
163
  if (arg instanceof Error) {
164
164
  msg += `
165
165
  ${arg.stack}`;
@@ -17300,6 +17300,10 @@ var RE7Strategies = [
17300
17300
  riskFactor: _stableCoinPoolRiskFactors,
17301
17301
  netRisk: _stableCoinPoolRiskFactors.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _stableCoinPoolRiskFactors.reduce((acc, curr) => acc + curr.weight, 0),
17302
17302
  notARisks: getNoRiskTags(_stableCoinPoolRiskFactors)
17303
+ },
17304
+ additionalInfo: {
17305
+ ...ETHUSDCRe7Strategy.additionalInfo,
17306
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
17303
17307
  }
17304
17308
  },
17305
17309
  {
@@ -17315,7 +17319,11 @@ var RE7Strategies = [
17315
17319
  Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
17316
17320
  Global.getDefaultTokens().find((t) => t.symbol === "ETH")
17317
17321
  ],
17318
- risk: highRisk
17322
+ risk: highRisk,
17323
+ additionalInfo: {
17324
+ ...ETHUSDCRe7Strategy.additionalInfo,
17325
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
17326
+ }
17319
17327
  },
17320
17328
  {
17321
17329
  ...ETHUSDCRe7Strategy,
@@ -17330,7 +17338,11 @@ var RE7Strategies = [
17330
17338
  Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
17331
17339
  Global.getDefaultTokens().find((t) => t.symbol === "STRK")
17332
17340
  ],
17333
- risk: highRisk
17341
+ risk: highRisk,
17342
+ additionalInfo: {
17343
+ ...ETHUSDCRe7Strategy.additionalInfo,
17344
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
17345
+ }
17334
17346
  },
17335
17347
  {
17336
17348
  ...ETHUSDCRe7Strategy,
@@ -17345,7 +17357,11 @@ var RE7Strategies = [
17345
17357
  Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
17346
17358
  Global.getDefaultTokens().find((t) => t.symbol === "WBTC")
17347
17359
  ],
17348
- risk: mediumRisk
17360
+ risk: mediumRisk,
17361
+ additionalInfo: {
17362
+ ...ETHUSDCRe7Strategy.additionalInfo,
17363
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
17364
+ }
17349
17365
  }
17350
17366
  ];
17351
17367
  var EkuboCLVaultStrategies = [
@@ -30027,7 +30043,6 @@ var UniversalStrategy = class _UniversalStrategy extends BaseStrategy {
30027
30043
  const lastReportTime = await this.contract.call("last_report_timestamp", []);
30028
30044
  const netAPY = await this.netAPY();
30029
30045
  const defispringAPY = (netAPY.splits.find((s) => s.id === "defispring")?.apy || 0) * 0.8;
30030
- if (!defispringAPY) throw new Error("DefiSpring APY not found");
30031
30046
  const timeDiff = Math.round(Date.now() / 1e3) - Number(lastReportTime);
30032
30047
  const growthRate = timeDiff * defispringAPY / (365 * 24 * 60 * 60);
30033
30048
  const rewardAssets = prevAum.multipliedBy(growthRate);
package/package.json CHANGED
@@ -1,80 +1,79 @@
1
1
  {
2
- "name": "@strkfarm/sdk",
3
- "version": "1.1.65",
4
- "description": "STRKFarm TS SDK (Meant for our internal use, but feel free to use it)",
5
- "typings": "dist/index.d.ts",
6
- "types": "dist/index.d.ts",
7
- "bin": {
8
- "accountsecure": "dist/cli.js"
9
- },
10
- "exports": {
11
-
12
- ".": {
13
- "import": {
14
- "browser": "./dist/index.browser.mjs",
15
- "default": "./dist/index.mjs"
16
- },
17
- "require": {
18
- "browser": "./dist/index.browser.global.js",
19
- "default": "./dist/index.js"
20
- },
21
- "browser": "./dist/index.browser.global.js",
22
- "types": "./dist/index.d.ts"
2
+ "name": "@strkfarm/sdk",
3
+ "version": "1.1.67",
4
+ "description": "STRKFarm TS SDK (Meant for our internal use, but feel free to use it)",
5
+ "typings": "dist/index.d.ts",
6
+ "types": "dist/index.d.ts",
7
+ "bin": {
8
+ "accountsecure": "dist/cli.js"
9
+ },
10
+ "exports": {
11
+ ".": {
12
+ "import": {
13
+ "browser": "./dist/index.browser.mjs",
14
+ "default": "./dist/index.mjs"
15
+ },
16
+ "require": {
17
+ "browser": "./dist/index.browser.global.js",
18
+ "default": "./dist/index.js"
19
+ },
20
+ "browser": "./dist/index.browser.global.js",
21
+ "types": "./dist/index.d.ts"
22
+ }
23
+ },
24
+ "files": [
25
+ "dist",
26
+ "src"
27
+ ],
28
+ "scripts": {
29
+ "test": "jest",
30
+ "build": "tsup --clean && pnpm run build:esm && npm run build:dts && npm run build:iife && npm run build-cli && pnpm run build:iife-esm",
31
+ "build:esm": "tsup --clean false --format esm --platform node",
32
+ "build-cli:esm": "tsup ./src/cli.ts --clean false --format esm --platform node",
33
+ "build-cli": "tsup ./src/cli.ts --clean false && pnpm run build-cli:esm",
34
+ "build:dts": "tsup --clean false --dts-only",
35
+ "build:iife": "tsup --clean false --format iife --platform browser",
36
+ "build:iife-esm": "tsup --clean false --format iife --format esm --platform browser"
37
+ },
38
+ "keywords": [],
39
+ "author": "",
40
+ "license": "ISC",
41
+ "devDependencies": {
42
+ "@types/jest": "^29.5.12",
43
+ "@types/node-telegram-bot-api": "^0.64.7",
44
+ "jest": "^29.7.0",
45
+ "jest-environment-jsdom": "^29.7.0",
46
+ "request": "^2.88.2",
47
+ "ts-jest": "^29.1.5",
48
+ "ts-node": "^10.9.2",
49
+ "tsup": "^8.1.0",
50
+ "typedoc": "^0.26.3",
51
+ "typescript": "^5.5.3"
52
+ },
53
+ "peerDependencies": {
54
+ "@types/react": "^19.1.2",
55
+ "axios": "^1.7.2",
56
+ "react": "19.1.2",
57
+ "starknet": "8.5.2"
58
+ },
59
+ "dependencies": {
60
+ "@apollo/client": "3.11.8",
61
+ "@avnu/avnu-sdk": "3.0.2",
62
+ "@ericnordelo/strk-merkle-tree": "^1.0.0",
63
+ "@noble/curves": "^1.0.0",
64
+ "@noble/hashes": "^2.0.0",
65
+ "@scure/starknet": "^2.0.0",
66
+ "bignumber.js": "4.0.4",
67
+ "browser-assert": "^1.2.1",
68
+ "chalk": "^4.1.2",
69
+ "commander": "^12.1.0",
70
+ "ethers": "^6.13.5",
71
+ "graphql": "16.9.0",
72
+ "inquirer": "^10.1.2",
73
+ "node-telegram-bot-api": "^0.66.0",
74
+ "proxy-from-env": "^1.1.0",
75
+ "redis": "^4.7.0",
76
+ "stacktrace-js": "^2.0.2",
77
+ "winston": "^3.13.0"
23
78
  }
24
- },
25
- "files": [
26
- "dist",
27
- "src"
28
- ],
29
- "scripts": {
30
- "test": "jest",
31
- "build": "tsup --clean && pnpm run build:esm && npm run build:dts && npm run build:iife && npm run build-cli && pnpm run build:iife-esm",
32
- "build:esm": "tsup --clean false --format esm --platform node",
33
- "build-cli:esm": "tsup ./src/cli.ts --clean false --format esm --platform node",
34
- "build-cli": "tsup ./src/cli.ts --clean false && pnpm run build-cli:esm",
35
- "build:dts": "tsup --clean false --dts-only",
36
- "build:iife": "tsup --clean false --format iife --platform browser",
37
- "build:iife-esm": "tsup --clean false --format iife --format esm --platform browser"
38
- },
39
- "keywords": [],
40
- "author": "",
41
- "license": "ISC",
42
- "devDependencies": {
43
- "@types/jest": "^29.5.12",
44
- "@types/node-telegram-bot-api": "^0.64.7",
45
- "jest": "^29.7.0",
46
- "jest-environment-jsdom": "^29.7.0",
47
- "request": "^2.88.2",
48
- "ts-jest": "^29.1.5",
49
- "ts-node": "^10.9.2",
50
- "tsup": "^8.1.0",
51
- "typedoc": "^0.26.3",
52
- "typescript": "^5.5.3"
53
- },
54
- "peerDependencies": {
55
- "@types/react": "^19.1.2",
56
- "axios": "^1.7.2",
57
- "react": "19.1.0",
58
- "starknet": "8.5.2"
59
- },
60
- "dependencies": {
61
- "@apollo/client": "3.11.8",
62
- "@avnu/avnu-sdk": "3.0.2",
63
- "@ericnordelo/strk-merkle-tree": "^1.0.0",
64
- "@noble/curves": "^1.0.0",
65
- "@noble/hashes": "^2.0.0",
66
- "@scure/starknet": "^2.0.0",
67
- "bignumber.js": "4.0.4",
68
- "browser-assert": "^1.2.1",
69
- "chalk": "^4.1.2",
70
- "commander": "^12.1.0",
71
- "ethers": "^6.13.5",
72
- "graphql": "16.9.0",
73
- "inquirer": "^10.1.2",
74
- "node-telegram-bot-api": "^0.66.0",
75
- "proxy-from-env": "^1.1.0",
76
- "redis": "^4.7.0",
77
- "stacktrace-js": "^2.0.2",
78
- "winston": "^3.13.0"
79
- }
80
79
  }
@@ -2479,6 +2479,10 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2479
2479
  _stableCoinPoolRiskFactors.reduce((acc, curr) => acc + curr.weight, 0),
2480
2480
  notARisks: getNoRiskTags(_stableCoinPoolRiskFactors),
2481
2481
  },
2482
+ additionalInfo: {
2483
+ ...ETHUSDCRe7Strategy.additionalInfo,
2484
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
2485
+ }
2482
2486
  },
2483
2487
  {
2484
2488
  ...ETHUSDCRe7Strategy,
@@ -2494,6 +2498,10 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2494
2498
  Global.getDefaultTokens().find((t) => t.symbol === "ETH")!,
2495
2499
  ],
2496
2500
  risk: highRisk,
2501
+ additionalInfo: {
2502
+ ...ETHUSDCRe7Strategy.additionalInfo,
2503
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
2504
+ }
2497
2505
  },
2498
2506
  {
2499
2507
  ...ETHUSDCRe7Strategy,
@@ -2509,6 +2517,10 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2509
2517
  Global.getDefaultTokens().find((t) => t.symbol === "STRK")!,
2510
2518
  ],
2511
2519
  risk: highRisk,
2520
+ additionalInfo: {
2521
+ ...ETHUSDCRe7Strategy.additionalInfo,
2522
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
2523
+ }
2512
2524
  },
2513
2525
  {
2514
2526
  ...ETHUSDCRe7Strategy,
@@ -2524,6 +2536,10 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
2524
2536
  Global.getDefaultTokens().find((t) => t.symbol === "WBTC")!,
2525
2537
  ],
2526
2538
  risk: mediumRisk,
2539
+ additionalInfo: {
2540
+ ...ETHUSDCRe7Strategy.additionalInfo,
2541
+ quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
2542
+ }
2527
2543
  }
2528
2544
  ];
2529
2545
 
@@ -427,7 +427,7 @@ export class UniversalStrategy<
427
427
  const netAPY = await this.netAPY();
428
428
  // account only 80% of value
429
429
  const defispringAPY = (netAPY.splits.find(s => s.id === 'defispring')?.apy || 0) * 0.8;
430
- if (!defispringAPY) throw new Error('DefiSpring APY not found');
430
+ // if (!defispringAPY) throw new Error('DefiSpring APY not found');
431
431
 
432
432
  // compute rewards contribution to AUM
433
433
  const timeDiff = (Math.round(Date.now() / 1000) - Number(lastReportTime));