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

@polygonlabs/faucet-api-client

v2.2.0

Published

Type-safe REST client for the Polygon Faucet API, generated from the registered Zod schemas

Readme

@polygonlabs/faucet-api-client

Type-safe REST client for the Polygon testnet faucet API, generated with hey-api from the API's committed OpenAPI spec. Every response is validated at runtime with the same Zod schemas the server uses.

Why this package exists

The client is generated from the same schema registry the faucet API serves its routes with (via @polygonlabs/faucet-api-schemas). A change to the API's shape therefore ships as a new package version instead of a silent break. A response that does not match its schema fails at the validation boundary instead of corrupting state further down.

Install

pnpm add @polygonlabs/faucet-api-client

Usage

import { client, getInfo } from '@polygonlabs/faucet-api-client';

client.setConfig({ baseUrl: 'https://faucet-api.polygon.technology' });

const { data } = await getInfo();
// data: { success: true, data: { metadata: { ...networks and tokens } } }

All JSON routes are covered: the core routes (/health-check, /ready, /service-status, /info, /faucetBalances), the auth session routes (/auth/user, /auth/logout) and the transfer routes (/validate, /registerTransferRequest). The session routes need the session cookie, so browsers must send credentials (client.setConfig({ credentials: 'include' })). The OAuth login routes (/auth/github, /auth/twitter) are browser redirects: navigate to them instead of calling them; see MIGRATION.md.

Entry points

  • @polygonlabs/faucet-api-client: the fetch-based SDK. It has one function per API operation, the configurable client singleton, and the error-narrowing helpers (isResponseValidationError, isTransportError, isWrapperError).
  • @polygonlabs/faucet-api-client/factory: the underlying hey-api client factory, for creating separately configured client instances.