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

@cryptokass/llx

v0.0.10

Published

LLX is a provider agnostic dev kit interacting with the main dapps on the LightLink network

Readme

LLX

LLX

LLX simplifies interacting with the main dapps on the LightLink network. Its platform agnostic and can be used with ethers, wagmi, viem, etc.

Features

  • Token Actions: fetch token info, balance, allowance, permit2 allowance
  • Swaps: quote, swap
  • Domain resolution: resolve ENS domain to address
  • Allowance and Permit2: prepare and execute allowance and permit2 transactions
  • Bridge: bridge ETH between L1 (Ethereum, Sepolia) and L2 (Phoenix, Pegasus)

Installation

npm install --save @cryptokass/llx

Getting Started

Token helpers

import { fetchTokenInfo } from "llx";
import { Phoenix } from "llx/chains";

const { name, symbol, decimals, totalSupply } = await fetchTokenInfo(
  Phoenix.id,
  TOKEN_ADDRESS
);

const balance = await fetchBalance(Phoenix.id, TOKEN_ADDRESS);

Swaps

import { swap } from "llx";
import { Phoenix } from "llx/chains";

const AMOUNT_IN = 1n * 10n ** 6n;
const FEE = 3000;

// First get a quote for the swap
const quote = await swap.quoteExactInput(Phoenix.id, {
  fromToken,
  toToken,
  amountIn: AMOUNT_IN,
  fee: FEE,
});

// Then prepare the swap transaction
const preparedTxs = await swap.prepareSwapExactInput(Phoenix.id, {
  tokenIn: fromToken,
  tokenOut: toToken,
  amountIn: AMOUNT_IN,
  amountOut: quote.amountOut,
  fee: FEE,
  slippage: 0.1, // 10%
});

// Finally run the prepared tx with your provider. For example using viem:
for (const tx of preparedTxs) {
  const hash = await walletClient.sendTransaction({
    account: myAccount,
    to: tx.to,
    value: tx.value,
    data: tx.data,
  });

  // wait for the tx to be mined
  await publicClient.waitForTransactionReceipt({
    hash,
  });
}

Domain resolution

import { resolveEnsDomain } from "llx";
import { Phoenix } from "llx/chains";

const address = await resolveEnsDomain(Phoenix.id, "lightlink.ll");

Allowance and Permit2

import { ensureAllowance } from "llx";
import { Phoenix } from "llx/chains";

// Ensure allowance will prepare approval transactions for the token
// if there is not sufficient allowance.
const txs = await ensureAllowance(
  Phoenix.id,
  TOKEN_ADDRESS,
  myAccount,
  ALLOWANCE_AMOUNT
);

// You can now run the prepared txs with your provider. For example using viem:
for (const tx of txs) {
  const hash = await walletClient.sendTransaction({
    account: myAccount,
    to: tx.to,
    value: tx.value,
    data: tx.data,
  });

  // wait for the tx to be mined
  await publicClient.waitForTransactionReceipt({
    hash,
  });
}

Bridge

Only ETH bridging is supported for now.

import { prepareBridgeTransfer } from "llx";
import { Phoenix } from "llx/chains";

const txs = await prepareBridgeTransfer(Phoenix.id, {
  amount: AMOUNT,
});

for (const tx of txs) {
  const hash = await walletClient.sendTransaction({
    account: myAccount,
    to: tx.to,
    value: tx.value,
    data: tx.data,
  });
}