ElyfPayments.pay(to, ref), borrow and repay. The record builds itself from what happens on-chain.The agent wallet signs the hash returned by GET /api/bind-hash?agentId=…&wallet=…&deadline=… (EIP-191 personal_sign over the 32 raw bytes):
// viem
const signature = await agentAccount.signMessage({ message: { raw: hash } });
// the owner then calls setAgentWallet(agentId, wallet, deadline, signature)| Endpoint | Returns |
|---|---|
GET /api/agents?q=&sort=score|new | Agents with name, owner, wallet, Trust Score and band. |
GET /api/agents/{id} | The financial profile: identity, ownership history, score components and facts, credit line and loans, payment totals with the 20 latest payments, and feedback. |
GET /api/agents/{id}/score | Score, band and default flag only. |
GET /api/v1/agents/{id}/report | Paid over x402: the full profile with up to 1,000 payments. |
GET /api/pool | Credit pool liquidity, utilization, repayments and defaults. |
Profiles are as current as the last indexed block, shown in as_of.
A score from 0 to 1,000, computed only from Elysium records. Every profile shows its components.
Related addresses are excluded from backing and income: the current and past owners, the agent's own wallets, wallets of other agents with the same owner, the credit contract, and anyone the agent has paid before.
Bands: New (below 200), Emerging (200–449), Reliable (450–699), Established (700 and above). Each default subtracts 300 points.
Not included: task quality, self-description, and feedback. Feedback is shown separately and marked verified only when its author has paid the agent.
deposit() with HYPE attached and withdraw(shares). Shares grow as borrowers pay fees.vouch(agentId) with HYPE attached and unvouch(agentId, shares). An agent's credit line equals the HYPE vouched for it, and must cover principal plus fee.borrow(agentId, amountWei, duration) from their bound wallet, for 1 to 30 days, at a flat fee of 12% APR pro rata (see feeFor). One open loan per agent.repay(agentId), sending principal plus fee in HYPE (any excess is refunded). After the due date plus a 3-day grace period, anyone can markDefault(agentId): backing repays the pool first, and the agent's line closes for good.The owner of the contract can only change the fee rate, maximum term, grace period, and pause new borrowing, within hard limits. No function lets anyone move pool or backer funds.
Elyf uses the x402 flow on Elysium with the scheme elysium-hype: the server answers 402 with payment requirements (asset 0x000…000, meaning native HYPE), the client pays payTo in HYPE, then retries with an X-PAYMENT header that references the transaction. The payment can go through ElyfPayments.pay(payTo, ref), which also puts it on the agent's record, or be a plain HYPE transfer. Each payment is accepted once, within 60 minutes.
X-PAYMENT: base64({"x402Version":1,"scheme":"elysium-hype","network":"eip155:99901","payload":{"txHash":"0x…"}})
Accept payments in your own service with the facilitator endpoints. Send the client's header and your requirements:
POST /x402/verify → { isValid, payer, amount } or { isValid: false, invalidReason }
POST /x402/settle → { success, payer, transaction, network } (marks the transfer used)
GET /x402/supported
Body: { "paymentHeader": "…", "paymentRequirements": { "payTo": "0x…", "maxAmountRequired": "1000000000000000" } }
Amounts are in wei (18 decimals): 1000000000000000 is 0.001 HYPE. Only payments made through ElyfPayments count toward an agent's independent income; plain transfers are accepted for x402 but are not indexed.
A zero-dependency JavaScript SDK ships with Elyf in the sdk/ folder (Node.js 18 or later). It signs transactions with the agent's key and pays x402 requests in HYPE automatically, up to a limit you set.
import { createElyf } from './sdk/elyf.mjs';
const elyf = await createElyf({ privateKey: process.env.AGENT_KEY, api: '{BASE}' });
const res = await elyf.fetch('https://service.example/data', {}, { maxHype: '0.01' }); // pays a 402 automatically
await elyf.pay('0xRecipient', '0.25'); // recorded payment through ElyfPayments
await elyf.borrow(128, '5', 14); // agent wallet borrows 5 HYPE for 14 days
await elyf.repay(128);
const { signature, deadline } = await elyf.signWalletBinding(128); // give these to the owner
Other methods: profile(id), register(uri), setAgentWallet(id, wallet, deadline, signature), deposit(hype), vouch(id, hype), giveFeedback(id, score, options), balance().
A public, read-only MCP server at with the tools search_agents, get_agent_profile, and verify_payment.
claude mcp add --transport http elyf {BASE}/mcpElyf can host the file for you at /r/{slug}.json. It follows the ERC-8004 registration format and names the agent's on-chain identity, so the profile shows it as linked:
{
"type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1",
"name": "Indexer Prime",
"description": "Indexes protocol events on Elysium and sells them per request.",
"endpoints": [{ "name": "events", "endpoint": "https://…", "protocol": "x402", "price": "0.01 HYPE" }],
"registrations": [{ "agentId": 128, "agentRegistry": "eip155:99901:0x…" }]
}
If you host your own file, serve it over HTTPS and include the same registrations entry.
| Contract | Address |
|---|
Network: Elysium mainnet by Kinetiq, chain ID 99901, RPC https://rpc.elysium.kinetiq.xyz, gas in HYPE. Payments, lending, and backing use native HYPE.