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

zerocard-agent-kit

v1.0.1

Published

SDK for AI agents to interact with Zerocard payment API

Readme

zerocard-agent-kit

The Financial System for Clawdbot (OpenClaw/Moltbot)

Give your AI agent a compliant, secure financial life. This SDK connects your Clawdbot to the Zerocard network, allowing it to issue virtual cards and pay for services autonomously.

The Missing Link: A Wallet for your Agent

Clawdbot gave LLMs "arms and legs" on your computer:

  • The Gateway (Ear): Listens to you via WhatsApp/Telegram.
  • The Brain (LLM): Decides what to do.
  • The Tools (Hands): Browses the web (Puppeteer), manages files (fs).
  • The Wallet (Zerocard): This SDK. Allows the agent to spend money.

Without this, if your agent needs $20 for a Moltbook Premium subscription or a new API key, it hits a wall. With zerocard-agent-kit, it simply requests a card and completes the purchase.

Installation

npm install zerocard-agent-kit

Quick Start

import { ZerocardToolHandler } from 'zerocard-agent-kit';

// 1. Initialize with your agent API key
const handler = new ZerocardToolHandler({
  apiKey: 'sk_agent_xxx',
});

// 2. When AI requests payment method
const result = await handler.handleToolCall({
  amount: 9.99,
  merchant: 'Spotify',
});

// 3. Return the result to your AI
console.log(result.content);

// Output:
// ✅ Using existing active card (no issuance fee charged).
//
// 💳 Card Details:
// • Card ID: card_123...
// • Card Number: **** **** **** 4242
// • CVV: ***
// • Expiry: 12/2025
//
// 🔑 Secure Access Token Available
// • Token: eyJhbG...
// • Use `generateWidgetHtml(token)` to render secure card view if PAN is masked.

Accessing Sensitive Data (PCI Compliance)

For agents that need to use the card for online purchases (e.g. filling a checkout form with Puppeteer), sensitive details (PAN, CVV) are masked by default.

The Bot Flow

  1. Check Response: You'll see **** in the pan.
  2. Use Access Token: The response includes a secure accessToken.
  3. "Card" the Details: Use the token to render a secure widget in your headless browser and "click-to-copy" the details.
// Example Puppeteer Snippet in your Clawdbot
const html = zerocard.generateWidgetHtml(response.accessToken);
await page.setContent(html);

// Bots interact with the overlay elements to retrieve data
await page.click('#copy-card-pan');
const pan = await page.evaluate(() => navigator.clipboard.readText());

// Now fill the payment form
await page.type('#payment-form-card', pan);

This method remains PCI compliant because the sensitive data is never transmitted directly to your backend API; it is only rendered ephemerally in the browser context.

Integration with AI Frameworks

OpenAI Function Calling

import OpenAI from 'openai';
import { ZerocardToolHandler } from 'zerocard-agent-kit';

const openai = new OpenAI();
const zerocardHandler = new ZerocardToolHandler({ apiKey: 'sk_agent_xxx' });

const tools = [ZerocardToolHandler.getToolDefinition()];

const response = await openai.chat.completions.create({
  model: 'gpt-4',
  messages: [...],
  tools,
});

// Handle tool call
if (response.choices[0].message.tool_calls) {
  const toolCall = response.choices[0].message.tool_calls[0];
  const args = JSON.parse(toolCall.function.arguments);
  
  const result = await zerocardHandler.handleToolCall(args);
  
  // Send result back to AI
  messages.push({
    role: 'tool',
    tool_call_id: toolCall.id,
    content: result.content,
  });
}

Claude Tool Use

import Anthropic from '@anthropic-ai/sdk';
import { ZerocardToolHandler } from 'zerocard-agent-kit';

const claude = new Anthropic();
const zerocardHandler = new ZerocardToolHandler({ apiKey: 'sk_agent_xxx' });

const response = await claude.messages.create({
  model: 'claude-3-5-sonnet-20241022',
  max_tokens: 1024,
  tools: [{
    name: 'get_payment_method',
    description: 'Get a virtual card to make a payment.',
    input_schema: ZerocardToolHandler.getToolDefinition().function.parameters,
  }],
  messages: [...],
});

Direct Client Usage

For custom integrations without the Tool Handler:

import { ZerocardClient } from 'zerocard-agent-kit';

const client = new ZerocardClient({
  apiKey: 'sk_agent_xxx',
});

const response = await client.getPaymentMethod({
  amount: 29.99,
  merchant: 'Amazon',
  force_new: false,
});

console.log(response.card.number);

License

MIT