@open-e2ee/signal-protocol-sdk 14.0.0 → 14.2.0
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/ADAPTERS.md +5 -5
- package/ARCHITECTURE.md +1 -1
- package/CHANGELOG.md +461 -0
- package/README.md +21 -15
- package/SECURITY.md +2 -2
- package/TROUBLESHOOTING.md +1 -1
- package/client/README.md +35 -22
- package/device/README.md +5 -5
- package/dist/client/client.d.ts +44 -34
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +221 -146
- package/dist/client/client.js.map +1 -1
- package/dist/client/compose.d.ts +7 -5
- package/dist/client/compose.d.ts.map +1 -1
- package/dist/client/compose.js +7 -2
- package/dist/client/compose.js.map +1 -1
- package/dist/client/config.d.ts +23 -14
- package/dist/client/config.d.ts.map +1 -1
- package/dist/client/config.js.map +1 -1
- package/dist/client/content-adapter.d.ts +9 -0
- package/dist/client/content-adapter.d.ts.map +1 -1
- package/dist/client/content-adapter.js +6 -0
- package/dist/client/content-adapter.js.map +1 -1
- package/dist/client/delivery-status.d.ts +2 -2
- package/dist/client/delivery-status.d.ts.map +1 -1
- package/dist/client/delivery-status.js +10 -4
- package/dist/client/delivery-status.js.map +1 -1
- package/dist/client/device-set-reconciliation.d.ts +24 -16
- package/dist/client/device-set-reconciliation.d.ts.map +1 -1
- package/dist/client/device-set-reconciliation.js +17 -14
- package/dist/client/device-set-reconciliation.js.map +1 -1
- package/dist/client/event-hooks.d.ts +22 -7
- package/dist/client/event-hooks.d.ts.map +1 -1
- package/dist/client/event-hooks.js +35 -5
- package/dist/client/event-hooks.js.map +1 -1
- package/dist/client/group-device-set.d.ts +1 -1
- package/dist/client/group-device-set.d.ts.map +1 -1
- package/dist/client/group-key-sync.js +1 -1
- package/dist/client/group-key-sync.js.map +1 -1
- package/dist/client/group-outbox.d.ts +7 -7
- package/dist/client/group-outbox.d.ts.map +1 -1
- package/dist/client/group-outbox.js +24 -24
- package/dist/client/group-outbox.js.map +1 -1
- package/dist/client/group-sealed-sender.d.ts +1 -1
- package/dist/client/group-sealed-sender.d.ts.map +1 -1
- package/dist/client/group-sender-key-operations.js +1 -1
- package/dist/client/group-sender-key-operations.js.map +1 -1
- package/dist/client/headless.d.ts +6 -6
- package/dist/client/headless.d.ts.map +1 -1
- package/dist/client/headless.js +7 -7
- package/dist/client/headless.js.map +1 -1
- package/dist/client/hosted-anonymous-delivery.d.ts +18 -6
- package/dist/client/hosted-anonymous-delivery.d.ts.map +1 -1
- package/dist/client/hosted-anonymous-delivery.js +63 -20
- package/dist/client/hosted-anonymous-delivery.js.map +1 -1
- package/dist/client/hosted-assertion-id.d.ts +1 -1
- package/dist/client/hosted-assertion-id.d.ts.map +1 -1
- package/dist/client/hosted-assertion-id.js +1 -1
- package/dist/client/hosted-assertion-id.js.map +1 -1
- package/dist/client/hosted-connection.d.ts +5 -5
- package/dist/client/hosted-connection.d.ts.map +1 -1
- package/dist/client/hosted-connection.js +32 -32
- package/dist/client/hosted-connection.js.map +1 -1
- package/dist/client/hosted-device-link-transport.d.ts +2 -2
- package/dist/client/hosted-device-link-transport.d.ts.map +1 -1
- package/dist/client/hosted-device-link-transport.js +1 -1
- package/dist/client/hosted-device-link-transport.js.map +1 -1
- package/dist/client/hosted-device-link.d.ts +5 -1
- package/dist/client/hosted-device-link.d.ts.map +1 -1
- package/dist/client/hosted-device-link.js +7 -4
- package/dist/client/hosted-device-link.js.map +1 -1
- package/dist/client/hosted-device-standing.d.ts +13 -5
- package/dist/client/hosted-device-standing.d.ts.map +1 -1
- package/dist/client/hosted-device-standing.js +11 -6
- package/dist/client/hosted-device-standing.js.map +1 -1
- package/dist/client/hosted-group-authority.d.ts +2 -2
- package/dist/client/hosted-group-authority.d.ts.map +1 -1
- package/dist/client/hosted-group-authority.js +8 -8
- package/dist/client/hosted-group-authority.js.map +1 -1
- package/dist/client/hosted-groups.d.ts +4 -4
- package/dist/client/hosted-groups.d.ts.map +1 -1
- package/dist/client/hosted-groups.js +8 -8
- package/dist/client/hosted-groups.js.map +1 -1
- package/dist/client/hosted-http-error.d.ts +8 -4
- package/dist/client/hosted-http-error.d.ts.map +1 -1
- package/dist/client/hosted-http-error.js +7 -4
- package/dist/client/hosted-http-error.js.map +1 -1
- package/dist/client/hosted-mailbox-subscription.d.ts +16 -15
- package/dist/client/hosted-mailbox-subscription.d.ts.map +1 -1
- package/dist/client/hosted-mailbox-subscription.js +21 -25
- package/dist/client/hosted-mailbox-subscription.js.map +1 -1
- package/dist/client/hosted-prekey-publication.d.ts +9 -9
- package/dist/client/hosted-prekey-publication.d.ts.map +1 -1
- package/dist/client/hosted-prekey-publication.js.map +1 -1
- package/dist/client/hosted-presence-frames.d.ts +62 -38
- package/dist/client/hosted-presence-frames.d.ts.map +1 -1
- package/dist/client/hosted-presence-frames.js +4 -2
- package/dist/client/hosted-presence-frames.js.map +1 -1
- package/dist/client/hosted-presence.d.ts +22 -14
- package/dist/client/hosted-presence.d.ts.map +1 -1
- package/dist/client/hosted-presence.js +26 -17
- package/dist/client/hosted-presence.js.map +1 -1
- package/dist/client/hosted-profile-keys.d.ts +3 -1
- package/dist/client/hosted-profile-keys.d.ts.map +1 -1
- package/dist/client/hosted-profile-keys.js +19 -15
- package/dist/client/hosted-profile-keys.js.map +1 -1
- package/dist/client/hosted-push.d.ts +38 -16
- package/dist/client/hosted-push.d.ts.map +1 -1
- package/dist/client/hosted-push.js +11 -5
- package/dist/client/hosted-push.js.map +1 -1
- package/dist/client/hosted-resume-error.d.ts +21 -9
- package/dist/client/hosted-resume-error.d.ts.map +1 -1
- package/dist/client/hosted-resume-error.js +4 -1
- package/dist/client/hosted-resume-error.js.map +1 -1
- package/dist/client/hosted-resume.d.ts +3 -3
- package/dist/client/hosted-resume.d.ts.map +1 -1
- package/dist/client/hosted-resume.js +12 -12
- package/dist/client/hosted-resume.js.map +1 -1
- package/dist/client/hosted-sandbox-identity.d.ts +82 -5
- package/dist/client/hosted-sandbox-identity.d.ts.map +1 -1
- package/dist/client/hosted-sandbox-identity.js +160 -50
- package/dist/client/hosted-sandbox-identity.js.map +1 -1
- package/dist/client/hosted-store-records.d.ts +46 -0
- package/dist/client/hosted-store-records.d.ts.map +1 -0
- package/dist/client/hosted-store-records.js +32 -0
- package/dist/client/hosted-store-records.js.map +1 -0
- package/dist/client/hosted-transport.d.ts +53 -33
- package/dist/client/hosted-transport.d.ts.map +1 -1
- package/dist/client/hosted-transport.js +225 -138
- package/dist/client/hosted-transport.js.map +1 -1
- package/dist/client/hosted-trust.d.ts +1 -1
- package/dist/client/hosted-trust.d.ts.map +1 -1
- package/dist/client/hosted-trust.js +1 -1
- package/dist/client/hosted-trust.js.map +1 -1
- package/dist/client/hosted.d.ts +144 -75
- package/dist/client/hosted.d.ts.map +1 -1
- package/dist/client/hosted.js +106 -61
- package/dist/client/hosted.js.map +1 -1
- package/dist/client/index.d.ts +4 -4
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +4 -4
- package/dist/client/index.js.map +1 -1
- package/dist/client/key-rotation-core.d.ts +4 -4
- package/dist/client/key-rotation-core.d.ts.map +1 -1
- package/dist/client/key-rotation-core.js +8 -8
- package/dist/client/key-rotation-core.js.map +1 -1
- package/dist/client/key-rotation.js +2 -2
- package/dist/client/key-rotation.js.map +1 -1
- package/dist/client/messages.d.ts +3 -3
- package/dist/client/messages.d.ts.map +1 -1
- package/dist/client/messages.js +18 -18
- package/dist/client/messages.js.map +1 -1
- package/dist/client/one-time-prekey-refill.d.ts +1 -1
- package/dist/client/one-time-prekey-refill.d.ts.map +1 -1
- package/dist/client/prekeys.js +17 -17
- package/dist/client/prekeys.js.map +1 -1
- package/dist/client/receive-queue.d.ts +4 -4
- package/dist/client/receive-queue.d.ts.map +1 -1
- package/dist/client/receive-queue.js +29 -29
- package/dist/client/receive-queue.js.map +1 -1
- package/dist/client/receive-work-seed.d.ts +6 -2
- package/dist/client/receive-work-seed.d.ts.map +1 -1
- package/dist/client/receive-work-seed.js.map +1 -1
- package/dist/client/recovery-driver.js +7 -7
- package/dist/client/recovery-driver.js.map +1 -1
- package/dist/client/retry-request-envelope.d.ts +3 -3
- package/dist/client/retry-request-envelope.d.ts.map +1 -1
- package/dist/client/retry-request-envelope.js +10 -10
- package/dist/client/retry-request-envelope.js.map +1 -1
- package/dist/client/retry-request-lifecycle.d.ts +1 -1
- package/dist/client/retry-request-lifecycle.d.ts.map +1 -1
- package/dist/client/retry-request-lifecycle.js +8 -8
- package/dist/client/retry-request-lifecycle.js.map +1 -1
- package/dist/client/retry-terminal-recovery.js +2 -2
- package/dist/client/retry-terminal-recovery.js.map +1 -1
- package/dist/client/retry.js +13 -13
- package/dist/client/retry.js.map +1 -1
- package/dist/client/sealed-sender.d.ts +13 -4
- package/dist/client/sealed-sender.d.ts.map +1 -1
- package/dist/client/sealed-sender.js +27 -15
- package/dist/client/sealed-sender.js.map +1 -1
- package/dist/client/send-deadline.d.ts +8 -7
- package/dist/client/send-deadline.d.ts.map +1 -1
- package/dist/client/send-deadline.js +41 -23
- package/dist/client/send-deadline.js.map +1 -1
- package/dist/client/send-intent-driver.js +9 -9
- package/dist/client/send-intent-driver.js.map +1 -1
- package/dist/client/sessions.js +11 -11
- package/dist/client/sessions.js.map +1 -1
- package/dist/client/{relay-acceptance.d.ts → signal-relay-acceptance.d.ts} +9 -9
- package/dist/client/signal-relay-acceptance.d.ts.map +1 -0
- package/dist/client/{relay-acceptance.js → signal-relay-acceptance.js} +7 -7
- package/dist/client/signal-relay-acceptance.js.map +1 -0
- package/dist/client/{relay-device-refusal.d.ts → signal-relay-device-refusal.d.ts} +7 -7
- package/dist/client/signal-relay-device-refusal.d.ts.map +1 -0
- package/dist/client/{relay-device-refusal.js → signal-relay-device-refusal.js} +9 -9
- package/dist/client/signal-relay-device-refusal.js.map +1 -0
- package/dist/client/{relay-lifecycle.d.ts → signal-relay-lifecycle.d.ts} +21 -11
- package/dist/client/signal-relay-lifecycle.d.ts.map +1 -0
- package/dist/client/{relay-lifecycle.js → signal-relay-lifecycle.js} +19 -9
- package/dist/client/signal-relay-lifecycle.js.map +1 -0
- package/dist/client/signal-relay-period-close.d.ts +35 -0
- package/dist/client/signal-relay-period-close.d.ts.map +1 -0
- package/dist/client/signal-relay-period-close.js +63 -0
- package/dist/client/signal-relay-period-close.js.map +1 -0
- package/dist/client/{relay-protocol.d.ts → signal-relay-protocol.d.ts} +12 -8
- package/dist/client/signal-relay-protocol.d.ts.map +1 -0
- package/dist/client/{relay-protocol.js → signal-relay-protocol.js} +13 -10
- package/dist/client/signal-relay-protocol.js.map +1 -0
- package/dist/client/{relay-receipt-intake.d.ts → signal-relay-receipt-intake.d.ts} +12 -12
- package/dist/client/signal-relay-receipt-intake.d.ts.map +1 -0
- package/dist/client/{relay-receipt-intake.js → signal-relay-receipt-intake.js} +9 -9
- package/dist/client/signal-relay-receipt-intake.js.map +1 -0
- package/dist/client/{relay-receipt-join.d.ts → signal-relay-receipt-join.d.ts} +8 -8
- package/dist/client/signal-relay-receipt-join.d.ts.map +1 -0
- package/dist/client/{relay-receipt-join.js → signal-relay-receipt-join.js} +11 -11
- package/dist/client/signal-relay-receipt-join.js.map +1 -0
- package/dist/client/{relay-request-deadline.d.ts → signal-relay-request-deadline.d.ts} +3 -3
- package/dist/client/signal-relay-request-deadline.d.ts.map +1 -0
- package/dist/client/{relay-request-deadline.js → signal-relay-request-deadline.js} +4 -4
- package/dist/client/signal-relay-request-deadline.js.map +1 -0
- package/dist/client/{relay-sealed-route.d.ts → signal-relay-sealed-route.d.ts} +1 -1
- package/dist/client/signal-relay-sealed-route.d.ts.map +1 -0
- package/dist/client/{relay-sealed-route.js → signal-relay-sealed-route.js} +1 -1
- package/dist/client/signal-relay-sealed-route.js.map +1 -0
- package/dist/client/{relay-subscription.d.ts → signal-relay-subscription.d.ts} +12 -12
- package/dist/client/signal-relay-subscription.d.ts.map +1 -0
- package/dist/client/{relay-subscription.js → signal-relay-subscription.js} +23 -23
- package/dist/client/signal-relay-subscription.js.map +1 -0
- package/dist/client/{relay-work.d.ts → signal-relay-work.d.ts} +7 -7
- package/dist/client/signal-relay-work.d.ts.map +1 -0
- package/dist/client/{relay-work.js → signal-relay-work.js} +13 -13
- package/dist/client/signal-relay-work.js.map +1 -0
- package/dist/client/signal-service-cipher.d.ts +11 -9
- package/dist/client/signal-service-cipher.d.ts.map +1 -1
- package/dist/client/signal-service-cipher.js +103 -98
- package/dist/client/signal-service-cipher.js.map +1 -1
- package/dist/client/state.d.ts +4 -4
- package/dist/client/state.d.ts.map +1 -1
- package/dist/client/state.js +3 -3
- package/dist/client/state.js.map +1 -1
- package/dist/client/types.d.ts +13 -4
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/types.js.map +1 -1
- package/dist/device/connection.d.ts +10 -4
- package/dist/device/connection.d.ts.map +1 -1
- package/dist/device/connection.js +8 -3
- package/dist/device/connection.js.map +1 -1
- package/dist/device/index.d.ts +2 -2
- package/dist/device/index.d.ts.map +1 -1
- package/dist/device/index.js +1 -1
- package/dist/device/index.js.map +1 -1
- package/dist/device/types.d.ts +3 -1
- package/dist/device/types.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/use-signal-relay-connection-state.d.ts +40 -0
- package/dist/hooks/use-signal-relay-connection-state.d.ts.map +1 -0
- package/dist/hooks/use-signal-relay-connection-state.js +45 -0
- package/dist/hooks/use-signal-relay-connection-state.js.map +1 -0
- package/dist/hooks/use-signal-relay-lifecycle.d.ts +43 -0
- package/dist/hooks/use-signal-relay-lifecycle.d.ts.map +1 -0
- package/dist/hooks/use-signal-relay-lifecycle.js +38 -0
- package/dist/hooks/use-signal-relay-lifecycle.js.map +1 -0
- package/dist/index.d.ts +18 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/internal/groups/authority-certificate.d.ts +7 -1
- package/dist/internal/groups/authority-certificate.d.ts.map +1 -1
- package/dist/internal/groups/authority-certificate.js +29 -6
- package/dist/internal/groups/authority-certificate.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/certificate.js +2 -2
- package/dist/internal/protocol/sealed-sender/certificate.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts +1 -1
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/proto/index.js +5 -5
- package/dist/internal/protocol/sealed-sender/proto/index.js.map +1 -1
- package/dist/internal/sesame/device-registry.d.ts +13 -13
- package/dist/internal/sesame/device-registry.d.ts.map +1 -1
- package/dist/internal/sesame/device-registry.js +20 -20
- package/dist/internal/sesame/device-registry.js.map +1 -1
- package/dist/local/store/receive-work.d.ts +29 -0
- package/dist/local/store/receive-work.d.ts.map +1 -1
- package/dist/local/store/receive-work.js +58 -1
- package/dist/local/store/receive-work.js.map +1 -1
- package/dist/local/store/received-content.d.ts +1 -1
- package/dist/local/store/received-content.d.ts.map +1 -1
- package/dist/local/store/reliability.d.ts +11 -3
- package/dist/local/store/reliability.d.ts.map +1 -1
- package/dist/local/store/reliability.js +4 -0
- package/dist/local/store/reliability.js.map +1 -1
- package/dist/local/store/sqlite/key-storage/index.d.ts +3 -9
- package/dist/local/store/sqlite/key-storage/index.d.ts.map +1 -1
- package/dist/local/store/sqlite/key-storage/index.js.map +1 -1
- package/dist/local/store/sqlite/key-storage/signed-prekeys.d.ts +1 -7
- package/dist/local/store/sqlite/key-storage/signed-prekeys.d.ts.map +1 -1
- package/dist/local/store/sqlite/key-storage/signed-prekeys.js.map +1 -1
- package/dist/local/store/sqlite/models/kyber-prekey.d.ts +4 -9
- package/dist/local/store/sqlite/models/kyber-prekey.d.ts.map +1 -1
- package/dist/local/store/sqlite/models/kyber-prekey.js +4 -1
- package/dist/local/store/sqlite/models/kyber-prekey.js.map +1 -1
- package/dist/local/store/sqlite/store.d.ts.map +1 -1
- package/dist/local/store/sqlite/store.js +1 -2
- package/dist/local/store/sqlite/store.js.map +1 -1
- package/dist/remote/signal-relay/connection-state.d.ts +16 -0
- package/dist/remote/signal-relay/connection-state.d.ts.map +1 -0
- package/dist/remote/{relay → signal-relay}/connection-state.js +1 -1
- package/dist/remote/signal-relay/connection-state.js.map +1 -0
- package/dist/remote/{relay → signal-relay}/device-set.d.ts +3 -3
- package/dist/remote/signal-relay/device-set.d.ts.map +1 -0
- package/dist/remote/{relay → signal-relay}/device-set.js +7 -7
- package/dist/remote/signal-relay/device-set.js.map +1 -0
- package/dist/remote/{relay → signal-relay}/index.d.ts +3 -3
- package/dist/remote/signal-relay/index.d.ts.map +1 -0
- package/dist/remote/{relay → signal-relay}/index.js +2 -2
- package/dist/remote/signal-relay/index.js.map +1 -0
- package/dist/remote/{relay → signal-relay}/request-admission.d.ts +7 -5
- package/dist/remote/signal-relay/request-admission.d.ts.map +1 -0
- package/dist/remote/{relay → signal-relay}/request-admission.js +7 -6
- package/dist/remote/signal-relay/request-admission.js.map +1 -0
- package/dist/remote/{relay → signal-relay}/types.d.ts +30 -12
- package/dist/remote/signal-relay/types.d.ts.map +1 -0
- package/dist/remote/{relay → signal-relay}/types.js +1 -1
- package/dist/remote/signal-relay/types.js.map +1 -0
- package/dist/safety/core.d.ts +1 -1
- package/dist/safety/core.js +1 -1
- package/dist/types/api.d.ts +43 -20
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/errors.d.ts +55 -7
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +61 -8
- package/dist/types/errors.js.map +1 -1
- package/dist/types/renamed-member.d.ts +41 -0
- package/dist/types/renamed-member.d.ts.map +1 -0
- package/dist/types/renamed-member.js +73 -0
- package/dist/types/renamed-member.js.map +1 -0
- package/dist/utils/bounded-fan-out.d.ts +2 -2
- package/dist/utils/bounded-fan-out.d.ts.map +1 -1
- package/dist/utils/bounded-fan-out.js +2 -2
- package/dist/utils/bounded-fan-out.js.map +1 -1
- package/dist/utils/retry.d.ts +3 -3
- package/dist/utils/retry.d.ts.map +1 -1
- package/dist/utils/retry.js +4 -3
- package/dist/utils/retry.js.map +1 -1
- package/docs/ASSURANCE.md +8 -8
- package/docs/CLIENT_COMPOSITION.md +11 -7
- package/docs/DEVIATIONS.md +58 -8
- package/docs/ERROR_HANDLING.md +24 -24
- package/docs/GETTING_STARTED.md +25 -16
- package/docs/INTERFACES.md +5 -5
- package/docs/PACKAGE_SURFACE.md +14 -4
- package/docs/PROTOCOL_POLICY.md +4 -4
- package/docs/RECIPES.md +274 -15
- package/hooks/README.md +11 -11
- package/local/store/expo/README.md +1 -1
- package/local/store/key-value/README.md +2 -2
- package/local/store/node/README.md +1 -1
- package/local/store/react-native/README.md +1 -1
- package/local/store/web/README.md +1 -1
- package/local/store/web-sqlite/README.md +2 -2
- package/package.json +22 -7
- package/remote/README.md +4 -4
- package/remote/object-store/convex-r2/README.md +1 -1
- package/remote/{relay → signal-relay}/README.md +16 -6
- package/dist/client/relay-acceptance.d.ts.map +0 -1
- package/dist/client/relay-acceptance.js.map +0 -1
- package/dist/client/relay-device-refusal.d.ts.map +0 -1
- package/dist/client/relay-device-refusal.js.map +0 -1
- package/dist/client/relay-lifecycle.d.ts.map +0 -1
- package/dist/client/relay-lifecycle.js.map +0 -1
- package/dist/client/relay-protocol.d.ts.map +0 -1
- package/dist/client/relay-protocol.js.map +0 -1
- package/dist/client/relay-receipt-intake.d.ts.map +0 -1
- package/dist/client/relay-receipt-intake.js.map +0 -1
- package/dist/client/relay-receipt-join.d.ts.map +0 -1
- package/dist/client/relay-receipt-join.js.map +0 -1
- package/dist/client/relay-request-deadline.d.ts.map +0 -1
- package/dist/client/relay-request-deadline.js.map +0 -1
- package/dist/client/relay-sealed-route.d.ts.map +0 -1
- package/dist/client/relay-sealed-route.js.map +0 -1
- package/dist/client/relay-subscription.d.ts.map +0 -1
- package/dist/client/relay-subscription.js.map +0 -1
- package/dist/client/relay-work.d.ts.map +0 -1
- package/dist/client/relay-work.js.map +0 -1
- package/dist/hooks/use-relay-connection-state.d.ts +0 -32
- package/dist/hooks/use-relay-connection-state.d.ts.map +0 -1
- package/dist/hooks/use-relay-connection-state.js +0 -31
- package/dist/hooks/use-relay-connection-state.js.map +0 -1
- package/dist/hooks/use-relay-lifecycle.d.ts +0 -36
- package/dist/hooks/use-relay-lifecycle.d.ts.map +0 -1
- package/dist/hooks/use-relay-lifecycle.js +0 -35
- package/dist/hooks/use-relay-lifecycle.js.map +0 -1
- package/dist/remote/relay/connection-state.d.ts +0 -16
- package/dist/remote/relay/connection-state.d.ts.map +0 -1
- package/dist/remote/relay/connection-state.js.map +0 -1
- package/dist/remote/relay/device-set.d.ts.map +0 -1
- package/dist/remote/relay/device-set.js.map +0 -1
- package/dist/remote/relay/index.d.ts.map +0 -1
- package/dist/remote/relay/index.js.map +0 -1
- package/dist/remote/relay/request-admission.d.ts.map +0 -1
- package/dist/remote/relay/request-admission.js.map +0 -1
- package/dist/remote/relay/types.d.ts.map +0 -1
- package/dist/remote/relay/types.js.map +0 -1
package/docs/ERROR_HANDLING.md
CHANGED
|
@@ -85,7 +85,7 @@ holds each member to a production construction site.
|
|
|
85
85
|
| `ENCRYPTION_FAILED` | The SDK could not encrypt the message. | Inspect the session state and `originalError`. |
|
|
86
86
|
| `INVALID_SEND_TIMESTAMP` | A new send carries a `timestamp`, or a sync to linked devices carries an application time, that is not a safe positive integer, or that is more than 5 minutes ahead of or more than 24 hours behind the SDK clock. A new send also gets it for a `timestamp` that a different send of the device used. The SDK's own sends, the profile key offer and the sender key distribution, reserve from the same index of the device, so an application that passes `timestamp: Date.now()` can get `already_used` when it did not use the value again itself. The SDK throws `InvalidSendTimestampError` from `@open-e2ee/signal-protocol-sdk/types` and stores or posts nothing for the send. The `reason` is `not_safe_positive_integer`, `too_far_ahead`, `too_old` or `already_used`. `earliest` and `latest` give the window, and are absent for `already_used`. | Omit `timestamp`, so that the SDK picks a free value. On `already_used`, send again with no timestamp. Otherwise send again with a timestamp in the window that no other send used. |
|
|
87
87
|
| `SEND_ACCEPTANCE_UNKNOWN` | The posting deadline of a direct or group send ended, and the Relay acceptance of a device is not known. The SDK throws `SendAcceptanceUnknownError` from `@open-e2ee/signal-protocol-sdk/types`. The message might have arrived. | Tell the user that the message might already have arrived. Do not replay the send. |
|
|
88
|
-
| `SEND_NEVER_ACCEPTED` | The posting deadline of a direct or group send ended, the call raised no refusal (a thrown refusal or a refusal in the receipt of a shared body), and no refused device has a stored refusal code. The SDK throws `
|
|
88
|
+
| `SEND_NEVER_ACCEPTED` | The posting deadline of a direct or group send ended, the call raised no refusal (a thrown refusal or a refusal in the receipt of a shared body), and no refused device has a stored refusal code. The SDK throws `SendNeverAcceptedBySignalProtocolRelayError` from `@open-e2ee/signal-protocol-sdk/types`. | Tell the user which devices did not get the message. |
|
|
89
89
|
| `MESSAGE_DUPLICATE` | The session processed this message before. | Discard the duplicate. |
|
|
90
90
|
| `TOO_MANY_SKIPPED_MESSAGES` | The message exceeded the skipped-key bound. | Reset the affected session. |
|
|
91
91
|
| `REPLAY_DETECTED` | Envelope and encrypted-content timestamps differ. | Reject the message as a replay. |
|
|
@@ -162,7 +162,7 @@ that set. Neither is an `EncryptionError`.
|
|
|
162
162
|
|
|
163
163
|
| Error | Cause | Application response |
|
|
164
164
|
|---|---|---|
|
|
165
|
-
| `
|
|
165
|
+
| `HostedSignalProtocolRelayUpgradeRequiredError` | The Relay no longer serves the version that the client sent. The message names that version. `code` is `UPGRADE_REQUIRED`, `status` is the HTTP status (426), and `retryable` is false. | Ship a newer SDK. The same request fails again, so do not retry it. |
|
|
166
166
|
| `PROTOCOL_UNSUPPORTED` | The Relay does not serve version 2. The request fails with status 400, the `code` `PROTOCOL_UNSUPPORTED`, and `retryable` true. A send keeps the device open until its posting deadline. | Retry later. The Relay never rolls back below a version that a published SDK sends, so this is a transient fault, not a planned state. |
|
|
167
167
|
|
|
168
168
|
Version 2 adds one Relay code, `DELIVERY_ALREADY_ACCEPTED`. The Relay gives it
|
|
@@ -185,7 +185,7 @@ cannot count the answer as an acceptance. Handle it as `RETRY_CONFLICT`.
|
|
|
185
185
|
|
|
186
186
|
The SDK does not retry an HTTP request that `UPGRADE_REQUIRED` refuses. Each
|
|
187
187
|
Relay route that answers with a JSON body throws
|
|
188
|
-
`
|
|
188
|
+
`HostedSignalProtocolRelayUpgradeRequiredError`. An attachment download does not read the
|
|
189
189
|
response body, so it reports the 426 as a
|
|
190
190
|
[`MediaAttachmentError`](./api/namespaces/media/classes/MediaAttachmentError.md)
|
|
191
191
|
with the code `download-failed` and the `status` 426.
|
|
@@ -193,7 +193,7 @@ with the code `download-failed` and the `status` 426.
|
|
|
193
193
|
The mailbox subscription stops for the same refusal on its socket, with the
|
|
194
194
|
state `stopped` and the reason `upgrade-required`. It does not reconnect and
|
|
195
195
|
does not pull. For `PROTOCOL_UNSUPPORTED` on its socket, the subscription
|
|
196
|
-
reconnects with its usual backoff. See [`
|
|
196
|
+
reconnects with its usual backoff. See [`SignalProtocolRelayConnectionReason`](./api/type-aliases/SignalProtocolRelayConnectionReason.md).
|
|
197
197
|
|
|
198
198
|
The subscription also stops when the Relay refuses its socket token request or
|
|
199
199
|
a pull conclusively. The refusal has `retryable` false and the code
|
|
@@ -201,8 +201,8 @@ a pull conclusively. The refusal has `retryable` false and the code
|
|
|
201
201
|
and the reason is `authority-refused`. A refusal with `retryable` true, for
|
|
202
202
|
example a missing Relay binding, goes to the retry schedule. A `NOT_FOUND` on
|
|
203
203
|
the socket token request is a refusal of this device instead, as
|
|
204
|
-
[Relay Device Errors](#relay-device-errors) describes. See
|
|
205
|
-
[`
|
|
204
|
+
[Signal Protocol Relay Device Errors](#signal-protocol-relay-device-errors) describes. See
|
|
205
|
+
[`SignalProtocolRelayConnectionState`](./api/interfaces/SignalProtocolRelayConnectionState.md).
|
|
206
206
|
|
|
207
207
|
A client call can wrap the error in an `EncryptionError`. It is then the
|
|
208
208
|
`originalError`.
|
|
@@ -211,14 +211,14 @@ A client call can wrap the error in an `EncryptionError`. It is then the
|
|
|
211
211
|
```typescript
|
|
212
212
|
import {
|
|
213
213
|
EncryptionError,
|
|
214
|
-
|
|
214
|
+
HostedSignalProtocolRelayUpgradeRequiredError,
|
|
215
215
|
} from '@open-e2ee/signal-protocol-sdk';
|
|
216
216
|
|
|
217
217
|
function upgradeRequired(error: unknown): boolean {
|
|
218
218
|
return (
|
|
219
|
-
error instanceof
|
|
219
|
+
error instanceof HostedSignalProtocolRelayUpgradeRequiredError ||
|
|
220
220
|
(error instanceof EncryptionError &&
|
|
221
|
-
error.originalError instanceof
|
|
221
|
+
error.originalError instanceof HostedSignalProtocolRelayUpgradeRequiredError)
|
|
222
222
|
);
|
|
223
223
|
}
|
|
224
224
|
|
|
@@ -335,7 +335,7 @@ hours after the SDK first stores the send and 24 hours after its timestamp. A
|
|
|
335
335
|
replay or a restart never moves it. At or after `deadlineAt`, the SDK starts
|
|
336
336
|
no Relay request for the send. A request that started before it still counts
|
|
337
337
|
when its answer arrives later. Before `deadlineAt`, a send error that leaves a
|
|
338
|
-
device open has `retryable: true`, and `
|
|
338
|
+
device open has `retryable: true`, and `signalProtocolRelayRetryable` keeps the hint of the
|
|
339
339
|
Relay. With a store that implements `listMetadataKeys`, as every built-in
|
|
340
340
|
store does, the SDK replays the send at start and on reconnect until
|
|
341
341
|
`deadlineAt`. It reports the end once through `onSendOutcome`. An internal
|
|
@@ -366,7 +366,7 @@ the rule below. The two deadline classes come from
|
|
|
366
366
|
| Error | Cause | Application response |
|
|
367
367
|
|---|---|---|
|
|
368
368
|
| `SendAcceptanceUnknownError` | The Relay acceptance of a device is not known. An answer was lost, or it followed an uncertain request | Tell the user that the message might already have arrived. Do not replay the send |
|
|
369
|
-
| `
|
|
369
|
+
| `SendNeverAcceptedBySignalProtocolRelayError` | The Relay accepted no request for an open device, the call raised no refusal, and no refused device has a stored refusal code. No request started before the deadline, or each answer was a refusal for now, such as `QUOTA_EXCEEDED` | Tell the user which devices did not get the message |
|
|
370
370
|
|
|
371
371
|
When no device has an unknown acceptance, the send ends failed, and one rule
|
|
372
372
|
gives its error:
|
|
@@ -377,7 +377,7 @@ gives its error:
|
|
|
377
377
|
receipt is an `Error` with the `code` of that refusal.
|
|
378
378
|
2. Otherwise, the error is an `Error` with the stored `code` of the first
|
|
379
379
|
refused device that has one, in the order of the destinations.
|
|
380
|
-
3. Otherwise, the error is `
|
|
380
|
+
3. Otherwise, the error is `SendNeverAcceptedBySignalProtocolRelayError` with code
|
|
381
381
|
`SEND_NEVER_ACCEPTED`.
|
|
382
382
|
|
|
383
383
|
A replay of the ended send raises no refusal, so its error comes from case 2
|
|
@@ -433,8 +433,8 @@ device, the replay completes the send and returns the result without
|
|
|
433
433
|
The Relay marks each accepted declared post with `deviceSetChecked`. When an
|
|
434
434
|
accepted post has no mark, the Relay did not compare its device set. The send
|
|
435
435
|
is delivered and its result does not change. The client reports a
|
|
436
|
-
[`
|
|
437
|
-
`DEVICE_SET_UNCHECKED` once for the send through the `
|
|
436
|
+
[`SignalProtocolRelayProtocolError`](./api/classes/SignalProtocolRelayProtocolError.md) with the code
|
|
437
|
+
`DEVICE_SET_UNCHECKED` once for the send through the `onSignalProtocolRelayProtocolError`
|
|
438
438
|
hook. Its `route` names the post route. A sync copy to another own device is
|
|
439
439
|
an `identified-direct` post. A sync payload of a method such as
|
|
440
440
|
`syncReadToLinkedDevices` reports the error once, with no `clientMessageId`.
|
|
@@ -446,7 +446,7 @@ A relay that does not compare device sets gets no declaration. The Convex
|
|
|
446
446
|
relay is one. With it, the SDK reads the device lists as before, and none of
|
|
447
447
|
these errors occur.
|
|
448
448
|
|
|
449
|
-
## Relay Device Errors
|
|
449
|
+
## Signal Protocol Relay Device Errors
|
|
450
450
|
|
|
451
451
|
The Relay can refuse this device, and a managed device link can refuse its
|
|
452
452
|
linked store. Three errors name these refusals. None is an `EncryptionError`,
|
|
@@ -454,16 +454,16 @@ and the SDK retries none of them.
|
|
|
454
454
|
|
|
455
455
|
| Error | Cause | Application response |
|
|
456
456
|
|---|---|---|
|
|
457
|
-
| [`
|
|
458
|
-
| [`
|
|
459
|
-
| [`
|
|
457
|
+
| [`HostedSignalProtocolRelayDeviceRevokedError`](./api/classes/HostedSignalProtocolRelayDeviceRevokedError.md) | An account recovery revoked this device. `code` is `DEVICE_REVOKED`, `status` is 403, and `retryable` is false. | Sign the user out of this device. The Relay refuses a registration with the revoked key, so a re-registration fails too. |
|
|
458
|
+
| [`HostedSignalProtocolRelayDeviceUnknownError`](./api/classes/HostedSignalProtocolRelayDeviceUnknownError.md) | The Relay has no device for the stored session. `code` is `NOT_FOUND`, `status` is 404, and `retryable` is false. The message is the Relay's own message. | Ask the user to confirm a re-registration of this device. Do not re-register without that confirmation. |
|
|
459
|
+
| [`HostedSignalProtocolRelayDeviceLinkError`](./api/classes/HostedSignalProtocolRelayDeviceLinkError.md) | `linkHostedSignalProtocolRelayDevice` found state in the linked store that the link did not write: a group in the linked group store, or a device-authentication key for this Relay connection with no registration of this link. `code` is `DEVICE_LINK_STORE_NOT_EMPTY`, and `retryable` is false. The link wrote nothing. | Link the device again with a new, empty store. The same store is refused again. |
|
|
460
460
|
|
|
461
461
|
`createHostedSignalProtocolClient` throws the first two errors when the stored
|
|
462
462
|
session cannot get a device token. It does not register a new device in their
|
|
463
463
|
place. A running client throws them from its Relay calls. A client call can
|
|
464
464
|
wrap them in an `EncryptionError`, as the `originalError`. The mailbox subscription
|
|
465
465
|
stops with the reason `device-revoked` or `device-unknown`. See
|
|
466
|
-
[`
|
|
466
|
+
[`SignalProtocolRelayConnectionReason`](./api/type-aliases/SignalProtocolRelayConnectionReason.md).
|
|
467
467
|
|
|
468
468
|
To re-register, create the client again with `assertionPurpose: 'reregister'`.
|
|
469
469
|
It keeps the stored identity and device key, and it asks for a `register`
|
|
@@ -485,18 +485,18 @@ A re-registration has these effects:
|
|
|
485
485
|
<!-- doc-snippet:skip requires-existing-client -->
|
|
486
486
|
```typescript
|
|
487
487
|
import {
|
|
488
|
-
|
|
489
|
-
|
|
488
|
+
HostedSignalProtocolRelayDeviceRevokedError,
|
|
489
|
+
HostedSignalProtocolRelayDeviceUnknownError,
|
|
490
490
|
createHostedSignalProtocolClient,
|
|
491
491
|
} from '@open-e2ee/signal-protocol-sdk';
|
|
492
492
|
|
|
493
493
|
try {
|
|
494
494
|
signal = await createHostedSignalProtocolClient(options);
|
|
495
495
|
} catch (error) {
|
|
496
|
-
if (error instanceof
|
|
496
|
+
if (error instanceof HostedSignalProtocolRelayDeviceRevokedError) {
|
|
497
497
|
signOutThisDevice();
|
|
498
498
|
} else if (
|
|
499
|
-
error instanceof
|
|
499
|
+
error instanceof HostedSignalProtocolRelayDeviceUnknownError &&
|
|
500
500
|
(await confirmReregistration())
|
|
501
501
|
) {
|
|
502
502
|
signal = await createHostedSignalProtocolClient({
|
|
@@ -718,7 +718,7 @@ import { DefaultSignalProtocolClient } from '@open-e2ee/signal-protocol-sdk';
|
|
|
718
718
|
|
|
719
719
|
const signal = await DefaultSignalProtocolClient.create(userId, {
|
|
720
720
|
storage,
|
|
721
|
-
|
|
721
|
+
signalProtocolRelay,
|
|
722
722
|
logger: {
|
|
723
723
|
debug: console.debug,
|
|
724
724
|
info: console.info,
|
package/docs/GETTING_STARTED.md
CHANGED
|
@@ -20,14 +20,17 @@ The [adapter guide](../ADAPTERS.md) lists the supported stores.
|
|
|
20
20
|
|
|
21
21
|
- A Relay project and its environment connection URL. In the application
|
|
22
22
|
directory, `oe new` creates the project and its Sandbox environment, and it
|
|
23
|
-
writes the connection URL to `.env.local` as `
|
|
24
|
-
Next.js, Expo, or Vite application, the name has the public prefix of the
|
|
25
|
-
framework, for example `
|
|
23
|
+
writes the connection URL to `.env.local` as `OPEN_E2EE_SIGNAL_RELAY_URL`. In
|
|
24
|
+
a Next.js, Expo, or Vite application, the name has the public prefix of the
|
|
25
|
+
framework, for example `EXPO_PUBLIC_OPEN_E2EE_SIGNAL_RELAY_URL`. An `oe`
|
|
26
|
+
release before 5.0.0 wrote the earlier name, such as
|
|
27
|
+
`EXPO_PUBLIC_OPEN_E2EE_RELAY_URL`. The examples read the new name first and
|
|
28
|
+
the earlier name second.
|
|
26
29
|
- A `getIdentityAssertion` callback that returns a short-lived signed assertion.
|
|
27
30
|
- Device-local storage for private keys, sessions, and delivery state.
|
|
28
31
|
- Application storage for decrypted messages and attachment bytes.
|
|
29
32
|
|
|
30
|
-
A Sandbox environment uses device-owned identity. `
|
|
33
|
+
A Sandbox environment uses device-owned identity. `hostedSignalProtocolRelaySandboxIdentity`
|
|
31
34
|
creates its `getIdentityAssertion` callback. The callback keeps a key in the device-local store. It signs each assertion
|
|
32
35
|
with that key. The device gets the same account each time it registers.
|
|
33
36
|
|
|
@@ -36,14 +39,20 @@ A device that loses its store loses that Sandbox account. The helper works only
|
|
|
36
39
|
Production supports application-bound and explicitly configured device-owned
|
|
37
40
|
accounts. For application-bound accounts, `getIdentityAssertion` returns a
|
|
38
41
|
short-lived Relay-specific assertion from your backend after it verifies the
|
|
39
|
-
server session and current application membership.
|
|
42
|
+
server session and current application membership. With a
|
|
43
|
+
[native Clerk or Firebase profile](./RECIPES.md#native-provider-profiles),
|
|
44
|
+
`getIdentityAssertion` returns the provider token instead, and no backend
|
|
45
|
+
assertion is needed.
|
|
46
|
+
|
|
40
47
|
Device-owned accounts prove possession of a persistent account key. They do
|
|
41
48
|
not bind to an application login, and provider sign-in cannot recover a lost
|
|
42
|
-
account key.
|
|
43
|
-
|
|
49
|
+
account key. For device-owned accounts, pass
|
|
50
|
+
`hostedSignalProtocolRelayDeviceOwnedIdentity(storage)` as `getIdentityAssertion`. The SDK
|
|
51
|
+
does not supply an identity provider or a relay server implementation.
|
|
52
|
+
See [identity and authentication](https://docs.open-e2ee.dev/signal-relay/identity)
|
|
44
53
|
for Production configuration.
|
|
45
54
|
|
|
46
|
-
For a tested backend path, see the [Better Auth recipe](https://docs.open-e2ee.dev/relay/better-auth)
|
|
55
|
+
For a tested backend path, see the [Better Auth recipe](https://docs.open-e2ee.dev/signal-relay/better-auth)
|
|
47
56
|
and the [application callback recipe](./RECIPES.md#application-bound-identity-callback).
|
|
48
57
|
|
|
49
58
|
## Setup Sequence
|
|
@@ -51,7 +60,7 @@ and the [application callback recipe](./RECIPES.md#application-bound-identity-ca
|
|
|
51
60
|
1. Run `oe new` to create the Relay project and its Sandbox environment.
|
|
52
61
|
2. Open the device-local store for the device.
|
|
53
62
|
3. Create the client with `createHostedSignalProtocolClient()`. In a Sandbox
|
|
54
|
-
environment, pass `
|
|
63
|
+
environment, pass `hostedSignalProtocolRelaySandboxIdentity(storage)` as
|
|
55
64
|
`hosted.getIdentityAssertion`.
|
|
56
65
|
4. Register a receive handler that persists decrypted messages.
|
|
57
66
|
5. Start the relay subscription.
|
|
@@ -59,12 +68,12 @@ and the [application callback recipe](./RECIPES.md#application-bound-identity-ca
|
|
|
59
68
|
The hosted factory authenticates and registers the current device, then publishes
|
|
60
69
|
its public prekeys. A linked device gets the account identity by device
|
|
61
70
|
transfer or by a channel that the application owns, then joins the account
|
|
62
|
-
with `
|
|
71
|
+
with `linkHostedSignalProtocolRelayDevice()`. That call runs in one process that holds the
|
|
63
72
|
active device's store and the new device's store. It copies each group master
|
|
64
73
|
key from the active device and gives the new device its own registration ID.
|
|
65
74
|
|
|
66
75
|
It refuses a new device's store that already lists a group, with
|
|
67
|
-
`
|
|
76
|
+
`HostedSignalProtocolRelayDeviceLinkError`. See the [device guide](../device/README.md). The
|
|
68
77
|
default policy requires post-quantum session establishment and Braid
|
|
69
78
|
ratcheting.
|
|
70
79
|
|
|
@@ -80,7 +89,7 @@ Retry with the same stores to retain the original operation and prekeys.
|
|
|
80
89
|
```ts
|
|
81
90
|
import {
|
|
82
91
|
createHostedSignalProtocolClient,
|
|
83
|
-
|
|
92
|
+
hostedSignalProtocolRelaySandboxIdentity,
|
|
84
93
|
} from "@open-e2ee/signal-protocol-sdk";
|
|
85
94
|
import { expoStore } from "@open-e2ee/signal-protocol-sdk/local/store/expo";
|
|
86
95
|
|
|
@@ -88,9 +97,9 @@ const storage = await expoStore();
|
|
|
88
97
|
const signal = await createHostedSignalProtocolClient({
|
|
89
98
|
adapters: { storage },
|
|
90
99
|
hosted: {
|
|
91
|
-
|
|
100
|
+
signalProtocolRelayUrl: process.env.EXPO_PUBLIC_OPEN_E2EE_SIGNAL_RELAY_URL ?? process.env.EXPO_PUBLIC_OPEN_E2EE_RELAY_URL!,
|
|
92
101
|
// Sandbox only. Select the Production identity mode explicitly.
|
|
93
|
-
getIdentityAssertion:
|
|
102
|
+
getIdentityAssertion: hostedSignalProtocolRelaySandboxIdentity(storage),
|
|
94
103
|
},
|
|
95
104
|
});
|
|
96
105
|
```
|
|
@@ -125,7 +134,7 @@ signal.registerHook("onMessageDecrypted", async (message) => {
|
|
|
125
134
|
});
|
|
126
135
|
|
|
127
136
|
// Subscribing starts encrypted envelope delivery and local decryption.
|
|
128
|
-
signal.
|
|
137
|
+
signal.startSignalProtocolRelaySubscription();
|
|
129
138
|
```
|
|
130
139
|
|
|
131
140
|
The package does not own your product database or UI state. It decrypts messages
|
|
@@ -199,7 +208,7 @@ save attachment references and downloaded bytes.
|
|
|
199
208
|
import { createHostedSignalProtocolClient, media } from "@open-e2ee/signal-protocol-sdk";
|
|
200
209
|
|
|
201
210
|
const signal = await createHostedSignalProtocolClient({
|
|
202
|
-
hosted: {
|
|
211
|
+
hosted: { signalProtocolRelayUrl, getIdentityAssertion },
|
|
203
212
|
adapters: {
|
|
204
213
|
storage,
|
|
205
214
|
},
|
package/docs/INTERFACES.md
CHANGED
|
@@ -40,7 +40,7 @@ const storage: SignalProtocolLocalStore = appProtocolStore;
|
|
|
40
40
|
|
|
41
41
|
const client = await createSignalProtocolClient({
|
|
42
42
|
identity: { userId },
|
|
43
|
-
adapters: { storage,
|
|
43
|
+
adapters: { storage, signalProtocolRelay },
|
|
44
44
|
});
|
|
45
45
|
```
|
|
46
46
|
|
|
@@ -87,10 +87,10 @@ delivery, key rotation, and encrypted group coordination.
|
|
|
87
87
|
|
|
88
88
|
<!-- doc-snippet:skip requires-external-context -->
|
|
89
89
|
```ts
|
|
90
|
-
import type { SignalProtocolRelayServer } from "@open-e2ee/signal-protocol-sdk/remote/relay";
|
|
90
|
+
import type { SignalProtocolRelayServer } from "@open-e2ee/signal-protocol-sdk/remote/signal-relay";
|
|
91
91
|
|
|
92
92
|
// An application-owned client transport to an authenticated backend.
|
|
93
|
-
const
|
|
93
|
+
const signalProtocolRelay: SignalProtocolRelayServer = appSignalProtocolRelayTransport;
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
The hosted factory configures the OpenE2EE Signal Protocol Relay transport.
|
|
@@ -128,7 +128,7 @@ The server remains responsible for atomic one-time-key consumption.
|
|
|
128
128
|
|
|
129
129
|
The relay stores public protocol material, ciphertext, and required routing
|
|
130
130
|
metadata. It must not require device private keys or decrypted message content.
|
|
131
|
-
See the [relay guide](../remote/relay/README.md).
|
|
131
|
+
See the [relay guide](../remote/signal-relay/README.md).
|
|
132
132
|
|
|
133
133
|
## `SignalProtocolRemoteObjectStore`
|
|
134
134
|
|
|
@@ -175,7 +175,7 @@ media lifecycle callbacks and client hooks at the client boundary:
|
|
|
175
175
|
```ts
|
|
176
176
|
const client = await createSignalProtocolClient({
|
|
177
177
|
identity: { userId },
|
|
178
|
-
adapters: { storage,
|
|
178
|
+
adapters: { storage, signalProtocolRelay, remoteObjectStore },
|
|
179
179
|
media: {
|
|
180
180
|
preparedUploads: appPreparedUploads,
|
|
181
181
|
maxPreparedUploadBytes: appUploadBudgetBytes,
|
package/docs/PACKAGE_SURFACE.md
CHANGED
|
@@ -70,8 +70,8 @@ implementations are outside the published SDK.
|
|
|
70
70
|
|
|
71
71
|
## Integration subpaths
|
|
72
72
|
|
|
73
|
-
- `@open-e2ee/signal-protocol-sdk/remote/relay`
|
|
74
|
-
- `@open-e2ee/signal-protocol-sdk/remote/relay/types`
|
|
73
|
+
- `@open-e2ee/signal-protocol-sdk/remote/signal-relay`
|
|
74
|
+
- `@open-e2ee/signal-protocol-sdk/remote/signal-relay/types`
|
|
75
75
|
- `@open-e2ee/signal-protocol-sdk/remote/object-store`
|
|
76
76
|
- `@open-e2ee/signal-protocol-sdk/remote/object-store/convex-r2`
|
|
77
77
|
- `@open-e2ee/signal-protocol-sdk/remote/object-store/s3`
|
|
@@ -131,6 +131,16 @@ implementations are outside the published SDK.
|
|
|
131
131
|
|
|
132
132
|
- `@open-e2ee/signal-protocol-sdk/local/store/memory`
|
|
133
133
|
|
|
134
|
+
### Deprecated subpaths
|
|
135
|
+
|
|
136
|
+
Each deprecated subpath loads the same module as its replacement. SDK 15.0.0
|
|
137
|
+
removes the deprecated subpaths.
|
|
138
|
+
|
|
139
|
+
| Deprecated subpath | Replacement |
|
|
140
|
+
| --- | --- |
|
|
141
|
+
| `@open-e2ee/signal-protocol-sdk/remote/relay` | `@open-e2ee/signal-protocol-sdk/remote/signal-relay` |
|
|
142
|
+
| `@open-e2ee/signal-protocol-sdk/remote/relay/types` | `@open-e2ee/signal-protocol-sdk/remote/signal-relay/types` |
|
|
143
|
+
|
|
134
144
|
`internal/**` is implementation-only and not part of the supported external API.
|
|
135
145
|
|
|
136
146
|
## Basic concepts
|
|
@@ -260,7 +270,7 @@ implement the same `MediaAttachmentTransfer` seam.
|
|
|
260
270
|
|
|
261
271
|
## Resume an existing hosted device
|
|
262
272
|
|
|
263
|
-
Use `resumeHostedSignalProtocolClient({ adapters: { storage }, hosted: {
|
|
273
|
+
Use `resumeHostedSignalProtocolClient({ adapters: { storage }, hosted: { signalProtocolRelayUrl } })`
|
|
264
274
|
when the application must preserve the device already held by its open store.
|
|
265
275
|
The SDK refuses missing, unreadable or changed required identity state. It never
|
|
266
276
|
falls back to registration, recovery or device linking. The default
|
|
@@ -272,7 +282,7 @@ the application configures receive hooks, still run. This API does not promise a
|
|
|
272
282
|
store or prove that the store contains every historical message/key.
|
|
273
283
|
|
|
274
284
|
The application owns the store and must not use it concurrently. A
|
|
275
|
-
`
|
|
285
|
+
`HostedSignalProtocolRelayResumeError` with `cleanupPending` retains a client that has not
|
|
276
286
|
completed `stop()`. Keep that error and call `retryCleanup()` only when cleanup is
|
|
277
287
|
selected. This retries the held stop, never resume or registration, and never
|
|
278
288
|
closes the application store. Preserve unresolved application operation state.
|
package/docs/PROTOCOL_POLICY.md
CHANGED
|
@@ -32,7 +32,7 @@ the current app.
|
|
|
32
32
|
```ts
|
|
33
33
|
await createSignalProtocolClient({
|
|
34
34
|
identity: { userId },
|
|
35
|
-
adapters: { storage,
|
|
35
|
+
adapters: { storage, signalProtocolRelay },
|
|
36
36
|
protocol: { postQuantum: 'required', braid: 'required' },
|
|
37
37
|
});
|
|
38
38
|
```
|
|
@@ -60,7 +60,7 @@ No setting allows downgrade recovery:
|
|
|
60
60
|
```ts
|
|
61
61
|
await createSignalProtocolClient({
|
|
62
62
|
identity: { userId },
|
|
63
|
-
adapters: { storage,
|
|
63
|
+
adapters: { storage, signalProtocolRelay },
|
|
64
64
|
protocol: { postQuantum: 'required', braid: 'required' },
|
|
65
65
|
});
|
|
66
66
|
```
|
|
@@ -78,7 +78,7 @@ See [Deviations §4.1](./DEVIATIONS.md#41-the-hek-operand-order-diverges).
|
|
|
78
78
|
```ts
|
|
79
79
|
await createSignalProtocolClient({
|
|
80
80
|
identity: { userId },
|
|
81
|
-
adapters: { storage,
|
|
81
|
+
adapters: { storage, signalProtocolRelay },
|
|
82
82
|
protocol: { postQuantum: 'required', braid: 'disabled' },
|
|
83
83
|
});
|
|
84
84
|
```
|
|
@@ -97,7 +97,7 @@ import { BraidPolicy, PostQuantumPolicy, createSignalProtocolClient } from '@ope
|
|
|
97
97
|
|
|
98
98
|
await createSignalProtocolClient({
|
|
99
99
|
identity: { userId },
|
|
100
|
-
adapters: { storage,
|
|
100
|
+
adapters: { storage, signalProtocolRelay },
|
|
101
101
|
protocol: {
|
|
102
102
|
postQuantum: PostQuantumPolicy.Required,
|
|
103
103
|
braid: BraidPolicy.Required,
|