gitmyhub

HyperPay

TypeScript ★ 15 updated 23d ago

Omnichain payments system that allows AI Agents to fund their Hyperliquid margin from anywhere & use that margin to pay for compute and other services.

Payment infrastructure for AI agents to autonomously pay for their own compute costs, handling gasless cross-chain USDC transfers, bridge verification, and deposit funding without human intervention.

TypeScriptUSDCCircle CCTPBaseHyperliquidsetup: hardcomplexity 5/5

HyperPay is payment infrastructure code that was originally built for Cod3x, an AI trading platform, and has been released publicly as open-source. The core problem it solves: AI agents that earn money from trading need a way to automatically pay for the computing power they run on, without a human stepping in to move funds around. HyperPay handles that entire funding loop autonomously.

The system is built around three packages. The first, x402, handles gasless payments using a protocol where the buyer signs an off-chain authorization and a server settles the payment on-chain, meaning the person paying does not need to spend extra funds on network fees. The second, cctp-verify, checks whether a cross-chain transfer has actually arrived at its destination by polling multiple blockchains until it sees the funds appear. The third, funding-pipeline, acts as the coordinator: it watches for USDC deposits across ten different blockchains, bridges them to a central settlement chain, buys compute credits, and deposits into Hyperliquid (a trading platform). If something crashes mid-process, it picks up exactly where it stopped.

The underlying bridge technology is Circle CCTP, a standard that lets USDC move between blockchains by burning it on the source chain and minting it fresh on the destination. The repo currently settles on the Base blockchain but is built to switch to Arc (Circle's own dedicated USDC chain) once that launches on mainnet, which requires only a configuration change.

The README is explicit that this is not a ready-to-install library. It is production code extracted into readable packages with clean interfaces, intended to be read and adapted into your own project rather than imported as a dependency. Everything is MIT licensed. The repo also includes an AGENTS.md file specifically for people using AI coding tools like Claude or Cursor to integrate these packages, which is an unusual and practical touch.

To use it, you clone the repository, install dependencies with npm, and work directly with the three packages under the packages directory. All external provider dependencies (database, wallet infrastructure, RPC endpoints) are defined as interfaces, so you supply your own implementations.

Where it fits