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

@steamlink/relayer

v0.0.1

Published

> Gasless transaction relaying for Nexus — redeem ERC-7710 delegations; gas paid in stablecoins.

Readme

@steamlink/relayer

Gasless transaction relaying for Nexus — redeem ERC-7710 delegations; gas paid in stablecoins.

What it is

The relayer adapter behind a single TypeScript Port. Every redemption — a gameplay move or an x402 payment — reaches Base through one RelayerAdapter interface, so players pay zero gas.

Two implementations ship in the box:

  • OneShotRelayer — the production adapter against the 1Shot Permissionless Relayer API. Gas is paid in a stablecoin drawn from on-chain capabilities, plain EOAs are upgraded in place via EIP-7702, and status is webhook-driven (with a polling fallback when no webhook URL is configured).
  • DirectRelayer — a zero-credential, self-relay adapter that broadcasts real transactions with a funded viem wallet. The live default for tests and local/dev deployments where no external relayer account exists.

Both satisfy RelayerAdapter, so game code targets the port and never touches a concrete provider.

Install

npm install @steamlink/relayer

Key exports

Port (interface + types) — ./port.js

  • RelayerAdapter — the adapter interface: getCapabilities, submitBundle, onStatus, upgradeEOA.
  • RelayerCapabilitieschains, tokens, feeCollector, targetAddress.
  • Bundle — a redemption to relay: delegationContext, encodedTxns, eip7702Auth, destinationUrl, requireTarget, idempotencyKey.
  • EncodedCall — a { to, data, value? } triple.
  • BundleHandle{ bundleId, txHash? } returned by submitBundle.
  • BundleStatus"pending" | "mined" | "failed".
  • StatusEvent — terminal status delivered to onStatus listeners.
  • Unsubscribe — the teardown function returned by onStatus.
  • Eip7702Authorization / UpgradeResult — EOA upgrade input/output.

1Shot adapter — ./oneshot.js

  • OneShotRelayer — the production RelayerAdapter implementation.
  • signWebhook(secret, rawBody) — HMAC-SHA256 webhook signer (for signing test deliveries / verification).
  • OneShotRelayerConfig, OneShotWebhookPayload, WebhookHeaders, FetchImpl — configuration and webhook types.

Direct adapter — ./direct.js

  • DirectRelayer — the self-relay RelayerAdapter implementation.
  • revertDataOf(err) — extract revert-data hex from a viem error for structural decoding upstream.
  • DirectRelayerConfig — configuration type.

Usage

import {
  OneShotRelayer,
  DirectRelayer,
  type Bundle,
} from "@steamlink/relayer";

// Production: the 1Shot permissionless relayer (gas in stablecoin, EIP-7702).
const relayer = new OneShotRelayer({
  apiKey: process.env.ONESHOT_API_KEY!,
  apiSecret: process.env.ONESHOT_API_SECRET!,
  endpoint: "https://api.1shotapi.com/v1",
  webhookUrl: "https://your-backend.example/nexus/webhook",
});

// Capabilities are the source of truth — read tokens + targetAddress, never hardcode.
const caps = await relayer.getCapabilities();
const usdc = caps.tokens.USDC;

// Subscribe to terminal status (webhook-driven).
const unsubscribe = relayer.onStatus((e) => {
  console.log(e.bundleId, e.status, e.txHash);
});

// Submit a delegation redemption — the player pays no gas.
const bundle: Bundle = {
  delegationContext: "0x…",
  encodedTxns: [{ to: caps.targetAddress, data: "0x…" }],
};
const { bundleId } = await relayer.submitBundle(bundle);

unsubscribe();

For local/dev, swap in DirectRelayer with a funded viem wallet — same interface, no credentials:

const relayer = new DirectRelayer({ wallet, publicClient, usdc });

Conventions

  • Capabilities are the source of truth. Read fee/payment tokens and the relayer targetAddress from getCapabilities() (which calls relayer_getCapabilities) and cache them — never hardcode tokens. OneShotRelayer memoizes capabilities for the process lifetime and rejects a targetAddress mismatch (TARGET_MISMATCH) before broadcasting; a money bundle (requireTarget: true) whose target can't be determined is hard-rejected, never submitted unguarded.
  • Webhooks drive status. Terminal status flows from 1Shot webhooks → StatusEvent via ingestWebhook (HMAC-verified over the raw signed body, deduped). Polling getStatus is a silent fallback only when no webhookUrl is set.
  • Idempotent money bundles. A retried submit carrying the same idempotencyKey returns the original handle instead of paying twice.

Part of Nexus

Built for @steamlink/core. Base onlychain is strictly "base".