AAStarCommunity

superpaymaster

Gasless transactions and micropayments for Web3 agents. ERC-4337 gas sponsorship, x402 payment facilitation, streaming micropayments via payment channels.

AAStarCommunity 2 Updated 2mo ago

Resources

21
GitHub

Install

npx skillscat add aastarcommunity/superpaymaster

Install via the SkillsCat registry.

SKILL.md

SuperPaymaster

Decentralized gas payment infrastructure for Web3 agents and dApps. Provides gas sponsorship via community tokens (xPNTs), x402 payment facilitation, and streaming micropayment channels.

Quick Start

pnpm add @superpaymaster/sdk
import { createSuperPaymasterClient } from "@superpaymaster/sdk";

const client = createSuperPaymasterClient({
  network: "base-sepolia",
  operatorUrl: "https://your-operator.example.com",
});

Capabilities

1. Gas Sponsorship (ERC-4337)

Sponsor gas fees for users via community tokens instead of ETH.

// Check if a user is eligible for gas sponsorship
const eligible = await client.isEligibleForSponsorship(userAddress);

// Get paymaster data for a UserOperation
const paymasterData = await client.getPaymasterData(userOp, {
  community: "your-community",
});

2. x402 Payment Settlement

HTTP 402-based payments for API access and agent services.

// Settle a USDC payment via EIP-3009
const result = await client.settleX402Payment({
  from: payerAddress,
  to: payeeAddress,
  asset: "USDC",
  amount: "1000000", // 1 USDC
  signature: payerSignature,
});

3. Micropayment Channels

Streaming payments with off-chain vouchers and on-chain settlement.

// Open a payment channel
const channel = await client.openChannel({
  recipient: serviceAddress,
  token: "USDC",
  totalDeposit: "10000000", // 10 USDC
  duration: 3600, // 1 hour
});

// Sign a micropayment voucher (off-chain, instant)
const voucher = await client.signVoucher(channel.id, "100000"); // 0.1 USDC

4. Agent Identity (ERC-8004)

Register and verify agent identity for reputation-based sponsorship.

// Check agent registration
const isAgent = await client.isRegisteredAgent(agentAddress);

// Get sponsorship rate for an agent
const rate = await client.getAgentSponsorshipRate(agentAddress, operatorAddress);

Resources

Contract Addresses (Sepolia)

  • SuperPaymaster: 0x829C3178DeF488C2dB65207B4225e18824696860
  • MicroPaymentChannel: 0x5753e9675f68221cA901e495C1696e33F552ea36
  • aPNTs Token: 0xEA4b9d046285DC21484174C36BbFb58015Ad5E1f

API Endpoints

  • GET /health — Operator status
  • POST /verify — Verify payment signature (~100ms)
  • POST /settle — Execute on-chain settlement
  • GET /quote — Fee rate and supported assets
  • GET /.well-known/x-payment-info — x402 discovery

Documentation

Categories