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

@l.x/provider

v1.0.0

Published

Jurisdiction-neutral regulated-provider SDK for Lux Exchange forks.

Readme

@l.x/provider — Regulated Provider SDK

Jurisdiction-neutral client for the @lux/standard/provider interface. Vite-native: reads import.meta.env for configuration. Safe to import even in pure-DeFi forks — every method short-circuits to "not handled" when no provider is configured.

Install

pnpm add @l.x/provider

Three surfaces

import { RegulatedProviderClient, Side } from '@l.x/provider'        // core client
import { readProviderConfig, buildOnboardingUrl } from '@l.x/provider/config'
import { RegulatedSwapGate, useEligibility } from '@l.x/provider/react'

Core client — contract reads/writes

import { createPublicClient, http } from 'viem'
const client = new RegulatedProviderClient(
  { adapter: '0xAdapter…', router: '0xRouter…' },
  createPublicClient({ transport: http(rpc) }),
)
if (await client.handles('IBIT/USDL')) {
  const { ok, reasonCode } = await client.isEligible(trader, 'IBIT/USDL')
}

Config — Vite env-driven

// In a Vite app:
import { readProviderConfig } from '@l.x/provider/config'
const cfg = readProviderConfig(import.meta.env as any)

Env keys:

| Key | Meaning | |----------------------------------|---------------------------------------| | VITE_LIQUIDITY_ADAPTER | adapter address (IRegulatedProvider) | | VITE_LIQUIDITY_ROUTER | Lux ProviderRouter address | | VITE_LIQUIDITY_NAME | human-readable provider name | | VITE_LIQUIDITY_ONBOARDING_URL | URL to the provider's KYC flow |

LIQUIDITY_* follows the generic finance term — a liquidity provider is any market maker or regulated venue that offers quotes. These keys are not tied to any specific brand.

React — drop-in gate

<RegulatedSwapGate config={cfg} client={client} symbol="IBIT/USDL" trader={address} onConnect={connect}>
  <SwapButton />
</RegulatedSwapGate>

If the symbol is unregulated: SwapButton renders as-is. If regulated + eligible: SwapButton renders as-is. If regulated + not eligible: gate renders a CTA:

  • Get verified with {provider.name} → opens onboardingUrl?return={current_url}&address={addr}
  • Already verified? Re-check → re-queries isEligible on chain
  • Connect wallet → calls onConnect if no wallet

White-label forks

VITE_LIQUIDITY_ADAPTER=0x…
VITE_LIQUIDITY_ROUTER=0x…
VITE_LIQUIDITY_NAME=Your Provider
VITE_LIQUIDITY_ONBOARDING_URL=https://onboard.provider.tld

If the env vars are unset, client.enabled() === false and every gate is a transparent pass-through. Pure DeFi mode, zero code changes.

Flow

user clicks Swap
  │
  ▼
RegulatedGate.useEligibility(symbol, trader)
  ├─ provider disabled       → render children (pure DeFi)
  ├─ symbol not handled      → render children (native pool)
  ├─ eligible                → render children (regulated, approved)
  └─ not eligible
        ├─ no wallet         → [Connect wallet]
        ├─ [Get verified]    → opens provider onboarding URL
        └─ [Already verified? Re-check]
              └─ refetch IRegulatedProvider.isEligible