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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@skate-org/amm-contracts-binding

v1.0.0

Published

TypeScript bindings for Skate AMM contracts

Readme

@skate-org/amm-contracts-binding

TypeScript bindings for Skate AMM contracts - providing type-safe access to ABIs and function selectors.

Features

  • Type-safe ABIs - All contract ABIs exported as TypeScript constants with proper typing
  • Function Selectors - Enums for all contract function selectors
  • Dual Build - ESM and CJS support via tsup
  • Auto-generated - Automatically generated from contract artifacts
  • Tree-shakeable - Import only what you need
  • Source Maps - Full source map support for debugging

Installation

npm install @skate-org/amm-contracts-binding
# or
yarn add @skate-org/amm-contracts-binding
# or
pnpm add @skate-org/amm-contracts-binding

Usage

Importing ABIs

import { KernelManagerABI, PeripheryPoolABI } from '@skate-org/amm-contracts-binding';

// Use with viem
import { createPublicClient, http } from 'viem';

const client = createPublicClient({
  transport: http(),
});

const data = await client.readContract({
  address: '0x...',
  abi: KernelManagerABI,
  functionName: 'getPool',
  args: [token0, token1, fee],
});

Importing Selectors

import {
  KernelManagerSelectors,
  KernelManagerSelectorsMap
} from '@skate-org/amm-contracts-binding';

// Use enum values
const selector = KernelManagerSelectors.createPool;
console.log(selector); // '0x...'

// Use selector map for signature lookups
const sig = 'createPool(address,address,uint24)';
const selector2 = KernelManagerSelectorsMap[sig];
console.log(selector2); // '0x...'

Importing Everything

import { ABIs, Selectors } from '@skate-org/amm-contracts-binding';

// Access all ABIs
const kernelManagerABI = ABIs.KernelManager;
const peripheryPoolABI = ABIs.PeripheryPool;

// Access all selectors
const kernelSelectors = Selectors.KernelManager;
const peripherySelectors = Selectors.PeripheryPool;

Available Contracts

AMM Contracts

Kernel:

  • KernelManager / KernelManagerABI / KernelManagerSelectors
  • KernelPool / KernelPoolABI / KernelPoolSelectors
  • KernelEventEmitter / KernelEventEmitterABI / KernelEventEmitterSelectors
  • KernelManagerStorage / KernelManagerStorageABI / KernelManagerStorageSelectors

Periphery:

  • PeripheryManager / PeripheryManagerABI / PeripheryManagerSelectors
  • PeripheryPool / PeripheryPoolABI / PeripheryPoolSelectors
  • PeripheryEventEmitter / PeripheryEventEmitterABI / PeripheryEventEmitterSelectors

Interfaces:

  • All kernel and periphery interfaces (IKernelManager, IPeripheryPool, etc.)

Skate Contracts

Kernel:

  • AccountRegistry / AccountRegistryABI / AccountRegistrySelectors
  • MessageBox / MessageBoxABI / MessageBoxSelectors
  • SkateApp / SkateAppABI / SkateAppSelectors

Periphery:

  • SkateGateway / SkateGatewayABI / SkateGatewaySelectors
  • SkateAppPeriphery / SkateAppPeripheryABI / SkateAppPeripherySelectors
  • ActionBox / ActionBoxABI / ActionBoxSelectors

Common:

  • ExecutorRegistry / ExecutorRegistryABI / ExecutorRegistrySelectors
  • Multicall / MulticallABI / MulticallSelectors

Development

Regenerate Bindings

# From the package directory (packages/ts-binding)
npm run generate
# or
make generate

# From the root repository
make gen-all
cd packages/ts-binding && make generate

Build

npm run build
# or
make build

Clean

npm run clean
# or
make clean

Available Make Commands

Run make help to see all available commands:

  • make install - Install dependencies
  • make generate - Generate TypeScript from ABIs/selectors
  • make build - Build the package
  • make clean - Clean generated files
  • make check - Verify generated files are up-to-date
  • make all - Clean, install, generate, and build

Package Structure

dist/
├── index.js          # ESM build
├── index.cjs         # CommonJS build
├── index.d.ts        # TypeScript declarations (ESM)
├── index.d.cts       # TypeScript declarations (CJS)
└── *.map             # Source maps

TypeScript Support

This package is built with TypeScript and includes full type definitions. ABIs are typed as const assertions, providing maximum type safety.

import { KernelManagerABI } from '@skate-org/amm-contracts-binding';

// The ABI type is inferred from the const assertion
type KernelManagerABIType = typeof KernelManagerABI;

License

MIT

Publishing

Prerequisites

  1. NPM Account: You need an npm account with publish access to @skate-org
  2. Authentication: Login to npm (only needed once per machine)
npm login

Publishing Workflow

# 1. Update version in package.json
# Follow semantic versioning: major.minor.patch

# 2. Generate and build
make build

# 3. Test the package locally (dry run)
npm run publish:dry
# or
make publish-dry

# 4. Publish to npm
npm run publish:release
# or
make publish

Automated Publishing (CI/CD)

For CI/CD pipelines, set the NPM_TOKEN environment variable:

# GitHub Actions example
- name: Publish to npm
  run: npm publish
  env:
    NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Contributing

This package is auto-generated from the contract artifacts. To update:

  1. Update the contracts in the main repository
  2. Run make gen-all to regenerate ABIs and selectors
  3. Run npm run build in this package to rebuild bindings
  4. Commit the generated files

Links