Files
teahubxyzandClaude Opus 5.5 2ea7884688 orgchain: the tree (lineage lab keys, act as any node, graduation by claim + countersign)
Start the tree: a fresh 24-word lab root and docs/lineage.md's drawing as keys. Orgs get BIP-85 seeds from their
parent (m/83696968'/39'/0'/24'/i'), wallets are BIP-86 m/86'/1'/account'/0/0, npubs are NIP-06; seats are accounts
1..n of their org's seed; indices are never reused. Act as any node to mine, inscribe or sign with its key.

Graduation retires a leaf org on a derived edge and adopts a fresh root in its place. The handoff is OpenOrdex's
buy-order direction: the recipient builds a 2-in/2-out transaction and signs its fee input first, so its signature
fixes where the inscription goes; the holder then countersigns the inscription input. Both are default signatures,
so chain.js is unchanged. The keyring and open claims save with the lab (optional fields, same storage key).

Tests: BIP-85, BIP-86 and NIP-06 spec vectors plus the handoff and its failure cases (36/36 unit).
tests/tree.spec.js rehearses a full graduation in Chromium at desktop and phone sizes, with layout checks;
tests/flow.spec.js now follows this branch's copy and theme, and waits for a mined block before reloading
(28/28 e2e).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 17:47:56 -07:00

82 lines
16 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="theme-color" content="#141414">
<meta name="description" content="Super Testnet in lineage's clothes: rehearse an org's lineage (root, births, badges, graduation) as inscriptions on a private toy Bitcoin chain in your browser, with pretend money.">
<title>Orgchain — rehearse an org on a small chain · Lineage</title>
<link rel="icon" type="image/svg+xml" href="favicon.svg">
</head>
<body>
<header class="band">
<div class="band-in">
<div>
<h1 class="wordmark">Orgchain</h1>
<p class="lede"><b>Rehearse an org on a small chain.</b> Mint a root, give birth to children, award a badge and graduate a venture onto its own root, all as inscriptions on a private toy Bitcoin chain in this tab, with pretend money.</p>
</div>
<div class="flags">
<span class="flag hz">Test coins</span>
<span class="flag">Private chain</span>
<a class="flag" href="../">Lineage ↗</a>
<button id="theme-toggle" class="flag" type="button" aria-label="Toggle color theme">☾ Dark</button>
</div>
</div>
</header>
<main>
<section class="rehearse blk" aria-labelledby="t-rehearse"><h2 class="tab" id="t-rehearse">Rehearsal <span class="sub">a lineage in six moves</span></h2><div class="panel"><ol class="moves"><li><b>Root.</b> Fund a wallet, then inscribe the org with metaprotocol <code>lineage/v0</code> and metadata like <code>{"lineage":"root","name":"yolopreneur"}</code>.</li><li><b>Birth.</b> Inscribe a child with the root as its parent. Only the parent's holder can: the parent is spent to make the child, and the child carries the parent's ID on-chain (ord tag 3).</li><li><b>Generations.</b> Children can be parents too: <code>time</code> under the root, <code>docscope</code> under <code>time</code>, as deep as the tree goes.</li><li><b>Badge.</b> Inscribe a badge once, like <code>{"lineage":"badge","skill":"launch","belt":"green"}</code>, then mint each award as a child of it with the badge as delegate, so every award shows the same mark.</li><li><b>Tree.</b> Start the tree: a fresh pretend lab root, orgs derived from it with BIP-85, seats as accounts of their org. <i>Act as</i> any node to mine, inscribe or sign with its key.</li><li><b>Graduate.</b> A leaf venture mints its own root, which claims the venture's inscription by signing first, so its signature fixes where the inscription goes. The parent countersigns: the vouch. Two ordinary signatures, so this toy chain takes it as it is. The same handoff delivers an award to a seat.</li></ol><p class="later"><b>Not in this lab yet:</b> closing (burning a parent so no more children can be born), paid handoffs (a buyout needs a third output) and open sell orders that anyone can fill (<code>SIGHASH_SINGLE|ANYONECANPAY</code>).</p></div></section>
<aside class="notice"><strong>Test coins only.</strong> This is a private simulation, not Bitcoin testnet or mainnet. Local-wallet keys stay in this browser, unencrypted. Inscriboor keys stay in the extension. Never load real keys or send real funds here. Nothing on Orgchain is a real org, key or badge.</aside>
<div id="status" role="status" aria-live="polite">Choose Inscriboor or a local test wallet to start your first loop.</div>
<section class="workspace">
<article class="panel wallet"><div class="panel-title"><span class="step">01</span><h2>Your test wallet</h2><span id="wallet-state" class="tag">NOT CREATED</span></div>
<div id="empty-wallet"><p>One wallet. A whole chain to play with.</p><button id="create-wallet" class="primary">Use local test wallet</button> <button id="connect-inscriboor" class="quiet">Get Inscriboor ↓</button><p id="inscriboor-status" class="muted">Looking for the extension…</p><details class="install-help"><summary>Install Inscriboor</summary><p class="muted">Inscriboor 0.2.4 connects on supertestnet.lol only. On Orgchain, use the local test wallet.</p><ol><li>Download and unzip Inscriboor.</li><li>Open <code>chrome://extensions</code> (or Brave extensions).</li><li>Turn on Developer mode.</li><li>Choose <strong>Load unpacked</strong> and select the unzipped <code>extension</code> folder.</li><li>Refresh this page. The button above will change from <strong>Get Inscriboor</strong> to <strong>Connect Inscriboor</strong>.</li></ol></details></div>
<div id="active-wallet" hidden><p class="label">FAKE BTC BALANCE</p><div class="balance"><span id="balance">0</span><small>BTC</small></div><p id="reserved" class="muted"></p><label for="address">Local regtest-format address</label><input id="address" readonly><button id="export-wallet" class="quiet">↓ Save test wallet</button></div>
<div class="wallet-footer"><label class="file-button" for="load-wallet">↑ Load test wallet or lab backup</label><input id="load-wallet" type="file" accept=".json,application/json"><p class="muted">Saved on this device. Local-wallet backups contain their test key; Inscriboor backups contain only a public descriptor. A lab backup also preserves the chain.</p></div>
</article>
<article class="panel"><div class="panel-title"><span class="step">02</span><h2>Make some blocks</h2></div><p>Skip the faucet queue. Every block gives you <strong>50 fake BTC</strong>, ready to use immediately.</p><div class="chain-stats"><div><span class="label">BLOCK HEIGHT</span><strong id="height">0</strong></div><div><span class="label">PENDING TXS</span><strong id="pending">0</strong></div></div><button id="mine" class="primary" disabled>Mine now <span>+</span></button><label for="miner-interval">Auto miner</label><select id="miner-interval"><option value="0">OFF</option><option value="10">10s</option><option value="30">30s</option><option value="60">60s</option></select><p id="miner-status" aria-live="polite">Auto mining OFF</p><p class="muted">Keep a lab tab open; browser throttling may delay blocks. Mining also confirms your pending inscriptions.</p></article>
<article class="panel inscribe"><div class="panel-title"><span class="step">03</span><h2>Inscribe a root, a birth, a badge</h2><span class="tag">INSCRIPTION LAB</span></div><label for="mime-type">Content type</label><select id="mime-type"></select><label for="body-file">Or upload a local file (16 KiB maximum)</label><input id="body-file" type="file"><label for="parent">Parent inscription (optional, immutable)</label><select id="parent"><option value="">No parent</option></select><label for="delegate">Delegate inscription ID (optional, future IDs allowed)</label><input id="delegate" placeholder="64 hex characters + i0"><label for="reinscribe">Reinscribe an owned sat (optional)</label><select id="reinscribe"><option value="">New sat</option></select><label for="pointer">Advanced pointer (zero-based output sat position)</label><input id="pointer" inputmode="numeric" placeholder="Default first sat"><button id="recursive-demo" class="quiet">Use recursive demo</button><p class="muted">Recursive HTML/SVG scripts use local fetch and ord.render(text) in an isolated worker; ord.id is the requested inscription. No DOM or network access.</p><label for="payload">What will you put on your chain?</label><textarea id="payload" placeholder="yolopreneur — the root of the tree…" rows="3" disabled></textarea><label for="metadata">JSON metadata (optional, independent of body)</label><textarea id="metadata" rows="3" placeholder='{"lineage":"birth","name":"time"}'></textarea><p id="metadata-count" class="muted">0 / 2048 CBOR bytes · ord tag 5 · JSON is authoring format only</p><label for="metaprotocol">Metaprotocol (optional, independent field)</label><input id="metaprotocol" placeholder="e.g. lineage/v0 · ord tag 7"><p class="muted">Native ord metaprotocol identifier. Metadata and inscription data remain independent.</p><div class="compose-footer"><span id="byte-count" class="muted">0 / 16384 bytes</span><button id="review" disabled>Review inscription ↗</button></div>
<div id="review-panel" hidden><h3>Review before signing</h3><div id="review-preview"></div><pre id="review-text"></pre><p id="review-parent"></p><pre id="review-metadata"></pre><p>Two transactions: commit + reveal. <strong>1,000 fake sats</strong> in fees; <strong>1,000 fake sats</strong> in a new wallet output. Any selected parent or reinscription output is also returned in full; reinscription appends to its existing sat stack.</p><p id="signing-note" class="muted">The next button asks your active signer to approve commit + reveal, then submits them to your private chain.</p><button id="sign" class="primary">Sign & inscribe</button> <button id="cancel-review" class="quiet">Cancel</button></div>
</article>
</section>
<section class="panel tree-section" id="tree" aria-labelledby="t-tree"><div class="panel-title"><span class="step">04</span><h2 id="t-tree">The tree</h2><span id="tree-state" class="tag">NO TREE</span></div>
<div id="tree-empty"><p>Turn the drawing into keys: a fresh pretend lab root, orgs derived from it with BIP-85, seats as accounts of their org. Then act as any node, and graduate a venture onto its own root.</p><button id="start-tree" class="primary">Start the tree</button><p class="muted">Lab keys only: a new random root, kept unencrypted in this browser like the test wallet, and never a real key. An existing test wallet joins the tree as an imported node.</p></div>
<div id="tree-active" hidden>
<ol id="tree-list" class="tree-list" aria-label="Nodes in the tree"></ol>
<div class="tree-forms">
<fieldset class="tree-box"><legend>Add a child</legend><label for="child-parent">Under</label><select id="child-parent"></select><label for="child-kind">Kind</label><select id="child-kind"><option value="org">org · its own BIP-85 seed</option><option value="seat">seat · an account of its org</option></select><label for="child-name">Name</label><input id="child-name" placeholder="e.g. phly" autocomplete="off" spellcheck="false"><button id="add-child">Add child</button></fieldset>
<fieldset class="tree-box"><legend>Hand off an inscription</legend><label for="handoff-inscription">Inscription</label><select id="handoff-inscription"></select><label for="handoff-to">To</label><select id="handoff-to"></select><p class="muted">The recipient builds the transaction and signs its fee input first; the holder countersigns the inscription input. Two inputs, two outputs, two ordinary signatures.</p><button id="fund-recipient" class="quiet">Mine a block to the recipient</button><button id="claim">1 · Recipient claims</button></fieldset>
<fieldset class="tree-box"><legend>Graduate a venture</legend><label for="graduate-node">Venture (a leaf org on a derived edge)</label><select id="graduate-node"></select><button id="graduate">Mint its own root</button><p class="muted">The derived node retires and an adopted node with a fresh root takes its place. Then hand it its inscription: the claim is the venture accepting, the countersignature is the parent's vouch.</p></fieldset>
</div>
<h3 class="tree-subhead">Claims waiting for the holder</h3>
<div id="claims" class="claims"></div>
</div>
</section>
<section class="collection-section"><div class="section-title"><div><p class="eyebrow">05 / THE THINGS YOU MADE</p><h2>Your inscriptions <span id="collection-count">0</span></h2></div><span class="muted">Owned by this wallet</span></div><div id="collectibles" class="collectibles"><p class="empty">Your first inscription belongs here.<br><span>Fund your wallet, write some text, and make it yours.</span></p></div></section>
<section class="explorer-section">
<div class="section-title"><div><p class="eyebrow">06 / FOLLOW THE TRAIL</p><h2>Chain explorer</h2></div><button id="export-lab" class="quiet">↓ Save complete lab</button></div>
<div class="chain-board">
<div class="mempool-head"><div><span class="chain-kicker">MEMPOOL</span><strong>Waiting for the next block</strong></div><span class="muted">commit + reveal transactions live here before mining</span></div>
<div id="mempool-list" class="mempool-list"></div>
<div class="chain-divider"><span>↓ mine</span></div>
<div class="blocks-head"><span class="chain-kicker">BLOCKS</span><span class="muted">newest first · click any block to inspect it</span></div>
<div id="blocks" class="blocks"></div>
</div>
<article id="inspector" class="panel inspector" hidden tabindex="-1"></article>
</section>
<section class="panel" id="indexes"><h2>Indexes</h2>
<p>Metadata is data; indexers are interpretation. Native metaprotocol tag 7 is authoritative; metadata.protocol remains a compatibility fallback. Raw events remain uninterpreted.</p>
<p id="index-stats"></p><label for="protocol">Discovered protocol names</label><select id="protocol"></select>
<p id="protocol-stats"></p><h3>Ordered raw events</h3><p class="muted">Confirmed blocks in chain order, then mempool order.</p><div id="protocol-events"></div>
<label for="reducer">Optional trusted local indexer</label><select id="reducer"><option value="">None</option><option value="event-counter">Example: event-counter</option></select>
<h3>Derived state (separate from raw events)</h3><pre id="derived-state">No reducer selected.</pre>
</section>
<section class="panel" id="api-explorer"><h2>API explorer <span class="tag">LOCAL / IN-BROWSER</span></h2>
<p>LocalOrdAPI reads this browser’s chain and indexes. These paths are not server URLs; the static host cannot access your lab.</p>
<label for="api-preset">Preset path</label><select id="api-preset"></select>
<label for="api-path">Local API path</label><input id="api-path" value="/r/blockheight">
<button id="api-try">Try</button> <button id="api-copy" class="quiet">Copy response</button>
<pre id="api-response" aria-live="polite">Choose a path and press Try.</pre>
</section>
<details class="about"><summary>Under the hood &amp; attribution</summary><p>Orgchain is <a href="https://supertestnet.lol/">Super Testnet</a> in lineage's clothes: the same lab and code, restyled, with a rehearsal guide on top. Its lab state lives in this browser, separate from supertestnet.lol's.</p><p>Real serialized Bitcoin transactions, Schnorr signatures and Taproot commit/reveal scripts, on a deliberately simplified local UTXO chain. No proof of work, Bitcoin consensus, peer network, public broadcast, or production custody. Synthetic local sats follow FIFO input-to-output ranges. Child creation and reinscription preserve the owned sat. Fees retire the input tail; this is not Bitcoin consensus.</p><p>Built from and inspired by <a href="https://github.com/supertestnet/testnet_generator">Supertestnet’s testnet_generator</a>, <a href="https://github.com/supertestnet/inscriptions-online">inscriptions-online</a>, and <a href="https://github.com/supertestnet/vanilla-js-browser-wallet">vanilla-js-browser-wallet</a>. <a href="https://github.com/supertestnet/node_faker">node_faker</a> was evaluated for future RPC compatibility.</p><p>Transaction library: <a href="https://github.com/cmdruid/tapscript">tapscript by Christopher Scott</a> (<a href="licenses/tapscript.txt">CC-BY-1.0</a>). <a href="licenses/supertestnet-CC0.txt">Supertestnet CC0 license</a> · <a href="licenses/noble-curves.txt">noble-curves license</a> · <a href="licenses/noble-hashes.txt">noble-hashes license</a>.</p></details>
<footer><span>SMALL CHAIN. WHOLE FAMILY TREE.</span><span class="made">Part of <a href="../">Lineage</a> · <a href="https://yolopreneur.lol/">yolopreneur.lol</a> · based on <a href="https://supertestnet.lol/">Super Testnet</a></span><button id="reset" class="quiet danger">Reset local lab</button></footer>
</main><script type="module" src="/src/main.js"></script>
</body></html>