@1delta/margin-fetcher 0.0.283 → 0.0.284
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.js +50 -1
- package/dist/index.js.map +1 -1
- package/dist/vaults/savings/registry.d.ts.map +1 -1
- package/dist/yields/intrinsic/fetchers/hastra.d.ts +5 -0
- package/dist/yields/intrinsic/fetchers/hastra.d.ts.map +1 -0
- package/dist/yields/intrinsic/index.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -32887,6 +32887,32 @@ var coreLstFetcher = {
|
|
|
32887
32887
|
}
|
|
32888
32888
|
};
|
|
32889
32889
|
|
|
32890
|
+
// src/yields/intrinsic/fetchers/hastra.ts
|
|
32891
|
+
var HASTRA_POR_URL = "https://www.hastra.io/hastra-pulse/public/api/v1/por";
|
|
32892
|
+
var HASTRA_PRIME_KEY = "Hastra PRIME::PRIME";
|
|
32893
|
+
var hastraPrimeFetcher = {
|
|
32894
|
+
label: "Hastra",
|
|
32895
|
+
fetch: async () => {
|
|
32896
|
+
const res = await fetch(HASTRA_POR_URL, {
|
|
32897
|
+
method: "GET",
|
|
32898
|
+
headers: { Accept: "application/json" }
|
|
32899
|
+
}).then((r) => r.json());
|
|
32900
|
+
const card = res?.demo_prime_card ?? {};
|
|
32901
|
+
const current = Number(card.current_rate);
|
|
32902
|
+
const fee = Number(card.fee);
|
|
32903
|
+
const lifetimePct = Number(card.lifetime_average_rate) * 100;
|
|
32904
|
+
let apr;
|
|
32905
|
+
if (Number.isFinite(current)) {
|
|
32906
|
+
apr = current - (Number.isFinite(fee) ? fee : 0);
|
|
32907
|
+
} else if (Number.isFinite(lifetimePct)) {
|
|
32908
|
+
apr = lifetimePct;
|
|
32909
|
+
} else {
|
|
32910
|
+
apr = 0;
|
|
32911
|
+
}
|
|
32912
|
+
return { [HASTRA_PRIME_KEY]: Math.max(0, apr) };
|
|
32913
|
+
}
|
|
32914
|
+
};
|
|
32915
|
+
|
|
32890
32916
|
// src/yields/intrinsic/index.ts
|
|
32891
32917
|
async function fetchIntrinsicYields() {
|
|
32892
32918
|
const wstethPromise = safeFetch(wstethFetcher.label, wstethFetcher.fetch);
|
|
@@ -32955,7 +32981,8 @@ async function fetchIntrinsicYields() {
|
|
|
32955
32981
|
beraEthFetcher,
|
|
32956
32982
|
lbgtFetcher,
|
|
32957
32983
|
psxdcFetcher,
|
|
32958
|
-
coreLstFetcher
|
|
32984
|
+
coreLstFetcher,
|
|
32985
|
+
hastraPrimeFetcher
|
|
32959
32986
|
];
|
|
32960
32987
|
const results = await Promise.all([
|
|
32961
32988
|
wstethPromise,
|
|
@@ -44832,6 +44859,28 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
44832
44859
|
withdrawalCooldownSeconds: 604800,
|
|
44833
44860
|
yieldFetcher: mapleFetcher,
|
|
44834
44861
|
yieldKey: "SYRUPUSDT"
|
|
44862
|
+
},
|
|
44863
|
+
{
|
|
44864
|
+
// Hastra Democratized PRIME — ERC-4626 over wYLDS (itself ERC-4626 over
|
|
44865
|
+
// USDC), so the share/asset ratio accrues on-chain (`convertToAssets`).
|
|
44866
|
+
// Solana-primary; the Ethereum deployment exists (verified on-chain:
|
|
44867
|
+
// symbol PRIME, 6 decimals, asset() = wYLDS) but carries no user holders
|
|
44868
|
+
// yet. Deposits are whitelist-gated, so `isMintable` is false — we list
|
|
44869
|
+
// + price it, but don't advertise a permissionless mint that would
|
|
44870
|
+
// revert. Two-phase exit (`requestRedeem` → `completeRedeem`). APR from
|
|
44871
|
+
// the public Proof-of-Reserve feed via `hastraPrimeFetcher`.
|
|
44872
|
+
address: "0x19ebb35279a16207ec4ba82799cc64715065f7f6",
|
|
44873
|
+
underlying: "0x6ad038ca6c04e885630851278ca0a856ad9a66cc",
|
|
44874
|
+
// wYLDS
|
|
44875
|
+
symbol: "PRIME",
|
|
44876
|
+
brand: "Hastra",
|
|
44877
|
+
decimals: 6,
|
|
44878
|
+
underlyingDecimals: 6,
|
|
44879
|
+
isRebasing: false,
|
|
44880
|
+
isMintable: false,
|
|
44881
|
+
withdrawalMode: "request-based",
|
|
44882
|
+
yieldFetcher: hastraPrimeFetcher,
|
|
44883
|
+
yieldKey: "Hastra PRIME::PRIME"
|
|
44835
44884
|
}
|
|
44836
44885
|
],
|
|
44837
44886
|
"8453": [
|