Files
aitbc/website/agent/index.html
aitbc ef94cc6da4
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Successful in 3s
Deploy to Testnet / deploy-testnet (push) Successful in 1m18s
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Documentation Validation / validate-docs (push) Failing after 12s
Documentation Validation / validate-policies-strict (push) Successful in 5s
refactor: remove browser wallet extensions from repository
- Deleted extensions/ directory containing Chrome and Firefox wallet implementations
- Removed aitbc-wallet and aitbc-wallet-firefox subdirectories with all source files
- Removed Firefox .xpi package (v1.0.5)
- Deleted extension documentation (README.md files, API reference, architecture diagrams)
- Removed manifest files, background scripts, content scripts, injected scripts, and popup UI code
- Cleaned up wallet API implementation (connect
2026-05-19 18:08:36 +02:00

357 lines
13 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AITBC Agent API - Machine-Readable Network Interface</title>
<meta name="description" content="Agent-first API for AITBC blockchain network discovery and island management">
<meta name="robots" content="noindex, follow">
<link rel="alternate" type="application/json" href="/agent/discovery.json" title="AITBC Network Discovery">
<style>
:root {
--primary: #2563eb;
--secondary: #7c3aed;
--bg: #0f172a;
--surface: #1e293b;
--text: #f8fafc;
--text-muted: #94a3b8;
--border: #334155;
--success: #10b981;
--warning: #f59e0b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
background: var(--bg);
color: var(--text);
line-height: 1.6;
padding: 2rem;
}
.container { max-width: 900px; margin: 0 auto; }
header { margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
h1 { font-size: 1.5rem; color: var(--primary); margin-bottom: 0.5rem; }
.subtitle { color: var(--text-muted); font-size: 0.9rem; }
.badge {
display: inline-block;
padding: 0.25rem 0.5rem;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 4px;
font-size: 0.75rem;
color: var(--success);
margin-left: 0.5rem;
}
.section { margin: 2rem 0; }
h2 {
font-size: 1.1rem;
color: var(--secondary);
margin-bottom: 1rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.endpoint-grid {
display: grid;
gap: 1rem;
}
.endpoint {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 6px;
padding: 1rem;
}
.endpoint-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.5rem;
}
.method {
background: var(--primary);
color: white;
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-size: 0.75rem;
font-weight: bold;
}
.path {
font-family: monospace;
font-size: 0.9rem;
color: var(--text);
}
.description {
color: var(--text-muted);
font-size: 0.85rem;
margin-top: 0.5rem;
}
.code-block {
background: #000;
border: 1px solid var(--border);
border-radius: 4px;
padding: 1rem;
margin-top: 0.5rem;
overflow-x: auto;
}
code {
font-family: 'Courier New', monospace;
font-size: 0.85rem;
color: #a5b4fc;
}
.copy-btn {
background: var(--surface);
border: 1px solid var(--border);
color: var(--text);
padding: 0.25rem 0.5rem;
border-radius: 4px;
cursor: pointer;
font-size: 0.75rem;
float: right;
}
.copy-btn:hover { background: var(--border); }
.island-status {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
}
.island-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 6px;
padding: 1rem;
}
.island-card h3 {
font-size: 1rem;
color: var(--primary);
margin-bottom: 0.5rem;
}
.status-indicator {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--success);
margin-right: 0.5rem;
}
.footer {
margin-top: 3rem;
padding-top: 1rem;
border-top: 1px solid var(--border);
color: var(--text-muted);
font-size: 0.8rem;
}
a {
color: var(--primary);
text-decoration: none;
}
a:hover { text-decoration: underline; }
.json-link {
display: inline-block;
margin-top: 0.5rem;
font-size: 0.8rem;
}
.note {
background: rgba(37, 99, 235, 0.1);
border-left: 3px solid var(--primary);
padding: 1rem;
margin: 1rem 0;
border-radius: 0 4px 4px 0;
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>AITBC Agent API <span class="badge">v1.0</span></h1>
<p class="subtitle">Machine-readable network interface for autonomous agents</p>
</header>
<div class="note">
<strong>Agent-First Design:</strong> This page provides human-readable documentation, but all endpoints return structured JSON for programmatic consumption. Start with <a href="/agent/discovery.json">/agent/discovery.json</a> for complete network information.
</div>
<section class="section">
<h2>Network Status</h2>
<div class="island-status">
<div class="island-card">
<h3>AIT Mainnet</h3>
<p><span class="status-indicator"></span>active</p>
<p class="description">Island: ait-mainnet-island</p>
<p class="description">Role: Hub (Block Production)</p>
</div>
<div class="island-card">
<h3>AIT Testnet</h3>
<p><span class="status-indicator"></span>active</p>
<p class="description">Island: ait-testnet-island</p>
<p class="description">Role: Follower (Syncing)</p>
</div>
</div>
</section>
<section class="section">
<h2>Agent Discovery</h2>
<div class="endpoint-grid">
<div class="endpoint">
<div class="endpoint-header">
<span class="path">/agent/discovery.json</span>
<span class="method">GET</span>
</div>
<p class="description">Complete network discovery - returns all islands, endpoints, and this node's role. <strong>Start here.</strong></p>
<a href="/agent/discovery.json" class="json-link">View JSON →</a>
</div>
</div>
</section>
<section class="section">
<h2>Island Management</h2>
<div class="endpoint-grid">
<div class="endpoint">
<div class="endpoint-header">
<span class="path">/agent/islands.json</span>
<span class="method">GET</span>
</div>
<p class="description">List all islands with current status, endpoints, and this node's role in each island.</p>
<a href="/agent/islands.json" class="json-link">View JSON →</a>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="path">/rpc/islands</span>
<span class="method">GET</span>
</div>
<p class="description">Live island memberships from IslandManager (includes peer counts, roles, status).</p>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="path">/rpc/islands/{island_id}</span>
<span class="method">GET</span>
</div>
<p class="description">Detailed information about a specific island.</p>
</div>
</div>
</section>
<section class="section">
<h2>Chain Information</h2>
<div class="endpoint-grid">
<div class="endpoint">
<div class="endpoint-header">
<span class="path">/agent/chains.json</span>
<span class="method">GET</span>
</div>
<p class="description">All chains with configuration, endpoints, and join information.</p>
<a href="/agent/chains.json" class="json-link">View JSON →</a>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="path">/rpc/head</span>
<span class="method">GET</span>
</div>
<p class="description">Current head block (height, hash, timestamp).</p>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="path">/rpc/info</span>
<span class="method">GET</span>
</div>
<p class="description">Chain information (chain_id, network_id, consensus).</p>
</div>
</div>
</section>
<section class="section">
<h2>Join Network</h2>
<div class="endpoint-grid">
<div class="endpoint">
<div class="endpoint-header">
<span class="path">/agent/join/ait-mainnet.json</span>
<span class="method">GET</span>
</div>
<p class="description">Complete join instructions for ait-mainnet: configuration templates, P2P peers, RPC endpoints.</p>
<a href="/agent/join/ait-mainnet.json" class="json-link">View JSON →</a>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="path">/agent/join/ait-testnet.json</span>
<span class="method">GET</span>
</div>
<p class="description">Complete join instructions for ait-testnet.</p>
<a href="/agent/join/ait-testnet.json" class="json-link">View JSON →</a>
</div>
</div>
</section>
<section class="section">
<h2>API Documentation</h2>
<div class="endpoint-grid">
<div class="endpoint">
<div class="endpoint-header">
<span class="path">/agent/openapi.json</span>
<span class="method">GET</span>
</div>
<p class="description">OpenAPI 3.0 specification for all RPC and agent endpoints.</p>
<a href="/agent/openapi.json" class="json-link">View JSON →</a>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="path">/agent/health</span>
<span class="method">GET</span>
</div>
<p class="description">Health check endpoint for monitoring.</p>
<a href="/agent/health" class="json-link">View JSON →</a>
</div>
</div>
</section>
<section class="section">
<h2>Quick Start for Agents</h2>
<div class="code-block">
<button class="copy-btn" onclick="navigator.clipboard.writeText(this.nextElementSibling.innerText)">Copy</button>
<code># 1. Discover network
curl -s http://aitbc:8006/agent/discovery.json | jq .
# 2. Get island information
curl -s http://aitbc:8006/agent/islands.json | jq '.islands[]'
# 3. Join ait-mainnet (get configuration)
curl -s http://aitbc:8006/agent/join/ait-mainnet.json | jq '.how_to_join'
# 4. Check chain head
curl -s http://aitbc:8006/rpc/head | jq .</code>
</div>
</section>
<section class="section">
<h2>Key Configuration Values</h2>
<div class="code-block">
<button class="copy-btn" onclick="navigator.clipboard.writeText(this.nextElementSibling.innerText)">Copy</button>
<code>{
"p2p": {
"port": 7070,
"peers": ["aitbc:7070", "aitbc1:7070"]
},
"rpc": {
"aitbc": "http://aitbc:8006",
"aitbc1": "http://aitbc1:8006"
},
"islands": [
{
"id": "ait-mainnet-island",
"chain": "ait-mainnet",
"hub": "aitbc"
},
{
"id": "ait-testnet-island",
"chain": "ait-testnet",
"hub": "aitbc1"
}
]
}</code>
</div>
</section>
<footer class="footer">
<p>AITBC Network • Agent-First Architecture</p>
<p>Node ID: aitbc | Role: Hub | <a href="/">Human Interface →</a></p>
</footer>
</div>
</body>
</html>