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

@amplifi-liquidity/amplifi-utils-sdk

v1.0.3

Published

Shared utilities for Amplifi Liquidity services

Readme

@amplifi-liquidity/amplifi-utils-sdk

Shared utilities for Amplifi Liquidity services.

Installation

npm install @amplifi-liquidity/amplifi-utils-sdk

Peer dependencies

  • @ichidao/ichi-vaults-sdk (>=0.1.0)
  • @ethersproject/providers (^5.0.0) — optional, needed for getProvider
  • ethers (^6.0.0) — optional, needed for getProviderV6

You only need the ethers version you use. Both can coexist.

Usage

getProvider (ethers v5)

Returns a cached StaticJsonRpcProvider for a given chain.

import { SupportedChainId } from '@ichidao/ichi-vaults-sdk';
import { getProvider } from '@amplifi-liquidity/amplifi-utils-sdk';

const provider = await getProvider(SupportedChainId.polygon);
const blockNumber = await provider.getBlockNumber();

getProviderV6 (ethers v6)

Returns a cached JsonRpcProvider for a given chain.

import { SupportedChainId } from '@ichidao/ichi-vaults-sdk';
import { getProviderV6 } from '@amplifi-liquidity/amplifi-utils-sdk';

const provider = await getProviderV6(SupportedChainId.polygon);
const blockNumber = await provider.getBlockNumber();

RPC resolution order

  1. Environment variable — reads <CHAIN_NAME>_RPC_HOSTS (comma-separated). If a host fails, the next one is tried.
  2. Default RPC URL — falls back to a built-in public RPC endpoint.

Providers are cached for 30 seconds by default. The v5 and v6 functions use separate caches.

Environment variables

Each chain maps to an env var derived from its SupportedChainId enum key:

MAINNET_RPC_HOSTS=https://rpc1.example.com,https://rpc2.example.com
POLYGON_RPC_HOSTS=https://my-polygon-rpc.example.com
ARBITRUM_RPC_HOSTS=https://my-arb-rpc.example.com

Configuration

import { setRpcCacheUpdateInterval } from '@amplifi-liquidity/amplifi-utils-sdk';

// Change cache TTL to 60 seconds
setRpcCacheUpdateInterval(60_000);

Default RPC URLs

The full map of default RPC URLs is exported as DEFAULT_RPC_URLS for inspection:

import { DEFAULT_RPC_URLS } from '@amplifi-liquidity/amplifi-utils-sdk';

Development

npm install
npm run build
npm test