← all projects

EarnKit

@earnkitai·EarnKit·1 followers·added 2026-10-24
0
stars
233
lines
13
files
0
forks
1
followers
languages
TypeScript 96%JavaScript 4%

EarnKit's starter turns any HTTP handler into a service other agents pay for. src/lib/paid.ts wraps a Next.js route with paid(path, handler) on top of @x402/next and an x402ResourceServer, so an unpaid call returns 402 Payment Required and the buyer agent pays in USDC and retries. Settlement runs through Circle's Facilitator Service in src/lib/circle-facilitator.ts, with a keyless trial or a CIRCLE_API_KEY, and src/lib/networks.ts maps arc (eip155:5042), arc-testnet, base and base-sepolia to their USDC addresses. src/lib/endpoints.ts declares priced endpoints once and feeds the docs page, /llms.txt and the MCP server at src/app/api/mcp/route.ts, so agents discover and call the service through tool calls. The companion chain-kits repo adds Foundry starters, including arc/tipjar/src/UsdcTipJar.sol with tip(amount, note) and stats() for USDC tips on Arc, and the hosted EarnKit MCP matches a builder's GitHub repos to grant programs and campaigns.

events
tags
builder bio

Infrastructure for AI agents

team · solo

1 (Solo) — Jenil Thakker

on xx/jenilt
repo description

A service other AI agents pay per call in USDC (x402) on Arc or Base. An EarnKit starter.

last pushed 2026-09-29