aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests/harness
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-30 15:48:51 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-30 15:48:51 +0200
commit8926f163dad9d32dc06c3a142658a4e11d9c12c1 (patch)
tree4d36d1c18154cb46e6e80c59ef6c607972caa81e /packages/meshbay-hub/tests/harness
parent8d96cf2314b45e0737f932998b5422c27a2ae72e (diff)
downloadmeshbay-8926f163dad9d32dc06c3a142658a4e11d9c12c1.tar.gz
refactor(hub): the transport holds an identity, never a private key
Two public keys, sign() and shared(); the apps take transport.signFn. What holds the keys (this page, or the desktop main process) is the identity's business alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/tests/harness')
-rw-r--r--packages/meshbay-hub/tests/harness/chat_send_probe.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/meshbay-hub/tests/harness/chat_send_probe.py b/packages/meshbay-hub/tests/harness/chat_send_probe.py
index 7569628..e5cfc8b 100644
--- a/packages/meshbay-hub/tests/harness/chat_send_probe.py
+++ b/packages/meshbay-hub/tests/harness/chat_send_probe.py
@@ -171,7 +171,8 @@ function makeTransport(name, chatReply) {
tp._groupId = '__GROUP_ID__';
tp._gekRaw = hex('__GEK_HEX__');
tp.chatEpoch = 1;
- tp._sessionKeys = { skEdB64: SK_ED_B64 };
+ tp._identity = { pkEdB64: DEVICE_PK_B64,
+ sign: (bytes) => window.MeshBayKeys.signBytes(SK_ED_B64, bytes) };
tp.devicePk = DEVICE_PK_B64;
tp._send = (obj) => {
log.push('sent ' + obj.type);
@@ -314,7 +315,7 @@ async function runScenario(name, chatReply, duringSession) {
// connect() drops it before it touches the network. Nothing about this
// step is simulated, and the clear is not poked in by the test.
await tp.connect('node-1', 'token', tp._groupId, tp._gekRaw,
- tp._sessionKeys, null, 'me', 'user-me').then(
+ tp._identity, null, 'me', 'user-me').then(
() => log.push('reconnect: connect() unexpectedly succeeded'),
(e) => log.push('reconnect: connect() stopped at signaling, as expected: '
+ (e && e.message || e)));