llm-walletManage crypto wallets and make x402 micropayments with USDC stablecoins on Polygon
Install via ClawdBot CLI:
clawdbot install AkshatGada/llm-walletUse llm-wallet commands to manage crypto wallets and make micropayments to paid APIs using USDC stablecoins on Polygon blockchain.
Default Network: Polygon Testnet (polygon-amoy) - safe for testing
Facilitator: https://x402-amoy.polygon.technology
# Create wallet
llm-wallet create
# Check balance
llm-wallet balance
# Set spending limits (recommended)
llm-wallet set-limit --per-tx 0.10 --daily 5.00
# View transaction history
llm-wallet history
llm-wallet create [--label <name>]
Creates a new HD wallet with encryption. Returns wallet address.
Example:
llm-wallet create --label "agent-wallet"
llm-wallet import --private-key <key> [--label <name>]
Import existing wallet from private key.
llm-wallet balance
Shows USDC balance and native token balance on current network.
llm-wallet history
View all transactions and payments made from this wallet.
llm-wallet set-limit --per-tx <amount> --daily <amount>
Set per-transaction and daily spending caps in USDC.
Example:
llm-wallet set-limit --per-tx 0.10 --daily 5.00
llm-wallet get-limits
View current spending limits and daily usage.
llm-wallet pay <url> [--method GET|POST] [--body <json>]
Make x402 micropayment to a paid API endpoint.
⚠️ IMPORTANT: Always ask user for approval before making payments!
Example:
# Ask user: "I need to make a payment to https://api.example.com/weather. Cost: $0.001 USDC. Approve?"
llm-wallet pay "https://api.example.com/weather?location=London"
Workflow:
llm-wallet check-payment llm-wallet pay llm-wallet check-payment <url>
Checks if wallet can afford payment without executing it.
llm-wallet register-api <url> --name <tool_name>
Register a paid API endpoint as a reusable tool.
Example:
llm-wallet register-api "https://api.example.com/weather" --name weather_api
llm-wallet list-apis
Show all registered API tools.
llm-wallet call-api <tool_name> [--params <json>]
Execute a registered API tool. Requires approval if payment needed.
Example:
# Ask user for approval first if cost > 0
llm-wallet call-api weather_api --params '{"location": "London"}'
llm-wallet unregister-api <tool_name>
Remove a registered API tool.
llm-wallet verify-payment --header <x-payment-header> --requirements <json>
Verify incoming payment from a buyer (seller-side).
llm-wallet create-requirements --price <amount> --pay-to <address> --url <resource-url>
Generate payment requirements for a protected resource.
WALLET_ENCRYPTION_KEY - Wallet encryption key (32+ chars, auto-generated if missing)WALLET_NETWORK - Network selection (default: polygon-amoy | polygon)FACILITATOR_URL - Custom facilitator URL (auto-configured)WALLET_MAX_TX_AMOUNT - Per-transaction limit overrideWALLET_DAILY_LIMIT - Daily limit override# 1. Create wallet
llm-wallet create --label "my-agent"
# 2. Set spending limits
llm-wallet set-limit --per-tx 0.10 --daily 5.00
# 3. Check balance (will be 0 initially)
llm-wallet balance
# 4. Fund wallet with testnet USDC
# User needs to: visit https://faucet.polygon.technology/
# 1. Pre-check payment
llm-wallet check-payment "https://api.example.com/weather?location=London"
# 2. Show user: URL, cost estimate, current limits
# 3. Ask user: "Approve payment of $0.001 USDC to https://api.example.com/weather?"
# 4. If approved, execute payment
llm-wallet pay "https://api.example.com/weather?location=London"
# 5. Confirm and show transaction ID
llm-wallet history
# 1. Register the API
llm-wallet register-api "https://api.example.com/translate" --name translate_api
# 2. List available APIs
llm-wallet list-apis
# 3. Call the API (with approval)
llm-wallet call-api translate_api --params '{"text": "hello", "to": "es"}'
# 4. View payment in history
llm-wallet history
See references/ folder for:
x402-protocol.md - x402 payment protocol overviewwallet-setup.md - Detailed wallet setup guideexamples.md - More usage examplesGenerated Mar 1, 2026
AI agents can autonomously pay for premium API services, such as real-time weather data or translation, using micropayments. This enables agents to access paid resources on-demand without requiring manual user intervention for each transaction, streamlining workflows.
Freelancers or gig workers can receive instant payments for small tasks completed through automated systems. For example, a content moderation API could pay reviewers per item processed, reducing payment delays and overhead costs.
Internet of Things devices can make automated payments for services like data storage or energy usage. A smart sensor could pay for cloud analytics in real-time, enabling scalable, pay-per-use models in industrial or smart home settings.
Content creators can monetize digital assets, such as articles or videos, by charging small fees per access via APIs. Users pay only for what they consume, and creators receive instant payments on the Polygon blockchain, bypassing traditional intermediaries.
Businesses in supply chains can automate payments for logistics updates or quality checks. For instance, a shipment tracking service could charge per status query, ensuring transparent and efficient payment flows between partners.
Developers offer APIs that charge small fees per call, with payments handled automatically via this skill. Revenue is generated from transaction fees or subscriptions, enabling scalable monetization of digital services without upfront costs.
A platform integrates this skill to provide payment processing for third-party apps, charging a small percentage on each transaction. It simplifies crypto payments for businesses, attracting users with low-cost, efficient settlement on Polygon.
Companies use this skill to automate internal payments for services like data feeds or software tools. Revenue comes from licensing the integrated solution or consulting fees for customization, improving operational efficiency.
💬 Integration Tip
Start by testing on Polygon Testnet to avoid real costs, and ensure user approval workflows are implemented for all payment commands to maintain security and trust.
Connect Claude to Clawdbot instantly and keep it connected 24/7. Run after setup to link your subscription, then auto-refreshes tokens forever.
ERC-8004 Trustless Agents - Register, discover, and build reputation for AI agents on Ethereum. Use when registering agents on-chain, querying agent registries, giving/receiving reputation feedback, or interacting with the AI agent trust layer.
Autonomous crypto trading on Base via Bankr. Use for trading tokens, monitoring launches, executing strategies, or managing a trading portfolio. Triggers on "trade", "buy", "sell", "launch", "snipe", "profit", "PnL", "portfolio balance", or any crypto trading task on Base.
Deploy ERC20 tokens on Base using Clanker SDK. Create tokens with built-in Uniswap V4 liquidity pools. Supports Base mainnet and Sepolia testnet. Requires PRIVATE_KEY in config.
Query DeFi portfolio data across 50+ chains via Zapper's GraphQL API. Use when the user wants to check wallet balances, DeFi positions, NFT holdings, token prices, or transaction history. Supports Base, Ethereum, Polygon, Arbitrum, Optimism, and more. Requires ZAPPER_API_KEY.
Interact with Solana blockchain via Helius APIs. Create/manage wallets, check balances (SOL + tokens), send transactions, swap tokens via Jupiter, and monitor addresses. Use for any Solana blockchain operation, crypto wallet management, token transfers, DeFi swaps, or portfolio tracking.