-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathpage.tsx
More file actions
51 lines (49 loc) · 1.51 KB
/
Copy pathpage.tsx
File metadata and controls
51 lines (49 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
export const metadata = {
title: "Docs — StableRoute",
description: "Short reference for the StableRoute HTTP API common endpoints.",
};
const sections = [
{
h: "POST /api/v1/pairs",
p: "Register a (source, destination) routing pair. Idempotent.",
},
{ h: "GET /api/v1/pairs", p: "List every registered pair. ETag caching." },
{
h: "PATCH /api/v1/pairs/:src/:dest/fee_bps",
p: "Set the per-pair routing fee in basis points (0..1000).",
},
{
h: "GET /api/v1/quote",
p: "Request a quote for ?source_asset=&dest_asset=&amount=.",
},
{
h: "POST /api/v1/admin/{pause,unpause}",
p: "Operator-only pause / resume flag.",
},
];
export default function DocsPage() {
return (
<main
id="main-content"
tabIndex={-1}
className="mx-auto flex min-h-[60vh] max-w-3xl flex-col gap-6 p-8 focus:outline-none"
>
<h1 className="text-3xl font-semibold tracking-tight">API documentation</h1>
<p className="text-sm text-neutral-600 dark:text-neutral-400">
Companion to{" "}
<a className="underline" href="/api/v1/openapi.json">
GET /api/v1/openapi.json
</a>{" "}
— short prose for the most common endpoints.
</p>
<dl className="space-y-4">
{sections.map((s) => (
<div key={s.h}>
<dt className="font-mono text-sm font-medium">{s.h}</dt>
<dd className="mt-1 text-sm text-neutral-700 dark:text-neutral-300">{s.p}</dd>
</div>
))}
</dl>
</main>
);
}