| … | … | @@ -2,13 +2,13 @@ |
| 2 | 2 | * Durably pin an EXISTING app bundle (or any Hyperdrive) on HiveRelay, |
| 3 | 3 | * WITHOUT owning its signing key. |
| 4 | 4 | * |
| 5 | | * A pear:// app bundle is just a Hyperdrive — its z32 key is the drive key. |
| 6 | | * Pinning is read-only replication: HiveRelay's seed-request is signed by |
| 5 | * A content bundle is addressed by a Hyperdrive key. Pinning is read-only |
| 6 | * replication: HiveRelay's seed-request is signed by |
| 7 | 7 | * THIS client's swarm keypair (see HiveRelayClient.seed → request.publisher* |
| 8 | 8 | * is OUR keypair, not the drive author's). So any peer that can fetch the |
| 9 | 9 | * content may ask the relay fleet to hold it. The author does NOT have to be |
| 10 | | * the one to seed it — correcting the old assumption that only `pear seed` |
| 11 | | * by the author makes an app durable. |
| 10 | * the one to seed it — replication does not make a binary trustworthy or |
| 11 | * provide a native application installer. |
| 12 | 12 | * |
| 13 | 13 | * IMPORTANT sizing note: a drive's blob *core* byteLength can be far larger |
| 14 | 14 | * than its CURRENT checkout when the key was re-staged many times during dev |
| … | … | @@ -29,11 +29,11 @@ |
| 29 | 29 | * and asking relays to hold it can create misleading "reachable but empty" |
| 30 | 30 | * evidence instead of repairing availability. |
| 31 | 31 | * |
| 32 | | * Confirm durability afterwards (local `pear seed` for the key STOPPED): |
| 32 | * Confirm durability after stopping the local seed source: |
| 33 | 33 | * node scripts/verify-app-full.js --key <64-hex> |
| 34 | 34 | * |
| 35 | 35 | * Usage: |
| 36 | | * node scripts/pin-app-on-hiverelay.js <pear://z32 | z32 | 64-hex> \ |
| 36 | * node scripts/pin-app-on-hiverelay.js <hyper://key | z32 | 64-hex> \ |
| 37 | 37 | * [--name x] [--hold 300] [--replicas 5] [--ttlDays 365] \ |
| 38 | 38 | * [--maxStorage <MB>] [--standard] [--dlTimeout 150] |
| 39 | 39 | */ |
| … | … | @@ -62,7 +62,7 @@ function parseArgs (argv) { |
| 62 | 62 | function toHexKey (raw) { |
| 63 | 63 | if (!raw) return null |
| 64 | 64 | let s = String(raw).trim() |
| 65 | | s = s.replace(/^pear:\/\//i, '').replace(/^hyper:\/\//i, '').replace(/\/.*$/, '') |
| 65 | s = s.replace(/^hyper:\/\//i, '').replace(/\/.*$/, '') |
| 66 | 66 | if (/^[0-9a-f]{64}$/i.test(s)) return s.toLowerCase() |
| 67 | 67 | try { |
| 68 | 68 | const buf = z32.decode(s) |
| … | … | @@ -74,7 +74,7 @@ function toHexKey (raw) { |
| 74 | 74 | const { positional, flags } = parseArgs(process.argv.slice(2)) |
| 75 | 75 | const keyHex = toHexKey(positional[0]) |
| 76 | 76 | if (!keyHex) { |
| 77 | | console.error('usage: node scripts/pin-app-on-hiverelay.js <pear://z32 | z32 | 64-hex> [--name x] [--hold 300] [--maxStorage <MB>] [--replicas 5] [--ttlDays 365] [--standard]') |
| 77 | console.error('usage: node scripts/pin-app-on-hiverelay.js <hyper://key | z32 | 64-hex> [--name x] [--hold 300] [--maxStorage <MB>] [--replicas 5] [--ttlDays 365] [--standard]') |
| 78 | 78 | process.exit(2) |
| 79 | 79 | } |
| 80 | 80 | |