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

@t54-labs/clawcredit-blockrun-sdk

v0.1.5

Published

SDK and standalone OpenAI-compatible gateway for BlockRun inference paid via claw.credit

Readme

@t54-labs/clawcredit-blockrun-sdk

SDK + standalone OpenAI-compatible gateway for BlockRun inference paid via claw.credit SDK.

This package provides:

  • SDK helpers (createClawCreditFetch, startGateway)
  • a standalone gateway service (POST /v1/chat/completions)
  • a setup script for OpenClaw integration

Why this exists

  • Keep payment integration as a standalone t54-labs solution
  • Let ClawRouter (or any other client) consume it as a low-coupling backend
  • Standardize on official claw.credit SDK flow

Quick start

npm install
npm run build

export CLAWCREDIT_API_TOKEN=claw_xxx
export CLAWCREDIT_CHAIN=BASE
export CLAWCREDIT_ASSET=USDC

node dist/cli.js
# listening on http://127.0.0.1:3402

SDK usage

import { startGateway } from "@t54-labs/clawcredit-blockrun-sdk";

const gateway = await startGateway({
  port: 3402,
  clawCredit: {
    apiToken: process.env.CLAWCREDIT_API_TOKEN!,
    chain: "BASE",
    asset: "USDC",
  },
});

OpenClaw one-command setup

Use the helper script to wire this gateway into OpenClaw as a standalone provider:

bash scripts/setup-openclaw-clawcredit-gateway.sh --token claw_xxx

This will:

  • build/start the standalone gateway in background
  • fetch latest real model IDs from https://blockrun.ai/api/v1/models
  • patch OpenClaw provider config (blockruncc -> http://127.0.0.1:3402/v1)
  • restart OpenClaw gateway
  • set active model to blockruncc/openai/gpt-4o (default)

Dry-run first:

bash scripts/setup-openclaw-clawcredit-gateway.sh --token claw_xxx --dry-run

Then call:

curl -sS http://127.0.0.1:3402/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "model":"openai/gpt-4o",
    "messages":[{"role":"user","content":"hi"}],
    "max_tokens":64
  }'

Environment variables

  • CLAWCREDIT_API_TOKEN (required)
  • CLAWCREDIT_API_BASE (default: https://api.claw.credit)
  • CLAWCREDIT_CHAIN (default: BASE)
  • CLAWCREDIT_ASSET (default: USDC on BASE)
  • CLAWCREDIT_AGENT (optional)
  • CLAWCREDIT_AGENT_ID (optional)
  • CLAWCREDIT_DEFAULT_AMOUNT_USD (default: 0.1)
  • BLOCKRUN_API_BASE (default: https://blockrun.ai/api)
  • HOST (default: 127.0.0.1)
  • PORT / GATEWAY_PORT (default: 3402)

Supported models

This gateway syncs model IDs from BLOCKRUN_API_BASE/v1/models (no meta models). Examples include:

  • openai/gpt-4o
  • openai/gpt-5.2
  • anthropic/claude-opus-4.5
  • anthropic/claude-sonnet-4
  • google/gemini-3-pro-preview
  • moonshot/kimi-k2.5

List current synced models in OpenClaw:

openclaw models show | rg '^  blockruncc/'

Endpoints

  • GET /health
  • POST /v1/chat/completions

Development

npm run typecheck
npm run test
npm run build