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

@peltier/react

v0.2.0

Published

Drop-in deposit widget for any ERC-20 to USDC — React (web) SDK: <DepositWidget>, per-flow components, provider and headless hooks.

Downloads

427

Readme

@peltier/react

npm license

Drop-in payment widgets for React (web) — accept any ERC-20 on any chain and settle as USDC at your destination. Ships <DepositWidget>, per-flow checkout components, an EIP-1193 send flow, plus the provider and headless hooks when you want to build your own UI.

npm install @peltier/react viem

Quickstart

import { PeltierProvider, DepositWidget } from '@peltier/react'
import '@peltier/react/styles.css'

function App() {
  return (
    <PeltierProvider apiUrl="https://api.peltier.dev" publishableKey="pk_live_…">
      <DepositWidget
        destinationAddress="0xYourAddress"  // optional — omit for a self-serve destination panel
        destinationChainId={8453}
        onComplete={(id) => console.log('Done:', id)}
      />
    </PeltierProvider>
  )
}

publishableKey is required<PeltierProvider> throws at mount without a valid pk_test_… / pk_live_… key (a secret sk_ key is rejected outright; never ship it to the browser). The key's prefix selects the environment (test → testnet, live → mainnet), and every session the widgets create is tagged with your merchant, so it shows up in GET /v1/requests and the dashboard's Requests page.

destinationAddress is optional: omit it and the widget renders an editable Destination panel (the depositor enters where their USDC lands) and holds off registration until one is set.

Components

| Component | Flow | |---|---| | <DepositWidget> | one-time deposit from any chain/token (QR + address, live status) | | <PeltierCheckout> | merchant checkout against a payment session | | <PeltierRequest> | request/receive — share a link or QR, watch it settle | | <PeltierSend> | send flow with quote preview | | <SendFromWallet> | send driven by any EIP-1193 wallet provider, with fail-closed calldata verification (allowedRouters is required) | | <QuotePreview> | standalone route/quote display |

Styling: import @peltier/react/styles.css once; pass a PeltierTheme to customize.

Headless hooks

Every widget's engine is exported as a hook, so you can keep the logic and own the markup: useDepositSession, useRequestSession, useSendFromWallet, useStealthRequest, and usePeltier (provider context).

Engines surface a typed error: PeltierError (code + retryable) and a connectionState (connecting | live | reconnecting | polling) so your UI can reflect failure and transport health.

Core surface included

The browser-safe @peltier/core surface is re-exported from the package root: registerSession, watchSession, intent signing, stealth helpers, quotes, parse402, chain constants, and the typed PeltierApiError. Server-only sk_ helpers (payment-session creation, webhook verification, the subscriptions REST client) are deliberately not exported here — they belong on your server, via @peltier/node.

Test mode

Use a pk_test_ key and every flow routes to testnet counterparts automatically (Base Sepolia, Arbitrum Sepolia, …) — Stripe-style key parity, no config flag.

Docs

Full props tables live on the docs site: PeltierProvider · DepositWidget · Supported chains

License

MIT