2026-10-14 17:28:33 -07:00
|
|
|
# Orgchain
|
2026-10-04 23:03:42 +00:00
|
|
|
|
2026-10-14 17:28:33 -07:00
|
|
|
Lineage's app for creating and operating lineage holdings: https://lineage.yolopreneur.lol/orgchain/
|
2026-10-04 23:24:48 +00:00
|
|
|
|
2026-10-14 17:28:33 -07:00
|
|
|
Lineage gives an org its structure, a key tree with a place for every org and agent. Orgchain adds time. Every act is an
|
|
|
|
|
inscription on a private toy chain in your browser, and its parent inscription is the node that authorizes it, so the
|
|
|
|
|
chain itself records who did what, and when.
|
2026-10-04 23:24:48 +00:00
|
|
|
|
2026-10-14 17:28:33 -07:00
|
|
|
- **Found** a holding (a root: the LLC). **Birth** orgs and agents under any org. **Award** a belt (one skill, one
|
|
|
|
|
seat). **Decide** (a decision on a node's record). **Graduate** an org (its edge flips from derived to adopted).
|
|
|
|
|
**Close** a node (derived children close with it; graduated ones hold their own roots and stay open).
|
|
|
|
|
- **Time.** A beat is a block. At the default tempo each act is its own beat; at 10, 30 or 60 seconds, acts are cued and
|
|
|
|
|
land together on the next beat; on manual they wait for *Beat now*. The slider and *Replay* show a holding as it
|
|
|
|
|
stood at any beat.
|
|
|
|
|
- **One interpretation.** `src/orgchain/lineage.js` folds `lineage/v0` events into trees, and vets every act before
|
|
|
|
|
anything is signed. Events it rejects stay on the chain and show as rejected; they just don't change the tree.
|
2026-10-14 18:22:22 -07:00
|
|
|
- **Keys.** Each holding gets its own 24-word lab root, and every node has lineage's keys at its place in the tree
|
|
|
|
|
(`src/orgchain/keys.js`): an org's seed is BIP-85 from its parent's, or its own root once it graduates; agents are
|
|
|
|
|
accounts 1..n of their org's seed; each key is BIP-86 (the wallet that holds the node's inscription and signs for it)
|
|
|
|
|
and NIP-06 (its npub). Every act is signed by whichever key holds the authorizing inscription, and a birth hands the
|
|
|
|
|
child its own. Graduation is a claim by the org's fresh root, countersigned by its derived key, and the derived
|
|
|
|
|
subtree re-keys under the new root, so the parent's line can no longer sign for it.
|
2026-10-04 23:24:48 +00:00
|
|
|
|
2026-10-14 18:22:22 -07:00
|
|
|
Test coins and test keys only: a local chain, the lab wallet (the faucet that funds every key) and each holding's lab
|
|
|
|
|
root, kept in this browser (`localStorage`, key `orgchain:lab:v1`). Nothing here is a real key; minting a real root is
|
|
|
|
|
the operator's call.
|
2026-10-04 23:24:48 +00:00
|
|
|
|
2026-10-14 17:28:33 -07:00
|
|
|
## Events
|
|
|
|
|
|
|
|
|
|
`lineage/v0` is the ord metaprotocol (tag 7); the fields are CBOR metadata (tag 5); the body is a short text label.
|
|
|
|
|
|
|
|
|
|
| op | parent inscription (spent to authorize) | metadata |
|
|
|
|
|
| --- | --- | --- |
|
|
|
|
|
| `found` | none | `name` |
|
|
|
|
|
| `birth` | the parent | `name`, `kind` (`org` or `agent`) |
|
|
|
|
|
| `award` | the issuing org or holding | `to`, `skill`, `belt` (`white`, `green`, `black`) |
|
|
|
|
|
| `decide` | the deciding node | `title`, `why` |
|
2026-10-14 18:22:22 -07:00
|
|
|
| `graduate` | the child's parent (then the handoff to the child's fresh root) | `of` |
|
2026-10-14 17:28:33 -07:00
|
|
|
| `close` | the node itself | none |
|
|
|
|
|
|
|
|
|
|
Names are domain labels (lowercase letters, digits, hyphens). Org and agent indices count separately and are never
|
|
|
|
|
reused.
|
|
|
|
|
|
|
|
|
|
## Build and test
|
|
|
|
|
|
|
|
|
|
```
|
2026-10-04 23:24:48 +00:00
|
|
|
npm ci
|
2026-10-14 17:28:33 -07:00
|
|
|
npm test # engine, reducer and lab (node --test)
|
|
|
|
|
npm run build # dist/ is the site; relative paths, so it works at any sub-path
|
|
|
|
|
npm run test:e2e # Playwright on vite preview; PW_CHANNEL=chrome uses installed Chrome
|
2026-10-04 23:24:48 +00:00
|
|
|
```
|
|
|
|
|
|
2026-10-14 17:28:33 -07:00
|
|
|
`ORGCHAIN_URL` (plus `PW_ARGS`, a JSON array of browser flags) points the same end-to-end spec at a deployed copy.
|
2026-10-04 23:24:48 +00:00
|
|
|
|
2026-10-14 17:28:33 -07:00
|
|
|
Deploy: copy `dist/` to `ventures/lineage/orgchain/` on `teahubxyz/time` `gh-pages`. Its headers (a strict CSP with
|
|
|
|
|
`connect-src 'none'`: the app makes no network requests) come from `ventures/lineage/_headers`.
|
2026-10-04 23:24:48 +00:00
|
|
|
|
2026-10-14 17:28:33 -07:00
|
|
|
## Built on Super Testnet
|
2026-10-04 23:24:48 +00:00
|
|
|
|
2026-10-14 17:28:33 -07:00
|
|
|
The chain, wallet, inscriptions, metadata and index (`src/adapters`, `src/upstream`, with `src/storage.js` and
|
|
|
|
|
`src/miner.js`) are [Super Testnet](https://supertestnet.lol)'s, unchanged and with their tests
|
2026-10-14 18:22:22 -07:00
|
|
|
(`tests/adapters.test.js`). See `PROVENANCE.md` and `public/licenses/`. Lineage's key derivation and the claim and
|
|
|
|
|
countersign handoff (`src/adapters/lineage-keys.js`, `src/adapters/handoff.js`, with their spec vectors in
|
|
|
|
|
`tests/keys.test.js`) come from the `tree` branch. The full lab (explorer, delegates, recursion and
|
2026-10-14 17:28:33 -07:00
|
|
|
the Inscriboor extension) lives at supertestnet.lol.
|