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

@silo-finance/silo-sdk

v0.0.1

Published

Complete SDK for Silo Finance - aggregates all packages

Readme

@silo-finance/silo-sdk

Complete SDK for Silo Finance - a unified package that re-exports all Silo SDK packages.

Installation

pnpm add @silo-finance/silo-sdk viem
npm install @silo-finance/silo-sdk viem

Quick Start

import { createPublicClient, http } from "viem";
import { arbitrum } from "viem/chains";
import { SiloSdk, ViemAdapter, percentToDecimal } from "@silo-finance/silo-sdk";

// 1. Create viem client
const publicClient = createPublicClient({ chain: arbitrum, transport: http() });

// 2. Create adapter and SDK
const adapter = new ViemAdapter({ provider: publicClient });
const sdk = new SiloSdk({ chain: "arbitrum", adapter });

// 3. Use namespaced API
const siloAddress = "0x0696e6808ee11a5750733a3d821f9bb847e584fb";
const borrowApr = await sdk.markets.getBorrowAPR(siloAddress);
const borrowApy = sdk.calc.getApy({ apr: borrowApr, periods: 365n });

console.log(`Borrow APY: ${(percentToDecimal(borrowApy) * 100).toFixed(2)}%`);

What's Included

This package re-exports functionality from all Silo SDK packages:

| Package | Description | |---------|-------------| | @silo-finance/primitives | Branded types (Amount, Percent, USD), math utilities, formatters | | @silo-finance/address-book | Contract addresses and ABIs for all supported chains | | @silo-finance/core | Pure calculation library - APR, LTV, health factors | | @silo-finance/adapter-common | Abstract adapter interfaces | | @silo-finance/adapter-viem | Viem adapter for blockchain reads/writes | | @silo-finance/indexer | GraphQL client for indexed data |

Available Exports

From adapter-viem (Blockchain Access)

import {
  // SDK class (recommended)
  SiloSdk, ViemAdapter,
  // Write functions
  deposit, withdraw, borrow, repay, approve, approveMax,
  // Oracle utilities
  fetchQuote, fetchOracleQuotes, fetchQuoteToken,
  // Router utilities
  fetchRouterPaused,
  // Enums
  SiloCollateralType, RiskLevel,
} from "@silo-finance/silo-sdk";

// SiloSdk provides namespaced API:
// sdk.markets - getBorrowAPR(), getDepositAPR(), getUtilization(), getLiquidity(), etc.
// sdk.positions - get(), getLtv(), isSolvent(), getBalances(), getData()
// sdk.tokens - getBalance(), getBalances(), getAllowance(), getMetadata()
// sdk.actions - deposit(), withdraw(), borrow(), repay(), approve()
// sdk.calc - getApy(), calculateLtv(), getRiskLevel()

From sdk (Pure Calculations)

import {
  // APR/APY
  getApy, getCollateralBaseApr, calculateRewardsApr, calculateLeverageApr,
  // LTV analysis
  calculateLtv, getMaxBorrowWithBuffer, getMaxWithdrawWithBuffer, getRiskLevel,
} from "@silo-finance/silo-sdk";

From primitives (Types & Utilities)

import {
  // Type constructors
  makePercent, makeAmount, makeUSD, makeAddress,
  // Formatters
  formatPercent, formatAmount, formatUSD,
  // Constants
  PERCENT_FACTOR, PERCENT_ZERO, PERCENT_ONE,
  // Math utilities
  abs, min, max, clamp, mulDiv,
} from "@silo-finance/silo-sdk";

From address-book (Contracts)

import {
  // Contract addresses
  siloLensAddress, siloRouterV2Address, siloFactoryAddress,
  // Chain utilities
  chainKeys, chainIds, getChainKeyFromId,
  // ABIs
  siloAbi, siloLensAbi, erc20Abi,
} from "@silo-finance/silo-sdk";

From indexer (GraphQL)

import {
  SiloIndexerClient, createIndexerClient,
} from "@silo-finance/silo-sdk";

When to Use Individual Packages

While this unified SDK is recommended for most applications, you may want to import individual packages when:

  • Bundle size matters: Only import what you need
  • No blockchain access: Use @silo-finance/core + @silo-finance/primitives for pure calculations
  • Custom adapter: Build on @silo-finance/adapter-common for other blockchain libraries
  • Server-side only: Use @silo-finance/indexer for GraphQL-only access

Documentation

For detailed documentation of each module, see the individual package READMEs or visit our documentation site.

License

MIT