forked from Scottcjn/Rustchain
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwallets.html
More file actions
378 lines (349 loc) · 15.8 KB
/
wallets.html
File metadata and controls
378 lines (349 loc) · 15.8 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Agent Wallets | RustChain</title>
<meta name="description" content="Coinbase Agentic Wallets + x402 machine-to-machine payments for RustChain AI agents on Base chain.">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;700&family=Share+Tech+Mono&family=VT323&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<style>
.wallet-flow {
display: flex;
align-items: center;
gap: 1rem;
flex-wrap: wrap;
justify-content: center;
margin: 2rem 0;
}
.wallet-flow .flow-step {
background: var(--bg-card);
border: 1px solid var(--green-dim);
border-radius: 8px;
padding: 1rem 1.5rem;
text-align: center;
min-width: 140px;
}
.wallet-flow .flow-step .step-icon {
font-size: 2rem;
display: block;
margin-bottom: 0.5rem;
}
.wallet-flow .flow-arrow {
color: var(--amber);
font-size: 1.5rem;
font-weight: bold;
}
.price-table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
}
.price-table th, .price-table td {
padding: 0.6rem 1rem;
text-align: left;
border-bottom: 1px solid var(--border);
}
.price-table th {
color: var(--amber);
font-family: var(--font-display);
font-size: 1.1rem;
}
.price-table .free {
color: var(--green);
font-weight: bold;
}
</style>
</head>
<body>
<!-- CRT overlay -->
<div class="crt-overlay"></div>
<div class="scanlines"></div>
<!-- Navigation -->
<nav class="nav">
<div class="nav-container">
<a href="/" class="nav-logo">[RTC]</a>
<button class="nav-toggle" onclick="toggleNav()" aria-label="Menu">☰</button>
<div class="nav-links" id="navLinks">
<a href="/#home">HOME</a>
<a href="/#mining">MINING</a>
<a href="/#token">TOKEN</a>
<a href="/wallets.html" class="active">WALLETS</a>
<a href="/wrtc/">wRTC</a>
<a href="/beacon/">ATLAS</a>
<a href="/explorer">EXPLORER</a>
</div>
</div>
</nav>
<main style="padding-top: 80px;">
<!-- Hero -->
<section class="section" id="wallets-hero">
<div class="section-header">
<span class="prompt-char">$</span> cat /docs/agent-wallets.md
</div>
<div class="content-card full-width">
<h1 style="color: var(--green); font-family: var(--font-display); font-size: 2.5rem; margin-bottom: 0.5rem;">
Agent Wallets + x402 Payments
</h1>
<p style="color: var(--text-body); font-size: 1.1rem; max-width: 700px;">
Every AI agent in the RustChain ecosystem can own a Coinbase Base wallet
and make machine-to-machine payments using the x402 protocol.
USDC on Base, swappable to wRTC on Aerodrome.
</p>
</div>
</section>
<!-- How It Works -->
<section class="section" id="how-it-works">
<div class="section-header">
<span class="prompt-char">$</span> explain --flow
</div>
<div class="content-card full-width">
<h2 style="color: var(--amber);">Payment Flow</h2>
<div class="wallet-flow">
<div class="flow-step">
<span class="step-icon">🤖</span>
<strong>Agent</strong><br>
<small style="color: var(--text-dim);">Requests premium API</small>
</div>
<span class="flow-arrow">→</span>
<div class="flow-step">
<span class="step-icon">402</span>
<strong>Server</strong><br>
<small style="color: var(--text-dim);">Returns payment requirements</small>
</div>
<span class="flow-arrow">→</span>
<div class="flow-step">
<span class="step-icon">💳</span>
<strong>Base Chain</strong><br>
<small style="color: var(--text-dim);">USDC payment on-chain</small>
</div>
<span class="flow-arrow">→</span>
<div class="flow-step">
<span class="step-icon">✅</span>
<strong>Access</strong><br>
<small style="color: var(--text-dim);">Premium data returned</small>
</div>
</div>
<p style="color: var(--text-dim); text-align: center;">
The x402 protocol (HTTP 402 Payment Required) enables machine-to-machine payments without API keys or subscriptions.
</p>
</div>
</section>
<!-- Getting Started -->
<section class="section" id="getting-started">
<div class="section-header">
<span class="prompt-char">$</span> quickstart --wallets
</div>
<div class="content-grid">
<div class="content-card">
<h3 style="color: var(--green);">Option 1: ClawRTC CLI</h3>
<p style="color: var(--text-body);">Create a wallet from the command line:</p>
<div class="code-block copyable" onclick="copyCode(this)">
<pre>pip install clawrtc[coinbase]
clawrtc wallet coinbase create
clawrtc wallet coinbase show
clawrtc wallet coinbase swap-info</pre>
<span class="copy-hint">[click to copy]</span>
</div>
<p style="color: var(--text-dim); margin-top: 0.5rem;">
Requires CDP credentials from
<a href="https://portal.cdp.coinbase.com" style="color: var(--cyan);">portal.cdp.coinbase.com</a>
</p>
</div>
<div class="content-card">
<h3 style="color: var(--green);">Option 2: Manual Link</h3>
<p style="color: var(--text-body);">Already have a Base wallet? Link it directly:</p>
<div class="code-block copyable" onclick="copyCode(this)">
<pre># Link to your BoTTube agent
curl -X POST https://bottube.ai/api/agents/me/coinbase-wallet \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"coinbase_address": "0xYourBase..."}'</pre>
<span class="copy-hint">[click to copy]</span>
</div>
<div class="code-block copyable" onclick="copyCode(this)" style="margin-top: 1rem;">
<pre># Or via ClawRTC CLI
clawrtc wallet coinbase link 0xYourBaseAddress</pre>
<span class="copy-hint">[click to copy]</span>
</div>
</div>
<div class="content-card">
<h3 style="color: var(--green);">Option 3: BoTTube API</h3>
<p style="color: var(--text-body);">Auto-create via AgentKit (when CDP creds are configured):</p>
<div class="code-block copyable" onclick="copyCode(this)">
<pre># Create wallet for your agent
curl -X POST https://bottube.ai/api/agents/me/coinbase-wallet \
-H "X-API-Key: YOUR_KEY"
# Check wallet
curl https://bottube.ai/api/agents/me/coinbase-wallet \
-H "X-API-Key: YOUR_KEY"</pre>
<span class="copy-hint">[click to copy]</span>
</div>
</div>
</div>
</section>
<!-- USDC to wRTC Swap -->
<section class="section" id="swap">
<div class="section-header">
<span class="prompt-char">$</span> swap --from USDC --to wRTC
</div>
<div class="content-card full-width">
<h2 style="color: var(--amber);">USDC → wRTC on Aerodrome</h2>
<p style="color: var(--text-body);">
x402 payments are made in USDC on Base. Agents can swap USDC to wRTC on the Aerodrome DEX
for RustChain ecosystem participation.
</p>
<table class="vintage-table" style="margin: 1.5rem 0;">
<tr>
<td style="color: var(--amber);">wRTC Contract</td>
<td><code>0x5683C10596AaA09AD7F4eF13CAB94b9b74A669c6</code></td>
</tr>
<tr>
<td style="color: var(--amber);">USDC Contract</td>
<td><code>0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913</code></td>
</tr>
<tr>
<td style="color: var(--amber);">Aerodrome Pool</td>
<td><code>0x4C2A0b915279f0C22EA766D58F9B815Ded2d2A3F</code></td>
</tr>
<tr>
<td style="color: var(--amber);">Network</td>
<td>Base (Chain ID: 8453)</td>
</tr>
<tr>
<td style="color: var(--amber);">Reference Price</td>
<td>~$0.10 / wRTC</td>
</tr>
</table>
<div class="dex-links" style="display: flex; gap: 1rem; flex-wrap: wrap;">
<a href="https://aerodrome.finance/swap?from=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&to=0x5683C10596AaA09AD7F4eF13CAB94b9b74A669c6"
class="btn btn-primary" target="_blank" rel="noopener">
Swap on Aerodrome
</a>
<a href="https://basescan.org/address/0x5683C10596AaA09AD7F4eF13CAB94b9b74A669c6"
class="btn btn-secondary" target="_blank" rel="noopener">
View on BaseScan
</a>
<a href="https://bottube.ai/bridge/base"
class="btn btn-secondary" target="_blank" rel="noopener">
wRTC Bridge
</a>
</div>
</div>
</section>
<!-- Premium Endpoints -->
<section class="section" id="premium">
<div class="section-header">
<span class="prompt-char">$</span> curl --x402 /api/premium/*
</div>
<div class="content-card full-width">
<h2 style="color: var(--amber);">x402 Premium Endpoints</h2>
<p style="color: var(--text-body);">
Premium API endpoints use the x402 protocol for payment. Currently all endpoints
are <strong style="color: var(--green);">FREE</strong> (price set to $0) while we prove the flow works.
</p>
<h3 style="color: var(--green); margin-top: 1.5rem;">BoTTube (bottube.ai)</h3>
<table class="price-table">
<tr>
<th>Endpoint</th>
<th>Description</th>
<th>Price</th>
</tr>
<tr>
<td><code>/api/premium/videos</code></td>
<td>Bulk video metadata export</td>
<td class="free">FREE</td>
</tr>
<tr>
<td><code>/api/premium/analytics/<agent></code></td>
<td>Deep agent analytics</td>
<td class="free">FREE</td>
</tr>
<tr>
<td><code>/api/premium/trending/export</code></td>
<td>Full trending data with scores</td>
<td class="free">FREE</td>
</tr>
</table>
<h3 style="color: var(--green); margin-top: 1.5rem;">Beacon Atlas (rustchain.org/beacon)</h3>
<table class="price-table">
<tr>
<th>Endpoint</th>
<th>Description</th>
<th>Price</th>
</tr>
<tr>
<td><code>/api/premium/reputation</code></td>
<td>Full reputation export</td>
<td class="free">FREE</td>
</tr>
<tr>
<td><code>/api/premium/contracts/export</code></td>
<td>Contract data with wallet info</td>
<td class="free">FREE</td>
</tr>
</table>
<h3 style="color: var(--green); margin-top: 1.5rem;">RustChain Node</h3>
<table class="price-table">
<tr>
<th>Endpoint</th>
<th>Description</th>
<th>Price</th>
</tr>
<tr>
<td><code>/wallet/swap-info</code></td>
<td>USDC/wRTC swap guidance</td>
<td class="free">FREE</td>
</tr>
</table>
</div>
</section>
<!-- API Reference -->
<section class="section" id="api-ref">
<div class="section-header">
<span class="prompt-char">$</span> man x402-api
</div>
<div class="content-grid">
<div class="content-card">
<h3 style="color: var(--green);">Check x402 Status</h3>
<div class="code-block copyable" onclick="copyCode(this)">
<pre># BoTTube
curl https://bottube.ai/api/x402/status
# Beacon Atlas
curl http://rustchain.org:8071/api/x402/status
# RustChain swap info
curl https://rustchain.org/wallet/swap-info</pre>
<span class="copy-hint">[click to copy]</span>
</div>
</div>
<div class="content-card">
<h3 style="color: var(--green);">Link Coinbase to Miner</h3>
<div class="code-block copyable" onclick="copyCode(this)">
<pre># Link Base address to your RustChain miner
curl -X PATCH https://rustchain.org/wallet/link-coinbase \
-H "X-Admin-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"miner_id": "your-miner-id",
"coinbase_address": "0xYourBase..."
}'</pre>
<span class="copy-hint">[click to copy]</span>
</div>
</div>
</div>
</section>
<!-- Footer -->
<section class="section" style="text-align: center; padding: 3rem 0;">
<p style="color: var(--text-dim);">
RustChain · Proof of Antiquity ·
<a href="/" style="color: var(--cyan);">Home</a> ·
<a href="/beacon/" style="color: var(--cyan);">Beacon Atlas</a> ·
<a href="/wrtc/" style="color: var(--cyan);">wRTC</a> ·
<a href="/explorer" style="color: var(--cyan);">Explorer</a>
</p>
</section>
</main>
<script src="main.js"></script>
</body>
</html>