@strkfarm/sdk 1.0.60 → 1.0.62

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.
@@ -47686,7 +47686,8 @@ ${indent}}` : "}";
47686
47686
  const url = this.EKUBO_API.replace("{{TOKEN_ADDRESS}}", token.address.toString()).replace("{{AMOUNT}}", amountIn.toWei());
47687
47687
  const result = await axios_default.get(url);
47688
47688
  const data = result.data;
47689
- const outputUSDC = Number(Web3Number.fromWei(data.total_calculated, 6).toFixed(6));
47689
+ const multiplier = 1 / amountIn.toNumber();
47690
+ const outputUSDC = Number(Web3Number.fromWei(data.total_calculated, 6).toFixed(6)) * multiplier;
47690
47691
  logger.verbose(`Ekubo: ${token.symbol} -> USDC: ${outputUSDC}, retry: ${retry}`);
47691
47692
  if (outputUSDC === 0 && retry < 3) {
47692
47693
  const amountIn2 = new Web3Number(100, token.decimals);
@@ -49505,7 +49506,7 @@ ${indent}}` : "}";
49505
49506
  var import_hashes = __toESM(require_hashes());
49506
49507
  var import_merkletree = __toESM(require_merkletree());
49507
49508
 
49508
- // node_modules/@noble/hashes/utils.js
49509
+ // node_modules/.pnpm/@noble+hashes@2.0.0/node_modules/@noble/hashes/utils.js
49509
49510
  function isBytes9(a) {
49510
49511
  return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
49511
49512
  }
@@ -49642,7 +49643,7 @@ ${indent}}` : "}";
49642
49643
  oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, suffix])
49643
49644
  });
49644
49645
 
49645
- // node_modules/@noble/curves/utils.js
49646
+ // node_modules/.pnpm/@noble+curves@2.0.0/node_modules/@noble/curves/utils.js
49646
49647
  var _0n12 = /* @__PURE__ */ BigInt(0);
49647
49648
  var _1n12 = /* @__PURE__ */ BigInt(1);
49648
49649
  function abool(value, title = "") {
@@ -49788,7 +49789,7 @@ ${indent}}` : "}";
49788
49789
  };
49789
49790
  }
49790
49791
 
49791
- // node_modules/@noble/curves/abstract/modular.js
49792
+ // node_modules/.pnpm/@noble+curves@2.0.0/node_modules/@noble/curves/abstract/modular.js
49792
49793
  var _0n13 = /* @__PURE__ */ BigInt(0);
49793
49794
  var _1n13 = /* @__PURE__ */ BigInt(1);
49794
49795
  var _2n10 = /* @__PURE__ */ BigInt(2);
@@ -50166,7 +50167,7 @@ ${indent}}` : "}";
50166
50167
  return isLE4 ? numberToBytesLE3(reduced, fieldLen) : numberToBytesBE3(reduced, fieldLen);
50167
50168
  }
50168
50169
 
50169
- // node_modules/@noble/curves/abstract/poseidon.js
50170
+ // node_modules/.pnpm/@noble+curves@2.0.0/node_modules/@noble/curves/abstract/poseidon.js
50170
50171
  function assertValidPosOpts(opts) {
50171
50172
  const { Fp: Fp2, roundsFull } = opts;
50172
50173
  validateField3(Fp2);
@@ -50263,7 +50264,7 @@ ${indent}}` : "}";
50263
50264
  return poseidonHash2;
50264
50265
  }
50265
50266
 
50266
- // node_modules/@noble/hashes/hmac.js
50267
+ // node_modules/.pnpm/@noble+hashes@2.0.0/node_modules/@noble/hashes/hmac.js
50267
50268
  var _HMAC = class {
50268
50269
  constructor(hash4, key) {
50269
50270
  __publicField(this, "oHash");
@@ -50334,7 +50335,7 @@ ${indent}}` : "}";
50334
50335
  var hmac3 = (hash4, key, message) => new _HMAC(hash4, key).update(message).digest();
50335
50336
  hmac3.create = (hash4, key) => new _HMAC(hash4, key);
50336
50337
 
50337
- // node_modules/@noble/curves/abstract/curve.js
50338
+ // node_modules/.pnpm/@noble+curves@2.0.0/node_modules/@noble/curves/abstract/curve.js
50338
50339
  var _0n14 = /* @__PURE__ */ BigInt(0);
50339
50340
  var _1n14 = /* @__PURE__ */ BigInt(1);
50340
50341
  function negateCt(condition, item) {
@@ -50567,7 +50568,7 @@ ${indent}}` : "}";
50567
50568
  };
50568
50569
  }
50569
50570
 
50570
- // node_modules/@noble/curves/abstract/weierstrass.js
50571
+ // node_modules/.pnpm/@noble+curves@2.0.0/node_modules/@noble/curves/abstract/weierstrass.js
50571
50572
  var divNearest2 = (num4, den) => (num4 + (num4 >= 0 ? den : -den) / _2n11) / den;
50572
50573
  function _splitEndoScalar(k, basis, n) {
50573
50574
  const [[a1, b1], [a2, b2]] = basis;
@@ -51440,7 +51441,7 @@ ${indent}}` : "}";
51440
51441
  });
51441
51442
  }
51442
51443
 
51443
- // node_modules/@noble/hashes/_md.js
51444
+ // node_modules/.pnpm/@noble+hashes@2.0.0/node_modules/@noble/hashes/_md.js
51444
51445
  function Chi3(a, b, c) {
51445
51446
  return a & b ^ ~a & c;
51446
51447
  }
@@ -51553,7 +51554,7 @@ ${indent}}` : "}";
51553
51554
  1541459225
51554
51555
  ]);
51555
51556
 
51556
- // node_modules/@noble/hashes/sha2.js
51557
+ // node_modules/.pnpm/@noble+hashes@2.0.0/node_modules/@noble/hashes/sha2.js
51557
51558
  var SHA256_K3 = /* @__PURE__ */ Uint32Array.from([
51558
51559
  1116352408,
51559
51560
  1899447441,
@@ -51703,7 +51704,7 @@ ${indent}}` : "}";
51703
51704
  /* @__PURE__ */ oidNist(1)
51704
51705
  );
51705
51706
 
51706
- // node_modules/@scure/starknet/index.js
51707
+ // node_modules/.pnpm/@scure+starknet@2.0.0/node_modules/@scure/starknet/index.js
51707
51708
  var CURVE_ORDER2 = BigInt("3618502788666131213697322783095070105526743751716087489154079457884512865583");
51708
51709
  var MAX_VALUE2 = BigInt("0x800000000000000000000000000000000000000000000000000000000000000");
51709
51710
  var nBitLength2 = 252;
@@ -73860,19 +73861,20 @@ ${indent}}` : "}";
73860
73861
  targetHealthFactor: 1.3,
73861
73862
  minHealthFactor: 1.25
73862
73863
  };
73863
- function MetaVaultDescription() {
73864
+ function MetaVaultDescription(allowedSources) {
73864
73865
  const logos = {
73865
73866
  vesu: Protocols.VESU.logo,
73866
73867
  endur: Protocols.ENDUR.logo,
73867
73868
  extended: Protocols.EXTENDED.logo,
73868
73869
  ekubo: "https://dummyimage.com/64x64/ffffff/000000&text=K"
73869
73870
  };
73870
- const sources = [
73871
+ const _sources = [
73871
73872
  { key: "vesu", name: "Vesu", status: "Live", description: "Integrated liquidity venue used for automated routing to capture the best available yield." },
73872
73873
  { key: "endur", name: "Endur", status: "Coming soon", description: "Planned integration to tap into STRK staking\u2013backed yields via our LST pipeline." },
73873
73874
  { key: "extended", name: "Extended", status: "Coming soon", description: "Expanding coverage to additional money markets and vaults across the ecosystem." }
73874
73875
  // { key: "ekubo", name: "Ekubo", status: "Coming soon", description: "Concentrated liquidity strategies targeted for optimized fee APR harvesting." },
73875
73876
  ];
73877
+ const sources = _sources.filter((s) => allowedSources.includes(s.key));
73876
73878
  const containerStyle = {
73877
73879
  maxWidth: "800px",
73878
73880
  margin: "0 auto",
@@ -73927,8 +73929,8 @@ ${indent}}` : "}";
73927
73929
  };
73928
73930
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: badgeStyle, children: status });
73929
73931
  }
73930
- function getDescription(tokenSymbol) {
73931
- return MetaVaultDescription();
73932
+ function getDescription(tokenSymbol, allowedSources) {
73933
+ return MetaVaultDescription(allowedSources);
73932
73934
  }
73933
73935
  function getFAQs() {
73934
73936
  return [
@@ -73945,7 +73947,7 @@ ${indent}}` : "}";
73945
73947
  answer: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { children: [
73946
73948
  "Currently, ",
73947
73949
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("strong", { children: "Vesu" }),
73948
- " is live. Future integrations include",
73950
+ " is live. Future integrations may include",
73949
73951
  " ",
73950
73952
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("strong", { children: "Endur" }),
73951
73953
  ", ",
@@ -73996,7 +73998,7 @@ ${indent}}` : "}";
73996
73998
  var UniversalStrategies = [
73997
73999
  {
73998
74000
  name: "USDC Evergreen",
73999
- description: getDescription("USDC"),
74001
+ description: getDescription("USDC", ["vesu", "extended"]),
74000
74002
  address: ContractAddr.from("0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e"),
74001
74003
  launchBlock: 0,
74002
74004
  type: "ERC4626",
@@ -74015,7 +74017,7 @@ ${indent}}` : "}";
74015
74017
  },
74016
74018
  {
74017
74019
  name: "WBTC Evergreen",
74018
- description: getDescription("WBTC"),
74020
+ description: getDescription("WBTC", ["vesu", "endur", "extended"]),
74019
74021
  address: ContractAddr.from("0x5a4c1651b913aa2ea7afd9024911603152a19058624c3e425405370d62bf80c"),
74020
74022
  launchBlock: 0,
74021
74023
  type: "ERC4626",
@@ -74034,7 +74036,7 @@ ${indent}}` : "}";
74034
74036
  },
74035
74037
  {
74036
74038
  name: "ETH Evergreen",
74037
- description: getDescription("ETH"),
74039
+ description: getDescription("ETH", ["vesu", "extended"]),
74038
74040
  address: ContractAddr.from("0x446c22d4d3f5cb52b4950ba832ba1df99464c6673a37c092b1d9622650dbd8"),
74039
74041
  launchBlock: 0,
74040
74042
  type: "ERC4626",
@@ -74053,7 +74055,7 @@ ${indent}}` : "}";
74053
74055
  },
74054
74056
  {
74055
74057
  name: "STRK Evergreen",
74056
- description: getDescription("STRK"),
74058
+ description: getDescription("STRK", ["vesu", "endur", "extended"]),
74057
74059
  address: ContractAddr.from("0x55d012f57e58c96e0a5c7ebbe55853989d01e6538b15a95e7178aca4af05c21"),
74058
74060
  launchBlock: 0,
74059
74061
  type: "ERC4626",
@@ -74072,7 +74074,7 @@ ${indent}}` : "}";
74072
74074
  },
74073
74075
  {
74074
74076
  name: "USDT Evergreen",
74075
- description: getDescription("USDT"),
74077
+ description: getDescription("USDT", ["vesu"]),
74076
74078
  address: ContractAddr.from("0x1c4933d1880c6778585e597154eaca7b428579d72f3aae425ad2e4d26c6bb3"),
74077
74079
  launchBlock: 0,
74078
74080
  type: "ERC4626",
@@ -423,7 +423,8 @@ var Pricer = class extends PricerBase {
423
423
  const url = this.EKUBO_API.replace("{{TOKEN_ADDRESS}}", token.address.toString()).replace("{{AMOUNT}}", amountIn.toWei());
424
424
  const result = await axios2.get(url);
425
425
  const data = result.data;
426
- const outputUSDC = Number(Web3Number.fromWei(data.total_calculated, 6).toFixed(6));
426
+ const multiplier = 1 / amountIn.toNumber();
427
+ const outputUSDC = Number(Web3Number.fromWei(data.total_calculated, 6).toFixed(6)) * multiplier;
427
428
  logger.verbose(`Ekubo: ${token.symbol} -> USDC: ${outputUSDC}, retry: ${retry}`);
428
429
  if (outputUSDC === 0 && retry < 3) {
429
430
  const amountIn2 = new Web3Number(100, token.decimals);
@@ -23935,19 +23936,20 @@ var usdtVaultSettings = {
23935
23936
  targetHealthFactor: 1.3,
23936
23937
  minHealthFactor: 1.25
23937
23938
  };
23938
- function MetaVaultDescription() {
23939
+ function MetaVaultDescription(allowedSources) {
23939
23940
  const logos = {
23940
23941
  vesu: Protocols.VESU.logo,
23941
23942
  endur: Protocols.ENDUR.logo,
23942
23943
  extended: Protocols.EXTENDED.logo,
23943
23944
  ekubo: "https://dummyimage.com/64x64/ffffff/000000&text=K"
23944
23945
  };
23945
- const sources = [
23946
+ const _sources = [
23946
23947
  { key: "vesu", name: "Vesu", status: "Live", description: "Integrated liquidity venue used for automated routing to capture the best available yield." },
23947
23948
  { key: "endur", name: "Endur", status: "Coming soon", description: "Planned integration to tap into STRK staking\u2013backed yields via our LST pipeline." },
23948
23949
  { key: "extended", name: "Extended", status: "Coming soon", description: "Expanding coverage to additional money markets and vaults across the ecosystem." }
23949
23950
  // { key: "ekubo", name: "Ekubo", status: "Coming soon", description: "Concentrated liquidity strategies targeted for optimized fee APR harvesting." },
23950
23951
  ];
23952
+ const sources = _sources.filter((s) => allowedSources.includes(s.key));
23951
23953
  const containerStyle = {
23952
23954
  maxWidth: "800px",
23953
23955
  margin: "0 auto",
@@ -24002,8 +24004,8 @@ function StatusBadge({ status }) {
24002
24004
  };
24003
24005
  return /* @__PURE__ */ jsx4("span", { style: badgeStyle, children: status });
24004
24006
  }
24005
- function getDescription(tokenSymbol) {
24006
- return MetaVaultDescription();
24007
+ function getDescription(tokenSymbol, allowedSources) {
24008
+ return MetaVaultDescription(allowedSources);
24007
24009
  }
24008
24010
  function getFAQs() {
24009
24011
  return [
@@ -24020,7 +24022,7 @@ function getFAQs() {
24020
24022
  answer: /* @__PURE__ */ jsxs3("span", { children: [
24021
24023
  "Currently, ",
24022
24024
  /* @__PURE__ */ jsx4("strong", { children: "Vesu" }),
24023
- " is live. Future integrations include",
24025
+ " is live. Future integrations may include",
24024
24026
  " ",
24025
24027
  /* @__PURE__ */ jsx4("strong", { children: "Endur" }),
24026
24028
  ", ",
@@ -24071,7 +24073,7 @@ var investmentSteps = [
24071
24073
  var UniversalStrategies = [
24072
24074
  {
24073
24075
  name: "USDC Evergreen",
24074
- description: getDescription("USDC"),
24076
+ description: getDescription("USDC", ["vesu", "extended"]),
24075
24077
  address: ContractAddr.from("0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e"),
24076
24078
  launchBlock: 0,
24077
24079
  type: "ERC4626",
@@ -24090,7 +24092,7 @@ var UniversalStrategies = [
24090
24092
  },
24091
24093
  {
24092
24094
  name: "WBTC Evergreen",
24093
- description: getDescription("WBTC"),
24095
+ description: getDescription("WBTC", ["vesu", "endur", "extended"]),
24094
24096
  address: ContractAddr.from("0x5a4c1651b913aa2ea7afd9024911603152a19058624c3e425405370d62bf80c"),
24095
24097
  launchBlock: 0,
24096
24098
  type: "ERC4626",
@@ -24109,7 +24111,7 @@ var UniversalStrategies = [
24109
24111
  },
24110
24112
  {
24111
24113
  name: "ETH Evergreen",
24112
- description: getDescription("ETH"),
24114
+ description: getDescription("ETH", ["vesu", "extended"]),
24113
24115
  address: ContractAddr.from("0x446c22d4d3f5cb52b4950ba832ba1df99464c6673a37c092b1d9622650dbd8"),
24114
24116
  launchBlock: 0,
24115
24117
  type: "ERC4626",
@@ -24128,7 +24130,7 @@ var UniversalStrategies = [
24128
24130
  },
24129
24131
  {
24130
24132
  name: "STRK Evergreen",
24131
- description: getDescription("STRK"),
24133
+ description: getDescription("STRK", ["vesu", "endur", "extended"]),
24132
24134
  address: ContractAddr.from("0x55d012f57e58c96e0a5c7ebbe55853989d01e6538b15a95e7178aca4af05c21"),
24133
24135
  launchBlock: 0,
24134
24136
  type: "ERC4626",
@@ -24147,7 +24149,7 @@ var UniversalStrategies = [
24147
24149
  },
24148
24150
  {
24149
24151
  name: "USDT Evergreen",
24150
- description: getDescription("USDT"),
24152
+ description: getDescription("USDT", ["vesu"]),
24151
24153
  address: ContractAddr.from("0x1c4933d1880c6778585e597154eaca7b428579d72f3aae425ad2e4d26c6bb3"),
24152
24154
  launchBlock: 0,
24153
24155
  type: "ERC4626",
package/dist/index.js CHANGED
@@ -551,7 +551,8 @@ var Pricer = class extends PricerBase {
551
551
  const url = this.EKUBO_API.replace("{{TOKEN_ADDRESS}}", token.address.toString()).replace("{{AMOUNT}}", amountIn.toWei());
552
552
  const result = await import_axios2.default.get(url);
553
553
  const data = result.data;
554
- const outputUSDC = Number(Web3Number.fromWei(data.total_calculated, 6).toFixed(6));
554
+ const multiplier = 1 / amountIn.toNumber();
555
+ const outputUSDC = Number(Web3Number.fromWei(data.total_calculated, 6).toFixed(6)) * multiplier;
555
556
  logger.verbose(`Ekubo: ${token.symbol} -> USDC: ${outputUSDC}, retry: ${retry}`);
556
557
  if (outputUSDC === 0 && retry < 3) {
557
558
  const amountIn2 = new Web3Number(100, token.decimals);
@@ -24067,19 +24068,20 @@ var usdtVaultSettings = {
24067
24068
  targetHealthFactor: 1.3,
24068
24069
  minHealthFactor: 1.25
24069
24070
  };
24070
- function MetaVaultDescription() {
24071
+ function MetaVaultDescription(allowedSources) {
24071
24072
  const logos = {
24072
24073
  vesu: Protocols.VESU.logo,
24073
24074
  endur: Protocols.ENDUR.logo,
24074
24075
  extended: Protocols.EXTENDED.logo,
24075
24076
  ekubo: "https://dummyimage.com/64x64/ffffff/000000&text=K"
24076
24077
  };
24077
- const sources = [
24078
+ const _sources = [
24078
24079
  { key: "vesu", name: "Vesu", status: "Live", description: "Integrated liquidity venue used for automated routing to capture the best available yield." },
24079
24080
  { key: "endur", name: "Endur", status: "Coming soon", description: "Planned integration to tap into STRK staking\u2013backed yields via our LST pipeline." },
24080
24081
  { key: "extended", name: "Extended", status: "Coming soon", description: "Expanding coverage to additional money markets and vaults across the ecosystem." }
24081
24082
  // { key: "ekubo", name: "Ekubo", status: "Coming soon", description: "Concentrated liquidity strategies targeted for optimized fee APR harvesting." },
24082
24083
  ];
24084
+ const sources = _sources.filter((s) => allowedSources.includes(s.key));
24083
24085
  const containerStyle = {
24084
24086
  maxWidth: "800px",
24085
24087
  margin: "0 auto",
@@ -24134,8 +24136,8 @@ function StatusBadge({ status }) {
24134
24136
  };
24135
24137
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: badgeStyle, children: status });
24136
24138
  }
24137
- function getDescription(tokenSymbol) {
24138
- return MetaVaultDescription();
24139
+ function getDescription(tokenSymbol, allowedSources) {
24140
+ return MetaVaultDescription(allowedSources);
24139
24141
  }
24140
24142
  function getFAQs() {
24141
24143
  return [
@@ -24152,7 +24154,7 @@ function getFAQs() {
24152
24154
  answer: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { children: [
24153
24155
  "Currently, ",
24154
24156
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("strong", { children: "Vesu" }),
24155
- " is live. Future integrations include",
24157
+ " is live. Future integrations may include",
24156
24158
  " ",
24157
24159
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("strong", { children: "Endur" }),
24158
24160
  ", ",
@@ -24203,7 +24205,7 @@ var investmentSteps = [
24203
24205
  var UniversalStrategies = [
24204
24206
  {
24205
24207
  name: "USDC Evergreen",
24206
- description: getDescription("USDC"),
24208
+ description: getDescription("USDC", ["vesu", "extended"]),
24207
24209
  address: ContractAddr.from("0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e"),
24208
24210
  launchBlock: 0,
24209
24211
  type: "ERC4626",
@@ -24222,7 +24224,7 @@ var UniversalStrategies = [
24222
24224
  },
24223
24225
  {
24224
24226
  name: "WBTC Evergreen",
24225
- description: getDescription("WBTC"),
24227
+ description: getDescription("WBTC", ["vesu", "endur", "extended"]),
24226
24228
  address: ContractAddr.from("0x5a4c1651b913aa2ea7afd9024911603152a19058624c3e425405370d62bf80c"),
24227
24229
  launchBlock: 0,
24228
24230
  type: "ERC4626",
@@ -24241,7 +24243,7 @@ var UniversalStrategies = [
24241
24243
  },
24242
24244
  {
24243
24245
  name: "ETH Evergreen",
24244
- description: getDescription("ETH"),
24246
+ description: getDescription("ETH", ["vesu", "extended"]),
24245
24247
  address: ContractAddr.from("0x446c22d4d3f5cb52b4950ba832ba1df99464c6673a37c092b1d9622650dbd8"),
24246
24248
  launchBlock: 0,
24247
24249
  type: "ERC4626",
@@ -24260,7 +24262,7 @@ var UniversalStrategies = [
24260
24262
  },
24261
24263
  {
24262
24264
  name: "STRK Evergreen",
24263
- description: getDescription("STRK"),
24265
+ description: getDescription("STRK", ["vesu", "endur", "extended"]),
24264
24266
  address: ContractAddr.from("0x55d012f57e58c96e0a5c7ebbe55853989d01e6538b15a95e7178aca4af05c21"),
24265
24267
  launchBlock: 0,
24266
24268
  type: "ERC4626",
@@ -24279,7 +24281,7 @@ var UniversalStrategies = [
24279
24281
  },
24280
24282
  {
24281
24283
  name: "USDT Evergreen",
24282
- description: getDescription("USDT"),
24284
+ description: getDescription("USDT", ["vesu"]),
24283
24285
  address: ContractAddr.from("0x1c4933d1880c6778585e597154eaca7b428579d72f3aae425ad2e4d26c6bb3"),
24284
24286
  launchBlock: 0,
24285
24287
  type: "ERC4626",
package/dist/index.mjs CHANGED
@@ -464,7 +464,8 @@ var Pricer = class extends PricerBase {
464
464
  const url = this.EKUBO_API.replace("{{TOKEN_ADDRESS}}", token.address.toString()).replace("{{AMOUNT}}", amountIn.toWei());
465
465
  const result = await axios2.get(url);
466
466
  const data = result.data;
467
- const outputUSDC = Number(Web3Number.fromWei(data.total_calculated, 6).toFixed(6));
467
+ const multiplier = 1 / amountIn.toNumber();
468
+ const outputUSDC = Number(Web3Number.fromWei(data.total_calculated, 6).toFixed(6)) * multiplier;
468
469
  logger.verbose(`Ekubo: ${token.symbol} -> USDC: ${outputUSDC}, retry: ${retry}`);
469
470
  if (outputUSDC === 0 && retry < 3) {
470
471
  const amountIn2 = new Web3Number(100, token.decimals);
@@ -23984,19 +23985,20 @@ var usdtVaultSettings = {
23984
23985
  targetHealthFactor: 1.3,
23985
23986
  minHealthFactor: 1.25
23986
23987
  };
23987
- function MetaVaultDescription() {
23988
+ function MetaVaultDescription(allowedSources) {
23988
23989
  const logos = {
23989
23990
  vesu: Protocols.VESU.logo,
23990
23991
  endur: Protocols.ENDUR.logo,
23991
23992
  extended: Protocols.EXTENDED.logo,
23992
23993
  ekubo: "https://dummyimage.com/64x64/ffffff/000000&text=K"
23993
23994
  };
23994
- const sources = [
23995
+ const _sources = [
23995
23996
  { key: "vesu", name: "Vesu", status: "Live", description: "Integrated liquidity venue used for automated routing to capture the best available yield." },
23996
23997
  { key: "endur", name: "Endur", status: "Coming soon", description: "Planned integration to tap into STRK staking\u2013backed yields via our LST pipeline." },
23997
23998
  { key: "extended", name: "Extended", status: "Coming soon", description: "Expanding coverage to additional money markets and vaults across the ecosystem." }
23998
23999
  // { key: "ekubo", name: "Ekubo", status: "Coming soon", description: "Concentrated liquidity strategies targeted for optimized fee APR harvesting." },
23999
24000
  ];
24001
+ const sources = _sources.filter((s) => allowedSources.includes(s.key));
24000
24002
  const containerStyle = {
24001
24003
  maxWidth: "800px",
24002
24004
  margin: "0 auto",
@@ -24051,8 +24053,8 @@ function StatusBadge({ status }) {
24051
24053
  };
24052
24054
  return /* @__PURE__ */ jsx4("span", { style: badgeStyle, children: status });
24053
24055
  }
24054
- function getDescription(tokenSymbol) {
24055
- return MetaVaultDescription();
24056
+ function getDescription(tokenSymbol, allowedSources) {
24057
+ return MetaVaultDescription(allowedSources);
24056
24058
  }
24057
24059
  function getFAQs() {
24058
24060
  return [
@@ -24069,7 +24071,7 @@ function getFAQs() {
24069
24071
  answer: /* @__PURE__ */ jsxs3("span", { children: [
24070
24072
  "Currently, ",
24071
24073
  /* @__PURE__ */ jsx4("strong", { children: "Vesu" }),
24072
- " is live. Future integrations include",
24074
+ " is live. Future integrations may include",
24073
24075
  " ",
24074
24076
  /* @__PURE__ */ jsx4("strong", { children: "Endur" }),
24075
24077
  ", ",
@@ -24120,7 +24122,7 @@ var investmentSteps = [
24120
24122
  var UniversalStrategies = [
24121
24123
  {
24122
24124
  name: "USDC Evergreen",
24123
- description: getDescription("USDC"),
24125
+ description: getDescription("USDC", ["vesu", "extended"]),
24124
24126
  address: ContractAddr.from("0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e"),
24125
24127
  launchBlock: 0,
24126
24128
  type: "ERC4626",
@@ -24139,7 +24141,7 @@ var UniversalStrategies = [
24139
24141
  },
24140
24142
  {
24141
24143
  name: "WBTC Evergreen",
24142
- description: getDescription("WBTC"),
24144
+ description: getDescription("WBTC", ["vesu", "endur", "extended"]),
24143
24145
  address: ContractAddr.from("0x5a4c1651b913aa2ea7afd9024911603152a19058624c3e425405370d62bf80c"),
24144
24146
  launchBlock: 0,
24145
24147
  type: "ERC4626",
@@ -24158,7 +24160,7 @@ var UniversalStrategies = [
24158
24160
  },
24159
24161
  {
24160
24162
  name: "ETH Evergreen",
24161
- description: getDescription("ETH"),
24163
+ description: getDescription("ETH", ["vesu", "extended"]),
24162
24164
  address: ContractAddr.from("0x446c22d4d3f5cb52b4950ba832ba1df99464c6673a37c092b1d9622650dbd8"),
24163
24165
  launchBlock: 0,
24164
24166
  type: "ERC4626",
@@ -24177,7 +24179,7 @@ var UniversalStrategies = [
24177
24179
  },
24178
24180
  {
24179
24181
  name: "STRK Evergreen",
24180
- description: getDescription("STRK"),
24182
+ description: getDescription("STRK", ["vesu", "endur", "extended"]),
24181
24183
  address: ContractAddr.from("0x55d012f57e58c96e0a5c7ebbe55853989d01e6538b15a95e7178aca4af05c21"),
24182
24184
  launchBlock: 0,
24183
24185
  type: "ERC4626",
@@ -24196,7 +24198,7 @@ var UniversalStrategies = [
24196
24198
  },
24197
24199
  {
24198
24200
  name: "USDT Evergreen",
24199
- description: getDescription("USDT"),
24201
+ description: getDescription("USDT", ["vesu"]),
24200
24202
  address: ContractAddr.from("0x1c4933d1880c6778585e597154eaca7b428579d72f3aae425ad2e4d26c6bb3"),
24201
24203
  launchBlock: 0,
24202
24204
  type: "ERC4626",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strkfarm/sdk",
3
- "version": "1.0.60",
3
+ "version": "1.0.62",
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",
@@ -59,6 +59,7 @@
59
59
  "dependencies": {
60
60
  "@avnu/avnu-sdk": "3.0.2",
61
61
  "@ericnordelo/strk-merkle-tree": "^1.0.0",
62
+ "@noble/curves": "^2.0.0",
62
63
  "@scure/starknet": "^2.0.0",
63
64
  "bignumber.js": "4.0.4",
64
65
  "browser-assert": "^1.2.1",
@@ -187,7 +187,8 @@ export class Pricer extends PricerBase {
187
187
  const url = this.EKUBO_API.replace("{{TOKEN_ADDRESS}}", token.address.toString()).replace("{{AMOUNT}}", amountIn.toWei());
188
188
  const result = await axios.get(url);
189
189
  const data: any = result.data;
190
- const outputUSDC = Number(Web3Number.fromWei(data.total_calculated, 6).toFixed(6));
190
+ const multiplier = 1 / amountIn.toNumber();
191
+ const outputUSDC = Number(Web3Number.fromWei(data.total_calculated, 6).toFixed(6)) * multiplier;
191
192
  logger.verbose(`Ekubo: ${token.symbol} -> USDC: ${outputUSDC}, retry: ${retry}`);
192
193
  if (outputUSDC === 0 && retry < 3) {
193
194
  // try again with a higher amount
@@ -776,19 +776,21 @@ const usdtVaultSettings: UniversalStrategySettings = {
776
776
  minHealthFactor: 1.25
777
777
  }
778
778
 
779
- export default function MetaVaultDescription() {
779
+ type AllowedSources = 'vesu' | 'endur' | 'extended';
780
+ export default function MetaVaultDescription(allowedSources: AllowedSources[]) {
780
781
  const logos: any = {
781
782
  vesu: Protocols.VESU.logo,
782
783
  endur: Protocols.ENDUR.logo,
783
784
  extended: Protocols.EXTENDED.logo,
784
785
  ekubo: "https://dummyimage.com/64x64/ffffff/000000&text=K",
785
786
  };
786
- const sources = [
787
+ const _sources = [
787
788
  { key: "vesu", name: "Vesu", status: "Live", description: "Integrated liquidity venue used for automated routing to capture the best available yield." },
788
789
  { key: "endur", name: "Endur", status: "Coming soon", description: "Planned integration to tap into STRK staking–backed yields via our LST pipeline." },
789
790
  { key: "extended", name: "Extended", status: "Coming soon", description: "Expanding coverage to additional money markets and vaults across the ecosystem." },
790
791
  // { key: "ekubo", name: "Ekubo", status: "Coming soon", description: "Concentrated liquidity strategies targeted for optimized fee APR harvesting." },
791
792
  ];
793
+ const sources = _sources.filter(s => allowedSources.includes(s.key as any));
792
794
 
793
795
  const containerStyle = {
794
796
  maxWidth: "800px",
@@ -865,8 +867,8 @@ function StatusBadge({ status }: { status: string }) {
865
867
  return <span style={badgeStyle}>{status}</span>;
866
868
  }
867
869
 
868
- function getDescription(tokenSymbol: string) {
869
- return MetaVaultDescription();
870
+ function getDescription(tokenSymbol: string, allowedSources: AllowedSources[]) {
871
+ return MetaVaultDescription(allowedSources);
870
872
  }
871
873
 
872
874
  function getFAQs(): FAQ[] {
@@ -885,7 +887,7 @@ function getFAQs(): FAQ[] {
885
887
  question: "Which yield sources are supported?",
886
888
  answer: (
887
889
  <span>
888
- Currently, <strong>Vesu</strong> is live. Future integrations include{" "}
890
+ Currently, <strong>Vesu</strong> is live. Future integrations may include{" "}
889
891
  <strong>Endur</strong>, <strong>Extended</strong>, and{" "}
890
892
  <strong>Ekubo</strong> (all coming soon).
891
893
  </span>
@@ -939,7 +941,7 @@ export const UniversalStrategies: IStrategyMetadata<UniversalStrategySettings>[]
939
941
  [
940
942
  {
941
943
  name: "USDC Evergreen",
942
- description: getDescription('USDC'),
944
+ description: getDescription('USDC', ['vesu', 'extended']),
943
945
  address: ContractAddr.from('0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e'),
944
946
  launchBlock: 0,
945
947
  type: 'ERC4626',
@@ -960,7 +962,7 @@ export const UniversalStrategies: IStrategyMetadata<UniversalStrategySettings>[]
960
962
  },
961
963
  {
962
964
  name: "WBTC Evergreen",
963
- description: getDescription('WBTC'),
965
+ description: getDescription('WBTC', ['vesu', 'endur', 'extended']),
964
966
  address: ContractAddr.from('0x5a4c1651b913aa2ea7afd9024911603152a19058624c3e425405370d62bf80c'),
965
967
  launchBlock: 0,
966
968
  type: 'ERC4626',
@@ -981,7 +983,7 @@ export const UniversalStrategies: IStrategyMetadata<UniversalStrategySettings>[]
981
983
  },
982
984
  {
983
985
  name: "ETH Evergreen",
984
- description: getDescription('ETH'),
986
+ description: getDescription('ETH', ['vesu', 'extended']),
985
987
  address: ContractAddr.from('0x446c22d4d3f5cb52b4950ba832ba1df99464c6673a37c092b1d9622650dbd8'),
986
988
  launchBlock: 0,
987
989
  type: 'ERC4626',
@@ -1002,7 +1004,7 @@ export const UniversalStrategies: IStrategyMetadata<UniversalStrategySettings>[]
1002
1004
  },
1003
1005
  {
1004
1006
  name: "STRK Evergreen",
1005
- description: getDescription('STRK'),
1007
+ description: getDescription('STRK', ['vesu', 'endur', 'extended']),
1006
1008
  address: ContractAddr.from('0x55d012f57e58c96e0a5c7ebbe55853989d01e6538b15a95e7178aca4af05c21'),
1007
1009
  launchBlock: 0,
1008
1010
  type: 'ERC4626',
@@ -1023,7 +1025,7 @@ export const UniversalStrategies: IStrategyMetadata<UniversalStrategySettings>[]
1023
1025
  },
1024
1026
  {
1025
1027
  name: "USDT Evergreen",
1026
- description: getDescription('USDT'),
1028
+ description: getDescription('USDT', ['vesu']),
1027
1029
  address: ContractAddr.from('0x1c4933d1880c6778585e597154eaca7b428579d72f3aae425ad2e4d26c6bb3'),
1028
1030
  launchBlock: 0,
1029
1031
  type: 'ERC4626',