MPP (Machine Payments Protocol) streaming payment channels on Avalanche C-Chain
mpp-avalanche is an early-stage HTML project in the AI payments / x402 ecosystem. It currently has 0 GitHub stars and 0 forks.
Machine Payments Protocol (MPP) streaming payment channels deployed on Avalanche C-Chain. Adapted from Tempo's TempoStreamChannel for standard ERC-20 tokens.
| Network | Address | Chain ID |
|---|---|---|
| Mainnet | 0xF1EB69d85897ba945B5E2EbcBAD831bf3671F137 |
43114 |
| Fuji | 0x6e2DD66C1bfb66a2b579D291CdF6EA559E93619b |
43113 |
Payment channels for AI agents and services. Deposit once, sign unlimited off-chain vouchers at zero gas, settle when ready.
Agent (payer) Service (payee)
| |
|-- POST /api/data ------------------>|
|<-- 402 Payment Required ------------|
| |
|-- GET /.well-known/mpp ------------>|
|<-- { payee, price, token } ---------|
| |
| [open channel on-chain, deposit USDC]
| |
|-- POST /api/data + voucher -------->|
|<-- 200 OK + data ------------------|
| |
| (repeat, cumulative amount grows) |
| |
| [service settles on-chain when ready]
contracts/ Solidity smart contracts (Foundry)
src/StreamChannel.sol MPP payment channel (ERC-20 compatible)
test/StreamChannel.t.sol 22 tests
script/DeployStreamChannel.s.sol
mpp-example/ TypeScript agent + service example
src/agent.ts Payer: opens channel, signs vouchers, calls API
src/service.ts Payee: Express server with 402 flow, auto-settles
mpp-site/ Static website with interactive demo
index.html Docs + live API console
app.js Wallet connection, voucher signing, real API calls
cd mpp-example
cp .env.example .env
# Set SERVICE_PRIVATE_KEY in .env
npm install
npm run service
Visit http://localhost:3402 — the service serves the site and the MPP API.
# Set PRIVATE_KEY and PAYEE_ADDRESS in .env
npm run agent
"Tempo Stream Channel" v1 (cross-compatible with Tempo)Each voucher is an EIP-712 signed message: Voucher(bytes32 channelId, uint128 cumulativeAmount). The cumulative amount only goes up — each voucher supersedes the last. The service only needs to settle the final voucher on-chain.
cd contracts
forge install # install forge-std + solady
forge test -vv # 22/22 tests pass
MIT
TypeScript Interface for Machine Payments Protocol
Alephant is an open-source AI Agent Gateway for routing, tracking, and controlling LLM usage across AI agents, members, and workflows, and for publishing agent capabilities as paid endpoints with x402 and MPP payment rails.
Specifications for the Machine Payments Protocol - powered by the "Payment" HTTP authentication scheme
Rust SDK for the Machine Payments Protocol
Website for the Machine Payments Protocol
Building blocks for Agentic payments (x402, MPP, AP2) for TypeScript, Rust, Go, Python, Ruby, PHP, Lua, Kotlin and Swift.