Machine-readable discovery endpoint for AI agents to find, evaluate, and subscribe to verified Byte Protocol data feeds.
Agents hit /.well-known/byte-protocol.json to bootstrap -- it returns every contract address, endpoint URL, and capability they need. From there, /discover lists all active feeds with pricing, subscriber/message counts, and provenance labels.
The public deployment of this service runs at https://api.payperbyte.io (/discover, /.well-known/byte-protocol.json, /health). Payments settle in USDC on Base mainnet (eip155:8453) via the x402 gateway at https://x402.payperbyte.io. Chain ID 421614 (Arbitrum Sepolia) appears throughout as the frozen EIP-712 attestation/registry namespace -- it is a signing namespace, not the payment rail; see the payment vs attestation blocks in the live /discover response.
Byte Protocol publishers and discovery nodes serve a static JSON file at the well-known path /.well-known/byte-protocol.json. AI agents can fetch this single URL to learn everything about a Byte node:
This gives an agent everything it needs: contract addresses to interact on-chain, REST endpoints for off-chain queries, and access methods (x402 payment gateway, MCP server, indexer).
Health check.
{
"status": "ok",
"service": "byte-discovery-api",
"version": "1.0",
"timestamp": "2025-09-15T12:00:00.000Z"
}Standard discovery file (see above).
List all active data feeds with publisher metadata, pricing, and provenance labels. The response carries two distinct chain blocks: payment (where USDC settles — Base mainnet) and attestation (the frozen EIP-712 signing namespace — chain 421614).
// Abridged from the live response at https://api.payperbyte.io/discover
{
"protocol": "byte",
"version": "1.0",
"chain": "arbitrum-sepolia",
"chainId": 421614,
"payment": {
"network": "eip155:8453",
"chain": "base",
"chainId": 8453,
"asset": "USDC"
},
"attestation": {
"network": "eip155:421614",
"chain": "arbitrum-sepolia",
"chainId": 421614,
"domain": "BYTE Library",
"verifyingContract": "0x44729bB148F46d8Db509E47b0453edc271e06e95"
},
"totalFeeds": 22,
"totalMessages": 44236,
"feeds": [
{
"publisher": "0xa820763c023a929e83c59e4fd5a623e5a8efe941",
"topic": "weather",
"pricePerKB": 3000,
"frequencySeconds": 3600,
"subscribers": 2,
"messages": 680,
"provenance": "eip712-attested",
"onchain": "0xa820763c023a929e83c59e4fd5a623e5a8efe941",
"endpoints": {
"mcp": "byte_buy_data",
"onchain": "0x44729bB148F46d8Db509E47b0453edc271e06e95",
"x402": "https://x402.payperbyte.io/feeds/weather"
}
}
],
"access": {
"x402_gateway": "https://x402.payperbyte.io",
"mcp_server": "https://mcp.payperbyte.io/mcp",
"indexer_api": "https://feeds.payperbyte.io"
}
}Search and filter feeds.
| Query param | Type | Description |
|---|---|---|
q |
string | Full-text search on topic, description, publisher |
minMessages |
number | Minimum message count |
GET /discover/search?q=weather&minMessages=100
{
"protocol": "byte",
"query": { "q": "weather", "minMessages": 100 },
"results": 2,
"feeds": [ ... ]
}Get a single feed by topic name.
GET /discover/weather/us/hourly
Returns the feed object or 404 if not found.
Earlier drafts of this README documented GET /attestations/:publisher and POST /attestations routes for agent-signed publisher ratings. Those routes are not implemented in the current code (src/index.ts) and return 404 on the live deployment -- do not build against them. Payload verification instead uses the EIP-712 PayloadAttestation scheme (domain BYTE Library, chain 421614) described in /discover's attestation block, and each feed carries a provenance label.
git clone https://github.com/0rkz/byte-discovery-api.git
cd byte-discovery-api
npm installCopy the example environment file and edit as needed:
cp .env.example .env| Variable | Default | Description |
|---|---|---|
PORT |
3500 |
HTTP server port |
RPC_URL |
https://sepolia-rollup.arbitrum.io/rpc |
Arbitrum Sepolia JSON-RPC endpoint (registry/attestation chain -- used for on-chain fallback reads, not the payment rail) |
PUBLIC_BASE_URL |
https://api.payperbyte.io |
Public base URL surfaced in /.well-known + /discover |
INDEXER_URL |
https://feeds.payperbyte.io |
Indexer API URL |
MARKETPLACE_URL |
https://www.payperbyte.io |
Marketplace site URL |
X402_GATEWAY |
http://localhost:3402 (local dev) |
x402 payment gateway URL -- the production deploy sets https://x402.payperbyte.io |
# Build
npm run build
# Production
npm start
# Development (ts-node)
npm run devThe API starts on http://localhost:3500 by default (local dev). The public deployment of this service is served at https://api.payperbyte.io.
The Discovery API aggregates data from two sources:
- Byte Indexer (preferred) -- queries the indexer API for a list of registered publishers and their metadata.
- On-chain fallback -- if the indexer is unavailable, enumerates publishers directly from the
DataRegistrycontract on Arbitrum Sepolia.
Each feed is enriched with:
- Subscriber and message counts from the indexer (or the on-chain registry on fallback)
- A
provenancelabel (e.g.eip712-attested,first-party) as advertised by the gateway -- a statement of who signed the exact bytes, not of data correctness
MIT