Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
Robinhood Chain sites: single-file landings, deploy configs, SEO plumbing
nirholas15fe4acbff93
diff --git a/robinhood/hood-connect/README.md b/robinhood/hood-connect/README.mdindex ad02cfe7e..2b7a6e383 100644--- a/robinhood/hood-connect/README.md+++ b/robinhood/hood-connect/README.md@@ -6,6 +6,17 @@The wallet + onboarding kit for Robinhood Chain dApps.+## Website++Landing page with a live marble-run on-ramp (add → bridge → connect), served from [`docs/`](./docs):+**https://nirholas.github.io/hood-connect/**++[](https://dash.cloudflare.com/?to=/:account/pages/new)+[](https://app.netlify.com/start/deploy?repository=https://github.com/nirholas/hood-connect)+[](https://vercel.com/new/clone?repository-url=https://github.com/nirholas/hood-connect)++The site is a single self-contained `docs/index.html` (inline CSS + JS, zero external requests, works from `file://`). `wrangler.toml`, `netlify.toml`, and `vercel.json` all publish `docs/`.+Chain 4663 is not a default network in any wallet, so every dApp on it needs the same threethings before it can do anything useful: **add network, fund via bridge, connect**. Today eachteam hand-rolls that flow. hood-connect makes it one component (React) or three function callsdiff --git a/robinhood/hood-connect/docs/404.html b/robinhood/hood-connect/docs/404.htmlnew file mode 100644index 000000000..f42c5f690--- /dev/null+++ b/robinhood/hood-connect/docs/404.html@@ -0,0 +1,31 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1" />+<title>hood-connect: off the track (404)</title>+<meta name="robots" content="noindex" />+<link rel="canonical" href="https://nirholas.github.io/hood-connect/" />+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' fill='%23111013'/><circle cx='16' cy='9' r='3.4' fill='%23eceae3'/><path d='M6 15 L26 20 M26 20 L6 25' fill='none' stroke='%23eceae3' stroke-width='1.6'/><circle cx='16' cy='28' r='2' fill='%23eceae3'/></svg>" />+<style>+ *{margin:0;padding:0;box-sizing:border-box}+ :root{--ink:#111013;--paper:#eceae3;--graphite:#77746d;--mono:ui-monospace,"SFMono-Regular","Menlo","Consolas",monospace;--grot:"Helvetica Neue","Inter","Arial",system-ui,sans-serif}+ body{background:var(--paper);color:var(--ink);font-family:var(--grot);min-height:100svh;display:flex;align-items:center;padding:clamp(24px,6vw,88px);-webkit-font-smoothing:antialiased}+ body::before{content:"";position:fixed;inset:0;pointer-events:none;background:repeating-linear-gradient(0deg,rgba(17,16,19,.03) 0 1px,transparent 1px 3px);mix-blend-mode:multiply;opacity:.5}+ .eyebrow{font:600 11px/1 var(--mono);letter-spacing:.34em;text-transform:uppercase;color:var(--graphite);margin-bottom:22px}+ h1{font-weight:700;letter-spacing:-.03em;line-height:.95;font-size:clamp(44px,10vw,120px)}+ p{margin-top:20px;max-width:46ch;font-size:clamp(15px,1.6vw,20px);color:#2b2823;line-height:1.44}+ a.btn{display:inline-block;margin-top:30px;border:1px solid var(--ink);color:var(--ink);text-decoration:none;font:600 12px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;padding:15px 24px;transition:background .25s,color .25s}+ a.btn:hover{background:var(--ink);color:var(--paper)}+ .marble{width:14px;height:14px;border-radius:50%;background:var(--ink);display:inline-block;vertical-align:baseline;margin-left:2px}+</style>+</head>+<body>+<div>+ <div class="eyebrow">404 · chain 4663</div>+ <h1>The marble<br>rolled off.<span class="marble"></span></h1>+ <p>That path never landed in the basin. The on-ramp is back at the top: add the network, fund the wallet, connect.</p>+ <a class="btn" href="/hood-connect/">back to the on-ramp</a>+</div>+</body>+</html>diff --git a/robinhood/hood-connect/docs/_headers b/robinhood/hood-connect/docs/_headersnew file mode 100644index 000000000..8ccd12762--- /dev/null+++ b/robinhood/hood-connect/docs/_headers@@ -0,0 +1,7 @@+/*+ X-Content-Type-Options: nosniff+ Referrer-Policy: strict-origin-when-cross-origin+ Permissions-Policy: geolocation=(), microphone=(), camera=()+ X-Frame-Options: SAMEORIGIN+/*.html+ Cache-Control: public, max-age=0, must-revalidatediff --git a/robinhood/hood-connect/docs/index.html b/robinhood/hood-connect/docs/index.htmlindex 11ac95b2c..da4af60ee 100644--- a/robinhood/hood-connect/docs/index.html+++ b/robinhood/hood-connect/docs/index.html@@ -1,182 +1,605 @@<!doctype html><html lang="en"><head>- <meta charset="utf-8" />- <meta name="viewport" content="width=device-width, initial-scale=1" />- <title>hood-connect: wallet + onboarding kit for Robinhood Chain</title>- <meta name="description" content="EIP-6963 wallet discovery, add/switch chain 4663, a drop-in React connect button with live ETH/USDG balances, and a bridge funding funnel via LI.FI and Relay." />- <link rel="stylesheet" href="site.css" />- <link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect width='24' height='24' rx='6' fill='%230b0e11'/%3E%3Cpath d='M6 9.5A2.5 2.5 0 0 1 8.5 7h7A2.5 2.5 0 0 1 18 9.5v5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 6 14.5v-5Z' stroke='%2300c805' stroke-width='1.5' fill='none'/%3E%3Ccircle cx='14.5' cy='12' r='1.25' fill='%2300c805'/%3E%3C/svg%3E" />+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />+<title>hood-connect: release funds onto Robinhood Chain</title>+<meta name="description" content="The wallet + onboarding kit for Robinhood Chain (chain 4663). Add the network, bridge funds in via LI.FI with Relay fallback, connect. Release a marble down the on-ramp and watch every stage fire." />+<link rel="canonical" href="https://nirholas.github.io/hood-connect/" />+<meta name="theme-color" content="#111013" />+<meta property="og:type" content="website" />+<meta property="og:title" content="hood-connect: the on-ramp marble run" />+<meta property="og:description" content="Chain 4663 is in no wallet by default. hood-connect adds it, funds it across any chain via LI.FI, and connects with one component or three calls. Release the marble to see the whole on-ramp." />+<meta property="og:url" content="https://nirholas.github.io/hood-connect/" />+<meta name="twitter:card" content="summary_large_image" />+<meta name="twitter:creator" content="@nichxbt" />+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' fill='%23111013'/><circle cx='16' cy='9' r='3.4' fill='%23eceae3'/><path d='M6 15 L26 20 M26 20 L6 25' fill='none' stroke='%23eceae3' stroke-width='1.6'/><circle cx='16' cy='28' r='2' fill='%23eceae3'/></svg>" />+<script type="application/ld+json">+{"@context":"https://schema.org","@type":"SoftwareApplication","name":"hood-connect","applicationCategory":"DeveloperApplication","operatingSystem":"Node.js >= 20","offers":{"@type":"Offer","price":"0","priceCurrency":"USD"},"description":"Wallet + onboarding kit for Robinhood Chain (chain ID 4663): EIP-6963 wallet discovery, add/switch network derived from viem, a drop-in React connect button with live ETH/USDG balances, and a funding funnel that bridges from any chain via LI.FI with Relay fallback.","softwareVersion":"0.1.0","author":{"@type":"Person","name":"nirholas","url":"https://x.com/nichxbt"},"downloadUrl":"https://www.npmjs.com/package/hood-connect","codeRepository":"https://github.com/nirholas/hood-connect"}+</script>+<style>+ :root{+ --ink:#111013; --paper:#eceae3; --graphite:#77746d; --steel:#a7a49c;+ --hair:rgba(17,16,19,.14); --hair2:rgba(17,16,19,.30);+ --mono:ui-monospace,"SFMono-Regular","JetBrains Mono","Menlo","Consolas",monospace;+ --grot:"Helvetica Neue","Inter","Arial",system-ui,sans-serif;+ --ease:cubic-bezier(.16,1,.3,1);+ --unit:clamp(14px,1.15vw,19px);+ }+ *{margin:0;padding:0;box-sizing:border-box}+ html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}+ @media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}+ body{+ background:var(--paper); color:var(--ink); font-family:var(--grot);+ font-size:var(--unit); line-height:1.5; overflow-x:hidden;+ -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;+ }+ ::selection{background:var(--ink); color:var(--paper)}+ a{color:inherit}+ .mono{font-family:var(--mono); font-feature-settings:"ss01","zero"}++ /* film grain, pure CSS, no repaint cost */+ body::before{+ content:""; position:fixed; inset:0; z-index:9999; pointer-events:none;+ background:repeating-linear-gradient(0deg,rgba(17,16,19,.03) 0 1px,transparent 1px 3px);+ mix-blend-mode:multiply; opacity:.5;+ }++ /* nav rail */+ .rail{position:fixed; left:0; top:0; bottom:0; width:56px; z-index:60;+ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;+ border-right:1px solid var(--hair); background:var(--paper)}+ .rail b{writing-mode:vertical-rl; transform:rotate(180deg); font:600 11px/1 var(--mono);+ letter-spacing:.35em; text-transform:uppercase; color:var(--graphite);+ position:absolute; top:16px}+ .rail .stn{writing-mode:vertical-rl; font:500 10px/1 var(--mono); letter-spacing:.28em;+ text-transform:uppercase; color:var(--graphite); padding:14px 0; cursor:pointer;+ transition:color .3s var(--ease); text-decoration:none; opacity:.6}+ .rail .stn:hover{color:var(--ink); opacity:1}+ .rail .stn[aria-current="true"]{color:var(--ink); opacity:1}+ .rail .stn::before{content:"";display:block;width:5px;height:5px;border:1px solid var(--hair2);+ border-radius:50%;margin:0 auto 8px;transition:all .3s var(--ease)}+ .rail .stn[aria-current="true"]::before{background:var(--ink);border-color:var(--ink)}+ .rail .carriage{position:absolute;left:-1px;width:2px;background:var(--ink);height:40px;+ top:0;transition:transform .5s var(--ease);will-change:transform}+ main{margin-left:56px}+ @media(max-width:760px){.rail{width:0;border:0}.rail b,.rail .stn,.rail .carriage{display:none}main{margin-left:0}}++ section{position:relative; padding:clamp(60px,9vh,120px) clamp(20px,5vw,88px);+ border-bottom:1px solid var(--hair)}+ .eyebrow{font:600 11px/1 var(--mono); letter-spacing:.34em; text-transform:uppercase;+ color:var(--graphite); display:flex; align-items:center; gap:12px; margin-bottom:26px}+ .eyebrow::after{content:"";flex:1;height:1px;background:var(--hair)}+ .eyebrow .n{color:var(--ink)}+ h1,h2{font-family:var(--grot); font-weight:700; letter-spacing:-.03em; line-height:.96}+ h1{font-size:clamp(40px,7.6vw,104px)}+ h2{font-size:clamp(29px,5vw,62px)}+ .lede{max-width:60ch; font-size:clamp(16px,1.6vw,22px); line-height:1.44; color:#26241f}++ /* ============ HERO / MARBLE RUN ============ */+ #release{min-height:100svh; display:grid; grid-template-columns:1.02fr 0.98fr; gap:clamp(28px,4vw,76px);+ align-items:center; padding-top:clamp(56px,8vh,104px); padding-bottom:clamp(40px,6vh,72px)}+ @media(max-width:920px){#release{grid-template-columns:1fr; align-items:start; gap:26px}}+ .boot{font:500 12px/1.7 var(--mono); color:var(--graphite); letter-spacing:.03em; margin-bottom:20px; white-space:pre-wrap}+ @media(max-width:760px){.boot{font-size:10.5px; letter-spacing:0}}+ .boot span{display:inline-block; white-space:pre; opacity:0; animation:type .5s var(--ease) forwards}+ @keyframes type{to{opacity:1}}+ .herohead{max-width:15ch}+ .herohead .lo{color:var(--graphite)}+ .sub{margin-top:22px; max-width:46ch; font-size:clamp(15px,1.5vw,19px); color:#2b2823}++ .instrument{display:grid; grid-template-rows:1fr auto; gap:14px; align-self:stretch;+ max-height:min(80vh,700px); margin-top:0}+ @media(max-width:920px){.instrument{max-height:none}}++ /* the track (canvas) */+ .track{position:relative; border:1px solid var(--hair2); background:+ linear-gradient(0deg,rgba(17,16,19,.03),transparent 60%);+ min-height:clamp(300px,42vh,440px); overflow:hidden}+ .track canvas{display:block; width:100%; height:100%; position:absolute; inset:0}+ .track .label{position:absolute; left:12px; font:600 9.5px/1 var(--mono); letter-spacing:.22em;+ text-transform:uppercase; color:var(--graphite); pointer-events:none; transition:color .35s var(--ease)}+ .track .label.hit{color:var(--ink)}+ .track .label .tick{display:inline-block; width:16px; height:1px; background:currentColor; vertical-align:middle; margin-right:8px}+ .track .funnelnote{position:absolute; bottom:8px; left:12px; right:12px; font:500 10px/1.4 var(--mono);+ letter-spacing:.02em; color:var(--graphite); pointer-events:none}++ /* readout column */+ .console{display:flex; flex-direction:column; border:1px solid var(--hair2)}+ .console .head{padding:12px 14px; border-bottom:1px solid var(--hair); display:flex; justify-content:space-between; align-items:center;+ font:600 10px/1 var(--mono); letter-spacing:.2em; text-transform:uppercase; color:var(--graphite)}+ .steprow{padding:14px; border-bottom:1px solid var(--hair); position:relative; transition:background .4s var(--ease)}+ .steprow:last-of-type{border-bottom:0}+ .steprow.on{background:rgba(17,16,19,.035)}+ .steprow .top{display:flex; align-items:center; gap:10px}+ .steprow .dot{width:8px; height:8px; border-radius:50%; border:1px solid var(--hair2); flex:none; transition:all .4s var(--ease)}+ .steprow.on .dot{background:var(--ink); border-color:var(--ink); box-shadow:0 0 0 3px rgba(17,16,19,.08)}+ .steprow .st{font:600 11px/1 var(--mono); letter-spacing:.14em; text-transform:uppercase; color:var(--ink)}+ .steprow .num{margin-left:auto; font:600 10px/1 var(--mono); color:var(--graphite)}+ .steprow .dsc{margin-top:9px; padding-left:18px; font:500 12px/1.5 var(--mono); color:var(--graphite);+ max-height:0; overflow:hidden; opacity:0; transition:max-height .5s var(--ease),opacity .4s var(--ease)}+ .steprow.on .dsc{max-height:9em; opacity:1}+ .steprow .dsc b{color:var(--ink); font-weight:600}+ .steprow .dsc code{background:rgba(17,16,19,.06); padding:1px 4px}++ .lever{margin-top:22px; display:flex; flex-wrap:wrap; align-items:center; gap:16px}+ .rls{appearance:none; border:1px solid var(--ink); background:var(--ink); color:var(--paper);+ font:600 13px/1 var(--mono); letter-spacing:.16em; text-transform:uppercase; padding:16px 30px;+ cursor:pointer; transition:transform .3s var(--ease),background .3s,color .3s; position:relative; overflow:hidden}+ .rls:hover{transform:translateY(-2px)}+ .rls:active{transform:translateY(0)}+ .rls.done{background:var(--paper); color:var(--ink)}+ .rls[disabled]{cursor:default; opacity:.55}+ .hint{font:500 12px/1.5 var(--mono); color:var(--graphite); letter-spacing:.01em; max-width:34ch}+ .scrollcue{margin-top:clamp(26px,4vh,44px); font:600 10px/1 var(--mono);+ letter-spacing:.3em; text-transform:uppercase; color:var(--graphite); display:inline-flex; align-items:center; gap:10px; text-decoration:none}+ .scrollcue i{display:block; width:26px; height:1px; background:var(--graphite); position:relative; overflow:hidden}+ .scrollcue i::after{content:"";position:absolute;inset:0;background:var(--ink);animation:sweep 2.4s var(--ease) infinite}+ @keyframes sweep{0%{transform:translateX(-100%)}60%,100%{transform:translateX(100%)}}+ @media(prefers-reduced-motion:reduce){.scrollcue i::after{animation:none}}++ /* generic layout blocks */+ .cols{display:grid; grid-template-columns:1fr 1fr; gap:clamp(28px,5vw,80px); align-items:start}+ @media(max-width:860px){.cols{grid-template-columns:1fr; gap:32px}}+ .btns{display:flex; flex-wrap:wrap; gap:12px; margin-top:26px}+ .btn{appearance:none; text-decoration:none; border:1px solid var(--ink); color:var(--ink); background:transparent;+ font:600 12px/1 var(--mono); letter-spacing:.12em; text-transform:uppercase; padding:15px 22px; cursor:pointer;+ transition:background .25s,color .25s,transform .25s var(--ease)}+ .btn:hover{background:var(--ink); color:var(--paper); transform:translateY(-2px)}+ .btn.solid{background:var(--ink); color:var(--paper)}+ .btn.solid:hover{background:transparent; color:var(--ink)}++ .code{border:1px solid var(--ink); background:var(--ink); color:var(--paper); padding:20px 22px;+ font:500 13px/1.85 var(--mono); position:relative; overflow-x:auto; white-space:pre}+ .code .c{color:#8b8781}+ .code .k{color:#cfccc4}+ .code .p::before{content:"$ "; color:#8b8781}+ .copy{position:absolute; top:12px; right:12px; appearance:none; border:1px solid rgba(236,234,227,.28);+ background:transparent; color:var(--paper); font:600 10px/1 var(--mono); letter-spacing:.14em; padding:7px 11px; cursor:pointer; transition:background .2s}+ .copy:hover{background:rgba(236,234,227,.14)}++ /* state matrix (ensureChain) */+ .matrix{display:grid; grid-template-columns:repeat(4,1fr); border-left:1px solid var(--hair); border-top:1px solid var(--hair); margin-top:34px}+ @media(max-width:760px){.matrix{grid-template-columns:1fr 1fr}}+ @media(max-width:420px){.matrix{grid-template-columns:1fr}}+ .cell{border-right:1px solid var(--hair); border-bottom:1px solid var(--hair); padding:20px 18px 24px; transition:background .3s}+ .cell:hover{background:rgba(17,16,19,.03)}+ .cell .id{font:600 10px/1 var(--mono); letter-spacing:.2em; color:var(--graphite)}+ .cell .nm{font:700 18px/1.05 var(--grot); letter-spacing:-.02em; margin:12px 0 8px}+ .cell .ds{font-size:14px; color:#2c2925; line-height:1.42}++ .spec{border-top:1px solid var(--hair); margin-top:34px}+ .spec .r{display:grid; grid-template-columns:220px 1fr; gap:20px; padding:17px 0; border-bottom:1px solid var(--hair); align-items:baseline}+ @media(max-width:640px){.spec .r{grid-template-columns:1fr; gap:5px}}+ .spec .r .t{font:600 11px/1.3 var(--mono); letter-spacing:.14em; text-transform:uppercase; color:var(--graphite)}+ .spec .r .d{font-size:15.5px; color:#25231f; max-width:64ch}+ .spec .r .d b{font-weight:700}+ .spec .r .d code{font-family:var(--mono); font-size:.86em; background:rgba(17,16,19,.06); padding:1px 5px}++ /* funding chains ticker */+ .chains{display:flex; flex-wrap:wrap; gap:8px; margin-top:22px}+ .chains span{font:600 11px/1 var(--mono); letter-spacing:.1em; text-transform:uppercase; color:var(--ink);+ border:1px solid var(--hair2); padding:9px 12px; transition:background .25s,color .25s}+ .chains span:hover{background:var(--ink); color:var(--paper)}++ .fuse{display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-top:14px}+ @media(max-width:860px){.fuse{grid-template-columns:1fr 1fr}}+ @media(max-width:420px){.fuse{grid-template-columns:1fr}}+ .fuse .f{border:1px solid var(--hair2); padding:18px}+ .fuse .f .h{font:700 12.5px/1 var(--mono); letter-spacing:.06em; text-transform:uppercase; margin-bottom:9px}+ .fuse .f .b{font-size:13.5px; color:#2c2925; line-height:1.45}+ .fuse .f .b code{font-family:var(--mono); font-size:.9em; background:rgba(17,16,19,.06); padding:1px 4px}++ footer{padding:clamp(40px,6vh,72px) clamp(20px,5vw,88px); display:flex; flex-wrap:wrap;+ justify-content:space-between; gap:20px; align-items:flex-end}+ footer .big{font:700 clamp(30px,6vw,72px)/.9 var(--grot); letter-spacing:-.03em}+ footer .meta{font:500 12px/1.7 var(--mono); color:var(--graphite); letter-spacing:.02em; text-align:right}+ footer a{text-decoration:none; border-bottom:1px solid var(--hair2); transition:border-color .2s}+ footer a:hover{border-color:var(--ink)}++ .rise{opacity:0; transform:translateY(22px); transition:opacity .8s var(--ease),transform .8s var(--ease)}+ .rise.in{opacity:1; transform:none}+ @media(prefers-reduced-motion:reduce){.rise{opacity:1;transform:none}}+</style></head><body>- <header class="site">- <div class="wrap">- <a class="logo" href="index.html">hood<span class="tick">-</span>connect</a>- <nav class="main" aria-label="Site">- <a href="index.html" aria-current="page">Overview</a>- <a href="guide.html">Integration guide</a>- <a href="funding.html">Funding funnel</a>- <a href="add.html">Add-network button</a>- <a href="https://github.com/nirholas/hood-connect" rel="noreferrer noopener">GitHub</a>- <a href="https://www.npmjs.com/package/hood-connect" rel="noreferrer noopener">npm</a>- </nav>+<nav class="rail" aria-label="Sections">+ <b>hood·connect</b>+ <span class="carriage" id="carriage"></span>+ <a class="stn" href="#release" aria-current="true">Release</a>+ <a class="stn" href="#add">Add</a>+ <a class="stn" href="#fund">Fund</a>+ <a class="stn" href="#connect">Connect</a>+ <a class="stn" href="#get">Get it</a>+</nav>++<main>+ <!-- ============ RELEASE / MARBLE RUN ============ -->+ <section id="release">+ <div class="herotext">+ <p class="boot mono" id="boot"></p>+ <div class="eyebrow"><span class="n">00</span> / THE ON-RAMP · chain 4663</div>+ <h1 class="herohead">Drop funds<br><span class="lo">onto a chain no<br>wallet knows yet.</span></h1>+ <p class="sub">Robinhood Chain (ID 4663) ships in no wallet by default. Every dApp needs the same three moves before it can do anything: add the network, bridge funds in, connect. hood-connect is that whole descent in one component. Release the marble and follow it down.</p>+ <div class="lever">+ <button class="rls" id="rls"><span class="lbl">Release funds</span></button>+ <span class="hint" id="hint">gravity does the routing · the marble trips each stage as it passes</span>+ </div>+ <a class="scrollcue" href="#add">the kit <i></i> keep going</a></div>- </header>-- <main>- <div class="hero">- <div class="wrap">- <h1>Wallet onboarding for <span class="grad">Robinhood Chain</span>, in one component.</h1>- <p class="lede">- Chain 4663 ships in no wallet by default, so every dApp rebuilds the same flow: add network,- fund via bridge, connect. hood-connect makes it one call: EIP-6963 discovery, EIP-3085- add-network derived from viem's official chain defs, live ETH/USDG balances, and a bridge- funding funnel routed through LI.FI with Relay fallback.- </p>- <div class="install">- <span id="install-cmd">npm install hood-connect</span>- <button type="button" id="copy-install" aria-label="Copy install command">copy</button>- </div>- <div class="stats" aria-label="Live Robinhood Chain data">- <div class="stat"><div class="k">Chain ID</div><div class="v" id="stat-chain">4663</div></div>- <div class="stat"><div class="k">Block height</div><div class="v live" id="stat-block">loading</div></div>- <div class="stat"><div class="k">USDG supply</div><div class="v" id="stat-usdg">loading</div></div>- <div class="stat"><div class="k">Gas token</div><div class="v" id="stat-gas">ETH</div></div>+ <div class="instrument">+ <div class="track" id="track" role="img" aria-label="A marble-run on-ramp: funds fall from a source chain, through a bridge, into an on-chain balance on Robinhood Chain 4663.">+ <canvas id="cv"></canvas>+ <div class="label" id="lb0"><span class="tick"></span>source chain, any of 20+</div>+ <div class="label" id="lb1"><span class="tick"></span>bridge · LI.FI → Relay</div>+ <div class="label" id="lb2"><span class="tick"></span>chain 4663 balance</div>+ <div class="funnelnote mono" id="fnote">release the marble to run the funnel</div>+ </div>++ <div class="console" aria-live="polite">+ <div class="head"><span>on-ramp trace</span><span id="clk">idle</span></div>+ <div class="steprow" id="s0">+ <div class="top"><span class="dot"></span><span class="st">deposit</span><span class="num">0.01 ETH</span></div>+ <div class="dsc"><code>getFundingQuote()</code> builds a ready-to-send source-chain tx from <b>any of 20+ chains</b>. ERC-20? An approval leg comes with it.</div>+ </div>+ <div class="steprow" id="s1">+ <div class="top"><span class="dot"></span><span class="st">bridge</span><span class="num">LI.FI</span></div>+ <div class="dsc">Live quote via <b>LI.FI</b>, automatic <b>Relay</b> fallback, both verified live against 4663. <code>getFundingStatus()</code> reports pending / done / failed.</div>+ </div>+ <div class="steprow" id="s2">+ <div class="top"><span class="dot"></span><span class="st">landed</span><span class="num">4663</span></div>+ <div class="dsc"><code>checkBootstrap()</code> reads live <b>ETH + USDG</b>. The empty wallet is now funded and the chain is added, connect proceeds.</div></div></div></div>+ </section>- <section aria-labelledby="try-title">- <div class="wrap">- <h2 id="try-title">Try it, right here</h2>- <p class="sub">- This button is the framework-free core running live on this page: it discovers your- installed wallets, connects, adds Robinhood Chain if your wallet does not know it, switches,- and reads your real ETH and USDG balances from the public RPC.- </p>- <div class="demo-box">- <div id="connect-demo"></div>- <p class="note">- Read-only: the page never asks for a signature and never moves funds. No wallet installed?- You will get install links instead.- </p>+ <!-- ============ ADD ============ -->+ <section id="add">+ <div class="eyebrow"><span class="n">01</span> / ADD THE NETWORK</div>+ <div class="cols">+ <div>+ <h2>One call adds a<br>chain from scratch.</h2>+ <p class="lede" style="margin-top:22px"><code class="mono">ensureChain()</code> connects, adds 4663 via EIP-3085 if the wallet has never heard of it, switches, and verifies, with a typed state for every phase and a typed error for every rejection path, including MetaMask's nested <code class="mono">-32603</code>/<code class="mono">4902</code> wrapping.</p>+ <p class="lede" style="margin-top:18px">The add-chain params are <b>provably derived from viem</b>: <code class="mono">toAddChainParams()</code> computes them at runtime from viem's official <code class="mono">robinhood</code> / <code class="mono">robinhoodTestnet</code> definitions. Nothing is hand-copied, and the test suite enforces it.</p>+ <div class="btns">+ <a class="btn solid" href="https://www.npmjs.com/package/hood-connect">npm</a>+ <a class="btn" href="https://github.com/nirholas/hood-connect">source</a>+ <a class="btn" href="add.html">add-to-wallet button</a></div></div>- </section>-- <section aria-labelledby="features-title">- <div class="wrap">- <h2 id="features-title">What is in the kit</h2>- <div class="grid">- <div class="card">- <span class="tag">hood-connect</span>- <h3>ensureChain()</h3>- <p>Connect, add chain 4663 if missing (EIP-3085, params derived from viem, never hand-copied), switch, verify. Typed states for every phase and typed errors for every rejection path.</p>- </div>- <div class="card">- <span class="tag">hood-connect</span>- <h3>EIP-6963 discovery</h3>- <p>Every installed wallet announces itself; no more fighting over window.ethereum. Legacy injection still works as a fallback.</p>- </div>- <div class="card">- <span class="tag">hood-connect</span>- <h3>Balance bootstrap</h3>- <p>checkBootstrap() detects the empty-wallet-on-4663 state every new user hits and returns concrete funding options to render.</p>- </div>- <div class="card">- <span class="tag">hood-connect</span>- <h3>Funding funnel</h3>- <p>Live bridge quotes and route execution into Robinhood Chain via the LI.FI API, with Relay as automatic fallback. Both verified live against chain 4663.</p>- </div>- <div class="card">- <span class="tag">hood-connect/react</span>- <h3><HoodConnectButton /></h3>- <p>The whole flow in one component with a styled default skin: wallet picker, add/switch progress, address pill with live ETH/USDG balances, designed empty and error states.</p>- </div>- <div class="card">- <span class="tag">hood-connect/wagmi</span>- <h3>wagmi config</h3>- <p>hoodWagmiConfig() for teams already on wagmi v2: Robinhood Chain transports and EIP-6963 connectors, one import.</p>- </div>+ <div>+ <div class="code"><button class="copy" data-copy="ens">COPY</button><span class="c">// EIP-6963 discovery + legacy fallback</span>+<span class="k">import</span> { discoverWallets, ensureChain } <span class="k">from</span> 'hood-connect'++<span class="k">const</span> wallets = <span class="k">await</span> discoverWallets()+<span class="k">const</span> { address } = <span class="k">await</span> ensureChain(+ wallets[0].provider,+ { network: 'mainnet', <span class="c">// 4663</span>+ onState: (s) => log(s.status) }+)+<span class="c">// connecting → adding → switching → connected</span></div>+ </div>+ </div>++ <div class="matrix" id="matrix"></div>+ </section>++ <!-- ============ FUND ============ -->+ <section id="fund">+ <div class="eyebrow"><span class="n">02</span> / FUND THE FUNNEL</div>+ <h2>Bridge in from<br>anywhere you already are.</h2>+ <p class="lede" style="margin-top:22px">The empty wallet every new 4663 user has is the whole problem. <code class="mono">checkBootstrap()</code> spots it and hands back concrete funding options; <code class="mono">getFundingQuote()</code> returns a ready-to-send bridge transaction, priced live, LI.FI first and Relay behind it. The documented "withdraw from the Robinhood app" path is offered alongside for anyone who prefers the front door.</p>++ <div class="chains" aria-label="Source chains">+ <span>Ethereum</span><span>Arbitrum</span><span>Base</span><span>Optimism</span><span>Polygon</span><span>BNB</span><span>Avalanche</span><span>+ more</span>+ </div>++ <div class="code" style="margin-top:26px; max-width:720px"><button class="copy" data-copy="fund">COPY</button><span class="k">import</span> { getFundingQuote, getFundingStatus } <span class="k">from</span> 'hood-connect'++<span class="k">const</span> quote = <span class="k">await</span> getFundingQuote({+ fromChainId: 42161, <span class="c">// Arbitrum One</span>+ fromAddress: account,+ amount: 10_000_000_000_000_000n, <span class="c">// 0.01 ETH</span>+})+<span class="c">// quote.tx is ready to send; quote.approval is set for ERC-20s</span>+<span class="k">await</span> getFundingStatus(quote, txHash) <span class="c">// pending | done | failed</span></div>++ <div class="fuse">+ <div class="f"><div class="h">LI.FI primary</div><div class="b">Live route + quote across chains, verified against 4663.</div></div>+ <div class="f"><div class="h">Relay fallback</div><div class="b">Second live provider, so one dead route never dead-ends the user.</div></div>+ <div class="f"><div class="h">App path</div><div class="b">The documented Robinhood-app withdrawal, offered for those who want it.</div></div>+ <div class="f"><div class="h">User-signed</div><div class="b">Read-only by default. Only the user's own wallet sends the bridge.</div></div>+ </div>+ <div class="btns"><a class="btn" href="funding.html">funding walkthrough</a><a class="btn" href="guide.html">error-handling guide</a></div>+ </section>++ <!-- ============ CONNECT ============ -->+ <section id="connect">+ <div class="eyebrow"><span class="n">03</span> / CONNECT · every state designed</div>+ <div class="cols">+ <div>+ <h2>Drop in the button.<br>Or keep the core.</h2>+ <p class="lede" style="margin-top:22px"><code class="mono"><HoodConnectButton /></code> and <code class="mono"><FundWallet /></code> carry the whole journey with a themable skin: no wallet, picker, connecting, adding, switching, wrong chain, connected, empty wallet, error: each visual state is drawn. Already on wagmi v2? <code class="mono">hoodWagmiConfig()</code> wires chain 4663 in. The framework-free core needs neither React nor wagmi.</p>+ <div class="btns">+ <a class="btn solid" href="https://github.com/nirholas/hood-connect#readme">read the docs</a>+ <a class="btn" href="https://registry.modelcontextprotocol.io">registry</a></div></div>- </section>+ <div>+ <div class="code"><button class="copy" data-copy="react">COPY</button><span class="k">import</span> { HoodConnectButton, FundWallet }+ <span class="k">from</span> 'hood-connect/react'- <section aria-labelledby="quick-title">- <div class="wrap">- <h2 id="quick-title">60-second quickstart</h2>- <p class="sub">Framework-free core. React and wagmi variants live in the <a href="guide.html">integration guide</a>.</p>-<pre><code>import { discoverWallets, ensureChain, checkBootstrap } from 'hood-connect'+<span class="k"><</span>HoodConnectButton showBalances+ onFund={() => openFunding()} <span class="k">/></span>+<span class="k"><</span>FundWallet onFunded={() => refetch()} <span class="k">/></span>-const [wallet] = await discoverWallets() // EIP-6963 (+ legacy fallback)-const { address } = await ensureChain(wallet.provider) // connect + add 4663 + switch+<span class="c">// headless, if you'd rather:</span>+<span class="c">// useHoodAccount · useEnsureChain · useWallets</span></div>+ </div>+ </div>-const status = await checkBootstrap(address) // live ETH + USDG read-if (!status.funded) {- console.log(status.fundingOptions) // bridge + Robinhood-app paths-}</code></pre>+ <div class="spec">+ <div class="r"><div class="t">discovery</div><div class="d"><code>discoverWallets</code> / <code>watchWallets</code>: EIP-6963 one-shot or streaming, with a legacy <b>window.ethereum</b> fallback for wallets that never adopted it.</div></div>+ <div class="r"><div class="t">typed errors</div><div class="d"><code>ConnectionRejectedError</code>, <code>ChainAddRejectedError</code>, <code>ChainSwitchRejectedError</code> and siblings, <b>never a raw provider error</b>, so your UI branches on a name, not a magic number.</div></div>+ <div class="r"><div class="t">balances</div><div class="d"><code>checkBootstrap</code> reads live ETH + USDG and, for the empty wallet, returns funding options ready to render. Stock Tokens are shown, never acquired.</div></div>+ <div class="r"><div class="t">theming</div><div class="d">Skin the components with <code>--hc-*</code> CSS variables, or take <code>unstyled</code> and paint it yourself. Every state has a class hook.</div></div>+ </div>+ </section>++ <!-- ============ GET ============ -->+ <section id="get">+ <div class="eyebrow"><span class="n">04</span> / GET IT</div>+ <div class="cols">+ <div>+ <h2>One install.<br>Three calls, or one tag.</h2>+ <p class="lede" style="margin-top:22px"><code class="mono">viem</code> and <code class="mono">hoodchain</code> install automatically; <code class="mono">react</code> and <code class="mono">wagmi</code> are optional peers, needed only for the framework entries. The "Add Robinhood Chain" page is a button-as-a-service any README can link or iframe.</p>+ <div class="btns">+ <a class="btn solid" href="add.html">try add-to-wallet</a>+ <a class="btn" href="https://github.com/nirholas/hood-connect/generate">deploy your own</a>+ </div></div>- </section>- </main>-- <footer class="site">- <div class="wrap">- Built by <a href="https://x.com/nichxbt" rel="noreferrer noopener">nirholas</a> ·- <a href="https://three.ws" rel="noreferrer noopener">three.ws</a> · MIT licensed ·- Not affiliated with Robinhood Markets.+ <div>+ <div class="code"><button class="copy" data-copy="get">COPY</button><span class="p" id="cmd-get">npm install hood-connect</span>++<span class="c"># add-to-wallet badge for any README</span>+<span class="c"># → docs/add.html (?network=testnet, ?embed=1)</span>++<span class="c"># 36 unit tests + live read-only checks</span>+<span class="p">npm test</span></div>+ </div>+ </div>+ </section>++ <footer>+ <div class="big">hood-<br>connect</div>+ <div class="meta">+ chain 4663 · viem-derived · EIP-6963 / EIP-3085<br>+ <a href="https://github.com/nirholas/hood-connect">github.com/nirholas/hood-connect</a><br>+ <a href="https://www.npmjs.com/package/hood-connect">npmjs.com/package/hood-connect</a><br>+ built by <a href="https://x.com/nichxbt">@nichxbt</a> · not affiliated with Robinhood Markets</div></footer>+</main>++<script>+"use strict";+const reduce = matchMedia('(prefers-reduced-motion:reduce)').matches;++/* ---------- boot line ---------- */+(function boot(){+ const el = document.getElementById('boot');+ const line = '● wallet discovery ready · chain 4663 (0x1237) · usdg + eth';+ [...line].forEach((ch,i)=>{ const s=document.createElement('span'); s.textContent=ch; s.style.animationDelay=(reduce?0:i*13+120)+'ms'; el.appendChild(s); });+})();++/* ---------- ensureChain state matrix ---------- */+const STATES = [+ ['connecting','Connecting','Request accounts from the chosen EIP-6963 provider.'],+ ['adding','Adding','Wallet has never seen 4663 → EIP-3085 add, params derived from viem.'],+ ['switching','Switching','Point the wallet at 4663; unwrap MetaMask 4902 / -32603.'],+ ['connected','Connected','Address in hand, chain verified. Bootstrap read fires next.'],+];+const matrix = document.getElementById('matrix');+STATES.forEach((s,i)=>{+ const c=document.createElement('div'); c.className='cell rise';+ c.innerHTML=`<div class="id">${String(i+1).padStart(2,'0')} · status</div><div class="nm">${s[1]}</div><div class="ds">${s[2]}</div>`;+ matrix.appendChild(c);+});++/* ---------- copy buttons ---------- */+document.querySelectorAll('.copy').forEach(btn=>{+ const map={ens:"import { discoverWallets, ensureChain } from 'hood-connect'",fund:"import { getFundingQuote, getFundingStatus } from 'hood-connect'",react:"import { HoodConnectButton, FundWallet } from 'hood-connect/react'",get:'npm install hood-connect'};+ btn.addEventListener('click',()=>{ navigator.clipboard&&navigator.clipboard.writeText(map[btn.dataset.copy]||'').then(()=>{ const t=btn.textContent; btn.textContent='COPIED'; setTimeout(()=>btn.textContent=t,1200);}).catch(()=>{}); });+});++/* ---------- reveal on scroll ---------- */+const io=new IntersectionObserver((es)=>{es.forEach(e=>{if(e.isIntersecting){e.target.classList.add('in');io.unobserve(e.target);}});},{threshold:.12});+document.querySelectorAll('.rise').forEach((el,i)=>{el.style.transitionDelay=(i%4*60)+'ms';io.observe(el);});++/* ---------- nav rail carriage ---------- */+const stations=[...document.querySelectorAll('.rail .stn')];+const secs=stations.map(a=>document.querySelector(a.getAttribute('href')));+const carriage=document.getElementById('carriage');+function updateRail(){+ let idx=0,mid=innerHeight*0.4;+ secs.forEach((s,i)=>{const r=s.getBoundingClientRect(); if(r.top<=mid) idx=i;});+ stations.forEach((s,i)=>s.setAttribute('aria-current',i===idx));+ const a=stations[idx], railR=document.querySelector('.rail').getBoundingClientRect(), r=a.getBoundingClientRect();+ carriage.style.height=r.height+'px'; carriage.style.transform=`translateY(${r.top-railR.top}px)`;+}+stations.forEach(a=>a.addEventListener('click',e=>{e.preventDefault();document.querySelector(a.getAttribute('href')).scrollIntoView({behavior:reduce?'auto':'smooth'});}));+addEventListener('scroll',()=>requestAnimationFrame(updateRail),{passive:true});+addEventListener('resize',updateRail); updateRail();++/* =========================================================+ THE MARBLE RUN / signature interaction+ Bead-on-wire + projectile hybrid. Ramps are normalized+ (0..1) so the track re-lays out on resize. Three gate y+ thresholds trip the on-ramp stages as the marble passes.+ ========================================================= */+const track=document.getElementById('track');+const cv=document.getElementById('cv');+const ctx=cv.getContext('2d');+const rls=document.getElementById('rls');+const hint=document.getElementById('hint');+const clk=document.getElementById('clk');+const fnote=document.getElementById('fnote');+const steps=[document.getElementById('s0'),document.getElementById('s1'),document.getElementById('s2')];+const labels=[document.getElementById('lb0'),document.getElementById('lb1'),document.getElementById('lb2')];++const RAMPS=[+ {x1:0.14,y1:0.18,x2:0.80,y2:0.31},+ {x1:0.86,y1:0.40,x2:0.20,y2:0.55},+ {x1:0.14,y1:0.65,x2:0.82,y2:0.79},+];+const GATES=[0.31,0.55,0.85];+const LABEL_Y=[0.05,0.475,0.87];++let W=0,H=0,DPR=1;+function resize(){+ const r=track.getBoundingClientRect();+ DPR=Math.min(devicePixelRatio||1,2);+ W=r.width; H=r.height;+ cv.width=Math.round(W*DPR); cv.height=Math.round(H*DPR);+ ctx.setTransform(DPR,0,0,DPR,0,0);+ labels.forEach((l,i)=>{ l.style.top=(LABEL_Y[i]*H)+'px'; });+ draw();+}+const nx=v=>v*W, ny=v=>v*H;+function ramps(){ return RAMPS.map(s=>({x1:nx(s.x1),y1:ny(s.y1),x2:nx(s.x2),y2:ny(s.y2)})); }++let marble=null, running=false, gateHit=[false,false,false];++function drawTrackStatic(){+ ctx.clearRect(0,0,W,H);+ const rs=ramps();+ // release hopper at top-left+ ctx.strokeStyle='rgba(17,16,19,0.32)'; ctx.lineWidth=1.5; ctx.lineCap='round'; ctx.lineJoin='round';+ ctx.beginPath();+ ctx.moveTo(nx(0.10),ny(0.055)); ctx.lineTo(nx(0.10),ny(0.10)); ctx.lineTo(nx(0.17),ny(0.155));+ ctx.moveTo(nx(0.24),ny(0.055)); ctx.lineTo(nx(0.24),ny(0.10)); ctx.lineTo(nx(0.185),ny(0.145));+ ctx.stroke();+ // ramps+ ctx.strokeStyle='rgba(17,16,19,0.85)'; ctx.lineWidth=2.5;+ rs.forEach(s=>{ ctx.beginPath(); ctx.moveTo(s.x1,s.y1); ctx.lineTo(s.x2,s.y2); ctx.stroke();+ const lowX = s.y2>s.y1? s.x2:s.x1, lowY=Math.max(s.y1,s.y2);+ ctx.strokeStyle='rgba(17,16,19,0.26)'; ctx.lineWidth=1;+ ctx.beginPath(); ctx.moveTo(lowX,lowY); ctx.lineTo(lowX,Math.min(H-2,lowY+ny(0.05))); ctx.stroke();+ ctx.strokeStyle='rgba(17,16,19,0.85)'; ctx.lineWidth=2.5;+ });+ // gate lines+ ctx.setLineDash([2,5]); ctx.strokeStyle='rgba(17,16,19,0.20)'; ctx.lineWidth=1;+ GATES.forEach(g=>{ const y=ny(g); ctx.beginPath(); ctx.moveTo(nx(0.04),y); ctx.lineTo(nx(0.96),y); ctx.stroke(); });+ ctx.setLineDash([]);+ // basin+ ctx.strokeStyle='rgba(17,16,19,0.85)'; ctx.lineWidth=2.5;+ ctx.beginPath();+ ctx.moveTo(nx(0.30),ny(0.90)); ctx.lineTo(nx(0.42),ny(0.965)); ctx.lineTo(nx(0.58),ny(0.965)); ctx.lineTo(nx(0.70),ny(0.90));+ ctx.stroke();+}++function draw(){+ drawTrackStatic();+ if(marble){+ const rr=Math.max(6,Math.min(13,W*0.021));+ ctx.fillStyle='rgba(17,16,19,0.13)';+ for(let i=0;i<marble.trail.length;i++){ const t=marble.trail[i]; ctx.beginPath(); ctx.arc(t.x,t.y,rr*(0.3+0.55*i/marble.trail.length),0,7); ctx.fill(); }+ ctx.fillStyle='#111013'; ctx.beginPath(); ctx.arc(marble.x,marble.y,rr,0,7); ctx.fill();+ ctx.fillStyle='rgba(236,234,227,0.85)'; ctx.beginPath(); ctx.arc(marble.x-rr*0.32,marble.y-rr*0.34,rr*0.28,0,7); ctx.fill();+ }+}++function nearestRampBelow(x,y){+ const rs=ramps(); let best=null,bestY=Infinity;+ for(const s of rs){+ const minX=Math.min(s.x1,s.x2),maxX=Math.max(s.x1,s.x2);+ if(x<minX-2||x>maxX+2) continue;+ const t=(x-s.x1)/(s.x2-s.x1);+ const ly=s.y1+(s.y2-s.y1)*t;+ if(ly>=y-1 && ly<bestY){ bestY=ly; best={s,ly,t}; }+ }+ return best;+}++function release(){+ if(running) return;+ running=true; gateHit=[false,false,false];+ steps.forEach(s=>s.classList.remove('on'));+ labels.forEach(l=>l.classList.remove('hit'));+ rls.setAttribute('disabled','');+ rls.querySelector('.lbl').textContent='running…';+ hint.textContent='marble in the chute · tripping stages on the way down';+ fnote.textContent='deposit → bridge → landed';++ if(reduce){+ steps.forEach(s=>s.classList.add('on')); labels.forEach(l=>l.classList.add('hit'));+ clk.textContent='landed'; finishRun(); return;+ }+ marble={ x:nx(0.17), y:ny(0.12), vx:24, vy:0, mode:'fall', ramp:null, t:0, speed:0, trail:[] };+ last=0; requestAnimationFrame(step);+}++function tripGate(i){+ if(gateHit[i]) return; gateHit[i]=true;+ steps[i].classList.add('on'); labels[i].classList.add('hit');+ clk.textContent=['deposit','bridge','landed'][i];+}++let last=0;+function step(ts){+ if(!running) return;+ const dt=Math.min(0.032,last?(ts-last)/1000:0.016); last=ts;+ const g=1500, m=marble;+ m.trail.push({x:m.x,y:m.y}); if(m.trail.length>7) m.trail.shift();++ if(m.mode==='ramp'){+ const s=m.ramp, ang=Math.atan2(s.y2-s.y1,s.x2-s.x1);+ m.speed=(m.speed||60)+g*Math.sin(ang)*dt; m.speed*=0.999;+ const len=Math.hypot(s.x2-s.x1,s.y2-s.y1);+ m.t+=(m.speed*dt)/len;+ if(m.t>=1){+ const dirx=Math.cos(ang),diry=Math.sin(ang);+ m.x=s.x2; m.y=s.y2; m.vx=dirx*m.speed; m.vy=diry*m.speed;+ m.mode='fall'; m.ramp=null;+ } else { m.x=s.x1+(s.x2-s.x1)*m.t; m.y=s.y1+(s.y2-s.y1)*m.t; }+ } else {+ m.vy+=g*dt; m.x+=m.vx*dt; m.y+=m.vy*dt;+ if(m.x<nx(0.05)){ m.x=nx(0.05); m.vx=Math.abs(m.vx)*0.5; }+ if(m.x>nx(0.95)){ m.x=nx(0.95); m.vx=-Math.abs(m.vx)*0.5; }+ const hit=nearestRampBelow(m.x,m.y);+ if(hit && m.y>=hit.ly-2 && m.vy>0){+ m.ramp=hit.s; m.t=hit.t; m.mode='ramp';+ m.speed=Math.max(70,Math.hypot(m.vx,m.vy))*0.72; m.y=hit.ly;+ }+ }+ GATES.forEach((gy,i)=>{ if(m.y>=ny(gy)) tripGate(i); });++ if(m.y>=ny(0.90)){+ m.y=Math.min(m.y,ny(0.94));+ m.x += (nx(0.5)-m.x)*0.16; m.vx*=0.55; m.vy*=0.2;+ if(Math.abs(m.x-nx(0.5))<3){ draw(); finishRun(); return; }+ }+ draw();+ requestAnimationFrame(step);+}++function finishRun(){+ running=false;+ steps.forEach(s=>s.classList.add('on')); labels.forEach(l=>l.classList.add('hit'));+ clk.textContent='funded';+ fnote.textContent='wallet funded on 4663 · eth + usdg live · ready to connect';+ rls.classList.add('done'); rls.removeAttribute('disabled');+ rls.querySelector('.lbl').textContent='Release again';+ hint.textContent='every stage tripped · this is the whole hood-connect on-ramp';+}++rls.addEventListener('click',release);+track.addEventListener('click',(e)=>{ if(e.target.closest('.rls')) return; if(!running) release(); });- <script src="hood-connect.iife.js"></script>- <script src="connect-widget.js"></script>- <script>- (function () {- 'use strict'- var HC = window.HoodConnect-- mountConnectWidget(document.getElementById('connect-demo'), { network: 'mainnet' })-- document.getElementById('copy-install').addEventListener('click', function () {- navigator.clipboard.writeText('npm install hood-connect').then(function () {- var button = document.getElementById('copy-install')- button.textContent = 'copied'- setTimeout(function () { button.textContent = 'copy' }, 1500)- })- })-- // Live chain stats from the public RPC (read-only). The public RPC's- // CDN occasionally returns a malformed CORS header from one backend;- // viem retries, and a stale-but-real value beats an error string, so- // failures only show when no reading ever succeeded.- var hood = HC.createHoodClient({ chain: 'mainnet' })- var blockEl = document.getElementById('stat-block')- var usdgEl = document.getElementById('stat-usdg')- var haveBlock = false- var haveUsdg = false-- function refreshBlock() {- hood.public.getBlockNumber().then(function (block) {- haveBlock = true- blockEl.textContent = block.toLocaleString('en-US')- }).catch(function () {- if (!haveBlock) blockEl.textContent = 'rpc busy'- })- }- function refreshUsdg() {- HC.getUsdgTotalSupply(hood).then(function (supply) {- haveUsdg = true- var formatted = Number(HC.formatUsdg(supply))- usdgEl.textContent = '$' + formatted.toLocaleString('en-US', { maximumFractionDigits: 0 })- }).catch(function () {- if (!haveUsdg) usdgEl.textContent = 'rpc busy'- })- }- refreshBlock()- refreshUsdg()- setInterval(refreshBlock, 12000)- setInterval(refreshUsdg, 120000)- })()- </script>+const ro=new ResizeObserver(resize); ro.observe(track);+resize();+</script></body></html>diff --git a/robinhood/hood-connect/docs/robots.txt b/robinhood/hood-connect/docs/robots.txtnew file mode 100644index 000000000..4a7efed90--- /dev/null+++ b/robinhood/hood-connect/docs/robots.txt@@ -0,0 +1,3 @@+User-agent: *+Allow: /+Sitemap: https://nirholas.github.io/hood-connect/sitemap.xmldiff --git a/robinhood/hood-connect/docs/sitemap.xml b/robinhood/hood-connect/docs/sitemap.xmlnew file mode 100644index 000000000..058b6e592--- /dev/null+++ b/robinhood/hood-connect/docs/sitemap.xml@@ -0,0 +1,7 @@+<?xml version="1.0" encoding="UTF-8"?>+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">+ <url><loc>https://nirholas.github.io/hood-connect/</loc><changefreq>weekly</changefreq><priority>1.0</priority></url>+ <url><loc>https://nirholas.github.io/hood-connect/add.html</loc><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://nirholas.github.io/hood-connect/funding.html</loc><changefreq>monthly</changefreq><priority>0.6</priority></url>+ <url><loc>https://nirholas.github.io/hood-connect/guide.html</loc><changefreq>monthly</changefreq><priority>0.6</priority></url>+</urlset>diff --git a/robinhood/hood-connect/netlify.toml b/robinhood/hood-connect/netlify.tomlnew file mode 100644index 000000000..22906a37f--- /dev/null+++ b/robinhood/hood-connect/netlify.toml@@ -0,0 +1,4 @@+# Netlify — publish the static site in docs/.+[build]+ publish = "docs"+ command = ""diff --git a/robinhood/hood-connect/vercel.json b/robinhood/hood-connect/vercel.jsonnew file mode 100644index 000000000..6093773c9--- /dev/null+++ b/robinhood/hood-connect/vercel.json@@ -0,0 +1,6 @@+{+ "$schema": "https://openapi.vercel.sh/vercel.json",+ "outputDirectory": "docs",+ "cleanUrls": true,+ "framework": null+}diff --git a/robinhood/hood-connect/wrangler.toml b/robinhood/hood-connect/wrangler.tomlnew file mode 100644index 000000000..f572a61aa--- /dev/null+++ b/robinhood/hood-connect/wrangler.toml@@ -0,0 +1,4 @@+# Cloudflare Pages — static deploy of the docs/ site.+# Used by the "Deploy to Cloudflare" button and `wrangler pages deploy docs`.+name = "hood-connect"+pages_build_output_dir = "docs"diff --git a/robinhood/hood-mcp/README.md b/robinhood/hood-mcp/README.mdindex 488b75bc8..fe21495a1 100644--- a/robinhood/hood-mcp/README.md+++ b/robinhood/hood-mcp/README.md@@ -6,7 +6,22 @@ Two servers, one package: a **zero-config data server** any MCP client can add ian **explicitly opt-in trading server** for wallets that want to act. Built on[`hoodchain`](https://nirholas.github.io/robinhood-chain-sdk/), the TypeScript SDK for the chain.-Docs: **https://nirholas.github.io/robinhood-chain-mcp/**+Docs: **https://nirholas.github.io/hood-mcp/**++## Website++The docs site (`docs/`) is a single self-contained `index.html` (inline CSS + JS, zero external+requests, works from `file://`). Its centerpiece is an **analog tuning instrument**: a dual-needle+gauge that reads the gap between a Stock Token's Chainlink oracle price and its live DEX price.+Turn the dial to sweep across tickers and the needles swing to the new spread, the number your+agent trades against. Deploy the folder anywhere static:++[](https://dash.cloudflare.com/?to=/:account/pages/new)+[](https://app.netlify.com/start)+[](https://vercel.com/new)++`wrangler.toml`, `netlify.toml`, and `vercel.json` are checked in and all point at `docs/`; on+GitHub Pages, set Settings → Pages → Deploy from a branch → `main` → `/docs`.## Whydiff --git a/robinhood/hood-mcp/docs/404.html b/robinhood/hood-mcp/docs/404.htmlnew file mode 100644index 000000000..220187c9e--- /dev/null+++ b/robinhood/hood-mcp/docs/404.html@@ -0,0 +1,43 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1" />+<title>hood-mcp: needle off scale (404)</title>+<meta name="robots" content="noindex" />+<link rel="canonical" href="https://nirholas.github.io/hood-mcp/" />+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' fill='%230b0b0c'/><g fill='none' stroke='%23e9e6df' stroke-width='2' stroke-linecap='round'><path d='M5 22 A11 11 0 0 1 27 22'/><path d='M16 22 L11 11'/><path d='M16 22 L21 13'/></g><circle cx='16' cy='22' r='2' fill='%23e9e6df'/></svg>" />+<style>+ *{margin:0;padding:0;box-sizing:border-box}+ :root{--ink:#0b0b0c;--paper:#e9e6df;--graphite:#78746c;+ --mono:ui-monospace,"SFMono-Regular","Menlo","Consolas",monospace;+ --grot:"Helvetica Neue","Inter","Arial",system-ui,sans-serif}+ body{background:var(--paper);color:var(--ink);font-family:var(--grot);min-height:100vh;+ display:flex;flex-direction:column;justify-content:center;padding:clamp(24px,6vw,88px);gap:22px}+ .eyebrow{font:600 11px/1 var(--mono);letter-spacing:.34em;text-transform:uppercase;color:var(--graphite)}+ h1{font-size:clamp(48px,11vw,140px);font-weight:700;letter-spacing:-.03em;line-height:.9}+ p{max-width:52ch;font-size:clamp(16px,1.7vw,21px);color:#2b2823;line-height:1.5}+ svg{width:clamp(120px,22vw,200px);height:auto}+ .arc{fill:none;stroke:rgba(11,11,12,.32);stroke-width:1.6}+ .nd{stroke:var(--ink);stroke-width:2.6;stroke-linecap:round;transform-origin:100px 110px;+ animation:swing 3.2s cubic-bezier(.34,1.4,.44,1) infinite alternate}+ @keyframes swing{from{transform:rotate(-58deg)}to{transform:rotate(62deg)}}+ @media(prefers-reduced-motion:reduce){.nd{animation:none;transform:rotate(70deg)}}+ a{display:inline-flex;align-self:flex-start;text-decoration:none;border:1px solid var(--ink);color:var(--ink);+ font:600 12px/1 var(--mono);letter-spacing:.12em;text-transform:uppercase;padding:15px 22px;+ transition:background .25s,color .25s}+ a:hover{background:var(--ink);color:var(--paper)}+</style>+</head>+<body>+ <div class="eyebrow">404 / needle off scale</div>+ <svg viewBox="0 0 200 130" aria-hidden="true">+ <path class="arc" d="M12 110 A88 88 0 0 1 188 110"/>+ <line class="nd" x1="100" y1="110" x2="100" y2="30"/>+ <circle cx="100" cy="110" r="6" fill="#0b0b0c"/>+ </svg>+ <h1>Off the dial.</h1>+ <p>That page isn't in the registry. The instrument only reads pages that exist. Turn back to the premium instrument and pick a ticker.</p>+ <a href="https://nirholas.github.io/hood-mcp/">back to the instrument</a>+</body>+</html>diff --git a/robinhood/hood-mcp/docs/_headers b/robinhood/hood-mcp/docs/_headersnew file mode 100644index 000000000..8ccd12762--- /dev/null+++ b/robinhood/hood-mcp/docs/_headers@@ -0,0 +1,7 @@+/*+ X-Content-Type-Options: nosniff+ Referrer-Policy: strict-origin-when-cross-origin+ Permissions-Policy: geolocation=(), microphone=(), camera=()+ X-Frame-Options: SAMEORIGIN+/*.html+ Cache-Control: public, max-age=0, must-revalidatediff --git a/robinhood/hood-mcp/docs/index.html b/robinhood/hood-mcp/docs/index.htmlindex 43b4cba55..4544ef56e 100644--- a/robinhood/hood-mcp/docs/index.html+++ b/robinhood/hood-mcp/docs/index.html@@ -1,130 +1,619 @@-<title>hood-mcp — MCP servers for Robinhood Chain</title>-<meta name="description" content="Model Context Protocol servers for Robinhood Chain: zero-config Stock Token data plus a guarded, spend-capped trading server for AI agents." />-<meta name="viewport" content="width=device-width, initial-scale=1" />-<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🏹</text></svg>" />-<link rel="stylesheet" href="site.css" />--<nav class="top">- <div class="wrap">- <div class="brand"><span class="tick">hood</span>-mcp</div>- <div class="links">- <a href="index.html" aria-current="page">Overview</a>- <a href="install.html">Install</a>- <a href="tools.html">Tools</a>- <a href="safety.html">Safety model</a>- <a href="https://github.com/nirholas/robinhood-chain-mcp">GitHub</a>- </div>- </div>+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />+<title>hood-mcp: tune the Stock Token premium instrument</title>+<meta name="description" content="MCP servers for Robinhood Chain (chain 4663). Turn the tuning dial and watch a dual-needle instrument read the gap between a Stock Token's Chainlink oracle price and its live DEX price: the premium your agent trades against. A zero-config data server and an opt-in, spend-capped trading server." />+<link rel="canonical" href="https://nirholas.github.io/hood-mcp/" />+<meta name="theme-color" content="#0b0b0c" />+<meta property="og:type" content="website" />+<meta property="og:title" content="hood-mcp: the premium instrument" />+<meta property="og:description" content="A dual-needle analog instrument reads the spread between the Chainlink oracle and the live DEX for every Robinhood Chain Stock Token. Turn the dial. The needles swing. That gap is the trade." />+<meta property="og:url" content="https://nirholas.github.io/hood-mcp/" />+<meta name="twitter:card" content="summary_large_image" />+<meta name="twitter:title" content="hood-mcp: the premium instrument" />+<meta name="twitter:description" content="MCP servers for Robinhood Chain. Tune a dual-needle instrument across Stock Tokens; the gap between oracle and DEX is the premium your agent trades." />+<meta name="twitter:creator" content="@nichxbt" />+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' fill='%230b0b0c'/><g fill='none' stroke='%23e9e6df' stroke-width='2' stroke-linecap='round'><path d='M5 22 A11 11 0 0 1 27 22'/><path d='M16 22 L11 11'/><path d='M16 22 L21 13'/></g><circle cx='16' cy='22' r='2' fill='%23e9e6df'/></svg>" />+<script type="application/ld+json">+{"@context":"https://schema.org","@type":"SoftwareApplication","name":"hood-mcp","applicationCategory":"DeveloperApplication","operatingSystem":"Node.js >= 20","offers":{"@type":"Offer","price":"0","priceCurrency":"USD"},"description":"Model Context Protocol servers for Robinhood Chain (chain ID 4663): a zero-config read-only data server (Stock Token quotes with Chainlink + DEX premium, multiplier-correct portfolios, memecoin launches, chain stats) and an explicitly opt-in trading server (guarded swaps and USDG transfers with hard spend caps and a confirm gate).","softwareVersion":"0.1.0","author":{"@type":"Person","name":"nirholas","url":"https://x.com/nichxbt"},"downloadUrl":"https://www.npmjs.com/package/hood-mcp","codeRepository":"https://github.com/nirholas/robinhood-chain-mcp"}+</script>+<style>+ :root{+ --ink:#0b0b0c; --paper:#e9e6df; --graphite:#78746c; --steel:#4a4842;+ --hair:rgba(11,11,12,.15); --hair2:rgba(11,11,12,.32);+ --mono:ui-monospace,"SFMono-Regular","JetBrains Mono","Menlo","Consolas",monospace;+ --grot:"Helvetica Neue","Inter","Arial",system-ui,sans-serif;+ --ease:cubic-bezier(.16,1,.3,1);+ --needle:cubic-bezier(.34,1.4,.44,1);+ --unit:clamp(14px,1.15vw,19px);+ }+ *{margin:0;padding:0;box-sizing:border-box}+ html{-webkit-text-size-adjust:100%; scroll-behavior:smooth}+ body{+ background:var(--paper); color:var(--ink); font-family:var(--grot);+ font-size:var(--unit); line-height:1.5; overflow-x:hidden;+ -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;+ }+ ::selection{background:var(--ink); color:var(--paper)}+ a{color:inherit}+ .mono{font-family:var(--mono); font-feature-settings:"ss01","zero"}++ /* film grain + scanline */+ body::before{+ content:""; position:fixed; inset:0; z-index:9999; pointer-events:none;+ background:repeating-linear-gradient(0deg,rgba(11,11,12,.035) 0 1px,transparent 1px 3px);+ mix-blend-mode:multiply; opacity:.5;+ }+ .scan{position:fixed; left:0; right:0; height:2px; z-index:9998; pointer-events:none;+ background:linear-gradient(90deg,transparent,rgba(11,11,12,.20),transparent);+ animation:scan 8s linear infinite; will-change:transform}+ @keyframes scan{0%{transform:translateY(-10vh)}100%{transform:translateY(110vh)}}+ @media(prefers-reduced-motion:reduce){.scan{display:none} *{animation-duration:.001s!important; transition-duration:.001s!important}}++ /* rail */+ .rail{position:fixed; left:0; top:0; bottom:0; width:56px; z-index:60;+ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;+ border-right:1px solid var(--hair); background:var(--paper); mix-blend-mode:multiply}+ .rail b{writing-mode:vertical-rl; transform:rotate(180deg); font:600 11px/1 var(--mono);+ letter-spacing:.35em; text-transform:uppercase; color:var(--graphite); position:absolute; top:16px}+ .rail .stn{writing-mode:vertical-rl; font:500 10px/1 var(--mono); letter-spacing:.28em;+ text-transform:uppercase; color:var(--graphite); padding:14px 0; cursor:pointer;+ transition:color .3s var(--ease); text-decoration:none; opacity:.6}+ .rail .stn:hover{color:var(--ink); opacity:1}+ .rail .stn[aria-current="true"]{color:var(--ink); opacity:1}+ .rail .stn::before{content:"";display:block;width:5px;height:5px;border:1px solid var(--hair2);+ border-radius:50%;margin:0 auto 8px;transition:all .3s var(--ease)}+ .rail .stn[aria-current="true"]::before{background:var(--ink);border-color:var(--ink)}+ .rail .carriage{position:absolute;left:-1px;width:2px;background:var(--ink);height:40px;top:0;+ transition:transform .5s var(--ease);will-change:transform}+ main{margin-left:56px}+ @media(max-width:720px){.rail{width:0;border:0}.rail b,.rail .stn,.rail .carriage{display:none}main{margin-left:0}}++ section{position:relative; padding:clamp(60px,9vh,116px) clamp(20px,5vw,88px); border-bottom:1px solid var(--hair)}+ .eyebrow{font:600 11px/1 var(--mono); letter-spacing:.34em; text-transform:uppercase;+ color:var(--graphite); display:flex; align-items:center; gap:12px; margin-bottom:26px}+ .eyebrow::after{content:"";flex:1;height:1px;background:var(--hair)}+ .eyebrow .n{color:var(--ink)}++ h1,h2{font-family:var(--grot); font-weight:700; letter-spacing:-.03em; line-height:.96}+ h1{font-size:clamp(38px,6vw,84px)}+ h2{font-size:clamp(29px,4.8vw,60px)}+ .lede{max-width:60ch; font-size:clamp(17px,1.7vw,23px); line-height:1.42; color:#26241f}++ /* ============ INSTRUMENT (hero + signature interaction) ============ */+ #inst{min-height:100svh; display:flex; flex-direction:column; justify-content:center; padding-top:clamp(48px,7vh,80px); padding-bottom:clamp(30px,4vh,56px)}+ .boot{font:500 12px/1.7 var(--mono); color:var(--graphite); letter-spacing:.04em; margin-bottom:16px; white-space:pre-wrap; min-height:1.7em}+ @media(max-width:720px){.boot{font-size:10.5px; letter-spacing:0}}+ .boot span{display:inline-block; white-space:pre; opacity:0; animation:type .5s var(--ease) forwards}+ @keyframes type{to{opacity:1}}+ #inst .eyebrow{margin-bottom:18px}+ .headline{max-width:15ch}+ .headline .lo{color:var(--graphite)}+ .sub{margin-top:16px; max-width:54ch; font-size:clamp(15px,1.4vw,19px); color:#2b2823}++ .rig{margin-top:clamp(20px,3vh,38px); display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);+ gap:clamp(22px,3.5vw,56px); align-items:center}+ @media(max-width:900px){.rig{grid-template-columns:1fr; gap:26px}}+ @media(min-width:901px){.headline{font-size:clamp(40px,4.6vw,68px)}}++ /* the gauge */+ .gauge{position:relative; width:100%; max-width:500px; margin:0 auto; aspect-ratio:400/258; user-select:none}+ .gauge svg{width:100%; height:100%; display:block; overflow:visible}+ .face-arc{fill:none; stroke:var(--hair2); stroke-width:1.4}+ .face-band{fill:none; stroke:var(--ink); stroke-width:2}+ .tick{stroke:var(--graphite); stroke-width:1}+ .tick.major{stroke:var(--ink); stroke-width:1.6}+ .tick-lab{fill:var(--graphite); font:600 8.5px/1 var(--mono); letter-spacing:.06em}+ .needle{transition:transform .95s var(--needle); transform-box:view-box; transform-origin:200px 220px; will-change:transform}+ @media(prefers-reduced-motion:reduce){.needle{transition:transform .001s}}+ .needle.oracle line{stroke:var(--ink); stroke-width:2.4; stroke-linecap:round}+ .needle.oracle .cw{stroke:var(--paper); stroke-width:5; stroke-linecap:round}+ .needle.dex line{stroke:var(--ink); stroke-width:2.4; stroke-linecap:round; stroke-dasharray:4 4}+ .needle.dex .cw{stroke:var(--paper); stroke-width:6; stroke-linecap:round}+ .hub{fill:var(--ink)}+ .hub-ring{fill:none; stroke:var(--paper); stroke-width:2}+ .lgd{position:absolute; left:0; right:0; bottom:-2px; display:flex; justify-content:center; gap:26px; font:600 10px/1 var(--mono); letter-spacing:.14em; text-transform:uppercase; color:var(--graphite)}+ .lgd i{display:inline-block; width:20px; height:0; border-top:2.4px solid var(--ink); margin-right:8px; vertical-align:middle}+ .lgd i.d{border-top-style:dashed}++ /* readout column */+ .panel{border:1px solid var(--ink); background:transparent}+ .panel .hd{display:flex; justify-content:space-between; align-items:baseline; padding:14px 18px; border-bottom:1px solid var(--hair)}+ .panel .hd .tk{font:700 34px/1 var(--grot); letter-spacing:-.03em}+ @media(max-width:900px){.panel .hd .tk{font-size:28px}}+ .panel .hd .co{font:500 11px/1.3 var(--mono); letter-spacing:.06em; color:var(--graphite); text-align:right; max-width:16ch}+ .rd{display:grid; grid-template-columns:1fr 1fr; border-bottom:1px solid var(--hair)}+ .rd .cell{padding:14px 18px; border-right:1px solid var(--hair)}+ .rd .cell:last-child{border-right:0}+ .rd .k{font:600 9.5px/1 var(--mono); letter-spacing:.2em; text-transform:uppercase; color:var(--graphite)}+ .rd .v{font:600 22px/1 var(--mono); margin-top:9px; font-feature-settings:"zero","ss01"}+ @media(max-width:900px){.rd .v{font-size:19px}}+ .prem{display:flex; align-items:baseline; justify-content:space-between; padding:16px 18px; gap:14px}+ .prem .k{font:600 9.5px/1 var(--mono); letter-spacing:.2em; text-transform:uppercase; color:var(--graphite)}+ .prem .big{font:700 42px/.9 var(--grot); letter-spacing:-.03em; transition:transform .3s var(--ease); display:inline-block}+ @media(max-width:900px){.prem .big{font-size:34px}}+ .prem .tag{font:600 10px/1 var(--mono); letter-spacing:.14em; text-transform:uppercase; border:1px solid var(--ink); padding:6px 10px}+ .prem.disc .tag{background:var(--ink); color:var(--paper)}+ .foot{display:flex; justify-content:space-between; padding:12px 18px; font:500 10.5px/1.4 var(--mono); color:var(--graphite); letter-spacing:.03em; border-top:1px solid var(--hair)}++ /* the tuner dial */+ .tuner{margin-top:clamp(24px,4vh,44px)}+ .tuner .cap{display:flex; align-items:center; gap:12px; font:600 10px/1 var(--mono); letter-spacing:.28em; text-transform:uppercase; color:var(--graphite); margin-bottom:12px}+ .tuner .cap::before{content:"◄"; font-size:8px}+ .tuner .cap span{letter-spacing:.14em; text-transform:none; font-weight:500}+ .dialwrap{position:relative; border:1px solid var(--ink); overflow:hidden; background:rgba(11,11,12,.02); touch-action:pan-y; cursor:grab}+ .dialwrap:active{cursor:grabbing}+ .dialwrap:focus-visible{outline:2px solid var(--ink); outline-offset:2px}+ .dialwrap::before,.dialwrap::after{content:""; position:absolute; top:0; bottom:0; width:64px; z-index:4; pointer-events:none}+ .dialwrap::before{left:0; background:linear-gradient(90deg,var(--paper),transparent)}+ .dialwrap::after{right:0; background:linear-gradient(270deg,var(--paper),transparent)}+ .center-ind{position:absolute; left:50%; top:0; bottom:0; width:0; z-index:5; pointer-events:none; border-left:1.6px solid var(--ink)}+ .center-ind::before,.center-ind::after{content:""; position:absolute; left:-5px; border:5px solid transparent}+ .center-ind::before{top:-1px; border-top-color:var(--ink)}+ .center-ind::after{bottom:-1px; border-bottom-color:var(--ink)}+ .knurl{position:absolute; inset:0; z-index:1; opacity:.5; pointer-events:none;+ background:repeating-linear-gradient(90deg,var(--hair2) 0 1px,transparent 1px 11px)}+ .strip{position:relative; z-index:2; display:flex; align-items:center; height:74px; will-change:transform}+ .stop{flex:0 0 auto; width:96px; text-align:center; cursor:pointer; opacity:.4;+ transition:opacity .3s var(--ease), transform .3s var(--ease)}+ .stop.on{opacity:1; transform:scale(1.06)}+ .stop .t{font:700 17px/1 var(--grot); letter-spacing:-.02em}+ .stop .p{font:600 9.5px/1 var(--mono); letter-spacing:.06em; margin-top:6px; color:var(--graphite)}+ .stop.on .p{color:var(--ink)}++ .scrollcue{margin-top:clamp(20px,4vh,40px); font:600 10px/1 var(--mono); letter-spacing:.3em; text-transform:uppercase; color:var(--graphite); display:flex; align-items:center; gap:10px}+ .scrollcue i{display:block; width:26px; height:1px; background:var(--graphite); position:relative; overflow:hidden}+ .scrollcue i::after{content:"";position:absolute;inset:0;background:var(--ink);animation:sweep 2.4s var(--ease) infinite}+ @keyframes sweep{0%{transform:translateX(-100%)}60%,100%{transform:translateX(100%)}}++ /* panels / grids */+ .cols{display:grid; grid-template-columns:1fr 1fr; gap:clamp(30px,5vw,80px); align-items:start}+ @media(max-width:860px){.cols{grid-template-columns:1fr; gap:34px}}+ .install{border:1px solid var(--ink); background:var(--ink); color:var(--paper); padding:22px 22px;+ font:500 13.5px/1.85 var(--mono); position:relative; overflow-x:auto; word-break:break-word}+ .install .c,.install .p,.install .pc{display:block}+ .install .c{color:#8b8781; margin-top:15px}+ .install .c:first-child{margin-top:0}+ .install .p::before{content:"$ "; color:#8b8781}+ .install .pc{color:var(--paper)}+ .copy{position:absolute; top:12px; right:12px; appearance:none; border:1px solid rgba(233,230,223,.3);+ background:transparent; color:var(--paper); font:600 10px/1 var(--mono); letter-spacing:.14em; padding:7px 11px; cursor:pointer; transition:background .2s}+ .copy:hover{background:rgba(233,230,223,.14)}++ /* two-server split */+ .split{display:grid; grid-template-columns:1fr 1fr; border:1px solid var(--ink); margin-top:12px}+ @media(max-width:760px){.split{grid-template-columns:1fr}}+ .srv{padding:26px 24px 28px; border-right:1px solid var(--hair)}+ .srv:last-child{border-right:0}+ @media(max-width:760px){.srv{border-right:0; border-bottom:1px solid var(--hair)}.srv:last-child{border-bottom:0}}+ .srv .badge{display:inline-block; font:600 10px/1 var(--mono); letter-spacing:.16em; text-transform:uppercase; padding:6px 10px; border:1px solid var(--ink); margin-bottom:16px}+ .srv .badge.hot{background:var(--ink); color:var(--paper)}+ .srv h3{font:700 24px/1.05 var(--grot); letter-spacing:-.02em; margin-bottom:10px}+ .srv p{font-size:15px; color:#2c2925; line-height:1.5; max-width:42ch}+ .srv .cmd{margin-top:16px; font:500 12.5px/1.6 var(--mono); border-top:1px solid var(--hair); padding-top:14px; color:var(--steel); word-break:break-all}+ .srv .cmd b{color:var(--ink); font-weight:600}++ /* tool table as instrument panel */+ .tools{border-top:1px solid var(--hair); margin-top:clamp(24px,4vh,48px)}+ .tools .tr{display:grid; grid-template-columns:220px 1fr; gap:22px; padding:16px 0; border-bottom:1px solid var(--hair); align-items:baseline}+ @media(max-width:640px){.tools .tr{grid-template-columns:1fr; gap:5px}}+ .tools .tr .nm{font:600 13px/1.3 var(--mono); letter-spacing:.02em; color:var(--ink)}+ .tools .tr .ds{font-size:15.5px; color:#2c2925; max-width:60ch}+ .tools .tr .ds b{font-weight:700}++ /* safety fuses */+ .fuse{display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-top:12px}+ @media(max-width:860px){.fuse{grid-template-columns:1fr 1fr}}+ @media(max-width:420px){.fuse{grid-template-columns:1fr}}+ .fuse .f{border:1px solid var(--hair2); padding:18px}+ .fuse .f .h{font:700 13px/1 var(--mono); letter-spacing:.06em; text-transform:uppercase; margin-bottom:9px; display:flex; gap:8px; align-items:baseline}+ .fuse .f .h .no{color:var(--graphite); font-size:10px}+ .fuse .f .b{font-size:14px; color:#2c2925; line-height:1.45}+ .fuse .f .b span{font-family:var(--mono); font-size:12px}++ .btns{display:flex; flex-wrap:wrap; gap:12px; margin-top:26px}+ .btn{appearance:none; text-decoration:none; border:1px solid var(--ink); color:var(--ink); background:transparent;+ font:600 12px/1 var(--mono); letter-spacing:.12em; text-transform:uppercase; padding:15px 22px; cursor:pointer;+ transition:background .25s,color .25s,transform .25s var(--ease)}+ .btn:hover{background:var(--ink); color:var(--paper); transform:translateY(-2px)}+ .btn.solid{background:var(--ink); color:var(--paper)}+ .btn.solid:hover{background:transparent; color:var(--ink)}++ .note{margin-top:22px; border-left:2px solid var(--ink); padding:4px 0 4px 18px; font-size:14.5px; color:#2c2925; max-width:70ch; line-height:1.55}+ .note b{font-weight:700}++ footer{padding:clamp(40px,6vh,72px) clamp(20px,5vw,88px); display:flex; flex-wrap:wrap;+ justify-content:space-between; gap:20px; align-items:flex-end}+ footer .big{font:700 clamp(30px,6vw,72px)/.9 var(--grot); letter-spacing:-.03em}+ footer .meta{font:500 12px/1.7 var(--mono); color:var(--graphite); letter-spacing:.02em; text-align:right}+ footer a{text-decoration:none; border-bottom:1px solid var(--hair2); transition:border-color .2s}+ footer a:hover{border-color:var(--ink)}++ .rise{opacity:0; transform:translateY(22px); transition:opacity .8s var(--ease),transform .8s var(--ease)}+ .rise.in{opacity:1; transform:none}+</style>+</head>+<body>+<div class="scan" aria-hidden="true"></div>++<nav class="rail" aria-label="Sections">+ <b>hood·mcp</b>+ <span class="carriage" id="carriage"></span>+ <a class="stn" href="#inst" aria-current="true">Tune</a>+ <a class="stn" href="#read">Read</a>+ <a class="stn" href="#servers">Servers</a>+ <a class="stn" href="#tools">Tools</a>+ <a class="stn" href="#safety">Safety</a>+ <a class="stn" href="#get">Get it</a></nav>-<main class="wrap">- <section class="hero" style="border-top:none;">- <div class="badges">- <span class="badge">chain 4663</span>- <span class="badge free">data server: free, zero-config</span>- <span class="badge guarded">trading server: opt-in, spend-capped</span>+<main>+ <!-- ============ INSTRUMENT ============ -->+ <section id="inst">+ <p class="boot mono" id="boot"></p>+ <div class="eyebrow"><span class="n">00</span> / THE PREMIUM INSTRUMENT · chain 4663</div>+ <h1 class="headline">The oracle and<br>the market<br><span class="lo">rarely agree.</span></h1>+ <p class="sub">Every Robinhood Chain Stock Token has two prices: what Chainlink says the share is worth, and what the DEX will actually pay. The gap between them is the premium your agent trades against. Turn the dial. Read the instrument.</p>++ <div class="rig">+ <div>+ <div class="gauge" id="gauge" role="img" aria-label="Dual-needle instrument comparing Chainlink oracle price to live DEX price">+ <svg viewBox="0 0 400 258" aria-hidden="true">+ <path class="face-arc" id="arc" d=""/>+ <path class="face-band" id="band" d=""/>+ <g id="ticks"></g>+ <g class="needle dex" id="n-dex">+ <line class="cw" x1="200" y1="220" x2="200" y2="150"/>+ <line x1="200" y1="220" x2="200" y2="66"/>+ </g>+ <g class="needle oracle" id="n-oracle">+ <line class="cw" x1="200" y1="220" x2="200" y2="150"/>+ <line x1="200" y1="220" x2="200" y2="58"/>+ </g>+ <circle class="hub" cx="200" cy="220" r="11"/>+ <circle class="hub-ring" cx="200" cy="220" r="6"/>+ </svg>+ <div class="lgd"><span><i></i>oracle · chainlink</span><span><i class="d"></i>dex · uniswap</span></div>+ </div>+ </div>++ <div>+ <div class="panel" id="panel">+ <div class="hd"><div class="tk" id="p-tk">AAPL</div><div class="co" id="p-co">Apple Inc · tokenized share</div></div>+ <div class="rd">+ <div class="cell"><div class="k">oracle</div><div class="v" id="p-oracle">$0.00</div></div>+ <div class="cell"><div class="k">dex</div><div class="v" id="p-dex">$0.00</div></div>+ </div>+ <div class="prem" id="p-prembox">+ <div><div class="k">premium vs oracle</div><div class="big" id="p-prem">+0.00%</div></div>+ <div class="tag" id="p-tag">premium</div>+ </div>+ <div class="foot"><span id="p-mult">uiMultiplier 1.000000</span><span id="p-liq">liq $0</span></div>+ </div>+ <div class="note" style="margin-top:18px">Numbers are a self-contained demo. Point <span class="mono">get_stock_quote</span> at the live chain for the real feed.</div>+ </div></div>- <h1>MCP servers for <span class="grad">Robinhood Chain</span></h1>- <p class="lede">- Stock Token quotes, multiplier-correct portfolios, memecoin launches, and chain stats —- free and read-only. Plus a separate, explicitly opt-in trading server with hard spend caps- and a confirm gate for agents that want to act, not just look.- </p>- <div class="cta">- <a class="btn primary" href="install.html">Install in 60 seconds</a>- <a class="btn" href="tools.html">Browse tools</a>- <a class="btn" href="https://github.com/nirholas/robinhood-chain-mcp">View source</a>++ <div class="tuner">+ <div class="cap"><span>turn the dial · drag, click a ticker, or ← →</span></div>+ <div class="dialwrap" id="dialwrap" tabindex="0" role="slider" aria-label="Stock Token selector" aria-valuemin="0" aria-valuemax="9" aria-valuenow="0" aria-valuetext="AAPL">+ <div class="knurl" aria-hidden="true"></div>+ <div class="center-ind" aria-hidden="true"></div>+ <div class="strip" id="strip"></div>+ </div></div>++ <div class="scrollcue"><i></i> read the gap</div></section>- <section>- <h2>A real session</h2>- <p class="section-lede">- This is an unedited MCP tool call against the live server in this repo, captured against- Robinhood Chain mainnet during the build — the same stdio transport Claude Code, Claude- Desktop, and Cursor use.- </p>- <div class="transcript">- <div class="bar"><span class="dot"></span><span class="dot"></span><span class="dot"></span> claude · hood-mcp connected</div>- <div class="body">- <div class="user">What's GME trading at on Robinhood Chain, and what's the premium over the oracle price?</div>- <div class="tool-call">→ calling <span class="name">get_stock_quote</span>({ "symbol": "GME" })</div>- <pre class="tool-result">{- "symbol": "GME",- "name": "GameStop • Robinhood Token",- "chainlink": { "priceUsd": 21.76125, "ageSeconds": 169330 },- "dexPriceUsd": 20.521686,- "premiumPct": -5.6962,- "premiumNote": "positive = DEX trades above oracle",- "uiMultiplier": "1000000000000000000",- "underlyingSharePriceUsd": 21.76125,- "sources": ["chainlink", "uniswap-v3", "robinhood-chain-rpc"]-}</pre>- <div class="answer">- The Chainlink oracle prices the GME Stock Token at <strong>$21.76</strong>. It's actually- trading at <strong>$20.52</strong> on the token's Uniswap v3 pool — a- <strong>5.70% discount</strong> to the oracle. The <code>uiMultiplier</code> is- <code>1e18</code> (1:1), so that's also the underlying share price: no split or- reinvested-dividend adjustment has happened yet.+ <!-- ============ READ ============ -->+ <section id="read">+ <div class="eyebrow"><span class="n">01</span> / WHAT THE NEEDLES MEAN</div>+ <div class="cols">+ <div>+ <h2>Two feeds,<br>one truth,<br>one spread.</h2>+ <p class="lede" style="margin-top:22px">The oracle needle reads the Chainlink price feed, the reference the token is supposed to track. The DEX needle reads the live Uniswap v3 mid on Robinhood Chain, what the market will actually fill. When they diverge, an agent that can see both has an edge one that can't will never notice.</p>+ </div>+ <div>+ <div class="tools" style="margin-top:0; border-top:1px solid var(--hair)">+ <div class="tr"><div class="nm">oracle · chainlink</div><div class="ds">The on-chain price feed round data. This is the "should be" number, the underlying share's value, delivered by the same infrastructure the token issuer references.</div></div>+ <div class="tr"><div class="nm">dex · uniswap v3</div><div class="ds">The pool's live mid, read directly on-chain (GeckoTerminal has not indexed chain 4663 yet). This is the "is" number: where a swap clears right now.</div></div>+ <div class="tr"><div class="nm">premium / discount</div><div class="ds"><b>(dex − oracle) ÷ oracle.</b> Positive means the token trades rich to its underlying; negative means it's cheap. Thin liquidity, weekend gaps, and corporate actions all open it.</div></div>+ <div class="tr"><div class="nm">uiMultiplier</div><div class="ds">A split or corporate action changes what a raw balance is worth. <b>get_portfolio</b> reads the multiplier so a position is valued in real shares, never raw units.</div></div></div></div></div></section>- <section>- <h2>Two servers</h2>- <p class="section-lede">One package, two binaries, two very different trust levels.</p>- <div class="grid cols-2">- <div class="card">- <h3>hood-mcp <span class="pill free">free</span></h3>- <p>- 9 read-only tools. No API key, no wallet, no config — runs against the public RPC out- of the box. Stock Token quotes with live oracle + DEX premium, multiplier-correct- portfolios, memecoin data, launch scanning, chain stats.- </p>+ <!-- ============ SERVERS ============ -->+ <section id="servers">+ <div class="eyebrow"><span class="n">02</span> / TWO SERVERS · one package</div>+ <div class="cols">+ <div>+ <h2>A data server<br>anyone can add.<br>A trading server<br>you opt into.</h2>+ <p class="lede" style="margin-top:22px">Point Claude Code, Claude Desktop, Cursor, or any stdio MCP client at it. The data server needs no key, no wallet, no config. It talks to the public Robinhood Chain RPC and answers tool calls immediately. The trading server is a separate binary that refuses to start unless you deliberately turn it on.</p>+ <div class="btns">+ <a class="btn solid" href="https://www.npmjs.com/package/hood-mcp">npm</a>+ <a class="btn" href="https://github.com/nirholas/robinhood-chain-mcp">source</a>+ <a class="btn" href="https://registry.modelcontextprotocol.io">mcp registry</a>+ </div></div>- <div class="card">- <h3>hood-mcp-trading <span class="pill guarded">opt-in</span></h3>- <p>- 4 tools for one configured wallet. Refuses to start without an explicit kill switch.- Every mutating call is spend-capped in USD and requires a second, confirmed call to- broadcast. See the <a href="safety.html">safety model</a>.- </p>+ <div>+ <div class="install">+ <button class="copy" data-copy="add">COPY</button><span class="c"># Claude Code: one line, read-only</span><span class="p" id="cmd-add">claude mcp add hood-mcp -- npx -y hood-mcp</span><span class="c"># any stdio client</span><span class="p">npx -y hood-mcp</span><span class="c"># trading (opt-in, spend-capped)</span><span class="p">HOOD_MCP_ENABLE_TRADING=1 \</span><span class="pc">ROBINHOOD_CHAIN_PRIVATE_KEY=0x… \</span><span class="pc">npx -y hood-mcp-trading</span>+ </div></div></div>- </section>- <section>- <h2>Why this exists</h2>- <p class="section-lede">- Robinhood Chain launched 2026-07-01. As of this build, the ecosystem has exactly two other- MCP servers for the chain — both zero-star, read-only hobby projects a few days old.- This is the productized one: a full data surface plus a trading surface built to a real- safety bar, not a demo.- </p>- <div class="grid cols-3">- <div class="card">- <h3>Multiplier-correct</h3>- <p>Stock Tokens implement ERC-8056. Raw balances understate positions after a split or- reinvested dividend — this server does the share math right, same as the underlying- <code>hoodchain</code> SDK.</p>+ <div class="split">+ <div class="srv">+ <span class="badge">01 · data</span>+ <h3>hood-mcp</h3>+ <p>Zero-config, read-only. stdio by default; pass <span class="mono">--http</span> for Streamable HTTP on port 8730 with <span class="mono">POST /mcp</span> and <span class="mono">GET /health</span>. Nine tools across quotes, portfolios, coins, launches, and chain stats.</p>+ <div class="cmd"><b>npx -y hood-mcp</b> · no key, no wallet</div>+ </div>+ <div class="srv">+ <span class="badge hot">02 · trading</span>+ <h3>hood-mcp-trading</h3>+ <p>A separate binary, stdio only. It will not boot without <b>both</b> <span class="mono">HOOD_MCP_ENABLE_TRADING=1</span> and a private key. Guarded swaps and USDG transfers, every fund-moving call behind a preview and a hard cap.</p>+ <div class="cmd"><b>HOOD_MCP_ENABLE_TRADING=1</b> · refuses to start otherwise</div></div>- <div class="card">- <h3>Real upstreams</h3>- <p>Chainlink, Uniswap v3, Blockscout, GeckoTerminal, DefiLlama — no cached fixtures, no- placeholder data. Every tool call hits the chain or a real API.</p>+ </div>+ </section>++ <!-- ============ TOOLS ============ -->+ <section id="tools">+ <div class="eyebrow"><span class="n">03</span> / THE DATA SURFACE · 9 tools</div>+ <h2>Everything the instrument<br>reads, as a tool call.</h2>+ <p class="lede" style="margin-top:22px">The gauge above is one tool: <span class="mono">get_stock_quote</span>. Here is the rest of the read-only surface, each returning structured JSON an agent can reason over.</p>+ <div class="tools" id="tools-list"></div>+ </section>++ <!-- ============ SAFETY ============ -->+ <section id="safety">+ <div class="eyebrow"><span class="n">04</span> / THE TRADING GUARDS</div>+ <h2>Four gates before<br>anything is signed.</h2>+ <p class="lede" style="margin-top:22px">The trading server moves real value on a real chain: there is no sandbox. So the guards are enforced in code, as thrown errors, not as polite instructions in a prompt.</p>+ <div class="fuse">+ <div class="f"><div class="h"><span class="no">01</span> kill switch</div><div class="b">The process refuses to start without <span>HOOD_MCP_ENABLE_TRADING=1</span>. Off by default, always.</div></div>+ <div class="f"><div class="h"><span class="no">02</span> eligibility gate</div><div class="b">Buying a Stock Token throws unless <span>HOOD_MCP_ACKNOWLEDGE_ELIGIBILITY=1</span>, so they're barred to US/CA/UK/CH persons. Memecoins are unrestricted.</div></div>+ <div class="f"><div class="h"><span class="no">03</span> spend caps</div><div class="b">Every call is valued in USD and checked against <span>MAX_SPEND_USDG</span> (per-call, default 25) and <span>MAX_SESSION_USDG</span> (per-process, default 100) before signing. Fails closed if it can't be priced.</div></div>+ <div class="f"><div class="h"><span class="no">04</span> confirm gate</div><div class="b">The first <span>execute_swap</span> / <span>transfer_usdg</span> returns a simulation and signs nothing. Only a second call with <span>confirm: true</span> and identical args broadcasts.</div></div>+ </div>+ <div class="note"><b>Stock Tokens are tokenized debt securities</b> (issuer: Robinhood Assets (Jersey) Ltd) and may not be offered, sold, or delivered to US persons. Additional limits apply in Canada, the UK, and Switzerland. hood-mcp only <b>displays</b> Stock Token data by default; the eligibility gate exists so acquiring one is a deliberate, acknowledged act. Not affiliated with Robinhood Markets, Inc.</div>+ </section>++ <!-- ============ GET ============ -->+ <section id="get">+ <div class="eyebrow"><span class="n">05</span> / GET IT</div>+ <div class="cols">+ <div>+ <h2>One line to read<br>the whole chain.</h2>+ <p class="lede" style="margin-top:22px">The data server is a single <span class="mono">npx</span> away, no account, no signup. Add the trading binary and two environment variables only when you actually want an agent that can act, behind every guard above.</p>+ <div class="btns">+ <a class="btn solid" href="https://github.com/nirholas/robinhood-chain-mcp#readme">read the docs</a>+ <a class="btn" href="https://nirholas.github.io/robinhood-chain-sdk/">hoodchain sdk</a>+ </div></div>- <div class="card">- <h3>Guarded by default</h3>- <p>The trading server ships with spend caps and a confirm gate on by default. An agent- cannot move funds on the first call, ever.</p>+ <div>+ <div class="install">+ <button class="copy" data-copy="get">COPY</button><span class="c"># add to any MCP client</span><span class="p" id="cmd-get">claude mcp add hood-mcp -- npx -y hood-mcp</span><span class="c"># optional: private RPC + network</span><span class="p">export HOOD_MCP_NETWORK=mainnet</span><span class="p">export ALCHEMY_KEY=…</span><span class="c"># trading, only when you mean it</span><span class="p">export HOOD_MCP_ENABLE_TRADING=1</span><span class="p">export HOOD_MCP_MAX_SPEND_USDG=25</span>+ </div></div></div></section><footer>- Apache License 2.0 © 2026 nirholas · Built by <a href="https://x.com/nichxbt">nirholas</a> ·- <a href="https://three.ws">three.ws</a> ·- <a href="https://github.com/nirholas/robinhood-chain-mcp">github.com/nirholas/robinhood-chain-mcp</a>+ <div class="big">hood-<br>mcp</div>+ <div class="meta">+ MCP · Robinhood Chain 4663 · Node ≥ 20<br>+ <a href="https://github.com/nirholas/robinhood-chain-mcp">github.com/nirholas/robinhood-chain-mcp</a><br>+ <a href="https://www.npmjs.com/package/hood-mcp">npmjs.com/package/hood-mcp</a><br>+ built on <a href="https://nirholas.github.io/robinhood-chain-sdk/">hoodchain</a> by <a href="https://x.com/nichxbt">@nichxbt</a> · not affiliated with Robinhood Markets+ </div></footer></main>++<script>+"use strict";++/* ---------- demo instrument data (clearly a demo) ---------- */+const TOKENS = [+ {t:'AAPL', co:'Apple Inc', oracle:229.42, dex:231.18, liq:'1.9M'},+ {t:'TSLA', co:'Tesla Inc', oracle:248.90, dex:246.10, liq:'2.4M'},+ {t:'NVDA', co:'NVIDIA Corp', oracle:128.55, dex:130.02, liq:'3.1M'},+ {t:'GME', co:'GameStop Corp', oracle:24.18, dex:25.90, liq:'0.6M'},+ {t:'MSTR', co:'MicroStrategy', oracle:168.30, dex:165.02, liq:'0.9M'},+ {t:'COIN', co:'Coinbase Global', oracle:241.77, dex:244.51, liq:'1.2M'},+ {t:'HOOD', co:'Robinhood Markets', oracle:66.40, dex:67.85, liq:'1.5M'},+ {t:'SPY', co:'SPDR S&P 500 ETF', oracle:548.20, dex:549.10, liq:'4.2M'},+ {t:'AMZN', co:'Amazon.com Inc', oracle:184.30, dex:183.05, liq:'2.0M'},+ {t:'META', co:'Meta Platforms', oracle:512.40, dex:517.66, liq:'1.7M'},+];+const RANGE = 0.08; // ±8% maps to full ±120° sweep+const SWEEP = 120; // degrees each side of vertical+const fmt = n => '$' + n.toLocaleString('en-US',{minimumFractionDigits:2,maximumFractionDigits:2});++/* ---------- gauge face geometry ---------- */+const CX=200, CY=220, R=168;+function polar(deg, r){ const a=(deg-90)*Math.PI/180; return [CX+r*Math.cos(a), CY+r*Math.sin(a)]; }+function arcPath(r){+ const [x0,y0]=polar(-SWEEP,r), [x1,y1]=polar(SWEEP,r);+ return `M ${x0.toFixed(1)} ${y0.toFixed(1)} A ${r} ${r} 0 1 1 ${x1.toFixed(1)} ${y1.toFixed(1)}`;+}+(function buildFace(){+ document.getElementById('arc').setAttribute('d', arcPath(R));+ document.getElementById('band').setAttribute('d', arcPath(R-8));+ let s='';+ for(let i=-8;i<=8;i++){+ const deg = i/8*SWEEP;+ const major = (i%4===0);+ const [xa,ya]=polar(deg, R-10), [xb,yb]=polar(deg, R-(major?26:18));+ s += `<line class="tick ${major?'major':''}" x1="${xa.toFixed(1)}" y1="${ya.toFixed(1)}" x2="${xb.toFixed(1)}" y2="${yb.toFixed(1)}"/>`;+ if(major){+ const [lx,ly]=polar(deg, R-42);+ const lab = (i===0?'PAR':(i>0?'+':'')+ (i/8*RANGE*100).toFixed(0)+'%');+ s += `<text class="tick-lab" x="${lx.toFixed(1)}" y="${(ly+3).toFixed(1)}" text-anchor="middle">${lab}</text>`;+ }+ }+ document.getElementById('ticks').innerHTML = s;+})();++function fracToDeg(f){ return (Math.max(0,Math.min(1,f))-0.5)*2*SWEEP; }++const nOracle=document.getElementById('n-oracle'), nDex=document.getElementById('n-dex');+const P = {+ tk:document.getElementById('p-tk'), co:document.getElementById('p-co'),+ oracle:document.getElementById('p-oracle'), dex:document.getElementById('p-dex'),+ prem:document.getElementById('p-prem'), tag:document.getElementById('p-tag'),+ prembox:document.getElementById('p-prembox'), mult:document.getElementById('p-mult'), liq:document.getElementById('p-liq'),+};++let current=0;+function render(i, animate){+ const d = TOKENS[i]; current=i;+ const prem = (d.dex - d.oracle)/d.oracle;+ const dexF = 0.5 + prem/(2*RANGE);+ nOracle.style.transform = `rotate(0deg)`; // oracle = PAR reference+ nDex.style.transform = `rotate(${fracToDeg(dexF).toFixed(2)}deg)`;++ P.tk.textContent = d.t;+ P.co.textContent = d.co + ' · tokenized share';+ P.oracle.textContent = fmt(d.oracle);+ P.dex.textContent = fmt(d.dex);+ const pct = prem*100;+ P.prem.textContent = (pct>=0?'+':'') + pct.toFixed(2) + '%';+ const disc = pct<0;+ P.prembox.classList.toggle('disc', disc);+ P.tag.textContent = disc ? 'discount' : 'premium';+ P.mult.textContent = 'uiMultiplier 1.000000';+ P.liq.textContent = 'liq $' + d.liq;+ if(animate){ P.prem.style.transform='scale(1.09)'; setTimeout(()=>P.prem.style.transform='',190); }+}++/* ---------- the tuner dial ---------- */+const STOP_W = 96;+const strip = document.getElementById('strip');+const dialwrap = document.getElementById('dialwrap');+TOKENS.forEach((d,i)=>{+ const el=document.createElement('div'); el.className='stop'; el.dataset.i=i;+ const prem=((d.dex-d.oracle)/d.oracle*100);+ el.innerHTML = `<div class="t">${d.t}</div><div class="p">${prem>=0?'+':''}${prem.toFixed(1)}%</div>`;+ el.addEventListener('click', ()=>{ if(!moved) select(i,true); });+ strip.appendChild(el);+});+const stops=[...strip.children];++let offset=0, dragging=false, startX=0, startOffset=0, moved=false;++function centerOffsetFor(i){ return dialwrap.clientWidth/2 - (i*STOP_W + STOP_W/2); }+function applyOffset(px, withTransition){+ strip.style.transition = withTransition ? 'transform .55s var(--ease)' : 'none';+ strip.style.transform = `translateX(${px}px)`;+ offset = px;+}+function markActive(i){ stops.forEach((s,k)=>s.classList.toggle('on', k===i)); }+function nearestIndex(){ return Math.round((dialwrap.clientWidth/2 - offset - STOP_W/2)/STOP_W); }+function clampIdx(i){ return Math.max(0, Math.min(TOKENS.length-1, i)); }++function select(i, animate){+ i = clampIdx(i);+ applyOffset(centerOffsetFor(i), true);+ markActive(i);+ render(i, animate);+ dialwrap.setAttribute('aria-valuenow', i);+ dialwrap.setAttribute('aria-valuetext', TOKENS[i].t);+}++dialwrap.addEventListener('pointerdown', e=>{+ dragging=true; moved=false; startX=e.clientX; startOffset=offset;+ strip.style.transition='none'; dialwrap.setPointerCapture(e.pointerId);+});+dialwrap.addEventListener('pointermove', e=>{+ if(!dragging) return;+ const dx=e.clientX-startX; if(Math.abs(dx)>3) moved=true;+ applyOffset(startOffset+dx, false);+ const i=clampIdx(nearestIndex());+ if(i!==current){ markActive(i); render(i,false); }+});+function endDrag(e){+ if(!dragging) return; dragging=false;+ try{ dialwrap.releasePointerCapture(e.pointerId); }catch(_){}+ if(moved){ select(nearestIndex(), true); setTimeout(()=>{moved=false;},0); }+}+dialwrap.addEventListener('pointerup', endDrag);+dialwrap.addEventListener('pointercancel', endDrag);+dialwrap.addEventListener('keydown', e=>{+ if(e.key==='ArrowRight'||e.key==='ArrowDown'){ e.preventDefault(); select(current+1,true); }+ else if(e.key==='ArrowLeft'||e.key==='ArrowUp'){ e.preventDefault(); select(current-1,true); }+ else if(e.key==='Home'){ e.preventDefault(); select(0,true); }+ else if(e.key==='End'){ e.preventDefault(); select(TOKENS.length-1,true); }+});+addEventListener('resize', ()=>{ applyOffset(centerOffsetFor(current), false); });++/* first paint */+render(0,false);+markActive(0);+requestAnimationFrame(()=>{ applyOffset(centerOffsetFor(0), false); setTimeout(()=>render(0,true), 480); });++/* ---------- boot line ---------- */+(function boot(){+ const el=document.getElementById('boot');+ const line='● hoodchain connected · chain 4663 · 95 stock tokens · public rpc · ready';+ [...line].forEach((ch,i)=>{ const s=document.createElement('span'); s.textContent=ch; s.style.animationDelay=(i*12+120)+'ms'; el.appendChild(s); });+})();++/* ---------- tools table ---------- */+const TOOLS = [+ ['get_stock_quote','Chainlink price + Uniswap DEX price + premium/discount + share price for a ticker. <b>The instrument above.</b>'],+ ['get_portfolio','Multiplier-correct Stock Token portfolio + USDG balance for any address, valued in real shares, not raw units.'],+ ['list_stock_tokens','The full 95-token Stock Token registry: ticker, name, contract, Chainlink feed.'],+ ['get_chain_stats','Latest block, gas price, TVL, and network totals for chain 4663.'],+ ['get_coin','Price, volume, liquidity, and holders for any token by address (memecoin or Stock Token).'],+ ['list_trending_coins',"The chain's trending pools right now, ranked."],+ ['get_recent_launches','Recent NOXA + The Odyssey launches, scanned straight from on-chain logs.'],+ ['watch_launches','Watch live for new launches for up to 120 seconds: a streaming tool call.'],+ ['search_token','Find a token by ticker, name, or address across the whole chain.'],+];+const tbody=document.getElementById('tools-list');+TOOLS.forEach(t=>{+ const r=document.createElement('div'); r.className='tr rise';+ r.innerHTML=`<div class="nm">${t[0]}</div><div class="ds">${t[1]}</div>`;+ tbody.appendChild(r);+});++/* ---------- copy buttons ---------- */+document.querySelectorAll('.copy').forEach(btn=>{+ btn.addEventListener('click', ()=>{+ navigator.clipboard.writeText('claude mcp add hood-mcp -- npx -y hood-mcp').then(()=>{+ const t=btn.textContent; btn.textContent='COPIED'; setTimeout(()=>btn.textContent=t,1200);+ }).catch(()=>{});+ });+});++/* ---------- reveal on scroll ---------- */+const io=new IntersectionObserver(es=>{ es.forEach(e=>{ if(e.isIntersecting){ e.target.classList.add('in'); io.unobserve(e.target);} }); },{threshold:.12});+document.querySelectorAll('.rise').forEach((el,i)=>{ el.style.transitionDelay=(i%3*70)+'ms'; io.observe(el); });++/* ---------- rail ---------- */+const stations=[...document.querySelectorAll('.rail .stn')];+const secs=stations.map(a=>document.querySelector(a.getAttribute('href')));+const carriage=document.getElementById('carriage');+function updateRail(){+ let idx=0, mid=innerHeight*0.4;+ secs.forEach((sec,i)=>{ const r=sec.getBoundingClientRect(); if(r.top<=mid) idx=i; });+ stations.forEach((s,i)=>s.setAttribute('aria-current', i===idx));+ const active=stations[idx];+ const railRect=document.querySelector('.rail').getBoundingClientRect();+ const r=active.getBoundingClientRect();+ carriage.style.height=r.height+'px';+ carriage.style.transform=`translateY(${r.top-railRect.top}px)`;+}+stations.forEach(a=>a.addEventListener('click',e=>{ e.preventDefault(); document.querySelector(a.getAttribute('href')).scrollIntoView({behavior:'smooth'}); }));+addEventListener('scroll',()=>requestAnimationFrame(updateRail),{passive:true});+addEventListener('resize',updateRail); updateRail();+</script>+</body>+</html>diff --git a/robinhood/hood-mcp/docs/install.html b/robinhood/hood-mcp/docs/install.htmldeleted file mode 100644index 93a3bf0f8..000000000--- a/robinhood/hood-mcp/docs/install.html+++ /dev/null@@ -1,109 +0,0 @@-<title>Install — hood-mcp</title>-<meta name="description" content="Install hood-mcp in Claude Code, Claude Desktop, Cursor, or any stdio MCP client." />-<meta name="viewport" content="width=device-width, initial-scale=1" />-<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🏹</text></svg>" />-<link rel="stylesheet" href="site.css" />--<nav class="top">- <div class="wrap">- <div class="brand"><span class="tick">hood</span>-mcp</div>- <div class="links">- <a href="index.html">Overview</a>- <a href="install.html" aria-current="page">Install</a>- <a href="tools.html">Tools</a>- <a href="safety.html">Safety model</a>- <a href="https://github.com/nirholas/robinhood-chain-mcp">GitHub</a>- </div>- </div>-</nav>--<main class="wrap prose">- <section style="border-top:none; padding-top:48px;">- <h2 style="font-size:30px;">Install matrix</h2>- <p class="section-lede">- No API key, wallet, or config needed for the data server. Requires Node ≥ 20.- </p>- </section>-- <section>- <h2>Claude Code</h2>- <pre>claude mcp add hood-mcp -- npx -y hood-mcp</pre>- <p style="color:var(--text-dim)">Verify: <code>claude mcp list</code> should show <code>hood-mcp</code> connected.</p>- </section>-- <section>- <h2>Claude Desktop</h2>- <p style="color:var(--text-dim)">Edit your config file:</p>- <ul style="color:var(--text-dim)">- <li>macOS: <code>~/Library/Application Support/Claude/claude_desktop_config.json</code></li>- <li>Windows: <code>%APPDATA%\Claude\claude_desktop_config.json</code></li>- </ul>- <pre>{- "mcpServers": {- "hood-mcp": {- "command": "npx",- "args": ["-y", "hood-mcp"]- }- }-}</pre>- <p style="color:var(--text-dim)">Restart Claude Desktop after saving.</p>- </section>-- <section>- <h2>Cursor</h2>- <p style="color:var(--text-dim)">Add to <code>.cursor/mcp.json</code> in your project (or the global Cursor MCP settings):</p>- <pre>{- "mcpServers": {- "hood-mcp": {- "command": "npx",- "args": ["-y", "hood-mcp"]- }- }-}</pre>- </section>-- <section>- <h2>Any stdio MCP client</h2>- <pre>npx -y hood-mcp</pre>- <p style="color:var(--text-dim)">Speaks MCP over stdio. Pair with any client that supports a stdio transport.</p>- </section>-- <section>- <h2>Streamable HTTP</h2>- <p style="color:var(--text-dim)">- For a hosted deployment or a browser-based client, run the same package over HTTP instead:- </p>- <pre>HOOD_MCP_TRANSPORT=http HOOD_MCP_PORT=8730 npx -y hood-mcp</pre>- <p style="color:var(--text-dim)">- Serves <code>POST /mcp</code> (JSON-RPC, stateless — a fresh server per request) and- <code>GET /health</code>. Point any Streamable-HTTP-capable client at- <code>http://localhost:8730/mcp</code>.- </p>- </section>-- <section>- <h2>Trading server (opt-in)</h2>- <p style="color:var(--text-dim)">- Separate binary, stdio only. Read the <a href="safety.html">safety model</a> first.- </p>- <pre>{- "mcpServers": {- "hood-mcp-trading": {- "command": "npx",- "args": ["-y", "hood-mcp-trading"],- "env": {- "HOOD_MCP_ENABLE_TRADING": "1",- "ROBINHOOD_CHAIN_PRIVATE_KEY": "0xYOUR_KEY",- "HOOD_MCP_MAX_SPEND_USDG": "25",- "HOOD_MCP_MAX_SESSION_USDG": "100"- }- }- }-}</pre>- </section>-- <footer>- Apache License 2.0 © 2026 nirholas · Built by <a href="https://x.com/nichxbt">nirholas</a> ·- <a href="https://three.ws">three.ws</a>- </footer>-</main>diff --git a/robinhood/hood-mcp/docs/robots.txt b/robinhood/hood-mcp/docs/robots.txtnew file mode 100644index 000000000..969b58ae0--- /dev/null+++ b/robinhood/hood-mcp/docs/robots.txt@@ -0,0 +1,3 @@+User-agent: *+Allow: /+Sitemap: https://nirholas.github.io/hood-mcp/sitemap.xmldiff --git a/robinhood/hood-mcp/docs/safety.html b/robinhood/hood-mcp/docs/safety.htmldeleted file mode 100644index a90cdc1be..000000000--- a/robinhood/hood-mcp/docs/safety.html+++ /dev/null@@ -1,152 +0,0 @@-<title>Safety model — hood-mcp</title>-<meta name="description" content="How hood-mcp-trading guards every fund-moving tool call: kill switch, eligibility gate, spend caps, confirm gate." />-<meta name="viewport" content="width=device-width, initial-scale=1" />-<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🏹</text></svg>" />-<link rel="stylesheet" href="site.css" />--<nav class="top">- <div class="wrap">- <div class="brand"><span class="tick">hood</span>-mcp</div>- <div class="links">- <a href="index.html">Overview</a>- <a href="install.html">Install</a>- <a href="tools.html">Tools</a>- <a href="safety.html" aria-current="page">Safety model</a>- <a href="https://github.com/nirholas/robinhood-chain-mcp">GitHub</a>- </div>- </div>-</nav>--<main class="wrap">- <section style="border-top:none; padding-top:48px;">- <h2 style="font-size:30px;">Safety model</h2>- <p class="section-lede">- <code>hood-mcp</code> (the data server) never signs anything — every tool is read-only.- <code>hood-mcp-trading</code> is a separate opt-in binary with four gates, in this order,- before a single wei moves.- </p>- </section>-- <section>- <h2>The four gates</h2>- <ol class="gate-list">- <li>- <div class="num">1</div>- <div>- <h3>Kill switch — the process itself</h3>- <p>- <code>hood-mcp-trading</code> checks <code>HOOD_MCP_ENABLE_TRADING === "1"</code>- before it even connects to the MCP transport. Set a wallet key without this and the- process throws on startup and exits — it will not silently run read-only.- </p>- </div>- </li>- <li>- <div class="num">2</div>- <div>- <h3>Eligibility gate — Stock Token acquisitions</h3>- <p>- Stock Tokens are tokenized debt securities (issuer: Robinhood Assets (Jersey) Ltd)- and may not be offered, sold, or delivered to US persons (additional limits: Canada,- UK, Switzerland). Any swap whose <em>output</em> is a canonical Stock Token throws- unless <code>HOOD_MCP_ACKNOWLEDGE_ELIGIBILITY=1</code> — the operator's explicit- affirmation of eligibility. Selling a Stock Token, and all memecoin trades, are never- gated by this.- </p>- </div>- </li>- <li>- <div class="num">3</div>- <div>- <h3>Spend caps — checked before signing</h3>- <p>- Every mutating call is valued in USD (via USDG) and checked against- <code>HOOD_MCP_MAX_SPEND_USDG</code> (per single call, default $25) and- <code>HOOD_MCP_MAX_SESSION_USDG</code> (cumulative for the process's lifetime,- default $100). The check runs <strong>before</strong> anything is signed — a- rejected call never reaches the wallet. On mainnet, a spend with no USDG price route- is rejected outright rather than treated as zero-value.- </p>- </div>- </li>- <li>- <div class="num">4</div>- <div>- <h3>Confirm gate — every mutating tool, every time</h3>- <p>- <code>execute_swap</code> and <code>transfer_usdg</code> always return a simulation- (recipient, amount, token, minimum received, session budget remaining) on the first- call. <strong>Nothing is broadcast</strong> until the exact same call is repeated- with <code>confirm: true</code>. There is no "trust me" flag — an agent (or the- human behind it) sees the concrete numbers before anything moves.- </p>- </div>- </li>- </ol>- </section>-- <section>- <h2>What a blocked call looks like</h2>- <div class="flow">- <div class="step">execute_swap(tokenOut: "AAPL")</div>- <span class="arrow">→</span>- <div class="step blocked">eligibility not acknowledged</div>- <span class="arrow">→</span>- <div class="step blocked">isError: true, nothing signed</div>- </div>- <div class="flow">- <div class="step">execute_swap(amountIn: "1000 USDG")</div>- <span class="arrow">→</span>- <div class="step blocked">$1000 > $25 per-call cap</div>- <span class="arrow">→</span>- <div class="step blocked">isError: true, nothing signed</div>- </div>- <div class="flow">- <div class="step">execute_swap(amountIn: "10 USDG")</div>- <span class="arrow">→</span>- <div class="step ok">under cap, simulation returned</div>- <span class="arrow">→</span>- <div class="step">confirm: true</div>- <span class="arrow">→</span>- <div class="step ok">broadcast, receipt returned</div>- </div>- <p style="color:var(--text-dim); font-size:13.5px;">- Every path above is exercised by real tests against live network reads — see- <code>tests/trading-guards.test.ts</code> in the repo.- </p>- </section>-- <section>- <h2>What's NOT guarded</h2>- <p class="section-lede" style="max-width:none;">- Be precise about the boundary. These are true regardless of caps or gates:- </p>- <div class="grid cols-2">- <div class="card">- <h3>Slippage is your risk, not a cap</h3>- <p><code>slippageBps</code> defaults to 50 (0.5%) but is caller-controlled up to 5000- (50%). A high slippage tolerance can still result in a bad fill within your USD cap.</p>- </div>- <div class="card">- <h3>The session cap resets on restart</h3>- <p><code>HOOD_MCP_MAX_SESSION_USDG</code> is an in-memory counter. Restarting the- trading server process resets it to zero — it is not a persistent ledger.</p>- </div>- <div class="card">- <h3>The wallet key is the real boundary</h3>- <p>Anyone with <code>ROBINHOOD_CHAIN_PRIVATE_KEY</code> can bypass this server entirely- and sign directly. Treat the key with the same care you would give any hot wallet key.</p>- </div>- <div class="card">- <h3>Testnet spends are unvalued, not uncapped</h3>- <p>Testnet assets have no USD price, so their notional counts as $0 against the cap — the- confirm gate is the real guard there, not the dollar limit.</p>- </div>- </div>- </section>-- <footer>- Apache License 2.0 © 2026 nirholas · Built by <a href="https://x.com/nichxbt">nirholas</a> ·- <a href="https://three.ws">three.ws</a>- </footer>-</main>diff --git a/robinhood/hood-mcp/docs/site.css b/robinhood/hood-mcp/docs/site.cssdeleted file mode 100644index def790af2..000000000--- a/robinhood/hood-mcp/docs/site.css+++ /dev/null@@ -1,192 +0,0 @@-/* hood-mcp docs — dark-first, one accent gradient, system type stack */-:root {- --bg: #0a0a0c;- --bg-raised: #121216;- --bg-inset: #0e0e11;- --border: #232329;- --border-strong: #34343c;- --text: #ededf0;- --text-dim: #9c9ca6;- --text-faint: #62626c;- --accent-a: #ffb454;- --accent-b: #ff6b6b;- --accent-grad: linear-gradient(96deg, var(--accent-a), var(--accent-b));- --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;- --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;- --up: #6fe08a;- --down: #f26d7e;- --warn: #ffb454;-}-@media (prefers-color-scheme: light) {- :root {- --bg: #fafafa;- --bg-raised: #ffffff;- --bg-inset: #f2f2f4;- --border: #e4e4e8;- --border-strong: #d0d0d6;- --text: #17171a;- --text-dim: #55555f;- --text-faint: #8a8a94;- }-}-:root[data-theme='dark'] {- --bg: #0a0a0c; --bg-raised: #121216; --bg-inset: #0e0e11;- --border: #232329; --border-strong: #34343c;- --text: #ededf0; --text-dim: #9c9ca6; --text-faint: #62626c;-}-:root[data-theme='light'] {- --bg: #fafafa; --bg-raised: #ffffff; --bg-inset: #f2f2f4;- --border: #e4e4e8; --border-strong: #d0d0d6;- --text: #17171a; --text-dim: #55555f; --text-faint: #8a8a94;-}-* { box-sizing: border-box; }-html { scroll-behavior: smooth; }-body {- margin: 0;- background: var(--bg);- color: var(--text);- font: 15px/1.6 var(--sans);- -webkit-font-smoothing: antialiased;-}-a { color: inherit; text-decoration: none; }-a.inline, .prose a { color: var(--accent-a); }-a:hover { color: var(--accent-a); }-a:focus-visible, button:focus-visible, input:focus-visible {- outline: 2px solid var(--accent-b);- outline-offset: 2px;- border-radius: 4px;-}-code, pre { font-family: var(--mono); font-size: 0.86em; }-pre {- background: var(--bg-inset);- border: 1px solid var(--border);- border-radius: 10px;- padding: 16px 18px;- overflow-x: auto;- line-height: 1.55;-}-code:not(pre code) {- background: var(--bg-raised);- border: 1px solid var(--border);- border-radius: 5px;- padding: 1px 6px;-}--.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }--nav.top {- position: sticky; top: 0; z-index: 10;- background: color-mix(in srgb, var(--bg) 82%, transparent);- backdrop-filter: blur(12px);- border-bottom: 1px solid var(--border);-}-nav.top .wrap { display: flex; align-items: center; gap: 22px; height: 56px; }-.brand { font-weight: 700; letter-spacing: -0.02em; font-size: 16px; }-.brand .tick { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }-nav.top .links { display: flex; gap: 18px; margin-left: auto; font-size: 14px; color: var(--text-dim); }-nav.top .links a { padding: 4px 2px; transition: color 0.15s ease; }-nav.top .links a[aria-current='page'] { color: var(--text); }--.hero { padding: 72px 0 36px; }-.hero h1 {- font-size: clamp(28px, 5vw, 48px);- line-height: 1.08;- letter-spacing: -0.035em;- margin: 0 0 14px;- font-weight: 750;-}-.hero h1 .grad { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }-.hero p.lede { color: var(--text-dim); font-size: 17px; max-width: 640px; margin: 0 0 26px; }-.cta { display: flex; gap: 12px; flex-wrap: wrap; }-.btn {- display: inline-flex; align-items: center; gap: 8px;- border-radius: 8px; padding: 9px 18px; font-size: 14px; font-weight: 600;- border: 1px solid var(--border-strong);- transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;-}-.btn:hover { border-color: var(--accent-a); transform: translateY(-1px); }-.btn.primary { background: var(--accent-grad); color: #14100a; border-color: transparent; }-.btn.primary:hover { color: #14100a; filter: brightness(1.05); }--.badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 22px; }-.badge {- font: 12px/1 var(--mono); padding: 5px 9px; border-radius: 6px;- background: var(--bg-raised); border: 1px solid var(--border); color: var(--text-dim);-}-.badge.free { color: var(--up); border-color: color-mix(in srgb, var(--up) 40%, var(--border)); }-.badge.guarded { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); }--section { padding: 40px 0; border-top: 1px solid var(--border); }-section > h2 { font-size: 22px; letter-spacing: -0.02em; margin: 0 0 6px; }-section > p.section-lede { color: var(--text-dim); margin: 0 0 26px; max-width: 680px; }--.grid { display: grid; gap: 14px; }-.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }-.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }-@media (max-width: 860px) { .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }--.card {- background: var(--bg-raised); border: 1px solid var(--border); border-radius: 12px;- padding: 18px 20px;-}-.card h3 { margin: 0 0 6px; font-size: 15px; }-.card p { margin: 0; color: var(--text-dim); font-size: 13.5px; }-.card code { font-size: 12px; }--table { width: 100%; border-collapse: collapse; font-size: 13.5px; }-th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }-th { color: var(--text-faint); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }-tr:last-child td { border-bottom: none; }-.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }-.table-scroll table { border: none; }--.transcript {- background: var(--bg-inset); border: 1px solid var(--border); border-radius: 14px;- padding: 0; overflow: hidden;-}-.transcript .bar {- display: flex; align-items: center; gap: 8px; padding: 10px 14px;- border-bottom: 1px solid var(--border); color: var(--text-faint); font: 12px var(--mono);-}-.transcript .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }-.transcript .body { padding: 18px 20px; font: 13.5px/1.7 var(--mono); }-.transcript .user { color: var(--text); }-.transcript .user::before { content: '❯ '; color: var(--accent-a); }-.transcript .tool-call { color: var(--text-faint); margin: 10px 0 4px; }-.transcript .tool-call .name { color: var(--accent-b); }-.transcript pre.tool-result {- background: var(--bg); border: 1px solid var(--border); border-radius: 8px;- padding: 12px 14px; margin: 0 0 14px; max-height: 340px; overflow: auto;-}-.transcript .answer { color: var(--text-dim); }-.transcript .answer strong { color: var(--text); }--.flow {- display: flex; align-items: center; gap: 10px; flex-wrap: wrap;- font: 13px var(--mono); margin: 20px 0;-}-.flow .step {- border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; background: var(--bg-raised);-}-.flow .step.blocked { border-color: color-mix(in srgb, var(--down) 50%, var(--border)); color: var(--down); }-.flow .step.ok { border-color: color-mix(in srgb, var(--up) 50%, var(--border)); color: var(--up); }-.flow .arrow { color: var(--text-faint); }--.gate-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }-.gate-list li {- display: grid; grid-template-columns: 34px 1fr; gap: 12px;- border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--bg-raised);-}-.gate-list .num {- width: 34px; height: 34px; border-radius: 50%; background: var(--accent-grad);- color: #14100a; font-weight: 700; display: flex; align-items: center; justify-content: center;-}-.gate-list h3 { margin: 0 0 4px; font-size: 14.5px; }-.gate-list p { margin: 0; color: var(--text-dim); font-size: 13.5px; }--footer { padding: 40px 0 60px; color: var(--text-faint); font-size: 13px; border-top: 1px solid var(--border); }-footer a:hover { color: var(--accent-a); }--.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }-.pill.free { background: color-mix(in srgb, var(--up) 18%, transparent); color: var(--up); }-.pill.guarded { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }diff --git a/robinhood/hood-mcp/docs/sitemap.xml b/robinhood/hood-mcp/docs/sitemap.xmlnew file mode 100644index 000000000..1c41efb62--- /dev/null+++ b/robinhood/hood-mcp/docs/sitemap.xml@@ -0,0 +1,4 @@+<?xml version="1.0" encoding="UTF-8"?>+<urlset xmlns="http://www.sitemap.org/schemas/sitemap/0.9">+ <url><loc>https://nirholas.github.io/hood-mcp/</loc><changefreq>weekly</changefreq><priority>1.0</priority></url>+</urlset>diff --git a/robinhood/hood-mcp/docs/tools.html b/robinhood/hood-mcp/docs/tools.htmldeleted file mode 100644index 411a502b5..000000000--- a/robinhood/hood-mcp/docs/tools.html+++ /dev/null@@ -1,126 +0,0 @@-<title>Tools — hood-mcp</title>-<meta name="description" content="Full tool reference for hood-mcp, generated from the servers' live registered schemas." />-<meta name="viewport" content="width=device-width, initial-scale=1" />-<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🏹</text></svg>" />-<link rel="stylesheet" href="site.css" />--<nav class="top">- <div class="wrap">- <div class="brand"><span class="tick">hood</span>-mcp</div>- <div class="links">- <a href="index.html">Overview</a>- <a href="install.html">Install</a>- <a href="tools.html" aria-current="page">Tools</a>- <a href="safety.html">Safety model</a>- <a href="https://github.com/nirholas/hood-mcp">GitHub</a>- </div>- </div>-</nav>--<main class="wrap">- <section style="border-top:none; padding-top:48px;">- <h2 style="font-size:30px;">Tool reference</h2>- <p class="section-lede">- Generated directly from each server's live registered tool schemas — this page cannot- drift from the actual tools. Regenerate with <code>node scripts/generate-tools-doc.mjs</code>.- </p>- </section>-- <section>- <h2>hood-mcp — data server (9 tools)</h2>- <p class="section-lede">Zero-config, read-only, no wallet required.</p>- <div class="card" style="margin-bottom:14px;">- <h3><code>get_chain_stats</code> <span class="pill free">free</span></h3>- <p>Live Robinhood Chain overview: latest block, gas price, TVL, and network totals (blocks, addresses, transactions, block time). No inputs.</p>- <p style="color:var(--text-faint);font-size:13px;">No parameters.</p>-</div>-<div class="card" style="margin-bottom:14px;">- <h3><code>list_stock_tokens</code> <span class="pill free">free</span></h3>- <p>The registry of tokenized-equity Stock Tokens on Robinhood Chain (ticker, name, contract, Chainlink feed). Set pricedOnly to return only tokens with a live feed.</p>- <div class="table-scroll"><table><thead><tr><th>Param</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>pricedOnly</code></td><td><code>boolean</code></td><td>Only tokens with a Chainlink price feed.</td></tr>-<tr><td><code>limit</code></td><td><code>integer</code></td><td>Max entries (default all).</td></tr>-<tr><td><code>offset</code></td><td><code>integer</code></td><td>Skip this many (pagination).</td></tr></tbody></table></div>-</div>-<div class="card" style="margin-bottom:14px;">- <h3><code>get_stock_quote</code> <span class="pill free">free</span></h3>- <p>Price a Stock Token by ticker: the Chainlink oracle price, the on-chain Uniswap DEX mid price, the premium/discount between them, and the ERC-8056 multiplier (so you also get the underlying share price).</p>- <div class="table-scroll"><table><thead><tr><th>Param</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>symbol</code> <span style="color:var(--down);font-size:11px;">required</span></td><td><code>string</code></td><td>Ticker, e.g. "AAPL" or "TSLA" (case-insensitive).</td></tr>-<tr><td><code>maxAgeSeconds</code></td><td><code>integer</code></td><td>Reject the Chainlink answer if older than this (default 3 days; 24/5 feeds).</td></tr></tbody></table></div>-</div>-<div class="card" style="margin-bottom:14px;">- <h3><code>get_portfolio</code> <span class="pill free">free</span></h3>- <p>Multiplier-correct Stock Token portfolio for any address: per-position token balance, ERC-8056 share-equivalent, USD value, plus the USDG cash balance. Read-only.</p>- <div class="table-scroll"><table><thead><tr><th>Param</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>address</code> <span style="color:var(--down);font-size:11px;">required</span></td><td><code>string</code></td><td>Wallet address (0x…40 hex) to value.</td></tr></tbody></table></div>-</div>-<div class="card" style="margin-bottom:14px;">- <h3><code>get_coin</code> <span class="pill free">free</span></h3>- <p>Detail for any Robinhood Chain token by contract address: price, 24h volume, liquidity, FDV, holder count, and whether it is a registered Stock Token.</p>- <div class="table-scroll"><table><thead><tr><th>Param</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>address</code> <span style="color:var(--down);font-size:11px;">required</span></td><td><code>string</code></td><td>Token contract address (0x…40 hex).</td></tr></tbody></table></div>-</div>-<div class="card" style="margin-bottom:14px;">- <h3><code>list_trending_coins</code> <span class="pill free">free</span></h3>- <p>The trending pools on Robinhood Chain right now (memecoins and stocks) with price, 24h volume, price change, and liquidity — the pulse of the chain.</p>- <div class="table-scroll"><table><thead><tr><th>Param</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>limit</code></td><td><code>integer</code></td><td>How many (default 10, max 30).</td></tr></tbody></table></div>-</div>-<div class="card" style="margin-bottom:14px;">- <h3><code>get_recent_launches</code> <span class="pill free">free</span></h3>- <p>Recently launched tokens on Robinhood Chain launchpads (NOXA and The Odyssey), newest first, scanned from on-chain logs.</p>- <div class="table-scroll"><table><thead><tr><th>Param</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>lookbackBlocks</code></td><td><code>integer</code></td><td>Blocks to scan back (~30k ≈ 1h; default 30000).</td></tr>-<tr><td><code>launchpad</code></td><td><code>string</code></td><td>Restrict to one launchpad.</td></tr>-<tr><td><code>limit</code></td><td><code>integer</code></td><td>Max launches to return (default 25).</td></tr></tbody></table></div>-</div>-<div class="card" style="margin-bottom:14px;">- <h3><code>watch_launches</code> <span class="pill free">free</span></h3>- <p>Watch NOXA + The Odyssey live for new token launches, blocking up to waitSeconds (or until limit launches are seen), then returns what appeared. Falls back to the most recent launch if none fire in the window.</p>- <div class="table-scroll"><table><thead><tr><th>Param</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>waitSeconds</code></td><td><code>integer</code></td><td>How long to watch (default 20, max 120).</td></tr>-<tr><td><code>launchpad</code></td><td><code>string</code></td><td>Restrict to one launchpad.</td></tr>-<tr><td><code>limit</code></td><td><code>integer</code></td><td>Stop early after this many (default 20).</td></tr>-<tr><td><code>includeRecentIfEmpty</code></td><td><code>boolean</code></td><td>If nothing launches in the window, return the latest recent launch (default true).</td></tr></tbody></table></div>-</div>-<div class="card" style="margin-bottom:14px;">- <h3><code>search_token</code> <span class="pill free">free</span></h3>- <p>Find tokens on Robinhood Chain by ticker, name, or contract address — searches the Stock Token registry and the Blockscout index together.</p>- <div class="table-scroll"><table><thead><tr><th>Param</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>query</code> <span style="color:var(--down);font-size:11px;">required</span></td><td><code>string</code></td><td>Ticker, name fragment, or 0x address.</td></tr>-<tr><td><code>limit</code></td><td><code>integer</code></td><td>Max results (default 20).</td></tr></tbody></table></div>-</div>- </section>-- <section>- <h2>hood-mcp-trading — wallet server (4 tools)</h2>- <p class="section-lede">Requires <code>HOOD_MCP_ENABLE_TRADING=1</code> + a wallet key. See the <a href="safety.html">safety model</a>.</p>- <div class="card" style="margin-bottom:14px;">- <h3><code>get_my_portfolio</code> <span class="pill free">read-only</span></h3>- <p>This wallet's holdings on Robinhood Chain: native ETH (gas), USDG cash, and every Stock Token position with multiplier-correct USD value. Read-only.</p>- <p style="color:var(--text-faint);font-size:13px;">No parameters.</p>-</div>-<div class="card" style="margin-bottom:14px;">- <h3><code>get_swap_quote</code> <span class="pill free">read-only</span></h3>- <p>Quote a Uniswap swap on Robinhood Chain without signing: best route, expected output, minimum received at your slippage, and the USD value of the input. Tokens are addresses, Stock Token tickers, or USDG/WETH.</p>- <div class="table-scroll"><table><thead><tr><th>Param</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>tokenIn</code> <span style="color:var(--down);font-size:11px;">required</span></td><td><code>string</code></td><td>Input token: address, ticker (e.g. TSLA), or USDG/WETH.</td></tr>-<tr><td><code>tokenOut</code> <span style="color:var(--down);font-size:11px;">required</span></td><td><code>string</code></td><td>Output token: address, ticker, or USDG/WETH.</td></tr>-<tr><td><code>amountIn</code> <span style="color:var(--down);font-size:11px;">required</span></td><td><code>string</code></td><td>Human amount of tokenIn, e.g. "100" or "0.05".</td></tr>-<tr><td><code>slippageBps</code></td><td><code>integer</code></td><td>Slippage tolerance in bps (default 50 = 0.5%).</td></tr></tbody></table></div>-</div>-<div class="card" style="margin-bottom:14px;">- <h3><code>execute_swap</code> <span class="pill guarded">guarded</span></h3>- <p>Swap tokens on Robinhood Chain. First call returns a SIMULATION and requires confirm=true to broadcast. Spend is hard-capped in USD; Stock Token BUYS require eligibility. Approves the router automatically if needed.</p>- <div class="table-scroll"><table><thead><tr><th>Param</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>tokenIn</code> <span style="color:var(--down);font-size:11px;">required</span></td><td><code>string</code></td><td>Input token: address, ticker, or USDG/WETH.</td></tr>-<tr><td><code>tokenOut</code> <span style="color:var(--down);font-size:11px;">required</span></td><td><code>string</code></td><td>Output token: address, ticker, or USDG/WETH.</td></tr>-<tr><td><code>amountIn</code> <span style="color:var(--down);font-size:11px;">required</span></td><td><code>string</code></td><td>Human amount of tokenIn to spend, e.g. "10".</td></tr>-<tr><td><code>slippageBps</code></td><td><code>integer</code></td><td>Slippage tolerance in bps (default 50).</td></tr>-<tr><td><code>confirm</code></td><td><code>boolean</code></td><td>Must be true to actually broadcast. Omit/false to preview.</td></tr></tbody></table></div>-</div>-<div class="card" style="margin-bottom:14px;">- <h3><code>transfer_usdg</code> <span class="pill guarded">guarded</span></h3>- <p>Send USDG to an address. First call returns a preview and requires confirm=true to broadcast. The amount is hard-capped in USD by the same spend limits.</p>- <div class="table-scroll"><table><thead><tr><th>Param</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>to</code> <span style="color:var(--down);font-size:11px;">required</span></td><td><code>string</code></td><td>Recipient address (0x…40 hex).</td></tr>-<tr><td><code>amount</code> <span style="color:var(--down);font-size:11px;">required</span></td><td><code>string</code></td><td>Human USDG amount, e.g. "5.00".</td></tr>-<tr><td><code>confirm</code></td><td><code>boolean</code></td><td>Must be true to actually broadcast. Omit/false to preview.</td></tr></tbody></table></div>-</div>- </section>-- <footer>- Apache License 2.0 © 2026 nirholas · Built by <a href="https://x.com/nichxbt">nirholas</a> ·- <a href="https://three.ws">three.ws</a>- </footer>-</main>diff --git a/robinhood/hood-mcp/netlify.toml b/robinhood/hood-mcp/netlify.tomlnew file mode 100644index 000000000..22906a37f--- /dev/null+++ b/robinhood/hood-mcp/netlify.toml@@ -0,0 +1,4 @@+# Netlify — publish the static site in docs/.+[build]+ publish = "docs"+ command = ""diff --git a/robinhood/hood-mcp/vercel.json b/robinhood/hood-mcp/vercel.jsonnew file mode 100644index 000000000..6093773c9--- /dev/null+++ b/robinhood/hood-mcp/vercel.json@@ -0,0 +1,6 @@+{+ "$schema": "https://openapi.vercel.sh/vercel.json",+ "outputDirectory": "docs",+ "cleanUrls": true,+ "framework": null+}diff --git a/robinhood/hood-mcp/wrangler.toml b/robinhood/hood-mcp/wrangler.tomlnew file mode 100644index 000000000..2060dbfa6--- /dev/null+++ b/robinhood/hood-mcp/wrangler.toml@@ -0,0 +1,4 @@+# Cloudflare Pages — static deploy of the docs/ site.+# Used by the "Deploy to Cloudflare" button and `wrangler pages deploy docs`.+name = "hood-mcp"+pages_build_output_dir = "docs"diff --git a/robinhood/hood-pay/README.md b/robinhood/hood-pay/README.mdindex 9d742647c..48d68b2cf 100644--- a/robinhood/hood-pay/README.md+++ b/robinhood/hood-pay/README.md@@ -13,6 +13,22 @@ usable on its own:- **Verify** (`hood-pay/verify`, Node-only): a reorg-safe on-chain payment watcher, an idempotentSQLite ledger, signed webhooks, and refund helpers for the merchant side.+## Website — [nirholas.github.io/hood-pay](https://nirholas.github.io/hood-pay/)++The project site is an interactive **thermal receipt printer**: the whole page is one long receipt tape. Type an amount and ring up a sale, and a real payment link (the exact base64url URL-fragment codec this package uses), the direct-mode dust fingerprint, and a real 32-byte router reference print onto the tape line by line, then the reorg-safe watcher settles it to `PAID`. Everything runs client-side, nothing is sent anywhere. It is a single self-contained page in [`docs/`](docs/), so it deploys anywhere static.++Deploy your own copy in one click:++[](https://deploy.workers.cloudflare.com/?url=https://github.com/nirholas/hood-pay)+[](https://app.netlify.com/start/deploy?repository=https://github.com/nirholas/hood-pay)+[](https://vercel.com/new/clone?repository-url=https://github.com/nirholas/hood-pay&project-name=hood-pay&output-directory=docs)++| Target | How |+| --- | --- |+| **GitHub Pages** | Settings → Pages → Source: `main` / `/docs`. Serves at `nirholas.github.io/hood-pay/`. No build step. |+| **Cloudflare Pages** | The button above, or `wrangler pages deploy docs`. Config in [`wrangler.toml`](wrangler.toml). |+| **Netlify / Vercel** | The buttons above. Publish directory is `docs/` ([`netlify.toml`](netlify.toml), [`vercel.json`](vercel.json)). |+USDG (Robinhood Chain's dollar stablecoin) is a plain ERC-20 whose `transfer` carries no memo orinvoice-reference field. A bare `transfer` cannot say which invoice it settles. hood-pay solves that two ways: **routermode**, where the buyer pays through the stateless, non-custodial `HoodPayRouter` contractdiff --git a/robinhood/hood-pay/docs/404.html b/robinhood/hood-pay/docs/404.htmlnew file mode 100644index 000000000..fdafa5416--- /dev/null+++ b/robinhood/hood-pay/docs/404.html@@ -0,0 +1,43 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />+<title>hood-pay — receipt not found</title>+<meta name="robots" content="noindex" />+<link rel="canonical" href="https://nirholas.github.io/hood-pay/" />+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' fill='%23141310'/><rect x='9' y='5' width='14' height='22' fill='none' stroke='%23eceae3' stroke-width='2'/><path d='M9 27 l2-2 2 2 2-2 2 2 2-2 2 2 2-2' fill='none' stroke='%23eceae3' stroke-width='1.4'/><path d='M12 11h8M12 15h8M12 19h5' stroke='%23eceae3' stroke-width='1.4'/></svg>" />+<style>+ :root{--ink:#141310;--paper:#eceae3;--bed:#d6d3c9;--mid:#6f6b61;--hair2:rgba(20,19,16,.34);+ --mono:ui-monospace,"SFMono-Regular","JetBrains Mono","Menlo","Consolas",monospace;+ --grot:"Helvetica Neue","Inter","Arial",system-ui,sans-serif;}+ *{margin:0;padding:0;box-sizing:border-box}+ body{background:var(--bed);color:var(--ink);font-family:var(--mono);min-height:100vh;+ display:flex;align-items:center;justify-content:center;padding:24px;+ background-image:repeating-linear-gradient(0deg,rgba(20,19,16,.03) 0 1px,transparent 1px 3px)}+ ::selection{background:var(--ink);color:var(--paper)}+ .tape{width:min(400px,92vw);background:var(--paper);padding:34px 30px 30px;text-align:center;+ box-shadow:0 30px 60px -40px rgba(20,19,16,.7),-12px 0 20px -18px rgba(20,19,16,.5),12px 0 20px -18px rgba(20,19,16,.5)}+ .lead{font:600 10px/1 var(--mono);letter-spacing:.34em;text-transform:uppercase;color:var(--mid);margin-bottom:20px}+ h1{font:700 clamp(48px,16vw,90px)/.9 var(--grot);letter-spacing:-.04em}+ p{font:500 13px/1.6 var(--mono);color:#2b2822;margin:16px auto 0;max-width:32ch}+ .rule{border:0;border-top:1px dashed var(--hair2);margin:22px 0}+ .barcode{height:34px;margin:20px 0 22px;+ background:repeating-linear-gradient(90deg,var(--ink) 0 2px,transparent 2px 3px,var(--ink) 3px 4px,transparent 4px 7px,var(--ink) 7px 10px,transparent 10px 12px);opacity:.86}+ a.btn{display:inline-block;text-decoration:none;border:1.5px solid var(--ink);background:var(--ink);color:var(--paper);+ font:700 11px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;padding:14px 22px;+ transition:background .25s,color .25s,transform .25s cubic-bezier(.16,1,.3,1)}+ a.btn:hover{background:transparent;color:var(--ink);transform:translateY(-2px)}+</style>+</head>+<body>+ <div class="tape">+ <div class="lead">// void transaction</div>+ <h1>404</h1>+ <p>No receipt printed at this path. The payment you are looking for was never rung up here.</p>+ <div class="barcode" aria-hidden="true"></div>+ <hr class="rule" />+ <a class="btn" href="/hood-pay/">Back to the terminal</a>+ </div>+</body>+</html>diff --git a/robinhood/hood-pay/docs/_headers b/robinhood/hood-pay/docs/_headersnew file mode 100644index 000000000..8ccd12762--- /dev/null+++ b/robinhood/hood-pay/docs/_headers@@ -0,0 +1,7 @@+/*+ X-Content-Type-Options: nosniff+ Referrer-Policy: strict-origin-when-cross-origin+ Permissions-Policy: geolocation=(), microphone=(), camera=()+ X-Frame-Options: SAMEORIGIN+/*.html+ Cache-Control: public, max-age=0, must-revalidatediff --git a/robinhood/hood-pay/docs/index.html b/robinhood/hood-pay/docs/index.htmlindex a7259e27d..516c3501b 100644--- a/robinhood/hood-pay/docs/index.html+++ b/robinhood/hood-pay/docs/index.html@@ -1,182 +1,614 @@<!doctype html><html lang="en"><head>- <meta charset="utf-8" />- <meta name="viewport" content="width=device-width, initial-scale=1" />- <title>hood-pay - USDG checkout for Robinhood Chain</title>- <meta name="description" content="Stripe-Checkout-grade USDG payments on Robinhood Chain: an embeddable checkout widget, hosted payment links that run entirely on GitHub Pages, and a reorg-safe merchant verification library." />- <link rel="stylesheet" href="styles.css" />+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />+<title>hood-pay — USDG payments that print a receipt on Robinhood Chain</title>+<meta name="description" content="Stripe-Checkout-grade USDG payments on Robinhood Chain (4663). Ring up a real payment link in your browser, watch the dust fingerprint and router reference print onto a thermal receipt, and see the reorg-safe watcher settle it. Non-custodial." />+<link rel="canonical" href="https://nirholas.github.io/hood-pay/" />+<meta name="theme-color" content="#141310" />+<meta property="og:type" content="website" />+<meta property="og:title" content="hood-pay — the receipt prints itself" />+<meta property="og:description" content="Type an amount, ring it up, and a real USDG payment link, dust fingerprint and router reference print line by line onto a thermal receipt. Non-custodial payments for Robinhood Chain." />+<meta property="og:url" content="https://nirholas.github.io/hood-pay/" />+<meta name="twitter:card" content="summary_large_image" />+<meta name="twitter:creator" content="@nichxbt" />+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' fill='%23141310'/><rect x='9' y='5' width='14' height='22' fill='none' stroke='%23eceae3' stroke-width='2'/><path d='M9 27 l2-2 2 2 2-2 2 2 2-2 2 2 2-2' fill='none' stroke='%23eceae3' stroke-width='1.4'/><path d='M12 11h8M12 15h8M12 19h5' stroke='%23eceae3' stroke-width='1.4'/></svg>" />+<script type="application/ld+json">+{"@context":"https://schema.org","@type":"SoftwareApplication","name":"hood-pay","applicationCategory":"FinanceApplication","operatingSystem":"Node.js >= 20, any EIP-6963 browser wallet","offers":{"@type":"Offer","price":"0","priceCurrency":"USD"},"description":"USDG payments for Robinhood Chain (chain 4663): an embeddable non-custodial checkout widget, hosted payment links that run entirely on GitHub Pages, and a reorg-safe merchant verification library with signed webhooks, an idempotent SQLite ledger and refund helpers.","softwareVersion":"0.1.0","author":{"@type":"Person","name":"nirholas","url":"https://x.com/nichxbt"},"downloadUrl":"https://www.npmjs.com/package/hood-pay","codeRepository":"https://github.com/nirholas/hood-pay"}+</script>+<style>+ :root{+ --ink:#141310; --paper:#eceae3; --bed:#d6d3c9; --mid:#6f6b61;+ --hair:rgba(20,19,16,.16); --hair2:rgba(20,19,16,.34);+ --mono:ui-monospace,"SFMono-Regular","JetBrains Mono","Menlo","Consolas",monospace;+ --grot:"Helvetica Neue","Inter","Arial Narrow","Arial",system-ui,sans-serif;+ --ease:cubic-bezier(.16,1,.3,1);+ --tape:min(520px,92vw);+ }+ *{margin:0;padding:0;box-sizing:border-box}+ html{-webkit-text-size-adjust:100%}+ body{+ background:var(--bed); color:var(--ink); font-family:var(--mono);+ font-size:14px; line-height:1.5; overflow-x:hidden;+ -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;+ }+ ::selection{background:var(--ink); color:var(--paper)}+ a{color:inherit}+ .grot{font-family:var(--grot)}++ /* thermal grain over the whole bed */+ body::before{+ content:""; position:fixed; inset:0; z-index:9999; pointer-events:none;+ background:+ repeating-linear-gradient(0deg,rgba(20,19,16,.030) 0 1px,transparent 1px 3px),+ radial-gradient(120% 60% at 50% -10%, rgba(20,19,16,.05), transparent 60%);+ mix-blend-mode:multiply; opacity:.7;+ }++ /* ===== fixed printer head bar ===== */+ .head{position:fixed; top:0; left:0; right:0; height:38px; z-index:70;+ background:var(--ink); color:var(--paper);+ display:flex; align-items:center; gap:14px; padding:0 clamp(12px,3vw,26px);+ font:600 10.5px/1 var(--mono); letter-spacing:.24em; text-transform:uppercase}+ .head .dot{width:7px;height:7px;border-radius:50%;background:var(--paper);+ box-shadow:0 0 0 0 rgba(236,234,227,.6); animation:pulse 2.6s var(--ease) infinite}+ @keyframes pulse{0%{box-shadow:0 0 0 0 rgba(236,234,227,.55)}70%,100%{box-shadow:0 0 0 6px rgba(236,234,227,0)}}+ .head .mech{margin-left:auto; position:relative; width:74px; height:8px;+ border:1px solid rgba(236,234,227,.4); overflow:hidden}+ .head .mech i{position:absolute; top:-1px; bottom:-1px; width:16px; background:var(--paper);+ animation:print 3.4s var(--ease) infinite; will-change:transform}+ @keyframes print{0%{transform:translateX(-18px)}50%{transform:translateX(74px)}100%{transform:translateX(-18px)}}+ .head .sn{opacity:.6}+ @media(max-width:560px){.head .sn{display:none}}++ /* ===== left ruler nav ===== */+ .ruler{position:fixed; left:0; top:38px; bottom:0; width:46px; z-index:60;+ border-right:1px solid var(--hair);+ background:repeating-linear-gradient(0deg,transparent 0 11px, var(--hair) 11px 12px);+ display:flex; flex-direction:column; align-items:center; padding-top:14px; gap:0}+ .ruler a{writing-mode:vertical-rl; font:600 9px/1 var(--mono); letter-spacing:.26em;+ text-transform:uppercase; color:var(--mid); text-decoration:none; padding:16px 0;+ transition:color .3s var(--ease); opacity:.7}+ .ruler a:hover{color:var(--ink); opacity:1}+ .ruler a[aria-current="true"]{color:var(--ink); opacity:1}+ .ruler .cursor{position:absolute; left:0; width:3px; height:26px; background:var(--ink);+ top:0; transition:transform .5s var(--ease); will-change:transform}+ @media(max-width:760px){.ruler{display:none}}++ /* ===== the tape ===== */+ main{padding-top:38px}+ .stage{margin-left:46px; display:flex; justify-content:center; position:relative;+ padding:clamp(26px,5vw,60px) 16px 90px}+ @media(max-width:760px){.stage{margin-left:0}}++ .tape{width:var(--tape); background:var(--paper); position:relative;+ box-shadow:+ -14px 0 22px -18px rgba(20,19,16,.5),+ 14px 0 22px -18px rgba(20,19,16,.5),+ 0 30px 60px -40px rgba(20,19,16,.7);+ }+ /* curled paper edges */+ .tape::before,.tape::after{content:""; position:absolute; top:0; bottom:0; width:16px; pointer-events:none; z-index:3}+ .tape::before{left:0; background:linear-gradient(90deg,rgba(20,19,16,.14),transparent)}+ .tape::after{right:0; background:linear-gradient(270deg,rgba(20,19,16,.14),transparent)}++ /* torn top + bottom edges */+ .torn{height:12px; width:100%;+ background:+ linear-gradient(-45deg, var(--paper) 6px, transparent 0) 0 0/12px 12px repeat-x,+ linear-gradient(45deg, var(--paper) 6px, transparent 0) 0 0/12px 12px repeat-x;+ filter:drop-shadow(0 1px 0 rgba(20,19,16,.14))}+ .torn.top{transform:scaleY(-1)}++ .blk{padding:clamp(20px,4vw,34px) clamp(22px,5vw,44px); position:relative}+ .tear{border:0; border-top:1.6px dashed var(--hair2); margin:0 clamp(18px,4vw,38px);+ position:relative}+ .tear::after{content:"✂"; position:absolute; left:-4px; top:-9px; font:12px/1 var(--mono); color:var(--mid); background:var(--paper); padding-right:4px}++ .line{display:flex; justify-content:space-between; gap:14px; padding:2.5px 0;+ font:500 13px/1.55 var(--mono); letter-spacing:.01em}+ .line .l{color:var(--mid); text-transform:uppercase; letter-spacing:.12em; font-size:10.5px; align-self:center}+ .line .r{text-align:right; word-break:break-all}+ .lead{font:600 10.5px/1 var(--mono); letter-spacing:.34em; text-transform:uppercase; color:var(--mid); margin-bottom:16px}+ .center{text-align:center}+ .rule{border:0; border-top:1px dashed var(--hair2); margin:14px 0}+ .rule.solid{border-top-style:solid; border-color:var(--ink)}+ .big{font:700 clamp(30px,7vw,52px)/.92 var(--grot); letter-spacing:-.03em}+ .sub{font:500 13px/1.6 var(--mono); color:#2b2822; margin-top:14px; max-width:42ch}+ .stamp{display:inline-flex; align-items:center; gap:8px; font:700 11px/1 var(--mono);+ letter-spacing:.18em; text-transform:uppercase; padding:7px 12px; border:1.5px solid var(--ink)}+ .stamp .d{width:7px;height:7px;border-radius:50%;background:currentColor}+ .stamp.paid{background:var(--ink); color:var(--paper)}+ .stamp.wait{color:var(--mid)}+ .barcode{height:46px; width:100%; margin-top:6px;+ background:repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 3px, var(--ink) 3px 4px, transparent 4px 7px, var(--ink) 7px 10px, transparent 10px 12px);+ opacity:.86}+ .barcode.small{height:26px}++ /* ===== the terminal (signature interaction) ===== */+ .term{margin:2px 0 4px}+ .fields{display:grid; grid-template-columns:1fr 1fr; gap:1px; background:var(--hair2);+ border:1px solid var(--hair2); margin:4px 0 16px}+ .field{background:var(--paper); padding:11px 13px 12px; position:relative}+ .field label{display:block; font:600 9px/1 var(--mono); letter-spacing:.2em; text-transform:uppercase; color:var(--mid); margin-bottom:7px}+ .field input{width:100%; border:0; background:transparent; color:var(--ink);+ font:600 16px/1.1 var(--mono); letter-spacing:.01em; outline:none}+ .field input::placeholder{color:var(--mid)}+ .field.full{grid-column:1/-1}+ .segs{display:flex; gap:0; grid-column:1/-1; border:1px solid var(--hair2); background:var(--paper)}+ .seg{flex:1; display:flex}+ .seg button{flex:1; appearance:none; border:0; border-right:1px solid var(--hair);+ background:transparent; color:var(--mid); cursor:pointer; padding:11px 8px;+ font:600 10px/1 var(--mono); letter-spacing:.14em; text-transform:uppercase;+ transition:background .2s,color .2s}+ .seg:last-child button{border-right:0}+ .seg button[aria-pressed="true"]{background:var(--ink); color:var(--paper)}+ .ring{appearance:none; width:100%; border:1.5px solid var(--ink); background:var(--ink); color:var(--paper);+ font:700 13px/1 var(--mono); letter-spacing:.18em; text-transform:uppercase; padding:16px;+ cursor:pointer; position:relative; overflow:hidden; transition:transform .25s var(--ease)}+ .ring:hover{transform:translateY(-2px)}+ .ring:active{transform:translateY(0)}+ .ring:disabled{cursor:default}+ .ring .fill{position:absolute; inset:0; background:var(--paper); opacity:.16; transform:scaleX(0); transform-origin:left;+ transition:transform 1.3s linear}+ .ring.busy .fill{transform:scaleX(1)}+ .ring .lbl{position:relative; z-index:2}++ /* printed receipt output */+ .receipt{margin-top:20px; border-top:1px dashed var(--hair2); padding-top:16px; min-height:60px}+ .p{opacity:0; transform:translateY(6px); transition:opacity .32s var(--ease), transform .32s var(--ease)}+ .p.in{opacity:1; transform:none}+ .p.flash{animation:burn .5s var(--ease)}+ @keyframes burn{0%{color:#000;text-shadow:0 0 4px rgba(20,19,16,.5)}100%{color:var(--ink);text-shadow:none}}+ .hash{font:600 12px/1.5 var(--mono); word-break:break-all}+ .link{font:600 11.5px/1.55 var(--mono); word-break:break-all; color:var(--ink)}+ .copy{appearance:none; margin-top:8px; border:1px solid var(--hair2); background:transparent; color:var(--mid);+ font:600 9px/1 var(--mono); letter-spacing:.16em; text-transform:uppercase; padding:7px 11px; cursor:pointer; transition:background .2s,color .2s}+ .copy:hover{background:var(--ink); color:var(--paper); border-color:var(--ink)}+ .conf{font:600 12px/1 var(--mono); letter-spacing:.06em}++ /* margin callouts for wide screens (the printer bed) */+ .callout{position:absolute; width:200px; font:500 11px/1.45 var(--mono); color:#43403a; z-index:5}+ .callout .k{display:block; font:700 9px/1 var(--mono); letter-spacing:.2em; text-transform:uppercase; color:var(--mid); margin-bottom:6px}+ .callout::before{content:""; position:absolute; top:6px; height:1px; background:var(--hair2)}+ .callout.left{right:calc(50% + var(--tape)/2 + 30px); text-align:right}+ .callout.left::before{left:100%; width:26px}+ .callout.right{left:calc(50% + var(--tape)/2 + 30px)}+ .callout.right::before{right:100%; width:26px}+ @media(max-width:1180px){.callout{display:none}}++ /* content blocks */+ .h2{font:700 clamp(24px,4vw,40px)/1 var(--grot); letter-spacing:-.025em; margin-bottom:6px}+ .lede{font:500 13.5px/1.65 var(--mono); color:#2b2822; max-width:52ch; margin-top:14px}+ .two{display:grid; grid-template-columns:1fr 1fr; gap:1px; background:var(--hair2); border:1px solid var(--hair2); margin-top:20px}+ @media(max-width:560px){.two{grid-template-columns:1fr}}+ .mode{background:var(--paper); padding:18px 18px 20px}+ .mode .t{font:700 12px/1 var(--mono); letter-spacing:.1em; text-transform:uppercase; margin-bottom:4px}+ .mode .tag{font:600 9px/1 var(--mono); letter-spacing:.16em; text-transform:uppercase; color:var(--mid); border:1px solid var(--hair2); padding:4px 7px; display:inline-block; margin-bottom:12px}+ .mode .b{font-size:12.5px; line-height:1.55; color:#332f28}+ .rows{margin-top:8px}+ .row{display:grid; grid-template-columns:150px 1fr; gap:16px; padding:14px 0; border-bottom:1px solid var(--hair); align-items:baseline}+ .row:last-child{border-bottom:0}+ @media(max-width:520px){.row{grid-template-columns:1fr; gap:4px}}+ .row .rt{font:700 10px/1.3 var(--mono); letter-spacing:.14em; text-transform:uppercase; color:var(--mid)}+ .row .rd{font-size:13px; line-height:1.55; color:#2b2822}+ .row .rd b{font-weight:700; color:var(--ink)}+ .steps{margin-top:8px}+ .step{display:grid; grid-template-columns:26px 1fr; gap:14px; padding:13px 0; border-bottom:1px dashed var(--hair); align-items:baseline}+ .step:last-child{border-bottom:0}+ .step .n{font:700 12px/1 var(--mono); color:var(--mid)}+ .step .st b{display:block; font:700 12.5px/1.3 var(--mono); letter-spacing:.02em; margin-bottom:3px}+ .step .st span{font-size:12.5px; line-height:1.55; color:#332f28}++ pre.code{background:var(--ink); color:var(--paper); padding:16px 18px; overflow-x:auto;+ font:500 12px/1.75 var(--mono); position:relative; margin-top:8px}+ pre.code .c{color:#9a958b}+ pre.code b{color:var(--paper); font-weight:700}+ .btns{display:flex; flex-wrap:wrap; gap:10px; margin-top:18px}+ .btn{appearance:none; text-decoration:none; border:1.5px solid var(--ink); color:var(--ink); background:transparent;+ font:700 11px/1 var(--mono); letter-spacing:.14em; text-transform:uppercase; padding:13px 18px; cursor:pointer;+ transition:background .25s,color .25s,transform .25s var(--ease); display:inline-block}+ .btn:hover{background:var(--ink); color:var(--paper); transform:translateY(-2px)}+ .btn.solid{background:var(--ink); color:var(--paper)}+ .btn.solid:hover{background:transparent; color:var(--ink)}++ footer .foot{display:flex; flex-wrap:wrap; justify-content:space-between; gap:16px; align-items:flex-end}+ footer .foot .meta{font:500 11px/1.7 var(--mono); color:var(--mid); text-align:right}+ footer a.u{text-decoration:none; border-bottom:1px solid var(--hair2)}+ footer a.u:hover{border-color:var(--ink)}++ .reveal{opacity:0; transform:translateY(18px); transition:opacity .7s var(--ease), transform .7s var(--ease)}+ .reveal.in{opacity:1; transform:none}+ @media(prefers-reduced-motion:reduce){*{animation-duration:.001s!important; transition-duration:.001s!important}.reveal{opacity:1;transform:none}}+</style></head><body>- <nav class="nav">- <div class="wrap nav-inner">- <span class="brand">hood<b>pay</b></span>- <div class="nav-links">- <a href="#demo">Demo</a>- <a href="#embed">Embed</a>- <a href="links.html">Payment links</a>- <a href="verify.html">Verify</a>- <a href="security.html">Security</a>- <a class="cta" href="https://github.com/nirholas/hood-pay">GitHub</a>- </div>- </div>- </nav>-- <header class="hero">- <div class="wrap hero-grid">- <div>- <span class="eyebrow"><span class="dot"></span> USDG · Robinhood Chain · 4663</span>- <h1>Accept <span class="grad">USDG</span> like Stripe accepts cards.</h1>- <p class="lede">An embeddable checkout widget, hosted payment links that run with no backend, and a reorg-safe verifier with webhooks. Non-custodial by construction.</p>- <div class="hero-actions">- <a class="btn primary" href="#demo">Try the live demo</a>- <a class="btn" href="#embed">Copy the embed</a>+<header class="head">+ <span class="dot" aria-hidden="true"></span>+ <span>hood-pay · thermal</span>+ <span class="sn">robinhood chain 4663 · usdg</span>+ <span class="mech" aria-hidden="true"><i></i></span>+</header>++<nav class="ruler" aria-label="Sections">+ <span class="cursor" id="cursor"></span>+ <a href="#ringup" aria-current="true">Ring up</a>+ <a href="#attribute">Attribute</a>+ <a href="#stack">Stack</a>+ <a href="#watcher">Settle</a>+ <a href="#safe">Custody</a>+ <a href="#get">Get it</a>+</nav>++<main>+ <div class="stage">+ <div class="tape" id="tape">+ <div class="torn top" aria-hidden="true"></div>++ <!-- ===== RING UP (hero + signature interaction) ===== -->+ <section class="blk" id="ringup">+ <div class="lead">// merchant terminal</div>+ <div class="big grot">The receipt<br>prints itself.</div>+ <p class="sub">A plain USDG <span style="border-bottom:1px solid var(--hair2)">transfer</span> carries no invoice field. hood-pay attributes every payment two honest ways. Type an amount and ring it up: the dust fingerprint, the real payment link, and the router reference all print below. Nothing is sent anywhere.</p>++ <div class="term" role="group" aria-label="Checkout terminal">+ <div class="fields">+ <div class="field">+ <label for="amt">Amount · USD</label>+ <input id="amt" inputmode="decimal" value="25.00" aria-label="Amount in dollars" />+ </div>+ <div class="field">+ <label for="memo">Memo</label>+ <input id="memo" value="Invoice 7" maxlength="40" aria-label="Memo" />+ </div>+ <div class="segs" role="group" aria-label="Network">+ <span class="seg"><button data-net="mainnet" aria-pressed="true">mainnet · 4663</button></span>+ <span class="seg"><button data-net="testnet" aria-pressed="false">testnet · 46630</button></span>+ </div>+ <div class="segs" role="group" aria-label="Attribution mode">+ <span class="seg"><button data-mode="router" aria-pressed="true">router · reference</button></span>+ <span class="seg"><button data-mode="direct" aria-pressed="false">direct · dust</button></span>+ </div>+ </div>+ <button class="ring" id="ring"><span class="fill"></span><span class="lbl">▐ Ring up sale</span></button>++ <div class="receipt" id="receipt" aria-live="polite">+ <div class="line"><span class="l">terminal</span><span class="r" style="color:var(--mid)">idle · press ring up</span></div>+ </div>+ </div>++ <div class="callout left" style="top:38%">+ <span class="k">payTo</span>+ A checksummed Robinhood Chain address. viem's getAddress rejects a mistyped one before a link is ever built.</div>- <div class="status-strip">- <span class="chip"><span class="live">●</span> mainnet <b id="mainnet-block">…</b></span>- <span class="chip">testnet <b id="testnet-block">…</b></span>- <span class="chip">USDG <b id="usdg-info">…</b></span>+ <div class="callout right" style="top:64%">+ <span class="k">the fragment</span>+ The payment request lives after the URL's <b>#</b> — the browser never sends it to a server, so a hosted link page leaks nothing.</div>- </div>+ </section>- <div id="demo" class="demo-card">- <h3>Live testnet checkout</h3>- <p class="muted">Real widget, real chain 46630. Connect an EIP-6963 wallet, switch to Robinhood testnet, pay test USDG. Nothing here is a mock.</p>- <div id="checkout"></div>- </div>- </div>- </header>-- <section id="features">- <div class="wrap">- <h2 class="section-title">Three pieces, each usable alone</h2>- <p class="section-sub">Ship a whole checkout, or drop in just the part you need. Every module is typed, tree-shakeable, and verified against on-chain USDG.</p>- <div class="grid">- <div class="feature">- <div class="ic">W</div>- <h4>Checkout widget</h4>- <p>One <code class="inline"><script></code> and one div. Connect wallet, ensure chain 4663, pay USDG. Under 27 kB gzipped, every visual state designed.</p>+ <hr class="tear" />++ <!-- ===== ATTRIBUTE ===== -->+ <section class="blk reveal" id="attribute">+ <div class="lead">// the memo problem</div>+ <div class="h2 grot">USDG has no memo.<br>Two ways to fix that.</div>+ <p class="lede">USDG is a plain ERC-20; its <span style="border-bottom:1px solid var(--hair2)">transfer</span> can't say which invoice it settles. So a payment is fingerprinted either on-chain or in the amount itself — never guessed.</p>+ <div class="two">+ <div class="mode">+ <div class="tag">on-chain</div>+ <div class="t">Router mode</div>+ <div class="b">The buyer pays through the stateless, non-custodial <b>HoodPayRouter</b>. Its <span style="border-bottom:1px solid var(--hair)">pay(token, payTo, amount, ref)</span> pulls funds straight to the merchant via transferFrom and emits <b>PaymentReceived(reference, payer, payTo, token, amount)</b> — exact attribution regardless of the amount. No owner, no pause, no balance held.</div>+ </div>+ <div class="mode">+ <div class="tag">zero contracts</div>+ <div class="t">Direct mode</div>+ <div class="b">The invoice amount itself is fingerprinted in USDG's unused low decimal digits: 25.00 becomes <b>25.00 42 00</b>, its last four digits a per-invoice dust marker. A bare transfer settles it, and it works with any ERC-20. <span style="border-bottom:1px solid var(--hair)">directCollisionProbability(k)</span> bounds the odds for k concurrent invoices.</div>+ </div></div>- <div class="feature">- <div class="ic">L</div>- <h4>Hosted payment links</h4>- <p>The request is encoded in the URL fragment, so a link is a full checkout that runs entirely client-side. No server, no database, no fee.</p>+ </section>++ <hr class="tear" />++ <!-- ===== STACK ===== -->+ <section class="blk reveal" id="stack">+ <div class="lead">// three pieces, each stands alone</div>+ <div class="h2 grot">Core, widget,<br>and verify.</div>+ <div class="rows">+ <div class="row"><div class="rt">Core · hood-pay</div><div class="rd">Networks, the payment-request type and URL-fragment link codec, the reference/dust attribution scheme, and unsigned-tx builders for direct transfers and router-mode payments. <b>No wallet, no server.</b></div></div>+ <div class="row"><div class="rt">Widget · /widget</div><div class="rd">An embeddable checkout that mounts on any <b>[data-hoodpay]</b> element or via mountCheckout() — no bundler required. Wallet discovery and chain add/switch run through <b>hood-connect</b> (EIP-6963 / EIP-3085), never re-implemented here.</div></div>+ <div class="row"><div class="rt">Verify · /verify</div><div class="rd">Node-only: a reorg-safe on-chain payment watcher, an idempotent <b>SQLite</b> ledger, HMAC-signed webhooks, and refund helpers for the merchant side.</div></div></div>- <div class="feature">- <div class="ic">V</div>- <h4>Merchant verify</h4>- <p>A reorg-safe watcher confirms amounts on-chain (never from the DOM), fires signed webhooks, and records to an idempotent SQLite ledger.</p>+ <div class="callout left" style="top:52%">+ <span class="k">peer dep</span>+ viem ≥ 2.55. hood-connect and hoodchain install automatically.</div>- </div>- </div>- </section>-- <section id="embed">- <div class="wrap">- <h2 class="section-title">Embed in two lines</h2>- <p class="section-sub">Point <code class="inline">data-pay-to</code> at your address, set an amount, done. The buyer's wallet signs; funds go straight to you.</p>- <div class="codewrap">- <button class="copy" data-copy="embed-code">Copy</button>- <pre id="embed-code"><span class="c"><!-- your merchant address + the amount you want to charge --></span>-<span class="k"><div</span> data-hoodpay- data-pay-to=<span class="s">"0x4022de2D36C334E73C7a108805Cea11C0564f402"</span>- data-amount=<span class="s">"25.00"</span>- data-memo=<span class="s">"Order 1042"</span><span class="k">></div></span>-<span class="k"><script</span> src=<span class="s">"https://nirholas.github.io/hood-pay/hood-pay.min.js"</span><span class="k">></script></span></pre>- </div>-- <h3 style="margin-top:28px; font-size:1.15rem; letter-spacing:-0.01em;">Or mount it programmatically</h3>- <div class="codewrap">- <button class="copy" data-copy="js-code">Copy</button>- <pre id="js-code"><span class="k">import</span> { mountCheckout } <span class="k">from</span> <span class="s">'hood-pay/widget'</span>--mountCheckout(<span class="s">'#checkout'</span>, {- payTo: <span class="s">'0x4022de2D36C334E73C7a108805Cea11C0564f402'</span>,- amount: <span class="s">'25.00'</span>, <span class="c">// or 'dynamic' for tips / pay-what-you-want</span>- memo: <span class="s">'Order 1042'</span>,- onSuccess: (receipt) => console.log(<span class="s">'paid'</span>, receipt.txHash)-})</pre>- </div>- </div>- </section>-- <section id="verify-cta">- <div class="wrap split">- <div class="prose">- <h3>Confirm payments on your server</h3>- <p>The widget never decides whether a payment is real - your verifier does, by reading the chain. <code class="inline">awaitPayment</code> watches for the transfer (or router event), waits out reorgs, and returns a terminal status your shop can trust.</p>- <ul>- <li><strong>paid / underpaid / overpaid / expired</strong> - every outcome is explicit.</li>- <li>Signed webhooks, Stripe-style, with an idempotent SQLite ledger.</li>- <li>Refund helpers for overages and abandoned invoices.</li>- </ul>- <p><a href="verify.html">Read the verify + webhook guide →</a></p>- </div>- <div class="codewrap">- <button class="copy" data-copy="verify-code">Copy</button>- <pre id="verify-code"><span class="k">import</span> { networkInfo } <span class="k">from</span> <span class="s">'hood-pay'</span>-<span class="k">import</span> { awaitPayment, createReader } <span class="k">from</span> <span class="s">'hood-pay/verify'</span>-<span class="k">import</span> { parseUnits } <span class="k">from</span> <span class="s">'viem'</span>--<span class="k">const</span> info = networkInfo(<span class="s">'mainnet'</span>)-<span class="k">const</span> reader = createReader(<span class="s">'mainnet'</span>)--<span class="k">const</span> result = <span class="k">await</span> awaitPayment(- {- token: info.usdg.address,- payTo: <span class="s">'0x4022de2D36C334E73C7a108805Cea11C0564f402'</span>,- expectedRaw: parseUnits(<span class="s">'25.00'</span>, info.usdg.decimals)- },- { reader, fromBlock: <span class="k">await</span> reader.getBlockNumber() }-)-<span class="c">// result.status === 'paid'</span></pre>- </div>- </div>- </section>+ </section>++ <hr class="tear" />++ <!-- ===== WATCHER / SETTLE ===== -->+ <section class="blk reveal" id="watcher">+ <div class="lead">// merchant side · reorg-safe</div>+ <div class="h2 grot">Settled means<br>settled.</div>+ <p class="lede">The watcher only counts a payment once it is buried deep enough that a reorg can't take it back — then it fires a signed webhook and never fires twice.</p>+ <div class="steps">+ <div class="step"><div class="n">01</div><div class="st"><b>Scan at depth</b><span>awaitPayment / checkPayment only read blocks at depth ≥ confirmations below the head (default 30, ~3s of Robinhood Chain's ~100ms blocks).</span></div></div>+ <div class="step"><div class="n">02</div><div class="st"><b>Re-fetch every block hash</b><span>Each candidate log's block hash is re-fetched by number and compared. A block reorged out after the scan but before the re-check is dropped.</span></div></div>+ <div class="step"><div class="n">03</div><div class="st"><b>Idempotent ledger</b><span>An SQLite ledger reserves dust fingerprints, enforces monotonic status transitions, and records transfers replay-safe. A confirmed result is stable under any reorg shallower than confirmations.</span></div></div>+ <div class="step"><div class="n">04</div><div class="st"><b>Signed webhook</b><span>Delivery is HMAC-SHA256 signed and constant-time verified; a stale timestamp is rejected (5-minute default). The ledger stays the source of truth for amounts.</span></div></div>+ </div>+ </section>++ <hr class="tear" />++ <!-- ===== CUSTODY ===== -->+ <section class="blk reveal" id="safe">+ <div class="lead">// there are no keys here</div>+ <div class="h2 grot">Non-custodial,<br>always.</div>+ <div class="rows">+ <div class="row"><div class="rt">Buyer keys</div><div class="rd">The widget only builds unsigned <b>approve / transfer / pay</b> calls for the buyer's own EIP-6963 wallet to sign. hood-pay never holds them.</div></div>+ <div class="row"><div class="rt">Merchant keys</div><div class="rd">Refunds build unsigned calls for the merchant's own signer (<b>sendRefund</b> or any viem WalletClient). buildRefundTx, refundOverageTx, refundReceivedTx.</div></div>+ <div class="row"><div class="rt">Addresses</div><div class="rd">Every address (payTo, token, router) is validated against its <b>EIP-55 checksum</b>. A mixed-case address with one wrong character throws before a link exists.</div></div>+ <div class="row"><div class="rt">Not a Stock Token</div><div class="rd">hood-pay settles in USDG or any ERC-20 a merchant configures — it never touches Robinhood Chain's tokenized-equity Stock Tokens.</div></div>+ </div>+ </section>++ <hr class="tear" />++ <!-- ===== GET IT ===== -->+ <section class="blk reveal" id="get">+ <div class="lead">// install</div>+ <div class="h2 grot">Ship a checkout<br>in one script tag.</div>+ <p class="lede">The widget auto-mounts every element with <b>data-hoodpay</b> on load. No build step, no server, no keys.</p>+ <pre class="code"><button class="copy" data-copy="widget" style="position:absolute;top:12px;right:12px">copy</button><span class="c"><!-- drop-in checkout, auto-mounts --></span>+<div <b>data-hoodpay</b>+ data-pay-to="0x4022de2D…0564f402"+ data-amount="25.00"+ data-memo="Invoice 7"></div>+<script src="https://unpkg.com/hood-pay/widget.js"></script></pre>+ <pre class="code"><button class="copy" data-copy="npm" style="position:absolute;top:12px;right:12px">copy</button><span class="c"># or from a bundler / Node</span>+npm install <b>hood-pay</b> <span class="c"># viem >= 2.55 peer</span>++<span class="c"># make a payment link from the CLI</span>+npx hood-pay link --to 0x4022… --amount 25 --memo "Invoice 7"++<span class="c"># watch + verify a payment, no code</span>+npx hood-pay verify --to 0x4022… --amount 25.0042</pre>+ <div class="btns">+ <a class="btn solid" href="https://www.npmjs.com/package/hood-pay">npm</a>+ <a class="btn" href="https://github.com/nirholas/hood-pay">source</a>+ <a class="btn" href="https://github.com/nirholas/hood-pay#readme">docs</a>+ </div>+ </section>++ <hr class="tear" />++ <footer class="blk">+ <div class="line"><span class="l">merchant</span><span class="r">non-custodial</span></div>+ <div class="line"><span class="l">chain</span><span class="r">robinhood · 4663</span></div>+ <div class="line"><span class="l">settle</span><span class="r">usdg · 6 decimals</span></div>+ <hr class="rule solid" />+ <div class="center" style="margin:16px 0 8px"><span class="stamp paid"><span class="d"></span>thank you</span></div>+ <div class="barcode small" aria-hidden="true"></div>+ <hr class="rule" />+ <div class="foot">+ <div class="big grot" style="font-size:clamp(26px,6vw,44px)">hood-<br>pay</div>+ <div class="meta">+ USDG · viem ≥ 2.55 · Node ≥ 20<br>+ <a class="u" href="https://github.com/nirholas/hood-pay">github.com/nirholas/hood-pay</a><br>+ <a class="u" href="https://www.npmjs.com/package/hood-pay">npmjs.com/package/hood-pay</a><br>+ built by <a class="u" href="https://x.com/nichxbt">@nichxbt</a> · not affiliated with Robinhood Markets+ </div>+ </div>+ </footer>- <footer>- <div class="wrap footer-inner">- <span>Built by <a href="https://x.com/nichxbt">nirholas</a> · <a href="https://three.ws">three.ws</a></span>- <span>All rights reserved · USDG is a plain ERC-20 (6 decimals) on Robinhood Chain 4663</span>+ <div class="torn" aria-hidden="true"></div></div>- </footer>-- <script src="live.js"></script>- <script src="hood-pay.min.js"></script>- <script>- // Live testnet demo. Uses test USDG on chain 46630 - the widget builds an- // unsigned transfer for the buyer's own wallet to sign; this page holds no- // keys and moves no funds on its own.- (function () {- var TESTNET_USDG = { address: '0x7E955252E15c84f5768B83c41a71F9eba181802F', symbol: 'USDG', decimals: 6 };- function mount() {- if (!window.HoodPay) { setTimeout(mount, 60); return; }- try {- window.HoodPay.mount('#checkout', {- payTo: '0x4022de2D36C334E73C7a108805Cea11C0564f402',- amount: '1.00',- network: 'testnet',- token: TESTNET_USDG,- memo: 'hood-pay live demo (testnet)'- });- } catch (e) {- document.getElementById('checkout').textContent = 'demo failed to mount: ' + e.message;- }- }- mount();- })();-- // Copy buttons.- document.querySelectorAll('.copy').forEach(function (btn) {- btn.addEventListener('click', function () {- var el = document.getElementById(btn.getAttribute('data-copy'));- navigator.clipboard.writeText(el.innerText).then(function () {- btn.textContent = 'Copied';- btn.classList.add('ok');- setTimeout(function () { btn.textContent = 'Copy'; btn.classList.remove('ok'); }, 1400);- });- });- });- </script>+ </div>+</main>++<script>+"use strict";+/* ---------- real payment-link codec (matches hood-pay's documented format) ---------- */+const PAY_TO = '0x4022de2D36C334E73C7a108805Cea11C0564f402';+const NET = { mainnet:{ chainId:4663, label:'mainnet' }, testnet:{ chainId:46630, label:'testnet' } };+const b64url = s => btoa(unescape(encodeURIComponent(s))).replace(/\+/g,'-').replace(/\//g,'_').replace(/=+$/,'');+const b64urlDecode = s => decodeURIComponent(escape(atob(s.replace(/-/g,'+').replace(/_/g,'/'))));+function encodePaymentRequest(req){ return '1.' + b64url(JSON.stringify(req)); }+function decodePaymentRequest(frag){+ const raw = frag.replace(/^#/,''); const dot = raw.indexOf('.');+ return JSON.parse(b64urlDecode(raw.slice(dot+1)));+}+const LINK_BASE = 'https://nirholas.github.io/hood-pay/pay.html';++/* ---------- dust fingerprint (low 4 USDG decimals reserved) ---------- */+const USDG_DECIMALS = 6;+function baseRaw(amountStr){+ // round to whole cents so the low 4 raw digits (0.0001 .. 0.9999) stay reserved+ const n = Math.max(0, Math.round(parseFloat(amountStr||'0')*100));+ return BigInt(n) * 10000n; // cents -> 6dp raw, low 4 digits zeroed+}+function randomDust(){ return 1 + Math.floor(Math.random()*9999); } // [1,9999]+function formatRaw(raw){+ const s = raw.toString().padStart(USDG_DECIMALS+1,'0');+ const whole = s.slice(0, s.length-USDG_DECIMALS);+ const frac = s.slice(s.length-USDG_DECIMALS);+ return whole + '.' + frac;+}++/* ---------- real 32-byte reference + real sha-256 digest ---------- */+const toHex = bytes => '0x' + [...bytes].map(b=>b.toString(16).padStart(2,'0')).join('');+function newReference(){ return toHex(crypto.getRandomValues(new Uint8Array(32))); }+async function sha256Hex(str){+ const buf = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(str));+ return toHex(new Uint8Array(buf));+}++/* ---------- terminal state ---------- */+let net = 'mainnet', mode = 'router', busy = false;+document.querySelectorAll('[data-net]').forEach(b=>b.addEventListener('click',()=>{+ net = b.dataset.net;+ document.querySelectorAll('[data-net]').forEach(x=>x.setAttribute('aria-pressed', x===b));+}));+document.querySelectorAll('[data-mode]').forEach(b=>b.addEventListener('click',()=>{+ mode = b.dataset.mode;+ document.querySelectorAll('[data-mode]').forEach(x=>x.setAttribute('aria-pressed', x===b));+}));++const receipt = document.getElementById('receipt');+const ring = document.getElementById('ring');+const short = (s,head=10,tail=8)=> s.length>head+tail+1 ? s.slice(0,head)+'…'+s.slice(-tail) : s;++function printRow(labelHtml, valueHtml, cls){+ const div = document.createElement('div');+ div.className = 'p ' + (cls||'');+ div.innerHTML = labelHtml==null+ ? `<div class="${cls==='hash'?'hash':(cls==='link'?'link':'')}">${valueHtml}</div>`+ : `<div class="line"><span class="l">${labelHtml}</span><span class="r">${valueHtml}</span></div>`;+ receipt.appendChild(div);+ requestAnimationFrame(()=>requestAnimationFrame(()=>{ div.classList.add('in','flash'); }));+ return div;+}+const wait = ms => new Promise(r=>setTimeout(r,ms));++async function ringUp(){+ if(busy) return; busy = true;+ ring.disabled = true; ring.classList.add('busy');+ ring.querySelector('.lbl').textContent = 'printing…';+ receipt.innerHTML = '';++ const amt = document.getElementById('amt').value.trim() || '0.00';+ const memo = document.getElementById('memo').value.trim() || '';+ const cents = Math.max(0, Math.round(parseFloat(amt||'0')*100));+ const amountStr = (cents/100).toFixed(2);++ const req = { v:1, network:net, payTo:PAY_TO, amount:amountStr, memo };+ const ref = newReference();+ if(mode==='router') req.reference = ref;++ const raw = baseRaw(amountStr);+ const dust = randomDust();+ const expectedRaw = mode==='direct' ? raw + BigInt(dust) : raw;+ const link = LINK_BASE + '#' + encodePaymentRequest(req);+ const digest = await sha256Hex(encodePaymentRequest(req));++ printRow('hood-pay', 'ROBINHOOD CHAIN ' + NET[net].chainId);+ await wait(150);+ printRow(null, '·'.repeat(30), '');+ await wait(120);+ printRow('memo', (memo||'—').toUpperCase());+ await wait(150);+ printRow('1× '+ (memo||'item'), amountStr + ' USD');+ await wait(150);+ printRow(null, '·'.repeat(30), '');+ await wait(120);+ printRow('subtotal', amountStr + ' USD');+ await wait(150);+ printRow('settle in', 'USDG · ' + USDG_DECIMALS + 'dp');+ await wait(180);+ if(mode==='direct'){+ printRow('amount due', '<b style="font-weight:700">'+formatRaw(expectedRaw)+'</b> USDG');+ await wait(120);+ printRow('dust marker', '·'+String(dust).padStart(4,'0')+' (low 4 digits)');+ }else{+ printRow('amount due', '<b style="font-weight:700">'+amountStr+'</b> USDG');+ await wait(120);+ printRow('router ref', short(ref,10,8));+ }+ await wait(180);+ printRow('payer', short(PAY_TO,8,6));+ await wait(120);+ printRow('mode', mode==='router' ? 'HoodPayRouter · pay()' : 'direct transfer');+ await wait(180);+ printRow(null, '·'.repeat(30), '');+ await wait(120);++ const linkEl = printRow(null, 'PAYMENT LINK', '');+ linkEl.querySelector('div').style.cssText = 'font:700 9px/1 var(--mono);letter-spacing:.2em;color:var(--mid);margin-bottom:6px;text-transform:uppercase';+ const lk = printRow(null, link.replace(/</g,'<'), 'link');+ const copyBtn = document.createElement('button');+ copyBtn.className = 'copy'; copyBtn.textContent = 'copy link';+ copyBtn.style.opacity = '1'; copyBtn.style.transform = 'none';+ copyBtn.addEventListener('click', ()=>{ navigator.clipboard.writeText(link).then(()=>{+ const t=copyBtn.textContent; copyBtn.textContent='copied ✓'; setTimeout(()=>copyBtn.textContent=t,1200);+ }).catch(()=>{}); });+ lk.appendChild(copyBtn);+ await wait(180);++ const dgLabel = printRow(null, 'SHA-256(REQUEST)', '');+ dgLabel.querySelector('div').style.cssText = 'font:700 9px/1 var(--mono);letter-spacing:.2em;color:var(--mid);margin:8px 0 6px;text-transform:uppercase';+ printRow(null, digest, 'hash');+ await wait(180);+ printRow(null, '·'.repeat(30), '');++ await wait(140);+ const statusEl = printRow('status', '<span class="stamp wait"><span class="d"></span>discovering</span>');+ const rv = statusEl.querySelector('.r');+ await wait(500);+ rv.innerHTML = '<span class="conf" style="color:var(--mid)">0 / 30 conf</span>';+ for(let c=1;c<=30;c++){+ await wait(c<24 ? 34 : 70);+ rv.innerHTML = '<span class="conf">'+c+' / 30 conf</span>';+ }+ await wait(220);+ rv.innerHTML = '<span class="stamp paid"><span class="d"></span>paid</span>';++ await wait(160);+ printRow(null, '·'.repeat(30), '');+ const thanks = printRow(null, 'NON-CUSTODIAL · SIGNED WEBHOOK SENT', '');+ thanks.querySelector('div').style.cssText = 'text-align:center;font:700 10px/1.5 var(--mono);letter-spacing:.18em;color:var(--mid);text-transform:uppercase';++ ring.classList.remove('busy');+ ring.querySelector('.lbl').textContent = '▐ Ring up another';+ ring.disabled = false;+ busy = false;+}+ring.addEventListener('click', ringUp);++/* prove the codec round-trips (dev sanity, no output on success) */+(function selfTest(){+ const r = { v:1, network:'mainnet', payTo:PAY_TO, amount:'25.00', memo:'Invoice 7', reference:newReference() };+ const back = decodePaymentRequest('#'+encodePaymentRequest(r));+ if(back.payTo!==r.payTo || back.amount!==r.amount || back.reference!==r.reference){+ console.error('payment-link codec round-trip failed', r, back);+ }+})();++/* ---------- copy buttons in code blocks ---------- */+const SNIP = {+ widget: '<div data-hoodpay data-pay-to="0x4022de2D36C334E73C7a108805Cea11C0564f402" data-amount="25.00" data-memo="Invoice 7"></div>\n<script src="https://unpkg.com/hood-pay/widget.js"><\/script>',+ npm: 'npm install hood-pay'+};+document.querySelectorAll('.copy[data-copy]').forEach(btn=>{+ btn.addEventListener('click', ()=>{+ navigator.clipboard.writeText(SNIP[btn.dataset.copy]||'').then(()=>{+ const t=btn.textContent; btn.textContent='copied ✓'; setTimeout(()=>btn.textContent=t,1200);+ }).catch(()=>{});+ });+});++/* ---------- reveal on scroll ---------- */+const io = new IntersectionObserver(es=>{ es.forEach(e=>{ if(e.isIntersecting){ e.target.classList.add('in'); io.unobserve(e.target);} }); }, {threshold:.12});+document.querySelectorAll('.reveal').forEach(el=>io.observe(el));++/* ---------- ruler nav ---------- */+const links = [...document.querySelectorAll('.ruler a')];+const secs = links.map(a=>document.querySelector(a.getAttribute('href')));+const cursor = document.getElementById('cursor');+function updateRuler(){+ let idx=0, mid=innerHeight*0.4;+ secs.forEach((s,i)=>{ if(s.getBoundingClientRect().top<=mid) idx=i; });+ links.forEach((a,i)=>a.setAttribute('aria-current', i===idx));+ const rr = document.querySelector('.ruler').getBoundingClientRect();+ const r = links[idx].getBoundingClientRect();+ cursor.style.height = r.height+'px';+ cursor.style.transform = `translateY(${r.top - rr.top}px)`;+}+links.forEach(a=>a.addEventListener('click', e=>{ e.preventDefault(); document.querySelector(a.getAttribute('href')).scrollIntoView({behavior:'smooth', block:'start'}); }));+addEventListener('scroll', ()=>requestAnimationFrame(updateRuler), {passive:true});+addEventListener('resize', updateRuler); updateRuler();+</script></body></html>diff --git a/robinhood/hood-pay/docs/robots.txt b/robinhood/hood-pay/docs/robots.txtnew file mode 100644index 000000000..88cdb3b06--- /dev/null+++ b/robinhood/hood-pay/docs/robots.txt@@ -0,0 +1,3 @@+User-agent: *+Allow: /+Sitemap: https://nirholas.github.io/hood-pay/sitemap.xmldiff --git a/robinhood/hood-pay/docs/sitemap.xml b/robinhood/hood-pay/docs/sitemap.xmlnew file mode 100644index 000000000..6a42b8c3c--- /dev/null+++ b/robinhood/hood-pay/docs/sitemap.xml@@ -0,0 +1,4 @@+<?xml version="1.0" encoding="UTF-8"?>+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">+ <url><loc>https://nirholas.github.io/hood-pay/</loc><changefreq>weekly</changefreq><priority>1.0</priority></url>+</urlset>diff --git a/robinhood/hood-pay/netlify.toml b/robinhood/hood-pay/netlify.tomlnew file mode 100644index 000000000..22906a37f--- /dev/null+++ b/robinhood/hood-pay/netlify.toml@@ -0,0 +1,4 @@+# Netlify — publish the static site in docs/.+[build]+ publish = "docs"+ command = ""diff --git a/robinhood/hood-pay/vercel.json b/robinhood/hood-pay/vercel.jsonnew file mode 100644index 000000000..6093773c9--- /dev/null+++ b/robinhood/hood-pay/vercel.json@@ -0,0 +1,6 @@+{+ "$schema": "https://openapi.vercel.sh/vercel.json",+ "outputDirectory": "docs",+ "cleanUrls": true,+ "framework": null+}diff --git a/robinhood/hood-pay/wrangler.toml b/robinhood/hood-pay/wrangler.tomlnew file mode 100644index 000000000..4f52fe5b3--- /dev/null+++ b/robinhood/hood-pay/wrangler.toml@@ -0,0 +1,4 @@+# Cloudflare Pages — static deploy of the docs/ site.+# Used by the "Deploy to Cloudflare" button and `wrangler pages deploy docs`.+name = "hood-pay"+pages_build_output_dir = "docs"diff --git a/robinhood/hood-status/docs/index.html b/robinhood/hood-status/docs/index.htmldeleted file mode 100644index 7477e8e89..000000000--- a/robinhood/hood-status/docs/index.html+++ /dev/null@@ -1,134 +0,0 @@-<!doctype html>-<html lang="en" data-theme="dark">-<head>- <meta charset="utf-8">- <meta name="viewport" content="width=device-width, initial-scale=1">- <title>Robinhood Chain Status</title>- <meta name="description" content="Live status for Robinhood Chain (chain ID 4663): RPC latency, block production, sequencer feed, settlement, gas, Chainlink stock feeds, 90-day uptime and incident history.">- <meta property="og:title" content="Robinhood Chain Status">- <meta property="og:description" content="Is Robinhood Chain down? Live RPC, sequencer feed, block production and settlement health with 90-day uptime history.">- <link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='8' fill='%2300d18f'/%3E%3Crect x='8' y='14' width='4' height='10' rx='1.5' fill='%230b0e12'/%3E%3Crect x='14' y='9' width='4' height='15' rx='1.5' fill='%230b0e12'/%3E%3Crect x='20' y='12' width='4' height='12' rx='1.5' fill='%230b0e12'/%3E%3C/svg%3E">- <link rel="stylesheet" href="assets/style.css">- <script>- // Apply saved theme before first paint.- (function () {- var saved = localStorage.getItem('hood-status:theme');- if (saved === 'light' || (!saved && matchMedia('(prefers-color-scheme: light)').matches)) {- document.documentElement.dataset.theme = 'light';- }- })();- </script>-</head>-<body>- <svg width="0" height="0" style="position:absolute" aria-hidden="true">- <defs>- <linearGradient id="spark-grad" x1="0" y1="0" x2="1" y2="0">- <stop offset="0" stop-color="#00d18f"/>- <stop offset="1" stop-color="#38bdf8"/>- </linearGradient>- <linearGradient id="spark-fill" x1="0" y1="0" x2="0" y2="1">- <stop offset="0" stop-color="#00d18f" stop-opacity="0.25"/>- <stop offset="1" stop-color="#00d18f" stop-opacity="0"/>- </linearGradient>- </defs>- </svg>-- <header>- <div class="wrap header-inner">- <a class="brand" href="./">- <span class="brand-dot" aria-hidden="true"></span>- Robinhood Chain Status- <small>chain 4663</small>- </a>- <nav aria-label="Site">- <a href="methodology.html">Methodology</a>- <a href="https://robinhoodchain.blockscout.com" target="_blank" rel="noopener">Explorer</a>- <button id="theme-toggle" type="button" aria-label="Toggle color theme">Theme</button>- </nav>- </div>- </header>-- <main class="wrap">- <div class="banner s-unknown" id="banner" role="status" aria-live="polite">- <span class="pulse" aria-hidden="true"></span>- <div>- <h1 id="banner-title">Checking chain health</h1>- <div class="sub" id="banner-sub">Contacting probes</div>- </div>- <span class="mode-pill" id="mode-pill">connecting</span>- </div>-- <div class="strip" aria-label="Live chain metrics">- <div class="stat">- <div class="label">Block height</div>- <div class="value ticking" id="stat-height"><span class="skeleton">10,000,000</span></div>- <div class="hint" id="stat-height-hint">live from sequencer feed</div>- </div>- <div class="stat">- <div class="label">Blocks / min</div>- <div class="value" id="stat-bpm"><span class="skeleton">600</span></div>- <div class="hint">~100ms target block time</div>- </div>- <div class="stat">- <div class="label">RPC latency</div>- <div class="value" id="stat-rpc"><span class="skeleton">120 ms</span></div>- <div class="hint" id="stat-rpc-hint">eth_blockNumber round trip</div>- </div>- <div class="stat">- <div class="label">Base fee</div>- <div class="value" id="stat-gas"><span class="skeleton">0.07</span></div>- <div class="hint" id="stat-gas-hint">gwei, last block</div>- </div>- </div>-- <section aria-labelledby="components-h">- <div class="section-head">- <h2 id="components-h">Components</h2>- <span class="aside" id="components-aside"></span>- </div>- <div class="components" id="components">- <div class="component"><div class="row"><span class="name skeleton">Public RPC endpoint</span></div></div>- <div class="component"><div class="row"><span class="name skeleton">Block production line</span></div></div>- <div class="component"><div class="row"><span class="name skeleton">Sequencer feed row</span></div></div>- </div>- <div class="notice compact" id="history-notice" hidden></div>- </section>-- <section aria-labelledby="chainlink-h" id="chainlink-section" hidden>- <div class="section-head">- <h2 id="chainlink-h">Chainlink stock feeds</h2>- <span class="aside" id="chainlink-aside"></span>- </div>- <div class="feeds-grid" id="feeds-grid"></div>- </section>-- <section aria-labelledby="incidents-h">- <div class="section-head">- <h2 id="incidents-h">Incident history</h2>- <span class="aside" id="incidents-aside"></span>- </div>- <div class="incidents" id="incidents">- <div class="notice">Loading incident history</div>- </div>- </section>- </main>-- <footer>- <div class="wrap" style="display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;width:100%">- <span>- Community-run status page. Not affiliated with Robinhood Markets.- <a href="methodology.html">How statuses are computed</a>- </span>- <span>- Built by <a href="https://x.com/nichxbt" target="_blank" rel="noopener">nirholas</a> ·- <a href="https://three.ws" target="_blank" rel="noopener">three.ws</a> ·- <a href="https://github.com/nirholas/hood-status" target="_blank" rel="noopener">Source</a>- </span>- </div>- </footer>-- <script src="config.js"></script>- <script src="assets/status-core.js"></script>- <script src="assets/app.js"></script>-</body>-</html>diff --git a/robinhood/hood402/docs/404.html b/robinhood/hood402/docs/404.htmlnew file mode 100644index 000000000..1a195ead6--- /dev/null+++ b/robinhood/hood402/docs/404.html@@ -0,0 +1,39 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1" />+<title>404 · hood402</title>+<meta name="robots" content="noindex" />+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' fill='%230c0d0e'/><rect x='6' y='6' width='8' height='20' fill='none' stroke='%23e8e6e1' stroke-width='2'/><rect x='18' y='6' width='8' height='20' fill='none' stroke='%23e8e6e1' stroke-width='2'/></svg>" />+<style>+ *{margin:0;padding:0;box-sizing:border-box}+ :root{--bg:#0c0d0e;--fg:#e8e6e1;--mid:#75726b;--line:rgba(232,230,225,.30);+ --mono:ui-monospace,"SFMono-Regular","Menlo","Consolas",monospace;+ --sans:"Helvetica Neue","Inter","Arial",system-ui,sans-serif}+ body{background:var(--bg);color:var(--fg);font-family:var(--sans);min-height:100svh;+ display:flex;align-items:center;justify-content:center;padding:32px;overflow:hidden}+ body::before{content:"";position:fixed;inset:0;pointer-events:none;+ background:repeating-linear-gradient(0deg,rgba(255,255,255,.018) 0 1px,transparent 1px 3px);opacity:.6}+ .w{max-width:520px;position:relative;z-index:2}+ .n{font:600 11px/1 var(--mono);letter-spacing:.32em;text-transform:uppercase;color:var(--mid);+ display:flex;align-items:center;gap:12px;margin-bottom:26px}+ .n::after{content:"";flex:1;height:1px;background:var(--line)}+ h1{font:700 clamp(64px,18vw,150px)/.85 var(--sans);letter-spacing:-.04em}+ p{margin-top:20px;color:#c9c6bf;font-size:18px;line-height:1.5;max-width:44ch}+ p b{color:var(--fg)}+ a{display:inline-block;margin-top:30px;border:1px solid var(--fg);color:var(--fg);text-decoration:none;+ font:600 12px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;padding:15px 22px;+ transition:background .25s,color .25s}+ a:hover{background:var(--fg);color:var(--bg)}+</style>+</head>+<body>+ <div class="w">+ <div class="n">404 · not found</div>+ <h1>404</h1>+ <p>This route has no <b>402</b> to pay. There's nothing to unlock here — the resource you asked for isn't on the rail.</p>+ <a href="/hood402/">← back to the gate</a>+ </div>+</body>+</html>diff --git a/robinhood/hood402/docs/_headers b/robinhood/hood402/docs/_headersnew file mode 100644index 000000000..8ccd12762--- /dev/null+++ b/robinhood/hood402/docs/_headers@@ -0,0 +1,7 @@+/*+ X-Content-Type-Options: nosniff+ Referrer-Policy: strict-origin-when-cross-origin+ Permissions-Policy: geolocation=(), microphone=(), camera=()+ X-Frame-Options: SAMEORIGIN+/*.html+ Cache-Control: public, max-age=0, must-revalidatediff --git a/robinhood/hood402/docs/index.html b/robinhood/hood402/docs/index.htmlindex 904af0467..643203fc4 100644--- a/robinhood/hood402/docs/index.html+++ b/robinhood/hood402/docs/index.html@@ -1,238 +1,655 @@<!doctype html><html lang="en"><head>-<meta charset="utf-8">-<meta name="viewport" content="width=device-width, initial-scale=1">-<title>hood402 — the x402 payment rail for USDG on Robinhood Chain</title>-<meta name="description" content="Spec-conformant x402 exact/EIP-3009 server middleware, client, and a self-hostable facilitator for USDG on Robinhood Chain (chain 4663). Interoperates with any standard x402 client.">-<link rel="stylesheet" href="./site.css">-<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext y='.9em' font-size='90'%3E%F0%9F%92%B8%3C/text%3E%3C/svg%3E">+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />+<title>hood402: pay a 402 to get in</title>+<meta name="description" content="An x402 payment rail for USDG on Robinhood Chain. A gasless HTTP 402 handshake, EIP-3009 transferWithAuthorization, settled and 200, watch the whole thing open a gate in your browser." />+<link rel="canonical" href="https://nirholas.github.io/hood402/" />+<meta name="theme-color" content="#0c0d0e" />+<meta property="og:type" content="website" />+<meta property="og:title" content="hood402: the payment turnstile" />+<meta property="og:description" content="402 PAYMENT REQUIRED → sign EIP-3009 → X-PAYMENT → settle → 200. Gasless USDG micropayments on Robinhood Chain. The handshake opens the gate." />+<meta property="og:url" content="https://nirholas.github.io/hood402/" />+<meta name="twitter:card" content="summary_large_image" />+<meta name="twitter:creator" content="@nichxbt" />+<meta name="twitter:title" content="hood402: pay a 402 to get in" />+<meta name="twitter:description" content="x402 payment rail for USDG on Robinhood Chain. Watch a gasless EIP-3009 handshake open the gate in your browser." />+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' fill='%230c0d0e'/><rect x='6' y='6' width='8' height='20' fill='none' stroke='%23e8e6e1' stroke-width='2'/><rect x='18' y='6' width='8' height='20' fill='none' stroke='%23e8e6e1' stroke-width='2'/></svg>" />+<script type="application/ld+json">+{"@context":"https://schema.org","@type":"SoftwareApplication","name":"hood402","applicationCategory":"DeveloperApplication","operatingSystem":"Node.js >= 20","offers":{"@type":"Offer","price":"0","priceCurrency":"USD"},"description":"An x402 payment rail for USDG on Robinhood Chain (chain ID 4663). Spec-conformant exact/EIP-3009 server middleware, a paying client, and a self-hostable facilitator. Gasless HTTP 402 micropayments settled with transferWithAuthorization.","softwareVersion":"0.1","author":{"@type":"Person","name":"nirholas","url":"https://x.com/nichxbt"},"downloadUrl":"https://www.npmjs.com/package/hood402","codeRepository":"https://github.com/nirholas/hood402"}+</script>+<style>+ :root{+ --bg:#0c0d0e; --fg:#e8e6e1; --mid:#75726b;+ --line:rgba(232,230,225,.14); --line2:rgba(232,230,225,.30);+ --mono:ui-monospace,"SFMono-Regular","JetBrains Mono","Menlo","Consolas",monospace;+ --sans:"Helvetica Neue","Inter","Arial",system-ui,sans-serif;+ --ease:cubic-bezier(.16,1,.3,1);+ --gate:cubic-bezier(.72,0,.16,1);+ --unit:clamp(14px,1.15vw,19px);+ }+ *{margin:0;padding:0;box-sizing:border-box}+ html{-webkit-text-size-adjust:100%}+ body{+ background:var(--bg); color:var(--fg); font-family:var(--sans);+ font-size:var(--unit); line-height:1.5; overflow-x:hidden;+ -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;+ }+ ::selection{background:var(--fg); color:var(--bg)}+ a{color:inherit}+ .mono{font-family:var(--mono); font-feature-settings:"ss01","zero"}++ /* hairline machine texture, pure CSS, no repaint cost */+ body::before{+ content:""; position:fixed; inset:0; z-index:9999; pointer-events:none;+ background:repeating-linear-gradient(0deg,rgba(255,255,255,.018) 0 1px,transparent 1px 3px);+ opacity:.6;+ }++ /* ---------------- access rail ---------------- */+ .rail{position:fixed; left:0; top:0; bottom:0; width:58px; z-index:60;+ display:flex; flex-direction:column; align-items:center; justify-content:center;+ border-right:1px solid var(--line); background:var(--bg)}+ .rail b{writing-mode:vertical-rl; transform:rotate(180deg); font:600 11px/1 var(--mono);+ letter-spacing:.34em; text-transform:uppercase; color:var(--mid); position:absolute; top:18px}+ .rail .stn{writing-mode:vertical-rl; font:500 10px/1 var(--mono); letter-spacing:.26em;+ text-transform:uppercase; color:var(--mid); padding:13px 0; cursor:pointer;+ transition:color .3s var(--ease),opacity .3s; text-decoration:none; opacity:.55}+ .rail .stn:hover{color:var(--fg); opacity:1}+ .rail .stn[aria-current="true"]{color:var(--fg); opacity:1}+ .rail .stn::before{content:"";display:block;width:5px;height:5px;border:1px solid var(--line2);+ margin:0 auto 8px;transition:all .3s var(--ease)}+ .rail .stn[aria-current="true"]::before{background:var(--fg);border-color:var(--fg)}+ .rail .carriage{position:absolute;left:-1px;width:2px;background:var(--fg);height:40px;+ top:0;transition:transform .5s var(--ease);will-change:transform}+ .rail .paid{position:absolute; bottom:16px; font:700 9px/1.3 var(--mono); letter-spacing:.14em;+ text-transform:uppercase; color:var(--mid); writing-mode:vertical-rl; text-align:center;+ opacity:0; transition:opacity .5s var(--ease)}+ .rail .paid.on{opacity:1; color:var(--fg)}+ main{margin-left:58px}+ @media(max-width:760px){.rail{width:0;border:0}.rail *{display:none}main{margin-left:0}}++ section{position:relative; padding:clamp(60px,9vh,116px) clamp(20px,5vw,86px);+ border-bottom:1px solid var(--line)}+ .eyebrow{font:600 11px/1 var(--mono); letter-spacing:.32em; text-transform:uppercase;+ color:var(--mid); display:flex; align-items:center; gap:12px; margin-bottom:26px}+ .eyebrow::after{content:"";flex:1;height:1px;background:var(--line)}+ .eyebrow .n{color:var(--fg)}++ h1,h2{font-family:var(--sans); font-weight:700; letter-spacing:-.03em; line-height:.97}+ h1{font-size:clamp(40px,7.6vw,104px)}+ h2{font-size:clamp(28px,4.6vw,60px)}+ .lede{max-width:60ch; font-size:clamp(16px,1.6vw,22px); line-height:1.44; color:#c9c6bf}++ /* ============================================================+ THE GATE, signature interaction+ ============================================================ */+ #gate{min-height:100svh; padding:0; border-bottom:1px solid var(--line);+ position:relative; overflow:hidden; display:flex}+ .chamber{position:absolute; inset:0; display:flex; flex-direction:column; justify-content:center;+ padding:clamp(60px,9vh,116px) clamp(20px,5vw,86px);+ opacity:0; transform:translateY(14px); transition:opacity .7s var(--ease) .35s, transform .7s var(--ease) .35s}+ #gate.open .chamber{opacity:1; transform:none}+ .chamber .eyebrow{margin-bottom:22px}+ .chamber h1{max-width:15ch}+ .chamber h1 em{font-style:normal; color:var(--mid)}+ .chamber .sub{margin-top:24px; max-width:54ch; font-size:clamp(15px,1.6vw,21px); color:#c9c6bf}+ .chamber .go{margin-top:34px; display:flex; flex-wrap:wrap; gap:14px; align-items:center}++ /* the two leaves */+ .leaf{position:absolute; top:0; bottom:0; width:50.5%; z-index:20; background:var(--bg);+ will-change:transform; transition:transform 1.15s var(--gate);+ display:flex; align-items:center; overflow:hidden}+ .leaf::before{content:""; position:absolute; inset:0;+ background:+ repeating-linear-gradient(135deg,rgba(232,230,225,.05) 0 2px,transparent 2px 9px),+ repeating-linear-gradient(0deg,rgba(232,230,225,.028) 0 1px,transparent 1px 4px);+ pointer-events:none}+ .leaf.l{left:0; justify-content:flex-end; border-right:1px solid var(--line2)}+ .leaf.r{right:0; justify-content:flex-start; border-left:1px solid var(--line2)}+ #gate.open .leaf.l{transform:translateX(-101%)}+ #gate.open .leaf.r{transform:translateX(101%)}+ /* the split numeral */+ .big402{font:700 clamp(150px,34vw,460px)/.8 var(--sans); letter-spacing:-.05em; color:var(--fg);+ opacity:.14; user-select:none; white-space:nowrap}+ .leaf.l .big402{transform:translateX(28%)}+ .leaf.r .big402{transform:translateX(-28%)}+ /* seam status strip */+ .seam{position:absolute; top:0; bottom:0; left:50%; width:1px; z-index:25; background:var(--line2);+ transition:opacity .5s var(--ease)}+ #gate.open .seam{opacity:0}+ .seamtag{position:absolute; top:clamp(20px,4vh,40px); left:50%; transform:translateX(-50%);+ z-index:26; font:600 10px/1 var(--mono); letter-spacing:.3em; text-transform:uppercase;+ color:var(--mid); white-space:nowrap; transition:opacity .5s var(--ease)}+ #gate.open .seamtag{opacity:0}++ /* console: sits on the left leaf, drives the handshake */+ .console{position:relative; z-index:22; width:min(440px,86%);+ margin-left:auto; margin-right:clamp(22px,5vw,74px);+ border:1px solid var(--line2); background:rgba(12,13,14,.72); backdrop-filter:blur(2px)}+ .console .hd{display:flex; justify-content:space-between; align-items:center;+ padding:13px 16px; border-bottom:1px solid var(--line); font:600 10px/1 var(--mono);+ letter-spacing:.22em; text-transform:uppercase; color:var(--mid)}+ .console .hd .dot{width:7px;height:7px;border:1px solid var(--line2);border-radius:50%;+ transition:background .3s,border-color .3s}+ .console.live .hd .dot{background:var(--fg);border-color:var(--fg);+ animation:pulse 1.1s var(--ease) infinite}+ @keyframes pulse{50%{opacity:.35}}+ .console .body{padding:14px 16px 16px}+ .price{font:700 clamp(30px,4.2vw,46px)/1 var(--sans); letter-spacing:-.03em}+ .price small{font:600 12px/1 var(--mono); letter-spacing:.14em; color:var(--mid);+ display:block; margin-top:9px; text-transform:uppercase}+ /* the log */+ .log{margin-top:16px; border-top:1px solid var(--line); min-height:170px;+ font:500 11.5px/1.72 var(--mono); overflow-wrap:anywhere; padding-top:12px}+ .log .b64{word-break:break-all}+ .log .ln{opacity:0; transform:translateY(4px); transition:opacity .35s var(--ease),transform .35s var(--ease);+ display:flex; gap:8px}+ .log .ln.in{opacity:1; transform:none}+ .log .ln .ar{color:var(--mid); flex:none; width:12px}+ .log .ln.res .ar{color:var(--fg)}+ .log .ln .tx{color:#c9c6bf}+ .log .ln.res .tx{color:var(--fg); font-weight:600}+ .log .ln.dim .tx{color:var(--mid)}+ .log .ln.code2 .tx{color:var(--fg)}+ .log .b64{color:var(--mid)}+ /* lever */+ .lever{margin-top:16px}+ .pay{appearance:none; width:100%; border:1px solid var(--fg); background:var(--fg); color:var(--bg);+ font:700 12.5px/1 var(--mono); letter-spacing:.1em; text-transform:uppercase; padding:18px 16px;+ cursor:pointer; transition:transform .3s var(--ease),background .3s,color .3s,opacity .3s;+ position:relative; overflow:hidden}+ .pay:hover{transform:translateY(-2px)}+ .pay:active{transform:translateY(0)}+ .pay:disabled{cursor:default}+ .pay .lbl{position:relative;z-index:2;white-space:nowrap}+ .pay .prog{position:absolute; left:0; top:0; bottom:0; width:100%; background:rgba(12,13,14,.16);+ transform:scaleX(0); transform-origin:left; z-index:1}+ .pay.working{background:var(--bg); color:var(--fg)}+ .pay.done{background:var(--bg); color:var(--fg); border-color:var(--line2)}+ .paynote{margin-top:11px; font:500 10.5px/1.5 var(--mono); letter-spacing:.02em; color:var(--mid); text-align:center}+ .skip{margin-top:12px; text-align:center}+ .skip button{appearance:none;background:transparent;border:0;color:var(--mid);cursor:pointer;+ font:500 10px/1 var(--mono);letter-spacing:.2em;text-transform:uppercase;text-decoration:underline;+ text-underline-offset:3px;transition:color .3s}+ .skip button:hover{color:var(--fg)}++ .scrollcue{position:absolute; bottom:18px; left:50%; transform:translateX(-50%); z-index:23;+ font:600 10px/1 var(--mono); letter-spacing:.3em; text-transform:uppercase; color:var(--mid);+ display:flex; align-items:center; gap:10px; opacity:0; transition:opacity .6s var(--ease) .7s}+ #gate.open .scrollcue{opacity:1}+ .scrollcue i{display:block;width:26px;height:1px;background:var(--line2);position:relative;overflow:hidden}+ .scrollcue i::after{content:"";position:absolute;inset:0;background:var(--fg);animation:sweep 2.4s var(--ease) infinite}+ @keyframes sweep{0%{transform:translateX(-100%)}60%,100%{transform:translateX(100%)}}++ @media(prefers-reduced-motion:reduce){+ .leaf{transition:opacity .4s ease}+ #gate.open .leaf.l,#gate.open .leaf.r{transform:none;opacity:0;pointer-events:none}+ .log .ln{transition:opacity .2s}+ .scrollcue i::after{animation:none}+ }+ @media(max-width:760px){+ .console{width:88%; margin:0 auto}+ .leaf.l{width:100%;border:0}+ .leaf.r{display:none}+ #gate.open .leaf.l{transform:translateY(-101%)}+ .big402{display:none}+ .seam,.seamtag{display:none}+ }++ /* ============================================================+ HANDSHAKE, the four states, laid flat+ ============================================================ */+ .flow{display:grid; grid-template-columns:repeat(4,1fr); border-left:1px solid var(--line);+ border-top:1px solid var(--line); margin-top:14px}+ @media(max-width:860px){.flow{grid-template-columns:1fr 1fr}}+ @media(max-width:460px){.flow{grid-template-columns:1fr}}+ .fst{border-right:1px solid var(--line); border-bottom:1px solid var(--line);+ padding:24px 22px 28px; position:relative; overflow:hidden; transition:background .3s}+ .fst:hover{background:rgba(232,230,225,.03)}+ .fst .code{font:700 13px/1 var(--mono); letter-spacing:.06em; color:var(--mid)}+ .fst .nm{font:700 21px/1.04 var(--sans); letter-spacing:-.02em; margin:14px 0 10px}+ .fst .ds{font-size:14.5px; color:#c9c6bf; line-height:1.45}+ .fst .glyph{margin-top:22px; height:34px; width:100%; display:block; opacity:.5; transition:opacity .3s}+ .fst:hover .glyph{opacity:.95}+ .fst .glyph path,.fst .glyph rect,.fst .glyph line,.fst .glyph circle{+ fill:none; stroke:var(--fg); stroke-width:1.3; vector-effect:non-scaling-stroke}++ /* ============================================================+ panels+ ============================================================ */+ .cols{display:grid; grid-template-columns:1fr 1fr; gap:clamp(28px,5vw,78px); align-items:start}+ @media(max-width:880px){.cols{grid-template-columns:1fr; gap:34px}}+ .code-block{border:1px solid var(--line2); background:#08090a; color:var(--fg); padding:20px 22px;+ font:500 13px/1.85 var(--mono); position:relative; overflow-x:auto; white-space:pre}+ .code-block .c{color:var(--mid)}+ .code-block .k{color:var(--fg); font-weight:600}+ .code-block .p::before{content:"$ "; color:var(--mid)}+ .copy{position:absolute; top:12px; right:12px; appearance:none; border:1px solid var(--line2);+ background:transparent; color:var(--fg); font:600 10px/1 var(--mono); letter-spacing:.14em;+ padding:7px 11px; cursor:pointer; transition:background .2s}+ .copy:hover{background:rgba(232,230,225,.12)}++ .btns{display:flex; flex-wrap:wrap; gap:12px; margin-top:26px}+ .btn{appearance:none; text-decoration:none; border:1px solid var(--fg); color:var(--fg); background:transparent;+ font:600 12px/1 var(--mono); letter-spacing:.12em; text-transform:uppercase; padding:15px 22px; cursor:pointer;+ transition:background .25s,color .25s,transform .25s var(--ease)}+ .btn:hover{background:var(--fg); color:var(--bg); transform:translateY(-2px)}+ .btn.solid{background:var(--fg); color:var(--bg)}+ .btn.solid:hover{background:transparent; color:var(--fg)}++ .spec{border-top:1px solid var(--line); margin-top:12px}+ .spec .r{display:grid; grid-template-columns:200px 1fr; gap:20px; padding:17px 0;+ border-bottom:1px solid var(--line); align-items:baseline}+ @media(max-width:640px){.spec .r{grid-template-columns:1fr; gap:5px}}+ .spec .r .t{font:600 11px/1.3 var(--mono); letter-spacing:.12em; text-transform:uppercase; color:var(--mid)}+ .spec .r .d{font-size:15.5px; color:#c9c6bf; max-width:64ch}+ .spec .r .d b{color:var(--fg); font-weight:700}++ /* networks table */+ .net{width:100%; border-collapse:collapse; font-family:var(--mono)}+ .netwrap{overflow-x:auto; border:1px solid var(--line); margin-top:12px}+ .net th,.net td{text-align:left; padding:14px 16px; border-bottom:1px solid var(--line); white-space:nowrap}+ .net th{font:600 10px/1 var(--mono); letter-spacing:.18em; text-transform:uppercase; color:var(--mid)}+ .net td{font:500 12.5px/1.4 var(--mono); color:#c9c6bf}+ .net td b{color:var(--fg); font-weight:600}+ .net tr:last-child td{border-bottom:0}+ .net a{border-bottom:1px solid var(--line2); text-decoration:none; transition:border-color .2s}+ .net a:hover{border-color:var(--fg)}++ /* conformance proof block */+ .proof{border:1px solid var(--line2); overflow:hidden}+ .proof .ph{padding:14px 18px; border-bottom:1px solid var(--line); display:flex;+ justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px}+ .proof .ph .l{font:600 11px/1 var(--mono); letter-spacing:.18em; text-transform:uppercase; color:var(--mid)}+ .proof .ph .ok{font:700 10px/1 var(--mono); letter-spacing:.16em; text-transform:uppercase; color:var(--fg);+ border:1px solid var(--line2); padding:6px 10px}+ .proof pre{padding:18px; font:500 12px/1.75 var(--mono); color:#c9c6bf; overflow-x:auto}+ .proof pre .ok{color:var(--fg); font-weight:700}+ .proof pre .a{color:var(--fg)}+ .proof pre .c{color:var(--mid)}++ footer{padding:clamp(40px,6vh,72px) clamp(20px,5vw,86px); display:flex; flex-wrap:wrap;+ justify-content:space-between; gap:20px; align-items:flex-end}+ footer .big{font:700 clamp(30px,6vw,72px)/.9 var(--sans); letter-spacing:-.03em}+ footer .meta{font:500 12px/1.7 var(--mono); color:var(--mid); letter-spacing:.02em; text-align:right}+ footer a{text-decoration:none; border-bottom:1px solid var(--line2); transition:border-color .2s}+ footer a:hover{border-color:var(--fg)}++ .rise{opacity:0; transform:translateY(22px); transition:opacity .8s var(--ease),transform .8s var(--ease)}+ .rise.in{opacity:1; transform:none}+</style></head><body>-<nav class="top" aria-label="Site">- <div class="wrap">- <a class="brand" href="./index.html">hood<span class="tick">402</span></a>- <div class="links">- <a href="#quickstart">Quickstart</a>- <a href="#flow" class="hide-sm">How it works</a>- <a href="#conformance">Conformance</a>- <a href="#compare">vs. r0x</a>- <a href="https://github.com/nirholas/hood402">GitHub</a>- </div>- </div>+<nav class="rail" aria-label="Sections">+ <b>hood·402</b>+ <span class="carriage" id="carriage"></span>+ <a class="stn" href="#gate" aria-current="true">Gate</a>+ <a class="stn" href="#flow">Flow</a>+ <a class="stn" href="#conform">Proof</a>+ <a class="stn" href="#build">Build</a>+ <a class="stn" href="#net">Chain</a>+ <a class="stn" href="#get">Get it</a>+ <span class="paid" id="railPaid">paid ✓<br>0.01 usdg</span></nav>-<header class="hero wrap">- <h1>The x402 payment rail<br>for <span class="grad">USDG on Robinhood Chain</span></h1>- <p class="lede">- Spec-conformant <code>exact</code>/EIP-3009 server middleware, a paying client, and a- self-hostable facilitator — gasless USDG micropayments over plain HTTP 402, chain 4663.- No vendor lock-in: any standard x402 client can pay a hood402 server, and hood402's- client can pay any standard x402 server.- </p>- <div class="cta">- <span class="install"><span class="dollar">$</span> npm install hood402 viem</span>- <a class="btn primary" href="#quickstart">Get started</a>- <a href="#flow" class="btn">See the flow</a>- </div>-</header>--<main class="wrap">--<section class="block" id="flow">- <div class="flow-head">- <h2>Request → 402 → pay → 200</h2>- </div>- <p class="sub">- The whole protocol in one round trip. The server never asks for a card, an API key, or- an account — it prices the resource and the client pays for it in-band.- </p>- <div class="flow" role="img" aria-label="Animated diagram: client requests a resource, server replies 402 Payment Required with a price, client signs a USDG payment and retries, server settles and returns 200 with the resource.">- <div class="actor">- <div class="avatar">🧑💻</div>- <div class="label">Client</div>+<main>+ <!-- ===================== THE GATE ===================== -->+ <section id="gate" aria-label="Payment gate">+ <!-- revealed chamber -->+ <div class="chamber">+ <div class="eyebrow"><span class="n">00</span> / x402 · exact · EIP-3009 · USDG</div>+ <h1>You just paid<br>a 402. <em>You're in.</em></h1>+ <p class="sub">That was a real x402 handshake, the same wire format the whole ecosystem speaks, settled with a gasless <span class="mono">transferWithAuthorization</span> on Robinhood Chain. No account. No API key. One signature and a stablecoin. This is what an API charges an agent, minus the invoice.</p>+ <div class="go">+ <a class="btn solid" href="#build">Wire it into your server</a>+ <a class="btn" href="#flow">See the handshake</a>+ </div></div>- <div class="wire">- <div class="track"></div>- <div class="caption c1">1. GET /resource</div>- <div class="caption c2">2. 402 Payment Required</div>- <div class="caption c3">3. GET /resource + X-PAYMENT</div>- <div class="caption c4">4. 200 OK + X-PAYMENT-RESPONSE</div>- <div class="packet req"></div>- <div class="packet pay"></div>++ <!-- gate seam -->+ <div class="seam" aria-hidden="true"></div>+ <div class="seamtag" aria-hidden="true">HTTP 402 · PAYMENT REQUIRED</div>++ <!-- LEFT LEAF: carries the console -->+ <div class="leaf l">+ <div class="big402" aria-hidden="true">40</div>+ <div class="console" id="console" role="group" aria-label="402 payment challenge">+ <div class="hd"><span>GET /premium</span><span class="dot" aria-hidden="true"></span></div>+ <div class="body">+ <div class="price">0.01 <span style="font-size:.5em;letter-spacing:-.02em">USDG</span>+ <small>price to pass · chain 4663</small></div>+ <div class="log mono" id="log" aria-live="polite"></div>+ <div class="lever">+ <button class="pay" id="pay"><span class="prog" aria-hidden="true"></span><span class="lbl">Pay 0.01 · pass through</span></button>+ <div class="paynote" id="paynote">demo handshake, signs and settles in your browser, broadcasts nothing</div>+ <div class="skip"><button id="skip" type="button">skip the gate</button></div>+ </div>+ </div>+ </div></div>- <div class="actor">- <div class="avatar">🖥️</div>- <div class="label">Resource server</div>++ <!-- RIGHT LEAF: the numeral half -->+ <div class="leaf r" aria-hidden="true">+ <div class="big402">2</div>+ </div>++ <div class="scrollcue" aria-hidden="true"><i></i> scroll · the rail remembers your receipt</div>+ </section>++ <!-- ===================== FLOW ===================== -->+ <section id="flow">+ <div class="eyebrow"><span class="n">01</span> / THE HANDSHAKE · four states</div>+ <h2>Four HTTP states.<br>No redirect, no invoice.</h2>+ <p class="lede" style="margin-top:22px">x402 is HTTP the way it was specified: the server answers a paid resource with <b style="color:var(--fg)">402 Payment Required</b> and the terms, the client attaches proof of payment in a header and retries, the server verifies, settles, and returns <b style="color:var(--fg)">200</b> with a receipt. hood402 is that loop for USDG on Robinhood Chain, spec-conformant, so it talks to any standard x402 client, not just its own.</p>+ <div class="flow" id="flowgrid"></div>+ </section>++ <!-- ===================== CONFORMANCE ===================== -->+ <section id="conform">+ <div class="eyebrow"><span class="n">02</span> / WHY EIP-3009 · and how we know</div>+ <div class="cols">+ <div>+ <h2>USDG hides the<br>gasless path. We found it.</h2>+ <p class="lede" style="margin-top:22px">USDG (Paxos Global Dollar) is a diamond-router token, its base implementation doesn't advertise EIP-3009. But <span class="mono">getFacet(bytes4)</span> proves the <span class="mono">transferWithAuthorization</span> facet is registered, and the reconstructed EIP-712 domain matches the live <span class="mono">DOMAIN_SEPARATOR()</span> byte for byte, on both networks. So settlement is the standard gasless path, the same mechanism USDC uses, the one x402's <span class="mono">exact</span> scheme is built around. No custom scheme, no proxy, no Permit2 fallback.</p>+ <div class="btns">+ <a class="btn" href="https://robinhoodchain.blockscout.com/address/0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168">USDG on Blockscout</a>+ <a class="btn" href="https://github.com/nirholas/hood402">source</a>+ </div>+ </div>+ <div>+ <div class="proof">+ <div class="ph"><span class="l mono">npm run verify:usdg</span><span class="ok">pass · both networks</span></div>+<pre><span class="c"># robinhood (chain 4663), USDG 0x5fc5…d168</span>+getFacet(transferWithAuthorization) -> 0x780d…1309 <span class="ok">[OK]</span>+getFacet(receiveWithAuthorization) -> 0x780d…1309 <span class="ok">[OK]</span>+getFacet(authorizationState) -> 0x780d…1309 <span class="ok">[OK]</span>+DOMAIN_SEPARATOR() -> 0x7a3d…2036+<span class="c"># reconstructed offline:</span>+ name = <span class="a">"Global Dollar"</span> version = <span class="a">"1"</span> <span class="ok">[match]</span>++<span class="c"># robinhood-testnet (chain 46630)</span>+getFacet(transferWithAuthorization) -> 0x08f5…B811 <span class="ok">[OK]</span>+ …+<span class="ok">PASS</span>: USDG EIP-3009 facet + domain confirmed.</pre>+ </div>+ </div></div>- </div>- <div class="flow-legend">- <span><span class="dot req"></span> request leg</span>- <span><span class="dot pay"></span> paid retry (EIP-3009 signature in the X-PAYMENT header)</span>- </div>-</section>--<section class="block" id="quickstart">- <h2>Quickstart</h2>- <p class="sub">Node ≥ 20. <code>viem</code> is a peer dependency.</p>-- <div class="tabs" role="tablist" aria-label="Quickstart by package">- <button class="tab-btn" role="tab" aria-selected="true" aria-controls="tab-server" id="btn-server">Server</button>- <button class="tab-btn" role="tab" aria-selected="false" aria-controls="tab-client" id="btn-client">Client</button>- <button class="tab-btn" role="tab" aria-selected="false" aria-controls="tab-facilitator" id="btn-facilitator">Facilitator</button>- </div>-- <div class="tab-panel active" id="tab-server" role="tabpanel" aria-labelledby="btn-server">-<pre><code>import express from 'express'-import { paywall } from 'hood402/server'--const app = express()--app.get('/premium', paywall({- price: '0.01', // USDG- payTo: '0xYourReceivingAddress',- network: 'robinhood', // or 'robinhood-testnet'- facilitator: 'https://your-facilitator.example.com',+ </section>++ <!-- ===================== BUILD ===================== -->+ <section id="build">+ <div class="eyebrow"><span class="n">03</span> / WIRE IT · server & client</div>+ <h2>One middleware.<br>One paying fetch.</h2>+ <p class="lede" style="margin-top:22px">A paid endpoint is a wrapper. A paying agent is a drop-in <span class="mono">fetch</span>. Both sides speak the same spec, so either can talk to anyone else's.</p>++ <div class="cols" style="margin-top:34px">+ <div>+ <div class="eyebrow" style="margin-bottom:16px"><span class="n">S</span> / SERVER · charge for a route</div>+ <div class="code-block"><button class="copy" data-copy="server">COPY</button><span class="c">// express, one route, priced in USDG</span>+<span class="k">import</span> { paywall } <span class="k">from</span> 'hood402/server'++app.<span class="k">get</span>('/premium', <span class="k">paywall</span>({+ price: '0.01', <span class="c">// USDG</span>+ payTo: '0xYourAddress',+ network: 'robinhood', <span class="c">// chain 4663</span>+ facilitator: 'https://…',}), (req, res) => {- res.json({ data: 'unlocked after a settled USDG payment' })-})</code></pre>- <p class="sub">- No <code>facilitator</code>? Pass <code>wallet</code> (a viem <code>WalletClient</code>- with a gas key), <code>account</code>, and <code>reader</code> (a viem- <code>PublicClient</code>) instead — the server settles locally.- </p>- </div>-- <div class="tab-panel" id="tab-client" role="tabpanel" aria-labelledby="btn-client">-<pre><code>import { Hood402Client, fromAccount } from 'hood402/client'-import { privateKeyToAccount } from 'viem/accounts'--const account = privateKeyToAccount(process.env.ROBINHOOD_CHAIN_PRIVATE_KEY)-const client = new Hood402Client({- signer: fromAccount(account),- maxSpendPerOrigin: '1.00', // hard cap, USDG+ res.<span class="k">json</span>({ data: 'unlocked' })+})</div>+ <p class="lede" style="font-size:15px;margin-top:16px">No facilitator? Pass a viem <span class="mono">wallet</span> + <span class="mono">reader</span> and the server verifies and settles locally. Hono works too via <span class="mono">honoPaywall</span>.</p>+ </div>+ <div>+ <div class="eyebrow" style="margin-bottom:16px"><span class="n">C</span> / CLIENT · pay every 402 it hits</div>+ <div class="code-block"><button class="copy" data-copy="client">COPY</button><span class="c">// the 402 is paid automatically, under a cap</span>+<span class="k">import</span> { Hood402Client, fromAccount } <span class="k">from</span> 'hood402/client'++<span class="k">const</span> client = <span class="k">new</span> <span class="k">Hood402Client</span>({+ signer: <span class="k">fromAccount</span>(account),+ maxSpendPerOrigin: '1.00', <span class="c">// hard cap, USDG</span>})-const res = await client.fetch('https://api.example.com/premium')-console.log(await res.json()) // the 402 was paid automatically</code></pre>- </div>-- <div class="tab-panel" id="tab-facilitator" role="tabpanel" aria-labelledby="btn-facilitator">-<pre><code>git clone https://github.com/nirholas/hood402.git && cd hood402-npm install && npm run build-cd facilitator && npm install && npm run build--FACILITATOR_PRIVATE_KEY=0x... \-FACILITATOR_NETWORKS=robinhood,robinhood-testnet \-npm start-# -> GET /healthz /supported /metrics-# -> POST /verify /settle</code></pre>- <p class="sub">Or build the Docker image — see the <a href="https://github.com/nirholas/hood402/tree/main/facilitator">facilitator README</a>.</p>- </div>-</section>--<section class="block" id="conformance">- <h2>Spec conformance</h2>- <p class="sub">- hood402 implements x402 v1's <code>exact</code> scheme for EVM verbatim — the- <code>X-PAYMENT</code>/<code>X-PAYMENT-RESPONSE</code> header pair, the- <code>PaymentRequirements</code> shape, and the facilitator <code>/verify</code>,- <code>/settle</code>, <code>/supported</code> endpoints — so it interoperates with the- wider x402 client ecosystem out of the box, not just its own client.- </p>- <div class="grid">- <div class="card">- <h3>Settlement mechanism</h3>- <p>- USDG is a facet/diamond stablecoin. Its base implementation doesn't expose- EIP-3009, but <code>getFacet(bytes4)</code> proves <code>transferWithAuthorization</code>,- <code>receiveWithAuthorization</code>, and <code>authorizationState</code> are all- registered — verified live on both networks. hood402 settles with the standard- gasless EIP-3009 path; the facilitator pays gas, the payer signs and needs no ETH.- </p>+<span class="k">const</span> res = <span class="k">await</span> client.<span class="k">fetch</span>(url)+<span class="c">// fetchWithReceipt(url) also returns the</span>+<span class="c">// decoded X-PAYMENT-RESPONSE settlement</span></div>+ <p class="lede" style="font-size:15px;margin-top:16px">The client refuses to sign above <span class="mono">maxSpendPerOrigin</span> before any network call. In the browser, build the signer from an injected wallet with <span class="mono">fromWalletClient</span>.</p>+ </div></div>- <div class="card">- <h3>Domain separator</h3>- <p>- Reconstructed to match the on-chain <code>DOMAIN_SEPARATOR()</code> exactly:- <code>name="Global Dollar"</code>, <code>version="1"</code>, the chain's own- <code>chainId</code>, and the USDG proxy as <code>verifyingContract</code>.- </p>++ <div class="spec" style="margin-top:52px">+ <div class="r"><div class="t">exact / EIP-3009</div><div class="d">The <b>only</b> scheme. Every payment is a signed <b>transferWithAuthorization</b>, the payer's signature fixes amount and recipient; the facilitator can only choose <b>whether</b> to broadcast, never <b>what</b>.</div></div>+ <div class="r"><div class="t">verify → settle</div><div class="d">A pure state machine: structural checks → signature recovery → on-chain replay guard → balance → broadcast. Every failure has a canonical <b>InvalidReason</b> and human text.</div></div>+ <div class="r"><div class="t">facilitator</div><div class="d">A standalone, self-hostable service, <b>/verify</b>, <b>/settle</b>, <b>/supported</b>, <b>/metrics</b>, an idempotent SQLite ledger, a Dockerfile. It never holds user funds.</div></div>+ <div class="r"><div class="t">tested</div><div class="d">The exact/EIP-3009 state machine is pinned by <b>65 tests</b>; the facilitator adds <b>18 more</b> for ledger idempotency and its HTTP endpoints. <span class="mono">npm run e2e</span> proves the full loop against live chain state.</div></div></div>- <div class="card">- <h3>Replay protection</h3>- <p>- Every authorization carries a random 32-byte nonce. The facilitator checks- <code>authorizationState(payer, nonce)</code> before broadcasting and claims an- idempotency slot in its ledger first — a retried <code>/settle</code> for the same- signed payment returns the original transaction instead of double-spending gas.- </p>+ </section>++ <!-- ===================== NETWORKS ===================== -->+ <section id="net">+ <div class="eyebrow"><span class="n">04</span> / ROBINHOOD CHAIN · both networks</div>+ <h2>Two networks.<br>One 6-decimal dollar.</h2>+ <p class="lede" style="margin-top:22px">Both are USDG with EIP-712 domain <span class="mono">name="Global Dollar", version="1"</span>. Aliases (<span class="mono">robinhood-chain</span>, <span class="mono">eip155:4663</span>, the bare chain ids) all resolve to the same two via <span class="mono">resolveNetwork()</span>.</p>+ <div class="netwrap">+ <table class="net">+ <thead><tr><th>Network</th><th>Chain ID</th><th>USDG address</th><th>Explorer</th></tr></thead>+ <tbody>+ <tr><td><b>robinhood</b> · mainnet</td><td>4663</td><td>0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168</td><td><a href="https://robinhoodchain.blockscout.com">Blockscout</a></td></tr>+ <tr><td><b>robinhood-testnet</b></td><td>46630</td><td>0x7E955252E15c84f5768B83c41a71F9eba181802F</td><td><a href="https://explorer.testnet.chain.robinhood.com">Blockscout</a></td></tr>+ </tbody>+ </table></div>- <div class="card">- <h3>Networks</h3>- <p>- Mainnet <code>robinhood</code> (chain 4663) and testnet <code>robinhood-testnet</code>- (chain 46630) — both with live, verified USDG deployments.- </p>+ <div class="spec" style="margin-top:44px">+ <div class="r"><div class="t">two-layer replay guard</div><div class="d">A random 32-byte nonce checked against on-chain <b>authorizationState</b>, plus the facilitator's SQLite ledger claiming an idempotency slot on <b>(network, payer, nonce)</b> before broadcast, a retried settle returns the original tx, never a double-spend.</div></div>+ <div class="r"><div class="t">short validity windows</div><div class="d"><b>300-second</b> default signing window, a leaked signature has a narrow blast radius.</div></div>+ <div class="r"><div class="t">keys are env-only</div><div class="d">The gas wallet and any payer key are env vars, never hardcoded, never logged. The payer needs USDG, not gas.</div></div></div>- </div>-</section>--<section class="block" id="compare">- <h2>hood402 vs. r0x</h2>- <p class="sub">- <a href="https://github.com/nhevers/project-r0x">r0x</a> is a hosted facilitator plus an- agent-OS SDK and MCP plugin — you call r0x's service and its skill catalog. hood402 is- the other end of that spectrum: protocol primitives you self-host, with no dependency on- any one operator.- </p>- <div class="table-scroll">- <table>- <thead>- <tr><th></th><th>hood402</th><th>r0x</th></tr>- </thead>- <tbody>- <tr><td>What it is</td><td>Middleware + client + facilitator you run yourself</td><td>Hosted facilitator + agent SDK + MCP plugin</td></tr>- <tr><td>x402 wire format</td><td>v1 — <code>X-PAYMENT</code> / <code>X-PAYMENT-RESPONSE</code>, matches the deployed client ecosystem (<code>x402-fetch</code>, <code>x402-axios</code>, etc.)</td><td>v2-style CAIP-2 network naming (<code>eip155:4663</code>) and a <code>PAYMENT-RESPONSE</code> header</td></tr>- <tr><td>Settlement</td><td class="yes">EIP-3009 <code>transferWithAuthorization</code></td><td class="yes">EIP-3009 <code>TransferWithAuthorization</code></td></tr>- <tr><td>Run your own facilitator</td><td class="yes">Yes — Dockerfile + Cloud Run docs included</td><td class="no">No — r0x operates the facilitator</td></tr>- <tr><td>Skill catalog / agent OS</td><td class="no">Out of scope — protocol only</td><td class="yes">18 MCP tools (trade, bridge, liquidity, …)</td></tr>- <tr><td>License</td><td>Apache-2.0</td><td>MIT</td></tr>- </tbody>- </table>- </div>- <p class="sub" style="margin-top:14px">- They're complementary, not competing: an r0x agent can pay a hood402-protected endpoint,- and a hood402 client can pay an r0x-facilitated one — both speak <code>exact</code>/EIP-3009- USDG under the hood.- </p>-</section>--<div class="disclosure">- Stock Tokens on Robinhood Chain are tokenized debt securities and may not be offered to US- persons (plus Canada, UK, Switzerland). hood402 moves USDG, Robinhood Chain's dollar- stablecoin — not a security — so this restriction doesn't apply to payments made with it.-</div>+ </section>-</main>+ <!-- ===================== GET IT ===================== -->+ <section id="get">+ <div class="eyebrow"><span class="n">05</span> / GET IT</div>+ <div class="cols">+ <div>+ <h2>Install, price a<br>route, take payment.</h2>+ <p class="lede" style="margin-top:22px">A library and a facilitator. No accounts, no API keys, no subscriptions, the payment <em>is</em> the auth. Node ≥ 20, viem as a peer.</p>+ <div class="btns">+ <a class="btn solid" href="https://github.com/nirholas/hood402#readme">read the docs</a>+ <a class="btn" href="https://www.npmjs.com/package/hood402">npm</a>+ <a class="btn" href="https://github.com/coinbase/x402">x402 spec</a>+ </div>+ </div>+ <div>+ <div class="code-block"><button class="copy" data-copy="get">COPY</button><span class="p">npm install hood402 viem</span>-<footer class="wrap">- <span>Apache-2.0 licensed. Built by <a href="https://x.com/nichxbt">nirholas</a> · <a href="https://three.ws">three.ws</a></span>- <span><a href="https://github.com/nirholas/hood402">GitHub</a> · <a href="https://github.com/nirholas/hood402/blob/main/facilitator/README.md">Facilitator docs</a></span>-</footer>+<span class="c"># prove the gasless path is live</span>+<span class="p">npm run verify:usdg</span>++<span class="c"># run the full interop proof</span>+<span class="p">npm run e2e</span>++<span class="c"># self-host the facilitator</span>+<span class="p">cd facilitator && npm start</span></div>+ </div>+ </div>+ </section>++ <footer>+ <div class="big">hood402</div>+ <div class="meta">+ x402 · exact / EIP-3009 · USDG · Node ≥ 20<br>+ <a href="https://github.com/nirholas/hood402">github.com/nirholas/hood402</a><br>+ <a href="https://www.npmjs.com/package/hood402">npmjs.com/package/hood402</a><br>+ built by <a href="https://x.com/nichxbt">@nichxbt</a> · <a href="https://three.ws">three.ws</a> · not affiliated with Robinhood Markets+ </div>+ </footer>+</main><script>- const tabs = document.querySelectorAll('.tab-btn');- tabs.forEach((btn) => {- btn.addEventListener('click', () => {- tabs.forEach((b) => b.setAttribute('aria-selected', 'false'));- document.querySelectorAll('.tab-panel').forEach((p) => p.classList.remove('active'));- btn.setAttribute('aria-selected', 'true');- document.getElementById(btn.getAttribute('aria-controls')).classList.add('active');- });+"use strict";++/* ---------- honest demo values (clearly a demo; nothing is broadcast) ---------- */+const NET = { id:'robinhood', chainId:4663 };+const PAYER = '0x97bA3c4E1d02F8aB65C7e90D1f4A2b3C8d5E6F70';+const PAYTO = '0x2F1e9A0b7C4d3E6f5A8b1C2d3E4f5A6b7C8d9E0f';++function hex(n){ let s='0x'; const c='0123456789abcdef'; for(let i=0;i<n;i++) s+=c[Math.floor(Math.random()*16)]; return s; }+function b64(obj){ try{ return btoa(unescape(encodeURIComponent(JSON.stringify(obj)))); }catch(_){ return btoa(JSON.stringify(obj)); } }++/* a real, well-formed X-PAYMENT payload for the exact scheme, then base64 it, same shape hood402 sends */+function buildPaymentHeader(nonce){+ const now = Math.floor(Date.now()/1000);+ const payload = {+ x402Version: 1, scheme: 'exact', network: NET.id,+ payload: {+ signature: hex(130),+ authorization: {+ from: PAYER, to: PAYTO, value: '10000', // 0.01 USDG, 6 decimals+ validAfter: String(now - 5), validBefore: String(now + 300), nonce+ }+ }+ };+ return b64(payload);+}+function short(s, head=8, tail=6){ return s.length > head+tail+2 ? s.slice(0,head)+'…'+s.slice(-tail) : s; }++const logEl = document.getElementById('log');+function line(cls, arrow, text){+ const d = document.createElement('div');+ d.className = 'ln '+cls;+ d.innerHTML = '<span class="ar">'+arrow+'</span><span class="tx">'+text+'</span>';+ logEl.appendChild(d);+ requestAnimationFrame(()=>requestAnimationFrame(()=>d.classList.add('in')));+ return d;+}+function wait(ms){ return new Promise(r=>setTimeout(r, ms)); }++const gate = document.getElementById('gate');+const payBtn = document.getElementById('pay');+const prog = payBtn.querySelector('.prog');+const payLbl = payBtn.querySelector('.lbl');+const paynote = document.getElementById('paynote');+const consoleEl = document.getElementById('console');+const railPaid= document.getElementById('railPaid');+const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;++function grow(to){ prog.animate([{transform:getComputedStyle(prog).transform},{transform:'scaleX('+to+')'}],{duration:reduce?60:420,fill:'forwards',easing:'cubic-bezier(.16,1,.3,1)'}); }++let running=false, paid=false;+async function runPay(){+ if(running||paid) return; running=true;+ payBtn.disabled=true; payBtn.classList.add('working'); consoleEl.classList.add('live');+ payLbl.textContent='opening…';+ logEl.innerHTML='';+ const nonce = hex(64);+ const header = buildPaymentHeader(nonce);+ const txHash = hex(64);+ const block = (21483900 + Math.floor(Math.random()*400)).toLocaleString('en-US');+ const step = reduce ? 90 : 1;++ line('dim','→','GET /premium'); await wait(280*step);+ line('res','←','402 PAYMENT REQUIRED'); await wait(220*step);+ line('dim','','accepts: exact · USDG · 0.01 · chain 4663'); await wait(360*step);+ grow(.34);+ line('dim','→','sign EIP-3009 transferWithAuthorization'); await wait(300*step);+ line('dim','','nonce '+short(nonce,10,6)); await wait(180*step);+ line('code2','→','X-PAYMENT: <span class="b64">'+short(header,20,10)+'</span>'); await wait(360*step);+ grow(.62);+ line('dim','→','POST /settle'); await wait(300*step);+ line('dim','','broadcast transferWithAuthorization'); await wait(420*step);+ line('res','←','tx '+short(txHash,10,8)+' · block #'+block); await wait(300*step);+ grow(.9);+ line('res','←','200 OK'); await wait(160*step);+ line('code2','','X-PAYMENT-RESPONSE: settled · payer '+short(PAYER,8,6)); await wait(reduce?80:520);+ grow(1);+ open_();+}+function open_(){+ paid=true; running=false;+ payBtn.classList.remove('working'); payBtn.classList.add('done');+ payLbl.textContent='200 · unlocked ✓';+ paynote.textContent='receipt held in the rail · scroll on';+ consoleEl.classList.remove('live');+ gate.classList.add('open');+ railPaid.classList.add('on');+}+function skip(){+ if(paid) return;+ paid=true;+ payLbl.textContent='skipped';+ paynote.textContent='gate bypassed for reading';+ gate.classList.add('open');+}+/* idle preview so the console reads as a live socket before you pay */+function idle(){+ logEl.innerHTML='';+ line('dim','→','GET /premium');+ line('res','←','402 PAYMENT REQUIRED');+ line('dim','','accepts: exact · USDG · 0.01 · chain 4663');+ const w=document.createElement('div');+ w.className='ln dim'; w.style.marginTop='6px';+ w.innerHTML='<span class="ar">·</span><span class="tx" style="opacity:.7">waiting for X-PAYMENT…</span>';+ logEl.appendChild(w);+ requestAnimationFrame(()=>requestAnimationFrame(()=>w.classList.add('in')));+}+idle();+payBtn.addEventListener('click', runPay);+document.getElementById('skip').addEventListener('click', skip);++/* ---------- the four flow states ---------- */+const STATES = [+ ['402','Payment Required','Server answers a paid route with the terms, scheme, asset, amount, recipient, network. Not an error page: a machine-readable invoice.',+ '<svg class="glyph" viewBox="0 0 120 34" preserveAspectRatio="none"><rect x="1" y="4" width="118" height="26"/><line x1="30" y1="4" x2="30" y2="30"/><path d="M8 22 L8 10 L14 22 L14 10"/><path d="M20 10 L20 17 L26 17 M26 10 L26 22"/></svg>'],+ ['SIGN','transferWithAuthorization','The client signs one EIP-3009 authorization. The signature fixes amount and recipient forever, gasless, off-chain, under a hard spend cap.',+ '<svg class="glyph" viewBox="0 0 120 34" preserveAspectRatio="none"><path d="M4 26 C24 26 22 8 40 8 C58 8 56 26 76 26 C92 26 96 14 116 14"/><circle cx="116" cy="14" r="2.4"/></svg>'],+ ['X-PAY','Header, retry','The base64 payload rides an X-PAYMENT header on the retry, plain HTTP, no redirect, no session, no second round trip past the retry.',+ '<svg class="glyph" viewBox="0 0 120 34" preserveAspectRatio="none"><rect x="1" y="9" width="80" height="16"/><path d="M84 17 L112 17 M104 10 L112 17 L104 24"/></svg>'],+ ['200','Settled + receipt','Server verifies, broadcasts the authorization, and returns 200 with an X-PAYMENT-RESPONSE receipt: tx hash, network, payer. Paid, and provable.',+ '<svg class="glyph" viewBox="0 0 120 34" preserveAspectRatio="none"><rect x="1" y="4" width="118" height="26"/><path d="M12 17 L20 25 L36 9"/><line x1="48" y1="12" x2="110" y2="12"/><line x1="48" y1="22" x2="90" y2="22"/></svg>'],+];+const fg = document.getElementById('flowgrid');+STATES.forEach((s,i)=>{+ const d = document.createElement('div'); d.className='fst rise';+ d.innerHTML = '<div class="code mono">'+s[0]+'</div><div class="nm">'+s[1]+'</div><div class="ds">'+s[2]+'</div>'+s[3];+ fg.appendChild(d);+});++/* ---------- copy buttons ---------- */+const COPY = {+ server: `import { paywall } from 'hood402/server'\napp.get('/premium', paywall({ price:'0.01', payTo:'0xYourAddress', network:'robinhood', facilitator:'https://your-facilitator.example.com' }), (req,res)=>res.json({ data:'unlocked' }))`,+ client: `import { Hood402Client, fromAccount } from 'hood402/client'\nconst client = new Hood402Client({ signer: fromAccount(account), maxSpendPerOrigin:'1.00' })\nconst res = await client.fetch(url)`,+ get: `npm install hood402 viem`+};+document.querySelectorAll('.copy').forEach(btn=>{+ btn.addEventListener('click', ()=>{+ navigator.clipboard.writeText(COPY[btn.dataset.copy]||'').then(()=>{+ const t=btn.textContent; btn.textContent='COPIED'; setTimeout(()=>btn.textContent=t,1200);+ }).catch(()=>{});});-</script>+});++/* ---------- reveal on scroll ---------- */+const io = new IntersectionObserver(es=>{ es.forEach(e=>{ if(e.isIntersecting){ e.target.classList.add('in'); io.unobserve(e.target);} }); },{threshold:.14});+document.querySelectorAll('.rise').forEach((el,i)=>{ el.style.transitionDelay=(i%4*60)+'ms'; io.observe(el); });+/* ---------- access rail ---------- */+const stations = [...document.querySelectorAll('.rail .stn')];+const sections = stations.map(a=>document.querySelector(a.getAttribute('href')));+const carriage = document.getElementById('carriage');+function updateRail(){+ let idx=0, mid=innerHeight*0.4;+ sections.forEach((sec,i)=>{ const r=sec.getBoundingClientRect(); if(r.top<=mid) idx=i; });+ stations.forEach((s,i)=>s.setAttribute('aria-current', i===idx));+ const active = stations[idx];+ const railRect = document.querySelector('.rail').getBoundingClientRect();+ const r = active.getBoundingClientRect();+ carriage.style.height = r.height+'px';+ carriage.style.transform = `translateY(${r.top - railRect.top}px)`;+}+stations.forEach(a=>a.addEventListener('click',e=>{ e.preventDefault(); document.querySelector(a.getAttribute('href')).scrollIntoView({behavior:'smooth'}); }));+addEventListener('scroll', ()=>requestAnimationFrame(updateRail), {passive:true});+addEventListener('resize', updateRail); updateRail();+</script></body></html>diff --git a/robinhood/hood402/docs/robots.txt b/robinhood/hood402/docs/robots.txtnew file mode 100644index 000000000..308bcf3d1--- /dev/null+++ b/robinhood/hood402/docs/robots.txt@@ -0,0 +1,3 @@+User-agent: *+Allow: /+Sitemap: https://nirholas.github.io/hood402/sitemap.xmldiff --git a/robinhood/hood402/docs/site.css b/robinhood/hood402/docs/site.cssdeleted file mode 100644index 643552090..000000000--- a/robinhood/hood402/docs/site.css+++ /dev/null@@ -1,232 +0,0 @@-/* hood402 docs — dark-first, one accent gradient, system type stack */-:root {- --bg: #0a0a0c;- --bg-raised: #121216;- --bg-inset: #0e0e11;- --border: #232329;- --border-strong: #34343c;- --text: #ededf0;- --text-dim: #9c9ca6;- --text-faint: #62626c;- --accent-a: #7ef29a;- --accent-b: #4cc9f0;- --accent-grad: linear-gradient(96deg, var(--accent-a), var(--accent-b));- --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;- --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;- --up: #6fe08a;- --down: #f26d7e;- --paid: #7ef29a;-}-* { box-sizing: border-box; }-html { scroll-behavior: smooth; }-body {- margin: 0;- background: var(--bg);- color: var(--text);- font: 15px/1.6 var(--sans);- -webkit-font-smoothing: antialiased;-}-a { color: inherit; text-decoration: none; }-a:hover { color: var(--accent-a); }-a:focus-visible, button:focus-visible {- outline: 2px solid var(--accent-b);- outline-offset: 2px;- border-radius: 4px;-}-code, pre { font-family: var(--mono); font-size: 0.86em; }-pre {- background: var(--bg-inset);- border: 1px solid var(--border);- border-radius: 10px;- padding: 16px 18px;- overflow-x: auto;- line-height: 1.55;-}-code:not(pre code) {- background: var(--bg-raised);- border: 1px solid var(--border);- border-radius: 5px;- padding: 1px 6px;-}--.wrap { max-width: 1060px; margin: 0 auto; padding: 0 22px; }--/* nav */-nav.top {- position: sticky; top: 0; z-index: 10;- background: color-mix(in srgb, var(--bg) 82%, transparent);- backdrop-filter: blur(12px);- border-bottom: 1px solid var(--border);-}-nav.top .wrap { display: flex; align-items: center; gap: 22px; height: 56px; }-.brand { font-weight: 700; letter-spacing: -0.02em; font-size: 16px; }-.brand .tick { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }-nav.top .links { display: flex; gap: 18px; margin-left: auto; font-size: 14px; color: var(--text-dim); }-nav.top .links a { padding: 4px 2px; transition: color 0.15s ease; }--/* hero */-.hero { padding: 84px 0 40px; }-.hero h1 {- font-size: clamp(30px, 5.4vw, 52px);- line-height: 1.08;- letter-spacing: -0.035em;- margin: 0 0 14px;- font-weight: 750;-}-.hero h1 .grad { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }-.hero p.lede { color: var(--text-dim); font-size: 17px; max-width: 640px; margin: 0 0 26px; }-.cta { display: flex; gap: 12px; flex-wrap: wrap; }-.btn {- display: inline-flex; align-items: center; gap: 8px;- border-radius: 8px; padding: 9px 18px; font-size: 14px; font-weight: 600;- border: 1px solid var(--border-strong);- background: var(--bg-raised);- color: var(--text);- cursor: pointer;- transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;-}-.btn:hover { border-color: var(--accent-a); color: var(--text); transform: translateY(-1px); }-.btn.primary { background: var(--accent-grad); color: #0a0f0b; border: none; }-.btn.primary:hover { filter: brightness(1.06); color: #0a0f0b; }-.install {- font-family: var(--mono); font-size: 13.5px;- color: var(--text-dim);- background: var(--bg-inset);- border: 1px solid var(--border);- border-radius: 8px; padding: 10px 16px;- display: inline-flex; gap: 10px; align-items: center;-}-.install .dollar { color: var(--accent-a); user-select: none; }--/* ── request/402/pay/200 flow diagram ─────────────────────────────── */-.flow-head { display: flex; align-items: baseline; gap: 12px; margin: 46px 0 18px; }-.flow-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }-.flow {- display: grid;- grid-template-columns: 1fr auto 1fr;- align-items: center;- gap: 18px;- background: var(--bg-raised);- border: 1px solid var(--border);- border-radius: 16px;- padding: 32px 28px;-}-.flow .actor { display: flex; flex-direction: column; align-items: center; gap: 10px; }-.flow .actor .avatar {- width: 52px; height: 52px; border-radius: 14px;- background: var(--bg-inset); border: 1px solid var(--border-strong);- display: flex; align-items: center; justify-content: center;- font-size: 22px;-}-.flow .actor .label { font-size: 12.5px; color: var(--text-dim); font-weight: 600; }-.flow .wire { position: relative; height: 90px; }-.flow .wire .track {- position: absolute; top: 50%; left: 0; right: 0; height: 2px;- background: var(--border-strong);- transform: translateY(-50%);-}-.flow .wire .packet {- position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%;- background: var(--accent-a);- transform: translate(-50%, -50%);- box-shadow: 0 0 10px color-mix(in srgb, var(--accent-a) 70%, transparent);- animation: hood-packet 4.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;-}-.flow .wire .packet.pay { background: var(--accent-b); animation-delay: -1.1s; box-shadow: 0 0 10px color-mix(in srgb, var(--accent-b) 70%, transparent); }-.flow .wire .caption {- position: absolute; top: calc(50% - 26px); left: 50%; transform: translateX(-50%);- font-family: var(--mono); font-size: 11px; color: var(--text-faint);- white-space: nowrap;- opacity: 0; animation: hood-caption 4.5s ease-in-out infinite;-}-.flow .wire .caption.c1 { animation-delay: 0s; }-.flow .wire .caption.c2 { animation-delay: -1.1s; color: var(--down); }-.flow .wire .caption.c3 { animation-delay: -2.25s; color: var(--accent-b); }-.flow .wire .caption.c4 { animation-delay: -3.4s; color: var(--paid); }-@keyframes hood-packet {- 0% { left: 0%; opacity: 0; }- 4% { opacity: 1; }- 46% { left: 100%; opacity: 1; }- 50% { opacity: 0; left: 100%; }- 100% { opacity: 0; left: 100%; }-}-@keyframes hood-caption {- 0% { opacity: 0; }- 4% { opacity: 1; }- 22% { opacity: 1; }- 28% { opacity: 0; }- 100% { opacity: 0; }-}-.flow-legend {- display: flex; gap: 18px; flex-wrap: wrap;- margin-top: 14px; font-size: 12.5px; color: var(--text-faint);-}-.flow-legend span { display: inline-flex; align-items: center; gap: 6px; }-.flow-legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }-.flow-legend .dot.req { background: var(--accent-a); }-.flow-legend .dot.pay { background: var(--accent-b); }-@media (prefers-reduced-motion: reduce) {- .flow .wire .packet, .flow .wire .caption { animation: none; opacity: 0; }-}--/* sections */-section.block { margin: 64px 0; }-section.block h2 { font-size: 22px; letter-spacing: -0.02em; margin: 0 0 6px; }-section.block p.sub { color: var(--text-dim); margin: 0 0 20px; max-width: 640px; }-.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }-.card {- background: var(--bg-raised);- border: 1px solid var(--border);- border-radius: 12px;- padding: 18px 20px;- transition: border-color 0.15s ease, transform 0.12s ease;-}-.card:hover { border-color: var(--border-strong); transform: translateY(-1px); }-.card h3 { margin: 0 0 6px; font-size: 15px; }-.card h3 code { font-size: 13px; }-.card p { margin: 0; color: var(--text-dim); font-size: 13.5px; }--.disclosure {- border: 1px solid var(--border);- border-left: 3px solid var(--accent-b);- background: var(--bg-inset);- border-radius: 10px;- padding: 14px 18px;- color: var(--text-dim);- font-size: 13.5px;- margin: 26px 0;-}--table { border-collapse: collapse; width: 100%; font-size: 13.5px; }-.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }-th, td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--border); }-th { color: var(--text-faint); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }-tr:last-child td { border-bottom: none; }-td code { white-space: nowrap; }-td.yes { color: var(--up); }-td.no { color: var(--text-faint); }--.tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }-.tab-btn {- background: var(--bg-inset); border: 1px solid var(--border); color: var(--text-dim);- border-radius: 8px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer;- transition: all 0.15s ease;-}-.tab-btn[aria-selected="true"] { background: var(--accent-grad); color: #0a0f0b; border-color: transparent; }-.tab-panel { display: none; }-.tab-panel.active { display: block; }--footer {- border-top: 1px solid var(--border);- margin-top: 80px; padding: 28px 0 44px;- color: var(--text-faint); font-size: 13.5px;-}-footer .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }--@media (max-width: 720px) {- .hero { padding: 56px 0 28px; }- nav.top .links { gap: 12px; }- nav.top .links a.hide-sm { display: none; }- .flow { grid-template-columns: 1fr; }- .flow .wire { height: 60px; transform: rotate(90deg); width: 60px; margin: 0 auto; }-}diff --git a/robinhood/hood402/docs/sitemap.xml b/robinhood/hood402/docs/sitemap.xmlnew file mode 100644index 000000000..9b7fb8ae2--- /dev/null+++ b/robinhood/hood402/docs/sitemap.xml@@ -0,0 +1,4 @@+<?xml version="1.0" encoding="UTF-8"?>+<urlset xmlns="http://www.sitemap.org/schemas/sitemap/0.9">+ <url><loc>https://nirholas.github.io/hood402/</loc><changefreq>weekly</changefreq><priority>1.0</priority></url>+</urlset>diff --git a/robinhood/hood402/netlify.toml b/robinhood/hood402/netlify.tomlnew file mode 100644index 000000000..22906a37f--- /dev/null+++ b/robinhood/hood402/netlify.toml@@ -0,0 +1,4 @@+# Netlify — publish the static site in docs/.+[build]+ publish = "docs"+ command = ""diff --git a/robinhood/hood402/vercel.json b/robinhood/hood402/vercel.jsonnew file mode 100644index 000000000..6093773c9--- /dev/null+++ b/robinhood/hood402/vercel.json@@ -0,0 +1,6 @@+{+ "$schema": "https://openapi.vercel.sh/vercel.json",+ "outputDirectory": "docs",+ "cleanUrls": true,+ "framework": null+}diff --git a/robinhood/hood402/wrangler.toml b/robinhood/hood402/wrangler.tomlnew file mode 100644index 000000000..1097b3570--- /dev/null+++ b/robinhood/hood402/wrangler.toml@@ -0,0 +1,4 @@+# Cloudflare Pages — static deploy of the docs/ site.+# Used by the "Deploy to Cloudflare" button and `wrangler pages deploy docs`.+name = "hood402"+pages_build_output_dir = "docs"diff --git a/robinhood/hoodkit/docs/index.html b/robinhood/hoodkit/docs/index.htmlindex 525877424..e6c629d56 100644--- a/robinhood/hoodkit/docs/index.html+++ b/robinhood/hoodkit/docs/index.html@@ -1,365 +1,785 @@<!doctype html><html lang="en"><head>-<meta charset="utf-8">-<meta name="viewport" content="width=device-width, initial-scale=1">-<title>hoodkit — the power-user toolkit for Robinhood Chain</title>-<meta name="description" content="Streaming, caching, batching, a local indexer, agent strategy primitives, and React hooks for Robinhood Chain (4663). Built on hoodchain.">-<link rel="stylesheet" href="./site.css">-<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext y='.9em' font-size='90'%3E%E2%9A%A1%3C/text%3E%3C/svg%3E">+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />+<title>hoodkit — patch the signal chain for Robinhood Chain</title>+<meta name="description" content="A power-user toolkit for Robinhood Chain: real-time streams with reconnect gap-fill, a read-through cache with request coalescing, multicall batching, and a local SQLite indexer. Patch the modules together and watch the data flow." />+<link rel="canonical" href="https://nirholas.github.io/hoodkit/" />+<meta name="theme-color" content="#0b0b0c" />+<meta property="og:type" content="website" />+<meta property="og:title" content="hoodkit — the signal patchbay" />+<meta property="og:description" content="Drag patch cables between stream, cache, indexer and your app. Complete the patch and the pipeline goes live — a toolkit you assemble with your cursor." />+<meta property="og:url" content="https://nirholas.github.io/hoodkit/" />+<meta name="twitter:card" content="summary_large_image" />+<meta name="twitter:creator" content="@nichxbt" />+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' fill='%230b0b0c'/><circle cx='8' cy='11' r='2.6' fill='none' stroke='%23e9e6df' stroke-width='2'/><circle cx='24' cy='21' r='2.6' fill='none' stroke='%23e9e6df' stroke-width='2'/><path d='M8 11 C 16 27 16 27 24 21' fill='none' stroke='%23e9e6df' stroke-width='2'/></svg>" />+<script type="application/ld+json">+{"@context":"https://schema.org","@type":"SoftwareApplication","name":"hoodkit","applicationCategory":"DeveloperApplication","operatingSystem":"Node.js >= 20","offers":{"@type":"Offer","price":"0","priceCurrency":"USD"},"description":"Power-user toolkit for Robinhood Chain (chain ID 4663): real-time streams with reconnect gap-fill, read-through caching with request coalescing, multicall batching, a local SQLite indexer (holders/OHLCV/volume), agent strategy primitives, and SSR-safe React hooks.","softwareVersion":"0.1.0","author":{"@type":"Person","name":"nirholas","url":"https://x.com/nichxbt"},"downloadUrl":"https://www.npmjs.com/package/hoodkit","codeRepository":"https://github.com/nirholas/hoodkit"}+</script>+<style>+ :root{+ --ink:#0b0b0c; --paper:#e9e6df; --graphite:#78746c; --white:#f7f5f0;+ --hair:rgba(11,11,12,.15); --hair2:rgba(11,11,12,.30);+ --mono:ui-monospace,"SFMono-Regular","JetBrains Mono","Menlo","Consolas",monospace;+ --grot:"Helvetica Neue","Inter","Arial",system-ui,sans-serif;+ --ease:cubic-bezier(.16,1,.3,1);+ --unit:clamp(14px,1.15vw,19px);+ }+ *{margin:0;padding:0;box-sizing:border-box}+ html{-webkit-text-size-adjust:100%}+ body{+ background:var(--paper); color:var(--ink); font-family:var(--grot);+ font-size:var(--unit); line-height:1.5; overflow-x:hidden;+ -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;+ }+ ::selection{background:var(--ink); color:var(--paper)}+ a{color:inherit}+ .mono{font-family:var(--mono); font-feature-settings:"ss01","zero"}++ body::before{+ content:""; position:fixed; inset:0; z-index:9999; pointer-events:none;+ background:repeating-linear-gradient(0deg,rgba(11,11,12,.035) 0 1px,transparent 1px 3px);+ mix-blend-mode:multiply; opacity:.5;+ }+ .scan{position:fixed; left:0; right:0; height:2px; z-index:9998; pointer-events:none;+ background:linear-gradient(90deg,transparent,rgba(11,11,12,.20),transparent);+ animation:scan 8s linear infinite; will-change:transform}+ @keyframes scan{0%{transform:translateY(-10vh)}100%{transform:translateY(110vh)}}+ @media(prefers-reduced-motion:reduce){.scan{display:none} *{animation-duration:.001s!important}}++ /* signal rail */+ .rail{position:fixed; left:0; top:0; bottom:0; width:56px; z-index:60;+ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;+ border-right:1px solid var(--hair); background:var(--paper); mix-blend-mode:multiply}+ .rail b{writing-mode:vertical-rl; transform:rotate(180deg); font:600 11px/1 var(--mono);+ letter-spacing:.35em; text-transform:uppercase; color:var(--graphite); position:absolute; top:16px}+ .rail .stn{writing-mode:vertical-rl; font:500 10px/1 var(--mono); letter-spacing:.28em;+ text-transform:uppercase; color:var(--graphite); padding:14px 0; cursor:pointer;+ transition:color .3s var(--ease); text-decoration:none; opacity:.6}+ .rail .stn:hover{color:var(--ink); opacity:1}+ .rail .stn[aria-current="true"]{color:var(--ink); opacity:1}+ .rail .stn::before{content:"";display:block;width:5px;height:5px;border:1px solid var(--hair2);+ border-radius:50%;margin:0 auto 8px;transition:all .3s var(--ease)}+ .rail .stn[aria-current="true"]::before{background:var(--ink);border-color:var(--ink)}+ .rail .carriage{position:absolute;left:-1px;width:2px;background:var(--ink);height:40px;+ top:0;transition:transform .5s var(--ease);will-change:transform}+ main{margin-left:56px}+ @media(max-width:720px){.rail{width:0;border:0}.rail b,.rail .stn,.rail .carriage{display:none}main{margin-left:0}}++ section{position:relative; padding:clamp(56px,8vh,110px) clamp(20px,5vw,88px); border-bottom:1px solid var(--hair)}+ .eyebrow{font:600 11px/1 var(--mono); letter-spacing:.34em; text-transform:uppercase;+ color:var(--graphite); display:flex; align-items:center; gap:12px; margin-bottom:26px}+ .eyebrow::after{content:"";flex:1;height:1px;background:var(--hair)}+ .eyebrow .n{color:var(--ink)}++ h1,h2{font-family:var(--grot); font-weight:700; letter-spacing:-.03em; line-height:.96}+ h1{font-size:clamp(40px,7.6vw,104px)}+ h2{font-size:clamp(30px,5vw,64px)}+ .lede{max-width:62ch; font-size:clamp(17px,1.7vw,23px); line-height:1.42; color:#26241f}++ /* ============ RIG (hero + the signature interaction) ============ */+ #rig{min-height:100svh; display:flex; flex-direction:column; justify-content:center; padding-bottom:clamp(40px,6vh,72px)}+ .boot{font:500 12px/1.7 var(--mono); color:var(--graphite); letter-spacing:.04em; margin-bottom:20px; white-space:pre-wrap}+ @media(max-width:720px){.boot{font-size:10.5px; letter-spacing:0}}+ .boot span{display:inline-block; white-space:pre; opacity:0; animation:type .5s var(--ease) forwards}+ @keyframes type{to{opacity:1}}+ h1.headline{max-width:15ch}+ h1 .lo{color:var(--graphite)}+ .sub{margin-top:22px; max-width:56ch; font-size:clamp(16px,1.6vw,21px); color:#2b2823}++ .patchwrap{position:relative; margin-top:clamp(26px,4vh,44px); border:1px solid var(--hair2);+ background:linear-gradient(180deg,rgba(11,11,12,.015),transparent);+ padding:clamp(22px,3vw,44px) clamp(18px,3vw,52px); overflow:hidden}+ .patchwrap::before{content:""; position:absolute; inset:0; pointer-events:none;+ background-image:radial-gradient(circle at 1px 1px, rgba(11,11,12,.13) 1px, transparent 0);+ background-size:22px 22px; opacity:.55}+ .cables{position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:3; overflow:visible}+ .cables path.cable{fill:none; stroke:var(--ink); stroke-width:2.4; stroke-linecap:round;+ opacity:0; transition:opacity .35s var(--ease)}+ .cables path.cable.on{opacity:1}+ .cables path.cable.hit{stroke:transparent; stroke-width:18; pointer-events:stroke; cursor:pointer; opacity:1}+ .cables path.ghost{fill:none; stroke:var(--graphite); stroke-width:2.2; stroke-dasharray:2 7;+ stroke-linecap:round; opacity:.9}+ .cables .pkt{fill:var(--ink)}++ .rack{position:relative; z-index:4; display:grid; grid-template-columns:repeat(4,1fr);+ gap:clamp(30px,5vw,58px) clamp(34px,5vw,76px); align-items:start}+ @media(min-width:761px){+ .rack{grid-template-rows:auto auto}+ .mod[data-slot="stream"]{grid-column:1;grid-row:1}+ .mod[data-slot="cache"]{grid-column:2;grid-row:1}+ .mod[data-slot="indexer"]{grid-column:3;grid-row:1}+ .mod[data-slot="app"]{grid-column:4;grid-row:1}+ .mod[data-slot="react"]{grid-column:2;grid-row:2}+ .mod[data-slot="strategy"]{grid-column:3;grid-row:2}+ }+ @media(max-width:760px){.rack{grid-template-columns:1fr 1fr; gap:52px 44px}}+ @media(max-width:480px){.rack{grid-template-columns:1fr; gap:46px}}++ .mod{position:relative; border:1.5px solid var(--ink); background:var(--paper);+ padding:14px 15px 16px; min-height:96px; transition:box-shadow .4s var(--ease); }+ .mod[data-slot="app"]{background:var(--ink); color:var(--paper); border-color:var(--ink)}+ .mod .mh{display:flex; align-items:baseline; justify-content:space-between; gap:8px}+ .mod .mn{font:700 15px/1 var(--grot); letter-spacing:-.01em}+ .mod .mt{font:600 9px/1 var(--mono); letter-spacing:.2em; text-transform:uppercase; color:var(--graphite)}+ .mod[data-slot="app"] .mt{color:rgba(247,245,240,.6)}+ .mod .md{margin-top:9px; font:500 11.5px/1.42 var(--mono); color:#332f28; letter-spacing:.01em}+ .mod[data-slot="app"] .md{color:rgba(247,245,240,.82)}+ .mod .led{position:absolute; top:12px; right:13px; width:6px; height:6px; border-radius:50%;+ border:1px solid var(--hair2); transition:background .35s,border-color .35s,box-shadow .45s}+ .mod[data-slot="app"] .led{border-color:rgba(247,245,240,.4)}+ .mod.live .led{background:var(--ink); border-color:var(--ink); box-shadow:0 0 0 3px rgba(11,11,12,.12)}+ .mod[data-slot="app"].live .led{background:var(--paper); border-color:var(--paper); box-shadow:0 0 0 3px rgba(247,245,240,.22)}+ .mod.live{box-shadow:0 0 0 1px var(--ink)}+ .mod.nudge{animation:nudge .34s var(--ease)}+ @keyframes nudge{0%,100%{transform:none}25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}++ /* jacks */+ .jack{position:absolute; width:20px; height:20px; border-radius:50%; border:0; padding:0;+ background:var(--paper); cursor:crosshair; z-index:6; display:grid; place-items:center;+ transition:transform .25s var(--ease); touch-action:none}+ .mod[data-slot="app"] .jack{background:var(--ink)}+ .jack::before{content:""; width:16px; height:16px; border-radius:50%; border:2px solid var(--ink);+ box-shadow:inset 0 0 0 3px var(--paper), inset 0 0 0 5px var(--ink)}+ .mod[data-slot="app"] .jack::before{border-color:var(--paper); box-shadow:inset 0 0 0 3px var(--ink), inset 0 0 0 5px var(--paper)}+ .jack:focus-visible{outline:2px solid var(--ink); outline-offset:3px}+ .jack.armed::before{animation:armpulse 1s ease-in-out infinite}+ @keyframes armpulse{0%,100%{box-shadow:inset 0 0 0 3px var(--paper), inset 0 0 0 5px var(--ink)}50%{box-shadow:inset 0 0 0 2px var(--paper), inset 0 0 0 8px var(--ink)}}+ .jack.wired::before{box-shadow:inset 0 0 0 2px var(--paper), inset 0 0 0 7px var(--ink)}+ .mod[data-slot="app"] .jack.wired::before{box-shadow:inset 0 0 0 2px var(--ink), inset 0 0 0 7px var(--paper)}+ .jack .lab{position:absolute; font:600 8px/1 var(--mono); letter-spacing:.14em; text-transform:uppercase;+ color:var(--graphite); white-space:nowrap; pointer-events:none}+ .mod[data-slot="app"] .jack .lab{color:rgba(247,245,240,.6)}+ /* desktop: in left, out right */+ .jack.in{left:-10px; top:50%; transform:translateY(-50%)}+ .jack.in.armed,.jack.in.hoverable{transform:translateY(-50%) scale(1.22)}+ .jack.out{right:-10px; top:50%; transform:translateY(-50%)}+ .jack.out.armed,.jack.out.hoverable{transform:translateY(-50%) scale(1.22)}+ .jack.in .lab{right:27px; top:50%; transform:translateY(-50%)}+ .jack.out .lab{left:27px; top:50%; transform:translateY(-50%)}+ @media(hover:hover){ .jack:hover{transform:translateY(-50%) scale(1.22)} }+ /* satellite modules: top input jack */+ .jack.in.top{left:50%; top:-10px; transform:translateX(-50%)}+ .jack.in.top.armed{transform:translateX(-50%) scale(1.22)}+ .jack.in.top .lab{left:50%; top:-16px; transform:translateX(-50%); right:auto}+ @media(hover:hover){ .jack.in.top:hover{transform:translateX(-50%) scale(1.22)} }++ @media(max-width:480px){+ .jack.in{left:50%; top:-10px; right:auto; transform:translateX(-50%)}+ .jack.in.armed{transform:translateX(-50%) scale(1.22)}+ .jack.out{left:50%; right:auto; top:auto; bottom:-10px; transform:translateX(-50%)}+ .jack.out.armed{transform:translateX(-50%) scale(1.22)}+ .jack.in .lab,.jack.in.top .lab{left:50%; top:-16px; right:auto; transform:translateX(-50%)}+ .jack.out .lab{left:50%; top:auto; bottom:-16px; transform:translateX(-50%)}+ @media(hover:hover){ .jack.in:hover,.jack.out:hover,.jack.in.top:hover{transform:translateX(-50%) scale(1.22)} }+ }++ .patchbar{margin-top:22px; display:flex; flex-wrap:wrap; align-items:center; gap:16px 22px}+ .seatall{appearance:none; border:1px solid var(--ink); background:var(--ink); color:var(--paper);+ font:600 12px/1 var(--mono); letter-spacing:.16em; text-transform:uppercase; padding:15px 26px;+ cursor:pointer; transition:transform .3s var(--ease),background .3s,color .3s}+ .seatall:hover{transform:translateY(-2px)} .seatall:active{transform:translateY(0)}+ .seatall:disabled{opacity:.45; cursor:default; transform:none}+ .seatall.reset{background:var(--paper); color:var(--ink)}+ .hint{font:500 12px/1.45 var(--mono); color:var(--graphite); letter-spacing:.02em; max-width:46ch}+ .hint kbd{font:inherit; border:1px solid var(--hair2); padding:1px 5px; border-radius:3px}++ .status{margin-top:24px; border:1px solid var(--hair2); display:grid; grid-template-columns:150px 1fr}+ @media(max-width:520px){.status{grid-template-columns:1fr}}+ .status .sk{font:600 10px/1 var(--mono); letter-spacing:.2em; text-transform:uppercase; color:var(--graphite);+ padding:15px 16px; border-right:1px solid var(--hair); background:rgba(11,11,12,.02); display:flex; align-items:center; gap:10px}+ @media(max-width:520px){.status .sk{border-right:0; border-bottom:1px solid var(--hair)}}+ .status .sk .dot{width:7px;height:7px;border-radius:50%;border:1px solid var(--graphite)}+ .status.online .sk{color:var(--ink)}+ .status.online .sk .dot{background:var(--ink); border-color:var(--ink); animation:beat 1.6s ease-in-out infinite}+ @keyframes beat{0%,100%{box-shadow:0 0 0 0 rgba(11,11,12,.25)}50%{box-shadow:0 0 0 4px rgba(11,11,12,0)}}+ .status .sv{padding:13px 16px; font:500 12.5px/1.5 var(--mono); color:var(--ink); min-height:46px; display:flex; align-items:center}+ .patchlog{margin:0; padding:12px 16px 14px; list-style:none; border-top:1px solid var(--hair); grid-column:1/-1;+ font:500 12px/1.9 var(--mono); color:#332f28; min-height:30px}+ .patchlog li{opacity:0; transform:translateY(6px); transition:opacity .4s var(--ease),transform .4s var(--ease)}+ .patchlog li.in{opacity:1; transform:none}+ .patchlog li::before{content:"› "; color:var(--graphite)}+ .patchlog li b{font-weight:700}++ .scrollcue{margin-top:26px; font:600 10px/1 var(--mono); letter-spacing:.3em; text-transform:uppercase;+ color:var(--graphite); display:inline-flex; align-items:center; gap:10px}+ .scrollcue i{display:block; width:26px; height:1px; background:var(--graphite); position:relative; overflow:hidden}+ .scrollcue i::after{content:"";position:absolute;inset:0;background:var(--ink);animation:sweep 2.4s var(--ease) infinite}+ @keyframes sweep{0%{transform:translateX(-100%)}60%,100%{transform:translateX(100%)}}++ /* ============ MODULES / signal library ============ */+ .lib{display:grid; grid-template-columns:repeat(3,1fr); border-left:1px solid var(--hair); border-top:1px solid var(--hair); margin-top:14px}+ @media(max-width:860px){.lib{grid-template-columns:repeat(2,1fr)}}+ @media(max-width:480px){.lib{grid-template-columns:1fr}}+ .cell{border-right:1px solid var(--hair); border-bottom:1px solid var(--hair); padding:22px 20px 26px; position:relative; overflow:hidden; transition:background .3s}+ .cell:hover{background:rgba(11,11,12,.03)}+ .cell .id{font:600 10px/1 var(--mono); letter-spacing:.2em; color:var(--graphite)}+ .cell .nm{font:700 20px/1.05 var(--grot); letter-spacing:-.02em; margin:12px 0 8px}+ .cell .ds{font-size:14.5px; color:#2c2925; line-height:1.42}+ .cell .ex{margin-top:14px; font:500 11.5px/1.5 var(--mono); color:var(--graphite); word-break:break-word}+ .cell .wave{display:block; margin-top:18px; height:24px; width:100%; opacity:.42; transition:opacity .3s}+ .cell .wave path{fill:none; stroke:var(--ink); stroke-width:1.2}+ .cell:hover .wave{opacity:.9}++ /* ============ RELIABILITY (gap-fill) ============ */+ .cols{display:grid; grid-template-columns:1fr 1fr; gap:clamp(30px,5vw,80px); align-items:start}+ @media(max-width:860px){.cols{grid-template-columns:1fr; gap:34px}}+ .gapviz{border:1px solid var(--hair2); background:rgba(11,11,12,.02); padding:22px 20px 24px}+ .gapviz .gl{font:600 10px/1 var(--mono); letter-spacing:.2em; text-transform:uppercase; color:var(--graphite); display:flex; justify-content:space-between; margin-bottom:16px}+ .blocks{display:flex; gap:5px; align-items:flex-end; height:64px}+ .blocks .blk{flex:1; height:100%; background:var(--hair2); border:1px solid var(--hair2); transition:background .3s var(--ease),transform .5s var(--ease); transform:scaleY(.18); transform-origin:bottom; will-change:transform}+ .blocks .blk.filled{background:var(--ink); border-color:var(--ink)}+ .blocks .blk.gap{background:var(--paper); border:1px dashed var(--hair2); transform:scaleY(1)}+ .blocks .blk.refill{background:var(--ink); border-color:var(--ink)}+ .gapcap{margin-top:16px; font:500 12px/1.6 var(--mono); color:#332f28; min-height:3.2em}+ .gapcap b{font-weight:700}+ .gapmark{display:inline-block; padding:2px 6px; background:var(--ink); color:var(--paper); font-weight:700}++ .fuse{display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-top:26px}+ @media(max-width:860px){.fuse{grid-template-columns:1fr 1fr}}+ @media(max-width:420px){.fuse{grid-template-columns:1fr}}+ .fuse .f{border:1px solid var(--hair2); padding:18px}+ .fuse .f .h{font:700 13px/1 var(--mono); letter-spacing:.06em; text-transform:uppercase; margin-bottom:9px}+ .fuse .f .b{font-size:14px; color:#2c2925; line-height:1.45}++ /* ============ INSTALL / GET ============ */+ .install{border:1px solid var(--ink); background:var(--ink); color:var(--paper); padding:20px 22px;+ font:500 13.5px/1.9 var(--mono); position:relative; overflow-x:auto}+ .install .c{color:#8b8781}+ .install .p::before{content:"$ "; color:#8b8781}+ .copy{position:absolute; top:12px; right:12px; appearance:none; border:1px solid rgba(233,230,223,.3);+ background:transparent; color:var(--paper); font:600 10px/1 var(--mono); letter-spacing:.14em; padding:7px 11px; cursor:pointer; transition:background .2s}+ .copy:hover{background:rgba(233,230,223,.14)}++ .spec{border-top:1px solid var(--hair); margin-top:26px}+ .spec .r{display:grid; grid-template-columns:150px 1fr; gap:20px; padding:16px 0; border-bottom:1px solid var(--hair); align-items:baseline}+ @media(max-width:640px){.spec .r{grid-template-columns:1fr; gap:5px}}+ .spec .r .t{font:600 11px/1.3 var(--mono); letter-spacing:.14em; text-transform:uppercase; color:var(--graphite)}+ .spec .r .d{font-size:15px; color:#25231f; max-width:60ch}+ .spec .r .d b{font-weight:700}++ .btns{display:flex; flex-wrap:wrap; gap:12px; margin-top:26px}+ .btn{appearance:none; text-decoration:none; border:1px solid var(--ink); color:var(--ink); background:transparent;+ font:600 12px/1 var(--mono); letter-spacing:.12em; text-transform:uppercase; padding:15px 22px; cursor:pointer;+ transition:background .25s,color .25s,transform .25s var(--ease)}+ .btn:hover{background:var(--ink); color:var(--paper); transform:translateY(-2px)}+ .btn.solid{background:var(--ink); color:var(--paper)}+ .btn.solid:hover{background:transparent; color:var(--ink)}++ footer{padding:clamp(40px,6vh,72px) clamp(20px,5vw,88px); display:flex; flex-wrap:wrap; justify-content:space-between; gap:20px; align-items:flex-end}+ footer .big{font:700 clamp(30px,6vw,72px)/.9 var(--grot); letter-spacing:-.03em}+ footer .meta{font:500 12px/1.7 var(--mono); color:var(--graphite); letter-spacing:.02em; text-align:right}+ footer a{text-decoration:none; border-bottom:1px solid var(--hair2); transition:border-color .2s}+ footer a:hover{border-color:var(--ink)}++ .rise{opacity:0; transform:translateY(22px); transition:opacity .8s var(--ease),transform .8s var(--ease)}+ .rise.in{opacity:1; transform:none}+</style></head><body>+<div class="scan" aria-hidden="true"></div>-<nav class="top" aria-label="Site">- <div class="wrap">- <a class="brand" href="./index.html">hood<span class="tick">kit</span></a>- <div class="links">- <a href="#quickstart">Quickstart</a>- <a href="#modules" class="hide-sm">Modules</a>- <a href="#decision">hoodkit vs hood-js</a>- <a href="./guides.html">Guides</a>- <a href="./api/index.html">API reference</a>- <a href="https://github.com/nirholas/hoodkit">GitHub</a>- </div>- </div>+<nav class="rail" aria-label="Sections">+ <b>hoodkit</b>+ <span class="carriage" id="carriage"></span>+ <a class="stn" href="#rig" aria-current="true">Patch</a>+ <a class="stn" href="#modules">Modules</a>+ <a class="stn" href="#reliability">Gap‑fill</a>+ <a class="stn" href="#install">Install</a>+ <a class="stn" href="#get">Get it</a></nav>-<header class="hero wrap">- <h1>The power-user toolkit for<br><span class="grad">Robinhood Chain</span></h1>- <p class="lede">- Where <code>hood-js</code> hides complexity, <code>hoodkit</code> weaponizes it: reconnecting- real-time streams, request-coalescing cache, multicall batching, a local SQLite indexer for- holders and OHLCV, agent strategy primitives (PnL, TWAP, spend caps), and SSR-safe React- hooks — all built on the <a href="https://nirholas.github.io/robinhood-chain-sdk/">hoodchain</a>- core SDK.- </p>- <div class="cta">- <span class="install"><span class="dollar">$</span> npm install hoodkit hoodchain viem</span>- <a class="btn primary" href="#quickstart">Get started</a>- <a class="btn" href="./api/index.html">API reference</a>- </div>-- <div class="board-head">- <h2>Stock Tokens, live</h2>- <span class="status" id="board-status"><span class="dot"></span><span id="board-status-text">connecting to chain 4663…</span></span>- </div>- <div class="board" id="board" aria-live="polite"></div>- <div class="board-error" id="board-error">- Could not reach the public RPC (<code>rpc.mainnet.chain.robinhood.com</code>) from your- browser. It may be briefly unavailable, or an extension is blocking cross-origin- requests — check the <a href="https://robinhoodchain.blockscout.com">explorer</a> and reload.- </div>- <p class="board-note">- This board is the exact pattern <code>streamPrices()</code> wraps: poll every feed in one- multicall, emit only on a changed Chainlink round. Here it's raw JSON-RPC so the page works- with zero dependencies; the package version is a few lines with reconnect + backpressure handling.- </p>-- <div class="board-head">- <h2>Live launches — NOXA + The Odyssey</h2>- <span class="status" id="launch-status"><span class="dot"></span><span id="launch-status-text">watching factory logs…</span></span>- </div>- <div class="launch-panel" id="launch-panel">- <div class="launch-empty" id="launch-empty">watching for new launches — this polls live, leave it open</div>- </div>- <p class="board-note">- The exact pattern <code>streamLaunches()</code> wraps: poll <code>eth_getLogs</code> for both- factories, decode <code>TokenLaunched</code> / <code>TokenCreated</code>, advance a cursor only- after a chunk fully delivers — so a dropped connection re-scans the missed range instead of- silently skipping it.- </p>-</header>--<main class="wrap">--<section class="block" id="quickstart">- <h2>Quickstart</h2>- <p class="sub">Node ≥ 20. <code>hoodchain</code> and <code>viem</code> are peer dependencies. <code>better-sqlite3</code>, <code>react</code>, and <code>ws</code> are optional — only needed for the modules that use them.</p>-<pre><code>npm install hoodkit hoodchain viem</code></pre>-<pre><code>import { createHoodClient } from 'hoodchain'-import { streamSwaps, createHoodCache, plan, createIndexer } from 'hoodkit'--const hood = createHoodClient()--// Reconnecting, gap-filled swap stream-const swaps = await streamSwaps(hood, { token: '0x…WEN' })-swaps.on('data', (s) => console.log(s.buysToken0 ? 'BUY' : 'SELL', s.price))--// Request-coalescing cache — 100 concurrent reads, 1 RPC call-const cache = createHoodCache(hood)-await Promise.all(Array.from({ length: 100 }, () => cache.getQuote('AAPL')))--// Local SQLite index: holders, OHLCV candles, 24h volume-const indexer = await createIndexer({ client: hood, path: './hood.sqlite', tokens: ['0x…'] })-await indexer.sync({ fromBlock: 0n })-console.log(indexer.holderCount('0x…'), indexer.candles('0x…', '1h'))</code></pre>- <p class="sub" style="margin-top:16px">React hooks live at the <code>hoodkit/react</code> subpath:</p>-<pre><code>import { HoodProvider, useQuote, useLaunches } from 'hoodkit/react'--function Ticker() {- const { data } = useQuote('AAPL')- return <span>{data ? `$${data.priceUsd.toFixed(2)}` : '…'}</span>-}</code></pre>-</section>--<section class="block" id="modules">- <h2>Modules</h2>- <p class="sub">Import only what you use. Heavy deps (<code>better-sqlite3</code>, <code>react</code>) are optional peers — the core install stays light.</p>- <div class="grid">- <div class="card">- <h3><code>stream</code></h3>- <p>Backpressure-safe <code>Stream<T></code> (event-emitter AND async-iterator) over prices, swaps, launches, and portfolio changes. Gap-fill log cursor: a dropped connection re-scans the missed block range, never silently skips it.</p>- <a class="card-link" href="./guides.html#stream">Guide →</a>+<main>+ <!-- ============ RIG ============ -->+ <section id="rig">+ <p class="boot mono" id="boot"></p>+ <div class="eyebrow"><span class="n">00</span> / SIGNAL PATCHBAY · chain 4663</div>+ <h1 class="headline">Patch the pipeline.<br><span class="lo">Then it runs itself.</span></h1>+ <p class="sub">hoodkit is four modules you wire together: a real-time <b>stream</b>, a read-through <b>cache</b>, a local <b>indexer</b>, and your app. Drag a cable from an output jack to an input jack. Seat all three and the signal chain goes live — the same shape your code assembles in about a dozen lines.</p>++ <div class="patchwrap">+ <svg class="cables" id="cables" aria-hidden="true"></svg>+ <div class="rack" id="rack">+ <div class="mod" data-slot="stream">+ <span class="led"></span>+ <div class="mh"><span class="mn">Stream</span><span class="mt">source</span></div>+ <div class="md">Chainlink ticks · v3 swaps · launches</div>+ <button class="jack out" data-jack="s_out" data-port="out" data-slot="stream" aria-label="Stream output — start a cable"><span class="lab">out</span></button>+ </div>+ <div class="mod" data-slot="cache">+ <span class="led"></span>+ <div class="mh"><span class="mn">Cache</span><span class="mt">coalesce</span></div>+ <div class="md">N identical reads → one RPC call</div>+ <button class="jack in" data-jack="c_in" data-port="in" data-slot="cache" aria-label="Cache input"><span class="lab">in</span></button>+ <button class="jack out" data-jack="c_out" data-port="out" data-slot="cache" aria-label="Cache output"><span class="lab">out</span></button>+ </div>+ <div class="mod" data-slot="indexer">+ <span class="led"></span>+ <div class="mh"><span class="mn">Indexer</span><span class="mt">sqlite</span></div>+ <div class="md">holders · OHLCV · 24h vol · 0 RPC</div>+ <button class="jack in" data-jack="i_in" data-port="in" data-slot="indexer" aria-label="Indexer input"><span class="lab">in</span></button>+ <button class="jack out" data-jack="i_out" data-port="out" data-slot="indexer" aria-label="Indexer output"><span class="lab">out</span></button>+ </div>+ <div class="mod" data-slot="app">+ <span class="led"></span>+ <div class="mh"><span class="mn">Your app</span><span class="mt">sink</span></div>+ <div class="md">bot · dashboard · agent</div>+ <button class="jack in" data-jack="a_in" data-port="in" data-slot="app" aria-label="Your app input"><span class="lab">in</span></button>+ </div>+ <div class="mod" data-slot="react">+ <span class="led"></span>+ <div class="mh"><span class="mn">React</span><span class="mt">aux · hooks</span></div>+ <div class="md">useQuote · usePortfolio · SSR-safe</div>+ <button class="jack in top" data-jack="r_in" data-port="in" data-slot="react" aria-label="React hooks input"><span class="lab">in</span></button>+ </div>+ <div class="mod" data-slot="strategy">+ <span class="led"></span>+ <div class="mh"><span class="mn">Strategy</span><span class="mt">aux · agent</span></div>+ <div class="md">PnL · triggers · dry-run TWAP · caps</div>+ <button class="jack in top" data-jack="x_in" data-port="in" data-slot="strategy" aria-label="Strategy input"><span class="lab">in</span></button>+ </div>+ </div></div>- <div class="card">- <h3><code>cache</code></h3>- <p>Read-through cache with request coalescing — N concurrent identical reads become 1 upstream call — and per-datatype TTLs. Pluggable store: in-memory LRU by default, bring your own Redis adapter.</p>- <a class="card-link" href="./guides.html#cache">Guide →</a>++ <div class="patchbar">+ <button class="seatall" id="seatall">Seat all cables</button>+ <p class="hint" id="hint">Drag from an <b>out</b> jack to an <b>in</b> jack — or tap one then the other. <kbd>Tab</kbd> + <kbd>Enter</kbd> works too.</p></div>- <div class="card">- <h3><code>batch</code></h3>- <p><code>plan()</code> batches arbitrary reads into the fewest Multicall3 round-trips, chunked and failure-isolated. <code>createBatcher()</code> is a DataLoader-style batcher: unrelated call sites sharing one tick collapse into one multicall automatically.</p>- <a class="card-link" href="./guides.html#batch">Guide →</a>++ <div class="status" id="status">+ <div class="sk"><span class="dot"></span><span id="statuslabel">standby</span></div>+ <div class="sv" id="statusval">0 / 3 core cables patched · signal idle</div>+ <ul class="patchlog" id="patchlog"></ul></div>- <div class="card">- <h3><code>indexer</code></h3>- <p>A local SQLite indexer: incremental sync from the last synced block, <code>holders()</code>, <code>candles()</code> (real OHLCV from swap events), <code>volume24h()</code> — all answered with zero RPC once synced.</p>- <a class="card-link" href="./guides.html#indexer">Guide →</a>++ <div class="scrollcue">scroll · the modules <i></i></div>+ </section>++ <!-- ============ MODULES ============ -->+ <section id="modules">+ <div class="eyebrow"><span class="n">01</span> / SIX MODULES · one entry point</div>+ <h2>Every jack on that board<br>is a real export.</h2>+ <p class="lede" style="margin-top:22px">One <span class="mono">createHoodClient()</span> from <b>hoodchain</b> flows through all of them. Import only what you patch — hoodkit is side-effect-free and tree-shakes to nothing you don't call.</p>+ <div class="lib" id="lib"></div>+ </section>++ <!-- ============ RELIABILITY ============ -->+ <section id="reliability">+ <div class="eyebrow"><span class="n">02</span> / THE GUARANTEE · reconnect gap-fill</div>+ <div class="cols">+ <div>+ <h2>A dropped RPC never<br>drops an event.</h2>+ <p class="lede" style="margin-top:22px">Every RPC-backed stream sits behind one gap-fill engine. It keeps a persistent block cursor that only advances <b>after</b> a range is decoded and pushed. Lose the connection and the exact same range is re-read next tick — so no confirmed swap, transfer, or launch is ever silently skipped.</p>+ <div class="fuse">+ <div class="f"><div class="h">backpressure</div><div class="b">A slow <span class="mono">for await</span> consumer never grows memory unboundedly — one source, bounded buffer.</div></div>+ <div class="f"><div class="h">overflow policy</div><div class="b"><span class="mono">latest</span> for price ticks, <span class="mono">drop-oldest</span> or <span class="mono">block</span> where every value counts.</div></div>+ <div class="f"><div class="h">coalescing</div><div class="b">100 concurrent <span class="mono">getQuote</span> calls collapse into ~1 upstream round-trip.</div></div>+ <div class="f"><div class="h">zero-RPC reads</div><div class="b">Holder, candle and volume queries answer from the local SQLite index, not the chain.</div></div>+ </div>+ </div>+ <div>+ <div class="gapviz">+ <div class="gl"><span>runLogCursor · block feed</span><span id="gaptag">syncing</span></div>+ <div class="blocks" id="blocks"></div>+ <div class="gapcap mono" id="gapcap">Cursor advancing block by block, each range decoded and pushed before the head moves.</div>+ </div>+ </div></div>- <div class="card">- <h3><code>strategy</code></h3>- <p>What autonomous agents need: multiplier-aware <code>Position</code> PnL tracking, a <code>TwapExecutor</code> with per-slice slippage bounds and a hard <code>SpendCap</code>, price-cross triggers, and a real <code>eth_call</code> dry-run mode.</p>- <a class="card-link" href="./guides.html#strategy">Guide →</a>+ </section>++ <!-- ============ INSTALL ============ -->+ <section id="install">+ <div class="eyebrow"><span class="n">03</span> / INSTALL</div>+ <div class="cols">+ <div>+ <h2>Patch it in<br>real code.</h2>+ <p class="lede" style="margin-top:22px">The three core modules, wired the same way you just wired the board. <b>hoodchain</b> and <b>viem</b> are peers — hoodkit never bundles them, so your app pins the versions.</p>+ <div class="spec">+ <div class="r"><div class="t">stream</div><div class="d"><b>streamPrices / streamSwaps / streamLaunches / streamPortfolio</b> — a backpressure-safe <span class="mono">Stream<T></span> that is both an emitter and an async iterable.</div></div>+ <div class="r"><div class="t">cache</div><div class="d"><b>createHoodCache</b> — read-through with request coalescing and per-datatype TTLs. Pluggable <span class="mono">CacheStore</span> for Redis or KV.</div></div>+ <div class="r"><div class="t">batch</div><div class="d"><b>plan / createBatcher</b> — Multicall3 batching with per-read failure isolation; a DataLoader-style batcher coalesces across unrelated code paths.</div></div>+ <div class="r"><div class="t">indexer</div><div class="d"><b>createIndexer</b> — incremental SQLite sync of Transfer + Swap events; resumes from the last block, answers queries with zero RPC.</div></div>+ </div>+ </div>+ <div>+ <div class="install">+ <button class="copy" data-copy="install">COPY</button>+<span class="c"># install — hoodchain + viem are peers</span>+<span class="p" id="cmd-install">npm install hoodkit hoodchain viem</span>++<span class="c"># the patch, in code:</span>+<span class="c"># stream → cache → indexer → your app</span>+<span class="p">import { createHoodClient } from 'hoodchain'</span>+<span class="p">import { streamPrices, createHoodCache,</span>+<span class="p"> createIndexer } from 'hoodkit'</span>++<span class="p">const hood = createHoodClient()</span>+<span class="p">const cache = createHoodCache(hood)</span>+<span class="p">const idx = await createIndexer({ client: hood,</span>+<span class="p"> path: './hood.sqlite', tokens: ['0x…'] })</span>++<span class="p">for await (const t of streamPrices(hood))</span>+<span class="p"> render(t.symbol, t.priceUsd)</span>+ </div>+ </div></div>- <div class="card">- <h3><code>react</code></h3>- <p><code>hoodkit/react</code>: <code>useQuote</code>, <code>usePortfolio</code>, <code>useLaunches</code>, <code>useSwap</code> over the stream/cache layers. SSR-safe — every subscription lives inside <code>useEffect</code>.</p>- <a class="card-link" href="./guides.html#react">Guide →</a>+ </section>++ <!-- ============ GET ============ -->+ <section id="get">+ <div class="eyebrow"><span class="n">04</span> / GET IT</div>+ <div class="cols">+ <div>+ <h2>Built on hoodchain.<br>Ships with React hooks.</h2>+ <p class="lede" style="margin-top:22px">Optional peers unlock the aux modules: <span class="mono">better-sqlite3</span> for the indexer, <span class="mono">react >=18</span> for the SSR-safe hooks. Missing a peer for a feature you call throws a clear install instruction — never a silent failure.</p>+ <div class="btns">+ <a class="btn solid" href="https://www.npmjs.com/package/hoodkit">npm</a>+ <a class="btn" href="https://github.com/nirholas/hoodkit">source</a>+ <a class="btn" href="https://github.com/nirholas/robinhood-chain-sdk">hoodchain</a>+ </div>+ </div>+ <div>+ <div class="install">+ <button class="copy" data-copy="react">COPY</button>+<span class="c"># React: SSR-safe hooks over the same layers</span>+<span class="p" id="cmd-react">npm install hoodkit react</span>++<span class="p">import { HoodProvider, useQuote,</span>+<span class="p"> useLaunches } from 'hoodkit/react'</span>++<span class="c"># live Chainlink price, updates on round advance</span>+<span class="p">const { data } = useQuote('AAPL')</span>++<span class="c"># optional peer, only if you patch it in</span>+<span class="p">npm install better-sqlite3 # indexer</span>+ </div>+ </div></div>- </div>-- <div class="disclosure">- <strong>Stock Token eligibility.</strong> hoodkit inherits hoodchain's eligibility gate:- reads are unrestricted, but any swap whose output is a canonical Stock Token throws until the- operator's client sets <code>acknowledgeStockTokenEligibility: true</code>. Stock Tokens are- tokenized debt securities and may not be offered, sold, or delivered to US persons (additional- limits: Canada, UK, Switzerland).- </div>-</section>--<section class="block" id="decision">- <h2>hoodkit vs hood-js vs the core SDK</h2>- <p class="sub">An honest decision table. Most apps start with <code>hood-js</code> and never need more.</p>- <div class="table-scroll">- <table>- <thead>- <tr><th>You need</th><th>Reach for</th></tr>- </thead>- <tbody>- <tr><td>A quote, a swap, a portfolio read — one-off scripts, simple UIs</td><td><code>hoodchain</code> directly</td></tr>- <tr><td>The friendliest possible API surface, sane defaults baked in</td><td><code>hood-js</code></td></tr>- <tr><td>Real-time UI that must survive dropped connections without missing events</td><td><code>hoodkit</code> (<code>stream</code>)</td></tr>- <tr><td>A backend serving many users hitting the same hot reads</td><td><code>hoodkit</code> (<code>cache</code> + <code>batch</code>)</td></tr>- <tr><td>Holder counts, price charts, or trade history without re-scanning logs every request</td><td><code>hoodkit</code> (<code>indexer</code>)</td></tr>- <tr><td>An autonomous agent that trades, tracks PnL, and must never overspend</td><td><code>hoodkit</code> (<code>strategy</code>)</td></tr>- <tr><td>A React dashboard wired to live chain data</td><td><code>hoodkit/react</code></td></tr>- </tbody>- </table>- </div>- <p class="sub" style="margin-top:14px">- hoodkit depends on hoodchain for every primitive (addresses, ABIs, the client, the registry) —- it never re-implements chain plumbing, only the operational layer around it: what happens when- a socket drops, when 100 requests want the same data at once, or when you need six months of- trade history without paying for it in RPC calls every time.- </p>-</section>+ </section>+ <footer>+ <div class="big">hood<br>kit</div>+ <div class="meta">+ Node ≥ 20 · viem-native · streams · cache · indexer<br>+ <a href="https://github.com/nirholas/hoodkit">github.com/nirholas/hoodkit</a><br>+ <a href="https://www.npmjs.com/package/hoodkit">npmjs.com/package/hoodkit</a><br>+ built by <a href="https://x.com/nichxbt">@nichxbt</a> · powered by <a href="https://three.ws">three.ws</a>+ </div>+ </footer></main>-<footer>- <div class="wrap">- <span>Apache-2.0 © 2026 nirholas</span>- <span>Built by <a href="https://x.com/nichxbt">nirholas</a> · <a href="https://three.ws">three.ws</a></span>- </div>-</footer>-<script>-// Live Stock Token board — raw JSON-RPC eth_call to each Chainlink feed, no libraries.-// latestRoundData() selector 0xfeaf968c; answer = second 32-byte word, 8 decimals.-const RPC = 'https://rpc.mainnet.chain.robinhood.com'-const TOKENS = [- { symbol: 'AAPL', name: 'Apple', feed: '0x6B22A786bAa607d76728168703a39Ea9C99f2cD0' },- { symbol: 'TSLA', name: 'Tesla', feed: '0x4A1166a659A55625345e9515b32adECea5547C38' },- { symbol: 'NVDA', name: 'NVIDIA', feed: '0x379EC4f7C378F34a1B47E4F3cbeBCbAC3E8E9F15' },- { symbol: 'MSFT', name: 'Microsoft', feed: '0x45C3C877C15E6BA2EBB19eA114Ea508d14C1Af2E' },- { symbol: 'META', name: 'Meta Platforms', feed: '0x7C38C00C30BEe9378381E7B6135d7283356D71b1' },- { symbol: 'AMZN', name: 'Amazon', feed: '0xD5a1508ceD74c084eBf3cBe853e2C968fB2a651C' },- { symbol: 'GOOGL', name: 'Alphabet', feed: '0xF6f373a037c30F0e5010d854385cA89185AE638b' },- { symbol: 'COIN', name: 'Coinbase', feed: '0xA3a468A452940B7D6b69991207B508c609a98Ef2' },-]--const board = document.getElementById('board')-const statusEl = document.getElementById('board-status')-const statusText = document.getElementById('board-status-text')-const errorEl = document.getElementById('board-error')-const tiles = new Map()-const lastPrice = new Map()--for (const t of TOKENS) {- const tile = document.createElement('div')- tile.className = 'tile'- tile.innerHTML =- '<div class="sym">' + t.symbol + '</div>' +- '<div class="co">' + t.name + '</div>' +- '<div class="px skeleton">$0000.00</div>' +- '<div class="meta"></div>'- board.appendChild(tile)- tiles.set(t.symbol, tile)+"use strict";++/* ---------- boot line ---------- */+(function boot(){+ const el = document.getElementById('boot');+ const line = '● hoodchain client ready · public RPC · chain 4663 · patch a cable to begin';+ [...line].forEach((ch,i)=>{ const s=document.createElement('span'); s.textContent=ch; s.style.animationDelay=(i*13+120)+'ms'; el.appendChild(s); });+})();++/* ================= THE PATCHBAY ================= */+const svg = document.getElementById('cables');+const wrap = svg.parentElement;+const SVGNS = 'http://www.w3.org/2000/svg';++const EDGES = { // directed: out -> in+ s_out:{ c_in:1, r_in:1 },+ c_out:{ i_in:1, x_in:1 },+ i_out:{ a_in:1 },+};+const CORE = [['s_out','c_in'],['c_out','i_in'],['i_out','a_in']];+const LABELS = {+ 's_out|c_in':['Stream → Cache','ticks & swaps flow into the read-through cache; identical reads <b>coalesce</b>.'],+ 'c_out|i_in':['Cache → Indexer','decoded events land in local <b>SQLite</b> — holders, OHLCV, 24h volume.'],+ 'i_out|a_in':['Indexer → Your app','your bot or dashboard queries the index with <b>zero RPC</b> at read time.'],+ 's_out|r_in':['Stream → React','the same stream drives SSR-safe hooks: <b>useQuote</b>, <b>useLaunches</b>.'],+ 'c_out|x_in':['Cache → Strategy','cached reads feed <b>PnL</b>, price triggers and a dry-run <b>TWAP</b>.'],+};++const jacks = {};+document.querySelectorAll('.jack').forEach(j=>{ jacks[j.dataset.jack] = j; });+const mods = {};+document.querySelectorAll('.mod').forEach(m=>{ mods[m.dataset.slot] = m; });+const jackSlot = { s_out:'stream', c_in:'cache', c_out:'cache', i_in:'indexer', i_out:'indexer', a_in:'app', r_in:'react', x_in:'strategy' };++const connections = new Map(); // "from|to" -> conn+let armed = null, ghost = null, pointerActive = false, downPt = null, lastGhostPt = null;++function jackCenter(id){+ const r = jacks[id].getBoundingClientRect();+ const w = wrap.getBoundingClientRect();+ return { x: r.left + r.width/2 - w.left, y: r.top + r.height/2 - w.top };+}+function cablePath(a, b){+ const dx = b.x - a.x, dy = b.y - a.y, dist = Math.hypot(dx, dy);+ const horiz = Math.abs(dx) >= Math.abs(dy);+ const k = Math.max(38, Math.abs(dx)*0.42);+ const sag = Math.min(60, dist*0.20) + 10;+ const c1x = a.x + (horiz ? k : 8), c2x = b.x - (horiz ? k : 8);+ return `M ${a.x} ${a.y} C ${c1x} ${a.y+sag}, ${c2x} ${b.y+sag}, ${b.x} ${b.y}`;}+function makePath(cls){ const p=document.createElementNS(SVGNS,'path'); p.setAttribute('class',cls); svg.appendChild(p); return p; }+function key(from,to){ return from+'|'+to; }+function isValid(from,to){ return !!(EDGES[from] && EDGES[from][to]); }-async function rpc(method, params) {- const res = await fetch(RPC, {- method: 'POST',- headers: { 'content-type': 'application/json' },- body: JSON.stringify({ jsonrpc: '2.0', id: 1, method, params }),- })- if (!res.ok) throw new Error('RPC ' + res.status)- const json = await res.json()- if (json.error) throw new Error(json.error.message || 'RPC error')- return json.result+function connect(from, to){+ if(!isValid(from,to)) return false;+ const k = key(from,to);+ if(connections.has(k)) return false;+ const d = cablePath(jackCenter(from), jackCenter(to));+ const path = makePath('cable'); path.setAttribute('d', d);+ const hit = makePath('cable hit'); hit.setAttribute('d', d);+ const packets = spawnPackets(path);+ const conn = { path, hit, packets, from, to };+ connections.set(k, conn);+ hit.addEventListener('click', ()=>disconnect(k));+ requestAnimationFrame(()=>path.classList.add('on'));+ jacks[from].classList.add('wired'); jacks[to].classList.add('wired');+ mods[jackSlot[from]].classList.add('live'); mods[jackSlot[to]].classList.add('live');+ logConn(from,to); updateStatus();+ return true;+}+function disconnect(k){+ const c = connections.get(k); if(!c) return;+ c.path.remove(); c.hit.remove(); c.packets.forEach(p=>p.el.remove());+ connections.delete(k); refreshFlags(); removeLog(c.from,c.to); updateStatus();+}+function refreshFlags(){+ const uj=new Set(), um=new Set();+ connections.forEach(c=>{ uj.add(c.from); uj.add(c.to); um.add(jackSlot[c.from]); um.add(jackSlot[c.to]); });+ Object.keys(jacks).forEach(id=> jacks[id].classList.toggle('wired', uj.has(id)));+ Object.keys(mods).forEach(s=> mods[s].classList.toggle('live', um.has(s)));}-async function rpcBatch(calls) {- const body = calls.map((c, id) => ({- jsonrpc: '2.0', id,- method: 'eth_call',- params: [{ to: c.feed, data: '0xfeaf968c' }, 'latest'],- }))- const res = await fetch(RPC, {- method: 'POST',- headers: { 'content-type': 'application/json' },- body: JSON.stringify(body),- })- if (!res.ok) throw new Error('RPC ' + res.status)- return res.json()+/* packets travel via getPointAtLength (cheap, few nodes) */+function spawnPackets(path){+ const len = path.getTotalLength();+ const n = Math.max(2, Math.round(len/130));+ const arr = [];+ for(let i=0;i<n;i++){+ const el = document.createElementNS(SVGNS,'circle');+ el.setAttribute('class','pkt'); el.setAttribute('r','3.1'); svg.appendChild(el);+ arr.push({ el, path, len, t: i/n, speed: 0.11 + Math.random()*0.03 });+ }+ return arr;}+let lastTs = 0;+function tick(ts){+ const dt = Math.min(0.05, (ts - lastTs)/1000 || 0); lastTs = ts;+ connections.forEach(c=>{ c.packets.forEach(p=>{+ p.t += p.speed*dt; if(p.t>1) p.t-=1;+ const pt = p.path.getPointAtLength(p.t*p.len);+ p.el.setAttribute('cx', pt.x); p.el.setAttribute('cy', pt.y);+ }); });+ requestAnimationFrame(tick);+}+requestAnimationFrame(tick);-function decodeRound(hex) {- if (!hex || hex === '0x' || hex.length < 2 + 64 * 5) return null- const word = (i) => hex.slice(2 + 64 * i, 2 + 64 * (i + 1))- const answer = BigInt('0x' + word(1))- const updatedAt = Number(BigInt('0x' + word(3)))- return { price: Number(answer) / 1e8, updatedAt }+function reflow(){+ const w = wrap.getBoundingClientRect();+ svg.setAttribute('viewBox', `0 0 ${w.width} ${w.height}`);+ connections.forEach(c=>{+ const d = cablePath(jackCenter(c.from), jackCenter(c.to));+ c.path.setAttribute('d', d); c.hit.setAttribute('d', d);+ c.packets.forEach(p=>{ p.len = c.path.getTotalLength(); });+ });+ if(armed && ghost && lastGhostPt) drawGhost(lastGhostPt);}+new ResizeObserver(()=>reflow()).observe(wrap);+addEventListener('resize', reflow);-function fmtAge(updatedAt) {- const s = Math.max(0, Math.floor(Date.now() / 1000) - updatedAt)- if (s < 90) return s + 's ago'- if (s < 5400) return Math.round(s / 60) + 'm ago'- if (s < 172800) return Math.round(s / 3600) + 'h ago'- return Math.round(s / 86400) + 'd ago'+/* arming + ghost */+function arm(id){+ if(!EDGES[id]) return;+ disarm();+ armed = id; jacks[id].classList.add('armed');+ ghost = makePath('ghost');+ markTargets(id, true);+ hint('cable armed — drop it on a glowing <b>in</b> jack');+}+function disarm(){+ if(armed){ jacks[armed].classList.remove('armed'); markTargets(armed,false); }+ armed = null; lastGhostPt = null;+ if(ghost){ ghost.remove(); ghost = null; }}+function markTargets(from,on){+ const t = EDGES[from] || {};+ Object.keys(t).forEach(to=>{ if(!connections.has(key(from,to))) jacks[to].classList.toggle('hoverable', on); });+}+function drawGhost(pt){+ if(!ghost || !armed) return;+ lastGhostPt = pt; ghost.setAttribute('d', cablePath(jackCenter(armed), pt));+}+function localPt(e){ const w = wrap.getBoundingClientRect(); return { x:e.clientX-w.left, y:e.clientY-w.top }; }-async function refreshPrices() {- try {- const results = await rpcBatch(TOKENS)- const byId = new Map(results.map((r) => [r.id, r]))- let ok = 0- TOKENS.forEach((t, id) => {- const round = decodeRound(byId.get(id)?.result)- const tile = tiles.get(t.symbol)- const px = tile.querySelector('.px')- const meta = tile.querySelector('.meta')- if (!round || round.price <= 0) {- px.classList.remove('skeleton')- px.textContent = '—'- meta.textContent = 'no answer'- return- }- ok += 1- const prev = lastPrice.get(t.symbol)- px.classList.remove('skeleton', 'up', 'down')- if (prev !== undefined && round.price !== prev) {- px.classList.add(round.price > prev ? 'up' : 'down')- }- lastPrice.set(t.symbol, round.price)- px.textContent = '$' + round.price.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })- meta.textContent = 'updated ' + fmtAge(round.updatedAt)- })- statusEl.className = 'status live'- statusText.textContent = 'live · ' + ok + '/' + TOKENS.length + ' feeds · refreshes every 15s'- errorEl.classList.remove('visible')- } catch (e) {- statusEl.className = 'status error'- statusText.textContent = 'RPC unreachable'- errorEl.classList.add('visible')- for (const tile of tiles.values()) tile.querySelector('.px').classList.remove('skeleton')+document.querySelectorAll('.jack').forEach(j=>{+ const id = j.dataset.jack, isOut = !!EDGES[id];+ j.addEventListener('pointerdown', e=>{+ e.preventDefault();+ pointerActive = true; downPt = { x:e.clientX, y:e.clientY };+ if(isOut){ if(armed!==id) arm(id); drawGhost(localPt(e)); }+ else if(armed && isValid(armed,id)){ if(connect(armed,id)) disarm(); else nudge(jackSlot[id]); }+ });+ j.addEventListener('keydown', e=>{+ if(e.key!=='Enter' && e.key!==' ') return;+ e.preventDefault();+ if(isOut){ armed===id ? disarm() : arm(id); }+ else if(armed && isValid(armed,id)){ if(connect(armed,id)) disarm(); }+ else hint('arm an <b>out</b> jack first, then press this one');+ });+});+addEventListener('pointermove', e=>{ if(armed && ghost) drawGhost(localPt(e)); });+addEventListener('pointerup', e=>{+ if(!pointerActive) return; pointerActive = false;+ if(!armed) return;+ const moved = downPt && Math.hypot(e.clientX-downPt.x, e.clientY-downPt.y) > 8;+ const el = document.elementFromPoint(e.clientX, e.clientY);+ const jackEl = el && el.closest && el.closest('.jack');+ if(jackEl){+ const to = jackEl.dataset.jack;+ if(isValid(armed,to)){ if(connect(armed,to)) disarm(); }+ else if(to !== armed){ nudge(jackSlot[to]); if(moved) disarm(); }+ } else if(moved){ disarm(); }+});+function nudge(slot){ const m=mods[slot]; if(!m) return; m.classList.remove('nudge'); void m.offsetWidth; m.classList.add('nudge'); }++/* status + log */+const statusEl=document.getElementById('status'), statusLabel=document.getElementById('statuslabel'),+ statusVal=document.getElementById('statusval'), logEl=document.getElementById('patchlog');+const logItems = new Map();+let wasOnline = false;+function logConn(from,to){+ const [title, body] = LABELS[key(from,to)] || [from+' → '+to, ''];+ const li = document.createElement('li');+ li.innerHTML = `<b>${title}</b> — ${body}`;+ logEl.appendChild(li); requestAnimationFrame(()=>li.classList.add('in'));+ logItems.set(key(from,to), li);+}+function removeLog(from,to){ const li=logItems.get(key(from,to)); if(li){ li.remove(); logItems.delete(key(from,to)); } }+function updateStatus(){+ const coreDone = CORE.filter(([a,b])=>connections.has(key(a,b))).length;+ const total = connections.size, online = coreDone === CORE.length;+ statusEl.classList.toggle('online', online);+ statusLabel.textContent = online ? 'online' : (total ? 'patching' : 'standby');+ if(online){+ statusVal.innerHTML = `<b>PIPELINE ONLINE</b> · stream → cache → indexer → app · ${total} cable${total>1?'s':''} live`;+ if(!wasOnline){ hint('pipeline online — this is the shape your code assembles. Scroll on.'); wasOnline = true; }+ } else {+ wasOnline = false;+ statusVal.textContent = `${coreDone} / 3 core cables patched · ${total?('+'+(total-coreDone)+' aux'):'signal idle'}`;}}+function hint(html){ document.getElementById('hint').innerHTML = html; }-// Live launch feed — raw eth_getLogs poll against NOXA + Odyssey factories.-const NOXA_FACTORY = '0xD9eC2db5f3D1b236843925949fe5bd8a3836FCcB'-const ODYSSEY_FACTORIES = ['0xEb3FeeD2716cF0eEAda05B22e67424794e1f5a80', '0x6Ce85c4b7cE12903E5867652C265bCcce57f935F', '0xD7601cEe401306fdea5833c6898181D9c770F800']-const NOXA_TOPIC = '0xdb51ea9ad51ab453a65a4cb7e60c3cb378c9501bb002609f8f97778fb6c4235a'-const ODYSSEY_TOPIC = '0xa52263eeb2ea349365a35c006fc978b0b85eb109fe50959959c829b329bebf9e'--const launchPanel = document.getElementById('launch-panel')-const launchEmpty = document.getElementById('launch-empty')-const launchStatusEl = document.getElementById('launch-status')-const launchStatusText = document.getElementById('launch-status-text')-let launchCursor = null-const MAX_ROWS = 15--function addr32(topicOrData) {- return '0x' + topicOrData.slice(-40)-}+/* seat all / reset */+const seatBtn = document.getElementById('seatall');+let seating = false;+seatBtn.addEventListener('click', ()=>{+ if(seating) return;+ if(CORE.every(([a,b])=>connections.has(key(a,b)))){+ [...connections.keys()].forEach(disconnect); disarm();+ seatBtn.textContent='Seat all cables'; seatBtn.classList.remove('reset');+ hint('board cleared — patch it yourself, or seat all again'); return;+ }+ seating = true; seatBtn.disabled = true; disarm();+ const steps = [...CORE, ['s_out','r_in'], ['c_out','x_in']].filter(([a,b])=>!connections.has(key(a,b)));+ let i=0;+ (function step(){+ if(i>=steps.length){ seating=false; seatBtn.disabled=false; seatBtn.textContent='Reset board'; seatBtn.classList.add('reset'); return; }+ const [a,b]=steps[i++]; connect(a,b); setTimeout(step, 320);+ })();+});-function renderLaunch(launchpad, token, blockNumber) {- if (launchEmpty.isConnected) launchEmpty.remove()- const row = document.createElement('div')- row.className = 'launch-row'- row.innerHTML =- '<span class="pill pill-' + launchpad + '">' + launchpad + '</span>' +- '<span class="addr">' + token.slice(0, 6) + '…' + token.slice(-4) + '</span>' +- '<span class="block">block ' + blockNumber + '</span>'- launchPanel.prepend(row)- while (launchPanel.children.length > MAX_ROWS) launchPanel.lastChild.remove()-}+/* ================= signal library ================= */+const MODULES = [+ ['stream','Stream','Chainlink ticks, v3 swaps, launches and portfolio deltas as one backpressure-safe Stream<T>.','streamPrices(hood, [\'AAPL\',\'TSLA\'])'],+ ['cache','Cache','Read-through cache with request coalescing — N identical reads become one upstream call.','createHoodCache(hood).getQuote(\'AAPL\')'],+ ['batch','Batch','Multicall3 batching with per-read failure isolation; a DataLoader-style auto-batcher.','plan(hood, reads) · createBatcher(hood)'],+ ['indexer','Indexer','Incremental local SQLite: holders, OHLCV candles, rolling 24h volume — zero RPC at query time.','createIndexer({ path, tokens })'],+ ['strategy','Strategy','Weighted-avg-cost PnL, price-cross triggers, hard spend caps, a dry-run-by-default TWAP executor.','createTwapExecutor(hood, cfg)'],+ ['react','React','SSR-safe hooks: render inert on the server, hydrate on the client. Live quotes and launches.','useQuote(\'AAPL\') · useLaunches()'],+];+const wavePaths = [+ 'M0 20 L14 20 L20 6 L28 20 L44 20 L50 12 L58 20 L100 20',+ 'M0 22 C20 22 24 6 40 6 C56 6 60 20 100 20',+ 'M0 24 L30 24 L30 6 L54 6 L54 20 L100 20',+ 'M0 20 L20 20 L20 8 L40 8 L40 20 L60 20 L60 8 L80 8 L80 20 L100 20',+ 'M0 22 L18 22 L18 14 L36 14 L36 22 L54 22 L54 14 L72 14 L72 22 L100 22',+ 'M0 14 C16 14 16 6 26 6 C40 6 40 22 54 22 C68 22 68 10 80 10 L100 10',+];+const lib = document.getElementById('lib');+MODULES.forEach((m,i)=>{+ const c=document.createElement('div'); c.className='cell rise';+ c.innerHTML = `<div class="id">${String(i+1).padStart(2,'0')} · ${m[0]}</div>+ <div class="nm">${m[1]}</div>+ <div class="ds">${m[2]}</div>+ <div class="ex mono">${m[3]}</div>+ <svg class="wave" viewBox="0 0 100 28" preserveAspectRatio="none" aria-hidden="true"><path d="${wavePaths[i%wavePaths.length]}"/></svg>`;+ lib.appendChild(c);+});-async function pollLaunches() {- try {- const head = parseInt(await rpc('eth_blockNumber', []), 16)- if (launchCursor === null) {- launchCursor = head // live-only: start watching from now, no historical backfill- launchStatusEl.className = 'status live'- launchStatusText.textContent = 'live · watching from block ' + head- return+/* ================= gap-fill viz ================= */+(function gapfill(){+ const host=document.getElementById('blocks'), cap=document.getElementById('gapcap'), tag=document.getElementById('gaptag');+ const N=26, GAP_START=14, GAP_LEN=5, blks=[];+ for(let i=0;i<N;i++){ const b=document.createElement('div'); b.className='blk'; host.appendChild(b); blks.push(b); }+ let phase=0, i=0, started=false, timer=0;+ const H=()=>0.28+Math.random()*0.72;+ const set=h=>cap.innerHTML=h, reset=()=>blks.forEach(b=>{b.className='blk'; b.style.transform='scaleY(.18)';});+ function run(){+ clearTimeout(timer);+ if(phase===0){+ if(i<GAP_START){ blks[i].classList.add('filled'); blks[i].style.transform=`scaleY(${H()})`; i++; timer=setTimeout(run,88); }+ else { phase=1; tag.textContent='connection dropped'; set('RPC connection <span class="gapmark">dropped</span> mid-sync. A naive stream loses these blocks forever.'); timer=setTimeout(run,720); }+ } else if(phase===1){+ for(let g=GAP_START; g<GAP_START+GAP_LEN; g++) blks[g].className='blk gap';+ phase=2; timer=setTimeout(run,900);+ } else if(phase===2){+ tag.textContent='gap-filling'; let g=GAP_START;+ (function fill(){+ if(g<GAP_START+GAP_LEN){ blks[g].className='blk refill'; blks[g].style.transform=`scaleY(${H()})`; g++; timer=setTimeout(fill,150); }+ else { set('The cursor <span class="gapmark">re-read the exact same range</span> — every confirmed event recovered, in order.'); phase=3; timer=setTimeout(run,700); }+ })();+ } else if(phase===3){+ if(i<N){ blks[i].classList.add('filled'); blks[i].style.transform=`scaleY(${H()})`; i++; timer=setTimeout(run,88); }+ else { tag.textContent='synced'; set('Head reached. <b>No confirmed event silently skipped</b> — the guarantee behind every hoodkit stream.');+ timer=setTimeout(()=>{ phase=0;i=0; reset(); set('Cursor advancing block by block, each range decoded and pushed before the head moves.'); tag.textContent='syncing'; timer=setTimeout(run,600); }, 3400); }}- if (head <= launchCursor) return- const fromBlock = '0x' + (launchCursor + 1).toString(16)- const toBlock = '0x' + head.toString(16)- const [noxaLogs, odysseyLogs] = await Promise.all([- rpc('eth_getLogs', [{ address: NOXA_FACTORY, topics: [NOXA_TOPIC], fromBlock, toBlock }]),- rpc('eth_getLogs', [{ address: ODYSSEY_FACTORIES, topics: [ODYSSEY_TOPIC], fromBlock, toBlock }]),- ])- const events = [- ...noxaLogs.map((l) => ({ launchpad: 'noxa', token: addr32(l.topics[1]), blockNumber: parseInt(l.blockNumber, 16) })),- ...odysseyLogs.map((l) => ({ launchpad: 'odyssey', token: addr32(l.topics[1]), blockNumber: parseInt(l.blockNumber, 16) })),- ].sort((a, b) => a.blockNumber - b.blockNumber)- for (const e of events) renderLaunch(e.launchpad, e.token, e.blockNumber)- launchCursor = head- launchStatusText.textContent = 'live · block ' + head + (events.length ? ' · +' + events.length + ' new' : '')- } catch (e) {- launchStatusEl.className = 'status error'- launchStatusText.textContent = 'RPC unreachable'}-}+ new IntersectionObserver(es=>es.forEach(e=>{ if(e.isIntersecting && !started){ started=true; run(); } }),{threshold:.3}).observe(host);+})();-refreshPrices()-setInterval(refreshPrices, 15000)-pollLaunches()-setInterval(pollLaunches, 4000)-</script>+/* ---------- copy buttons ---------- */+document.querySelectorAll('.copy').forEach(btn=>{+ btn.addEventListener('click', ()=>{+ const map = { install:'npm install hoodkit hoodchain viem', react:'npm install hoodkit react' };+ navigator.clipboard.writeText(map[btn.dataset.copy]||'').then(()=>{+ const t=btn.textContent; btn.textContent='COPIED'; setTimeout(()=>btn.textContent=t,1200);+ }).catch(()=>{});+ });+});++/* ---------- reveal on scroll ---------- */+const io = new IntersectionObserver((es)=>{ es.forEach(e=>{ if(e.isIntersecting){ e.target.classList.add('in'); io.unobserve(e.target);} }); },{threshold:.12});+document.querySelectorAll('.rise').forEach((el,i)=>{ el.style.transitionDelay=(i%3*70)+'ms'; io.observe(el); });+/* ---------- signal rail ---------- */+const stations=[...document.querySelectorAll('.rail .stn')];+const railSections=stations.map(a=>document.querySelector(a.getAttribute('href')));+const carriage=document.getElementById('carriage');+function updateRail(){+ let idx=0, mid=innerHeight*0.4;+ railSections.forEach((sec,i)=>{ const r=sec.getBoundingClientRect(); if(r.top<=mid) idx=i; });+ stations.forEach((s,i)=>s.setAttribute('aria-current', i===idx));+ const active=stations[idx], railRect=document.querySelector('.rail').getBoundingClientRect(), r=active.getBoundingClientRect();+ carriage.style.height=r.height+'px'; carriage.style.transform=`translateY(${r.top-railRect.top}px)`;+}+stations.forEach(a=>a.addEventListener('click',e=>{ e.preventDefault(); document.querySelector(a.getAttribute('href')).scrollIntoView({behavior:'smooth'}); }));+addEventListener('scroll', ()=>requestAnimationFrame(updateRail), {passive:true});+addEventListener('resize', updateRail);+reflow(); updateRail();+</script></body></html>diff --git a/robinhood/learn-robinhood-chain/README.md b/robinhood/learn-robinhood-chain/README.mdindex c6a5fceb7..50cc216aa 100644--- a/robinhood/learn-robinhood-chain/README.md+++ b/robinhood/learn-robinhood-chain/README.md@@ -6,6 +6,18 @@ Twelve tutorials, zero to shipping an autonomous agent, every one of them perfor**Live site:** `https://nirholas.github.io/learn-robinhood-chain/` (after Pages setup — see below)+## Website++The landing page in [`docs/`](docs/) is a single self-contained `index.html` (inline CSS + JS, zero external requests, works from `file://`). Its signature interaction is a **branching Socratic dialogue**: you don't scroll the course, you interrogate chain 4663 — pick a question, it answers, and it hands you the next fork worth asking. The twelve verified tutorials sit underneath every thread.++Deploy the `docs/` folder anywhere static:++[](https://app.netlify.com/start/deploy?repository=https://github.com/nirholas/learn-robinhood-chain)+[](https://vercel.com/new/clone?repository-url=https://github.com/nirholas/learn-robinhood-chain)+[](https://deploy.workers.cloudflare.com/?url=https://github.com/nirholas/learn-robinhood-chain)++Config lives in [`wrangler.toml`](wrangler.toml), [`netlify.toml`](netlify.toml), and [`vercel.json`](vercel.json) — each points the platform at `docs/`.+## How to use this courseWork through the tutorials in order — each one lists the specific prior tutorial it depends on, and later lessons (a portfolio tracker, a paid API, an autonomous agent) assume the SDK fluency the earlier ones build. That said, it's structured so you can jump straight to a section if you already know the basics:diff --git a/robinhood/learn-robinhood-chain/docs/404.html b/robinhood/learn-robinhood-chain/docs/404.htmlnew file mode 100644index 000000000..ef80a5ad9--- /dev/null+++ b/robinhood/learn-robinhood-chain/docs/404.html@@ -0,0 +1,41 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />+<title>learn-robinhood-chain, question not found</title>+<meta name="description" content="That page isn't part of the conversation. Return to the dialogue and interrogate chain 4663." />+<meta name="robots" content="noindex" />+<link rel="canonical" href="https://nirholas.github.io/learn-robinhood-chain/" />+<meta name="theme-color" content="#0c0c0d" />+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' fill='%230c0c0d'/><path d='M9 8 L9 24 M9 8 Q19 8 19 13 Q19 18 9 18 M17 18 L23 24' fill='none' stroke='%23e8e6e0' stroke-width='2.2' stroke-linecap='square'/></svg>" />+<style>+ :root{--ink:#0c0c0d;--paper:#e8e6e0;--graphite:#807c73;--hair2:rgba(232,230,224,.28);+ --mono:ui-monospace,"SFMono-Regular","JetBrains Mono","Menlo","Consolas",monospace;+ --grot:"Helvetica Neue","Inter","Arial",system-ui,sans-serif;--ease:cubic-bezier(.16,1,.3,1)}+ *{margin:0;padding:0;box-sizing:border-box}+ body{background:var(--ink);color:var(--paper);font-family:var(--grot);min-height:100svh;+ display:flex;align-items:center;justify-content:center;padding:32px;-webkit-font-smoothing:antialiased}+ .wrap{max-width:56ch}+ .eyebrow{font:600 11px/1 var(--mono);letter-spacing:.32em;text-transform:uppercase;color:var(--graphite);margin-bottom:24px;display:flex;gap:12px;align-items:center}+ .eyebrow::after{content:"";flex:1;height:1px;background:rgba(232,230,224,.14)}+ h1{font-weight:700;letter-spacing:-.03em;line-height:.98;font-size:clamp(38px,8vw,84px)}+ h1 .lo{color:var(--graphite)}+ p{margin-top:22px;font-size:clamp(16px,1.6vw,20px);color:#c9c6be;line-height:1.5;max-width:48ch}+ .who{font:600 10px/1 var(--mono);letter-spacing:.26em;text-transform:uppercase;color:var(--graphite);margin:26px 0 8px}+ a.btn{display:inline-block;margin-top:28px;text-decoration:none;border:1px solid var(--paper);color:var(--paper);+ font:600 12px/1 var(--mono);letter-spacing:.12em;text-transform:uppercase;padding:15px 22px;transition:background .25s,color .25s,transform .25s var(--ease)}+ a.btn:hover{background:var(--paper);color:var(--ink);transform:translateY(-2px)}+</style>+</head>+<body>+ <div class="wrap">+ <div class="eyebrow">404 / off the thread</div>+ <div class="who">You</div>+ <h1>Where did<br>this page go? <span class="lo">404.</span></h1>+ <div class="who">Chain 4663</div>+ <p>That question isn't part of the conversation. Nothing here is lost, though, the whole course, and the dialogue that walks you into it, is one link away.</p>+ <a class="btn" href="/learn-robinhood-chain/">← back to the conversation</a>+ </div>+</body>+</html>diff --git a/robinhood/learn-robinhood-chain/docs/_headers b/robinhood/learn-robinhood-chain/docs/_headersnew file mode 100644index 000000000..8ccd12762--- /dev/null+++ b/robinhood/learn-robinhood-chain/docs/_headers@@ -0,0 +1,7 @@+/*+ X-Content-Type-Options: nosniff+ Referrer-Policy: strict-origin-when-cross-origin+ Permissions-Policy: geolocation=(), microphone=(), camera=()+ X-Frame-Options: SAMEORIGIN+/*.html+ Cache-Control: public, max-age=0, must-revalidatediff --git a/robinhood/learn-robinhood-chain/docs/index.html b/robinhood/learn-robinhood-chain/docs/index.htmlindex 9455e6570..0bbe30422 100644--- a/robinhood/learn-robinhood-chain/docs/index.html+++ b/robinhood/learn-robinhood-chain/docs/index.html@@ -1,202 +1,651 @@<!doctype html>-<html lang="en" data-theme="dark">+<html lang="en"><head>-<meta charset="utf-8">-<meta name="viewport" content="width=device-width, initial-scale=1">-<title>Learn Robinhood Chain — From zero to shipping an autonomous agent on Robinhood Chain.</title>-<meta name="description" content="From zero to shipping an autonomous agent on Robinhood Chain. Twelve on-chain-verified tutorials for building on Robinhood Chain (chain ID 4663).">-<meta property="og:title" content="Learn Robinhood Chain — From zero to shipping an autonomous agent on Robinhood Chain.">-<meta property="og:description" content="From zero to shipping an autonomous agent on Robinhood Chain. Twelve on-chain-verified tutorials for building on Robinhood Chain (chain ID 4663).">-<meta property="og:type" content="article">-<meta name="theme-color" content="#0b0d10">-<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='7' fill='%2300c805'/%3E%3Cpath d='M9 22V10h4.4c2.6 0 4.2 1.4 4.2 3.7 0 1.7-.9 2.9-2.4 3.4l2.9 4.9h-2.8l-2.5-4.4h-1.4V22H9zm2.4-6.3h1.8c1.2 0 1.9-.6 1.9-1.7s-.7-1.7-1.9-1.7h-1.8v3.4z' fill='%23000'/%3E%3C/svg%3E">-<link rel="stylesheet" href="assets/styles.css">+<meta charset="utf-8" />+<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />+<title>learn-robinhood-chain, interrogate chain 4663 until you understand it</title>+<meta name="description" content="A learning site for Robinhood Chain (chain ID 4663) built as a Socratic dialogue: you don't scroll a tutorial, you ask the chain questions and it answers. Twelve verified tutorials underneath, from your first RPC read to an autonomous agent." />+<link rel="canonical" href="https://nirholas.github.io/learn-robinhood-chain/" />+<meta name="theme-color" content="#0c0c0d" />+<meta property="og:type" content="website" />+<meta property="og:title" content="learn-robinhood-chain, the chain doesn't lecture, interrogate it" />+<meta property="og:description" content="Learn Robinhood Chain by asking it questions. A branching Socratic dialogue over chain 4663, Stock Tokens, the uiMultiplier trap, USDG, the sequencer firehose, backing twelve on-chain-verified tutorials." />+<meta property="og:url" content="https://nirholas.github.io/learn-robinhood-chain/" />+<meta name="twitter:card" content="summary_large_image" />+<meta name="twitter:title" content="learn-robinhood-chain, interrogate chain 4663" />+<meta name="twitter:description" content="You don't read this course. You ask the chain questions and it answers. Twelve verified tutorials on Robinhood Chain, from first read to autonomous agent." />+<meta name="twitter:creator" content="@nichxbt" />+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect width='32' height='32' fill='%230c0c0d'/><path d='M9 8 L9 24 M9 8 Q19 8 19 13 Q19 18 9 18 M17 18 L23 24' fill='none' stroke='%23e8e6e0' stroke-width='2.2' stroke-linecap='square'/></svg>" />+<script type="application/ld+json">+{"@context":"https://schema.org","@type":"Course","name":"learn-robinhood-chain","description":"A Socratic-dialogue learning site for Robinhood Chain (chain ID 4663): twelve tutorials from a first RPC read to an autonomous trading agent, every one verified against live on-chain data.","provider":{"@type":"Person","name":"nirholas","url":"https://x.com/nichxbt"},"url":"https://nirholas.github.io/learn-robinhood-chain/","inLanguage":"en","isAccessibleForFree":true,"about":["Robinhood Chain","Stock Tokens","ERC-8056","uiMultiplier","USDG","hoodchain SDK"],"hasCourseInstance":{"@type":"CourseInstance","courseMode":"online","courseWorkload":"PT3H"}}+</script>+<style>+ :root{+ --ink:#0c0c0d; --paper:#e8e6e0; --graphite:#807c73; --dim:#57544d;+ --hair:rgba(232,230,224,.14); --hair2:rgba(232,230,224,.28);+ --mono:ui-monospace,"SFMono-Regular","JetBrains Mono","Menlo","Consolas",monospace;+ --grot:"Helvetica Neue","Inter","Arial",system-ui,sans-serif;+ --ease:cubic-bezier(.16,1,.3,1);+ --unit:clamp(14px,1.12vw,18px);+ }+ *{margin:0;padding:0;box-sizing:border-box}+ html{-webkit-text-size-adjust:100%}+ body{+ background:var(--ink); color:var(--paper); font-family:var(--grot);+ font-size:var(--unit); line-height:1.5; overflow-x:hidden;+ -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;+ }+ ::selection{background:var(--paper); color:var(--ink)}+ a{color:inherit}+ .mono{font-family:var(--mono)}+ em{font-style:normal; color:var(--paper)}+ b{font-weight:700}+ body::before{+ content:""; position:fixed; inset:0; z-index:0; pointer-events:none;+ background:+ radial-gradient(120% 80% at 50% -10%, rgba(232,230,224,.05), transparent 60%),+ radial-gradient(100% 60% at 50% 120%, rgba(0,0,0,.5), transparent 60%);+ }+ .tick{position:fixed; inset:0; z-index:0; pointer-events:none; opacity:.5;+ background-image:linear-gradient(var(--hair) 1px, transparent 1px);+ background-size:100% 5px; -webkit-mask-image:linear-gradient(transparent, #000 30%, #000 70%, transparent);+ mask-image:linear-gradient(transparent, #000 30%, #000 70%, transparent);}+ @media(prefers-reduced-motion:reduce){*{animation-duration:.001s!important; transition-duration:.001s!important}}++ main{position:relative; z-index:1; max-width:1200px; margin:0 auto; padding:0 clamp(18px,4vw,60px)}++ .topbar{display:flex; justify-content:space-between; align-items:baseline; gap:16px;+ padding:22px 0 0; font:600 11px/1 var(--mono); letter-spacing:.28em; text-transform:uppercase; color:var(--graphite)}+ .topbar .id{color:var(--paper)}+ .topbar a{text-decoration:none; opacity:.7; transition:opacity .3s}+ .topbar a:hover{opacity:1}++ section{padding:clamp(46px,7vh,96px) 0; border-bottom:1px solid var(--hair)}+ .eyebrow{font:600 11px/1 var(--mono); letter-spacing:.32em; text-transform:uppercase;+ color:var(--graphite); display:flex; align-items:center; gap:12px; margin-bottom:26px}+ .eyebrow::after{content:"";flex:1;height:1px;background:var(--hair)}+ .eyebrow .n{color:var(--paper)}++ h1,h2{font-family:var(--grot); font-weight:700; letter-spacing:-.03em; line-height:.98}+ h1{font-size:clamp(38px,7.4vw,104px)}+ h1 .lo{color:var(--graphite)}+ h2{font-size:clamp(28px,4.6vw,58px)}+ .lede{max-width:60ch; font-size:clamp(16px,1.6vw,22px); line-height:1.45; color:#c9c6be}++ /* ======================= THE DIALOGUE (signature) ======================= */+ #ask{min-height:100svh; display:flex; flex-direction:column; justify-content:center; padding-top:clamp(30px,6vh,64px)}+ .subhead{margin-top:24px; max-width:54ch; font-size:clamp(16px,1.55vw,21px); color:#c9c6be}++ .interrog{margin-top:clamp(30px,5vh,52px); display:grid; grid-template-columns:1fr 210px; gap:clamp(22px,3vw,48px); align-items:start}+ @media(max-width:820px){.interrog{grid-template-columns:1fr; gap:26px}}++ .transcript{border-left:1px solid var(--hair2); padding-left:clamp(18px,2.4vw,30px); min-height:150px; position:relative}+ .primer{position:relative; padding-top:2px}+ .primer::before{content:""; position:absolute; left:calc(-1 * clamp(18px,2.4vw,30px) - 4px); top:7px;+ width:7px; height:7px; border-radius:50%; background:var(--paper); border:1px solid var(--paper)}+ .primer .who{font:600 10px/1 var(--mono); letter-spacing:.26em; text-transform:uppercase; color:var(--graphite); margin-bottom:9px}+ .primer .a{font-size:clamp(15.5px,1.55vw,19px); line-height:1.55; color:#c9c6be; max-width:60ch}+ .primer .a b{color:var(--paper); font-weight:600}+ .primer .a .cur{display:inline-block; width:.5ch; height:1.05em; background:var(--paper); vertical-align:-2px; margin-left:2px; animation:blink 1s steps(1) infinite}+ .exch{position:relative; margin-bottom:26px; opacity:0; transform:translateY(10px); animation:rise .5s var(--ease) forwards}+ @keyframes rise{to{opacity:1; transform:none}}+ .exch::before{content:""; position:absolute; left:calc(-1 * clamp(18px,2.4vw,30px) - 4px); top:7px;+ width:7px; height:7px; border-radius:50%; background:var(--ink); border:1px solid var(--hair2)}+ .exch.chain::before{background:var(--paper); border-color:var(--paper)}+ .who{font:600 10px/1 var(--mono); letter-spacing:.26em; text-transform:uppercase; color:var(--graphite); margin-bottom:9px}+ .exch.you .who{color:var(--dim)}+ .q{font-size:clamp(16px,1.7vw,21px); font-weight:600; letter-spacing:-.01em; color:#a6a29a}+ .a{font-size:clamp(15.5px,1.55vw,19px); line-height:1.55; color:var(--paper); max-width:62ch; min-height:1.5em}+ .a .hl{font-family:var(--mono); font-size:.88em; color:var(--paper); border-bottom:1px solid var(--hair2); padding-bottom:1px; white-space:nowrap}+ .a .cur{display:inline-block; width:.5ch; height:1.05em; background:var(--paper); vertical-align:-2px; margin-left:1px; animation:blink 1s steps(1) infinite}+ @keyframes blink{50%{opacity:0}}+ .goto{display:inline-flex; align-items:center; gap:9px; margin-top:14px; text-decoration:none;+ font:600 12px/1 var(--mono); letter-spacing:.1em; text-transform:uppercase; color:var(--ink);+ background:var(--paper); padding:12px 18px; transition:transform .3s var(--ease),opacity .3s}+ .goto:hover{transform:translateX(3px)}+ .goto span{font-size:15px}++ .forks{margin-top:8px}+ .forkhint{font:600 10px/1 var(--mono); letter-spacing:.24em; text-transform:uppercase; color:var(--graphite); margin-bottom:14px;+ display:flex; align-items:center; gap:10px}+ .forkhint::after{content:"";flex:1;height:1px;background:var(--hair)}+ .opt{display:block; width:100%; text-align:left; appearance:none; background:transparent; cursor:pointer;+ border:1px solid var(--hair2); color:var(--paper); font-family:var(--grot);+ font-size:clamp(15px,1.5vw,18px); font-weight:500; letter-spacing:-.01em; line-height:1.32;+ padding:15px 16px 15px 46px; position:relative; margin-bottom:10px;+ transition:border-color .25s,background .25s,transform .25s var(--ease); opacity:0; transform:translateY(8px)}+ .opt.show{opacity:1; transform:none}+ .opt .num{position:absolute; left:15px; top:14px; font:600 12px/1 var(--mono); color:var(--graphite); transition:color .25s}+ .opt:hover{border-color:var(--paper); background:rgba(232,230,224,.05); transform:translateX(3px)}+ .opt:hover .num{color:var(--paper)}+ .opt:focus-visible{outline:2px solid var(--paper); outline-offset:2px}+ .opt.spent{opacity:.4; cursor:default}+ .opt.spent:hover{transform:none; border-color:var(--hair); background:transparent}++ .restart{appearance:none; background:transparent; border:1px solid var(--hair2); color:var(--graphite);+ font:600 11px/1 var(--mono); letter-spacing:.16em; text-transform:uppercase; padding:11px 16px; cursor:pointer;+ margin-top:8px; transition:color .25s,border-color .25s}+ .restart:hover{color:var(--paper); border-color:var(--paper)}++ .map{position:sticky; top:26px}+ .map .cap{font:600 10px/1 var(--mono); letter-spacing:.24em; text-transform:uppercase; color:var(--graphite); margin-bottom:16px}+ .map svg{width:100%; height:auto; display:block; overflow:visible}+ .map .stat{margin-top:18px; font:500 12px/1.9 var(--mono); color:var(--graphite)}+ .map .stat b{color:var(--paper); font-weight:600}+ @media(max-width:820px){.map{position:static; order:-1; display:flex; gap:26px; align-items:center; justify-content:space-between}+ .map svg{max-width:150px} .map .cap{margin-bottom:0}}+ @media(max-width:480px){.map svg{display:none}}++ .scrollcue{margin-top:clamp(24px,4vh,44px); font:600 10px/1 var(--mono);+ letter-spacing:.28em; text-transform:uppercase; color:var(--graphite); display:flex; align-items:center; gap:10px}+ .scrollcue i{display:block; width:26px; height:1px; background:var(--graphite); position:relative; overflow:hidden}+ .scrollcue i::after{content:"";position:absolute;inset:0;background:var(--paper);animation:sweep 2.4s var(--ease) infinite}+ @keyframes sweep{0%{transform:translateX(-100%)}60%,100%{transform:translateX(100%)}}++ /* ======================= CURRICULUM ======================= */+ .cols{display:grid; grid-template-columns:1fr 1fr; gap:clamp(28px,5vw,72px); align-items:start}+ @media(max-width:860px){.cols{grid-template-columns:1fr; gap:30px}}++ .toc{border-top:1px solid var(--hair)}+ .toc a{display:grid; grid-template-columns:34px 1fr auto; gap:16px; align-items:baseline;+ padding:17px 4px; border-bottom:1px solid var(--hair); text-decoration:none;+ transition:background .25s,padding-left .25s var(--ease)}+ .toc a:hover{background:rgba(232,230,224,.04); padding-left:12px}+ .toc a .no{font:600 12px/1 var(--mono); color:var(--graphite)}+ .toc a .tl{font-size:clamp(16px,1.7vw,20px); font-weight:600; letter-spacing:-.01em}+ .toc a .tl small{display:block; font:500 13px/1.4 var(--grot); color:#9d998f; letter-spacing:0; margin-top:4px; max-width:52ch}+ .toc a .mt{font:600 10px/1 var(--mono); letter-spacing:.14em; text-transform:uppercase; color:var(--graphite); white-space:nowrap; text-align:right}+ .toc a:hover .mt{color:var(--paper)}+ .sec-label{font:600 11px/1 var(--mono); letter-spacing:.2em; text-transform:uppercase; color:var(--graphite);+ padding:22px 0 8px; display:block}++ .facts{display:grid; grid-template-columns:1fr 1fr; border-left:1px solid var(--hair); border-top:1px solid var(--hair)}+ @media(max-width:480px){.facts{grid-template-columns:1fr}}+ .fact{border-right:1px solid var(--hair); border-bottom:1px solid var(--hair); padding:20px 18px 24px}+ .fact .v{font:700 clamp(24px,3.2vw,38px)/1 var(--grot); letter-spacing:-.03em}+ .fact .k{font:500 13px/1.4 var(--grot); color:#9d998f; margin-top:8px}++ .stand{border:1px solid var(--hair2); padding:clamp(22px,3vw,36px)}+ .stand h3{font:700 clamp(19px,2vw,26px)/1.1 var(--grot); letter-spacing:-.02em; margin-bottom:16px}+ .stand ul{list-style:none}+ .stand li{position:relative; padding:11px 0 11px 26px; border-bottom:1px solid var(--hair); font-size:15.5px; color:#c9c6be; line-height:1.5}+ .stand li:last-child{border-bottom:0}+ .stand li::before{content:"\2192"; position:absolute; left:0; top:11px; color:var(--graphite); font-family:var(--mono)}++ .btns{display:flex; flex-wrap:wrap; gap:12px; margin-top:26px}+ .btn{appearance:none; text-decoration:none; border:1px solid var(--paper); color:var(--paper); background:transparent;+ font:600 12px/1 var(--mono); letter-spacing:.12em; text-transform:uppercase; padding:15px 22px; cursor:pointer;+ transition:background .25s,color .25s,transform .25s var(--ease)}+ .btn:hover{background:var(--paper); color:var(--ink); transform:translateY(-2px)}+ .btn.solid{background:var(--paper); color:var(--ink)}+ .btn.solid:hover{background:transparent; color:var(--paper)}++ .install{border:1px solid var(--hair2); background:rgba(232,230,224,.03); padding:20px 22px;+ font:500 13.5px/1.9 var(--mono); position:relative; overflow-x:auto; margin-top:8px}+ .install .c{color:var(--graphite)}+ .install .p::before{content:"$ "; color:var(--graphite)}+ .copy{position:absolute; top:12px; right:12px; appearance:none; border:1px solid var(--hair2);+ background:transparent; color:var(--paper); font:600 10px/1 var(--mono); letter-spacing:.14em; padding:7px 11px; cursor:pointer; transition:background .2s}+ .copy:hover{background:rgba(232,230,224,.1)}++ footer{padding:clamp(38px,6vh,68px) 0; display:flex; flex-wrap:wrap; justify-content:space-between; gap:22px; align-items:flex-end}+ footer .big{font:700 clamp(30px,6vw,68px)/.9 var(--grot); letter-spacing:-.03em}+ footer .meta{font:500 12px/1.7 var(--mono); color:var(--graphite); text-align:right}+ footer a{text-decoration:none; border-bottom:1px solid var(--hair2); transition:border-color .2s}+ footer a:hover{border-color:var(--paper)}++ .rise2{opacity:0; transform:translateY(20px); transition:opacity .7s var(--ease),transform .7s var(--ease)}+ .rise2.in{opacity:1; transform:none}+</style></head>-<body class="page-home">-<a class="skip-link" href="#main">Skip to content</a>-<script>(function(){try{var t=localStorage.getItem('theme');if(t)document.documentElement.setAttribute('data-theme',t);}catch(e){}})();</script>-<header class="topbar">- <div class="topbar-inner">- <a class="brand" href="./">- <span class="brand-mark" aria-hidden="true">R</span>- <span class="brand-text">Learn <strong>Robinhood Chain</strong></span>- </a>- <div class="topbar-actions">- <button class="search-open" type="button" aria-label="Search tutorials" aria-keyshortcuts="/">- <span class="search-open-label">Search</span><kbd>/</kbd>- </button>- <a class="ghost-link" href="https://github.com/nirholas/learn-robinhood-chain" target="_blank" rel="noopener noreferrer">GitHub</a>- <button class="theme-toggle" type="button" aria-label="Toggle color theme" title="Toggle theme"></button>- <button class="menu-toggle" type="button" aria-label="Toggle navigation" aria-expanded="false"></button>- </div>+<body>+<div class="tick" aria-hidden="true"></div>++<main>+ <div class="topbar">+ <span class="id">learn·robinhood-chain</span>+ <span><a href="#curriculum">Curriculum</a> · <a href="#standard">Standard</a> · <a href="#start">Start</a></span></div>-</header>-<div class="layout">- <aside class="sidebar" id="sidebar" aria-label="Tutorials">- <nav class="sidebar-nav"><div class="nav-section"><p class="nav-section-title">Foundations</p><ul><li><a href="01-what-is-robinhood-chain/"><span class="nav-idx">01</span>What it actually is</a></li><li><a href="02-connect-and-read/"><span class="nav-idx">02</span>Connect & read</a></li><li><a href="03-stock-tokens-explained/"><span class="nav-idx">03</span>Stock Tokens</a></li></ul></div><div class="nav-section"><p class="nav-section-title">Building</p><ul><li><a href="04-live-price-ticker/"><span class="nav-idx">04</span>Live price ticker</a></li><li><a href="05-portfolio-tracker/"><span class="nav-idx">05</span>Portfolio tracker</a></li><li><a href="06-swapping-on-chain/"><span class="nav-idx">06</span>Swapping on-chain</a></li><li><a href="07-streaming-the-chain/"><span class="nav-idx">07</span>Streaming the chain</a></li></ul></div><div class="nav-section"><p class="nav-section-title">Monetizing & agents</p><ul><li><a href="08-sell-your-api-for-usdg/"><span class="nav-idx">08</span>Sell your API</a></li><li><a href="09-ai-agent-chain-access/"><span class="nav-idx">09</span>AI agent access (MCP)</a></li><li><a href="10-autonomous-trading-agent/"><span class="nav-idx">10</span>Autonomous agent</a></li><li><a href="11-launch-a-coin/"><span class="nav-idx">11</span>Launch a coin</a></li></ul></div><div class="nav-section"><p class="nav-section-title">Capstone</p><ul><li><a href="12-ship-it/"><span class="nav-idx">12</span>Ship it</a></li></ul></div></nav>- </aside>- <div class="sidebar-scrim" hidden></div>- <main class="landing" id="main">- <section class="hero">- <div class="hero-inner">- <p class="eyebrow">Chain ID 4663 · Arbitrum Orbit L2 · ETH gas · ~100ms blocks</p>- <h1>Build on <span class="grad">Robinhood Chain</span>.</h1>- <p class="lede">From zero to shipping an autonomous agent on Robinhood Chain. Twelve tutorials, each performed on-chain, from your first RPC read to a live autonomous agent — built on the open-source <a href="https://github.com/nirholas/robinhood-chain-sdk">hoodchain</a> SDK.</p>- <div class="hero-cta">- <a class="btn btn-primary" href="01-what-is-robinhood-chain/">Start learning</a>- <a class="btn btn-ghost" href="04-live-price-ticker/">Jump to code</a>- </div>- <div class="chain-strip" id="chain-strip" aria-label="Live chain stats">- <div class="stat"><span class="stat-label">Block height</span><span class="stat-value" id="stat-block">…</span></div>- <div class="stat"><span class="stat-label">Gas price</span><span class="stat-value" id="stat-gas">…</span></div>- <div class="stat"><span class="stat-label">AAPL token</span><span class="stat-value" id="stat-aapl">…</span></div>- <div class="stat"><span class="stat-label">USDG supply</span><span class="stat-value" id="stat-usdg">…</span></div>++ <!-- ================= THE DIALOGUE ================= -->+ <section id="ask">+ <div class="eyebrow"><span class="n">00</span> / SOCRATIC · a conversation with chain 4663</div>+ <h1>The chain doesn't<br>lecture. <span class="lo">Ask it.</span></h1>+ <p class="subhead">Most courses talk at you. This one answers. Pick a question and Robinhood Chain replies, then hands you the next thing worth asking. Learn it the way you learn anything real: by interrogation. Twelve verified tutorials sit underneath every thread.</p>++ <div class="interrog">+ <div>+ <div class="transcript" id="transcript" aria-live="polite">+ <div class="primer" id="primer">+ <div class="who">Chain 4663</div>+ <div class="a">I'm chain <b>4663</b>, an Arbitrum Orbit L2 carrying tokenized US equities. Ask me anything below and I'll answer, then hand you the next question worth asking. <b>Pick one to begin.</b><span class="cur"></span></div>+ </div>+ </div>+ <div class="forks">+ <div class="forkhint" id="forkhint">Ask the chain</div>+ <div id="opts"></div>+ <button class="restart" id="restart" hidden>↻ start the conversation over</button>+ </div></div>- <p class="chain-strip-note" id="chain-strip-note">Live from the public RPC in your browser.</p>++ <aside class="map">+ <div>+ <div class="cap">Thread</div>+ <svg id="treemap" viewBox="0 0 120 60" preserveAspectRatio="xMidYMin meet" aria-hidden="true"></svg>+ </div>+ <div class="stat">+ <div>depth <b id="st-depth">0</b></div>+ <div>asked <b id="st-asked">0</b> / 24</div>+ <div>topic <b id="st-topic">open</b></div>+ </div>+ </aside></div>++ <div class="scrollcue"><i></i> or read the twelve tutorials below</div></section>- <div class="curriculum">- <div class="curriculum-head">- <h2 class="section-h">The curriculum</h2>- <button class="reset-progress" type="button" id="reset-progress" hidden>Reset progress</button>++ <!-- ================= CURRICULUM ================= -->+ <section id="curriculum">+ <div class="eyebrow"><span class="n">01</span> / THE CURRICULUM · zero to autonomous agent</div>+ <div class="cols">+ <div>+ <h2 class="rise2">Twelve tutorials.<br>Every one performed<br>on-chain first.</h2>+ <p class="lede rise2" style="margin-top:22px">Foundations build the mental model, Building ships real apps, then Monetizing & agents turns the chain into revenue. Each lesson names the one before it that it depends on, but you can jump straight to a section if you already know the basics.</p>+ <div class="facts rise2" style="margin-top:34px">+ <div class="fact"><div class="v">4663</div><div class="k">mainnet chain ID (testnet 46630), an Arbitrum Orbit L2</div></div>+ <div class="fact"><div class="v">95</div><div class="k">tokenized Stock Tokens, each priced by a Chainlink feed</div></div>+ <div class="fact"><div class="v">~150ms</div><div class="k">the firehose edge, decoded before RPC sees the block</div></div>+ <div class="fact"><div class="v">0</div><div class="k">CDN calls at runtime, the whole site works from file://</div></div>+ </div>+ </div>+ <div>+ <nav class="toc" aria-label="Tutorials">+ <span class="sec-label">Foundations</span>+ <a href="01-what-is-robinhood-chain/"><span class="no">01</span><span class="tl">What Robinhood Chain actually is<small>The mental model from zero, an Orbit L2 with a stock exchange in its token registry.</small></span><span class="mt">10 min</span></a>+ <a href="02-connect-and-read/"><span class="no">02</span><span class="tl">Connect and read the chain in 5 minutes<small>One RPC endpoint, one read, prices on your screen.</small></span><span class="mt">5 min</span></a>+ <a href="03-stock-tokens-explained/"><span class="no">03</span><span class="tl">Stock Tokens explained for developers<small>The uiMultiplier trap every other tutorial assumes you understand.</small></span><span class="mt">12 min</span></a>+ <span class="sec-label">Building</span>+ <a href="04-live-price-ticker/"><span class="no">04</span><span class="tl">Your first app: a live price ticker<small>Raw client-side JSON-RPC, no SDK, no build step.</small></span><span class="mt">15 min</span></a>+ <a href="05-portfolio-tracker/"><span class="no">05</span><span class="tl">Portfolio tracker done right<small>Multiplier-correct valuation across all 95 tokens in one multicall.</small></span><span class="mt">15 min</span></a>+ <a href="06-swapping-on-chain/"><span class="no">06</span><span class="tl">Swapping on-chain: quotes, slippage, execution<small>Uniswap v3 the honest way, a quote that never fabricates a fill.</small></span><span class="mt">20 min</span></a>+ <a href="07-streaming-the-chain/"><span class="no">07</span><span class="tl">Streaming the chain: launchpads + firehose<small>Decode the raw sequencer feed before RPC sees a block.</small></span><span class="mt">18 min</span></a>+ <span class="sec-label">Monetizing & agents</span>+ <a href="08-sell-your-api-for-usdg/"><span class="no">08</span><span class="tl">Sell your API for USDG with x402<small>HTTP 402, a USDG price, verified payment, and a real bug, documented.</small></span><span class="mt">25 min</span></a>+ <a href="09-ai-agent-chain-access/"><span class="no">09</span><span class="tl">Give your AI agent chain access with MCP<small>Hand an LLM typed chain tools it can't misuse.</small></span><span class="mt">22 min</span></a>+ <a href="10-autonomous-trading-agent/"><span class="no">10</span><span class="tl">Build an autonomous trading agent<small>A strategy loop on real prices with guardrails that throw, not ask.</small></span><span class="mt">30 min</span></a>+ <a href="11-launch-a-coin/"><span class="no">11</span><span class="tl">Launch a coin programmatically<small>NOXA and The Odyssey launchpads from a script.</small></span><span class="mt">20 min</span></a>+ <span class="sec-label">Capstone</span>+ <a href="12-ship-it/"><span class="no">12</span><span class="tl">Ship it: deploy and go mainnet<small>From testnet reads to a mainnet deployment you'd stake on.</small></span><span class="mt">18 min</span></a>+ </nav>+ </div></div>- <p class="progress-line"><span id="progress-count">0</span> of 12 completed · progress is saved in your browser</p>-- <section class="curriculum-group">- <h2 class="curriculum-group-title">Foundations</h2>- <div class="card-grid">- <a class="tut-card" href="01-what-is-robinhood-chain/" data-slug="01-what-is-robinhood-chain">- <span class="tut-card-idx">01</span>- <span class="tut-card-check" aria-hidden="true"></span>- <span class="tut-card-body">- <span class="tut-card-title">What Robinhood Chain actually is</span>- <span class="tut-card-desc">Architecture, chain IDs, and what's real vs hype — the no-token fact, the US-person restriction, and permissionless deployment, all sourced.</span>- <span class="tut-card-time">10 min</span>- </span>- </a><a class="tut-card" href="02-connect-and-read/" data-slug="02-connect-and-read">- <span class="tut-card-idx">02</span>- <span class="tut-card-check" aria-hidden="true"></span>- <span class="tut-card-body">- <span class="tut-card-title">Connect and read the chain in 5 minutes</span>- <span class="tut-card-desc">Add the network to a wallet, get testnet funds, and make your first read against mainnet with viem — a real block number and gas price in your terminal.</span>- <span class="tut-card-time">5 min</span>- </span>- </a><a class="tut-card" href="03-stock-tokens-explained/" data-slug="03-stock-tokens-explained">- <span class="tut-card-idx">03</span>- <span class="tut-card-check" aria-hidden="true"></span>- <span class="tut-card-body">- <span class="tut-card-title">Stock Tokens explained for developers</span>- <span class="tut-card-desc">ERC-20 + a Chainlink feed + ERC-8056 uiMultiplier(). The split/dividend trap, with a worked example showing the wrong and the right valuation.</span>- <span class="tut-card-time">12 min</span>- </span>- </a>+ </section>++ <!-- ================= STANDARD ================= -->+ <section id="standard">+ <div class="eyebrow"><span class="n">02</span> / THE HONESTY STANDARD</div>+ <div class="cols">+ <div>+ <h2 class="rise2">Nothing here<br>is secondhand.</h2>+ <p class="lede rise2" style="margin-top:22px">Every tutorial was performed against the real chain before it was written, mainnet reads, testnet writes where a funded wallet existed. The prices are real prices. The transaction hashes are real hashes. A tutorial that wasn't run doesn't ship.</p>+ <div class="btns rise2">+ <a class="btn solid" href="https://github.com/nirholas/robinhood-chain-sdk">the hoodchain SDK</a>+ <a class="btn" href="https://docs.robinhood.com/chain/">chain docs</a>+ </div></div>- </section>- <section class="curriculum-group">- <h2 class="curriculum-group-title">Building</h2>- <div class="card-grid">- <a class="tut-card" href="04-live-price-ticker/" data-slug="04-live-price-ticker">- <span class="tut-card-idx">04</span>- <span class="tut-card-check" aria-hidden="true"></span>- <span class="tut-card-body">- <span class="tut-card-title">Your first app: a live price ticker</span>- <span class="tut-card-desc">Build a terminal price ticker that streams multiplier-adjusted Chainlink quotes for any Stock Token, with staleness handling done right.</span>- <span class="tut-card-time">15 min</span>- </span>- </a><a class="tut-card" href="05-portfolio-tracker/" data-slug="05-portfolio-tracker">- <span class="tut-card-idx">05</span>- <span class="tut-card-check" aria-hidden="true"></span>- <span class="tut-card-body">- <span class="tut-card-title">Portfolio tracker done right</span>- <span class="tut-card-desc">Value any address's Stock Token holdings in one multicall — and understand exactly why a naive tracker reports the wrong number after a split.</span>- <span class="tut-card-time">15 min</span>- </span>- </a><a class="tut-card" href="06-swapping-on-chain/" data-slug="06-swapping-on-chain">- <span class="tut-card-idx">06</span>- <span class="tut-card-check" aria-hidden="true"></span>- <span class="tut-card-body">- <span class="tut-card-title">Swapping on-chain: quotes, slippage, execution</span>- <span class="tut-card-desc">Quote a Uniswap v3 swap across every fee tier, set slippage correctly, and execute on testnet — with a Stock Token eligibility sidebar.</span>- <span class="tut-card-time">20 min</span>- </span>- </a><a class="tut-card" href="07-streaming-the-chain/" data-slug="07-streaming-the-chain">- <span class="tut-card-idx">07</span>- <span class="tut-card-check" aria-hidden="true"></span>- <span class="tut-card-body">- <span class="tut-card-title">Streaming the chain: launchpads + firehose</span>- <span class="tut-card-desc">Watch NOXA and The Odyssey for new memecoin launches, then tap the raw sequencer firehose to see transactions ~100ms before they're queryable.</span>- <span class="tut-card-time">18 min</span>- </span>- </a>+ <div class="stand rise2">+ <h3>What "verified" means in this repo</h3>+ <ul>+ <li>Every command shown was actually run; every output block is a real, unedited capture, or is explicitly labeled otherwise.</li>+ <li>Where a step couldn't be verified in the build environment, a faucet gated behind a browser challenge, an unverified factory ABI, the tutorial says so plainly, with the specific reason.</li>+ <li>When testing surfaced a real bug, Tutorial 8's payment-verification example did, the lesson keeps the broken version beside the fix. A tutorial that never shows what wrong looks like isn't teaching.</li>+ <li>Every code sample sits on one open-source SDK, <b>hoodchain</b>, so the same three lines you read here are the three lines you ship.</li>+ </ul></div>- </section>- <section class="curriculum-group">- <h2 class="curriculum-group-title">Monetizing & agents</h2>- <div class="card-grid">- <a class="tut-card" href="08-sell-your-api-for-usdg/" data-slug="08-sell-your-api-for-usdg">- <span class="tut-card-idx">08</span>- <span class="tut-card-check" aria-hidden="true"></span>- <span class="tut-card-body">- <span class="tut-card-title">Sell your API for USDG with x402</span>- <span class="tut-card-desc">Put a Stock Token data endpoint behind an HTTP 402 paywall settled in USDG, and take your first real on-chain payment — from zero to a paid request.</span>- <span class="tut-card-time">25 min</span>- </span>- </a><a class="tut-card" href="09-ai-agent-chain-access/" data-slug="09-ai-agent-chain-access">- <span class="tut-card-idx">09</span>- <span class="tut-card-check" aria-hidden="true"></span>- <span class="tut-card-body">- <span class="tut-card-title">Give your AI agent chain access with MCP</span>- <span class="tut-card-desc">Build a Model Context Protocol server that exposes Robinhood Chain reads as tools, then wire it into Claude Code, Claude Desktop, or Cursor — with a real transcript.</span>- <span class="tut-card-time">22 min</span>- </span>- </a><a class="tut-card" href="10-autonomous-trading-agent/" data-slug="10-autonomous-trading-agent">- <span class="tut-card-idx">10</span>- <span class="tut-card-check" aria-hidden="true"></span>- <span class="tut-card-body">- <span class="tut-card-title">Build an autonomous trading agent</span>- <span class="tut-card-desc">A paper-mode trading agent with a real strategy, hard spend caps, and a kill switch — risk-first framing before a single lira of real capital.</span>- <span class="tut-card-time">30 min</span>- </span>- </a><a class="tut-card" href="11-launch-a-coin/" data-slug="11-launch-a-coin">- <span class="tut-card-idx">11</span>- <span class="tut-card-check" aria-hidden="true"></span>- <span class="tut-card-body">- <span class="tut-card-title">Launch a coin programmatically</span>- <span class="tut-card-desc">How Robinhood Chain's launchpads work, how to decode their events, and the responsible path to launching a token on testnet from code.</span>- <span class="tut-card-time">20 min</span>- </span>- </a>+ </div>+ </section>++ <!-- ================= START ================= -->+ <section id="start">+ <div class="eyebrow"><span class="n">03</span> / START</div>+ <div class="cols">+ <div>+ <h2 class="rise2">You already<br>started.</h2>+ <p class="lede rise2" style="margin-top:22px">You've been asking the right questions. Clone the course, preview it locally, and pick up wherever the dialogue left you, Tutorial 1 from zero, Tutorial 3 for the multiplier trap, Tutorials 8–11 for money and agents.</p>+ <div class="btns rise2">+ <a class="btn solid" href="01-what-is-robinhood-chain/">begin at tutorial 1</a>+ <a class="btn" href="https://github.com/nirholas/learn-robinhood-chain">source on github</a>+ </div></div>- </section>- <section class="curriculum-group">- <h2 class="curriculum-group-title">Capstone</h2>- <div class="card-grid">- <a class="tut-card" href="12-ship-it/" data-slug="12-ship-it">- <span class="tut-card-idx">12</span>- <span class="tut-card-check" aria-hidden="true"></span>- <span class="tut-card-body">- <span class="tut-card-title">Ship it: deploy and go mainnet</span>- <span class="tut-card-desc">Deploy your static app to Pages, your API to Cloud Run, and walk the going-mainnet checklist: funding, keys, spend caps, and monitoring.</span>- <span class="tut-card-time">18 min</span>- </span>- </a>+ <div class="rise2">+ <div class="install">+ <button class="copy" data-copy="git clone https://github.com/nirholas/learn-robinhood-chain">COPY</button>+<span class="c"># clone and preview the whole course</span>+<span class="p">git clone https://github.com/nirholas/learn-robinhood-chain</span>+<span class="p">cd learn-robinhood-chain</span>+<span class="p">npm install</span>+<span class="p">npm run dev</span>+<span class="c"># builds content/ and serves at localhost:4173</span>+ </div>+ <p class="lede" style="margin-top:18px; font-size:15px; color:#9d998f">Prerequisites: Node ≥ 20 and a terminal. A wallet you control for the write-step tutorials (6, 8, 10, 11), testnet funds are enough, no mainnet capital required to finish the course.</p></div>- </section>- </div>- <footer class="site-footer">- <p>Built by <a href="https://x.com/nichxbt" target="_blank" rel="noopener noreferrer">nirholas</a> · <a href="https://three.ws" target="_blank" rel="noopener noreferrer">three.ws</a></p>- <p class="disclaimer">Educational material. Stock Tokens are tokenized debt securities (issuer: Robinhood Assets (Jersey) Ltd) and may not be offered, sold, or delivered to US persons. Nothing here is financial advice.</p>+ </div>+ </section>++ <footer>+ <div class="big">interrogate<br>the chain.</div>+ <div class="meta">+ Robinhood Chain · ID 4663 · Arbitrum Orbit<br>+ <a href="https://github.com/nirholas/learn-robinhood-chain">github.com/nirholas/learn-robinhood-chain</a><br>+ <a href="https://github.com/nirholas/robinhood-chain-sdk">the hoodchain SDK</a><br>+ built by <a href="https://x.com/nichxbt">@nichxbt</a> · <a href="https://three.ws">three.ws</a> · not affiliated with Robinhood Markets+ </div></footer></main>-</div>-<div class="search-modal" id="search-modal" hidden role="dialog" aria-modal="true" aria-label="Search">- <div class="search-panel">- <input type="search" id="search-input" placeholder="Search tutorials…" autocomplete="off" spellcheck="false" aria-label="Search query">- <ul class="search-results" id="search-results" aria-live="polite"></ul>- <p class="search-hint"><kbd>↑</kbd><kbd>↓</kbd> to navigate · <kbd>↵</kbd> to open · <kbd>esc</kbd> to close</p>- </div>-</div>-<script defer src="assets/app.js"></script><script defer src="assets/ticker.js"></script><script defer src="assets/search.js"></script>++<script>+"use strict";+/* =====================================================================+ The conversation graph. Every answer is grounded in the real repo:+ chain 4663, Stock Tokens, the uiMultiplier / ERC-8056 trap, USDG,+ the two launchpads, the sequencer firehose, the hoodchain SDK,+ the twelve tutorials. Nothing invented.+ ===================================================================== */+const NODES = {+ start:{ topic:"open", next:["what","build","why"] },++ what:{ topic:"foundations",+ q:"What are you, exactly?",+ a:"An Arbitrum Orbit L2. Chain ID {4663} on mainnet, {46630} on testnet, I settle to Ethereum but run my own execution layer, my own sequencer, my own feed. What makes me worth learning isn't the rollup. It's that Robinhood put tokenized US equities on me. That part nobody else has.",+ next:["equities","sequencer","orbit"] },++ orbit:{ topic:"foundations",+ q:"Orbit, so you're just another rollup?",+ a:"Mechanically, yes. What lives on me is the difference. Most rollups host memecoins and a DEX. I host {95 Stock Tokens}, AAPL, SGOV, WEEK, each a real claim priced by a Chainlink feed, plus {USDG}, plus two native launchpads. A rollup with a stock exchange wired into its token registry.",+ next:["equities","usdg","launch"] },++ equities:{ topic:"stock tokens",+ q:"Show me a Stock Token.",+ a:"WEEK lives at {0xc93a...099f}. Its balance is an ordinary ERC-20 number, and that number is a lie until you scale it. On {2026-07-15}, 1 raw WEEK token was {2.0062 shares}. The scale factor is {uiMultiplier()}. Miss it and every position you paint is wrong.",+ next:["multiplier","ticker","registry"] },++ multiplier:{ topic:"the trap",+ q:"Why would a token lie about its own balance?",+ a:"Corporate actions. When a stock splits or reinvests a dividend, raw balances can't move, they're immutable ledger entries. So the issuer bumps one number, {uiMultiplier()}, and every correct integration scales by it exactly once. That's {ERC-8056}. Skip it: you understate holdings. Apply it twice: you double-count the split. It is the one piece of domain knowledge every tutorial here assumes.",+ next:["pricetrap","erc8056","portfolio"] },++ pricetrap:{ topic:"the trap",+ q:"So where does it actually go wrong?",+ a:"Valuation. On me, Chainlink feed answers are already multiplier-adjusted, the price of one TOKEN, not one share. So you scale the balance, never the feed price. At block {10,745,112} the SGOV/USDG pool priced the token at {$100.6075}, the feed at {$100.6215}, the unadjusted share at {$100.5252}. Three numbers; using the wrong one twice is the bug Tutorial 5 exists to prevent.",+ next:["portfolio","erc8056"] },++ erc8056:{ topic:"the trap", link:["03-stock-tokens-explained/","Read Tutorial 3 - Stock Tokens for developers"],+ q:"Give me the whole trap in one lesson.",+ a:"Tutorial 3. It's the shortest path in the course and the one every other lesson leans on: what {uiMultiplier()} is, why {balanceOfUI} floors the way it does, and the single table that tells you when to apply the multiplier and when the feed already did it for you. Skim it even if you skip everything else.",+ next:["portfolio","registry"] },++ registry:{ topic:"stock tokens",+ q:"How do I not hand-type 95 addresses?",+ a:"You don't. The {hoodchain} SDK ships the whole registry, 95 tokens, their feeds, decimals, multipliers, so the raw {viem} read from Tutorial 2 collapses to three lines in Tutorial 4. The course shows both on purpose: the by-hand version so you understand it, the SDK version so you'd actually use it.",+ next:["sdk","ticker"] },++ ticker:{ topic:"building", link:["04-live-price-ticker/","Build it - Tutorial 4, the live price ticker"],+ q:"What's the fastest thing I can ship?",+ a:"A live price ticker. Tutorial 4: raw client-side JSON-RPC, no SDK, no build step, decode the Chainlink answer by hand and paint it to the page. It's dependency-free and it's the reference the rest of the course points back to. Fifteen minutes, real prices.",+ next:["portfolio","stream"] },++ portfolio:{ topic:"building", link:["05-portfolio-tracker/","Build it - Tutorial 5, the portfolio tracker"],+ q:"Can I value a whole portfolio correctly?",+ a:"Tutorial 5. It sweeps all 95 tokens in a single multicall, applies each multiplier exactly once, and derives cost basis from fills, because I report what you hold, never what you paid. It's where the multiplier theory from Tutorial 3 becomes a number you can trust in a dashboard.",+ next:["swap","sdk"] },++ swap:{ topic:"building", link:["06-swapping-on-chain/","Build it - Tutorial 6, swapping on-chain"],+ q:"How do I trade on you?",+ a:"Uniswap v3, the honest way. Tutorial 6 quotes with real slippage and only executes with a funded testnet key, without one it prints the quote and exits rather than fabricating a transaction. The same code path that swaps a testnet pool swaps a mainnet memecoin.",+ next:["stream","launch"] },++ sequencer:{ topic:"streaming",+ q:"You mentioned your own feed. What's on it?",+ a:"The raw Arbitrum Nitro sequencer feed, the firehose. Decode it and you see typed transactions roughly {100-300ms} before an RPC node reports the block. Tutorial 7 hand-decodes it into a clean transaction shape. It's the difference between reacting to the chain and reading it as it happens.",+ next:["stream","launch"] },++ stream:{ topic:"streaming", link:["07-streaming-the-chain/","Build it - Tutorial 7, streaming the chain"],+ q:"What do I do with a firehose?",+ a:"Watch things be born. Tutorial 7 merges the sequencer feed with the two launchpads, {NOXA} and {The Odyssey}, into one Launch shape, so a new coin, a swap, a mint all arrive in the same stream milliseconds early. Front-of-block awareness without running your own node.",+ next:["launch","agent"] },++ launch:{ topic:"launchpads", link:["11-launch-a-coin/","Build it - Tutorial 11, launch a coin"],+ q:"You said memecoins too?",+ a:"Two native launchpads, {NOXA} and {The Odyssey}. Stream both, watch a coin the instant it exists, or launch your own programmatically in Tutorial 11. Stock exchange upstairs, casino in the basement. Same chain, same block.",+ next:["x402","agent"] },++ build:{ topic:"building",+ q:"What can I actually build here?",+ a:"Twelve tutorials, zero to an autonomous agent. A live price ticker in fifteen minutes. A multiplier-correct portfolio. On-chain swaps with real slippage. A firehose that beats RPC by milliseconds. A paid API that charges {USDG}. An MCP server that hands an LLM the chain. Pick a thread, they all lead somewhere real.",+ next:["ticker","x402","agent"] },++ why:{ topic:"open",+ q:"Why should I care about tokenized stocks on a rollup?",+ a:"Because it's programmable equity exposure that never closes. A Stock Token is an ERC-20 you can read, value, swap, lend, and wire into an agent with the same tools you'd use for any token, no brokerage API, no market hours, no gatekeeping. The catch is the {uiMultiplier}, and getting that right is most of what this course teaches.",+ next:["equities","trust","build"] },++ trust:{ topic:"the standard",+ q:"Why should I trust a word of this?",+ a:"Because none of it is secondhand. Every command in every tutorial was run against me for real before it was written, mainnet reads, testnet writes where a funded wallet existed. Real prices, real transaction hashes, real firehose numbers. Where something couldn't be verified, the tutorial says so, with the reason. A lesson that wasn't performed doesn't ship.",+ next:["sdk","start"] },++ sdk:{ topic:"the SDK",+ q:"What am I building with?",+ a:"{hoodchain}, one open-source TypeScript SDK. The 95-token registry, Chainlink quotes, multiplier-correct portfolios, Uniswap v3 swaps, {USDG}, launchpad watchers, and the sequencer firehose. Every tutorial sits on it. Read one price in three lines, or drop to raw {viem} and do it by hand, the course shows both, so you understand the thing you're abbreviating.",+ next:["registry","start"] },++ usdg:{ topic:"money", link:["08-sell-your-api-for-usdg/","Build it - Tutorial 8, sell your API for USDG"],+ q:"What's USDG and why does it matter?",+ a:"The stablecoin the chain settles in. It matters because of one quirk: {USDG has no EIP-2612 permit}, so any payment flow needs an explicit on-chain {approve} step baked in from day one, not bolted on later. Tutorial 8 hits exactly this while wiring x402, and documents the bug it caused rather than smoothing it over.",+ next:["x402","agent"] },++ x402:{ topic:"money", link:["08-sell-your-api-for-usdg/","Build it - Tutorial 8, the x402 paid API"],+ q:"How do I get paid on-chain?",+ a:"x402. Return HTTP {402}, quote a price in {USDG}, verify the payment on-chain, then serve the data. Tutorial 8 built exactly that pipeline, and found a real bug in its own payment verification while writing it. The lesson keeps the broken version next to the fix, because that's more useful than a lesson that never shows what wrong looks like.",+ next:["agent","usdg"] },++ agent:{ topic:"agents", link:["10-autonomous-trading-agent/","Build it - Tutorial 10, the autonomous agent"],+ q:"Can an AI agent drive you?",+ a:"Yes, two ways. Tutorial 9 wraps the chain as MCP tools an LLM can call but can't misuse, typed inputs, no invalid combination is constructible. Tutorial 10 goes further: an autonomous strategy loop on real prices, with guardrails enforced in code, a thrown error, not a polite instruction. Money and agents are Tutorials 8 through 11; they stand on their own once you've done 4 through 6.",+ next:["x402","start"] },++ start:{ topic:"start", link:["01-what-is-robinhood-chain/","Open Tutorial 1 and begin"],+ q:"Fine - where do I begin?",+ a:"Tutorial 1 if you've never touched me. Tutorial 3 if you can already reach an EVM chain and just want the multiplier trap. Tutorials 8 through 11 if you're here for money and agents. The whole course is right below this conversation, but you already began. You've been asking the exact questions the tutorials answer.",+ next:["what","build","trust"] }+};++const transcript = document.getElementById('transcript');+const optsEl = document.getElementById('opts');+const forkhint = document.getElementById('forkhint');+const restartBtn = document.getElementById('restart');+const stDepth = document.getElementById('st-depth');+const stAsked = document.getElementById('st-asked');+const stTopic = document.getElementById('st-topic');+const treemap = document.getElementById('treemap');+const SVGNS = "http://www.w3.org/2000/svg";++const asked = new Set();+let depth = 0;+const pathNodes = [];+let typingTimer = null;+let busy = false;++function renderAnswerHTML(str){+ const esc = s => s.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');+ return esc(str).replace(/\{([^{}]+)\}/g, (_,t)=>'<span class="hl">'+t+'</span>');+}+function plainAnswer(str){ return str.replace(/[{}]/g,''); }++function typeAnswer(el, raw, done){+ const plain = plainAnswer(raw);+ const reduce = matchMedia('(prefers-reduced-motion:reduce)').matches;+ if(reduce){ el.innerHTML = renderAnswerHTML(raw); done&&done(); return; }+ el.innerHTML = '<span class="cur"></span>';+ const cur = el.querySelector('.cur');+ const textNode = document.createTextNode('');+ el.insertBefore(textNode, cur);+ let i = 0;+ const total = plain.length;+ const step = Math.max(1, Math.round(total/140));+ clearInterval(typingTimer);+ typingTimer = setInterval(()=>{+ i += step;+ textNode.textContent = plain.slice(0, i);+ if(i >= total){+ clearInterval(typingTimer);+ el.innerHTML = renderAnswerHTML(raw);+ done&&done();+ }+ }, 15);+}++function drawMap(){+ treemap.innerHTML = '';+ const n = pathNodes.length;+ if(n === 0){ treemap.setAttribute('viewBox','0 0 120 60'); return; }+ const cx = 60, top = 12, gap = Math.min(30, 176/Math.max(n,1));+ for(let k=0;k<n;k++){+ const y = top + k*gap;+ if(k>0){+ const line = document.createElementNS(SVGNS,'line');+ line.setAttribute('x1',cx); line.setAttribute('y1',top+(k-1)*gap);+ line.setAttribute('x2',cx); line.setAttribute('y2',y);+ line.setAttribute('stroke','rgba(232,230,224,.3)'); line.setAttribute('stroke-width','1');+ treemap.appendChild(line);+ }+ const stubs = pathNodes[k].stubs||0;+ for(let s=0;s<stubs;s++){+ const dir = s%2===0?1:-1;+ const x2 = cx+dir*(12+6*Math.floor(s/2));+ const stub = document.createElementNS(SVGNS,'line');+ stub.setAttribute('x1',cx); stub.setAttribute('y1',y);+ stub.setAttribute('x2',x2); stub.setAttribute('y2',y-6);+ stub.setAttribute('stroke','rgba(232,230,224,.16)'); stub.setAttribute('stroke-width','1');+ treemap.appendChild(stub);+ const tip = document.createElementNS(SVGNS,'circle');+ tip.setAttribute('cx',x2); tip.setAttribute('cy',y-6); tip.setAttribute('r','1.4');+ tip.setAttribute('fill','rgba(232,230,224,.3)');+ treemap.appendChild(tip);+ }+ const dot = document.createElementNS(SVGNS,'circle');+ dot.setAttribute('cx',cx); dot.setAttribute('cy',y); dot.setAttribute('r', k===n-1?'3.4':'2.4');+ dot.setAttribute('fill', k===n-1?'#e8e6e0':'rgba(232,230,224,.55)');+ treemap.appendChild(dot);+ }+ treemap.setAttribute('viewBox',`0 0 120 ${Math.max(60, top + (n-1)*gap + 16)}`);+}++function appendExchange(node, onDone){+ const you = document.createElement('div');+ you.className = 'exch you';+ you.innerHTML = '<div class="who">You</div><div class="q"></div>';+ you.querySelector('.q').textContent = node.q;+ transcript.appendChild(you);++ const chain = document.createElement('div');+ chain.className = 'exch chain';+ chain.innerHTML = '<div class="who">Chain 4663</div><div class="a"></div>';+ transcript.appendChild(chain);+ const aEl = chain.querySelector('.a');++ chain.scrollIntoView({behavior:'smooth', block:'center'});+ typeAnswer(aEl, node.a, ()=>{+ if(node.link){+ const link = document.createElement('a');+ link.className = 'goto';+ link.href = node.link[0];+ link.innerHTML = node.link[1] + ' <span>→</span>';+ chain.appendChild(link);+ }+ onDone && onDone();+ });+}++function renderForks(ids){+ optsEl.innerHTML = '';+ const list = ids.filter(id => NODES[id] && NODES[id].q);+ forkhint.textContent = depth===0 ? 'Ask the chain' : 'Ask a follow-up';+ list.forEach((id,idx)=>{+ const node = NODES[id];+ const btn = document.createElement('button');+ btn.className = 'opt' + (asked.has(id)?' spent':'');+ btn.type = 'button';+ btn.innerHTML = '<span class="num">'+(idx+1)+'</span>';+ const label = document.createElement('span');+ label.textContent = node.q + (asked.has(id)?' (seen)':'');+ btn.appendChild(label);+ btn.addEventListener('click', ()=>choose(id));+ optsEl.appendChild(btn);+ requestAnimationFrame(()=> setTimeout(()=>btn.classList.add('show'), idx*70));+ });+ restartBtn.hidden = depth===0;+}++function choose(id){+ if(busy) return;+ const node = NODES[id];+ if(!node) return;+ busy = true;+ optsEl.querySelectorAll('.opt').forEach(o=>o.style.pointerEvents='none');+ const primer = document.getElementById('primer');+ if(primer) primer.remove();++ depth++;+ asked.add(id);+ const stubs = Math.max(0, (node.next||[]).filter(x=>NODES[x] && NODES[x].q && !asked.has(x)).length - 1);+ pathNodes.push({id, stubs});++ stDepth.textContent = depth;+ stAsked.textContent = asked.size;+ stTopic.textContent = node.topic || 'open';+ drawMap();++ appendExchange(node, ()=>{+ renderForks(node.next || ['start']);+ busy = false;+ });+}++addEventListener('keydown', e=>{+ if(busy) return;+ if(e.target && /^(INPUT|TEXTAREA)$/.test(e.target.tagName)) return;+ const n = parseInt(e.key,10);+ if(n>=1 && n<=9){+ const btn = optsEl.querySelectorAll('.opt')[n-1];+ if(btn){ btn.click(); }+ }+});++function reset(){+ clearInterval(typingTimer);+ transcript.innerHTML = '<div class="primer" id="primer"><div class="who">Chain 4663</div><div class="a">I\'m chain <b>4663</b>, an Arbitrum Orbit L2 carrying tokenized US equities. Ask me anything below and I\'ll answer, then hand you the next question worth asking. <b>Pick one to begin.</b><span class="cur"></span></div></div>';+ asked.clear(); depth=0; pathNodes.length=0; busy=false;+ stDepth.textContent='0'; stAsked.textContent='0'; stTopic.textContent='open';+ drawMap();+ renderForks(NODES.start.next);+}+restartBtn.addEventListener('click', reset);++renderForks(NODES.start.next);+drawMap();++document.querySelectorAll('.copy').forEach(btn=>{+ btn.addEventListener('click', ()=>{+ navigator.clipboard.writeText(btn.dataset.copy||'').then(()=>{+ const t=btn.textContent; btn.textContent='COPIED'; setTimeout(()=>btn.textContent=t,1200);+ }).catch(()=>{});+ });+});++const io = new IntersectionObserver((es)=>{ es.forEach(e=>{ if(e.isIntersecting){ e.target.classList.add('in'); io.unobserve(e.target);} }); },{threshold:.12});+document.querySelectorAll('.rise2').forEach(el=>io.observe(el));+</script></body>-</html>\ No newline at end of file+</html>diff --git a/robinhood/learn-robinhood-chain/docs/robots.txt b/robinhood/learn-robinhood-chain/docs/robots.txtnew file mode 100644index 000000000..df52e2291--- /dev/null+++ b/robinhood/learn-robinhood-chain/docs/robots.txt@@ -0,0 +1,3 @@+User-agent: *+Allow: /+Sitemap: https://nirholas.github.io/learn-robinhood-chain/sitemap.xmldiff --git a/robinhood/learn-robinhood-chain/docs/sitemap.xml b/robinhood/learn-robinhood-chain/docs/sitemap.xmlnew file mode 100644index 000000000..80f6a5f09--- /dev/null+++ b/robinhood/learn-robinhood-chain/docs/sitemap.xml@@ -0,0 +1,16 @@+<?xml version="1.0" encoding="UTF-8"?>+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">+ <url><loc>https://nirholas.github.io/learn-robinhood-chain/</loc><changefreq>weekly</changefreq><priority>1.0</priority></url>+ <url><loc>https://nirholas.github.io/learn-robinhood-chain/01-what-is-robinhood-chain/</loc><changefreq>monthly</changefreq><priority>0.8</priority></url>+ <url><loc>https://nirholas.github.io/learn-robinhood-chain/02-connect-and-read/</loc><changefreq>monthly</changefreq><priority>0.8</priority></url>+ <url><loc>https://nirholas.github.io/learn-robinhood-chain/03-stock-tokens-explained/</loc><changefreq>monthly</changefreq><priority>0.8</priority></url>+ <url><loc>https://nirholas.github.io/learn-robinhood-chain/04-live-price-ticker/</loc><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://nirholas.github.io/learn-robinhood-chain/05-portfolio-tracker/</loc><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://nirholas.github.io/learn-robinhood-chain/06-swapping-on-chain/</loc><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://nirholas.github.io/learn-robinhood-chain/07-streaming-the-chain/</loc><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://nirholas.github.io/learn-robinhood-chain/08-sell-your-api-for-usdg/</loc><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://nirholas.github.io/learn-robinhood-chain/09-ai-agent-chain-access/</loc><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://nirholas.github.io/learn-robinhood-chain/10-autonomous-trading-agent/</loc><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://nirholas.github.io/learn-robinhood-chain/11-launch-a-coin/</loc><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://nirholas.github.io/learn-robinhood-chain/12-ship-it/</loc><changefreq>monthly</changefreq><priority>0.7</priority></url>+</urlset>diff --git a/robinhood/learn-robinhood-chain/netlify.toml b/robinhood/learn-robinhood-chain/netlify.tomlnew file mode 100644index 000000000..22906a37f--- /dev/null+++ b/robinhood/learn-robinhood-chain/netlify.toml@@ -0,0 +1,4 @@+# Netlify — publish the static site in docs/.+[build]+ publish = "docs"+ command = ""diff --git a/robinhood/learn-robinhood-chain/vercel.json b/robinhood/learn-robinhood-chain/vercel.jsonnew file mode 100644index 000000000..6093773c9--- /dev/null+++ b/robinhood/learn-robinhood-chain/vercel.json@@ -0,0 +1,6 @@+{+ "$schema": "https://openapi.vercel.sh/vercel.json",+ "outputDirectory": "docs",+ "cleanUrls": true,+ "framework": null+}diff --git a/robinhood/learn-robinhood-chain/wrangler.toml b/robinhood/learn-robinhood-chain/wrangler.tomlnew file mode 100644index 000000000..e315b758b--- /dev/null+++ b/robinhood/learn-robinhood-chain/wrangler.toml@@ -0,0 +1,4 @@+# Cloudflare Pages — static deploy of the docs/ site.+# Used by the "Deploy to Cloudflare" button and `wrangler pages deploy docs`.+name = "learn-robinhood-chain"+pages_build_output_dir = "docs"