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

@skate-org/amm-sui-v2

v2.0.0-beta.16

Published

Skate AMM v2 SDK — Sui periphery (readers, transaction builders, submitters)

Readme

@skate-org/amm-sui-v2

Sui periphery surface for the Skate AMM v2 SDK. Purely functional — readers, transaction builders, submitters, and an env-bound client class.

Surface

Connection

  • getSuiClient({ mode, transport? })@mysten/sui SuiClient factory.

Readers

  • readPeripheryPool({ kernelPool, mode, client? })PeripheryPoolState (kernel linkage, manager, fee, pool coin balances).
  • readUserPoolBalances({ user, poolKey, mode, client? })UserPoolBalances (BCS-deserialized user state with staged amounts and withdrawAfterMs).

Builders → Promise<Transaction>

  • buildSwap(params)
  • buildMint(params)
  • buildBurn(params) — NFT-based burn (Move target ::burn)
  • buildIncreaseLiquidity(params)
  • buildDecreaseLiquidity(params)

Submitters → Promise<string> (digest; build + sign + broadcast)

  • submitSwap(signer, params)mode taken from params.mode
  • submitMint(signer, params)
  • submitBurn(signer, params)
  • submitIncreaseLiquidity(signer, params)
  • submitDecreaseLiquidity(signer, params)

signer is a Signer from @mysten/sui/cryptography (e.g. Ed25519Keypair).

SkateAmm class (headline entry point)

One object that composes AmmCore (pool catalog), AmmApi (quotes + actions), and AmmSui (build/submit/read). Expose escape hatches via .core, .api, .vm.

const amm = new SkateAmm("PRODUCTION");

// Quotes
const quote  = await amm.quote.swap({ poolKey: "USDC_USDT", ... });
const ranges = await amm.quote.boostedRange();

// Actions
const action = await amm.actions.get({ srcChain: CHAIN.SUI, srcHash: "..." });
await amm.actions.waitForExecuted({ srcChain: CHAIN.SUI, srcHash: "..." });

// Build + submit
const tx     = await amm.buildSwap({ poolKey: "USDC_USDT", ... });
const digest = await amm.submitSwap(signer, { poolKey: "USDC_USDT", ... });

// Pool catalog
const keys   = amm.pools.keys();
const info   = amm.pools.byKey("USDC_USDT");

// Sui extra
const client = amm.getSuiClient();

Env-bound client

AmmSui wraps all of the above — construct with a fixed env, then call without mode:

const sui = new AmmSui("PRODUCTION");
const tx = await sui.buildSwap({ poolKey: "USDC_USDT", ... });
const digest = await sui.submitSwap(signer, { poolKey: "USDC_USDT", ... });
const pool = await sui.readPeripheryPool({ kernelPool: "0x..." });
const user = await sui.readUserPoolBalances({ user: "0xUSER", poolKey: "USDC_USDT" });

Helpers

  • swapAmountNormalized(n: number) → bigint (NORMALIZED_DECIMALS = 6)
  • swapAmountNative(n: number, decimals: number) → bigint
  • validateRecipientBytes32, validateSqrtPrice, validateTickRange, validateDeadline

Errors

  • SuiReadError, SuiWriteError — both extend SdkError.

Install

pnpm add @skate-org/amm-sui-v2 @skate-org/amm-core-v2

Peer dep: @mysten/sui ^1.34.

Use via the umbrella

import { sui } from "@skate-org/amm-v2";
const tx = await sui.buildSwap({ ... });

Direct package imports keep unprefixed names:

import { buildSwap } from "@skate-org/amm-sui-v2";
const tx = await buildSwap({ ... });

Status

Live on Sui mainnet since 2026-05-18 (package 0x96e1d3…, USDC/USDT pool). STAGING + PRODUCTION alias DEV as of 2.0.0-beta.10.

Move contract specifics:

  • Deadline is a unix-MILLISECOND timestamp on the Move side; this package takes deadline as unix seconds and multiplies by 1000n before passing to the Move call.
  • Every periphery moveCall includes the ActionBoxConfig shared object and 0x6 Clock as the last two account arguments — handled transparently via SUI_ENV[mode] and SUI_CLOCK_OBJECT_ID constants.

See docs/superpowers/specs/2026-05-04-svm-sui-integration-design.md for the design.