superpaymasterlisted
Install: claude install-skill AAStarCommunity/SuperPaymaster
# 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
```bash
pnpm add @superpaymaster/sdk
```
```typescript
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.
```typescript
// 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.
```typescript
// 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.
```typescript
// Open a payment channel
const channel = await client.openChannel({
recipient: serviceAddress,
token: "USDC",
totalDeposit: "10000000", // 10 USDC
duration: 3600, // 1 hour
});
// Sign a