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

@rakeshsteer/internal-sdk

v0.12.9

Published

A TypeScript SDK for interacting with Algebra Integral protocol - a next-generation AMM protocol

Readme

Algebra Integral SDK

A TypeScript SDK for interacting with Algebra Integral protocol - a next-generation AMM protocol.

Installation

npm install @rakeshsteer/internal-sdk

or

yarn add @rakeshsteer/internal-sdk

Features

  • Type Safety: Full TypeScript support with comprehensive type definitions
  • Multi-chain Support: Works across multiple blockchain networks
  • Comprehensive Utilities: Pool calculations, price conversions, and more
  • Modern Architecture: Built with modern JavaScript/TypeScript practices

Quick Start

import { ChainId, Token, CurrencyAmount } from '@rakeshsteer/internal-sdk';

// Create a token
const token = new Token(
  ChainId.Mantle,
  '0x...',
  18,
  'SYMBOL',
  'Token Name'
);

// Work with currency amounts
const amount = CurrencyAmount.fromRawAmount(token, '1000000000000000000');

Supported Chains

The SDK supports the following blockchain networks:

  • Mainnets: ZKSync, Mantle, Telos, Mode, Arthera, Linea
  • Testnets: Goerli, ZKSync Testnet, BSC Testnet, Mantle Testnet, Telos Testnet, Mode Testnet, Blast Testnet, Arthera Testnet, Linea Sepolia, Mantle Sepolia, Base Sepolia, Holesky
  • Development Networks: Berachain Testnet, Form Testnet, Katla, Sei Devnet, Neon Devnet

Core Entities

ChainId

import { ChainId } from '@rakeshsteer/internal-sdk';

console.log(ChainId.Mantle); // 5000
console.log(ChainId.ZKSync); // 324

Token

import { Token, ChainId } from '@rakeshsteer/internal-sdk';

const USDC = new Token(
  ChainId.Mantle,
  '0x09Bc4E0D864854c6aFB6eB9A9cdF58aC190D0dF9',
  6,
  'USDC',
  'USD Coin'
);

Currency Amount

import { CurrencyAmount, Token } from '@rakeshsteer/internal-sdk';

const amount = CurrencyAmount.fromRawAmount(token, '1000000');
const humanReadable = amount.toExact(); // "1.0" for 6 decimal token

Pool

import { Pool, Token } from '@rakeshsteer/internal-sdk';

const pool = new Pool(
  tokenA,
  tokenB,
  fee,
  sqrtRatioX96,
  liquidity,
  tickCurrent
);

Utilities

The SDK provides numerous utility functions for:

  • Price Calculations: Converting between different price representations
  • Tick Math: Working with concentrated liquidity positions
  • Pool Math: Calculating swap amounts, liquidity, etc.
  • Encoding: Creating calldata for contract interactions

API Reference

Constants

  • ChainId: Enum of supported chain IDs
  • POOL_DEPLOYER_ADDRESSES: Pool deployer contract addresses per chain
  • POOL_INIT_CODE_HASH: Init code hashes for pool creation

Entities

  • Token: Represents an ERC-20 token
  • Currency: Base currency interface
  • CurrencyAmount: Token amount with decimal handling
  • Price: Exchange rate between two currencies
  • Pool: Concentrated liquidity pool
  • Position: Liquidity position in a pool
  • Route: Multi-hop swap route
  • Trade: Swap trade with input/output amounts

Enums

  • ChainId: Supported blockchain networks
  • TradeType: EXACT_INPUT or EXACT_OUTPUT
  • Rounding: Rounding modes for calculations

Development

Building

npm run build

Linting

npm run lint

Publishing

Use the provided publish script:

./publish.sh --patch  # Bump patch version and publish
./publish.sh --dry-run  # Test publish without actually publishing
./publish.sh --help  # See all options

For automated publishing, set your npm token in the environment:

# Using environment variable
NPM_DEPLOYMENT_KEY=your_npm_token ./publish.sh --patch

# Or create .env file (not recommended for production)
echo "NPM_DEPLOYMENT_KEY=your_npm_token" > .env
./publish.sh --patch

Getting NPM Automation Token

  1. Go to npm access tokens
  2. Generate a new token with "Automation" type
  3. Set the token in your environment:
    • For CI/CD: Set as environment variable
    • For local development: Add to .env file (ensure it's in .gitignore)

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For questions and support, please visit the Algebra Protocol documentation.