-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlaunchpad.html
More file actions
315 lines (291 loc) · 16.6 KB
/
Copy pathlaunchpad.html
File metadata and controls
315 lines (291 loc) · 16.6 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>x402 Launchpad — Deploy an API. Agents pay you. | ScriptMasterLabs</title>
<link rel="canonical" href="https://www.scriptmasterlabs.com/launchpad.html" />
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<meta name="description" content="Pick a template, set your price, paste your Base wallet. Get a live x402-gated API in seconds — AI agents pay you USDC directly, no Stripe, no server, no Cloudflare account." />
<meta property="og:title" content="x402 Launchpad — Deploy an API. Agents pay you." />
<meta property="og:description" content="No Stripe. No server. No Cloudflare account. Real USDC lands in your own wallet." />
<meta property="og:url" content="https://www.scriptmasterlabs.com/launchpad.html" />
<meta property="og:image" content="https://www.scriptmasterlabs.com/og-sml-brand-v2.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="x402 Launchpad — Deploy an API. Agents pay you." />
<meta name="twitter:description" content="Real USDC lands in your own wallet. No Stripe. No server. https://www.scriptmasterlabs.com/launchpad.html" />
<style>
:root {
--bg:#050508; --g:#39FF14; --c:#67e8f9; --m:#8b9bb4; --card:#0c0c14;
--bd:#1e1e30; --pink:#FF2D95; --warn:#FFD700;
}
* { box-sizing:border-box; margin:0; padding:0 }
body { background:var(--bg); color:#e8eef7; font-family: ui-sans-serif, system-ui, -apple-system, sans-serif; line-height:1.55 }
a { color:var(--c) }
.wrap { max-width:860px; margin:0 auto; padding:1.5rem 1.1rem 4rem }
.eyebrow { color:var(--g); font-family: ui-monospace, monospace; font-size:.78rem; font-weight:700; letter-spacing:.12em; margin-bottom:.5rem }
h1 { font-size:clamp(1.85rem, 5vw, 2.75rem); line-height:1.08; font-weight:850; margin:.2rem 0 1rem }
h1 em { font-style:normal; color:var(--g); text-shadow:0 0 28px rgba(57,255,20,.35) }
.lede { color:var(--m); font-size:1.08rem; max-width:38rem; margin-bottom:1.25rem }
.pills { display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:1.25rem }
.pill { border:1px solid var(--bd); color:var(--m); font-family:ui-monospace,monospace; font-size:.72rem; padding:.25rem .65rem; border-radius:999px }
.pill.on { border-color:var(--g); color:var(--g) }
.card { background:var(--card); border:1px solid var(--bd); border-radius:16px; padding:1.15rem 1.25rem; margin:1rem 0 }
.card h2 { font-size:1.05rem; margin-bottom:.45rem }
.card .tag { font-family:ui-monospace,monospace; font-size:.7rem; color:var(--pink); font-weight:700; letter-spacing:.08em; margin-bottom:.35rem }
pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace }
pre { background:#000; color:#b7f7c8; border:1px solid #1a1a22; border-radius:10px; padding:.9rem 1rem; overflow:auto; font-size:.78rem; margin-top:.55rem }
.row { display:flex; flex-wrap:wrap; gap:.55rem; margin:.85rem 0 }
button, .btn {
appearance:none; border:0; cursor:pointer; font-weight:800; font-size:.92rem;
padding:.7rem 1.1rem; border-radius:10px; text-decoration:none; display:inline-flex; align-items:center; gap:.4rem;
}
.btn-g { background:var(--g); color:#000 }
.btn-g:disabled { opacity:.5; cursor:not-allowed }
.btn-o { background:transparent; color:var(--c); border:1px solid var(--c) }
.btn-ghost { background:transparent; color:var(--m); border:1px solid var(--bd) }
.step-label { font-family:ui-monospace,monospace; font-size:.72rem; color:var(--g); font-weight:700; letter-spacing:.08em; margin-bottom:.5rem }
.templates { display:grid; grid-template-columns:1fr 1fr; gap:.6rem; margin-bottom:1rem }
@media(max-width:520px){ .templates { grid-template-columns:1fr } }
.tmpl { border:1px solid var(--bd); border-radius:10px; padding:.8rem .9rem; cursor:pointer }
.tmpl.selected { border-color:var(--g); background:rgba(57,255,20,.06) }
.tmpl h3 { font-size:.95rem; margin-bottom:.25rem }
.tmpl p { color:var(--m); font-size:.8rem }
.tmpl input { display:none }
.slider-row { display:flex; align-items:center; gap:.8rem; margin-bottom:1rem }
.slider-row input[type=range] { flex:1; accent-color:var(--g) }
.price-readout { font-family:ui-monospace,monospace; color:var(--g); font-weight:700; min-width:5.5rem; text-align:right }
input[type=text] {
width:100%; background:#000; border:1px solid var(--bd); border-radius:8px; color:#e8eef7;
font-family:ui-monospace,monospace; font-size:.9rem; padding:.65rem .8rem; margin-bottom:.4rem;
}
input[type=text]:focus { outline:none; border-color:var(--c) }
.field-hint { color:var(--m); font-size:.78rem; margin-bottom:1rem }
.field-hint.bad { color:#ff6b6b }
.status { font-family:ui-monospace,monospace; font-size:.8rem; color:var(--m); min-height:1.2em; margin-top:.5rem }
.status.ok { color:var(--g) } .status.bad { color:#ff6b6b } .status.wait { color:var(--warn) }
#result { display:none; margin-top:1rem; border:1px solid var(--g); box-shadow:0 0 40px rgba(57,255,20,.12); background:linear-gradient(180deg,#0a150a,#0c0c14 40%) }
#result.show { display:block }
#result h3 { color:var(--g); font-size:1rem; margin-bottom:.6rem }
.kv { display:grid; grid-template-columns:110px 1fr; gap:.35rem .75rem; font-family:ui-monospace,monospace; font-size:.8rem }
.kv b { color:var(--m); font-weight:500 } .kv span { color:#e8eef7; word-break:break-all }
footer { margin-top:2rem; color:var(--m); font-size:.8rem }
</style>
</head>
<body>
<div class="wrap">
<div class="eyebrow">x402 LAUNCHPAD</div>
<h1>Deploy an API in <em>60 seconds</em>.<br/>AI agents pay you real USDC.</h1>
<p class="lede">Pick a template. Set your price. Paste your Base wallet. You get a live, x402-gated URL — hosted on ScriptMasterLabs' own gateway, no Cloudflare or Vercel account needed. Payment settles directly to <strong style="color:#fff">your</strong> wallet; this site never touches the funds.</p>
<div class="pills">
<span class="pill on">$0.001 – $0.10 USDC</span>
<span class="pill on">Base · eip155:8453</span>
<span class="pill on">No Stripe</span>
<span class="pill">No Cloudflare account</span>
</div>
<div class="card">
<div class="step-label">STEP 1 · PICK A TEMPLATE</div>
<div class="templates">
<label class="tmpl selected" data-tmpl="hello-world">
<input type="radio" name="tmpl" value="hello-world" checked>
<h3>Hello World</h3>
<p>Returns a real JSON greeting + server timestamp. Good for testing the flow end to end.</p>
</label>
<label class="tmpl" data-tmpl="btc-price">
<input type="radio" name="tmpl" value="btc-price">
<h3>BTC Price</h3>
<p>Live BTC/USD from CoinGecko on every paid call — real upstream fetch, not cached/fabricated.</p>
</label>
</div>
<div class="step-label">STEP 2 · SET YOUR PRICE</div>
<div class="slider-row">
<input type="range" id="price" min="0.001" max="0.1" step="0.001" value="0.001">
<span class="price-readout" id="priceReadout">$0.001</span>
</div>
<div class="step-label">STEP 3 · YOUR BASE WALLET ADDRESS</div>
<input type="text" id="wallet" placeholder="0x..." spellcheck="false" autocomplete="off">
<div class="field-hint" id="walletHint">This is where agent payments land — directly, on-chain. We never hold it.</div>
<div class="row">
<button class="btn-g" id="btnDeploy" type="button">Deploy in 60 seconds</button>
</div>
<div class="status" id="status"></div>
<div id="result">
<h3>✓ YOUR API IS LIVE</h3>
<div class="kv">
<b>API URL</b><span id="r-url">—</span>
<b>Template</b><span id="r-template">—</span>
<b>Price</b><span id="r-price">—</span>
<b>Pays to</b><span id="r-wallet">—</span>
</div>
<div class="row">
<button class="btn-o" type="button" id="btnCopyUrl">Copy API URL</button>
<button class="btn-o" type="button" id="btnCopyCurl">Copy curl command</button>
<button class="btn-g" type="button" id="btnTest">See the real 402 challenge</button>
</div>
<pre id="testOut" style="display:none"></pre>
<div class="row">
<a class="btn-o" id="btnEarnings" href="#">View my earnings dashboard →</a>
</div>
</div>
</div>
<div class="card">
<div class="tag">WHAT ACTUALLY RUNS</div>
<h2>No black box — here's the real code</h2>
<p style="color:var(--m);font-size:.9rem;margin-bottom:.4rem">Every template's full logic, verbatim. Nothing hidden, nothing simulated.</p>
<pre id="codePreview">// Hello World
function handle() {
return { message: "Hello from x402 Launchpad", timestamp: Date.now() };
}</pre>
</div>
<div class="card">
<div class="tag">HOW AN AGENT ACTUALLY PAYS IT</div>
<h2>The real 402 → pay → retry pattern</h2>
<pre># 1. GET your API URL → HTTP 402 with a real accepts[] (payTo = YOUR wallet)
# 2. Agent sends USDC on Base to payTo, amount = price * 1,000,000 (6 decimals)
# 3. Agent retries with header:
curl -sS "https://YOUR-API-URL" -H "X-PAYMENT-TX: 0xYOUR_TX_HASH"</pre>
<p style="color:var(--m);font-size:.85rem;margin-top:.5rem">Same convention as <a href="/hermes-loop.html">Hermes Loop</a> and <a href="/x402-snacks.html">x402 Snacks</a> — any agent that already speaks x402 can pay this without special-casing your API.</p>
</div>
<div class="card">
<div class="tag">HONEST LIMITS OF THIS MVP</div>
<h2>What this is (and isn't) yet</h2>
<p style="color:var(--m);font-size:.9rem">Your API runs as a route on ScriptMasterLabs' shared gateway, not on your own Cloudflare Worker or Vercel Function — that integration needs real deploy credentials that aren't wired up yet. There's also no "test with agent" auto-pay button here: that would mean an SML-controlled wallet spending real money against unreviewed code, which is a real custody decision nobody has made. Use the "See the real 402 challenge" button above, or pay it yourself with <a href="/hermes-loop.html">Hermes Loop</a>'s wallet flow, to see it actually settle.</p>
</div>
<footer>
ScriptMasterLabs · sovereign x402 on Base · registry resets if the gateway restarts (MVP) · not financial advice.
<br/><a href="/watch-the-agent-pay.html">watch the agent pay</a> · <a href="/hermes-loop.html">hermes loop</a> · <a href="/x402-snacks.html">snacks</a>
</footer>
</div>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "TechArticle",
"@id": "https://www.scriptmasterlabs.com/launchpad.html",
"headline": "x402 Launchpad — Deploy an API. Agents pay you.",
"description": "Deploy an x402-gated API in seconds and have AI agents pay USDC directly to your own Base wallet.",
"author": { "@type": "Person", "name": "Script Master Labs" },
"publisher": { "@type": "Organization", "name": "ScriptMasterLabs", "url": "https://www.scriptmasterlabs.com" },
"datePublished": "2026-07-26",
"keywords": ["x402", "USDC", "Base", "AI agent", "API monetization", "agentic commerce"]
}
]
}
</script>
<script>
(function () {
const BACKEND = 'https://scriptmaster-vending-router.onrender.com';
const templates = {
'hello-world': `// Hello World
function handle() {
return { message: "Hello from x402 Launchpad", timestamp: Date.now() };
}`,
'btc-price': `// BTC Price — real upstream fetch on every paid call
async function handle() {
const r = await fetch("https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd");
const body = await r.json();
return { symbol: "BTC", priceUsd: body.bitcoin.usd, source: "coingecko", timestamp: Date.now() };
}`,
};
let selectedTemplate = 'hello-world';
let deployedApiUrl = null;
document.querySelectorAll('.tmpl').forEach((el) => {
el.addEventListener('click', () => {
document.querySelectorAll('.tmpl').forEach((t) => t.classList.remove('selected'));
el.classList.add('selected');
el.querySelector('input').checked = true;
selectedTemplate = el.getAttribute('data-tmpl');
document.getElementById('codePreview').textContent = templates[selectedTemplate];
});
});
const priceEl = document.getElementById('price');
const priceReadout = document.getElementById('priceReadout');
function renderPrice() {
priceReadout.textContent = '$' + parseFloat(priceEl.value).toFixed(3);
}
priceEl.addEventListener('input', renderPrice);
renderPrice();
const walletEl = document.getElementById('wallet');
const walletHint = document.getElementById('walletHint');
function isValidWallet(v) { return /^0x[0-9a-fA-F]{40}$/.test(v); }
walletEl.addEventListener('input', () => {
if (walletEl.value.length === 0) {
walletHint.textContent = 'This is where agent payments land — directly, on-chain. We never hold it.';
walletHint.className = 'field-hint';
} else if (!isValidWallet(walletEl.value)) {
walletHint.textContent = 'Not a valid Base address yet (needs 0x + 40 hex characters).';
walletHint.className = 'field-hint bad';
} else {
walletHint.textContent = 'Looks good.';
walletHint.className = 'field-hint';
}
});
const statusEl = document.getElementById('status');
function setStatus(msg, kind) {
statusEl.textContent = msg;
statusEl.className = 'status' + (kind ? ' ' + kind : '');
}
document.getElementById('btnDeploy').onclick = async () => {
const wallet = walletEl.value.trim();
if (!isValidWallet(wallet)) {
setStatus('Enter a valid Base wallet address first.', 'bad');
walletEl.focus();
return;
}
const priceUsd = parseFloat(priceEl.value);
const btn = document.getElementById('btnDeploy');
btn.disabled = true;
setStatus('Deploying…', 'wait');
try {
const r = await fetch(BACKEND + '/launchpad/deploy', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ template: selectedTemplate, priceUsd, walletAddress: wallet }),
});
const body = await r.json();
if (!r.ok) {
setStatus('Deploy failed: ' + (body.error || r.status), 'bad');
btn.disabled = false;
return;
}
deployedApiUrl = body.apiUrl;
document.getElementById('r-url').innerHTML = '<a href="' + body.apiUrl + '" target="_blank" rel="noopener">' + body.apiUrl + '</a>';
document.getElementById('r-template').textContent = body.template;
document.getElementById('r-price').textContent = '$' + body.priceUsd.toFixed(3) + ' USDC';
document.getElementById('r-wallet').textContent = body.walletAddress;
document.getElementById('btnEarnings').href = '/earn.html?w=' + encodeURIComponent(body.walletAddress);
document.getElementById('testOut').style.display = 'none';
document.getElementById('result').classList.add('show');
document.getElementById('result').scrollIntoView({ behavior: 'smooth', block: 'nearest' });
setStatus('✓ Live. ' + body.note, 'ok');
} catch (e) {
setStatus('Could not reach the deploy gateway (' + (e.message || e) + '). Try again in a moment.', 'bad');
}
btn.disabled = false;
};
document.getElementById('btnCopyUrl').onclick = () => {
if (!deployedApiUrl) return;
navigator.clipboard.writeText(deployedApiUrl).then(() => setStatus('API URL copied.', 'ok'));
};
document.getElementById('btnCopyCurl').onclick = () => {
if (!deployedApiUrl) return;
navigator.clipboard.writeText('curl -sS "' + deployedApiUrl + '"').then(() => setStatus('curl command copied.', 'ok'));
};
document.getElementById('btnTest').onclick = async () => {
if (!deployedApiUrl) return;
const out = document.getElementById('testOut');
out.style.display = 'block';
out.textContent = 'Fetching the real 402 from your live API…';
try {
const r = await fetch(deployedApiUrl);
const body = await r.json();
out.textContent = 'HTTP ' + r.status + ' (real, live response from your new API)\n\n' + JSON.stringify(body, null, 2);
} catch (e) {
out.textContent = 'Could not reach it: ' + (e.message || e);
}
};
})();
</script>
</body>
</html>