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/toke

v0.1.2

Published

Headless TypeScript SDK for the **legacy TOKE token**: **cross-chain bridging** (LayerZero V2 OFT) and **TOKE → AUTO migration**. TOKE is legacy — the active products (sAUTO staking, AUTO bridging, ETH/AUTO LP) live in `@tokemak/auto`. This package is int

Readme

@tokemak/toke

Headless TypeScript SDK for the legacy TOKE token: cross-chain bridging (LayerZero V2 OFT) and TOKE → AUTO migration. TOKE is legacy — the active products (sAUTO staking, AUTO bridging, ETH/AUTO LP) live in @tokemak/auto. This package is intentionally scoped to bridging + migration.

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 { getBridgeQuote } from "@tokemak/toke/queries";
import { prepareBridge } from "@tokemak/toke/transactions";

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

// Quote the LayerZero fee first (optional — prepareBridge quotes internally).
const quote = await getBridgeQuote(client, {
  token: "0x2e9d63788249371f1dfc918a52f8d799f4a38c94",
  amount: 100n * 10n ** 18n,
  destChainId: 8453,
  recipient: owner
});

// Bridge 100 TOKE mainnet → Base. tx.value is the LayerZero nativeFee.
const plan = await prepareBridge(client, {
  owner,
  token: "0x2e9d63788249371f1dfc918a52f8d799f4a38c94",
  amount: 100n * 10n ** 18n,
  destChainId: 8453
});
if (plan.approval) await sendTransaction(walletClient, plan.approval);
await sendTransaction(walletClient, plan.transaction);

Surface

  • Queries: getBridgeQuote, getTokenPrices (re-export).
  • Transactions: prepareBridge, prepareMigrate, prepareMigrateAndStake, prepareApprove.
  • Registry data in @tokemak/config: TOKE_BRIDGE_REGISTRY (OFT addresses + baked LayerZero eids per chain, verified on-chain 2026-07-07) and TOKE_TO_AUTO_CONVERSION (the TokenConversion contract).
  • The bridge builders (getBridgeQuote / prepareBridge) and prepareApprove are thin bindings of shared implementations in @tokemak/sdk-core — this package just supplies TOKE_BRIDGE_REGISTRY. The same core is reused by @tokemak/auto.

Quirks agents should know

  • Mainnet vs satellites. On mainnet, bridging goes through the OFTAdapter lockbox — it pulls TOKE via transferFrom, so an ERC-20 approval is required (included in the plan as approval). Satellite chains use native OFTs that burn from the sender, so no approval.
  • Sender-bound debit, recipient param. send debits msg.sender; the destination-chain recipient is a real parameter (defaults to owner). Excess native fee refunds to the sender.
  • Dust truncation. OFTs move value in 6 shared decimals — amounts below 10^12 raw are dust and truncated. minAmountReceived reflects the exact truncation (vanilla OFT transfers are lossless, so default slippageBps is 0).
  • Destination eid is baked into the registry, so quoting needs no destination-chain client. Track deliveries at https://layerzeroscan.com/tx/{hash}.
  • Migration is sender-debited, mainnet only. prepareMigrate calls the TokenConversion contract, which pulls the sender's TOKE (approval included in the plan) and mints AUTO 1:1 to receiver (defaults to sender). prepareMigrateAndStake converts and locks into sAUTO in one transaction via the contract's role-held lockTokeFor — funds INTO staking, so it is gated on sAUTO's registry lifecycle + fresh paused() (pass force to bypass). The receiver param routes through the conversion contract, so it is the one supported way to stake sAUTO for another account.
  • No staking reads or LP. TOKE is legacy; this package does not expose accTOKE staking positions/exits or any LP. Recover from git history if legacy staking reads are reintroduced.

Verification

pnpm --filter @tokemak/toke smoke   # live mainnet + Base bridge checks with real actors

Fully on-chain — no Tokemak subgraph dependency.