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

@hyperflowlabs/hf-ts-sdk

v0.1.0

Published

Typed TypeScript client for the HyperFlow GraphQL API.

Readme

hf-ts-sdk

Typed TypeScript client for the HyperFlow GraphQL API, following hf-py-sdk. Node.js 22+ and browsers with native fetch; no runtime dependencies.

Install and use

After the first release:

npm install @hyperflowlabs/hf-ts-sdk
import {connect} from "@hyperflowlabs/hf-ts-sdk";

const client = connect();
const data = await client.query({metadata: {chainId: true}});
console.log(data.metadata);

Queries and mutations use Genql selection objects. BigInt/DateTime are string; other custom scalars are unknown: narrow them. CommonJS require("@hyperflowlabs/hf-ts-sdk") is supported too. Browser bundlers can consume the CommonJS package; no Node-only APIs are used by the runtime.

| Option | Environment variable | Default | | --- | --- | --- | | url | HYPERFLOW_API_URL | https://api.hyperflowlabs.com/graphql | | authHeader | HYPERFLOW_AUTH_HEADER | x-api-key | | authValue | HYPERFLOW_AUTH_VALUE | no auth |

Explicit options override environment variables; authValue: "" disables environment auth. Browsers use explicit options. headers accepts native Headers, tuples, objects, or an async callback, resolved on every request. fetch accepts a custom implementation. HTTP/network/GraphQL errors reject. The generated createClient and schema types are also exported.

Subscriptions and Apollo

subscribe(ws, selection, sink) runs a typed subscription on any graphql-ws client and returns its unsubscribe. @hyperflowlabs/hf-ts-sdk/document exports queryDocument/mutationDocument/subscriptionDocument → {document, variables}, a TypedDocumentNode for Apollo useQuery(document, {variables}), urql etc. (optional graphql v16 peer). toDocument<Result>(op) parses a generated operation into a typed document; pass op.variables separately. See examples/live.mjs.

Runnable example

After building, run node examples/metadata.mjs from this checkout. Set HYPERFLOW_AUTH_VALUE for authenticated requests; the default header is x-api-key. The example exports getMetadata(options) for reuse. Tests execute this exact example with mocked fetch responses, never the live API:

npm test

Generate and check (Docker)

docker run --rm -v "${PWD}:/sdk" -w /sdk node:24-alpine sh -c \
  'npm install --ignore-scripts && mkdir -p artifacts && npm pack --pack-destination artifacts'

Pinned Genql 6.3.4 generates from live introspection on every build. src/generated/, dist/, and tarballs are gitignored, not committed. Only hand-written sources, generator, tests, docs and workflows are tracked. The package allowlist ships compiled JS and declarations, README and license. The public endpoint needs no key; HTTP 429 fails explicitly, without retry loops. The generator accepts the same environment variables as the client.

CI generates once, uploads the tarball, then installs and tests it (including TypeScript declarations) on Node 22 and 24. It does not test an unbuilt source tree. Only schema generation uses the live API; example tests forbid real fetch calls.

npm continuous deployment

Only pushing an explicitly authorized v<semver> tag publishes. The release workflow derives the version from the tag, generates, builds and tests once, then publishes that exact tested tarball with OIDC provenance. Keep the tarball path prefixed with ./ so npm treats it as a local file. Create release tags from approved main, after all intended changes are merged. Prerelease tags publish under npm's next dist-tag; stable releases use latest. The manifest's 0.0.0-development is only a non-release placeholder.

Configure npm's trusted publisher for package @hyperflowlabs/hf-ts-sdk:

  • GitHub owner: hyperflowfinance
  • Repository: hf-ts-sdk
  • Workflow filename: release.yml
  • GitHub environment: npm

The GitHub environment is created separately; npm account/package ownership and trusted-publisher setup must be completed by an npm maintainer before releasing. If npm requires an initial package before enabling trust, arrange its bootstrap with the maintainer; do not add npm tokens or publish from a laptop. Require 2FA and disallow token publishing after OIDC is configured. Never commit credentials. No release tag is created by repository setup.