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

liquid-sdk

v1.7.3

Published

TypeScript SDK to deploy ERC-20 tokens with Uniswap V4 liquidity on Base — zero API keys, one dependency (viem)

Downloads

2,577

Readme

Liquid Protocol SDK

TypeScript SDK for the Liquid Protocol token launcher on Base. Deploy tokens, manage pools, and claim fees using viem.

Installation

npm install liquid-protocol-sdk viem

Quick Start

import { createPublicClient, createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base } from "viem/chains";
import { LiquidSDK } from "liquid-protocol-sdk";

const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);

const publicClient = createPublicClient({
  chain: base,
  transport: http(),
});

const walletClient = createWalletClient({
  account,
  chain: base,
  transport: http(),
});

const liquid = new LiquidSDK({ publicClient, walletClient });

Deploy a Token

const result = await liquid.deployToken({
  name: "My Token",
  symbol: "MTK",
  image: "ipfs://QmYourImageHash",
  metadata: '{"description": "My token description"}',
});

console.log("Token deployed at:", result.tokenAddress);
console.log("Pool ID:", result.event.poolId);
console.log("Tx:", result.txHash);

Deploy with Custom Configuration

import { ADDRESSES, EXTERNAL } from "liquid-protocol-sdk";

const result = await liquid.deployToken({
  name: "Custom Token",
  symbol: "CTK",

  // Pool config
  hook: ADDRESSES.HOOK_STATIC_FEE_V2, // use static fee hook
  pairedToken: EXTERNAL.WETH,
  tickSpacing: 60,
  tickIfToken0IsLiquid: -198720,

  // LP rewards: split 70/30 between creator and platform
  rewardAdmins: [creatorAddress, platformAddress],
  rewardRecipients: [creatorAddress, platformAddress],
  rewardBps: [7000, 3000],

  // Full-range single position
  tickLower: [-887220],
  tickUpper: [887220],
  positionBps: [10000],

  // MEV protection
  mevModule: ADDRESSES.MEV_BLOCK_DELAY,
});

Read Token Info

// Get ERC20 info + deployment details
const info = await liquid.getTokenInfo(tokenAddress);
console.log(info.name, info.symbol, info.decimals);
console.log("Hook:", info.deployment.hook);
console.log("Locker:", info.deployment.locker);

// Get deployment info only
const deployment = await liquid.getDeploymentInfo(tokenAddress);

Pool Information

// Get pool fee configuration (dynamic fee hook)
const config = await liquid.getPoolConfig(poolId);
console.log("Base fee:", config.baseFee);
console.log("Max LP fee:", config.maxLpFee);

// Get current fee state
const feeState = await liquid.getPoolFeeState(poolId);
console.log("Reference tick:", feeState.referenceTick);
console.log("Last swap:", feeState.lastSwapTimestamp);

// Check pool creation time
const created = await liquid.getPoolCreationTimestamp(poolId);

// Check token ordering
const isToken0 = await liquid.isLiquidToken0(poolId);

Claim Fees

// Check available fees
const available = await liquid.getAvailableFees(ownerAddress);
const claimable = await liquid.getFeesToClaim(ownerAddress);

console.log("Available:", available);
console.log("Claimable:", claimable);

// Claim fees (defaults to WETH)
const txHash = await liquid.claimFees(ownerAddress);

// Optional: override the fee token explicitly
const tokenClaimable = await liquid.getFeesToClaim(ownerAddress, tokenAddress);

Vault (Token Vesting)

// Check vault allocation
const allocation = await liquid.getVaultAllocation(tokenAddress);
console.log("Total:", allocation.amountTotal);
console.log("Claimed:", allocation.amountClaimed);
console.log("Lockup ends:", new Date(Number(allocation.lockupEndTime) * 1000));

// Check claimable amount
const claimable = await liquid.getVaultClaimable(tokenAddress);

// Claim vested tokens
const txHash = await liquid.claimVault(tokenAddress);

Factory Status

// Check if factory is accepting new deployments
const deprecated = await liquid.isFactoryDeprecated();

// Check if a locker/hook pair is enabled
const enabled = await liquid.isLockerEnabled(lockerAddress, hookAddress);

Constants & ABIs

All production addresses, fee parameters, and contract ABIs are exported:

import {
  ADDRESSES,     // Liquid Protocol contract addresses
  EXTERNAL,      // External protocol addresses (PoolManager, WETH, etc.)
  FEE,           // Fee constants (denominator, protocol fee, max fees)
  TOKEN,         // Token constants (supply, decimals, max extensions)
  DEFAULT_CHAIN, // base chain object
  DEFAULT_CHAIN_ID, // 8453

  // ABIs for direct contract interaction
  LiquidFactoryAbi,
  LiquidFeeLockerAbi,
  LiquidHookDynamicFeeV2Abi,
  LiquidVaultAbi,
  ERC20Abi,
} from "liquid-protocol-sdk";

API Reference

LiquidSDK

Constructor

new LiquidSDK({ publicClient, walletClient? })
  • publicClient (required) - viem PublicClient connected to Base
  • walletClient (optional) - viem WalletClient for write operations

Methods

| Method | Description | Requires Wallet | |--------|-------------|:-:| | deployToken(params) | Deploy a new token + pool | Yes | | getDeploymentInfo(token) | Get deployment info (hook, locker, extensions) | No | | getTokenInfo(token) | Get ERC20 info + deployment details | No | | getPoolConfig(poolId, hook?) | Get dynamic fee pool configuration | No | | getPoolFeeState(poolId, hook?) | Get current fee state variables | No | | getPoolCreationTimestamp(poolId, hook?) | Get pool creation timestamp | No | | isLiquidToken0(poolId, hook?) | Check if Liquid token is currency0 | No | | getAvailableFees(owner, feeToken?) | Get available fee balance (defaults to WETH) | No | | getFeesToClaim(owner, feeToken?) | Get claimable fee balance (defaults to WETH) | No | | claimFees(owner, feeToken?) | Claim accumulated fees (defaults to WETH) | Yes | | getVaultAllocation(token) | Get vault vesting allocation | No | | getVaultClaimable(token) | Get vested amount available to claim | No | | claimVault(token) | Claim vested tokens from vault | Yes | | isFactoryDeprecated() | Check if factory is deprecated | No | | isLockerEnabled(locker, hook) | Check if locker/hook pair is enabled | No |

Production Addresses

All contracts are deployed on Base (chain ID 8453):

| Contract | Address | |----------|---------| | Factory | 0x0000003482fe299E72d4908368044A8A173BE576 | | Hook Dynamic Fee V2 | 0x2A2F73CDDa098d639bd8Bbcd7dF2bf24E06728cC | | Hook Static Fee V2 | 0xb2401c5369AaCF62F8d615623C7F68F84da428Cc | | Fee Locker | 0x000008B9242b7e4432f6c4b1EeAD93562f9Cc94d | | LP Locker | 0x00000548732DfA56Be1257cE44D0CFc3B46dDb2A | | LP Locker Fee Conversion | 0x00000547518784420CEeF761fb18D884bb908102 | | Vault | 0x000001c5263F4d64CdC343cDA9C8bF961CF8376c | | Sniper Auction V2 | 0x000007b64003ee07a69576F98859a0a36b854260 | | Sniper Util V2 | 0x000003Ee0cb9B0C82C6C7FCB7b81a9883F285270 | | MEV Block Delay | 0x0000035D83588954F3c581c3A66251b3F06AD5e4 | | Airdrop V2 | 0x00000C222442512b08446D33dd9754a7F260BE79 | | Pool Extension Allowlist | 0x000003Afb1b070F037D2871eE0A6b8c8f53F7B77 |

License

MIT