@strkfarm/sdk 2.0.0-staging.30 → 2.0.0-staging.32
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/index.browser.global.js +11 -3
- package/dist/index.browser.mjs +11 -3
- package/dist/index.js +11 -3
- package/dist/index.mjs +11 -3
- package/package.json +1 -1
- package/src/strategies/factory.ts +1 -1
- package/src/strategies/registry.ts +11 -0
- package/src/strategies/sensei.ts +1 -1
- package/src/strategies/yoloVault.ts +1 -1
|
@@ -115458,7 +115458,7 @@ spurious results.`);
|
|
|
115458
115458
|
tokenInfo: this.metadata.depositTokens[0]
|
|
115459
115459
|
};
|
|
115460
115460
|
} catch (error2) {
|
|
115461
|
-
console.error(
|
|
115461
|
+
console.error(`[SDK] Error fetching TVL for ${this.metadata.id}:`, error2);
|
|
115462
115462
|
return {
|
|
115463
115463
|
usdValue: 0,
|
|
115464
115464
|
amount: new Web3Number("0", this.metadata.depositTokens[0].decimals),
|
|
@@ -116981,7 +116981,7 @@ Learn the core value averaging concept.`;
|
|
|
116981
116981
|
var usdc = Global.getDefaultTokens().find((t) => t.symbol === "USDC");
|
|
116982
116982
|
var wbtc = Global.getDefaultTokens().find((t) => t.symbol === "WBTC");
|
|
116983
116983
|
var btcYoloConfig = {
|
|
116984
|
-
id:
|
|
116984
|
+
id: `btc-yolo-31-dec-2026`,
|
|
116985
116985
|
address: ContractAddr.from("0x61913f1d885ce479231c63fd30810bba0b9b9b1be2ffd7088d3db31ff080344"),
|
|
116986
116986
|
startDate: "03-MAR-2026",
|
|
116987
116987
|
mainToken: usdc,
|
|
@@ -122290,6 +122290,14 @@ Learn the core value averaging concept.`;
|
|
|
122290
122290
|
});
|
|
122291
122291
|
});
|
|
122292
122292
|
}
|
|
122293
|
+
if (YoloVaultStrategies && Array.isArray(YoloVaultStrategies)) {
|
|
122294
|
+
YoloVaultStrategies.forEach((metadata) => {
|
|
122295
|
+
registry.push({
|
|
122296
|
+
metadata,
|
|
122297
|
+
type: "yolo-vault" /* YOLO_VAULT */
|
|
122298
|
+
});
|
|
122299
|
+
});
|
|
122300
|
+
}
|
|
122293
122301
|
return registry;
|
|
122294
122302
|
}
|
|
122295
122303
|
function getAllStrategyMetadata() {
|
|
@@ -122384,7 +122392,7 @@ Learn the core value averaging concept.`;
|
|
|
122384
122392
|
}
|
|
122385
122393
|
function getStrategyTypeFromMetadata(metadata) {
|
|
122386
122394
|
const info = metadata.additionalInfo;
|
|
122387
|
-
if (info && "mainToken" in info && "secondaryToken" in info && "
|
|
122395
|
+
if (info && "mainToken" in info && "secondaryToken" in info && "minEpochDurationSeconds" in info && "feeBps" in info) {
|
|
122388
122396
|
return "YOLO_VAULT" /* YOLO_VAULT */;
|
|
122389
122397
|
}
|
|
122390
122398
|
if (info && "borrowable_assets" in info && "underlyingToken" in info) {
|
package/dist/index.browser.mjs
CHANGED
|
@@ -28247,7 +28247,7 @@ var SenseiVault = class _SenseiVault extends BaseStrategy {
|
|
|
28247
28247
|
tokenInfo: this.metadata.depositTokens[0]
|
|
28248
28248
|
};
|
|
28249
28249
|
} catch (error) {
|
|
28250
|
-
console.error(
|
|
28250
|
+
console.error(`[SDK] Error fetching TVL for ${this.metadata.id}:`, error);
|
|
28251
28251
|
return {
|
|
28252
28252
|
usdValue: 0,
|
|
28253
28253
|
amount: new Web3Number("0", this.metadata.depositTokens[0].decimals),
|
|
@@ -29774,7 +29774,7 @@ var getWeightedRisk = (riskFactors) => {
|
|
|
29774
29774
|
var usdc = Global.getDefaultTokens().find((t) => t.symbol === "USDC");
|
|
29775
29775
|
var wbtc = Global.getDefaultTokens().find((t) => t.symbol === "WBTC");
|
|
29776
29776
|
var btcYoloConfig = {
|
|
29777
|
-
id:
|
|
29777
|
+
id: `btc-yolo-31-dec-2026`,
|
|
29778
29778
|
address: ContractAddr.from("0x61913f1d885ce479231c63fd30810bba0b9b9b1be2ffd7088d3db31ff080344"),
|
|
29779
29779
|
startDate: "03-MAR-2026",
|
|
29780
29780
|
mainToken: usdc,
|
|
@@ -35090,6 +35090,14 @@ function buildStrategyRegistry() {
|
|
|
35090
35090
|
});
|
|
35091
35091
|
});
|
|
35092
35092
|
}
|
|
35093
|
+
if (YoloVaultStrategies && Array.isArray(YoloVaultStrategies)) {
|
|
35094
|
+
YoloVaultStrategies.forEach((metadata) => {
|
|
35095
|
+
registry.push({
|
|
35096
|
+
metadata,
|
|
35097
|
+
type: "yolo-vault" /* YOLO_VAULT */
|
|
35098
|
+
});
|
|
35099
|
+
});
|
|
35100
|
+
}
|
|
35093
35101
|
return registry;
|
|
35094
35102
|
}
|
|
35095
35103
|
function getAllStrategyMetadata() {
|
|
@@ -35184,7 +35192,7 @@ function createSenseiStrategy(config, pricer, metadata) {
|
|
|
35184
35192
|
}
|
|
35185
35193
|
function getStrategyTypeFromMetadata(metadata) {
|
|
35186
35194
|
const info = metadata.additionalInfo;
|
|
35187
|
-
if (info && "mainToken" in info && "secondaryToken" in info && "
|
|
35195
|
+
if (info && "mainToken" in info && "secondaryToken" in info && "minEpochDurationSeconds" in info && "feeBps" in info) {
|
|
35188
35196
|
return "YOLO_VAULT" /* YOLO_VAULT */;
|
|
35189
35197
|
}
|
|
35190
35198
|
if (info && "borrowable_assets" in info && "underlyingToken" in info) {
|
package/dist/index.js
CHANGED
|
@@ -28386,7 +28386,7 @@ var SenseiVault = class _SenseiVault extends BaseStrategy {
|
|
|
28386
28386
|
tokenInfo: this.metadata.depositTokens[0]
|
|
28387
28387
|
};
|
|
28388
28388
|
} catch (error) {
|
|
28389
|
-
console.error(
|
|
28389
|
+
console.error(`[SDK] Error fetching TVL for ${this.metadata.id}:`, error);
|
|
28390
28390
|
return {
|
|
28391
28391
|
usdValue: 0,
|
|
28392
28392
|
amount: new Web3Number("0", this.metadata.depositTokens[0].decimals),
|
|
@@ -29913,7 +29913,7 @@ var getWeightedRisk = (riskFactors) => {
|
|
|
29913
29913
|
var usdc = Global.getDefaultTokens().find((t) => t.symbol === "USDC");
|
|
29914
29914
|
var wbtc = Global.getDefaultTokens().find((t) => t.symbol === "WBTC");
|
|
29915
29915
|
var btcYoloConfig = {
|
|
29916
|
-
id:
|
|
29916
|
+
id: `btc-yolo-31-dec-2026`,
|
|
29917
29917
|
address: ContractAddr.from("0x61913f1d885ce479231c63fd30810bba0b9b9b1be2ffd7088d3db31ff080344"),
|
|
29918
29918
|
startDate: "03-MAR-2026",
|
|
29919
29919
|
mainToken: usdc,
|
|
@@ -35229,6 +35229,14 @@ function buildStrategyRegistry() {
|
|
|
35229
35229
|
});
|
|
35230
35230
|
});
|
|
35231
35231
|
}
|
|
35232
|
+
if (YoloVaultStrategies && Array.isArray(YoloVaultStrategies)) {
|
|
35233
|
+
YoloVaultStrategies.forEach((metadata) => {
|
|
35234
|
+
registry.push({
|
|
35235
|
+
metadata,
|
|
35236
|
+
type: "yolo-vault" /* YOLO_VAULT */
|
|
35237
|
+
});
|
|
35238
|
+
});
|
|
35239
|
+
}
|
|
35232
35240
|
return registry;
|
|
35233
35241
|
}
|
|
35234
35242
|
function getAllStrategyMetadata() {
|
|
@@ -35323,7 +35331,7 @@ function createSenseiStrategy(config, pricer, metadata) {
|
|
|
35323
35331
|
}
|
|
35324
35332
|
function getStrategyTypeFromMetadata(metadata) {
|
|
35325
35333
|
const info = metadata.additionalInfo;
|
|
35326
|
-
if (info && "mainToken" in info && "secondaryToken" in info && "
|
|
35334
|
+
if (info && "mainToken" in info && "secondaryToken" in info && "minEpochDurationSeconds" in info && "feeBps" in info) {
|
|
35327
35335
|
return "YOLO_VAULT" /* YOLO_VAULT */;
|
|
35328
35336
|
}
|
|
35329
35337
|
if (info && "borrowable_assets" in info && "underlyingToken" in info) {
|
package/dist/index.mjs
CHANGED
|
@@ -28252,7 +28252,7 @@ var SenseiVault = class _SenseiVault extends BaseStrategy {
|
|
|
28252
28252
|
tokenInfo: this.metadata.depositTokens[0]
|
|
28253
28253
|
};
|
|
28254
28254
|
} catch (error) {
|
|
28255
|
-
console.error(
|
|
28255
|
+
console.error(`[SDK] Error fetching TVL for ${this.metadata.id}:`, error);
|
|
28256
28256
|
return {
|
|
28257
28257
|
usdValue: 0,
|
|
28258
28258
|
amount: new Web3Number("0", this.metadata.depositTokens[0].decimals),
|
|
@@ -29779,7 +29779,7 @@ var getWeightedRisk = (riskFactors) => {
|
|
|
29779
29779
|
var usdc = Global.getDefaultTokens().find((t) => t.symbol === "USDC");
|
|
29780
29780
|
var wbtc = Global.getDefaultTokens().find((t) => t.symbol === "WBTC");
|
|
29781
29781
|
var btcYoloConfig = {
|
|
29782
|
-
id:
|
|
29782
|
+
id: `btc-yolo-31-dec-2026`,
|
|
29783
29783
|
address: ContractAddr.from("0x61913f1d885ce479231c63fd30810bba0b9b9b1be2ffd7088d3db31ff080344"),
|
|
29784
29784
|
startDate: "03-MAR-2026",
|
|
29785
29785
|
mainToken: usdc,
|
|
@@ -35095,6 +35095,14 @@ function buildStrategyRegistry() {
|
|
|
35095
35095
|
});
|
|
35096
35096
|
});
|
|
35097
35097
|
}
|
|
35098
|
+
if (YoloVaultStrategies && Array.isArray(YoloVaultStrategies)) {
|
|
35099
|
+
YoloVaultStrategies.forEach((metadata) => {
|
|
35100
|
+
registry.push({
|
|
35101
|
+
metadata,
|
|
35102
|
+
type: "yolo-vault" /* YOLO_VAULT */
|
|
35103
|
+
});
|
|
35104
|
+
});
|
|
35105
|
+
}
|
|
35098
35106
|
return registry;
|
|
35099
35107
|
}
|
|
35100
35108
|
function getAllStrategyMetadata() {
|
|
@@ -35189,7 +35197,7 @@ function createSenseiStrategy(config, pricer, metadata) {
|
|
|
35189
35197
|
}
|
|
35190
35198
|
function getStrategyTypeFromMetadata(metadata) {
|
|
35191
35199
|
const info = metadata.additionalInfo;
|
|
35192
|
-
if (info && "mainToken" in info && "secondaryToken" in info && "
|
|
35200
|
+
if (info && "mainToken" in info && "secondaryToken" in info && "minEpochDurationSeconds" in info && "feeBps" in info) {
|
|
35193
35201
|
return "YOLO_VAULT" /* YOLO_VAULT */;
|
|
35194
35202
|
}
|
|
35195
35203
|
if (info && "borrowable_assets" in info && "underlyingToken" in info) {
|
package/package.json
CHANGED
|
@@ -78,7 +78,7 @@ export function getStrategyTypeFromMetadata(
|
|
|
78
78
|
): FactoryStrategyType {
|
|
79
79
|
const info = metadata.additionalInfo;
|
|
80
80
|
|
|
81
|
-
if (info && "mainToken" in info && "secondaryToken" in info && "
|
|
81
|
+
if (info && "mainToken" in info && "secondaryToken" in info && "minEpochDurationSeconds" in info && "feeBps" in info) {
|
|
82
82
|
return FactoryStrategyType.YOLO_VAULT;
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
import { UniversalStrategies } from "./universal-strategy";
|
|
11
11
|
import { VesuRebalanceStrategies } from "./vesu-rebalance";
|
|
12
12
|
import { SenseiStrategies } from "./sensei";
|
|
13
|
+
import { YoloVaultStrategies } from "./yoloVault";
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* Filter option definition
|
|
@@ -144,6 +145,16 @@ export function buildStrategyRegistry(): StrategyRegistryEntry[] {
|
|
|
144
145
|
});
|
|
145
146
|
}
|
|
146
147
|
|
|
148
|
+
// Register Yolo Vault strategies
|
|
149
|
+
if (YoloVaultStrategies && Array.isArray(YoloVaultStrategies)) {
|
|
150
|
+
YoloVaultStrategies.forEach((metadata) => {
|
|
151
|
+
registry.push({
|
|
152
|
+
metadata: metadata as any,
|
|
153
|
+
type: StrategyType.YOLO_VAULT,
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
147
158
|
return registry;
|
|
148
159
|
}
|
|
149
160
|
|
package/src/strategies/sensei.ts
CHANGED
|
@@ -94,7 +94,7 @@ export class SenseiVault extends BaseStrategy<
|
|
|
94
94
|
tokenInfo: this.metadata.depositTokens[0],
|
|
95
95
|
};
|
|
96
96
|
} catch (error) {
|
|
97
|
-
console.error(
|
|
97
|
+
console.error(`[SDK] Error fetching TVL for ${this.metadata.id}:`, error);
|
|
98
98
|
return {
|
|
99
99
|
usdValue: 0,
|
|
100
100
|
amount: new Web3Number('0', this.metadata.depositTokens[0].decimals),
|
|
@@ -543,7 +543,7 @@ const usdc = Global.getDefaultTokens().find((t) => t.symbol === "USDC")!;
|
|
|
543
543
|
const wbtc = Global.getDefaultTokens().find((t) => t.symbol === "WBTC")!;
|
|
544
544
|
|
|
545
545
|
const btcYoloConfig: YoloVaultStrategyConfig = {
|
|
546
|
-
id:
|
|
546
|
+
id: `btc-yolo-31-dec-2026`,
|
|
547
547
|
address: ContractAddr.from("0x61913f1d885ce479231c63fd30810bba0b9b9b1be2ffd7088d3db31ff080344"),
|
|
548
548
|
startDate: "03-MAR-2026",
|
|
549
549
|
mainToken: usdc,
|