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

@hubra-labs/rasol-max

v0.5.9

Published

TypeScript SDK for raSOL max — a leveraged liquid-staking strategy on Solana mainnet. Read strategy metrics, build deposit + withdraw transactions.

Readme

@hubra-labs/rasol-max

TypeScript SDK for raSOL max — a leveraged liquid-staking strategy on Solana mainnet.

raSOL max takes liquid-staked SOL (raSOL) and levers it for amplified staking yield. Depositors receive a raSOL max LP token that tracks the strategy's net asset value; the position is maintained on-chain, so holders earn the leveraged return without managing it themselves.

This SDK is the read + transaction-building layer for depositors: read live strategy metrics (TVL, current leverage, net APY) and build the deposit and withdraw transactions.

Install

npm install @hubra-labs/rasol-max
# peer deps:
npm install @solana/kit @solana-program/token @voltr/vault-sdk

Quickstart

import { createSolanaRpc } from "@solana/kit";
import { RasolMaxClient } from "@hubra-labs/rasol-max";

const rpc = createSolanaRpc("https://api.mainnet-beta.solana.com");
const client = new RasolMaxClient({ rpc });

// 1. Read strategy state
const data = await client.getStrategyData();
console.log({
  tvlRasol: data.tvlRasol,
  leverageBps: data.leverageBps,
  borrowAprBps: data.borrowAprBps,
  strategyApyBps: data.strategyApyBps,
  paused: data.paused,
});

// 2. Crank (permissionless NAV refresh)
const crankIx = await client.buildCrankIx();
// sign + send via your tx transport

// 3. Deposit (raSOL → raSOLmax LP)
const depositIxs = await client.buildDeposit({
  owner: yourSigner,        // TransactionSigner from @solana/kit
  amount: 100_000_000n,     // 0.1 raSOL
});

// 4. Withdraw (raSOLmax LP → raSOL)
const { instructions } = await client.buildWithdraw({
  owner: yourSigner,
  lpAmount: 50_000_000n,
});

Status

| Surface | Status | Notes | |---|---|---| | getStrategyData() | ✅ | NAV, leverage, borrow APR, supply APR, simple APY. | | buildCrankIx() | ✅ | Permissionless. | | buildDeposit() | ✅ | Deposit ix(s), with an optional crank prefix. | | quoteWithdraw() | ✅ | Returns the routing decision without building the tx. | | buildWithdraw() | ✅ | Resolves the withdrawal route and returns the instruction set; some routes return the adapter ALT to compress with. |

Architecture

The adapter (Rust, Anchor) lives at Hubra-labs/rasol-max-adapter. This SDK wraps the on-chain surface in three pieces:

Withdraw routing

buildWithdraw() resolves a route internally and returns the instruction set to sign. The caller does not pick the route; pass owner and lpAmount and use the returned instructions (and lookupTable, when present).

ALT compression

Some routes return an address-lookup-table address in result.lookupTable. When present, compress your transaction message with it before signing:

import {
  compressTransactionMessageUsingAddressLookupTables,
  fetchAddressLookupTable,
} from "@solana/kit";

const { instructions, lookupTable } = await client.buildWithdraw({ owner, lpAmount });
if (lookupTable) {
  const alt = await fetchAddressLookupTable(rpc, lookupTable);
  const message = compressTransactionMessageUsingAddressLookupTables(
    baseMessage,
    { [lookupTable]: alt.data.addresses },
  );
}

Without ALT compression a routed withdrawal can exceed the 1232-byte transaction size limit. The SDK does not auto-extend the ALT.

NAV mirror

The off-chain computeNav() is a literal port of nav.rs::compute_nav_from_amounts:

NAV (raSOL) = strategy_collateral_ata.amount
            + strategy_ctoken_ata.amount × cToken→raSOL
            + obligation.deposited_amount × cToken→raSOL
            − obligation.borrowed_sol     × SOL→raSOL

vault_strategy_asset_ata is deliberately excluded (Voltr-side transit ATA; counting it double-counts in-flight withdraw payouts). Throws InsolventError when debt > assets (mirrors the on-chain H-C guard).

Versioning

| SDK | Adapter program | Notes | |---|---|---| | 0.3.x | LST3EutZgtbsLp3RqagSfjTB6kB8BwEQjexEkqBZiRr | v2 pilot |

Major version bumps on any adapter program-ID rotation. Minor bumps for new ixs / new SDK surface. Patch for read-path / typecode fixes.

License

Apache-2.0.