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

@tokemak/auto

v0.1.2

Published

Headless TypeScript SDK for the **AUTO** token: **sAUTO staking** (lock/unlock/rewards), **cross-chain bridging** (LayerZero V2 OFT), and the **ETH/AUTO Uniswap V4 LP pool** (reads + Merkl reward claims). The TOKE-side products (legacy accTOKE exits, TOKE

Readme

@tokemak/auto

Headless TypeScript SDK for the AUTO token: sAUTO staking (lock/unlock/rewards), cross-chain bridging (LayerZero V2 OFT), and the ETH/AUTO Uniswap V4 LP pool (reads + Merkl reward claims). The TOKE-side products (legacy accTOKE exits, TOKE→AUTO migration, TOKE bridging) live in @tokemak/toke.

Runtime dependencies: viem + fetch. No React, no wagmi, no GraphQL client. Reads return data or throw typed TokemakSdkErrors; builders return unsigned transactions — nothing executes on its own.

Quickstart

import { createTokemakClient, sendTransaction } from "@tokemak/sdk-core";
import {
  getStaking,
  getUserStaking,
  getBridgeQuote
} from "@tokemak/auto/queries";
import { prepareLock, prepareBridge } from "@tokemak/auto/transactions";

const client = createTokemakClient({ chainId: 1, rpcUrl: RPC_URL });

const staking = await getStaking(client); // sAUTO supply/TVL/APR/cycle/status
const position = await getUserStaking(client, { owner }); // null = no position

// Lock 100 AUTO (16 cycles). Plan includes an `approval` tx iff allowance is short.
const plan = await prepareLock(client, { owner, amount: 100n * 10n ** 18n });
if (plan.approval) await sendTransaction(walletClient, plan.approval);
await sendTransaction(walletClient, plan.transaction);

Surface

  • Queries: getStaking, getUserStaking, getStakingRewardsHistory, getUserStakingRewards, getBridgeQuote, getLpPool, getUserLpPositions, getUserLpRewards, getTokenPrices (re-export).
  • Transactions: prepareLock (gated), prepareRequestUnlock, prepareUnlock, prepareCancelUnlockRequest, prepareClaimStakingRewards, prepareBridge, prepareClaimLpRewards, prepareApprove.
  • Registry data in @tokemak/config: AUTO_STAKING_REGISTRY, AUTO_BRIDGE_REGISTRY, AUTO_LP_POOL_REGISTRY — every address/symbol/eid verified on-chain 2026-07-07 (the V4 pool key is verified by recomputing the poolId hash).
  • Shared machinery in @tokemak/sdk-core, reused by @tokemak/toke: AccToke reads, rewardsV1 payloads, and the full LayerZero bridge surface (getBridgeQuote / prepareBridge / prepareApprove) — this package binds it to AUTO_BRIDGE_REGISTRY.

Quirks agents should know

  • The sAUTO ABI uses legacy "toke" naming. lockToke() locks AUTO; toke() returns the AUTO address (verified on-chain). Don't let the names mislead tooling.
  • Locks are sender-bound. lockToke debits and credits msg.sender; the receiver-crediting lockTokeFor is role-gated on-chain (LOCK_FOR_ROLE), so prepareLock has no receiver param. To stake for another account, use @tokemak/toke's prepareMigrateAndStake (its receiver param goes through the role-holding conversion contract).
  • The lock duration is currently fixed: minLockCycles == maxLockCycles == 16.
  • Two-phase exit: requestWithdrawal(amount) → wait until the request's minCyclewithdraw(amount); requests are only accepted in cycles where (currentCycle − lockCycle) % lockDuration == 0. Exits are never gated by the SDK, but the contract's withdraw is whenNotPaused on-chain.
  • Staking reward claims are strictly sender-bound and payload amounts are cumulative (claimable = amount − alreadyClaimed). Payloads come from the keyless IPFS mirror (endpoints.rewardsIpfs), current cycle falling back one cycle while the new file publishes. Rewards pay in AUTO.
  • Staking APR is subgraph-derived: currentAprPerCredit is wei-scaled (1e18) per cycle × 16 cycles, returned as a fraction (0.56 = 56%).
  • Bridging: mainnet uses the OFTAdapter lockbox (approval in the plan); satellites burn from the sender. Recipient is a real parameter (defaults to sender); excess native fee refunds to the sender. Amounts below 10^12 raw are dust; minAmountReceived is the exact truncation. No AUTO OFT on Sonic. Track deliveries at https://layerzeroscan.com/tx/{hash}.
  • LP is read + claim only. Position entry/exit happens on the Uniswap UI; no LP tx builders exist by design. getLpPool TVL prefers the V4 subgraph and falls back to a labeled on-chain full-range approximation (tvlSource). TheGraph's gateway requires a key even on the "public" URL — keyless callers get the approximation, and getUserLpPositions needs either graphApiKey/endpoints.uniV4Subgraph or knownTokenIds.
  • Merkl proofs rotate (~4 h): build prepareClaimLpRewards and send promptly; refetch if stale. Merkl amounts are cumulative — the distributor no-ops already-claimed portions. LP rewards currently pay in TOKE.

Verification

pnpm --filter @tokemak/auto test    # pure-logic unit tests (V4 math/decoding)
pnpm --filter @tokemak/auto smoke   # live mainnet + Base checks with real actors

SMOKE_SKIP_TOKEMAK_SUBGRAPH=1 skips the two Tokemak-subgraph checks during backend outages (loudly; not a full verification).