npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@recursa-ai/sdk

v0.1.0

Published

TypeScript SDK for Recursa — Solana yield aggregator. Lists strategies, previews positions, and builds unsigned transactions for any wallet abstraction.

Downloads

144

Readme

@recursa-ai/sdk

Typed TypeScript SDK for Recursa — the Solana yield aggregator. Wrap the lending-strategy pipeline (JupLend + Kamino multi-market + Project0 + Exponent PT) in a framework-agnostic package any agent (Claude, LangGraph, Operator, your bot) can call.

Install

npm install @recursa-ai/sdk @solana/web3.js

Quickstart

import { createRecursaClient } from "@recursa-ai/sdk";

const recursa = createRecursaClient(); // hits the production deploy

// 1. Discover what's available — top 10 low-risk SOL strategies
const top10 = await recursa.listStrategies({
  assetCategory: "sol",
  maxRisk: "low",
  limit: 10,
});

// 2. Preview a hypothetical position — same numbers /loop shows
const preview = await recursa.previewOpenPosition({
  token: "SOL",
  leverage: 2.5,
  amount: 1.0,
});

if (preview.kind === "ok") {
  console.log(`Net APY ${preview.netAPY.toFixed(2)}%`);
  console.log(`Health Factor ${preview.healthFactor.toFixed(2)}`);
  console.log(`Liquidation at $${preview.liquidationPrice.toFixed(2)}`);
} else {
  console.log(`Preview unavailable: ${preview.message}`);
}

// 3. Build a transaction the user signs — coming in 0.2 (see below)
// const tx = recursa.buildOpenPositionTx({ preview, owner: walletPubkey });

Scope (v0.1)

Stable — agents can rely on these:

  • listStrategies(filter) — filters the full catalog by asset, risk, intent, protocol, search.
  • previewOpenPosition(inputs) — same HF + liquidation math the web /loop builder uses. Returns a typed PreviewResult (no exceptions on missing data — just kind: "unavailable" with a reason).
  • fetchRates() — raw rate snapshot from /api/rates.

🚧 Stub (returns a clear error directing users to /loop):

  • buildOpenPositionTx(args) — signer-agnostic tx construction. Lands with the @recursa-ai/idl extraction; until then, agents should surface the deep link https://recursa-solana.pages.dev/loop?token=<asset>&leverage=<n> for the user to complete the position via the web UI.

Design principles

  • Signer-agnostic. The SDK never asks for a private key. It returns base64 tx bytes for any wallet abstraction (Phantom, Solflare, Squads, hardware, agent-custodial) to sign + send.
  • Same math as the UI. previewOpenPosition uses the exact formulas the web /loop builder shows. Agents never quote numbers users wouldn't see.
  • No hidden state. Every method takes its inputs explicitly; every method either returns or throws — no side effects between calls.
  • Typed unavailable states. Network failures throw; missing rate data returns kind: "unavailable" with a typed reason. Agents handle the two paths separately.

Network targets

Default: mainnet-beta (production). Set network: "devnet" in the client config for staging.

const recursa = createRecursaClient({
  network: "devnet",
  rpcUrl: "https://api.devnet.solana.com",
});

Companion packages

  • @recursa-ai/mcp — Model Context Protocol server wrapping this SDK. Drop-in for Claude Desktop, Cursor, Claude Code, any MCP-compatible agent runtime.
  • /.well-known/agents.json — capability manifest at the deploy origin.
  • docs/SKILLS.md — Anthropic Skill format describing every agent-callable surface.

License

MIT