docs updates
This commit is contained in:
@@ -6,19 +6,17 @@ Former **DOCUMENTATION.md** §10. [Reference index →](README.md)
|
||||
|
||||
### 10.1 [packages/bare-os-protocol/package.json](../../packages/bare-os-protocol/package.json)
|
||||
|
||||
| Item | Detail |
|
||||
| --------------------------- | -------------------------------------------------------------------------- |
|
||||
| `name` | `bare-os-protocol` |
|
||||
| `version` | `0.9.0` (wire v2: **`kernelCapabilityWords`**; couple boot policy **`requireProtocolPackageMin`** to this semver) |
|
||||
| `main` / `exports["."]` | `./index.js` |
|
||||
| `exports["./constants.js"]` | `./constants.js` (for `bare-os-protocol/constants.js` imports) |
|
||||
| `exports["./messages"]` | `./lib/messages.js` |
|
||||
| `scripts.test` | `brittle-bare test.js` |
|
||||
| `scripts.test:node` | `brittle-node test.js` |
|
||||
| `engines.bare` | `>=2.0.0` |
|
||||
| `dependencies` | `b4a`, `compact-encoding`, `hypercore-crypto` |
|
||||
| `devDependencies` | `brittle` |
|
||||
| `imports` | Conditional `fs` / `path` / `events` → `bare-*` under Bare, Node `default` |
|
||||
- `name` — `bare-os-protocol`
|
||||
- `version` — `0.9.0` (wire v2: **`kernelCapabilityWords`**; couple boot policy **`requireProtocolPackageMin`** to this semver)
|
||||
- `main` / `exports["."]` — `./index.js`
|
||||
- `exports["./constants.js"]` — `./constants.js` (for `bare-os-protocol/constants.js` imports)
|
||||
- `exports["./messages"]` — `./lib/messages.js`
|
||||
- `scripts.test` — `brittle-bare test.js`
|
||||
- `scripts.test:node` — `brittle-node test.js`
|
||||
- `engines.bare` — `>=2.0.0`
|
||||
- `dependencies` — `b4a`, `compact-encoding`, `hypercore-crypto`
|
||||
- `devDependencies` — `brittle`
|
||||
- `imports` — Conditional `fs` / `path` / `events` → `bare-*` under Bare, Node `default`
|
||||
|
||||
### 10.2 [packages/bare-os-protocol/index.js](../../packages/bare-os-protocol/index.js)
|
||||
|
||||
@@ -32,15 +30,13 @@ Re-exports **`BARE_OS_KERNEL_FEATURES_STOCK_WORD_*`** stock masks and **`BARE_OS
|
||||
|
||||
### 10.3 [packages/bare-os-protocol/constants.js](../../packages/bare-os-protocol/constants.js)
|
||||
|
||||
| Export | Definition |
|
||||
| ------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
||||
| `PROTOCOL_NAME` | `'bare-os-v1'` — Protomux channel name |
|
||||
| `TOPIC_STRING` | `'bare-os-v1'` — input to swarm topic hash |
|
||||
| `BLOCK_SIZE` | `512` — MBR size |
|
||||
| `MBR_MAGIC` | `b4a.from('BIOS')` — first 4 bytes of MBR |
|
||||
| `topicKey(b4aMod?)` | `crypto.hash(b4aMod.from(TOPIC_STRING))` — 32-byte Hyperswarm topic |
|
||||
| `buildMbr(primaryKey, failoverKeys?)` | Allocates 512 bytes, writes magic at 0, primary 32-byte key at offset 8, optional keys at 40 and 72 |
|
||||
| `parseMbr(mbr)` | Validates length ≥ 104, magic `BIOS`, returns `{ keys: Uint8Array[] }` (non-zero 32-byte slots) |
|
||||
- `PROTOCOL_NAME` — `'bare-os-v1'` — Protomux channel name
|
||||
- `TOPIC_STRING` — `'bare-os-v1'` — input to swarm topic hash
|
||||
- `BLOCK_SIZE` — `512` — MBR size
|
||||
- `MBR_MAGIC` — `b4a.from('BIOS')` — first 4 bytes of MBR
|
||||
- `topicKey(b4aMod?)` — `crypto.hash(b4aMod.from(TOPIC_STRING))` — 32-byte Hyperswarm topic
|
||||
- `buildMbr(primaryKey, failoverKeys?)` — Allocates 512 bytes, writes magic at 0, primary 32-byte key at offset 8, optional keys at 40 and 72
|
||||
- `parseMbr(mbr)` — Validates length ≥ 104, magic `BIOS`, returns `{ keys: Uint8Array[] }` (non-zero 32-byte slots)
|
||||
|
||||
### 10.4 [packages/bare-os-protocol/lib/messages.js](../../packages/bare-os-protocol/lib/messages.js)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user