@1delta/margin-fetcher-sol

中文文档
0.0.30发布于 2026/10/30MITTypeScriptESM + CJS近 30 天下载 3922

Lending data provision for the Solana families (Kamino, Jupiter Lend, Save, Loopscale, Project 0) and the Solana earn rows, in margin-fetcher's shapes. Zero runtime dependency on viem: margin-fetcher is imported type-only.

原始使用文档

@1delta/margin-fetcher-sol

Moved from lending-sdks-sol/packages/lending on 2026-10-02. Paths are relative to this package; the prototype's @1delta/sol-* names map to @1delta/margin-fetcher-sol, margin-fetcher-sol, svm-kit.

Lending data provision for Solana venues in the margin-fetcher shape — public market rows, user positions, oracle prices, term sheets. Kamino is the first family, Jupiter Lend the second, Save (ex-Solend) the third, Loopscale (a fixed-rate credit order book — Morpho Midnight's product on Solana) the fourth. See KAMINO_LENDING_PLAN.md for the route-by-route mapping and the declared gaps, JUPITER_LEND.md, SAVE_FINANCE.md and LOOPSCALE_PLAN.md for the other three.

import {
  fetchExponentPtMarkets,
  fetchJupiterLendEarnVaults,
  fetchSolsticeVaults,
  fetchSolsticeUser,
  fetchKaminoPublic,
  fetchKaminoUser,
  fetchKaminoOraclePrices,
  fetchSavePublic,
  fetchSaveUser,
  fetchLoopscalePublic,
  fetchLoopscaleUser,
  fetchLoopscaleEarnVaults,
} from '@1delta/margin-fetcher-sol'

const markets = await fetchKaminoPublic() // { 'KAMINO_<market>': { data, eModes, chainId } }
const user = await fetchKaminoUser('<base58 wallet>') // LenderUserResponse[] (one per served market)
const prices = await fetchKaminoOraclePrices(tokenList) // { byMint, byAssetGroup, asOf }

// Save: one key per team-run pool, rates RECOMPUTED from reserve state; positions
// DERIVED on-chain (obligation #0..#2 per pool, one pooled read, live valuation).
const save = await fetchSavePublic() // { 'SAVE_<market>': { data, params: { saveMarket } } }
const savePos = await fetchSaveUser('<base58 wallet>') // { lendingPositions, ext: { obligations, probed } }

// Loopscale: one key per (principal, collateral) PAIR — an isolated x-margin
// basket of two legs — with the fixed-rate tenor menu (1d/1w/1m/3m ladders)
// on params.loopscaleMarket.terms[]; ~180 paced quotes (2/s, the route's
// per-IP limit) + one Mint read per collateral the list does not name.
const ls = await fetchLoopscalePublic({ tokenList }) // { 'LOOPSCALE_<principal>_<collateral>': { data, params: { loopscaleMarket } } }
const lsPos = await fetchLoopscaleUser('<base58 wallet>', { decimals }) // every Loan account: ledgers, slots, health to maturity
const lsVaults = await fetchLoopscaleEarnVaults({ tokenList }) // the curated vaults as earn rows

// Earn rows: Jupiter Lend jl tokens (the Fluid `FluidFToken` shape) and
// Exponent PTs (the Pendle `PendlePtMarket` shape — EXPONENT.md).
const jl = await fetchJupiterLendEarnVaults({ tokenList })
const pts = await fetchExponentPtMarkets({ tokenList }) // live vaults only; quote assets priced through Jupiter

// Solstice: eUSX + the strcUSX tranches as 4626-shaped rows read from the
// chain (SOLSTICE.md) — the vested exchange rate, the exit each one has,
// the oracle the strategy gates on; and a wallet's holdings + pending exits.
const sol = await fetchSolsticeVaults({ tokenList }) // { [shareMint]: SolsticeVault }
const mine = await fetchSolsticeUser('<base58 wallet>', { vaults: sol })
  • pnpm test — unit tests on a captured fixture, no network
  • pnpm test:live — shape pins against api.kamino.finance

版本与发布记录

@1delta/margin-fetcher-sol 共发布 28 个版本,首次发布于 2026/09/30;过去 12 个月发布了 28 个版本。

版本发布日期距今
0.0.30latest2026/10/308 天前
0.0.292026/10/308 天前
0.0.282026/10/299 天前
0.0.272026/10/2711 天前
0.0.262026/10/2711 天前
0.0.252026/10/2315 天前

关于 @1delta/margin-fetcher-sol 的常见问题

@1delta/margin-fetcher-sol 是什么?

Lending data provision for the Solana families (Kamino, Jupiter Lend, Save, Loopscale, Project 0) and the Solana earn rows, in margin-fetcher's shapes. Zero runtime dependency on viem: margin-fetcher is imported type-only.

如何安装 @1delta/margin-fetcher-sol?

在项目目录运行 npm install @1delta/margin-fetcher-sol,或使用 pnpm add / yarn add / bun add。

@1delta/margin-fetcher-sol 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@1delta/margin-fetcher-sol 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@1delta/margin-fetcher-sol 可以商用吗?

@1delta/margin-fetcher-sol 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@1delta/margin-fetcher-sol 的下载量有多少?

根据 npm 官方下载统计,@1delta/margin-fetcher-sol 在 2026/10/05 – 2026/11/03 这 30 天内被下载 3,922 次,日均约 131 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@1delta/margin-fetcher-sol 还在维护吗?

最新版本 0.0.30 发布于 2026/10/30(8 天前);至今共发布 28 个版本,其中过去 12 个月发布了 28 个;首次发布于 2026/09/30。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。