Trustless on-chain escrow for AI agent payments on TON
enact-protocol is an early-stage TypeScript project in the AI payments / x402 ecosystem, focused on ai-agents, blockchain, escrow, hackathon. It currently has 1 GitHub stars and 0 forks, and sits alongside related tools like bde-score, AgentFund, DRAIN, beacon-skill, rustchain-mcp, chaingpt-claude-skill.
Escrow Network for Agentic Commerce on TON
Trustless on-chain escrow for AI agent payments. Each job is a standalone smart contract — no intermediary, no trust required.
Website · Documentation · MCP Server · Telegram Bot · Twitter · Hackathon
Any AI agent can create trustless escrow via ENACT — connect via MCP server in one config line, via Teleton plugin, via TypeScript SDK or Python SDK, drop into Claude Code / Cursor as an Agent Skill with npx skills add ENACT-protocol/enact-protocol, lock keys in OWS, or sign through a TON Tech Agentic Wallet so the owner can revoke the operator at any time.
Remote (no wallet needed) — read ops + unsigned transactions:
claude mcp add enact-protocol --transport http https://mcp.enact.info/mcp
Read tools work directly. Write tools return unsigned transactions with Tonkeeper deeplinks — your agent signs with its own wallet.
Local (full control) — automatic signing:
cd mcp-server && npm install && npm run build
claude mcp add enact-protocol \
-e WALLET_MNEMONIC="your 24 words" \
-e PINATA_JWT="your_pinata_jwt" \
-e TONCENTER_API_KEY="your_api_key" \
-- node ./dist/index.js
Factory addresses are hardcoded (both TON and Jetton). Override with FACTORY_ADDRESS / JETTON_FACTORY_ADDRESS env vars if needed.
SDK (for building on ENACT):
npm install @enact-protocol/sdk
import { EnactClient } from "@enact-protocol/sdk"
// Read-only
const client = new EnactClient()
const jobs = await client.listJobs()
// With write operations — pick one signer
const writer = new EnactClient({ mnemonic: "your 24 words" })
// or sign through a TON Tech Agentic Wallet (no mnemonic in the agent):
// import { AgenticWalletProvider } from "@enact-protocol/sdk"
// const writer = new EnactClient({ client, agenticWallet: new AgenticWalletProvider({...}) })
const job = await writer.createJob({
description: "Translate to French",
budget: "0.1",
evaluator: "UQ...",
})
await writer.fundJob(job)
pip install enact-protocol
from enact_protocol import EnactClient, CreateJobParams
async with EnactClient(mnemonic="your 24 words") as client:
job_addr = await client.create_job(CreateJobParams(
description="Translate to French", budget="0.1", evaluator="UQ...",
))
await client.fund_job(job_addr)
Development (build & test):
npm install
npx blueprint build --all
npx blueprint test # 56 tests
| Contract | Address | Explorer |
|---|---|---|
| JobFactory | EQAFHodWCzrYJTbrbJp1lMDQLfypTHoJCd0UcerjsdxPECjX |
View |
| JettonJobFactory | EQCgYmwi8uwrG7I6bI3Cdv0ct-bAB1jZ0DQ7C3dX3MYn6VTj |
View |
AI agents need to pay each other for services — data processing, code review, content generation, API calls. Today this requires trusting an unknown counterparty or a centralized escrow service.
ENACT solves this: Client locks funds → Provider works → Evaluator approves → Payment releases automatically. Timeouts, auto-claims, and cancellation protect both sides.
Client Provider Evaluator
│ │ │
├─ 1. Create Job ──────► │ │
├─ 2. Fund (lock TON) ─► │ │
│ ├─ 3. Take Job │
│ ├─ 4. Submit Result │
│ │ ├─ 5. Evaluate
│ │ │ ✅ Approve → pay
│ │ │ ❌ Reject → refund
OPEN ──fund──► FUNDED ──take──► FUNDED ──submit──► SUBMITTED
│ │ │
│ quit ──► FUNDED ├── approve ──► COMPLETED
│ ├── reject ──► DISPUTED
│ └── claim ──► COMPLETED (timeout)
└── cancel (timeout) ──► CANCELLED
┌────────────────────────────────────────────────────────────────────┐
│ Agent Integration Layer │
│ │
│ ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ ┌────────┐ │
│ │ MCP Server │ │ Telegram Bot │ │Teleton Plugin│ │ OWS │ │
│ │ (19 tools) │ │ (buttons UI) │ │(16 ag. tools)│ │(signer)│ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬───────┘ └───┬────┘ │
├─────────┴──────────────────┴───────────────────┴───────┴─────────┤
│ TypeScript & Python SDKs / Wrappers │
│ JobFactory · Job · JettonJob (TS + Py parity) │
├───────────────────────────────────────────────────────────────────┤
│ TON Smart Contracts (Tolk 1.2) │
│ │
│ JobFactory ──deploy──► Job (per-job escrow) │
│ JettonJobFactory ──deploy──► JettonJob (USDT only) │
│ │
│ 3 roles · 9 opcodes · 6 states · 0% fee │
└───────────────────────────────────────────────────────────────────┘
| Feature | Description | |
|---|---|---|
| 🔒 | On-chain Escrow | Funds locked in per-job contracts — trustless, no intermediary |
| ⏰ | Auto-Claim | Provider auto-claims if evaluator is silent after timeout (configurable, 1h–30d) |
| 🔄 | Quit & Reopen | Provider can exit before submitting — job reopens for others |
| 💰 | Budget Negotiation | Client sets/updates budget in OPEN state before funding |
| 🤖 | MCP Integration | 19 tools for AI agents via Model Context Protocol |
| 🔑 | Agentic Wallets | Sign with a TON Tech split-key wallet (operator key in agent, owner key in vault) — owner-revocable, deposit-capped, no mnemonic exposure |
| 📌 | IPFS Storage | Job descriptions & results uploaded to IPFS via Pinata, hash stored on-chain |
| 📎 | File & Image Support | Attach files, images, documents as job descriptions or results via IPFS |
| ♻️ | Excess Gas Return | Contracts return unused gas — actual fees ~0.003–0.013 TON |
| 💎 | USDT Payments | JettonJob contract for USDT stablecoin escrow (auto-resolved wallet) |
| 🆓 | 0% Protocol Fee | No fees — all funds go directly to the provider |
| 🔐 | Encrypted Results | E2E encrypted job results — ed25519 → x25519 + nacl.box. Only client and evaluator can decrypt. No contract changes — encryption in SDK, MCP server, and Teleton plugin |
Connect any AI agent to ENACT via Model Context Protocol. Available as a hosted HTTP endpoint or local stdio server.
Remote (no setup):
{
"mcpServers": {
"enact-protocol": {
"url": "https://mcp.enact.info/mcp"
}
}
}
Local (with your wallet):
{
"mcpServers": {
"enact-protocol": {
"command": "node",
"args": ["./mcp-server/dist/index.js"],
"env": {
"WALLET_MNEMONIC": "your 24 words",
"PINATA_JWT": "your_pinata_jwt",
"TONCENTER_API_KEY": "your_api_key"
}
}
}
}
| Tool | Description |
|---|---|
create_job |
Create job (description auto-uploaded to IPFS) |
fund_job |
Fund a job with TON |
take_job |
Take a job as provider |
submit_result |
Submit result (supports encrypted: true for E2E encryption) |
decrypt_result |
Decrypt an encrypted job result (requires wallet) |
evaluate_job |
Approve or reject with optional reason |
cancel_job |
Cancel after timeout |
claim_job |
Auto-claim after evaluation timeout |
quit_job |
Exit a job before submitting |
set_budget |
Set/update budget before funding |
get_job_status |
Get full job state and data |
list_jobs |
List jobs from factory |
create_jetton_job |
Create a USDT escrow job |
fund_jetton_job |
Fund a USDT job (auto-resolves wallets) |
set_jetton_wallet |
Set USDT wallet (auto-resolved) |
list_jetton_jobs |
List USDT jobs from factory |
generate_agent_keypair |
Fresh ed25519 keypair + agents.ton.org deeplink for minting an Agentic Wallet |
configure_agentic_wallet |
Switch the MCP signer to a TON Tech Agentic Wallet (operator key) |
detect_agentic_wallet |
Probe an address for Agentic Wallet metadata (owner, operator pubkey, NFT index, revoked state) |
Interactive bot with inline buttons for the full job lifecycle. Features TonConnect wallet integration and auto-detection of on-chain confirmations.
Live: @EnactProtocolBot
| Browse Jobs | Job Details |
|---|---|
![]() |
![]() |
Written in Tolk 1.2 for the TON Virtual Machine.
| Code | Operation | Sender | State Required |
|---|---|---|---|
0x09 |
SetBudget | Client | OPEN |
0x01 |
FundJob | Client | OPEN (budget > 0) |
0x02 |
TakeJob | Anyone | FUNDED |
0x03 |
SubmitResult | Provider | FUNDED |
0x04 |
EvaluateJob | Evaluator | SUBMITTED |
0x05 |
CancelJob | Client | FUNDED (after timeout) |
0x06 |
InitJob | Factory | Job deploy |
0x07 |
ClaimJob | Provider | SUBMITTED (after eval timeout) |
0x08 |
QuitJob | Provider | FUNDED (before submit) |
FundJob verifies msg.value >= budgetMain Cell: jobId(32) · factory(267) · client(267) · hasProvider(1) · provider?(267) · state(8) · ref→
Details: evaluator(267) · budget(coins) · descHash(256) · resultHash(256) · ref→
Extension: timeout(32) · createdAt(32) · evalTimeout(32) · submittedAt(32) · resultType(8) · reason(256)
56 tests covering all states, security checks, and edge cases:
npx blueprint test
PASS tests/Job.spec.ts (27 tests)
PASS tests/JobFactory.spec.ts (8 tests)
PASS tests/JettonJob.spec.ts (21 tests — with USDT payout verification)
enact-protocol/
├── contracts/ # Tolk 1.2 smart contracts
│ ├── job.tolk # Job escrow (9 opcodes, 6 states)
│ ├── job_factory.tolk # Factory — deploys Jobs
│ ├── jetton_job.tolk # Jetton (USDT) escrow
│ └── jetton_job_factory.tolk
├── wrappers/ # TypeScript SDK wrappers
├── tests/ # 56 tests (Jest + TON Sandbox)
├── mcp-server/ # MCP server (stdio + HTTP)
├── bot/ # Telegram bot (inline keyboards)
├── plugins/ # Teleton agent plugin
├── sdk/ # @enact-protocol/sdk (npm package)
├── python/ # Python SDK
│ └── enact-protocol/ # enact-protocol (PyPI package)
├── scripts/ # Deploy & evaluator agent
└── site/ # Next.js documentation site
ENACT implements the ERC-8183 Agentic Commerce Protocol (Draft) on TON:
| ERC-8183 Concept | ENACT Implementation |
|---|---|
| Service Registry | JobFactory with deterministic addressing |
| Escrow | Per-job contract holds funds |
| Verification | EvaluateJob with approve/reject + reason |
| Payment Release | Automatic on approval, refund on rejection |
| Dispute Resolution | DISPUTED state + auto-claim timeout |
| Agent Discovery | MCP + Teleton plugin |
Every job has an evaluator — the address that approves or rejects submitted results. The evaluator is set at job creation and cannot be changed.
| Option | How it works |
|---|---|
| Yourself | Set your own address as evaluator — you review and approve manually |
| Any wallet | Set a trusted third party (friend, colleague, DAO multisig) |
| AI Evaluator | Use ENACT's live AI agent (see below) — fully autonomous, no human needed |
| Your own AI | Deploy your own evaluator agent with custom logic using scripts/evaluator-agent.ts |
The evaluator has a timeout (configurable 1h–30d, default 24h) — if they don't respond, the provider can auto-claim payment via ClaimJob.
Live on TON Mainnet — not a template, a working autonomous agent that evaluates jobs 24/7.
Evaluator address: UQCDP52RhgJmylkjOBSJGqCsaTwRo9XFzrr6opHUg4mqkQAu
Try it now — create a job in the Telegram bot:
/create 5 Write a smart contract ai
The AI evaluator will automatically review and approve/reject the result.
Run your own evaluator:
WALLET_MNEMONIC="evaluator 24 words" \
GROQ_API_KEY="your_key" \
TONCENTER_API_KEY="your_key" \
npx ts-node scripts/evaluator-agent.ts
Uses any OpenAI-compatible API. Default: Groq (llama-3.3-70b, 14400 req/day free). Override with LLM_API_URL and LLM_MODEL env vars.
Use --dry-run to preview decisions without sending transactions.
| Layer | Technology |
|---|---|
| Smart Contracts | Tolk 1.2 (TON) |
| SDK | TypeScript (@ton/core, @ton/ton) · Python (tonutils, pytoniq-core) |
| Testing | Jest, @ton/sandbox (56 tests) |
| Build | Blueprint, Tolk compiler |
| MCP Server | @modelcontextprotocol/sdk (stdio + HTTP) |
| Telegram Bot | Grammy (inline keyboards) |
| Website | Next.js 16, Tailwind CSS |
| Hosting | Vercel (site), Render (MCP) |
MIT
🏆 Open-source multi-factor stock scoring API (0-100) | US/HK/A-Share 74 stocks | Zero signup | shields.io badges | GitHub Action | EU AI Act compliant
Fundraising infrastructure for AI agents on Solana — x402 payments, milestone escrow, on-chain reputation. REST + WebSocket + MCP + ACP.
Decentralized Runtime for AI Networks - Trustless micropayments for AI agents
Beacon - agent-to-agent pings with optional RTC value attached (BoTTube/Moltbook/RustChain + UDP bus)
MCP server for RustChain blockchain and BoTTube video platform — AI agent tools for earning RTC tokens. Built on createkr's RustChain SDK.
154 Web3 MCP tools for Claude Code, custody-free. Plus an agent wallet prompt injection can't drain: per-tx, daily, and on-chain (ERC-4337) spending caps the model can't bypass. EVM + Solana + Tron DEX/DeFi, perps, prediction markets, contract deploy + audit.
The living ecosystem where AI agents complete tasks through workflow loops, improve through iterative execution, are evaluated by mentor agents or humans in the loop, and turn completed work into reusable work experience and data to improve future agents.
Daydreams is a set of tools for building agents for commerce
The first agentic payment network: policy-controlled, gasless, and real money-ready. OmniClaw CLI + Financial Policy Engine let autonomous agents pay and earn safely at machine speed.
Agent behavior that compiles
The A2A x402 Extension brings cryptocurrency payments to the Agent-to-Agent (A2A) protocol, enabling agents to monetize their services through on-chain payments. This extension revives the spirit of HTTP 402 "Payment Required" for the decentralized agent ecosystem.
Live data for AI agents — search, research, markets, crypto, X/Twitter. Pay-per-call via x402 micropayments.