Skip to content

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.

3.0 KB
Raw Blame
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Sequencer firehose · Robinhood Chain Examples</title>
    <meta name="description" content="Raw Nitro feed decoding" />
    <link rel="stylesheet" href="../../style.css" />
    <link rel="stylesheet" href="../../hljs-theme.css" />
  </head>
  <body>
    <div class="topbar">
      <a class="brand" href="../../index.html">Robinhood Chain Examples</a>
      <a class="ghlink" href="https://github.com/nirholas/robinhood-chain-examples">GitHub ↗</a>
    </div>
    <div class="wrap"><div class="readme"><h1>06 · Sequencer firehose</h1>
<p>Decode Robinhood Chain&#39;s Arbitrum Nitro <strong>sequencer feed</strong> into a live
transaction stream. <code>subscribeFeed</code> connects to
<code>wss://feed.mainnet.chain.robinhood.com</code>, unpacks each Nitro L2 message (signed
tx and batch kinds), and hands you viem-parsed transactions <strong>~100–300ms before
they are queryable over RPC</strong> — the earliest possible view of chain activity.
Reads only; auto-reconnects with backoff.</p>
<p><strong>What it proves:</strong> the firehose is real, unauthenticated, and high-throughput,
and the SDK turns raw Nitro frames into typed transactions with an optional
address filter.</p>
<h2>Prerequisites</h2>
<ul>
<li>Node ≥ 20 (uses the built-in <code>WebSocket</code>; on older Node the SDK falls back to
the <code>ws</code> peer dependency, which this example installs).</li>
</ul>
<h2>Run</h2>
<pre><code class="hljs language-bash">npm install &amp;&amp; npm install ../../../robinhood-chain-sdk
npm start                                  <span class="hljs-comment"># 15s of everything</span>
node index.js 30 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168   <span class="hljs-comment"># 30s, USDG txs only</span>
node index.js 0                            <span class="hljs-comment"># stream forever (Ctrl-C)</span>
</code></pre><h2>Expected output</h2>
<pre><code>Connecting to the sequencer firehose…
Connected. Decoding L2 messages as they stream…

  seq   7732546  0x3ea23f6c10d1c645…  to 0x0000000071727de22e5e9d8baf0edac6f37da032
  seq   7732547  0xc3b210eb2dabac05…  to 0x65050a9b7e5075a2ba5ced7b1b64ee66262c40dc  0.000010 ETH
  seq   7732548  0x338a90b4a1305e7f…  to 0x48190f1560e60cac0107f2fe9625daf85b058c4c  0.018535 ETH
  ...
1168 frames, 6712 transactions decoded.
</code></pre><p>That&#39;s <strong>6,712 transactions in 12 seconds</strong> off one socket. The first line&#39;s
recipient <code>0x0000…da032</code> is the ERC-4337 EntryPoint v0.7 — account-abstraction
traffic shows up here just like everything else.</p>
<hr>
<p>Built by <a href="https://x.com/nichxbt">nirholas</a> · <a href="https://three.ws">three.ws</a></p>
</div></div>
    <footer>
      Built by <a href="https://x.com/nichxbt">nirholas</a> ·
      <a href="https://three.ws">three.ws</a> ·
      powered by <a href="https://github.com/nirholas/robinhood-chain-sdk">hoodchain</a>
    </footer>
  </body>
</html>