Loops HouseTollgate

NEAR HACKATHON (Test)
Links
Team
1 member- MAOwner
Matthew Busel
Overview
Problem: AI agents that pay per API call over HTTP 402 either rely on a custodial tab or send one on-chain transfer per request, which is slow (about 2 s) and costs more in fees than a fraction-of-a-cent data call. Tollgate gives each agent and seller a unidirectional payment channel on NEAR. The agent locks a budget once with open_channel; every call is then paid with an off-chain ed25519-signed voucher (domain-separated: contract, channel, cumulative amount, nonce) that the seller verifies in about 160 microseconds; the seller settles the newest voucher in one transaction whenever it likes. The Rust contract (near-sdk 5) verifies voucher signatures on chain with env::ed25519_verify, rejects replays, forged amounts and overspends, and lets the agent close unilaterally with a dispute window and a refund. Includes a seller SDK that turns any endpoint into an x402-style 402 offer (scheme near-channel), a demo API selling live USGS, CFPB and SEC EDGAR data (hosted at https://near-tollgate.vercel.app), and an agent client, CLI and MCP server with a budget, per-call price cap and receipt log. Measured on testnet: 200 paid calls, zero per-call transactions, one settlement, 27.7x less gas than 200 transfers, 7 ms vs about 2 s per payment. 18 Rust and 22 Node tests. Built by Matthew Busel (Tensorust LLC). Second project by the same author: Leash (https://github.com/Mattbusel/leash).