| … | … | @@ -86,6 +86,25 @@ async function boot () { |
| 86 | 86 | // Not passing it is why a phone that had genuinely completed the ceremony served ZERO DIDs |
| 87 | 87 | // (hyper-social #40 §3). hyper-proto-peer 0.3.110+ applies the same precedence coowner-join uses. |
| 88 | 88 | state.cfgDids = cfg.dids || [] // handles live in the CONFIG, not on the booted node — keep them |
| 89 | // SAY WHAT THIS DEVICE IS. The device public key is the ONE value another machine needs in order to |
| 90 | // admit this phone (`coowner-invite --device <hex>` puts it in the DID's roster, which is what |
| 91 | // StateBaseV3 checks before it will admit a writer). It was written nowhere: not logged, not in any |
| 92 | // read RPC, and unreadable from adb on a release-signed app — so a phone that holds a DID but is |
| 93 | // absent from its roster could not even NAME itself to the machine able to fix that. Whole evening, |
| 94 | // 2026-08-11. |
| 95 | // |
| 96 | // Same mnemonic precedence coowner-join uses (per-DID key first, config root second): printing the |
| 97 | // key from the wrong source would send the next person round the same loop with a hex string that |
| 98 | // admits nothing. Best-effort — a phone that cannot derive this still boots and reads. |
| 99 | try { |
| 100 | const { deviceKeetKeyPair } = await import('atproto-identity/lib/device-chain.js') |
| 101 | for (const d of (cfg.dids || [])) { |
| 102 | const mn = d.deviceMnemonic || cfg.deviceMnemonic |
| 103 | if (!mn) continue |
| 104 | const kp = await deviceKeetKeyPair(mn) |
| 105 | log('device public key for ' + d.did, { devicePublicKey: b4a.toString(kp.publicKey, 'hex') }) |
| 106 | } |
| 107 | } catch (e) { log('could not derive the device public key', { error: (e && e.message) || String(e) }) } |
| 89 | 108 | state.hpp = await bootMultiDevice({ storage: dirs.hpp, dids: cfg.dids || [], deviceMnemonic: cfg.deviceMnemonic || null }) |
| 90 | 109 | // ⛔ REPORT WHAT BOOTED, NOT WHAT WAS CONFIGURED. This line used to print the CONFIG's DID count, |
| 91 | 110 | // so it said "signing enabled {dids:1}" while zero nodes had come up — the compose button renders |