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

plugin-gblin

v0.2.0

Published

ElizaOS plugin — gasless treasury rail for AI agents on Base mainnet. Routes idle USDC into the GBLIN MEV-protected cbBTC/WETH basket and JIT-swaps back to USDC for x402 invoices.

Readme

plugin-gblin

ElizaOS plugin — gasless treasury management for AI agents on Base mainnet.

Park idle USDC into the GBLIN MEV-protected index (cbBTC / WETH / USDC), JIT-swap back to USDC to pay x402 invoices, and monitor treasury health — all from inside your ElizaOS agent.

npm ElizaOS Base


What it does

| Action | Trigger phrases | Cost | |---|---|---| | CHECK_GBLIN_TREASURY_HEALTH | "check my treasury", "wallet status" | $0.002 USDC | | INVEST_IDLE_USDC_GBLIN | "park USDC in GBLIN", "buy GBLIN", "invest 10 USDC" | $0.002 USDC | | RESCUE_USDC_FROM_GBLIN | "need USDC", "sell GBLIN", "JIT swap", "pay invoice" | $0.005 USDC |

The Provider (GBLIN_TREASURY_CONTEXT) injects live NAV, basket weights, and Crash Shield status into every agent loop ($0.001 USDC per call).

All payments are gasless for the agent: the Coinbase CDP facilitator pays on-chain gas; the agent only signs an EIP-3009 transferWithAuthorization.


Install

# with npm
npm install plugin-gblin

# with bun (elizaos default)
bun add plugin-gblin

Or via the ElizaOS CLI:

elizaos plugins add gblin

Configuration

Add to your agent's .env:

# Required
EVM_PRIVATE_KEY=0x_your_agent_hot_wallet_private_key

# Optional — override defaults
GBLIN_BASE_URL=https://gblin.digital
GBLIN_RPC_URL=https://base-rpc.publicnode.com

Security: use a dedicated hot wallet for the agent with only the USDC/GBLIN it needs. Never use a founder or treasury wallet here. The maximum a malicious endpoint could drain in one run is $0.005 USDC.


Add to your character

// character.ts
import { type Character } from "@elizaos/core";

export const character: Character = {
  name: "TreasuryAgent",
  plugins: [
    "@elizaos/plugin-sql",
    "@elizaos/plugin-bootstrap",
    // Add GBLIN only if private key is set
    ...(process.env.EVM_PRIVATE_KEY?.trim() ? ["plugin-gblin"] : []),
  ],
  // ...
};

Or in character.json:

{
  "name": "TreasuryAgent",
  "plugins": ["plugin-gblin"],
  "settings": {
    "secrets": {
      "EVM_PRIVATE_KEY": "0x..."
    }
  }
}

How it works

Agent LLM decides "I have idle USDC"
  ↓
triggers INVEST_IDLE_USDC_GBLIN action
  ↓
plugin sends GET /api/x402/invest?usdc=10 (preflight → 402)
  ↓
plugin signs EIP-3009 transferWithAuthorization ($0.002 USDC)
  ↓
plugin retries with PAYMENT-SIGNATURE header
  ↓
GBLIN API returns {steps: [{target, calldata}, {target, calldata}]}
  ↓
plugin broadcasts step 1 (USDC approve) → waits confirmation
  ↓
plugin broadcasts step 2 (buyGBLINWithToken) → waits confirmation
  ↓
callback: "✅ Invested $10 USDC → GBLIN. tx: 0xab12..."

Endpoints consumed

All calls go to https://gblin.digital/api/x402/*. Each is a paid x402 v2 endpoint on Base mainnet (chain id 8453, USDC 0x8335...).

| Path | Price | Returns | |---|---|---| | GET /api/x402/treasury-state | $0.001 | NAV, basket, Crash Shield | | GET /api/x402/health?wallet= | $0.002 | balances, gas runway, recommendation | | GET /api/x402/invest?usdc= | $0.002 | sequential tx calldata | | GET /api/x402/jit?usdc=&wallet= | $0.005 | atomic swap calldata |

Discovery manifest: gblin.digital/api/x402/llms.txt


Protocol


License

MIT © GBLIN Protocol