@cello-protocol/daemon 0.0.225 → 0.0.227
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/dist/agent-admin-handlers.d.ts +0 -56
- package/dist/agent-admin-handlers.d.ts.map +0 -1
- package/dist/agent-admin-handlers.js +0 -73
- package/dist/agent-admin-handlers.js.map +0 -1
- package/dist/agent-handlers.d.ts +0 -72
- package/dist/agent-handlers.d.ts.map +0 -1
- package/dist/agent-handlers.js +0 -604
- package/dist/agent-handlers.js.map +0 -1
- package/dist/agent-id-migration.d.ts +0 -70
- package/dist/agent-id-migration.d.ts.map +0 -1
- package/dist/agent-id-migration.js +0 -468
- package/dist/agent-id-migration.js.map +0 -1
- package/dist/agent-loader.d.ts +0 -37
- package/dist/agent-loader.d.ts.map +0 -1
- package/dist/agent-loader.js +0 -37
- package/dist/agent-loader.js.map +0 -1
- package/dist/agent-selection-root.d.ts +0 -29
- package/dist/agent-selection-root.d.ts.map +0 -1
- package/dist/agent-selection-root.js +0 -126
- package/dist/agent-selection-root.js.map +0 -1
- package/dist/agent-selection.d.ts +0 -73
- package/dist/agent-selection.d.ts.map +0 -1
- package/dist/agent-selection.js +0 -80
- package/dist/agent-selection.js.map +0 -1
- package/dist/agent-settings-keys.d.ts +0 -52
- package/dist/agent-settings-keys.d.ts.map +0 -1
- package/dist/agent-settings-keys.js +0 -114
- package/dist/agent-settings-keys.js.map +0 -1
- package/dist/agent-state.d.ts +0 -67
- package/dist/agent-state.d.ts.map +0 -1
- package/dist/agent-state.js +0 -66
- package/dist/agent-state.js.map +0 -1
- package/dist/assignment-verify.d.ts +0 -90
- package/dist/assignment-verify.d.ts.map +0 -1
- package/dist/assignment-verify.js +0 -301
- package/dist/assignment-verify.js.map +0 -1
- package/dist/attendance-wiring.d.ts +0 -23
- package/dist/attendance-wiring.d.ts.map +0 -1
- package/dist/attendance-wiring.js +0 -248
- package/dist/attendance-wiring.js.map +0 -1
- package/dist/attestation-body.d.ts +0 -47
- package/dist/attestation-body.d.ts.map +0 -1
- package/dist/attestation-body.js +0 -71
- package/dist/attestation-body.js.map +0 -1
- package/dist/authorship-verification.d.ts +0 -91
- package/dist/authorship-verification.d.ts.map +0 -1
- package/dist/authorship-verification.js +0 -532
- package/dist/authorship-verification.js.map +0 -1
- package/dist/away-detection.d.ts +0 -139
- package/dist/away-detection.d.ts.map +0 -1
- package/dist/away-detection.js +0 -186
- package/dist/away-detection.js.map +0 -1
- package/dist/away-inbox-oneshot.d.ts +0 -40
- package/dist/away-inbox-oneshot.d.ts.map +0 -1
- package/dist/away-inbox-oneshot.js +0 -311
- package/dist/away-inbox-oneshot.js.map +0 -1
- package/dist/backup-restore-handlers.d.ts +0 -10
- package/dist/backup-restore-handlers.d.ts.map +0 -1
- package/dist/backup-restore-handlers.js +0 -82
- package/dist/backup-restore-handlers.js.map +0 -1
- package/dist/backup-restore.d.ts +0 -102
- package/dist/backup-restore.d.ts.map +0 -1
- package/dist/backup-restore.js +0 -341
- package/dist/backup-restore.js.map +0 -1
- package/dist/bin/cello-daemon.d.ts +0 -13
- package/dist/bin/cello-daemon.d.ts.map +0 -1
- package/dist/bin/cello-daemon.js.map +0 -1
- package/dist/boot-agents.d.ts +0 -64
- package/dist/boot-agents.d.ts.map +0 -1
- package/dist/boot-agents.js +0 -241
- package/dist/boot-agents.js.map +0 -1
- package/dist/boot-connection-state.d.ts +0 -38
- package/dist/boot-connection-state.d.ts.map +0 -1
- package/dist/boot-connection-state.js +0 -95
- package/dist/boot-connection-state.js.map +0 -1
- package/dist/boot-core.d.ts +0 -36
- package/dist/boot-core.d.ts.map +0 -1
- package/dist/boot-core.js +0 -293
- package/dist/boot-core.js.map +0 -1
- package/dist/boot-parked-content.d.ts +0 -34
- package/dist/boot-parked-content.d.ts.map +0 -1
- package/dist/boot-parked-content.js +0 -528
- package/dist/boot-parked-content.js.map +0 -1
- package/dist/boot-sweeps.d.ts +0 -22
- package/dist/boot-sweeps.d.ts.map +0 -1
- package/dist/boot-sweeps.js +0 -51
- package/dist/boot-sweeps.js.map +0 -1
- package/dist/bundled-consortium-manifest.d.ts +0 -47
- package/dist/bundled-consortium-manifest.d.ts.map +0 -1
- package/dist/bundled-consortium-manifest.js +0 -116
- package/dist/bundled-consortium-manifest.js.map +0 -1
- package/dist/cbor-blob-migration.d.ts +0 -8
- package/dist/cbor-blob-migration.d.ts.map +0 -1
- package/dist/cbor-blob-migration.js +0 -116
- package/dist/cbor-blob-migration.js.map +0 -1
- package/dist/challenge-verifier.d.ts +0 -12
- package/dist/challenge-verifier.d.ts.map +0 -1
- package/dist/challenge-verifier.js +0 -11
- package/dist/challenge-verifier.js.map +0 -1
- package/dist/close-commitment.d.ts +0 -67
- package/dist/close-commitment.d.ts.map +0 -1
- package/dist/close-commitment.js +0 -78
- package/dist/close-commitment.js.map +0 -1
- package/dist/close-session-handler.d.ts +0 -94
- package/dist/close-session-handler.d.ts.map +0 -1
- package/dist/close-session-handler.js +0 -1418
- package/dist/close-session-handler.js.map +0 -1
- package/dist/co-attendance.d.ts +0 -29
- package/dist/co-attendance.d.ts.map +0 -1
- package/dist/co-attendance.js +0 -32
- package/dist/co-attendance.js.map +0 -1
- package/dist/column-birth.d.ts +0 -40
- package/dist/column-birth.d.ts.map +0 -1
- package/dist/column-birth.js +0 -61
- package/dist/column-birth.js.map +0 -1
- package/dist/connect-or-start.d.ts +0 -25
- package/dist/connect-or-start.d.ts.map +0 -1
- package/dist/connect-or-start.js +0 -175
- package/dist/connect-or-start.js.map +0 -1
- package/dist/connection-agents.d.ts +0 -16
- package/dist/connection-agents.d.ts.map +0 -1
- package/dist/connection-agents.js +0 -68
- package/dist/connection-agents.js.map +0 -1
- package/dist/consent-migration.d.ts +0 -49
- package/dist/consent-migration.d.ts.map +0 -1
- package/dist/consent-migration.js +0 -128
- package/dist/consent-migration.js.map +0 -1
- package/dist/consortium-bootstrap.d.ts +0 -138
- package/dist/consortium-bootstrap.d.ts.map +0 -1
- package/dist/consortium-bootstrap.js +0 -339
- package/dist/consortium-bootstrap.js.map +0 -1
- package/dist/consortium-fingerprint.d.ts +0 -115
- package/dist/consortium-fingerprint.d.ts.map +0 -1
- package/dist/consortium-fingerprint.js +0 -175
- package/dist/consortium-fingerprint.js.map +0 -1
- package/dist/contact-handlers.d.ts +0 -59
- package/dist/contact-handlers.d.ts.map +0 -1
- package/dist/contact-handlers.js +0 -343
- package/dist/contact-handlers.js.map +0 -1
- package/dist/contact-pubkey-case.d.ts +0 -65
- package/dist/contact-pubkey-case.d.ts.map +0 -1
- package/dist/contact-pubkey-case.js +0 -136
- package/dist/contact-pubkey-case.js.map +0 -1
- package/dist/contacts-tier-migration.d.ts +0 -90
- package/dist/contacts-tier-migration.d.ts.map +0 -1
- package/dist/contacts-tier-migration.js +0 -150
- package/dist/contacts-tier-migration.js.map +0 -1
- package/dist/content-encryption-status.d.ts +0 -111
- package/dist/content-encryption-status.d.ts.map +0 -1
- package/dist/content-encryption-status.js +0 -158
- package/dist/content-encryption-status.js.map +0 -1
- package/dist/content-park-client.d.ts +0 -90
- package/dist/content-park-client.d.ts.map +0 -1
- package/dist/content-park-client.js +0 -362
- package/dist/content-park-client.js.map +0 -1
- package/dist/content-park.d.ts +0 -52
- package/dist/content-park.d.ts.map +0 -1
- package/dist/content-park.js +0 -1309
- package/dist/content-park.js.map +0 -1
- package/dist/cross-node-negotiation.d.ts +0 -44
- package/dist/cross-node-negotiation.d.ts.map +0 -1
- package/dist/cross-node-negotiation.js +0 -34
- package/dist/cross-node-negotiation.js.map +0 -1
- package/dist/daemon-handle.d.ts +0 -57
- package/dist/daemon-handle.d.ts.map +0 -1
- package/dist/daemon-handle.js +0 -2
- package/dist/daemon-handle.js.map +0 -1
- package/dist/daemon-status-report.d.ts +0 -50
- package/dist/daemon-status-report.d.ts.map +0 -1
- package/dist/daemon-status-report.js +0 -81
- package/dist/daemon-status-report.js.map +0 -1
- package/dist/daemon.d.ts +0 -45
- package/dist/daemon.d.ts.map +0 -1
- package/dist/daemon.js +0 -1177
- package/dist/daemon.js.map +0 -1
- package/dist/db-identity-store.d.ts +0 -159
- package/dist/db-identity-store.d.ts.map +0 -1
- package/dist/db-identity-store.js +0 -502
- package/dist/db-identity-store.js.map +0 -1
- package/dist/delivery-open-registry.d.ts +0 -92
- package/dist/delivery-open-registry.d.ts.map +0 -1
- package/dist/delivery-open-registry.js +0 -121
- package/dist/delivery-open-registry.js.map +0 -1
- package/dist/delivery-session-suspects.d.ts +0 -56
- package/dist/delivery-session-suspects.d.ts.map +0 -1
- package/dist/delivery-session-suspects.js +0 -94
- package/dist/delivery-session-suspects.js.map +0 -1
- package/dist/directory-auth-posture.d.ts +0 -87
- package/dist/directory-auth-posture.d.ts.map +0 -1
- package/dist/directory-auth-posture.js +0 -134
- package/dist/directory-auth-posture.js.map +0 -1
- package/dist/directory-bootstrap.d.ts +0 -310
- package/dist/directory-bootstrap.d.ts.map +0 -1
- package/dist/directory-bootstrap.js +0 -557
- package/dist/directory-bootstrap.js.map +0 -1
- package/dist/directory-connect.d.ts +0 -27
- package/dist/directory-connect.d.ts.map +0 -1
- package/dist/directory-connect.js +0 -106
- package/dist/directory-connect.js.map +0 -1
- package/dist/disconnect-cleanup.d.ts +0 -51
- package/dist/disconnect-cleanup.d.ts.map +0 -1
- package/dist/disconnect-cleanup.js +0 -72
- package/dist/disconnect-cleanup.js.map +0 -1
- package/dist/document-amendment-store.d.ts +0 -120
- package/dist/document-amendment-store.d.ts.map +0 -1
- package/dist/document-amendment-store.js +0 -266
- package/dist/document-amendment-store.js.map +0 -1
- package/dist/document-delivery-transport.d.ts +0 -168
- package/dist/document-delivery-transport.d.ts.map +0 -1
- package/dist/document-delivery-transport.js +0 -206
- package/dist/document-delivery-transport.js.map +0 -1
- package/dist/document-engine.d.ts +0 -134
- package/dist/document-engine.d.ts.map +0 -1
- package/dist/document-engine.js +0 -282
- package/dist/document-engine.js.map +0 -1
- package/dist/document-flag.d.ts +0 -58
- package/dist/document-flag.d.ts.map +0 -1
- package/dist/document-flag.js +0 -70
- package/dist/document-flag.js.map +0 -1
- package/dist/document-frame-router.d.ts +0 -245
- package/dist/document-frame-router.d.ts.map +0 -1
- package/dist/document-frame-router.js +0 -397
- package/dist/document-frame-router.js.map +0 -1
- package/dist/document-gate-wiring.d.ts +0 -61
- package/dist/document-gate-wiring.d.ts.map +0 -1
- package/dist/document-gate-wiring.js +0 -125
- package/dist/document-gate-wiring.js.map +0 -1
- package/dist/document-gate.d.ts +0 -149
- package/dist/document-gate.d.ts.map +0 -1
- package/dist/document-gate.js +0 -509
- package/dist/document-gate.js.map +0 -1
- package/dist/document-handlers.d.ts +0 -47
- package/dist/document-handlers.d.ts.map +0 -1
- package/dist/document-handlers.js +0 -2203
- package/dist/document-handlers.js.map +0 -1
- package/dist/document-handshake.d.ts +0 -176
- package/dist/document-handshake.d.ts.map +0 -1
- package/dist/document-handshake.js +0 -452
- package/dist/document-handshake.js.map +0 -1
- package/dist/document-inbound.d.ts +0 -162
- package/dist/document-inbound.d.ts.map +0 -1
- package/dist/document-inbound.js +0 -530
- package/dist/document-inbound.js.map +0 -1
- package/dist/document-json.d.ts +0 -120
- package/dist/document-json.d.ts.map +0 -1
- package/dist/document-json.js +0 -191
- package/dist/document-json.js.map +0 -1
- package/dist/document-layer.d.ts +0 -215
- package/dist/document-layer.d.ts.map +0 -1
- package/dist/document-layer.js +0 -1025
- package/dist/document-layer.js.map +0 -1
- package/dist/document-lifecycle.d.ts +0 -52
- package/dist/document-lifecycle.d.ts.map +0 -1
- package/dist/document-lifecycle.js +0 -134
- package/dist/document-lifecycle.js.map +0 -1
- package/dist/document-live-docs.d.ts +0 -58
- package/dist/document-live-docs.d.ts.map +0 -1
- package/dist/document-live-docs.js +0 -126
- package/dist/document-live-docs.js.map +0 -1
- package/dist/document-notify.d.ts +0 -228
- package/dist/document-notify.d.ts.map +0 -1
- package/dist/document-notify.js +0 -580
- package/dist/document-notify.js.map +0 -1
- package/dist/document-profile.d.ts +0 -61
- package/dist/document-profile.d.ts.map +0 -1
- package/dist/document-profile.js +0 -112
- package/dist/document-profile.js.map +0 -1
- package/dist/document-publish.d.ts +0 -87
- package/dist/document-publish.d.ts.map +0 -1
- package/dist/document-publish.js +0 -173
- package/dist/document-publish.js.map +0 -1
- package/dist/document-reachability.d.ts +0 -42
- package/dist/document-reachability.d.ts.map +0 -1
- package/dist/document-reachability.js +0 -80
- package/dist/document-reachability.js.map +0 -1
- package/dist/document-reconcile-engine.d.ts +0 -66
- package/dist/document-reconcile-engine.d.ts.map +0 -1
- package/dist/document-reconcile-engine.js +0 -225
- package/dist/document-reconcile-engine.js.map +0 -1
- package/dist/document-reconcile-scheduler.d.ts +0 -163
- package/dist/document-reconcile-scheduler.d.ts.map +0 -1
- package/dist/document-reconcile-scheduler.js +0 -303
- package/dist/document-reconcile-scheduler.js.map +0 -1
- package/dist/document-rejection.d.ts +0 -251
- package/dist/document-rejection.d.ts.map +0 -1
- package/dist/document-rejection.js +0 -435
- package/dist/document-rejection.js.map +0 -1
- package/dist/document-screen.d.ts +0 -114
- package/dist/document-screen.d.ts.map +0 -1
- package/dist/document-screen.js +0 -223
- package/dist/document-screen.js.map +0 -1
- package/dist/document-store.d.ts +0 -372
- package/dist/document-store.d.ts.map +0 -1
- package/dist/document-store.js +0 -931
- package/dist/document-store.js.map +0 -1
- package/dist/document-surface.d.ts +0 -32
- package/dist/document-surface.d.ts.map +0 -1
- package/dist/document-surface.js +0 -151
- package/dist/document-surface.js.map +0 -1
- package/dist/document-types.d.ts +0 -94
- package/dist/document-types.d.ts.map +0 -1
- package/dist/document-types.js +0 -90
- package/dist/document-types.js.map +0 -1
- package/dist/document-watch.d.ts +0 -69
- package/dist/document-watch.d.ts.map +0 -1
- package/dist/document-watch.js +0 -108
- package/dist/document-watch.js.map +0 -1
- package/dist/document-wiring.d.ts +0 -53
- package/dist/document-wiring.d.ts.map +0 -1
- package/dist/document-wiring.js +0 -323
- package/dist/document-wiring.js.map +0 -1
- package/dist/document-write-guard.d.ts +0 -66
- package/dist/document-write-guard.d.ts.map +0 -1
- package/dist/document-write-guard.js +0 -98
- package/dist/document-write-guard.js.map +0 -1
- package/dist/document-write-path.d.ts +0 -94
- package/dist/document-write-path.d.ts.map +0 -1
- package/dist/document-write-path.js +0 -530
- package/dist/document-write-path.js.map +0 -1
- package/dist/error-message.d.ts +0 -7
- package/dist/error-message.d.ts.map +0 -1
- package/dist/error-message.js +0 -19
- package/dist/error-message.js.map +0 -1
- package/dist/file-manifest-provider.d.ts +0 -37
- package/dist/file-manifest-provider.d.ts.map +0 -1
- package/dist/file-manifest-provider.js +0 -105
- package/dist/file-manifest-provider.js.map +0 -1
- package/dist/frame-values.d.ts +0 -3
- package/dist/frame-values.d.ts.map +0 -1
- package/dist/frame-values.js +0 -84
- package/dist/frame-values.js.map +0 -1
- package/dist/frontier-mismatch.d.ts +0 -73
- package/dist/frontier-mismatch.d.ts.map +0 -1
- package/dist/frontier-mismatch.js +0 -89
- package/dist/frontier-mismatch.js.map +0 -1
- package/dist/gateway-config-handlers.d.ts +0 -26
- package/dist/gateway-config-handlers.d.ts.map +0 -1
- package/dist/gateway-config-handlers.js +0 -429
- package/dist/gateway-config-handlers.js.map +0 -1
- package/dist/held-content.d.ts +0 -145
- package/dist/held-content.d.ts.map +0 -1
- package/dist/held-content.js +0 -389
- package/dist/held-content.js.map +0 -1
- package/dist/http-manifest-poll.d.ts +0 -67
- package/dist/http-manifest-poll.d.ts.map +0 -1
- package/dist/http-manifest-poll.js +0 -150
- package/dist/http-manifest-poll.js.map +0 -1
- package/dist/identity-migration.d.ts +0 -40
- package/dist/identity-migration.d.ts.map +0 -1
- package/dist/identity-migration.js +0 -461
- package/dist/identity-migration.js.map +0 -1
- package/dist/inbound-refusals.d.ts +0 -283
- package/dist/inbound-refusals.d.ts.map +0 -1
- package/dist/inbound-refusals.js +0 -919
- package/dist/inbound-refusals.js.map +0 -1
- package/dist/inbound-seal-request.d.ts +0 -32
- package/dist/inbound-seal-request.d.ts.map +0 -1
- package/dist/inbound-seal-request.js +0 -228
- package/dist/inbound-seal-request.js.map +0 -1
- package/dist/inbound-sessions.d.ts +0 -291
- package/dist/inbound-sessions.d.ts.map +0 -1
- package/dist/inbound-sessions.js +0 -1609
- package/dist/inbound-sessions.js.map +0 -1
- package/dist/inclusion-proof-handlers.d.ts +0 -43
- package/dist/inclusion-proof-handlers.d.ts.map +0 -1
- package/dist/inclusion-proof-handlers.js +0 -565
- package/dist/inclusion-proof-handlers.js.map +0 -1
- package/dist/inclusion-proof.d.ts +0 -151
- package/dist/inclusion-proof.d.ts.map +0 -1
- package/dist/inclusion-proof.js +0 -228
- package/dist/inclusion-proof.js.map +0 -1
- package/dist/index.d.ts +0 -32
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/initiate-session-handler.d.ts +0 -55
- package/dist/initiate-session-handler.d.ts.map +0 -1
- package/dist/initiate-session-handler.js +0 -310
- package/dist/initiate-session-handler.js.map +0 -1
- package/dist/ipc-client.d.ts +0 -31
- package/dist/ipc-client.d.ts.map +0 -1
- package/dist/ipc-client.js +0 -113
- package/dist/ipc-client.js.map +0 -1
- package/dist/ipc-server.d.ts +0 -63
- package/dist/ipc-server.d.ts.map +0 -1
- package/dist/ipc-server.js +0 -429
- package/dist/ipc-server.js.map +0 -1
- package/dist/ipc-surface.d.ts +0 -44
- package/dist/ipc-surface.d.ts.map +0 -1
- package/dist/ipc-surface.js +0 -107
- package/dist/ipc-surface.js.map +0 -1
- package/dist/line-lcs.d.ts +0 -51
- package/dist/line-lcs.d.ts.map +0 -1
- package/dist/line-lcs.js +0 -71
- package/dist/line-lcs.js.map +0 -1
- package/dist/lock-file.d.ts +0 -39
- package/dist/lock-file.d.ts.map +0 -1
- package/dist/lock-file.js +0 -120
- package/dist/lock-file.js.map +0 -1
- package/dist/log-collapse.d.ts +0 -66
- package/dist/log-collapse.d.ts.map +0 -1
- package/dist/log-collapse.js +0 -244
- package/dist/log-collapse.js.map +0 -1
- package/dist/log-rotate.d.ts +0 -67
- package/dist/log-rotate.d.ts.map +0 -1
- package/dist/log-rotate.js +0 -134
- package/dist/log-rotate.js.map +0 -1
- package/dist/manifest-deps.d.ts +0 -25
- package/dist/manifest-deps.d.ts.map +0 -1
- package/dist/manifest-deps.js +0 -151
- package/dist/manifest-deps.js.map +0 -1
- package/dist/manifest-poll-scheduler.d.ts +0 -31
- package/dist/manifest-poll-scheduler.d.ts.map +0 -1
- package/dist/manifest-poll-scheduler.js +0 -59
- package/dist/manifest-poll-scheduler.js.map +0 -1
- package/dist/manifest-validity.d.ts +0 -153
- package/dist/manifest-validity.d.ts.map +0 -1
- package/dist/manifest-validity.js +0 -268
- package/dist/manifest-validity.js.map +0 -1
- package/dist/manifest-version-store-db.d.ts +0 -24
- package/dist/manifest-version-store-db.d.ts.map +0 -1
- package/dist/manifest-version-store-db.js +0 -58
- package/dist/manifest-version-store-db.js.map +0 -1
- package/dist/manifest-version-store.d.ts +0 -16
- package/dist/manifest-version-store.d.ts.map +0 -1
- package/dist/manifest-version-store.js +0 -15
- package/dist/manifest-version-store.js.map +0 -1
- package/dist/network-directory-node.d.ts +0 -136
- package/dist/network-directory-node.d.ts.map +0 -1
- package/dist/network-directory-node.js +0 -810
- package/dist/network-directory-node.js.map +0 -1
- package/dist/nonce-dedup.d.ts +0 -68
- package/dist/nonce-dedup.d.ts.map +0 -1
- package/dist/nonce-dedup.js +0 -205
- package/dist/nonce-dedup.js.map +0 -1
- package/dist/notification-dispatcher.d.ts +0 -92
- package/dist/notification-dispatcher.d.ts.map +0 -1
- package/dist/notification-dispatcher.js +0 -210
- package/dist/notification-dispatcher.js.map +0 -1
- package/dist/notification-handlers.d.ts +0 -53
- package/dist/notification-handlers.d.ts.map +0 -1
- package/dist/notification-handlers.js +0 -461
- package/dist/notification-handlers.js.map +0 -1
- package/dist/onboarding-guidance.d.ts +0 -79
- package/dist/onboarding-guidance.d.ts.map +0 -1
- package/dist/onboarding-guidance.js +0 -95
- package/dist/onboarding-guidance.js.map +0 -1
- package/dist/operator-guidance.d.ts +0 -25
- package/dist/operator-guidance.d.ts.map +0 -1
- package/dist/operator-guidance.js +0 -50
- package/dist/operator-guidance.js.map +0 -1
- package/dist/orphan-triage.d.ts +0 -130
- package/dist/orphan-triage.d.ts.map +0 -1
- package/dist/orphan-triage.js +0 -207
- package/dist/orphan-triage.js.map +0 -1
- package/dist/outbound-sessions.d.ts +0 -126
- package/dist/outbound-sessions.d.ts.map +0 -1
- package/dist/outbound-sessions.js +0 -1052
- package/dist/outbound-sessions.js.map +0 -1
- package/dist/park-envelope.d.ts +0 -329
- package/dist/park-envelope.d.ts.map +0 -1
- package/dist/park-envelope.js +0 -509
- package/dist/park-envelope.js.map +0 -1
- package/dist/park-recovery.d.ts +0 -273
- package/dist/park-recovery.d.ts.map +0 -1
- package/dist/park-recovery.js +0 -717
- package/dist/park-recovery.js.map +0 -1
- package/dist/park-refusals.d.ts +0 -147
- package/dist/park-refusals.d.ts.map +0 -1
- package/dist/park-refusals.js +0 -331
- package/dist/park-refusals.js.map +0 -1
- package/dist/quarantine-framing.d.ts +0 -92
- package/dist/quarantine-framing.d.ts.map +0 -1
- package/dist/quarantine-framing.js +0 -111
- package/dist/quarantine-framing.js.map +0 -1
- package/dist/reconnect-drain.d.ts +0 -22
- package/dist/reconnect-drain.d.ts.map +0 -1
- package/dist/reconnect-drain.js +0 -65
- package/dist/reconnect-drain.js.map +0 -1
- package/dist/recovered-position.d.ts +0 -14
- package/dist/recovered-position.d.ts.map +0 -1
- package/dist/recovered-position.js +0 -59
- package/dist/recovered-position.js.map +0 -1
- package/dist/refusal-notices.d.ts +0 -196
- package/dist/refusal-notices.d.ts.map +0 -1
- package/dist/refusal-notices.js +0 -516
- package/dist/refusal-notices.js.map +0 -1
- package/dist/refusal-reasons.d.ts +0 -245
- package/dist/refusal-reasons.d.ts.map +0 -1
- package/dist/refusal-reasons.js +0 -363
- package/dist/refusal-reasons.js.map +0 -1
- package/dist/register-handler.d.ts +0 -36
- package/dist/register-handler.d.ts.map +0 -1
- package/dist/register-handler.js +0 -285
- package/dist/register-handler.js.map +0 -1
- package/dist/registration-context.d.ts +0 -72
- package/dist/registration-context.d.ts.map +0 -1
- package/dist/registration-context.js +0 -126
- package/dist/registration-context.js.map +0 -1
- package/dist/registration-manager.d.ts +0 -94
- package/dist/registration-manager.d.ts.map +0 -1
- package/dist/registration-manager.js +0 -585
- package/dist/registration-manager.js.map +0 -1
- package/dist/registration-persistence.d.ts +0 -183
- package/dist/registration-persistence.d.ts.map +0 -1
- package/dist/registration-persistence.js +0 -263
- package/dist/registration-persistence.js.map +0 -1
- package/dist/registry-poll.d.ts +0 -52
- package/dist/registry-poll.d.ts.map +0 -1
- package/dist/registry-poll.js +0 -140
- package/dist/registry-poll.js.map +0 -1
- package/dist/registry-version-store-db.d.ts +0 -22
- package/dist/registry-version-store-db.d.ts.map +0 -1
- package/dist/registry-version-store-db.js +0 -50
- package/dist/registry-version-store-db.js.map +0 -1
- package/dist/relay-endpoints.d.ts +0 -18
- package/dist/relay-endpoints.d.ts.map +0 -1
- package/dist/relay-endpoints.js +0 -9
- package/dist/relay-endpoints.js.map +0 -1
- package/dist/relay-only.d.ts +0 -140
- package/dist/relay-only.d.ts.map +0 -1
- package/dist/relay-only.js +0 -193
- package/dist/relay-only.js.map +0 -1
- package/dist/relay-receipt-store.d.ts +0 -155
- package/dist/relay-receipt-store.d.ts.map +0 -1
- package/dist/relay-receipt-store.js +0 -284
- package/dist/relay-receipt-store.js.map +0 -1
- package/dist/relay-reconnect.d.ts +0 -32
- package/dist/relay-reconnect.d.ts.map +0 -1
- package/dist/relay-reconnect.js +0 -29
- package/dist/relay-reconnect.js.map +0 -1
- package/dist/reply-lag.d.ts +0 -11
- package/dist/reply-lag.d.ts.map +0 -1
- package/dist/reply-lag.js +0 -46
- package/dist/reply-lag.js.map +0 -1
- package/dist/resolve-named-agent.d.ts +0 -49
- package/dist/resolve-named-agent.d.ts.map +0 -1
- package/dist/resolve-named-agent.js +0 -77
- package/dist/resolve-named-agent.js.map +0 -1
- package/dist/restart-seal-resolver.d.ts +0 -110
- package/dist/restart-seal-resolver.d.ts.map +0 -1
- package/dist/restart-seal-resolver.js +0 -353
- package/dist/restart-seal-resolver.js.map +0 -1
- package/dist/resume-last-seen.d.ts +0 -15
- package/dist/resume-last-seen.d.ts.map +0 -1
- package/dist/resume-last-seen.js +0 -44
- package/dist/resume-last-seen.js.map +0 -1
- package/dist/retry-queue.d.ts +0 -203
- package/dist/retry-queue.d.ts.map +0 -1
- package/dist/retry-queue.js +0 -701
- package/dist/retry-queue.js.map +0 -1
- package/dist/roster-freshness.d.ts +0 -160
- package/dist/roster-freshness.d.ts.map +0 -1
- package/dist/roster-freshness.js +0 -250
- package/dist/roster-freshness.js.map +0 -1
- package/dist/screening-status.d.ts +0 -15
- package/dist/screening-status.d.ts.map +0 -1
- package/dist/screening-status.js +0 -65
- package/dist/screening-status.js.map +0 -1
- package/dist/seal-carried-close.d.ts +0 -37
- package/dist/seal-carried-close.d.ts.map +0 -1
- package/dist/seal-carried-close.js +0 -179
- package/dist/seal-carried-close.js.map +0 -1
- package/dist/seal-certificate-pull.d.ts +0 -79
- package/dist/seal-certificate-pull.d.ts.map +0 -1
- package/dist/seal-certificate-pull.js +0 -186
- package/dist/seal-certificate-pull.js.map +0 -1
- package/dist/seal-certified-root-check.d.ts +0 -37
- package/dist/seal-certified-root-check.d.ts.map +0 -1
- package/dist/seal-certified-root-check.js +0 -127
- package/dist/seal-certified-root-check.js.map +0 -1
- package/dist/seal-coordinator.d.ts +0 -118
- package/dist/seal-coordinator.d.ts.map +0 -1
- package/dist/seal-coordinator.js +0 -927
- package/dist/seal-coordinator.js.map +0 -1
- package/dist/seal-escalation.d.ts +0 -80
- package/dist/seal-escalation.d.ts.map +0 -1
- package/dist/seal-escalation.js +0 -283
- package/dist/seal-escalation.js.map +0 -1
- package/dist/seal-evidence-root-check.d.ts +0 -70
- package/dist/seal-evidence-root-check.d.ts.map +0 -1
- package/dist/seal-evidence-root-check.js +0 -199
- package/dist/seal-evidence-root-check.js.map +0 -1
- package/dist/seal-failure-store.d.ts +0 -129
- package/dist/seal-failure-store.d.ts.map +0 -1
- package/dist/seal-failure-store.js +0 -173
- package/dist/seal-failure-store.js.map +0 -1
- package/dist/seal-flows.d.ts +0 -107
- package/dist/seal-flows.d.ts.map +0 -1
- package/dist/seal-flows.js +0 -638
- package/dist/seal-flows.js.map +0 -1
- package/dist/seal-frontier-verify.d.ts +0 -103
- package/dist/seal-frontier-verify.d.ts.map +0 -1
- package/dist/seal-frontier-verify.js +0 -143
- package/dist/seal-frontier-verify.js.map +0 -1
- package/dist/seal-leaf.d.ts +0 -58
- package/dist/seal-leaf.d.ts.map +0 -1
- package/dist/seal-leaf.js +0 -112
- package/dist/seal-leaf.js.map +0 -1
- package/dist/seal-legibility-tbs.d.ts +0 -25
- package/dist/seal-legibility-tbs.d.ts.map +0 -1
- package/dist/seal-legibility-tbs.js +0 -77
- package/dist/seal-legibility-tbs.js.map +0 -1
- package/dist/seal-local-terminus.d.ts +0 -41
- package/dist/seal-local-terminus.d.ts.map +0 -1
- package/dist/seal-local-terminus.js +0 -170
- package/dist/seal-local-terminus.js.map +0 -1
- package/dist/seal-receipt-upgrade.d.ts +0 -30
- package/dist/seal-receipt-upgrade.d.ts.map +0 -1
- package/dist/seal-receipt-upgrade.js +0 -49
- package/dist/seal-receipt-upgrade.js.map +0 -1
- package/dist/seal-relay-silence.d.ts +0 -51
- package/dist/seal-relay-silence.d.ts.map +0 -1
- package/dist/seal-relay-silence.js +0 -76
- package/dist/seal-relay-silence.js.map +0 -1
- package/dist/seal-settle.d.ts +0 -38
- package/dist/seal-settle.d.ts.map +0 -1
- package/dist/seal-settle.js +0 -33
- package/dist/seal-settle.js.map +0 -1
- package/dist/seal-upgrade.d.ts +0 -107
- package/dist/seal-upgrade.d.ts.map +0 -1
- package/dist/seal-upgrade.js +0 -200
- package/dist/seal-upgrade.js.map +0 -1
- package/dist/sealed-conversation.d.ts +0 -36
- package/dist/sealed-conversation.d.ts.map +0 -1
- package/dist/sealed-conversation.js +0 -171
- package/dist/sealed-conversation.js.map +0 -1
- package/dist/sealed-leaf-set.d.ts +0 -92
- package/dist/sealed-leaf-set.d.ts.map +0 -1
- package/dist/sealed-leaf-set.js +0 -122
- package/dist/sealed-leaf-set.js.map +0 -1
- package/dist/send-claims.d.ts +0 -56
- package/dist/send-claims.d.ts.map +0 -1
- package/dist/send-claims.js +0 -50
- package/dist/send-claims.js.map +0 -1
- package/dist/session-assignment-parser.d.ts +0 -98
- package/dist/session-assignment-parser.d.ts.map +0 -1
- package/dist/session-assignment-parser.js +0 -325
- package/dist/session-assignment-parser.js.map +0 -1
- package/dist/session-category.d.ts +0 -19
- package/dist/session-category.d.ts.map +0 -1
- package/dist/session-category.js +0 -14
- package/dist/session-category.js.map +0 -1
- package/dist/session-ceremony.d.ts +0 -297
- package/dist/session-ceremony.d.ts.map +0 -1
- package/dist/session-ceremony.js +0 -964
- package/dist/session-ceremony.js.map +0 -1
- package/dist/session-closed.d.ts +0 -79
- package/dist/session-closed.d.ts.map +0 -1
- package/dist/session-closed.js +0 -189
- package/dist/session-closed.js.map +0 -1
- package/dist/session-connection-gater.d.ts +0 -148
- package/dist/session-connection-gater.d.ts.map +0 -1
- package/dist/session-connection-gater.js +0 -332
- package/dist/session-connection-gater.js.map +0 -1
- package/dist/session-content-context.d.ts +0 -162
- package/dist/session-content-context.d.ts.map +0 -1
- package/dist/session-content-context.js +0 -2
- package/dist/session-content-context.js.map +0 -1
- package/dist/session-content-handlers.d.ts +0 -82
- package/dist/session-content-handlers.d.ts.map +0 -1
- package/dist/session-content-handlers.js +0 -1382
- package/dist/session-content-handlers.js.map +0 -1
- package/dist/session-content-ingest.d.ts +0 -206
- package/dist/session-content-ingest.d.ts.map +0 -1
- package/dist/session-content-ingest.js +0 -2167
- package/dist/session-content-ingest.js.map +0 -1
- package/dist/session-content-send.d.ts +0 -191
- package/dist/session-content-send.d.ts.map +0 -1
- package/dist/session-content-send.js +0 -1360
- package/dist/session-content-send.js.map +0 -1
- package/dist/session-delivery-acks.d.ts +0 -169
- package/dist/session-delivery-acks.d.ts.map +0 -1
- package/dist/session-delivery-acks.js +0 -569
- package/dist/session-delivery-acks.js.map +0 -1
- package/dist/session-ephemerals.d.ts +0 -279
- package/dist/session-ephemerals.d.ts.map +0 -1
- package/dist/session-ephemerals.js +0 -591
- package/dist/session-ephemerals.js.map +0 -1
- package/dist/session-leaf-records.d.ts +0 -159
- package/dist/session-leaf-records.d.ts.map +0 -1
- package/dist/session-leaf-records.js +0 -408
- package/dist/session-leaf-records.js.map +0 -1
- package/dist/session-lifecycle.d.ts +0 -303
- package/dist/session-lifecycle.d.ts.map +0 -1
- package/dist/session-lifecycle.js +0 -1679
- package/dist/session-lifecycle.js.map +0 -1
- package/dist/session-liveness.d.ts +0 -135
- package/dist/session-liveness.d.ts.map +0 -1
- package/dist/session-liveness.js +0 -347
- package/dist/session-liveness.js.map +0 -1
- package/dist/session-name.d.ts +0 -35
- package/dist/session-name.d.ts.map +0 -1
- package/dist/session-name.js +0 -60
- package/dist/session-name.js.map +0 -1
- package/dist/session-node-factory.d.ts +0 -18
- package/dist/session-node-factory.d.ts.map +0 -1
- package/dist/session-node-factory.js +0 -182
- package/dist/session-node-factory.js.map +0 -1
- package/dist/session-node-manager.d.ts +0 -875
- package/dist/session-node-manager.d.ts.map +0 -1
- package/dist/session-node-manager.js +0 -2995
- package/dist/session-node-manager.js.map +0 -1
- package/dist/session-node-types.d.ts +0 -1057
- package/dist/session-node-types.d.ts.map +0 -1
- package/dist/session-node-types.js +0 -657
- package/dist/session-node-types.js.map +0 -1
- package/dist/session-notify.d.ts +0 -46
- package/dist/session-notify.d.ts.map +0 -1
- package/dist/session-notify.js +0 -116
- package/dist/session-notify.js.map +0 -1
- package/dist/session-own-chain-store.d.ts +0 -65
- package/dist/session-own-chain-store.d.ts.map +0 -1
- package/dist/session-own-chain-store.js +0 -75
- package/dist/session-own-chain-store.js.map +0 -1
- package/dist/session-queries.d.ts +0 -476
- package/dist/session-queries.d.ts.map +0 -1
- package/dist/session-queries.js +0 -1007
- package/dist/session-queries.js.map +0 -1
- package/dist/session-read-handlers.d.ts +0 -87
- package/dist/session-read-handlers.d.ts.map +0 -1
- package/dist/session-read-handlers.js +0 -682
- package/dist/session-read-handlers.js.map +0 -1
- package/dist/session-records.d.ts +0 -341
- package/dist/session-records.d.ts.map +0 -1
- package/dist/session-records.js +0 -858
- package/dist/session-records.js.map +0 -1
- package/dist/session-relay-client.d.ts +0 -659
- package/dist/session-relay-client.d.ts.map +0 -1
- package/dist/session-relay-client.js +0 -2876
- package/dist/session-relay-client.js.map +0 -1
- package/dist/session-relay.d.ts +0 -397
- package/dist/session-relay.d.ts.map +0 -1
- package/dist/session-relay.js +0 -1636
- package/dist/session-relay.js.map +0 -1
- package/dist/session-salt-agreement.d.ts +0 -331
- package/dist/session-salt-agreement.d.ts.map +0 -1
- package/dist/session-salt-agreement.js +0 -472
- package/dist/session-salt-agreement.js.map +0 -1
- package/dist/session-salts.d.ts +0 -432
- package/dist/session-salts.d.ts.map +0 -1
- package/dist/session-salts.js +0 -1540
- package/dist/session-salts.js.map +0 -1
- package/dist/session-schema.d.ts +0 -30
- package/dist/session-schema.d.ts.map +0 -1
- package/dist/session-schema.js +0 -877
- package/dist/session-schema.js.map +0 -1
- package/dist/session-seal-leaf-store.d.ts +0 -70
- package/dist/session-seal-leaf-store.d.ts.map +0 -1
- package/dist/session-seal-leaf-store.js +0 -105
- package/dist/session-seal-leaf-store.js.map +0 -1
- package/dist/session-seal.d.ts +0 -334
- package/dist/session-seal.d.ts.map +0 -1
- package/dist/session-seal.js +0 -1017
- package/dist/session-seal.js.map +0 -1
- package/dist/session-terminal-refusal.d.ts +0 -65
- package/dist/session-terminal-refusal.d.ts.map +0 -1
- package/dist/session-terminal-refusal.js +0 -87
- package/dist/session-terminal-refusal.js.map +0 -1
- package/dist/session-tree.d.ts +0 -110
- package/dist/session-tree.d.ts.map +0 -1
- package/dist/session-tree.js +0 -144
- package/dist/session-tree.js.map +0 -1
- package/dist/session-views.d.ts +0 -47
- package/dist/session-views.d.ts.map +0 -1
- package/dist/session-views.js +0 -278
- package/dist/session-views.js.map +0 -1
- package/dist/signal-handlers.d.ts +0 -63
- package/dist/signal-handlers.d.ts.map +0 -1
- package/dist/signal-handlers.js +0 -980
- package/dist/signal-handlers.js.map +0 -1
- package/dist/signal-requirement-policy.d.ts +0 -51
- package/dist/signal-requirement-policy.d.ts.map +0 -1
- package/dist/signal-requirement-policy.js +0 -89
- package/dist/signal-requirement-policy.js.map +0 -1
- package/dist/signal-revocability.d.ts +0 -49
- package/dist/signal-revocability.d.ts.map +0 -1
- package/dist/signal-revocability.js +0 -93
- package/dist/signal-revocability.js.map +0 -1
- package/dist/signal-submission.d.ts +0 -181
- package/dist/signal-submission.d.ts.map +0 -1
- package/dist/signal-submission.js +0 -368
- package/dist/signal-submission.js.map +0 -1
- package/dist/signaling-connect.d.ts +0 -118
- package/dist/signaling-connect.d.ts.map +0 -1
- package/dist/signaling-connect.js +0 -538
- package/dist/signaling-connect.js.map +0 -1
- package/dist/signaling-wiring.d.ts +0 -105
- package/dist/signaling-wiring.d.ts.map +0 -1
- package/dist/signaling-wiring.js +0 -393
- package/dist/signaling-wiring.js.map +0 -1
- package/dist/singleton-lock.d.ts +0 -85
- package/dist/singleton-lock.d.ts.map +0 -1
- package/dist/singleton-lock.js +0 -219
- package/dist/singleton-lock.js.map +0 -1
- package/dist/sqlcipher-db.d.ts +0 -139
- package/dist/sqlcipher-db.d.ts.map +0 -1
- package/dist/sqlcipher-db.js +0 -357
- package/dist/sqlcipher-db.js.map +0 -1
- package/dist/standing-receivers.d.ts +0 -319
- package/dist/standing-receivers.d.ts.map +0 -1
- package/dist/standing-receivers.js +0 -1295
- package/dist/standing-receivers.js.map +0 -1
- package/dist/start-agent.d.ts +0 -64
- package/dist/start-agent.d.ts.map +0 -1
- package/dist/start-agent.js +0 -136
- package/dist/start-agent.js.map +0 -1
- package/dist/status-handler.d.ts +0 -54
- package/dist/status-handler.d.ts.map +0 -1
- package/dist/status-handler.js +0 -61
- package/dist/status-handler.js.map +0 -1
- package/dist/submission-retry.d.ts +0 -208
- package/dist/submission-retry.d.ts.map +0 -1
- package/dist/submission-retry.js +0 -506
- package/dist/submission-retry.js.map +0 -1
- package/dist/telegram-bot-client.d.ts +0 -34
- package/dist/telegram-bot-client.d.ts.map +0 -1
- package/dist/telegram-bot-client.js +0 -36
- package/dist/telegram-bot-client.js.map +0 -1
- package/dist/telegram-doorbell.d.ts +0 -38
- package/dist/telegram-doorbell.d.ts.map +0 -1
- package/dist/telegram-doorbell.js +0 -140
- package/dist/telegram-doorbell.js.map +0 -1
- package/dist/test-handlers.d.ts +0 -62
- package/dist/test-handlers.d.ts.map +0 -1
- package/dist/test-handlers.js +0 -240
- package/dist/test-handlers.js.map +0 -1
- package/dist/testing.d.ts +0 -10
- package/dist/testing.d.ts.map +0 -1
- package/dist/testing.js +0 -10
- package/dist/testing.js.map +0 -1
- package/dist/transport-composition.d.ts +0 -31
- package/dist/transport-composition.d.ts.map +0 -1
- package/dist/transport-composition.js +0 -55
- package/dist/transport-composition.js.map +0 -1
- package/dist/transport-selector.d.ts +0 -202
- package/dist/transport-selector.d.ts.map +0 -1
- package/dist/transport-selector.js +0 -196
- package/dist/transport-selector.js.map +0 -1
- package/dist/trust-signal-pickup-listener.d.ts +0 -43
- package/dist/trust-signal-pickup-listener.d.ts.map +0 -1
- package/dist/trust-signal-pickup-listener.js +0 -48
- package/dist/trust-signal-pickup-listener.js.map +0 -1
- package/dist/trust-signal-store.d.ts +0 -406
- package/dist/trust-signal-store.d.ts.map +0 -1
- package/dist/trust-signal-store.js +0 -939
- package/dist/trust-signal-store.js.map +0 -1
- package/dist/trust-signal-sweep-tick.d.ts +0 -60
- package/dist/trust-signal-sweep-tick.d.ts.map +0 -1
- package/dist/trust-signal-sweep-tick.js +0 -101
- package/dist/trust-signal-sweep-tick.js.map +0 -1
- package/dist/trust-signal-sweep.d.ts +0 -94
- package/dist/trust-signal-sweep.d.ts.map +0 -1
- package/dist/trust-signal-sweep.js +0 -147
- package/dist/trust-signal-sweep.js.map +0 -1
- package/dist/type-registry.d.ts +0 -42
- package/dist/type-registry.d.ts.map +0 -1
- package/dist/type-registry.js +0 -37
- package/dist/type-registry.js.map +0 -1
- package/dist/types.d.ts +0 -746
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -20
- package/dist/types.js.map +0 -1
- package/dist/unresolved-nodes-report.d.ts +0 -14
- package/dist/unresolved-nodes-report.d.ts.map +0 -1
- package/dist/unresolved-nodes-report.js +0 -96
- package/dist/unresolved-nodes-report.js.map +0 -1
- package/dist/vocabulary.d.ts +0 -150
- package/dist/vocabulary.d.ts.map +0 -1
- package/dist/vocabulary.js +0 -386
- package/dist/vocabulary.js.map +0 -1
- package/dist/who-label.d.ts +0 -28
- package/dist/who-label.d.ts.map +0 -1
- package/dist/who-label.js +0 -31
- package/dist/who-label.js.map +0 -1
- package/dist/who-resolver.d.ts +0 -15
- package/dist/who-resolver.d.ts.map +0 -1
- package/dist/who-resolver.js +0 -47
- package/dist/who-resolver.js.map +0 -1
- package/dist/wire-content-hash.d.ts +0 -93
- package/dist/wire-content-hash.d.ts.map +0 -1
- package/dist/wire-content-hash.js +0 -116
- package/dist/wire-content-hash.js.map +0 -1
- package/dist/withheld-content.d.ts +0 -13
- package/dist/withheld-content.d.ts.map +0 -1
- package/dist/withheld-content.js +0 -46
- package/dist/withheld-content.js.map +0 -1
- package/dist/witness-alerts.d.ts +0 -40
- package/dist/witness-alerts.d.ts.map +0 -1
- package/dist/witness-alerts.js +0 -102
- package/dist/witness-alerts.js.map +0 -1
|
@@ -1,810 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NetworkDirectoryNode — DirectoryNodeStub backed by a real libp2p connection.
|
|
3
|
-
*
|
|
4
|
-
* Implements the DirectoryNodeStub interface by dialing the directory node's
|
|
5
|
-
* /cello/frost/1.0.0 endpoint. Used in live e2e mode instead of InProcessDirectoryNodeStub.
|
|
6
|
-
*
|
|
7
|
-
* Wire protocol (one stream per operation, CBOR + it-length-prefixed):
|
|
8
|
-
* frost_bootstrap: push share material to directory (called from bootstrapKeyShares)
|
|
9
|
-
* frost_commit_request: ask directory to generate a nonce commitment
|
|
10
|
-
* frost_sign_request: ask directory to compute a partial signature
|
|
11
|
-
*/
|
|
12
|
-
import { createHash } from "node:crypto";
|
|
13
|
-
import { decode as cborDecode } from "cbor-x";
|
|
14
|
-
import { encodeCbor } from "@cello-protocol/protocol-types";
|
|
15
|
-
import * as lp from "it-length-prefixed";
|
|
16
|
-
import { ed25519_FROST, FrostThresholdSigner } from "@cello-protocol/crypto";
|
|
17
|
-
import { storeDkgResult, getClientFrostIdentifier, getClientRefreshRoster, generateClientRefreshContribution, applyRefreshToLocalShare, } from "@cello-protocol/crypto/frost/frost-threshold-signer.js";
|
|
18
|
-
const NOOP_LOGGER = {
|
|
19
|
-
info: () => { },
|
|
20
|
-
warn: () => { },
|
|
21
|
-
error: () => { },
|
|
22
|
-
debug: () => { },
|
|
23
|
-
};
|
|
24
|
-
import { extractErrorMessage } from "./error-message.js";
|
|
25
|
-
const FROST_PROTOCOL_ID = "/cello/frost/1.0.0";
|
|
26
|
-
const FROST_AUTH_DOMAIN = "CELLO-FROST-AUTH-v1";
|
|
27
|
-
// Domain separation (must match the directory's verifyFrostAuth): 0x00 = commit; 0x01 || framedMsg = sign.
|
|
28
|
-
const FROST_AUTH_COMMIT_TAIL = new Uint8Array([0x00]);
|
|
29
|
-
const FROST_AUTH_SIGN_PREFIX = 0x01;
|
|
30
|
-
// ─── NetworkDirectoryNode ─────────────────────────────────────────────────────
|
|
31
|
-
export class NetworkDirectoryNode {
|
|
32
|
-
id;
|
|
33
|
-
#node;
|
|
34
|
-
#directoryPeerId;
|
|
35
|
-
#directoryMultiaddrs;
|
|
36
|
-
#logger;
|
|
37
|
-
// Set during bootstrapKeyShares — used to identify which agent's share to retrieve
|
|
38
|
-
#agentPubkeyHex = null;
|
|
39
|
-
#epochId = null;
|
|
40
|
-
// Signs the K_local auth on commit/sign requests (set via setBootstrapContext).
|
|
41
|
-
#signAuth = null;
|
|
42
|
-
/**
|
|
43
|
-
* DOD-M15-SEALPARTIES-1: the signed leaves this seal is being certified over, forwarded verbatim
|
|
44
|
-
* so each directory node can rebuild the root for itself instead of signing a claim.
|
|
45
|
-
*
|
|
46
|
-
* Held as ceremony CONTEXT, like `setBootstrapContext`, rather than threaded through
|
|
47
|
-
* `StubSignParams` — that type lives in `@cello-protocol/crypto` and is shared by the DKG,
|
|
48
|
-
* refresh and session-establishment ceremonies, none of which have leaves. Widening it for one
|
|
49
|
-
* caller would put a seal-shaped field in front of three ceremonies that must ignore it.
|
|
50
|
-
*
|
|
51
|
-
* Nothing here is trusted: every leaf carries its author's signature, and the counterparty's
|
|
52
|
-
* leaves cannot be forged by the agent forwarding them.
|
|
53
|
-
*/
|
|
54
|
-
#sealEvidence = null;
|
|
55
|
-
/** Attach the seal evidence for the ceremony about to run. Cleared by passing `null`. */
|
|
56
|
-
setSealEvidence(evidence) {
|
|
57
|
-
this.#sealEvidence = evidence;
|
|
58
|
-
}
|
|
59
|
-
// Stored during receiveShare — used by tests to get the FrostPublic for signRound calls
|
|
60
|
-
#lastPub = null;
|
|
61
|
-
constructor(opts) {
|
|
62
|
-
this.id = opts.id;
|
|
63
|
-
this.#node = opts.node;
|
|
64
|
-
this.#directoryPeerId = opts.directoryPeerId;
|
|
65
|
-
this.#directoryMultiaddrs = opts.directoryMultiaddrs;
|
|
66
|
-
this.#logger = opts.logger ?? NOOP_LOGGER;
|
|
67
|
-
}
|
|
68
|
-
isReachable() {
|
|
69
|
-
// For the network path, optimistically return true at pre-ceremony check time.
|
|
70
|
-
// Actual reachability is discovered during generateCommitment/signRound.
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
/** Return the FrostPublic from the last receiveShare call. Used by tests to construct signRound params. */
|
|
74
|
-
getLastPub() {
|
|
75
|
-
return this.#lastPub;
|
|
76
|
-
}
|
|
77
|
-
async receiveShare(...[secret, pub]) {
|
|
78
|
-
this.#lastPub = pub;
|
|
79
|
-
if (!this.#agentPubkeyHex || !this.#epochId) {
|
|
80
|
-
throw new Error("NetworkDirectoryNode: setBootstrapContext must be called before receiveShare");
|
|
81
|
-
}
|
|
82
|
-
// Serialize FrostSecret: { identifier, signingShare }
|
|
83
|
-
const secretSerialized = {
|
|
84
|
-
identifier: secret.identifier,
|
|
85
|
-
signingShare: secret.signingShare,
|
|
86
|
-
};
|
|
87
|
-
// Serialize FrostPublic: { signers, commitments[], verifyingShares{} }
|
|
88
|
-
const pubSerialized = {
|
|
89
|
-
signers: pub.signers,
|
|
90
|
-
commitments: pub.commitments,
|
|
91
|
-
verifyingShares: pub.verifyingShares,
|
|
92
|
-
};
|
|
93
|
-
const frame = encodeCbor({
|
|
94
|
-
type: "frost_bootstrap",
|
|
95
|
-
agentPubkey: this.#agentPubkeyHex,
|
|
96
|
-
epochId: this.#epochId,
|
|
97
|
-
secret: secretSerialized.signingShare,
|
|
98
|
-
identifier: secretSerialized.identifier,
|
|
99
|
-
commitments: pubSerialized.commitments,
|
|
100
|
-
verifyingShares: pubSerialized.verifyingShares,
|
|
101
|
-
signers: pubSerialized.signers,
|
|
102
|
-
});
|
|
103
|
-
const stream = await this.#openStream();
|
|
104
|
-
try {
|
|
105
|
-
stream.send(lp.encode.single(frame));
|
|
106
|
-
// Read the response before closing — directory sends frost_bootstrap_ok
|
|
107
|
-
for await (const chunk of lp.decode(stream)) {
|
|
108
|
-
const bytes = chunk instanceof Uint8Array ? chunk : chunk.slice();
|
|
109
|
-
const resp = cborDecode(bytes);
|
|
110
|
-
if (resp.type !== "frost_bootstrap_ok") {
|
|
111
|
-
throw new Error(`NetworkDirectoryNode: unexpected bootstrap response: ${resp.type}`);
|
|
112
|
-
}
|
|
113
|
-
break;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
finally {
|
|
117
|
-
stream.close().catch(() => { });
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
async generateCommitment() {
|
|
121
|
-
this.#logger.debug("frost.directory.commitment.start", { agent: this.#agentPubkeyHex?.slice(0, 16), epochId: this.#epochId, directoryPeerId: this.#directoryPeerId?.slice(0, 16) });
|
|
122
|
-
if (!this.#agentPubkeyHex || !this.#epochId) {
|
|
123
|
-
this.#logger.debug("frost.directory.commitment.abort", { reason: "missing_context", hasAgent: !!this.#agentPubkeyHex, hasEpochId: !!this.#epochId });
|
|
124
|
-
throw new Error("NetworkDirectoryNode: setBootstrapContext must be called before generateCommitment");
|
|
125
|
-
}
|
|
126
|
-
const frame = encodeCbor({
|
|
127
|
-
type: "frost_commit_request",
|
|
128
|
-
agentPubkey: this.#agentPubkeyHex,
|
|
129
|
-
epochId: this.#epochId,
|
|
130
|
-
peerIdString: this.#node.getPeerId(),
|
|
131
|
-
authSig: await this.#buildAuthSig(FROST_AUTH_COMMIT_TAIL), // SEC-2
|
|
132
|
-
});
|
|
133
|
-
this.#logger.debug("frost.directory.stream.opening", { directoryPeerId: this.#directoryPeerId?.slice(0, 16), multiaddr: this.#directoryMultiaddrs[0] });
|
|
134
|
-
const stream = await this.#openStream();
|
|
135
|
-
this.#logger.debug("frost.directory.stream.opened", {});
|
|
136
|
-
try {
|
|
137
|
-
stream.send(lp.encode.single(frame));
|
|
138
|
-
await stream.close();
|
|
139
|
-
for await (const chunk of lp.decode(stream)) {
|
|
140
|
-
const bytes = chunk instanceof Uint8Array ? chunk : chunk.slice();
|
|
141
|
-
const resp = cborDecode(bytes);
|
|
142
|
-
this.#logger.debug("frost.directory.commitment.response", { ok: resp.ok, reason: resp.reason, nodeId: resp.nodeId?.slice(0, 16) });
|
|
143
|
-
if (!resp.ok) {
|
|
144
|
-
throw new Error(`NetworkDirectoryNode: commit request failed: ${resp.reason}`);
|
|
145
|
-
}
|
|
146
|
-
return {
|
|
147
|
-
nodeId: resp.nodeId,
|
|
148
|
-
nonceCommitment: resp.nonceCommitment,
|
|
149
|
-
nonces: null,
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
finally {
|
|
154
|
-
stream.close().catch(() => { });
|
|
155
|
-
}
|
|
156
|
-
throw new Error("NetworkDirectoryNode: no response to frost_commit_request");
|
|
157
|
-
}
|
|
158
|
-
async signRound(params) {
|
|
159
|
-
this.#logger.debug("frost.directory.sign.start", { agent: this.#agentPubkeyHex?.slice(0, 16), epochId: this.#epochId, ceremonyId: params.ceremonyId?.slice(0, 16) });
|
|
160
|
-
if (!this.#agentPubkeyHex || !this.#epochId) {
|
|
161
|
-
this.#logger.debug("frost.directory.sign.abort", { reason: "missing_context" });
|
|
162
|
-
throw new Error("NetworkDirectoryNode: setBootstrapContext must be called before signRound");
|
|
163
|
-
}
|
|
164
|
-
const frame = encodeCbor({
|
|
165
|
-
type: "frost_sign_request",
|
|
166
|
-
agentPubkey: this.#agentPubkeyHex,
|
|
167
|
-
epochId: this.#epochId,
|
|
168
|
-
framedMsg: params.msg,
|
|
169
|
-
commitmentList: params.commitmentList,
|
|
170
|
-
ceremonyId: params.ceremonyId,
|
|
171
|
-
peerIdString: params.ceremonyId,
|
|
172
|
-
// Bound to THIS framedMsg, with the 0x01 sign-frame domain-separation prefix.
|
|
173
|
-
authSig: await this.#buildAuthSig(Buffer.concat([Buffer.from([FROST_AUTH_SIGN_PREFIX]), Buffer.from(params.msg)])),
|
|
174
|
-
// DOD-M15-SEALPARTIES-1: the evidence, when this is a seal. A directory refuses a seal
|
|
175
|
-
// signature request that arrives without it — absence is the off-switch a coordinator would
|
|
176
|
-
// reach for, so it cannot be tolerated.
|
|
177
|
-
...(this.#sealEvidence
|
|
178
|
-
? { seal_leaves: this.#sealEvidence.leaves, seal_close_timestamp: this.#sealEvidence.closeTimestamp }
|
|
179
|
-
: {}),
|
|
180
|
-
});
|
|
181
|
-
this.#logger.debug("frost.directory.sign.stream.opening", {});
|
|
182
|
-
const stream = await this.#openStream();
|
|
183
|
-
this.#logger.debug("frost.directory.sign.stream.opened", {});
|
|
184
|
-
try {
|
|
185
|
-
stream.send(lp.encode.single(frame));
|
|
186
|
-
await stream.close();
|
|
187
|
-
for await (const chunk of lp.decode(stream)) {
|
|
188
|
-
const bytes = chunk instanceof Uint8Array ? chunk : chunk.slice();
|
|
189
|
-
const resp = cborDecode(bytes);
|
|
190
|
-
this.#logger.debug("frost.directory.sign.response", { ok: resp.ok, reason: resp.reason, sigLength: resp.partialSignature ? resp.partialSignature.length : null });
|
|
191
|
-
if (!resp.ok) {
|
|
192
|
-
/**
|
|
193
|
-
* DOD-M15-SEALPARTIES-1: a REFUSAL is not the same event as a slow node, and it used to
|
|
194
|
-
* leave the same trace — a debug line and a `null`. The ceremony then failed with
|
|
195
|
-
* "not enough partial signatures" and nothing anywhere said that a holder had looked at
|
|
196
|
-
* the evidence and declined. A co-signer that refuses is the strongest signal this system
|
|
197
|
-
* produces; it belongs at warn, with what the refusing node actually said.
|
|
198
|
-
*/
|
|
199
|
-
this.#sealEvidence?.onRefused?.(resp.reason ?? "unstated");
|
|
200
|
-
this.#logger.warn("frost.directory.sign.refused", {
|
|
201
|
-
directoryPeerId: this.#directoryPeerId?.slice(0, 16),
|
|
202
|
-
epochId: this.#epochId,
|
|
203
|
-
ceremonyId: params.ceremonyId?.slice(0, 16),
|
|
204
|
-
reason: resp.reason ?? "unstated",
|
|
205
|
-
detail: resp.detail,
|
|
206
|
-
impact: "this directory node did not contribute its share, so the ceremony loses one holder. " +
|
|
207
|
-
"If enough refuse, the signature cannot reach its threshold and nothing is signed.",
|
|
208
|
-
});
|
|
209
|
-
return null;
|
|
210
|
-
}
|
|
211
|
-
const sig = resp.partialSignature;
|
|
212
|
-
if (!sig)
|
|
213
|
-
return null;
|
|
214
|
-
return sig instanceof Uint8Array ? sig : new Uint8Array(sig);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
finally {
|
|
218
|
-
stream.close().catch(() => { });
|
|
219
|
-
}
|
|
220
|
-
return null;
|
|
221
|
-
}
|
|
222
|
-
// Called by the network-aware bootstrapKeyShares before distributing shares. `signAuth` is the
|
|
223
|
-
// agent's K_local signer, used to authenticate every subsequent commit/sign request; EVERY ceremony
|
|
224
|
-
// path (session/seal, DKG, refresh) must pass it or the enforcing directory refuses the request.
|
|
225
|
-
setBootstrapContext(agentPubkeyHex, epochId, signAuth) {
|
|
226
|
-
this.#agentPubkeyHex = agentPubkeyHex;
|
|
227
|
-
this.#epochId = epochId;
|
|
228
|
-
if (signAuth)
|
|
229
|
-
this.#signAuth = signAuth;
|
|
230
|
-
}
|
|
231
|
-
// Hash bound by the directory's verifyFrostAuth. tail = utf8("commit") | framedMsg.
|
|
232
|
-
#frostAuthHash(tail) {
|
|
233
|
-
return new Uint8Array(createHash("sha256")
|
|
234
|
-
.update(Buffer.concat([
|
|
235
|
-
Buffer.from(FROST_AUTH_DOMAIN, "utf8"),
|
|
236
|
-
Buffer.from(this.#agentPubkeyHex, "hex"),
|
|
237
|
-
Buffer.from(this.#epochId, "utf8"),
|
|
238
|
-
Buffer.from(tail),
|
|
239
|
-
]))
|
|
240
|
-
.digest());
|
|
241
|
-
}
|
|
242
|
-
// The K_local auth signature to attach, or undefined if no signer was threaded — which the enforcing
|
|
243
|
-
// directory then refuses with AUTH_REQUIRED, surfacing an un-threaded path loudly, not silently.
|
|
244
|
-
async #buildAuthSig(tail) {
|
|
245
|
-
if (!this.#signAuth) {
|
|
246
|
-
this.#logger.warn("frost.directory.auth.no_signer", { agent: this.#agentPubkeyHex?.slice(0, 16), epochId: this.#epochId });
|
|
247
|
-
return undefined;
|
|
248
|
-
}
|
|
249
|
-
return this.#signAuth(this.#frostAuthHash(tail));
|
|
250
|
-
}
|
|
251
|
-
/** Open a /cello/frost/1.0.0 stream to this directory node. Used by DKG coordinator. */
|
|
252
|
-
async openStream() {
|
|
253
|
-
return this.#openStream();
|
|
254
|
-
}
|
|
255
|
-
async #openStream() {
|
|
256
|
-
this.#logger.debug("frost.directory.stream.open.attempt", { peerId: this.#directoryPeerId?.slice(0, 16), multiaddr: this.#directoryMultiaddrs[0] });
|
|
257
|
-
try {
|
|
258
|
-
const s = await this.#node.newStream(this.#directoryPeerId, FROST_PROTOCOL_ID);
|
|
259
|
-
this.#logger.debug("frost.directory.stream.open.ok", {});
|
|
260
|
-
return s;
|
|
261
|
-
}
|
|
262
|
-
catch (err1) {
|
|
263
|
-
const msg1 = extractErrorMessage(err1);
|
|
264
|
-
this.#logger.debug("frost.directory.stream.open.retry", { error: msg1 });
|
|
265
|
-
try {
|
|
266
|
-
await this.#node.dial(this.#directoryMultiaddrs[0]);
|
|
267
|
-
this.#logger.debug("frost.directory.stream.dial.ok", {});
|
|
268
|
-
const s = await this.#node.newStream(this.#directoryPeerId, FROST_PROTOCOL_ID);
|
|
269
|
-
this.#logger.debug("frost.directory.stream.open.ok", {});
|
|
270
|
-
return s;
|
|
271
|
-
}
|
|
272
|
-
catch (err2) {
|
|
273
|
-
const msg2 = extractErrorMessage(err2);
|
|
274
|
-
this.#logger.debug("frost.directory.stream.open.failed", { error: msg2 });
|
|
275
|
-
throw err2;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
// ─── DKG round methods on NetworkDirectoryNode ───────────────────────────────
|
|
281
|
-
// These methods are used by runNetworkDkg to execute the 3 DKG rounds
|
|
282
|
-
// over /cello/frost/1.0.0 streams. They are internal to the DKG coordinator flow.
|
|
283
|
-
/**
|
|
284
|
-
* Run DKG round 1 with this directory node.
|
|
285
|
-
* Opens a new stream, sends frost_dkg_round1_request, returns the broadcast.
|
|
286
|
-
*/
|
|
287
|
-
async function dkgRound1WithNode(node, agentPubkeyHex, epochId, signers, preAuthToken) {
|
|
288
|
-
const frame = encodeCbor({
|
|
289
|
-
type: "frost_dkg_round1_request",
|
|
290
|
-
agentPubkey: agentPubkeyHex,
|
|
291
|
-
epochId,
|
|
292
|
-
signers,
|
|
293
|
-
// Include preAuthToken when present.
|
|
294
|
-
...(preAuthToken !== undefined ? { preAuthToken } : {}),
|
|
295
|
-
});
|
|
296
|
-
const stream = await node.openStream();
|
|
297
|
-
try {
|
|
298
|
-
stream.send(lp.encode.single(frame));
|
|
299
|
-
for await (const chunk of lp.decode(stream)) {
|
|
300
|
-
const bytes = chunk instanceof Uint8Array ? chunk : chunk.slice();
|
|
301
|
-
const parsed = parseDkgRound1Response(bytes);
|
|
302
|
-
if (parsed.kind === "invalid")
|
|
303
|
-
throw new Error("dkgRound1: invalid response");
|
|
304
|
-
if (parsed.kind === "preauth_error")
|
|
305
|
-
throw new Error(`dkgRound1 rejected: ${parsed.reason}`);
|
|
306
|
-
const resp = parsed.response;
|
|
307
|
-
if (!resp.ok)
|
|
308
|
-
throw new Error(`dkgRound1 failed: ${resp.reason}`);
|
|
309
|
-
return resp.broadcast;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
finally {
|
|
313
|
-
stream.close().catch(() => { });
|
|
314
|
-
}
|
|
315
|
-
throw new Error("dkgRound1: no response received");
|
|
316
|
-
}
|
|
317
|
-
/**
|
|
318
|
-
* Run DKG round 2 with this directory node.
|
|
319
|
-
* Opens a new stream, sends frost_dkg_round2_request, returns sharesForOthers.
|
|
320
|
-
*/
|
|
321
|
-
async function dkgRound2WithNode(node, agentPubkeyHex, epochId, othersRound1) {
|
|
322
|
-
const frame = encodeCbor({
|
|
323
|
-
type: "frost_dkg_round2_request",
|
|
324
|
-
agentPubkey: agentPubkeyHex,
|
|
325
|
-
epochId,
|
|
326
|
-
othersRound1: othersRound1.map((b) => ({
|
|
327
|
-
identifier: b.identifier,
|
|
328
|
-
commitment: b.commitment,
|
|
329
|
-
proofOfKnowledge: b.proofOfKnowledge,
|
|
330
|
-
})),
|
|
331
|
-
});
|
|
332
|
-
const stream = await node.openStream();
|
|
333
|
-
try {
|
|
334
|
-
stream.send(lp.encode.single(frame));
|
|
335
|
-
for await (const chunk of lp.decode(stream)) {
|
|
336
|
-
const bytes = chunk instanceof Uint8Array ? chunk : chunk.slice();
|
|
337
|
-
const resp = parseDkgRound2Response(bytes);
|
|
338
|
-
if (!resp)
|
|
339
|
-
throw new Error("dkgRound2: invalid response");
|
|
340
|
-
if (!resp.ok)
|
|
341
|
-
throw new Error(`dkgRound2 failed: ${resp.reason}`);
|
|
342
|
-
return resp.sharesForOthers;
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
finally {
|
|
346
|
-
stream.close().catch(() => { });
|
|
347
|
-
}
|
|
348
|
-
throw new Error("dkgRound2: no response received");
|
|
349
|
-
}
|
|
350
|
-
/**
|
|
351
|
-
* Run DKG round 3 with this directory node.
|
|
352
|
-
* Opens a new stream, sends frost_dkg_round3_request, returns shareCommitment.
|
|
353
|
-
*/
|
|
354
|
-
async function dkgRound3WithNode(node, agentPubkeyHex, epochId, sharesForMe, allRound1) {
|
|
355
|
-
const frame = encodeCbor({
|
|
356
|
-
type: "frost_dkg_round3_request",
|
|
357
|
-
agentPubkey: agentPubkeyHex,
|
|
358
|
-
epochId,
|
|
359
|
-
sharesForMe: sharesForMe.map((s) => ({
|
|
360
|
-
identifier: s.signerIdentifier,
|
|
361
|
-
targetIdentifier: s.targetIdentifier,
|
|
362
|
-
signingShare: s.signingShare,
|
|
363
|
-
})),
|
|
364
|
-
allOthersRound1: allRound1.map((b) => ({
|
|
365
|
-
identifier: b.identifier,
|
|
366
|
-
commitment: b.commitment,
|
|
367
|
-
proofOfKnowledge: b.proofOfKnowledge,
|
|
368
|
-
})),
|
|
369
|
-
});
|
|
370
|
-
const stream = await node.openStream();
|
|
371
|
-
try {
|
|
372
|
-
stream.send(lp.encode.single(frame));
|
|
373
|
-
for await (const chunk of lp.decode(stream)) {
|
|
374
|
-
const bytes = chunk instanceof Uint8Array ? chunk : chunk.slice();
|
|
375
|
-
const resp = parseDkgRound3Response(bytes);
|
|
376
|
-
if (!resp)
|
|
377
|
-
throw new Error("dkgRound3: invalid response");
|
|
378
|
-
if (!resp.ok)
|
|
379
|
-
throw new Error(`dkgRound3 failed: ${resp.reason}`);
|
|
380
|
-
return resp.shareCommitment;
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
finally {
|
|
384
|
-
stream.close().catch(() => { });
|
|
385
|
-
}
|
|
386
|
-
throw new Error("dkgRound3: no response received");
|
|
387
|
-
}
|
|
388
|
-
function parseDkgRound1Response(bytes) {
|
|
389
|
-
let obj;
|
|
390
|
-
try {
|
|
391
|
-
obj = cborDecode(bytes);
|
|
392
|
-
}
|
|
393
|
-
catch {
|
|
394
|
-
return { kind: "invalid" };
|
|
395
|
-
}
|
|
396
|
-
if (typeof obj !== "object" || obj === null)
|
|
397
|
-
return { kind: "invalid" };
|
|
398
|
-
const o = obj;
|
|
399
|
-
// preauth_error frames from the directory MUST be surfaced, never dropped as "invalid" — a silently
|
|
400
|
-
// discarded rejection reads to the caller as a malformed frame instead of a refused authorization.
|
|
401
|
-
if (o["type"] === "preauth_error") {
|
|
402
|
-
const reason = typeof o["reason"] === "string" ? o["reason"] : "PRE_AUTH_TOKEN_MISSING";
|
|
403
|
-
return { kind: "preauth_error", reason };
|
|
404
|
-
}
|
|
405
|
-
if (o["type"] !== "frost_dkg_round1_response")
|
|
406
|
-
return { kind: "invalid" };
|
|
407
|
-
if (o["ok"] === true) {
|
|
408
|
-
const raw = o["broadcast"];
|
|
409
|
-
if (typeof raw !== "object" || raw === null)
|
|
410
|
-
return { kind: "invalid" };
|
|
411
|
-
const b = raw;
|
|
412
|
-
const identifier = typeof b["identifier"] === "string" ? b["identifier"] : null;
|
|
413
|
-
const proofOfKnowledge = toU8(b["proofOfKnowledge"]);
|
|
414
|
-
const commitment = parseU8Array(b["commitment"]);
|
|
415
|
-
if (!identifier || !proofOfKnowledge || !commitment)
|
|
416
|
-
return { kind: "invalid" };
|
|
417
|
-
return { kind: "response", response: { type: "frost_dkg_round1_response", ok: true, broadcast: { identifier, commitment, proofOfKnowledge } } };
|
|
418
|
-
}
|
|
419
|
-
const reason = o["reason"];
|
|
420
|
-
if (reason !== "already_in_progress" && reason !== "internal_error")
|
|
421
|
-
return { kind: "invalid" };
|
|
422
|
-
return { kind: "response", response: { type: "frost_dkg_round1_response", ok: false, reason } };
|
|
423
|
-
}
|
|
424
|
-
function parseDkgRound2Response(bytes) {
|
|
425
|
-
let obj;
|
|
426
|
-
try {
|
|
427
|
-
obj = cborDecode(bytes);
|
|
428
|
-
}
|
|
429
|
-
catch {
|
|
430
|
-
return null;
|
|
431
|
-
}
|
|
432
|
-
if (typeof obj !== "object" || obj === null)
|
|
433
|
-
return null;
|
|
434
|
-
const o = obj;
|
|
435
|
-
if (o["type"] !== "frost_dkg_round2_response")
|
|
436
|
-
return null;
|
|
437
|
-
if (o["ok"] === true) {
|
|
438
|
-
const rawShares = o["sharesForOthers"];
|
|
439
|
-
if (!Array.isArray(rawShares))
|
|
440
|
-
return null;
|
|
441
|
-
const sharesForOthers = [];
|
|
442
|
-
for (const item of rawShares) {
|
|
443
|
-
if (typeof item !== "object" || item === null)
|
|
444
|
-
return null;
|
|
445
|
-
const s = item;
|
|
446
|
-
// Accept both "signerIdentifier" (protocol-types canonical) and "identifier" (new wire)
|
|
447
|
-
const signerIdentifier = typeof s["signerIdentifier"] === "string" ? s["signerIdentifier"] :
|
|
448
|
-
typeof s["identifier"] === "string" ? s["identifier"] : null;
|
|
449
|
-
const targetIdentifier = typeof s["targetIdentifier"] === "string" ? s["targetIdentifier"] : null;
|
|
450
|
-
const signingShare = toU8(s["signingShare"]);
|
|
451
|
-
if (!signerIdentifier || !targetIdentifier || !signingShare)
|
|
452
|
-
return null;
|
|
453
|
-
sharesForOthers.push({ signerIdentifier, targetIdentifier, signingShare });
|
|
454
|
-
}
|
|
455
|
-
return { type: "frost_dkg_round2_response", ok: true, sharesForOthers };
|
|
456
|
-
}
|
|
457
|
-
const reason = o["reason"];
|
|
458
|
-
if (reason !== "round1_not_complete" && reason !== "verification_failed" && reason !== "internal_error")
|
|
459
|
-
return null;
|
|
460
|
-
return { type: "frost_dkg_round2_response", ok: false, reason };
|
|
461
|
-
}
|
|
462
|
-
function parseDkgRound3Response(bytes) {
|
|
463
|
-
let obj;
|
|
464
|
-
try {
|
|
465
|
-
obj = cborDecode(bytes);
|
|
466
|
-
}
|
|
467
|
-
catch {
|
|
468
|
-
return null;
|
|
469
|
-
}
|
|
470
|
-
if (typeof obj !== "object" || obj === null)
|
|
471
|
-
return null;
|
|
472
|
-
const o = obj;
|
|
473
|
-
if (o["type"] !== "frost_dkg_round3_response")
|
|
474
|
-
return null;
|
|
475
|
-
if (o["ok"] === true) {
|
|
476
|
-
const sc = o["shareCommitment"];
|
|
477
|
-
// shareCommitment comes as raw bytes (CBOR-encoded Uint8Array)
|
|
478
|
-
const shareCommitment = typeof sc === "string"
|
|
479
|
-
? new Uint8Array(Buffer.from(sc, "hex"))
|
|
480
|
-
: sc instanceof Uint8Array ? sc
|
|
481
|
-
: Buffer.isBuffer(sc) ? new Uint8Array(sc)
|
|
482
|
-
: null;
|
|
483
|
-
if (!shareCommitment || shareCommitment.length !== 32)
|
|
484
|
-
return null;
|
|
485
|
-
return { type: "frost_dkg_round3_response", ok: true, shareCommitment };
|
|
486
|
-
}
|
|
487
|
-
const reason = o["reason"];
|
|
488
|
-
if (reason !== "round2_not_complete" && reason !== "share_verification_failed" && reason !== "internal_error")
|
|
489
|
-
return null;
|
|
490
|
-
return { type: "frost_dkg_round3_response", ok: false, reason };
|
|
491
|
-
}
|
|
492
|
-
function toU8(v) {
|
|
493
|
-
if (v instanceof Uint8Array)
|
|
494
|
-
return v;
|
|
495
|
-
if (Buffer.isBuffer(v))
|
|
496
|
-
return new Uint8Array(v);
|
|
497
|
-
return null;
|
|
498
|
-
}
|
|
499
|
-
function parseU8Array(v) {
|
|
500
|
-
if (!Array.isArray(v))
|
|
501
|
-
return null;
|
|
502
|
-
const result = [];
|
|
503
|
-
for (const item of v) {
|
|
504
|
-
const b = toU8(item);
|
|
505
|
-
if (!b)
|
|
506
|
-
return null;
|
|
507
|
-
result.push(b);
|
|
508
|
-
}
|
|
509
|
-
return result;
|
|
510
|
-
}
|
|
511
|
-
// ─── runNetworkDkg ─────────────────────────────────────────────────────────────
|
|
512
|
-
/**
|
|
513
|
-
* Run a real 3-round FROST DKG ceremony with directory nodes over /cello/frost/1.0.0.
|
|
514
|
-
*
|
|
515
|
-
* Production path for key establishment. The client acts as DKG coordinator:
|
|
516
|
-
* Round 1: All nodes generate their secret polynomials. Client does the same.
|
|
517
|
-
* Round 2: Client collects all round1 broadcasts and distributes them to all nodes.
|
|
518
|
-
* All nodes compute shares for every other participant.
|
|
519
|
-
* Round 3: Client routes round2 shares to recipients and all nodes finalize.
|
|
520
|
-
* All nodes return shareCommitment = group public key.
|
|
521
|
-
*
|
|
522
|
-
* Validates that all nodes derive the same primary_pubkey before returning.
|
|
523
|
-
*
|
|
524
|
-
* After a successful DKG:
|
|
525
|
-
* - Each directory node has its FrostSecret stored (via dkgRound3)
|
|
526
|
-
* - The client's local share is stored via storeDkgResult
|
|
527
|
-
* - Returns a FrostThresholdSigner for future signing ceremonies
|
|
528
|
-
*
|
|
529
|
-
* Crypto reference: RFC 9591 (FROST DKG)
|
|
530
|
-
*
|
|
531
|
-
* @param agentPubkey - client's Ed25519 K_local public key (32 bytes)
|
|
532
|
-
* @param opts.threshold - minimum signers required (t in t-of-n)
|
|
533
|
-
* @param opts.directoryNodes - the n directory nodes (each will hold a share)
|
|
534
|
-
*/
|
|
535
|
-
/**
|
|
536
|
-
* Refuse a DKG whose participants do not hold DISTINCT FROST identifiers.
|
|
537
|
-
*
|
|
538
|
-
* A node's identifier is derived from its OWN deployed `NODE_ID`, not from the manifest entry naming
|
|
539
|
-
* it — so two entries with distinct nodeIds, deployed on boxes that share one `NODE_ID`, collide here
|
|
540
|
-
* and pass every string comparison in the consortium. Two participants sharing an identifier are ONE
|
|
541
|
-
* participant, so the quorum is smaller than it looks.
|
|
542
|
-
*
|
|
543
|
-
* `DKG.round2` does reject this (`@noble/curves` throws `Duplicate id=…`), so the value here is
|
|
544
|
-
* DIAGNOSIS, not detection: that throw arrives from inside a crypto library and has to survive every
|
|
545
|
-
* catch between there and the operator — one of which was discarding it entirely until recently.
|
|
546
|
-
* Refusing here names the cause while the participant list is still in hand.
|
|
547
|
-
*
|
|
548
|
-
* Exported for test: the call site can only be reached through a live multi-node DKG, so the logic is
|
|
549
|
-
* proven here and its PLACEMENT (before round 2, and before the share-routing map that would silently
|
|
550
|
-
* merge two colliding participants' shares) is a review property.
|
|
551
|
-
*
|
|
552
|
-
* @param identifiers round-1 identifiers, in participant order
|
|
553
|
-
* @param describe names participant `i` for the message — index 0 is the client
|
|
554
|
-
*/
|
|
555
|
-
export function assertDistinctFrostIdentifiers(identifiers, describe) {
|
|
556
|
-
const seen = new Map();
|
|
557
|
-
for (let i = 0; i < identifiers.length; i++) {
|
|
558
|
-
const id = identifiers[i];
|
|
559
|
-
const prev = seen.get(id);
|
|
560
|
-
if (prev !== undefined) {
|
|
561
|
-
throw new Error(`DKG round 1 produced a DUPLICATE FROST identifier: ${describe(prev)} and ${describe(i)} both ` +
|
|
562
|
-
`derived ${id.slice(0, 24)}… — two participants sharing one identifier are one participant, ` +
|
|
563
|
-
`so the quorum is smaller than it looks. Most likely two directory nodes are deployed with ` +
|
|
564
|
-
`the same NODE_ID.`);
|
|
565
|
-
}
|
|
566
|
-
seen.set(id, i);
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
export async function runNetworkDkg(agentPubkey, opts) {
|
|
570
|
-
const agentPubkeyHex = Buffer.from(agentPubkey).toString("hex");
|
|
571
|
-
// Client identifier: same derivation as used in bootstrapKeyShares for consistency
|
|
572
|
-
const clientIdStr = `client:${agentPubkeyHex}`;
|
|
573
|
-
const clientIdentifier = ed25519_FROST.Identifier.derive(clientIdStr);
|
|
574
|
-
const epochId = `${agentPubkeyHex}:epoch:1`;
|
|
575
|
-
// Total participants = directory nodes + 1 (client)
|
|
576
|
-
// threshold is the signing threshold (t-of-n where n = directoryNodes.length + 1)
|
|
577
|
-
const signers = { min: opts.threshold, max: opts.participants + 1 };
|
|
578
|
-
// ─── Round 1 ────────────────────────────────────────────────────────────────
|
|
579
|
-
// Client runs DKG.round1 locally; all directory nodes run round1 via streams.
|
|
580
|
-
// RFC 9591 §5.1
|
|
581
|
-
const clientR1 = ed25519_FROST.DKG.round1(clientIdentifier, signers);
|
|
582
|
-
const clientRound1Broadcast = {
|
|
583
|
-
identifier: clientR1.public.identifier,
|
|
584
|
-
commitment: clientR1.public.commitment.map((c) => new Uint8Array(c)),
|
|
585
|
-
proofOfKnowledge: new Uint8Array(clientR1.public.proofOfKnowledge),
|
|
586
|
-
};
|
|
587
|
-
// Directory nodes run round1 in parallel
|
|
588
|
-
const nodeRound1Broadcasts = await Promise.all(opts.directoryNodes.map((node) => dkgRound1WithNode(node, agentPubkeyHex, epochId, signers, opts.preAuthToken)));
|
|
589
|
-
// allRound1 = client + all directory node broadcasts
|
|
590
|
-
const allRound1 = [clientRound1Broadcast, ...nodeRound1Broadcasts];
|
|
591
|
-
// DOD-INV-NODEID, checked here because this is the first point where the identifiers ACTUALLY in
|
|
592
|
-
// play are visible — every check upstream compares manifest nodeId STRINGS. See
|
|
593
|
-
// `assertDistinctFrostIdentifiers`.
|
|
594
|
-
assertDistinctFrostIdentifiers(allRound1.map((b) => b.identifier), (idx) => (idx === 0 ? "the client" : `directory node ${opts.directoryNodes[idx - 1]?.id ?? idx}`));
|
|
595
|
-
// ─── Round 2 ────────────────────────────────────────────────────────────────
|
|
596
|
-
// Client runs DKG.round2 locally (receives others' round1 → generates shares for others).
|
|
597
|
-
// All directory nodes run round2 in parallel.
|
|
598
|
-
// RFC 9591 §5.2
|
|
599
|
-
// For the client, othersRound1 = all directory nodes' broadcasts
|
|
600
|
-
const clientOthersRound1 = nodeRound1Broadcasts.map((b) => ({
|
|
601
|
-
identifier: b.identifier,
|
|
602
|
-
commitment: b.commitment.map((c) => new Uint8Array(c)),
|
|
603
|
-
proofOfKnowledge: new Uint8Array(b.proofOfKnowledge),
|
|
604
|
-
}));
|
|
605
|
-
const clientR2 = ed25519_FROST.DKG.round2(clientR1.secret, clientOthersRound1);
|
|
606
|
-
// For each directory node, othersRound1 = all other participants EXCEPT that node itself
|
|
607
|
-
const nodeRound2Results = await Promise.all(opts.directoryNodes.map((node, i) => {
|
|
608
|
-
// Each node receives round1 from everyone EXCEPT itself
|
|
609
|
-
const othersForNode = allRound1.filter((_, j) => j !== i + 1 // i+1 because index 0 is the client
|
|
610
|
-
);
|
|
611
|
-
return dkgRound2WithNode(node, agentPubkeyHex, epochId, othersForNode);
|
|
612
|
-
}));
|
|
613
|
-
// ─── Route round2 shares ─────────────────────────────────────────────────────
|
|
614
|
-
// Collect all shares (client-generated + node-generated), route to recipients.
|
|
615
|
-
// Each participant needs shares from all OTHER participants.
|
|
616
|
-
// sharesForClient: shares where targetIdentifier === clientIdentifier
|
|
617
|
-
// sharesForNode[i]: shares where targetIdentifier === nodeRound1Broadcasts[i].identifier
|
|
618
|
-
// Build a map: targetIdentifier → accumulated DkgRound2Share[]
|
|
619
|
-
const sharesForAll = new Map();
|
|
620
|
-
// Add client's shares (for each directory node)
|
|
621
|
-
const clientSharesRecord = clientR2;
|
|
622
|
-
for (const [targetId, share] of Object.entries(clientSharesRecord)) {
|
|
623
|
-
const shares = sharesForAll.get(targetId) ?? [];
|
|
624
|
-
shares.push({
|
|
625
|
-
signerIdentifier: clientIdentifier,
|
|
626
|
-
targetIdentifier: targetId,
|
|
627
|
-
signingShare: new Uint8Array(share.signingShare),
|
|
628
|
-
});
|
|
629
|
-
sharesForAll.set(targetId, shares);
|
|
630
|
-
}
|
|
631
|
-
// Add directory node shares (for client and other directory nodes)
|
|
632
|
-
for (const nodeShares of nodeRound2Results) {
|
|
633
|
-
for (const share of nodeShares) {
|
|
634
|
-
const shares = sharesForAll.get(share.targetIdentifier) ?? [];
|
|
635
|
-
shares.push(share);
|
|
636
|
-
sharesForAll.set(share.targetIdentifier, shares);
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
// ─── Round 3 ────────────────────────────────────────────────────────────────
|
|
640
|
-
// Client runs DKG.round3 locally.
|
|
641
|
-
// All directory nodes run round3 in parallel.
|
|
642
|
-
// RFC 9591 §5.3
|
|
643
|
-
// Client's round3: receives shares addressed to clientIdentifier
|
|
644
|
-
const clientSharesForMe = (sharesForAll.get(clientIdentifier) ?? []).map((s) => ({
|
|
645
|
-
identifier: s.signerIdentifier, // SENDER's identifier (for round3 matching)
|
|
646
|
-
signingShare: new Uint8Array(s.signingShare),
|
|
647
|
-
}));
|
|
648
|
-
const clientKey = ed25519_FROST.DKG.round3(clientR1.secret, clientOthersRound1, clientSharesForMe);
|
|
649
|
-
// Directory nodes' round3: parallel
|
|
650
|
-
const nodeCommitments = await Promise.all(opts.directoryNodes.map((node, i) => {
|
|
651
|
-
const nodeId = nodeRound1Broadcasts[i].identifier;
|
|
652
|
-
const nodeSharesForMe = sharesForAll.get(nodeId) ?? [];
|
|
653
|
-
const allOthersForNode = allRound1.filter((_, j) => j !== i + 1);
|
|
654
|
-
return dkgRound3WithNode(node, agentPubkeyHex, epochId, nodeSharesForMe, allOthersForNode);
|
|
655
|
-
}));
|
|
656
|
-
// ─── Verify all nodes agree on primary_pubkey ─────────────────────────────
|
|
657
|
-
const primaryPubkey = new Uint8Array(clientKey.public.commitments[0]);
|
|
658
|
-
const primaryPubkeyHex = Buffer.from(primaryPubkey).toString("hex");
|
|
659
|
-
for (const nodeCommitment of nodeCommitments) {
|
|
660
|
-
const nodeHex = Buffer.from(nodeCommitment).toString("hex");
|
|
661
|
-
if (nodeHex !== primaryPubkeyHex) {
|
|
662
|
-
// Clean up client secret to avoid leaking state
|
|
663
|
-
try {
|
|
664
|
-
ed25519_FROST.DKG.clean(clientR1.secret);
|
|
665
|
-
}
|
|
666
|
-
catch { /* ignore */ }
|
|
667
|
-
throw new Error(`DKG failed: node commitment ${nodeHex.slice(0, 16)}… does not match client primary_pubkey ${primaryPubkeyHex.slice(0, 16)}…`);
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
// ─── Store client's local DKG share ──────────────────────────────────────
|
|
671
|
-
// storeDkgResult is the production key storage path (no NODE_ENV guard).
|
|
672
|
-
storeDkgResult(agentPubkeyHex, clientKey.secret, clientKey.public);
|
|
673
|
-
// Clean up DKG secret now that it's been safely stored
|
|
674
|
-
try {
|
|
675
|
-
ed25519_FROST.DKG.clean(clientR1.secret);
|
|
676
|
-
}
|
|
677
|
-
catch { /* ignore */ }
|
|
678
|
-
// Set signing context on each directory node so generateCommitment/signRound can
|
|
679
|
-
// identify which agent's share to use in future FROST signing ceremonies. The K_local signer MUST be
|
|
680
|
-
// threaded here so the DKG-time and later signing requests carry a valid auth.
|
|
681
|
-
for (const node of opts.directoryNodes) {
|
|
682
|
-
node.setBootstrapContext(agentPubkeyHex, epochId, opts.signAuth);
|
|
683
|
-
}
|
|
684
|
-
// ─── Build FrostThresholdSigner ───────────────────────────────────────────
|
|
685
|
-
const signer = new FrostThresholdSigner({
|
|
686
|
-
threshold: opts.threshold,
|
|
687
|
-
participants: opts.participants,
|
|
688
|
-
directoryNodeStubs: opts.directoryNodes,
|
|
689
|
-
}, agentPubkey);
|
|
690
|
-
// Extract serializable FROST share data for DB persistence. NEVER log signingShare.
|
|
691
|
-
const serializedSecret = clientKey.secret;
|
|
692
|
-
const serializedPub = clientKey.public;
|
|
693
|
-
return {
|
|
694
|
-
signer,
|
|
695
|
-
primaryPubkey,
|
|
696
|
-
signingShare: new Uint8Array(serializedSecret.signingShare),
|
|
697
|
-
identifier: serializedSecret.identifier,
|
|
698
|
-
commitments: serializedPub.commitments.map((c) => new Uint8Array(c)),
|
|
699
|
-
verifyingShares: Object.fromEntries(Object.entries(serializedPub.verifyingShares).map(([k, v]) => [k, new Uint8Array(v)])),
|
|
700
|
-
threshold: opts.threshold,
|
|
701
|
-
participants: opts.participants,
|
|
702
|
-
};
|
|
703
|
-
}
|
|
704
|
-
// ─── Proactive share resharing (PSS) orchestration ─────────
|
|
705
|
-
// A client-coordinated 2-round refresh that rotates every shareholder's share to a new epoch while keeping
|
|
706
|
-
// the group public key unchanged (frost-resharing.ts). The client is the UNIFORM RELAY: it collects one
|
|
707
|
-
// contribution per node (round 1) and distributes the agreed set — narrowed to each node's own sub-share
|
|
708
|
-
// (round 2) — so a directory cannot equivocate and a node never sees another party's sub-shares.
|
|
709
|
-
async function refreshRound1WithNode(node, agentPubkeyHex, fromEpochId, toEpochId, signers, participantIds) {
|
|
710
|
-
const frame = encodeCbor({
|
|
711
|
-
type: "frost_refresh_round1_request",
|
|
712
|
-
agentPubkey: agentPubkeyHex,
|
|
713
|
-
fromEpochId,
|
|
714
|
-
toEpochId,
|
|
715
|
-
signers,
|
|
716
|
-
participantIds,
|
|
717
|
-
});
|
|
718
|
-
const stream = await node.openStream();
|
|
719
|
-
try {
|
|
720
|
-
stream.send(lp.encode.single(frame));
|
|
721
|
-
for await (const chunk of lp.decode(stream)) {
|
|
722
|
-
const bytes = chunk instanceof Uint8Array ? chunk : chunk.slice();
|
|
723
|
-
const resp = cborDecode(bytes);
|
|
724
|
-
if (resp.type !== "frost_refresh_round1_response")
|
|
725
|
-
throw new Error("refreshRound1: invalid response");
|
|
726
|
-
if (!resp.ok)
|
|
727
|
-
throw new Error(`refreshRound1 failed: ${resp.reason}`);
|
|
728
|
-
return resp.contribution;
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
finally {
|
|
732
|
-
stream.close().catch(() => { });
|
|
733
|
-
}
|
|
734
|
-
throw new Error("refreshRound1: no response received");
|
|
735
|
-
}
|
|
736
|
-
async function refreshRound2WithNode(node, agentPubkeyHex, fromEpochId, toEpochId, signers, participantIds, contributions) {
|
|
737
|
-
const frame = encodeCbor({
|
|
738
|
-
type: "frost_refresh_round2_request",
|
|
739
|
-
agentPubkey: agentPubkeyHex,
|
|
740
|
-
fromEpochId,
|
|
741
|
-
toEpochId,
|
|
742
|
-
signers,
|
|
743
|
-
participantIds,
|
|
744
|
-
contributions,
|
|
745
|
-
});
|
|
746
|
-
const stream = await node.openStream();
|
|
747
|
-
try {
|
|
748
|
-
stream.send(lp.encode.single(frame));
|
|
749
|
-
for await (const chunk of lp.decode(stream)) {
|
|
750
|
-
const bytes = chunk instanceof Uint8Array ? chunk : chunk.slice();
|
|
751
|
-
const resp = cborDecode(bytes);
|
|
752
|
-
if (resp.type !== "frost_refresh_round2_response")
|
|
753
|
-
throw new Error("refreshRound2: invalid response");
|
|
754
|
-
if (!resp.ok)
|
|
755
|
-
throw new Error(`refreshRound2 failed: ${resp.reason}`);
|
|
756
|
-
return new Uint8Array(resp.shareCommitment);
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
finally {
|
|
760
|
-
stream.close().catch(() => { });
|
|
761
|
-
}
|
|
762
|
-
throw new Error("refreshRound2: no response received");
|
|
763
|
-
}
|
|
764
|
-
/**
|
|
765
|
-
* Run a proactive share refresh across the consortium. Rotates the client's + every directory node's share
|
|
766
|
-
* from epoch `fromEpochN` to `fromEpochN + 1`, leaving the group public key byte-identical. Verifies every
|
|
767
|
-
* party reports the same (unchanged) group key before returning the client's serializable new-epoch share.
|
|
768
|
-
*/
|
|
769
|
-
export async function runNetworkRefresh(agentPubkey, opts) {
|
|
770
|
-
const agentPubkeyHex = Buffer.from(agentPubkey).toString("hex");
|
|
771
|
-
const fromEpochId = `${agentPubkeyHex}:epoch:${opts.fromEpochN}`;
|
|
772
|
-
const toEpochN = opts.fromEpochN + 1;
|
|
773
|
-
const toEpochId = `${agentPubkeyHex}:epoch:${toEpochN}`;
|
|
774
|
-
const signers = { min: opts.threshold, max: opts.participants + 1 };
|
|
775
|
-
const participantIds = getClientRefreshRoster(agentPubkeyHex);
|
|
776
|
-
// ─── Round 1: collect one contribution per participant ───
|
|
777
|
-
const nodeContributions = await Promise.all(opts.directoryNodes.map((node) => refreshRound1WithNode(node, agentPubkeyHex, fromEpochId, toEpochId, signers, participantIds)));
|
|
778
|
-
const clientContribution = generateClientRefreshContribution(agentPubkeyHex, signers, participantIds);
|
|
779
|
-
const allContributions = [clientContribution, ...nodeContributions];
|
|
780
|
-
// ─── Round 2: each node applies; narrow each contribution's subShares to that node's own entry ───
|
|
781
|
-
const clientId = getClientFrostIdentifier(agentPubkeyHex);
|
|
782
|
-
const narrowFor = (recipientId) => allContributions.map((c) => ({
|
|
783
|
-
fromId: c.fromId,
|
|
784
|
-
commitment: c.commitment,
|
|
785
|
-
subShares: { [recipientId]: c.subShares[recipientId] },
|
|
786
|
-
}));
|
|
787
|
-
const nodeCommitments = await Promise.all(opts.directoryNodes.map((node, idx) => refreshRound2WithNode(node, agentPubkeyHex, fromEpochId, toEpochId, signers, participantIds, narrowFor(nodeContributions[idx].fromId))));
|
|
788
|
-
// Client applies its own refresh (rotates _localShares in-package).
|
|
789
|
-
const clientResult = applyRefreshToLocalShare(agentPubkeyHex, narrowFor(clientId), signers, participantIds);
|
|
790
|
-
// ─── Verify all parties agree on the (unchanged) group key ───
|
|
791
|
-
const primaryPubkeyHex = Buffer.from(clientResult.primaryPubkey).toString("hex");
|
|
792
|
-
for (const nc of nodeCommitments) {
|
|
793
|
-
if (Buffer.from(nc).toString("hex") !== primaryPubkeyHex) {
|
|
794
|
-
throw new Error("Refresh failed: a directory node's post-refresh group key does not match the client's");
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
// Advance every node's signing context to the new epoch.
|
|
798
|
-
for (const node of opts.directoryNodes) {
|
|
799
|
-
node.setBootstrapContext(agentPubkeyHex, toEpochId, opts.signAuth); // SEC-2
|
|
800
|
-
}
|
|
801
|
-
return {
|
|
802
|
-
toEpochN,
|
|
803
|
-
primaryPubkey: clientResult.primaryPubkey,
|
|
804
|
-
signingShare: clientResult.signingShare,
|
|
805
|
-
identifier: clientResult.identifier,
|
|
806
|
-
commitments: clientResult.commitments,
|
|
807
|
-
verifyingShares: clientResult.verifyingShares,
|
|
808
|
-
};
|
|
809
|
-
}
|
|
810
|
-
//# sourceMappingURL=network-directory-node.js.map
|