@strkfarm/sdk 1.0.31 → 1.0.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/cli.js +11 -4
- package/dist/cli.mjs +11 -4
- package/dist/index.browser.global.js +16492 -7659
- package/dist/index.browser.mjs +12 -5
- package/dist/index.d.ts +2 -1
- package/dist/index.js +12 -5
- package/dist/index.mjs +12 -5
- package/package.json +5 -1
- package/src/interfaces/common.ts +2 -1
- package/src/strategies/{ekubo-cl-vault.ts → ekubo-cl-vault.tsx} +7 -1
- package/src/strategies/{vesu-rebalance.ts → vesu-rebalance.tsx} +1 -1
package/dist/index.browser.mjs
CHANGED
|
@@ -2089,7 +2089,7 @@ var AutoCompounderSTRK = class {
|
|
|
2089
2089
|
}
|
|
2090
2090
|
};
|
|
2091
2091
|
|
|
2092
|
-
// src/strategies/vesu-rebalance.
|
|
2092
|
+
// src/strategies/vesu-rebalance.tsx
|
|
2093
2093
|
import { CairoCustomEnum, Contract as Contract5, num as num3, uint256 as uint2563 } from "starknet";
|
|
2094
2094
|
|
|
2095
2095
|
// src/data/vesu-rebalance.abi.json
|
|
@@ -12697,7 +12697,7 @@ var vesu_pools_default = {
|
|
|
12697
12697
|
]
|
|
12698
12698
|
};
|
|
12699
12699
|
|
|
12700
|
-
// src/strategies/vesu-rebalance.
|
|
12700
|
+
// src/strategies/vesu-rebalance.tsx
|
|
12701
12701
|
var VesuRebalance = class _VesuRebalance extends BaseStrategy {
|
|
12702
12702
|
// 10000 bps = 100%
|
|
12703
12703
|
/**
|
|
@@ -13198,7 +13198,7 @@ var VesuRebalanceStrategies = [{
|
|
|
13198
13198
|
// },
|
|
13199
13199
|
}];
|
|
13200
13200
|
|
|
13201
|
-
// src/strategies/ekubo-cl-vault.
|
|
13201
|
+
// src/strategies/ekubo-cl-vault.tsx
|
|
13202
13202
|
import { Contract as Contract6, num as num4, uint256 as uint2564 } from "starknet";
|
|
13203
13203
|
|
|
13204
13204
|
// src/data/cl-vault.abi.json
|
|
@@ -18100,7 +18100,8 @@ var erc4626_abi_default = [
|
|
|
18100
18100
|
}
|
|
18101
18101
|
];
|
|
18102
18102
|
|
|
18103
|
-
// src/strategies/ekubo-cl-vault.
|
|
18103
|
+
// src/strategies/ekubo-cl-vault.tsx
|
|
18104
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18104
18105
|
var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
18105
18106
|
/**
|
|
18106
18107
|
* Creates a new VesuRebalance strategy instance.
|
|
@@ -18814,7 +18815,13 @@ var _riskFactor2 = [
|
|
|
18814
18815
|
var AUDIT_URL2 = "https://assets.strkfarm.com/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
|
|
18815
18816
|
var EkuboCLVaultStrategies = [{
|
|
18816
18817
|
name: "Ekubo xSTRK/STRK",
|
|
18817
|
-
description:
|
|
18818
|
+
description: /* @__PURE__ */ jsxs("div", { children: [
|
|
18819
|
+
/* @__PURE__ */ jsx("p", { children: _description2.replace("{{POOL_NAME}}", "xSTRK/STRK") }),
|
|
18820
|
+
/* @__PURE__ */ jsxs("ul", { style: { marginLeft: "20px", listStyle: "circle", fontSize: "12px" }, children: [
|
|
18821
|
+
/* @__PURE__ */ jsx("li", { style: { marginTop: "10px" }, children: "During withdrawal, you may receive either or both tokens depending on market conditions and prevailing prices." }),
|
|
18822
|
+
/* @__PURE__ */ jsx("li", { style: { marginTop: "10px" }, children: "Sometimes you might see a negative APY \u2014 this is usually not a big deal. It happens when xSTRK's price drops on DEXes, but things typically bounce back within a few days or a week." })
|
|
18823
|
+
] })
|
|
18824
|
+
] }),
|
|
18818
18825
|
address: ContractAddr.from("0x01f083b98674bc21effee29ef443a00c7b9a500fd92cf30341a3da12c73f2324"),
|
|
18819
18826
|
type: "Other",
|
|
18820
18827
|
// must be same order as poolKey token0 and token1
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import BigNumber from 'bignumber.js';
|
|
2
2
|
import * as starknet from 'starknet';
|
|
3
3
|
import { RpcProvider, BlockIdentifier, Contract, Uint256, Call, Account } from 'starknet';
|
|
4
|
+
import React from 'react';
|
|
4
5
|
import { Quote } from '@avnu/avnu-sdk';
|
|
5
6
|
import * as util from 'util';
|
|
6
7
|
import TelegramBot from 'node-telegram-bot-api';
|
|
@@ -90,7 +91,7 @@ declare enum FlowChartColors {
|
|
|
90
91
|
*/
|
|
91
92
|
interface IStrategyMetadata<T> {
|
|
92
93
|
name: string;
|
|
93
|
-
description: string;
|
|
94
|
+
description: string | React.ReactNode;
|
|
94
95
|
address: ContractAddr;
|
|
95
96
|
type: 'ERC4626' | 'ERC721' | 'Other';
|
|
96
97
|
depositTokens: TokenInfo[];
|
package/dist/index.js
CHANGED
|
@@ -2178,7 +2178,7 @@ var AutoCompounderSTRK = class {
|
|
|
2178
2178
|
}
|
|
2179
2179
|
};
|
|
2180
2180
|
|
|
2181
|
-
// src/strategies/vesu-rebalance.
|
|
2181
|
+
// src/strategies/vesu-rebalance.tsx
|
|
2182
2182
|
var import_starknet8 = require("starknet");
|
|
2183
2183
|
|
|
2184
2184
|
// src/data/vesu-rebalance.abi.json
|
|
@@ -12786,7 +12786,7 @@ var vesu_pools_default = {
|
|
|
12786
12786
|
]
|
|
12787
12787
|
};
|
|
12788
12788
|
|
|
12789
|
-
// src/strategies/vesu-rebalance.
|
|
12789
|
+
// src/strategies/vesu-rebalance.tsx
|
|
12790
12790
|
var VesuRebalance = class _VesuRebalance extends BaseStrategy {
|
|
12791
12791
|
// 10000 bps = 100%
|
|
12792
12792
|
/**
|
|
@@ -13287,7 +13287,7 @@ var VesuRebalanceStrategies = [{
|
|
|
13287
13287
|
// },
|
|
13288
13288
|
}];
|
|
13289
13289
|
|
|
13290
|
-
// src/strategies/ekubo-cl-vault.
|
|
13290
|
+
// src/strategies/ekubo-cl-vault.tsx
|
|
13291
13291
|
var import_starknet9 = require("starknet");
|
|
13292
13292
|
|
|
13293
13293
|
// src/data/cl-vault.abi.json
|
|
@@ -18189,7 +18189,8 @@ var erc4626_abi_default = [
|
|
|
18189
18189
|
}
|
|
18190
18190
|
];
|
|
18191
18191
|
|
|
18192
|
-
// src/strategies/ekubo-cl-vault.
|
|
18192
|
+
// src/strategies/ekubo-cl-vault.tsx
|
|
18193
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
18193
18194
|
var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
18194
18195
|
/**
|
|
18195
18196
|
* Creates a new VesuRebalance strategy instance.
|
|
@@ -18903,7 +18904,13 @@ var _riskFactor2 = [
|
|
|
18903
18904
|
var AUDIT_URL2 = "https://assets.strkfarm.com/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
|
|
18904
18905
|
var EkuboCLVaultStrategies = [{
|
|
18905
18906
|
name: "Ekubo xSTRK/STRK",
|
|
18906
|
-
description:
|
|
18907
|
+
description: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
18908
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: _description2.replace("{{POOL_NAME}}", "xSTRK/STRK") }),
|
|
18909
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("ul", { style: { marginLeft: "20px", listStyle: "circle", fontSize: "12px" }, children: [
|
|
18910
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { style: { marginTop: "10px" }, children: "During withdrawal, you may receive either or both tokens depending on market conditions and prevailing prices." }),
|
|
18911
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { style: { marginTop: "10px" }, children: "Sometimes you might see a negative APY \u2014 this is usually not a big deal. It happens when xSTRK's price drops on DEXes, but things typically bounce back within a few days or a week." })
|
|
18912
|
+
] })
|
|
18913
|
+
] }),
|
|
18907
18914
|
address: ContractAddr.from("0x01f083b98674bc21effee29ef443a00c7b9a500fd92cf30341a3da12c73f2324"),
|
|
18908
18915
|
type: "Other",
|
|
18909
18916
|
// must be same order as poolKey token0 and token1
|
package/dist/index.mjs
CHANGED
|
@@ -2109,7 +2109,7 @@ var AutoCompounderSTRK = class {
|
|
|
2109
2109
|
}
|
|
2110
2110
|
};
|
|
2111
2111
|
|
|
2112
|
-
// src/strategies/vesu-rebalance.
|
|
2112
|
+
// src/strategies/vesu-rebalance.tsx
|
|
2113
2113
|
import { CairoCustomEnum, Contract as Contract5, num as num3, uint256 as uint2563 } from "starknet";
|
|
2114
2114
|
|
|
2115
2115
|
// src/data/vesu-rebalance.abi.json
|
|
@@ -12717,7 +12717,7 @@ var vesu_pools_default = {
|
|
|
12717
12717
|
]
|
|
12718
12718
|
};
|
|
12719
12719
|
|
|
12720
|
-
// src/strategies/vesu-rebalance.
|
|
12720
|
+
// src/strategies/vesu-rebalance.tsx
|
|
12721
12721
|
var VesuRebalance = class _VesuRebalance extends BaseStrategy {
|
|
12722
12722
|
// 10000 bps = 100%
|
|
12723
12723
|
/**
|
|
@@ -13218,7 +13218,7 @@ var VesuRebalanceStrategies = [{
|
|
|
13218
13218
|
// },
|
|
13219
13219
|
}];
|
|
13220
13220
|
|
|
13221
|
-
// src/strategies/ekubo-cl-vault.
|
|
13221
|
+
// src/strategies/ekubo-cl-vault.tsx
|
|
13222
13222
|
import { Contract as Contract6, num as num4, uint256 as uint2564 } from "starknet";
|
|
13223
13223
|
|
|
13224
13224
|
// src/data/cl-vault.abi.json
|
|
@@ -18120,7 +18120,8 @@ var erc4626_abi_default = [
|
|
|
18120
18120
|
}
|
|
18121
18121
|
];
|
|
18122
18122
|
|
|
18123
|
-
// src/strategies/ekubo-cl-vault.
|
|
18123
|
+
// src/strategies/ekubo-cl-vault.tsx
|
|
18124
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18124
18125
|
var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
18125
18126
|
/**
|
|
18126
18127
|
* Creates a new VesuRebalance strategy instance.
|
|
@@ -18834,7 +18835,13 @@ var _riskFactor2 = [
|
|
|
18834
18835
|
var AUDIT_URL2 = "https://assets.strkfarm.com/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
|
|
18835
18836
|
var EkuboCLVaultStrategies = [{
|
|
18836
18837
|
name: "Ekubo xSTRK/STRK",
|
|
18837
|
-
description:
|
|
18838
|
+
description: /* @__PURE__ */ jsxs("div", { children: [
|
|
18839
|
+
/* @__PURE__ */ jsx("p", { children: _description2.replace("{{POOL_NAME}}", "xSTRK/STRK") }),
|
|
18840
|
+
/* @__PURE__ */ jsxs("ul", { style: { marginLeft: "20px", listStyle: "circle", fontSize: "12px" }, children: [
|
|
18841
|
+
/* @__PURE__ */ jsx("li", { style: { marginTop: "10px" }, children: "During withdrawal, you may receive either or both tokens depending on market conditions and prevailing prices." }),
|
|
18842
|
+
/* @__PURE__ */ jsx("li", { style: { marginTop: "10px" }, children: "Sometimes you might see a negative APY \u2014 this is usually not a big deal. It happens when xSTRK's price drops on DEXes, but things typically bounce back within a few days or a week." })
|
|
18843
|
+
] })
|
|
18844
|
+
] }),
|
|
18838
18845
|
address: ContractAddr.from("0x01f083b98674bc21effee29ef443a00c7b9a500fd92cf30341a3da12c73f2324"),
|
|
18839
18846
|
type: "Other",
|
|
18840
18847
|
// must be same order as poolKey token0 and token1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strkfarm/sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
4
4
|
"description": "STRKFarm TS SDK (Meant for our internal use, but feel free to use it)",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/jest": "^29.5.12",
|
|
43
43
|
"@types/node-telegram-bot-api": "^0.64.7",
|
|
44
|
+
"@types/react": "^19.1.2",
|
|
44
45
|
"jest": "^29.7.0",
|
|
45
46
|
"jest-environment-jsdom": "^29.7.0",
|
|
46
47
|
"ts-jest": "^29.1.5",
|
|
@@ -49,6 +50,9 @@
|
|
|
49
50
|
"typedoc": "^0.26.3",
|
|
50
51
|
"typescript": "^5.5.3"
|
|
51
52
|
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"react": "19.1.0"
|
|
55
|
+
},
|
|
52
56
|
"dependencies": {
|
|
53
57
|
"@avnu/avnu-sdk": "^3.0.2",
|
|
54
58
|
"axios": "^1.7.2",
|
package/src/interfaces/common.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ContractAddr, Web3Number } from "@/dataTypes"
|
|
2
2
|
import { BlockIdentifier, RpcProvider } from "starknet"
|
|
3
|
+
import React from 'react';
|
|
3
4
|
|
|
4
5
|
export enum RiskType {
|
|
5
6
|
MARKET_RISK = 'Market Risk',
|
|
@@ -62,7 +63,7 @@ export enum FlowChartColors {
|
|
|
62
63
|
*/
|
|
63
64
|
export interface IStrategyMetadata<T> {
|
|
64
65
|
name: string,
|
|
65
|
-
description: string,
|
|
66
|
+
description: string | React.ReactNode,
|
|
66
67
|
address: ContractAddr,
|
|
67
68
|
type: 'ERC4626' | 'ERC721' | 'Other',
|
|
68
69
|
depositTokens: TokenInfo[],
|
|
@@ -933,7 +933,13 @@ const AUDIT_URL = 'https://assets.strkfarm.com/strkfarm/audit_report_vesu_and_ek
|
|
|
933
933
|
*/
|
|
934
934
|
export const EkuboCLVaultStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [{
|
|
935
935
|
name: 'Ekubo xSTRK/STRK',
|
|
936
|
-
description:
|
|
936
|
+
description: <div>
|
|
937
|
+
<p>{_description.replace('{{POOL_NAME}}', 'xSTRK/STRK')}</p>
|
|
938
|
+
<ul style={{marginLeft: '20px', listStyle: 'circle', fontSize: '12px'}}>
|
|
939
|
+
<li style={{marginTop: '10px'}}>During withdrawal, you may receive either or both tokens depending on market conditions and prevailing prices.</li>
|
|
940
|
+
<li style={{marginTop: '10px'}}>Sometimes you might see a negative APY — this is usually not a big deal. It happens when xSTRK's price drops on DEXes, but things typically bounce back within a few days or a week.</li>
|
|
941
|
+
</ul>
|
|
942
|
+
</div>,
|
|
937
943
|
address: ContractAddr.from('0x01f083b98674bc21effee29ef443a00c7b9a500fd92cf30341a3da12c73f2324'),
|
|
938
944
|
type: 'Other',
|
|
939
945
|
// must be same order as poolKey token0 and token1
|
|
@@ -567,7 +567,7 @@ export class VesuRebalance extends BaseStrategy<SingleTokenInfo, SingleActionAmo
|
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
|
|
570
|
-
const _description =
|
|
570
|
+
const _description = "Automatically diversify {{TOKEN}} holdings into different Vesu pools while reducing risk and maximizing yield. Defi spring STRK Rewards are auto-compounded as well."
|
|
571
571
|
const _protocol: IProtocol = {name: 'Vesu', logo: 'https://static-assets-8zct.onrender.com/integrations/vesu/logo.png'}
|
|
572
572
|
// need to fine tune better
|
|
573
573
|
const _riskFactor: RiskFactor[] = [
|