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

cca-token-launcher-sdk

v0.2.0

Published

TypeScript SDK for Uniswap CCA interactions

Readme

@cca/sdk

TypeScript SDK for interacting with Uniswap Continuous Clearing Auctions (CCA).

Installation

npm install @cca/sdk

Features

  • Core Library: Types, constants, utilities for CCA interactions
  • React Hooks: Wagmi-based hooks for React applications
  • Full Type Safety: Comprehensive TypeScript types
  • Q96 Math: Utilities for Uniswap v4 fixed-point arithmetic
  • MPS Calculations: Token release schedule utilities

Usage

Core Library

import {
  AuctionConfigBuilder,
  ethToQ96,
  calculateMPS,
  getAuctionState,
  submitBid,
  Q96,
  MPS_TOTAL,
} from '@cca/sdk';

// Create auction config
const config = new AuctionConfigBuilder()
  .withToken('0x...')
  .withCurrency('0x...')
  .withStartingPrice(1.5) // ETH
  .withFloorPrice(0.5)    // ETH
  .withTotalSupply(1_000_000n * 10n ** 18n)
  .withDuration(7 * 24 * 60 * 60) // 7 days
  .build();

// Price conversions
const priceQ96 = ethToQ96(1.5); // Convert to Q96

React Hooks

import { useAuctionStatus, useSubmitBid, useBidData } from '@cca/sdk/react';

function AuctionComponent() {
  const { state, status, isLoading } = useAuctionStatus(auctionAddress);
  const { submitBid, isLoading: isSubmitting } = useSubmitBid();
  const { bids } = useBidData(auctionAddress, userAddress);
  
  // ...
}

API Reference

Types

  • AuctionConfig - Configuration for creating auctions
  • AuctionState - Current state of an auction
  • AuctionStatus - Derived status (PENDING, ACTIVE, etc.)
  • BidData - Individual bid information
  • BidStatus - Bid status relative to clearing price

Constants

  • Q96 - Fixed-point multiplier (2^96)
  • MPS_TOTAL - Total milli-price steps (1,000,000)
  • CCA_FACTORY_ADDRESS - Factory contract addresses by chain

Utilities

  • ethToQ96(price) - Convert decimal price to Q96
  • q96ToEth(priceQ96) - Convert Q96 to decimal
  • calculateMPS(...) - Calculate token release at price
  • alignPrice(price, tickSpacing) - Align price to tick
  • isTickAligned(price, tickSpacing) - Check tick alignment

Builders

  • AuctionConfigBuilder - Fluent builder for auction configs

Reads

  • getAuctionState(client, address) - Fetch auction state
  • getBidData(client, address, bidId) - Fetch bid data
  • calculateAuctionStatus(state, block) - Derive status

Writes

  • submitBid(client, params) - Submit a bid
  • exitBid(client, params) - Exit a bid
  • claimTokens(client, params) - Claim tokens
  • createAuction(client, params) - Deploy new auction

React Hooks

  • useAuctionStatus(address) - Real-time auction status
  • useSubmitBid() - Bid submission hook
  • useExitBid() - Bid exit hook
  • useClaimTokens() - Token claim hook
  • useBidData(auction, user) - User's bid data
  • useCreateAuction() - Auction creation hook

Development

# Install dependencies
npm install

# Run tests
npm test

# Run tests in watch mode
npm run test:watch

# Type check
npm run type-check

Directory Structure

src/
├── lib/
│   ├── builders/      # AuctionConfigBuilder
│   ├── constants/     # Q96, MPS, addresses
│   ├── reads/         # Read functions (getAuctionState, etc.)
│   ├── types/         # TypeScript types
│   ├── utils/         # Q96 math, MPS, tick utilities
│   └── writes/        # Write functions (submitBid, etc.)
└── react/             # React/Wagmi hooks

tests/
└── integration/       # Integration tests

License

MIT