@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.
Files changed (406) hide show
  1. package/ADAPTERS.md +5 -5
  2. package/ARCHITECTURE.md +1 -1
  3. package/CHANGELOG.md +461 -0
  4. package/README.md +21 -15
  5. package/SECURITY.md +2 -2
  6. package/TROUBLESHOOTING.md +1 -1
  7. package/client/README.md +35 -22
  8. package/device/README.md +5 -5
  9. package/dist/client/client.d.ts +44 -34
  10. package/dist/client/client.d.ts.map +1 -1
  11. package/dist/client/client.js +221 -146
  12. package/dist/client/client.js.map +1 -1
  13. package/dist/client/compose.d.ts +7 -5
  14. package/dist/client/compose.d.ts.map +1 -1
  15. package/dist/client/compose.js +7 -2
  16. package/dist/client/compose.js.map +1 -1
  17. package/dist/client/config.d.ts +23 -14
  18. package/dist/client/config.d.ts.map +1 -1
  19. package/dist/client/config.js.map +1 -1
  20. package/dist/client/content-adapter.d.ts +9 -0
  21. package/dist/client/content-adapter.d.ts.map +1 -1
  22. package/dist/client/content-adapter.js +6 -0
  23. package/dist/client/content-adapter.js.map +1 -1
  24. package/dist/client/delivery-status.d.ts +2 -2
  25. package/dist/client/delivery-status.d.ts.map +1 -1
  26. package/dist/client/delivery-status.js +10 -4
  27. package/dist/client/delivery-status.js.map +1 -1
  28. package/dist/client/device-set-reconciliation.d.ts +24 -16
  29. package/dist/client/device-set-reconciliation.d.ts.map +1 -1
  30. package/dist/client/device-set-reconciliation.js +17 -14
  31. package/dist/client/device-set-reconciliation.js.map +1 -1
  32. package/dist/client/event-hooks.d.ts +22 -7
  33. package/dist/client/event-hooks.d.ts.map +1 -1
  34. package/dist/client/event-hooks.js +35 -5
  35. package/dist/client/event-hooks.js.map +1 -1
  36. package/dist/client/group-device-set.d.ts +1 -1
  37. package/dist/client/group-device-set.d.ts.map +1 -1
  38. package/dist/client/group-key-sync.js +1 -1
  39. package/dist/client/group-key-sync.js.map +1 -1
  40. package/dist/client/group-outbox.d.ts +7 -7
  41. package/dist/client/group-outbox.d.ts.map +1 -1
  42. package/dist/client/group-outbox.js +24 -24
  43. package/dist/client/group-outbox.js.map +1 -1
  44. package/dist/client/group-sealed-sender.d.ts +1 -1
  45. package/dist/client/group-sealed-sender.d.ts.map +1 -1
  46. package/dist/client/group-sender-key-operations.js +1 -1
  47. package/dist/client/group-sender-key-operations.js.map +1 -1
  48. package/dist/client/headless.d.ts +6 -6
  49. package/dist/client/headless.d.ts.map +1 -1
  50. package/dist/client/headless.js +7 -7
  51. package/dist/client/headless.js.map +1 -1
  52. package/dist/client/hosted-anonymous-delivery.d.ts +18 -6
  53. package/dist/client/hosted-anonymous-delivery.d.ts.map +1 -1
  54. package/dist/client/hosted-anonymous-delivery.js +63 -20
  55. package/dist/client/hosted-anonymous-delivery.js.map +1 -1
  56. package/dist/client/hosted-assertion-id.d.ts +1 -1
  57. package/dist/client/hosted-assertion-id.d.ts.map +1 -1
  58. package/dist/client/hosted-assertion-id.js +1 -1
  59. package/dist/client/hosted-assertion-id.js.map +1 -1
  60. package/dist/client/hosted-connection.d.ts +5 -5
  61. package/dist/client/hosted-connection.d.ts.map +1 -1
  62. package/dist/client/hosted-connection.js +32 -32
  63. package/dist/client/hosted-connection.js.map +1 -1
  64. package/dist/client/hosted-device-link-transport.d.ts +2 -2
  65. package/dist/client/hosted-device-link-transport.d.ts.map +1 -1
  66. package/dist/client/hosted-device-link-transport.js +1 -1
  67. package/dist/client/hosted-device-link-transport.js.map +1 -1
  68. package/dist/client/hosted-device-link.d.ts +5 -1
  69. package/dist/client/hosted-device-link.d.ts.map +1 -1
  70. package/dist/client/hosted-device-link.js +7 -4
  71. package/dist/client/hosted-device-link.js.map +1 -1
  72. package/dist/client/hosted-device-standing.d.ts +13 -5
  73. package/dist/client/hosted-device-standing.d.ts.map +1 -1
  74. package/dist/client/hosted-device-standing.js +11 -6
  75. package/dist/client/hosted-device-standing.js.map +1 -1
  76. package/dist/client/hosted-group-authority.d.ts +2 -2
  77. package/dist/client/hosted-group-authority.d.ts.map +1 -1
  78. package/dist/client/hosted-group-authority.js +8 -8
  79. package/dist/client/hosted-group-authority.js.map +1 -1
  80. package/dist/client/hosted-groups.d.ts +4 -4
  81. package/dist/client/hosted-groups.d.ts.map +1 -1
  82. package/dist/client/hosted-groups.js +8 -8
  83. package/dist/client/hosted-groups.js.map +1 -1
  84. package/dist/client/hosted-http-error.d.ts +8 -4
  85. package/dist/client/hosted-http-error.d.ts.map +1 -1
  86. package/dist/client/hosted-http-error.js +7 -4
  87. package/dist/client/hosted-http-error.js.map +1 -1
  88. package/dist/client/hosted-mailbox-subscription.d.ts +16 -15
  89. package/dist/client/hosted-mailbox-subscription.d.ts.map +1 -1
  90. package/dist/client/hosted-mailbox-subscription.js +21 -25
  91. package/dist/client/hosted-mailbox-subscription.js.map +1 -1
  92. package/dist/client/hosted-prekey-publication.d.ts +9 -9
  93. package/dist/client/hosted-prekey-publication.d.ts.map +1 -1
  94. package/dist/client/hosted-prekey-publication.js.map +1 -1
  95. package/dist/client/hosted-presence-frames.d.ts +62 -38
  96. package/dist/client/hosted-presence-frames.d.ts.map +1 -1
  97. package/dist/client/hosted-presence-frames.js +4 -2
  98. package/dist/client/hosted-presence-frames.js.map +1 -1
  99. package/dist/client/hosted-presence.d.ts +22 -14
  100. package/dist/client/hosted-presence.d.ts.map +1 -1
  101. package/dist/client/hosted-presence.js +26 -17
  102. package/dist/client/hosted-presence.js.map +1 -1
  103. package/dist/client/hosted-profile-keys.d.ts +3 -1
  104. package/dist/client/hosted-profile-keys.d.ts.map +1 -1
  105. package/dist/client/hosted-profile-keys.js +19 -15
  106. package/dist/client/hosted-profile-keys.js.map +1 -1
  107. package/dist/client/hosted-push.d.ts +38 -16
  108. package/dist/client/hosted-push.d.ts.map +1 -1
  109. package/dist/client/hosted-push.js +11 -5
  110. package/dist/client/hosted-push.js.map +1 -1
  111. package/dist/client/hosted-resume-error.d.ts +21 -9
  112. package/dist/client/hosted-resume-error.d.ts.map +1 -1
  113. package/dist/client/hosted-resume-error.js +4 -1
  114. package/dist/client/hosted-resume-error.js.map +1 -1
  115. package/dist/client/hosted-resume.d.ts +3 -3
  116. package/dist/client/hosted-resume.d.ts.map +1 -1
  117. package/dist/client/hosted-resume.js +12 -12
  118. package/dist/client/hosted-resume.js.map +1 -1
  119. package/dist/client/hosted-sandbox-identity.d.ts +82 -5
  120. package/dist/client/hosted-sandbox-identity.d.ts.map +1 -1
  121. package/dist/client/hosted-sandbox-identity.js +160 -50
  122. package/dist/client/hosted-sandbox-identity.js.map +1 -1
  123. package/dist/client/hosted-store-records.d.ts +46 -0
  124. package/dist/client/hosted-store-records.d.ts.map +1 -0
  125. package/dist/client/hosted-store-records.js +32 -0
  126. package/dist/client/hosted-store-records.js.map +1 -0
  127. package/dist/client/hosted-transport.d.ts +53 -33
  128. package/dist/client/hosted-transport.d.ts.map +1 -1
  129. package/dist/client/hosted-transport.js +225 -138
  130. package/dist/client/hosted-transport.js.map +1 -1
  131. package/dist/client/hosted-trust.d.ts +1 -1
  132. package/dist/client/hosted-trust.d.ts.map +1 -1
  133. package/dist/client/hosted-trust.js +1 -1
  134. package/dist/client/hosted-trust.js.map +1 -1
  135. package/dist/client/hosted.d.ts +144 -75
  136. package/dist/client/hosted.d.ts.map +1 -1
  137. package/dist/client/hosted.js +106 -61
  138. package/dist/client/hosted.js.map +1 -1
  139. package/dist/client/index.d.ts +4 -4
  140. package/dist/client/index.d.ts.map +1 -1
  141. package/dist/client/index.js +4 -4
  142. package/dist/client/index.js.map +1 -1
  143. package/dist/client/key-rotation-core.d.ts +4 -4
  144. package/dist/client/key-rotation-core.d.ts.map +1 -1
  145. package/dist/client/key-rotation-core.js +8 -8
  146. package/dist/client/key-rotation-core.js.map +1 -1
  147. package/dist/client/key-rotation.js +2 -2
  148. package/dist/client/key-rotation.js.map +1 -1
  149. package/dist/client/messages.d.ts +3 -3
  150. package/dist/client/messages.d.ts.map +1 -1
  151. package/dist/client/messages.js +18 -18
  152. package/dist/client/messages.js.map +1 -1
  153. package/dist/client/one-time-prekey-refill.d.ts +1 -1
  154. package/dist/client/one-time-prekey-refill.d.ts.map +1 -1
  155. package/dist/client/prekeys.js +17 -17
  156. package/dist/client/prekeys.js.map +1 -1
  157. package/dist/client/receive-queue.d.ts +4 -4
  158. package/dist/client/receive-queue.d.ts.map +1 -1
  159. package/dist/client/receive-queue.js +29 -29
  160. package/dist/client/receive-queue.js.map +1 -1
  161. package/dist/client/receive-work-seed.d.ts +6 -2
  162. package/dist/client/receive-work-seed.d.ts.map +1 -1
  163. package/dist/client/receive-work-seed.js.map +1 -1
  164. package/dist/client/recovery-driver.js +7 -7
  165. package/dist/client/recovery-driver.js.map +1 -1
  166. package/dist/client/retry-request-envelope.d.ts +3 -3
  167. package/dist/client/retry-request-envelope.d.ts.map +1 -1
  168. package/dist/client/retry-request-envelope.js +10 -10
  169. package/dist/client/retry-request-envelope.js.map +1 -1
  170. package/dist/client/retry-request-lifecycle.d.ts +1 -1
  171. package/dist/client/retry-request-lifecycle.d.ts.map +1 -1
  172. package/dist/client/retry-request-lifecycle.js +8 -8
  173. package/dist/client/retry-request-lifecycle.js.map +1 -1
  174. package/dist/client/retry-terminal-recovery.js +2 -2
  175. package/dist/client/retry-terminal-recovery.js.map +1 -1
  176. package/dist/client/retry.js +13 -13
  177. package/dist/client/retry.js.map +1 -1
  178. package/dist/client/sealed-sender.d.ts +13 -4
  179. package/dist/client/sealed-sender.d.ts.map +1 -1
  180. package/dist/client/sealed-sender.js +27 -15
  181. package/dist/client/sealed-sender.js.map +1 -1
  182. package/dist/client/send-deadline.d.ts +8 -7
  183. package/dist/client/send-deadline.d.ts.map +1 -1
  184. package/dist/client/send-deadline.js +41 -23
  185. package/dist/client/send-deadline.js.map +1 -1
  186. package/dist/client/send-intent-driver.js +9 -9
  187. package/dist/client/send-intent-driver.js.map +1 -1
  188. package/dist/client/sessions.js +11 -11
  189. package/dist/client/sessions.js.map +1 -1
  190. package/dist/client/{relay-acceptance.d.ts → signal-relay-acceptance.d.ts} +9 -9
  191. package/dist/client/signal-relay-acceptance.d.ts.map +1 -0
  192. package/dist/client/{relay-acceptance.js → signal-relay-acceptance.js} +7 -7
  193. package/dist/client/signal-relay-acceptance.js.map +1 -0
  194. package/dist/client/{relay-device-refusal.d.ts → signal-relay-device-refusal.d.ts} +7 -7
  195. package/dist/client/signal-relay-device-refusal.d.ts.map +1 -0
  196. package/dist/client/{relay-device-refusal.js → signal-relay-device-refusal.js} +9 -9
  197. package/dist/client/signal-relay-device-refusal.js.map +1 -0
  198. package/dist/client/{relay-lifecycle.d.ts → signal-relay-lifecycle.d.ts} +21 -11
  199. package/dist/client/signal-relay-lifecycle.d.ts.map +1 -0
  200. package/dist/client/{relay-lifecycle.js → signal-relay-lifecycle.js} +19 -9
  201. package/dist/client/signal-relay-lifecycle.js.map +1 -0
  202. package/dist/client/signal-relay-period-close.d.ts +35 -0
  203. package/dist/client/signal-relay-period-close.d.ts.map +1 -0
  204. package/dist/client/signal-relay-period-close.js +63 -0
  205. package/dist/client/signal-relay-period-close.js.map +1 -0
  206. package/dist/client/{relay-protocol.d.ts → signal-relay-protocol.d.ts} +12 -8
  207. package/dist/client/signal-relay-protocol.d.ts.map +1 -0
  208. package/dist/client/{relay-protocol.js → signal-relay-protocol.js} +13 -10
  209. package/dist/client/signal-relay-protocol.js.map +1 -0
  210. package/dist/client/{relay-receipt-intake.d.ts → signal-relay-receipt-intake.d.ts} +12 -12
  211. package/dist/client/signal-relay-receipt-intake.d.ts.map +1 -0
  212. package/dist/client/{relay-receipt-intake.js → signal-relay-receipt-intake.js} +9 -9
  213. package/dist/client/signal-relay-receipt-intake.js.map +1 -0
  214. package/dist/client/{relay-receipt-join.d.ts → signal-relay-receipt-join.d.ts} +8 -8
  215. package/dist/client/signal-relay-receipt-join.d.ts.map +1 -0
  216. package/dist/client/{relay-receipt-join.js → signal-relay-receipt-join.js} +11 -11
  217. package/dist/client/signal-relay-receipt-join.js.map +1 -0
  218. package/dist/client/{relay-request-deadline.d.ts → signal-relay-request-deadline.d.ts} +3 -3
  219. package/dist/client/signal-relay-request-deadline.d.ts.map +1 -0
  220. package/dist/client/{relay-request-deadline.js → signal-relay-request-deadline.js} +4 -4
  221. package/dist/client/signal-relay-request-deadline.js.map +1 -0
  222. package/dist/client/{relay-sealed-route.d.ts → signal-relay-sealed-route.d.ts} +1 -1
  223. package/dist/client/signal-relay-sealed-route.d.ts.map +1 -0
  224. package/dist/client/{relay-sealed-route.js → signal-relay-sealed-route.js} +1 -1
  225. package/dist/client/signal-relay-sealed-route.js.map +1 -0
  226. package/dist/client/{relay-subscription.d.ts → signal-relay-subscription.d.ts} +12 -12
  227. package/dist/client/signal-relay-subscription.d.ts.map +1 -0
  228. package/dist/client/{relay-subscription.js → signal-relay-subscription.js} +23 -23
  229. package/dist/client/signal-relay-subscription.js.map +1 -0
  230. package/dist/client/{relay-work.d.ts → signal-relay-work.d.ts} +7 -7
  231. package/dist/client/signal-relay-work.d.ts.map +1 -0
  232. package/dist/client/{relay-work.js → signal-relay-work.js} +13 -13
  233. package/dist/client/signal-relay-work.js.map +1 -0
  234. package/dist/client/signal-service-cipher.d.ts +11 -9
  235. package/dist/client/signal-service-cipher.d.ts.map +1 -1
  236. package/dist/client/signal-service-cipher.js +103 -98
  237. package/dist/client/signal-service-cipher.js.map +1 -1
  238. package/dist/client/state.d.ts +4 -4
  239. package/dist/client/state.d.ts.map +1 -1
  240. package/dist/client/state.js +3 -3
  241. package/dist/client/state.js.map +1 -1
  242. package/dist/client/types.d.ts +13 -4
  243. package/dist/client/types.d.ts.map +1 -1
  244. package/dist/client/types.js.map +1 -1
  245. package/dist/device/connection.d.ts +10 -4
  246. package/dist/device/connection.d.ts.map +1 -1
  247. package/dist/device/connection.js +8 -3
  248. package/dist/device/connection.js.map +1 -1
  249. package/dist/device/index.d.ts +2 -2
  250. package/dist/device/index.d.ts.map +1 -1
  251. package/dist/device/index.js +1 -1
  252. package/dist/device/index.js.map +1 -1
  253. package/dist/device/types.d.ts +3 -1
  254. package/dist/device/types.d.ts.map +1 -1
  255. package/dist/hooks/index.d.ts +2 -2
  256. package/dist/hooks/index.d.ts.map +1 -1
  257. package/dist/hooks/index.js +2 -2
  258. package/dist/hooks/index.js.map +1 -1
  259. package/dist/hooks/use-signal-relay-connection-state.d.ts +40 -0
  260. package/dist/hooks/use-signal-relay-connection-state.d.ts.map +1 -0
  261. package/dist/hooks/use-signal-relay-connection-state.js +45 -0
  262. package/dist/hooks/use-signal-relay-connection-state.js.map +1 -0
  263. package/dist/hooks/use-signal-relay-lifecycle.d.ts +43 -0
  264. package/dist/hooks/use-signal-relay-lifecycle.d.ts.map +1 -0
  265. package/dist/hooks/use-signal-relay-lifecycle.js +38 -0
  266. package/dist/hooks/use-signal-relay-lifecycle.js.map +1 -0
  267. package/dist/index.d.ts +18 -12
  268. package/dist/index.d.ts.map +1 -1
  269. package/dist/index.js +5 -5
  270. package/dist/index.js.map +1 -1
  271. package/dist/internal/groups/authority-certificate.d.ts +7 -1
  272. package/dist/internal/groups/authority-certificate.d.ts.map +1 -1
  273. package/dist/internal/groups/authority-certificate.js +29 -6
  274. package/dist/internal/groups/authority-certificate.js.map +1 -1
  275. package/dist/internal/protocol/sealed-sender/certificate.js +2 -2
  276. package/dist/internal/protocol/sealed-sender/certificate.js.map +1 -1
  277. package/dist/internal/protocol/sealed-sender/proto/index.d.ts +1 -1
  278. package/dist/internal/protocol/sealed-sender/proto/index.d.ts.map +1 -1
  279. package/dist/internal/protocol/sealed-sender/proto/index.js +5 -5
  280. package/dist/internal/protocol/sealed-sender/proto/index.js.map +1 -1
  281. package/dist/internal/sesame/device-registry.d.ts +13 -13
  282. package/dist/internal/sesame/device-registry.d.ts.map +1 -1
  283. package/dist/internal/sesame/device-registry.js +20 -20
  284. package/dist/internal/sesame/device-registry.js.map +1 -1
  285. package/dist/local/store/receive-work.d.ts +29 -0
  286. package/dist/local/store/receive-work.d.ts.map +1 -1
  287. package/dist/local/store/receive-work.js +58 -1
  288. package/dist/local/store/receive-work.js.map +1 -1
  289. package/dist/local/store/received-content.d.ts +1 -1
  290. package/dist/local/store/received-content.d.ts.map +1 -1
  291. package/dist/local/store/reliability.d.ts +11 -3
  292. package/dist/local/store/reliability.d.ts.map +1 -1
  293. package/dist/local/store/reliability.js +4 -0
  294. package/dist/local/store/reliability.js.map +1 -1
  295. package/dist/local/store/sqlite/key-storage/index.d.ts +3 -9
  296. package/dist/local/store/sqlite/key-storage/index.d.ts.map +1 -1
  297. package/dist/local/store/sqlite/key-storage/index.js.map +1 -1
  298. package/dist/local/store/sqlite/key-storage/signed-prekeys.d.ts +1 -7
  299. package/dist/local/store/sqlite/key-storage/signed-prekeys.d.ts.map +1 -1
  300. package/dist/local/store/sqlite/key-storage/signed-prekeys.js.map +1 -1
  301. package/dist/local/store/sqlite/models/kyber-prekey.d.ts +4 -9
  302. package/dist/local/store/sqlite/models/kyber-prekey.d.ts.map +1 -1
  303. package/dist/local/store/sqlite/models/kyber-prekey.js +4 -1
  304. package/dist/local/store/sqlite/models/kyber-prekey.js.map +1 -1
  305. package/dist/local/store/sqlite/store.d.ts.map +1 -1
  306. package/dist/local/store/sqlite/store.js +1 -2
  307. package/dist/local/store/sqlite/store.js.map +1 -1
  308. package/dist/remote/signal-relay/connection-state.d.ts +16 -0
  309. package/dist/remote/signal-relay/connection-state.d.ts.map +1 -0
  310. package/dist/remote/{relay → signal-relay}/connection-state.js +1 -1
  311. package/dist/remote/signal-relay/connection-state.js.map +1 -0
  312. package/dist/remote/{relay → signal-relay}/device-set.d.ts +3 -3
  313. package/dist/remote/signal-relay/device-set.d.ts.map +1 -0
  314. package/dist/remote/{relay → signal-relay}/device-set.js +7 -7
  315. package/dist/remote/signal-relay/device-set.js.map +1 -0
  316. package/dist/remote/{relay → signal-relay}/index.d.ts +3 -3
  317. package/dist/remote/signal-relay/index.d.ts.map +1 -0
  318. package/dist/remote/{relay → signal-relay}/index.js +2 -2
  319. package/dist/remote/signal-relay/index.js.map +1 -0
  320. package/dist/remote/{relay → signal-relay}/request-admission.d.ts +7 -5
  321. package/dist/remote/signal-relay/request-admission.d.ts.map +1 -0
  322. package/dist/remote/{relay → signal-relay}/request-admission.js +7 -6
  323. package/dist/remote/signal-relay/request-admission.js.map +1 -0
  324. package/dist/remote/{relay → signal-relay}/types.d.ts +30 -12
  325. package/dist/remote/signal-relay/types.d.ts.map +1 -0
  326. package/dist/remote/{relay → signal-relay}/types.js +1 -1
  327. package/dist/remote/signal-relay/types.js.map +1 -0
  328. package/dist/safety/core.d.ts +1 -1
  329. package/dist/safety/core.js +1 -1
  330. package/dist/types/api.d.ts +43 -20
  331. package/dist/types/api.d.ts.map +1 -1
  332. package/dist/types/errors.d.ts +55 -7
  333. package/dist/types/errors.d.ts.map +1 -1
  334. package/dist/types/errors.js +61 -8
  335. package/dist/types/errors.js.map +1 -1
  336. package/dist/types/renamed-member.d.ts +41 -0
  337. package/dist/types/renamed-member.d.ts.map +1 -0
  338. package/dist/types/renamed-member.js +73 -0
  339. package/dist/types/renamed-member.js.map +1 -0
  340. package/dist/utils/bounded-fan-out.d.ts +2 -2
  341. package/dist/utils/bounded-fan-out.d.ts.map +1 -1
  342. package/dist/utils/bounded-fan-out.js +2 -2
  343. package/dist/utils/bounded-fan-out.js.map +1 -1
  344. package/dist/utils/retry.d.ts +3 -3
  345. package/dist/utils/retry.d.ts.map +1 -1
  346. package/dist/utils/retry.js +4 -3
  347. package/dist/utils/retry.js.map +1 -1
  348. package/docs/ASSURANCE.md +8 -8
  349. package/docs/CLIENT_COMPOSITION.md +11 -7
  350. package/docs/DEVIATIONS.md +58 -8
  351. package/docs/ERROR_HANDLING.md +24 -24
  352. package/docs/GETTING_STARTED.md +25 -16
  353. package/docs/INTERFACES.md +5 -5
  354. package/docs/PACKAGE_SURFACE.md +14 -4
  355. package/docs/PROTOCOL_POLICY.md +4 -4
  356. package/docs/RECIPES.md +274 -15
  357. package/hooks/README.md +11 -11
  358. package/local/store/expo/README.md +1 -1
  359. package/local/store/key-value/README.md +2 -2
  360. package/local/store/node/README.md +1 -1
  361. package/local/store/react-native/README.md +1 -1
  362. package/local/store/web/README.md +1 -1
  363. package/local/store/web-sqlite/README.md +2 -2
  364. package/package.json +22 -7
  365. package/remote/README.md +4 -4
  366. package/remote/object-store/convex-r2/README.md +1 -1
  367. package/remote/{relay → signal-relay}/README.md +16 -6
  368. package/dist/client/relay-acceptance.d.ts.map +0 -1
  369. package/dist/client/relay-acceptance.js.map +0 -1
  370. package/dist/client/relay-device-refusal.d.ts.map +0 -1
  371. package/dist/client/relay-device-refusal.js.map +0 -1
  372. package/dist/client/relay-lifecycle.d.ts.map +0 -1
  373. package/dist/client/relay-lifecycle.js.map +0 -1
  374. package/dist/client/relay-protocol.d.ts.map +0 -1
  375. package/dist/client/relay-protocol.js.map +0 -1
  376. package/dist/client/relay-receipt-intake.d.ts.map +0 -1
  377. package/dist/client/relay-receipt-intake.js.map +0 -1
  378. package/dist/client/relay-receipt-join.d.ts.map +0 -1
  379. package/dist/client/relay-receipt-join.js.map +0 -1
  380. package/dist/client/relay-request-deadline.d.ts.map +0 -1
  381. package/dist/client/relay-request-deadline.js.map +0 -1
  382. package/dist/client/relay-sealed-route.d.ts.map +0 -1
  383. package/dist/client/relay-sealed-route.js.map +0 -1
  384. package/dist/client/relay-subscription.d.ts.map +0 -1
  385. package/dist/client/relay-subscription.js.map +0 -1
  386. package/dist/client/relay-work.d.ts.map +0 -1
  387. package/dist/client/relay-work.js.map +0 -1
  388. package/dist/hooks/use-relay-connection-state.d.ts +0 -32
  389. package/dist/hooks/use-relay-connection-state.d.ts.map +0 -1
  390. package/dist/hooks/use-relay-connection-state.js +0 -31
  391. package/dist/hooks/use-relay-connection-state.js.map +0 -1
  392. package/dist/hooks/use-relay-lifecycle.d.ts +0 -36
  393. package/dist/hooks/use-relay-lifecycle.d.ts.map +0 -1
  394. package/dist/hooks/use-relay-lifecycle.js +0 -35
  395. package/dist/hooks/use-relay-lifecycle.js.map +0 -1
  396. package/dist/remote/relay/connection-state.d.ts +0 -16
  397. package/dist/remote/relay/connection-state.d.ts.map +0 -1
  398. package/dist/remote/relay/connection-state.js.map +0 -1
  399. package/dist/remote/relay/device-set.d.ts.map +0 -1
  400. package/dist/remote/relay/device-set.js.map +0 -1
  401. package/dist/remote/relay/index.d.ts.map +0 -1
  402. package/dist/remote/relay/index.js.map +0 -1
  403. package/dist/remote/relay/request-admission.d.ts.map +0 -1
  404. package/dist/remote/relay/request-admission.js.map +0 -1
  405. package/dist/remote/relay/types.d.ts.map +0 -1
  406. package/dist/remote/relay/types.js.map +0 -1
package/ADAPTERS.md CHANGED
@@ -143,7 +143,7 @@ const signal = await createHostedSignalProtocolClient({
143
143
  },
144
144
  hosted: {
145
145
  // The environment-scoped connection URL from the OpenE2EE console.
146
- relayUrl: process.env.EXPO_PUBLIC_OPEN_E2EE_RELAY_URL!,
146
+ signalProtocolRelayUrl: process.env.EXPO_PUBLIC_OPEN_E2EE_SIGNAL_RELAY_URL ?? process.env.EXPO_PUBLIC_OPEN_E2EE_RELAY_URL!,
147
147
  // Returns a short-lived signed assertion for the signed-in user.
148
148
  getIdentityAssertion,
149
149
  },
@@ -158,8 +158,8 @@ database and SQLCipher bootstrap.
158
158
  `oe new` writes a Sandbox connection URL to `.env.local`. Use it with the
159
159
  hosted client. The device-local storage contracts are the same in Sandbox. A
160
160
  Sandbox environment uses device-owned identity:
161
- `hostedRelaySandboxIdentity(storage)` supplies `hosted.getIdentityAssertion`.
162
- See the [client guide](./client/README.md#with-relay).
161
+ `hostedSignalProtocolRelaySandboxIdentity(storage)` supplies `hosted.getIdentityAssertion`.
162
+ See the [client guide](./client/README.md#with-the-signal-protocol-relay).
163
163
 
164
164
  ## Security Expectations
165
165
 
@@ -199,7 +199,7 @@ Use the public interfaces:
199
199
  <!-- doc-snippet:skip requires-external-context -->
200
200
  ```ts
201
201
  import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
202
- import type { SignalProtocolRelayServer } from "@open-e2ee/signal-protocol-sdk/remote/relay";
202
+ import type { SignalProtocolRelayServer } from "@open-e2ee/signal-protocol-sdk/remote/signal-relay";
203
203
  import type { SignalProtocolRemoteObjectStore } from "@open-e2ee/signal-protocol-sdk/remote/object-store";
204
204
  import type { SignalProtocolLocalStore } from "@open-e2ee/signal-protocol-sdk/local/store";
205
205
  ```
@@ -212,7 +212,7 @@ const signal = await createSignalProtocolClient({
212
212
  identity: { userId },
213
213
  adapters: {
214
214
  storage: customStorage,
215
- relay: customRelay,
215
+ signalProtocolRelay: customSignalRelay,
216
216
  remoteObjectStore: customObjectStorage,
217
217
  },
218
218
  });
package/ARCHITECTURE.md CHANGED
@@ -153,7 +153,7 @@ Application code should prefer:
153
153
  ```ts
154
154
  await createSignalProtocolClient({
155
155
  identity: { userId },
156
- adapters: { storage, relay },
156
+ adapters: { storage, signalProtocolRelay },
157
157
  });
158
158
  ```
159
159
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,466 @@
1
1
  # Changelog
2
2
 
3
+ ## 14.2.0
4
+
5
+ ### Deprecated
6
+
7
+ - **Names without the Signal Protocol prefix.** Each of the 81 names in the
8
+ table has a new name. A new name has the form `SignalProtocolRelay`, or
9
+ `HostedSignalProtocolRelay` for a name that starts with `Hosted`. SDK 15.0.0
10
+ removes the earlier names. See step 1.
11
+ - **`RelayPreKeyBundle`, from the package root.** Use `PreKeyBundle`. The two
12
+ names identify the same type. SDK 15.0.0 removes `RelayPreKeyBundle`. See
13
+ step 2.
14
+
15
+ Each earlier name is a deprecated alias of the same class, function, or type,
16
+ from the same entry points. A class alias is the same value. Thus `instanceof`
17
+ with the earlier class name is true for an error that the SDK throws.
18
+
19
+ The new names do not change the `name` property of an error or a property
20
+ of an object. The package subpaths are in
21
+ [Deprecated package subpaths](#deprecated-package-subpaths).
22
+
23
+ | Earlier name | New name |
24
+ | --- | --- |
25
+ | `advanceHostedRelayIdentityMigration` | `advanceHostedSignalProtocolRelayIdentityMigration` |
26
+ | `bindRelayLifecycle` | `bindSignalProtocolRelayLifecycle` |
27
+ | `convexRelay` | `convexSignalProtocolRelay` |
28
+ | `createRelayConnection` | `createSignalProtocolRelayConnection` |
29
+ | `HostedRelayBootstrapAdapter` | `HostedSignalProtocolRelayBootstrapAdapter` |
30
+ | `HostedRelayBootstrapRequest` | `HostedSignalProtocolRelayBootstrapRequest` |
31
+ | `HostedRelayBootstrapResult` | `HostedSignalProtocolRelayBootstrapResult` |
32
+ | `HostedRelayDeviceAuthentication` | `HostedSignalProtocolRelayDeviceAuthentication` |
33
+ | `HostedRelayDeviceLinkError` | `HostedSignalProtocolRelayDeviceLinkError` |
34
+ | `hostedRelayDeviceOwnedIdentity` | `hostedSignalProtocolRelayDeviceOwnedIdentity` |
35
+ | `HostedRelayDeviceRevokedError` | `HostedSignalProtocolRelayDeviceRevokedError` |
36
+ | `HostedRelayDeviceUnknownError` | `HostedSignalProtocolRelayDeviceUnknownError` |
37
+ | `HostedRelayHttpError` | `HostedSignalProtocolRelayHttpError` |
38
+ | `HostedRelayIdentityMigrationAction` | `HostedSignalProtocolRelayIdentityMigrationAction` |
39
+ | `HostedRelayIdentityMigrationAdapter` | `HostedSignalProtocolRelayIdentityMigrationAdapter` |
40
+ | `HostedRelayIdentityMigrationOptions` | `HostedSignalProtocolRelayIdentityMigrationOptions` |
41
+ | `HostedRelayIdentityMigrationRequest` | `HostedSignalProtocolRelayIdentityMigrationRequest` |
42
+ | `HostedRelayIdentityMigrationSnapshot` | `HostedSignalProtocolRelayIdentityMigrationSnapshot` |
43
+ | `HostedRelayIdentityMigrationState` | `HostedSignalProtocolRelayIdentityMigrationState` |
44
+ | `HostedRelayIdentityProgress` | `HostedSignalProtocolRelayIdentityProgress` |
45
+ | `HostedRelayIdentityProgressCallback` | `HostedSignalProtocolRelayIdentityProgressCallback` |
46
+ | `HostedRelayManagedDeviceLinkAdapter` | `HostedSignalProtocolRelayManagedDeviceLinkAdapter` |
47
+ | `HostedRelayManagedDeviceLinkOptions` | `HostedSignalProtocolRelayManagedDeviceLinkOptions` |
48
+ | `HostedRelayManagedDeviceLinkRequest` | `HostedSignalProtocolRelayManagedDeviceLinkRequest` |
49
+ | `HostedRelayManagedDeviceLinkResult` | `HostedSignalProtocolRelayManagedDeviceLinkResult` |
50
+ | `hostedRelayPresence` | `hostedSignalProtocolRelayPresence` |
51
+ | `HostedRelayPresence` | `HostedSignalProtocolRelayPresence` |
52
+ | `HostedRelayPresenceAccount` | `HostedSignalProtocolRelayPresenceAccount` |
53
+ | `HostedRelayPresenceApproximateLastSeen` | `HostedSignalProtocolRelayPresenceApproximateLastSeen` |
54
+ | `HostedRelayPresenceAudience` | `HostedSignalProtocolRelayPresenceAudience` |
55
+ | `HostedRelayPresenceError` | `HostedSignalProtocolRelayPresenceError` |
56
+ | `HostedRelayPresenceErrorCode` | `HostedSignalProtocolRelayPresenceErrorCode` |
57
+ | `HostedRelayPresenceLastSeenPolicy` | `HostedSignalProtocolRelayPresenceLastSeenPolicy` |
58
+ | `HostedRelayPresenceMode` | `HostedSignalProtocolRelayPresenceMode` |
59
+ | `HostedRelayPresencePolicy` | `HostedSignalProtocolRelayPresencePolicy` |
60
+ | `HostedRelayPresenceSetting` | `HostedSignalProtocolRelayPresenceSetting` |
61
+ | `HostedRelayPresenceStatus` | `HostedSignalProtocolRelayPresenceStatus` |
62
+ | `HostedRelayPresenceVisibility` | `HostedSignalProtocolRelayPresenceVisibility` |
63
+ | `HostedRelayProfileKeys` | `HostedSignalProtocolRelayProfileKeys` |
64
+ | `HostedRelayPushPlatform` | `HostedSignalProtocolRelayPushPlatform` |
65
+ | `HostedRelayPushProfile` | `HostedSignalProtocolRelayPushProfile` |
66
+ | `HostedRelayPushRegistration` | `HostedSignalProtocolRelayPushRegistration` |
67
+ | `HostedRelayRegistrationPreKey` | `HostedSignalProtocolRelayRegistrationPreKey` |
68
+ | `HostedRelayRegistrationPreKeys` | `HostedSignalProtocolRelayRegistrationPreKeys` |
69
+ | `HostedRelayResumeError` | `HostedSignalProtocolRelayResumeError` |
70
+ | `HostedRelayResumeErrorCode` | `HostedSignalProtocolRelayResumeErrorCode` |
71
+ | `HostedRelayResumePhase` | `HostedSignalProtocolRelayResumePhase` |
72
+ | `HostedRelayResumeProgress` | `HostedSignalProtocolRelayResumeProgress` |
73
+ | `HostedRelayResumeProgressCallback` | `HostedSignalProtocolRelayResumeProgressCallback` |
74
+ | `hostedRelaySandboxIdentity` | `hostedSignalProtocolRelaySandboxIdentity` |
75
+ | `HostedRelayTokenPushRegistration` | `HostedSignalProtocolRelayTokenPushRegistration` |
76
+ | `HostedRelayUpgradeRequiredError` | `HostedSignalProtocolRelayUpgradeRequiredError` |
77
+ | `HostedRelayWakeClient` | `HostedSignalProtocolRelayWakeClient` |
78
+ | `HostedRelayWakeOptions` | `HostedSignalProtocolRelayWakeOptions` |
79
+ | `hostedRelayWakePresence` | `hostedSignalProtocolRelayWakePresence` |
80
+ | `HostedRelayWakePresence` | `HostedSignalProtocolRelayWakePresence` |
81
+ | `HostedRelayWakeResult` | `HostedSignalProtocolRelayWakeResult` |
82
+ | `HostedRelayWebPushRegistration` | `HostedSignalProtocolRelayWebPushRegistration` |
83
+ | `inMemoryRelay` | `inMemorySignalProtocolRelay` |
84
+ | `isSendNeverAcceptedByRelayError` | `isSendNeverAcceptedBySignalProtocolRelayError` |
85
+ | `linkHostedRelayDevice` | `linkHostedSignalProtocolRelayDevice` |
86
+ | `pullHostedRelayAfterWake` | `pullHostedSignalProtocolRelayAfterWake` |
87
+ | `registerHostedRelayPush` | `registerHostedSignalProtocolRelayPush` |
88
+ | `RelayConfig` | `SignalProtocolRelayConfig` |
89
+ | `RelayConnection` | `SignalProtocolRelayConnection` |
90
+ | `RelayConnectionReason` | `SignalProtocolRelayConnectionReason` |
91
+ | `RelayConnectionState` | `SignalProtocolRelayConnectionState` |
92
+ | `RelayFailureController` | `SignalProtocolRelayFailureController` |
93
+ | `RelayFailureOptions` | `SignalProtocolRelayFailureOptions` |
94
+ | `RelayGroupServer` | `SignalProtocolRelayGroupServer` |
95
+ | `RelayLifecycleAppState` | `SignalProtocolRelayLifecycleAppState` |
96
+ | `RelayLifecycleOptions` | `SignalProtocolRelayLifecycleOptions` |
97
+ | `RelayProtocolError` | `SignalProtocolRelayProtocolError` |
98
+ | `RelayProtocolErrorCode` | `SignalProtocolRelayProtocolErrorCode` |
99
+ | `RelayProtocolRoute` | `SignalProtocolRelayProtocolRoute` |
100
+ | `removeHostedRelayPush` | `removeHostedSignalProtocolRelayPush` |
101
+ | `SendNeverAcceptedByRelayError` | `SendNeverAcceptedBySignalProtocolRelayError` |
102
+ | `useRelayConnectionState` | `useSignalProtocolRelayConnectionState` |
103
+ | `UseRelayConnectionStateOptions` | `UseSignalProtocolRelayConnectionStateOptions` |
104
+ | `useRelayLifecycle` | `useSignalProtocolRelayLifecycle` |
105
+ | `UseRelayLifecycleOptions` | `UseSignalProtocolRelayLifecycleOptions` |
106
+
107
+ ### Changed
108
+
109
+ - **The docs read the new URL variable first.** The examples read
110
+ `OPEN_E2EE_SIGNAL_RELAY_URL` or `EXPO_PUBLIC_OPEN_E2EE_SIGNAL_RELAY_URL`
111
+ first. They read the earlier name without `SIGNAL_` second. `oe` 5.0.0 added
112
+ `SIGNAL_` to these names. The SDK reads no environment variable. See step 3.
113
+ - **The SDK verifies the protocol version 3 names of the OpenE2EE Signal
114
+ Protocol Relay.** A device link accepts a device token with the issuer
115
+ `signal-relay` and the audience `signal-relay-device`. A group authority
116
+ certificate with the domain `signal-relay-group-authority-v2` verifies. The
117
+ earlier issuer, audience, and domain still verify. A token that mixes an
118
+ earlier name with a new name fails. A device token can carry the scope claim
119
+ `signal_relay_scope_id`, the earlier claim `relay_scope_id`, or both. A token
120
+ with two different scope values fails. The SDK still sends protocol version 2.
121
+ The sender certificate schema names field 7 `signalRelayScopeId`. The field
122
+ number and the bytes on the wire do not change. No step is necessary.
123
+
124
+ #### Upgrade steps
125
+
126
+ 1. Replace each earlier name in the table with its new name. Code that keeps
127
+ an earlier name compiles and runs unchanged in this release. The
128
+ TypeScript tools mark the earlier name as deprecated. Complete this step before
129
+ SDK 15.0.0, which removes the earlier names.
130
+ 2. Replace `RelayPreKeyBundle` with `PreKeyBundle`.
131
+ 3. Set the Relay URL in `OPEN_E2EE_SIGNAL_RELAY_URL`. In a Next.js, Vite, or
132
+ Expo application, use the public prefix of the framework:
133
+ `NEXT_PUBLIC_OPEN_E2EE_SIGNAL_RELAY_URL`, `VITE_OPEN_E2EE_SIGNAL_RELAY_URL`,
134
+ or `EXPO_PUBLIC_OPEN_E2EE_SIGNAL_RELAY_URL`. An `oe` release before 5.0.0
135
+ wrote the earlier name. Until each environment has the new name, read the
136
+ new name first and the earlier name second.
137
+
138
+ ### Relay values that SDK 15.0.0 changes
139
+
140
+ - **The Relay union values accept `'signal-relay'`.** `DeliverySource`, the
141
+ `origin` of `ReceiveExpiredEvent`, and the `origin` of `PendingReceive`
142
+ accept `'signal-relay'` and `'relay'`. This release reports `'relay'`. SDK
143
+ 15.0.0 reports `'signal-relay'`.
144
+ - **SDK 15.0.0 changes two error names.** This release does not change the
145
+ `name` property of an error.
146
+ - **SDK 15.0.0 changes four log operations.** A device transfer log entry
147
+ holds its operation in the `data.operation` field. This release does not
148
+ change the operations.
149
+
150
+ | Kind | Value in this release | Value in SDK 15.0.0 |
151
+ | --- | --- | --- |
152
+ | `DeliverySource` value | `'relay'` | `'signal-relay'` |
153
+ | `ReceiveExpiredEvent.origin` value | `'relay'` | `'signal-relay'` |
154
+ | `PendingReceive.origin` value | `'relay'` | `'signal-relay'` |
155
+ | Error `name` | `RelayWorkStopped` | `SignalProtocolRelayWorkStopped` |
156
+ | Error `name` | `InMemoryRelayRefusal` | `InMemorySignalProtocolRelayRefusal` |
157
+ | Log operation | `relay-connect` | `signal-relay-connect` |
158
+ | Log operation | `relay-disconnect` | `signal-relay-disconnect` |
159
+ | Log operation | `relay-upload` | `signal-relay-upload` |
160
+ | Log operation | `relay-download` | `signal-relay-download` |
161
+
162
+ #### Upgrade steps for the Relay values
163
+
164
+ 1. Find each comparison with `'relay'` of a value in the first three rows of
165
+ the table. Make it also accept `'signal-relay'`. Before you upgrade to SDK
166
+ 15.0.0, complete this step. In that release, code that accepts only
167
+ `'relay'` does not match a Relay delivery or a Relay message. A `switch`
168
+ that ends with an exhaustive check needs a `case` for each value now,
169
+ because it does not compile with this release. For example, this `switch`
170
+ compiles with SDK 14.1.0 only:
171
+
172
+ <!-- doc-snippet:skip requires-external-context -->
173
+ ```ts
174
+ import type { DeliverySource } from '@open-e2ee/signal-protocol-sdk';
175
+
176
+ function deliveryLabel(source: DeliverySource): string {
177
+ switch (source) {
178
+ case 'relay':
179
+ return 'Delivered to the device';
180
+ case 'e2ee':
181
+ return 'Decrypted on the device';
182
+ default: {
183
+ const unhandled: never = source;
184
+ return unhandled;
185
+ }
186
+ }
187
+ }
188
+ ```
189
+
190
+ Add a `case` for `'signal-relay'` next to the `case` for `'relay'`. This
191
+ `switch` compiles with this release and with SDK 15.0.0:
192
+
193
+ <!-- doc-snippet:skip requires-external-context -->
194
+ ```ts
195
+ import type { DeliverySource } from '@open-e2ee/signal-protocol-sdk';
196
+
197
+ function deliveryLabel(source: DeliverySource): string {
198
+ switch (source) {
199
+ case 'relay':
200
+ case 'signal-relay':
201
+ return 'Delivered to the device';
202
+ case 'e2ee':
203
+ return 'Decrypted on the device';
204
+ default: {
205
+ const unhandled: never = source;
206
+ return unhandled;
207
+ }
208
+ }
209
+ }
210
+ ```
211
+
212
+ 2. Find each match of an error `name` in the table, in code or in a log
213
+ query. Make it also match the SDK 15.0.0 name.
214
+ 3. Find each log query that matches a log operation in the table. Make it
215
+ also match the SDK 15.0.0 value.
216
+
217
+ ### Store keys
218
+
219
+ - **The SDK reads a hosted record under a new key prefix first.** Seven
220
+ records in the application store have a new metadata key prefix,
221
+ `signalRelay.<record>.v2:`. The records are `session`,
222
+ `deviceAuthentication`, `registrationSnapshot`, `reregistrationSnapshot`,
223
+ `sandboxIdentity`, `presenceGrant`, and `profileKeyDelivered`. The SDK reads
224
+ the new key first and the earlier `hostedRelay.<record>.v1:` key second.
225
+ - **The SDK writes the earlier key.** This release writes each record under
226
+ the earlier key, so SDK 14.1.0 still finds every record. When the store
227
+ already holds the new key, a write also replaces it. A later release writes
228
+ the new key. SDK 15 still reads the earlier key.
229
+ - **A store that SDK 14.1.0 wrote opens with its sessions and device
230
+ authentication.** You do not need to change the store. The documentation of
231
+ `hostedSignalProtocolRelaySandboxIdentity` and
232
+ `hostedSignalProtocolRelayDeviceOwnedIdentity` names the two key prefixes of
233
+ the sandbox identity key.
234
+
235
+ ### Stored Relay values
236
+
237
+ - **A receive record accepts the Relay values of a later release.** The
238
+ `origin` of `ReceiveWorkRecord` accepts `'signal-relay'`, the same origin as
239
+ `'relay'`. The new optional field `signalProtocolRelayOwnsReceipt` holds the
240
+ Relay receipt decision, the same decision as `relayOwnsReceipt`. A stored
241
+ delivery status accepts the source `'signal-relay'`, the same source as
242
+ `'relay'`. The SDK reads both values and both field names. When a record
243
+ holds both field names, the new name wins.
244
+ - **The SDK writes the values of SDK 14.1.0.** This release writes the origin
245
+ `'relay'`, the field `relayOwnsReceipt`, and the source `'relay'`, so SDK
246
+ 14.1.0 reads each record that it writes. The SDK does not rewrite or delete
247
+ a stored record to change a value. It reports `'relay'` for a stored
248
+ `'signal-relay'`.
249
+ - **A store refuses a record whose two field names hold different values.**
250
+ `putReceiveWork` and a read of the record throw
251
+ `SignalProtocolRelayNameConflictError`. A store that SDK 14.1.0 wrote opens
252
+ with each record intact. You do not need to change the store.
253
+ - **A custom store keeps each value that it gets.** A
254
+ `SignalProtocolLocalStore` that you write must store and return
255
+ `'signal-relay'` and `signalProtocolRelayOwnsReceipt` without a change, as
256
+ it does each other field.
257
+
258
+ ### Deprecated package subpaths
259
+
260
+ - **Package subpaths without `signal-`.** Each subpath in the table has a new
261
+ subpath. SDK 15.0.0 removes the earlier subpaths.
262
+
263
+ Each earlier subpath is a deprecated entry to the same files as its new
264
+ subpath. Thus the two subpaths load one module, and `instanceof` with a class
265
+ from either subpath is true for an object from the other. An exports map cannot
266
+ mark a subpath as deprecated, so the TypeScript tools do not mark an import of
267
+ an earlier subpath.
268
+
269
+ | Earlier subpath | New subpath |
270
+ | --- | --- |
271
+ | `@open-e2ee/signal-protocol-sdk/remote/relay` | `@open-e2ee/signal-protocol-sdk/remote/signal-relay` |
272
+ | `@open-e2ee/signal-protocol-sdk/remote/relay/types` | `@open-e2ee/signal-protocol-sdk/remote/signal-relay/types` |
273
+
274
+ The package files move to the same names. The directory `remote/relay/` is
275
+ now `remote/signal-relay/`. Each `client/relay-<name>.ts` file is now
276
+ `client/signal-relay-<name>.ts`. The hook files `use-relay-connection-state`
277
+ and `use-relay-lifecycle` are now `use-signal-relay-connection-state` and
278
+ `use-signal-relay-lifecycle`. The page `docs/RELAY_CONNECTION.md` is now
279
+ `docs/SIGNAL_RELAY_CONNECTION.md`. Import only the subpaths in the exports
280
+ map.
281
+
282
+ The Convex component, which the public package does not include, also changes.
283
+ Its `./convex.config` entry points to `remote/signal-relay/convex/component`,
284
+ and its cron `delete expired relay messages` is now
285
+ `delete expired signal-relay messages`. The component name stays
286
+ `signalProtocol`. On a local Convex backend, a deploy of this release kept the
287
+ component and its tables, deleted the earlier cron and its run history, and
288
+ added the new cron. The new cron ran once at the deploy, and its next run was
289
+ one hour later.
290
+
291
+ #### Upgrade steps
292
+
293
+ 1. Replace each earlier subpath in the table with its new subpath. Code that
294
+ keeps an earlier subpath runs unchanged in this release. Complete this step
295
+ before SDK 15.0.0, which removes the earlier subpaths.
296
+ 2. For a Convex deployment that mounts the component, keep the mount name
297
+ `signalProtocol` and deploy. Before the deploy, copy the run history of
298
+ `delete expired relay messages` if you need it, because the deploy deletes
299
+ it. Change each monitor or alert that names the earlier cron to the new name.
300
+
301
+ ### Deprecated: members and options without the Signal Protocol prefix
302
+
303
+ - **Members and options named `relay`.** Each member and option in the table
304
+ has a new name in the `signalProtocolRelay` form. SDK 15.0.0 removes the
305
+ earlier names. See steps 1 and 3.
306
+
307
+ An option accepts the new name or the earlier name. When a call sets both
308
+ names to different values, it fails with `SignalProtocolRelayNameConflictError`,
309
+ from `@open-e2ee/signal-protocol-sdk/types`. The error holds `newName` and
310
+ `earlierName`, and its code is `SIGNAL_PROTOCOL_RELAY_NAME_CONFLICT`. Two equal
311
+ values, or two byte arrays with the same bytes, do not fail. See step 2.
312
+
313
+ In this release, each interface that your code implements keeps the earlier
314
+ member required, with its earlier type, and adds the new member as optional.
315
+ This applies to `SignalProtocolRelayServer`, `SignalProtocolContentAdapter`, and
316
+ `HostedSignalProtocolRelayBootstrapResult`. An implementation with only the
317
+ earlier members compiles and works unchanged, and code that reads an earlier
318
+ member needs no change. When an implementation has both members, the SDK uses
319
+ the new member. SDK 15.0.0 requires the new members.
320
+
321
+ The SDK uses the name that the nearest level of an object defines, so a
322
+ subclass or a spread object that overrides only one name keeps its override.
323
+ For example, a subclass of `InMemorySignalProtocolRelayServer` that overrides
324
+ only `subscribeRelayConnectionState` gets the client subscriptions. Each SDK
325
+ class and each object that the SDK returns has both members, and one member
326
+ forwards to the other. `registerHook('onRelayProtocolError', hook)` registers
327
+ the hook under `onSignalProtocolRelayProtocolError`.
328
+ `bindSignalProtocolRelayLifecycle` and `useSignalProtocolRelayLifecycle` accept
329
+ an object with only the earlier members.
330
+
331
+ This release does not change bytes on the wire, signed bytes, or stored bytes.
332
+ The sealed sender field `relayScopeId` keeps protobuf field 7, and the group
333
+ authority certificate encodes the same bytes for both names.
334
+
335
+ Three options had a required earlier name: `SealedSenderConfig.relayScopeId`,
336
+ `HostedSignalProtocolRelayIdentityMigrationOptions.relayUrl`, and the
337
+ `relayScopeId` field of `encodeGroupAuthority`. Each now accepts either name,
338
+ so both names are optional, and the SDK requires one of the two. A call that
339
+ sets the earlier name compiles unchanged. Code that reads one of these fields
340
+ back from its own options object must handle `undefined`. See step 4.
341
+
342
+ | Type | Earlier name | New name |
343
+ | --- | --- | --- |
344
+ | `SignalProtocolClient`, `DefaultSignalProtocolClient` | `relayConnectionState` | `signalProtocolRelayConnectionState` |
345
+ | `SignalProtocolClient`, `DefaultSignalProtocolClient` | `subscribeRelayConnectionState` | `subscribeSignalProtocolRelayConnectionState` |
346
+ | `SignalProtocolClient`, `DefaultSignalProtocolClient` | `startRelaySubscription` | `startSignalProtocolRelaySubscription` |
347
+ | `SignalProtocolClient`, `DefaultSignalProtocolClient` | `stopRelaySubscription` | `stopSignalProtocolRelaySubscription` |
348
+ | `SignalProtocolRelayServer`, `InMemorySignalProtocolRelayServer`, `ConvexSignalProtocolRelayServer` | `relayConnectionState` | `signalProtocolRelayConnectionState` |
349
+ | `SignalProtocolRelayServer`, `InMemorySignalProtocolRelayServer`, `ConvexSignalProtocolRelayServer` | `subscribeRelayConnectionState` | `subscribeSignalProtocolRelayConnectionState` |
350
+ | `SignalProtocolClientConfig` | `relay` | `signalProtocolRelay` |
351
+ | `SignalProtocolClientAdapterConfig` | `relay` | `signalProtocolRelay` |
352
+ | `SignalProtocolClientContext` | `relay` | `signalProtocolRelay` |
353
+ | `SealedSenderConfig` | `relayScopeId` | `signalProtocolRelayScopeId` |
354
+ | `GroupAuthorityFields` | `relayScopeId` | `signalProtocolRelayScopeId` |
355
+ | `SignalProtocolClientHooks` | `onRelayProtocolError` | `onSignalProtocolRelayProtocolError` |
356
+ | `SignalProtocolContentAdapter` | `setRelayBatching` | `setSignalProtocolRelayBatching` |
357
+ | `OutgoingMessageError` | `relayRetryable` | `signalProtocolRelayRetryable` |
358
+ | `HostedSignalProtocolRelayBootstrapResult` | `relay` | `signalProtocolRelay` |
359
+ | `HostedSignalProtocolRelayBootstrapResult` | `relayScopeId` | `signalProtocolRelayScopeId` |
360
+ | `HostedSignalProtocolClientOptions` | `hosted.relayUrl` | `hosted.signalProtocolRelayUrl` |
361
+ | `HostedSignalProtocolResumeOptions` | `hosted.relayUrl` | `hosted.signalProtocolRelayUrl` |
362
+ | `HostedSignalProtocolRelayManagedDeviceLinkOptions` | `hosted.relayUrl` | `hosted.signalProtocolRelayUrl` |
363
+ | `HostedSignalProtocolRelayIdentityMigrationOptions` | `relayUrl` | `signalProtocolRelayUrl` |
364
+ | `CreateTestClientOptions` | `sharedRelay` | `sharedSignalProtocolRelay` |
365
+ | `TestClientResult` | `relay` | `signalProtocolRelay` |
366
+ | `SignalProtocolClientInternals` | `relay` | `signalProtocolRelay` |
367
+ | `SignalProtocolServiceCipher` | `setRelayProtocolErrorReporter` | `setSignalProtocolRelayProtocolErrorReporter` |
368
+
369
+ #### Upgrade steps
370
+
371
+ 1. Replace each earlier name in the table with its new name where your code
372
+ reads a member or sets an option. Code that keeps an earlier name compiles
373
+ and runs unchanged in this release. The TypeScript tools mark the earlier
374
+ name as deprecated.
375
+ 2. Set each option by one name only. If your code sets both names, for example
376
+ during a migration, give them the same value or remove the earlier name.
377
+ 3. In a class or object that implements `SignalProtocolRelayServer`,
378
+ `SignalProtocolContentAdapter`, or `HostedSignalProtocolRelayBootstrapResult`,
379
+ add the new member and keep the earlier member. This release requires the
380
+ earlier member. Let one member forward to the other, or give both the same
381
+ value. SDK 15.0.0 requires the new member and removes the earlier member.
382
+ 4. Find each read of `relayScopeId` or `relayUrl` from your own
383
+ `SealedSenderConfig`, `GroupAuthorityFields`, or
384
+ `HostedSignalProtocolRelayIdentityMigrationOptions` object. This release
385
+ makes the field optional, so the type of the read includes `undefined`.
386
+ With the TypeScript `strict` option, this function compiles with SDK 14.1.0
387
+ only:
388
+
389
+ <!-- doc-snippet:skip requires-external-context -->
390
+ ```ts
391
+ import type { SealedSenderConfig } from '@open-e2ee/signal-protocol-sdk';
392
+
393
+ function scopeOf(config: SealedSenderConfig): Uint8Array {
394
+ return config.relayScopeId;
395
+ }
396
+ ```
397
+
398
+ Read the new name first and the earlier name second, and handle
399
+ `undefined`. This function compiles with this release:
400
+
401
+ <!-- doc-snippet:skip requires-external-context -->
402
+ ```ts
403
+ import type { SealedSenderConfig } from '@open-e2ee/signal-protocol-sdk';
404
+
405
+ function scopeOf(config: SealedSenderConfig): Uint8Array {
406
+ const scope = config.signalProtocolRelayScopeId ?? config.relayScopeId;
407
+ if (scope === undefined) {
408
+ throw new Error('The sealed sender configuration has no Relay scope.');
409
+ }
410
+ return scope;
411
+ }
412
+ ```
413
+
414
+ When your code sets only `signalProtocolRelayScopeId`, remove
415
+ `?? config.relayScopeId`. SDK 15.0.0 removes the earlier name. Do the same
416
+ for `relayUrl` with `signalProtocolRelayUrl`.
417
+
418
+ ## 14.1.0
419
+
420
+ ### Added
421
+
422
+ - `hostedRelayDeviceOwnedIdentity(storage)`, from the package root and
423
+ `@open-e2ee/signal-protocol-sdk/client`. It returns a `getIdentityAssertion`
424
+ callback for a device-owned account in a Sandbox environment or in a
425
+ Production environment in device-owned identity mode. It signs a
426
+ normal-assurance registration assertion with an Ed25519 key in `storage`.
427
+ It refuses recovery, refresh, provider migration, and recent or step-up
428
+ assurance, and creates no key for a refused request. Its TSDoc documents
429
+ the header and claims of the assertion. It uses the key slot of
430
+ `hostedRelaySandboxIdentity`, so for the same store and publishable key both
431
+ helpers return the same account. `hostedRelaySandboxIdentity` keeps its
432
+ Sandbox-only behavior. A Production project in application-bound mode
433
+ refuses the assertion with `ASSERTION_INVALID`.
434
+
435
+ ### Changed
436
+
437
+ - **The OpenE2EE Signal Protocol Relay mailbox socket stays open across a device
438
+ token renewal.** The Relay authorizes the device token once, at the socket
439
+ handshake, and closes the socket with 4401 `AUTHORITY_REVALIDATE` when the
440
+ authority changes. Before, the hosted transport closed and reopened the socket
441
+ shortly before each token expired, about every 14 minutes. Now it renews the
442
+ token only for an HTTP request or a reconnect, and reconnects only on a Relay
443
+ close or a transport error. The presence watches and the Relay receipt intake
444
+ stay on the one socket. `onConnectionState` and `relayConnectionState` no
445
+ longer emit `reconnecting` for a failed renewal socket, because no renewal
446
+ socket exists. No API changes. See `docs/RELAY_CONNECTION.md`.
447
+
448
+ ### Fixed
449
+
450
+ - **A `PERIOD_CLOSED` refusal gets one repeat.** When the Relay refuses
451
+ a device post with `PERIOD_CLOSED`, the SDK posts the same request once more,
452
+ with the same message ID, epoch and bytes. When the Relay refuses the repeat
453
+ too, the device stays pending: the send throws a retryable error with its
454
+ deadline, and a replay posts the same operation. On the sealed route the
455
+ error code stays `DELIVERY_FAILED`.
456
+ - **A send reaches a recovered device.** When the Relay refuses a
457
+ device post with `NOT_FOUND` because the mailbox generation of the device is
458
+ retired, and the device list names the device at a new generation, the SDK
459
+ archives the session, starts a new session and posts to the new generation
460
+ under the same message ID and epoch. The other devices keep their
461
+ acceptance, and the Relay charges each device once. Before, the device ended
462
+ with a `NOT_FOUND` refusal.
463
+
3
464
  ## 14.0.0
4
465
 
5
466
  ### Breaking
package/README.md CHANGED
@@ -35,7 +35,7 @@ The relay never needs message plaintext or device private keys.
35
35
 
36
36
  The OpenE2EE Signal Protocol SDK implements a versioned profile of the published Signal Protocol specifications. It is not affiliated with Signal Messenger and is **not wire-compatible with Signal Messenger or libsignal**. Messages, identities, and safety numbers do not interoperate. See the [notice](./NOTICE) and [documented deviations](./docs/DEVIATIONS.md).
37
37
 
38
- Version `14.0.x`. Public APIs and persisted formats follow semantic versioning.
38
+ Version `14.2.x`. Public APIs and persisted formats follow semantic versioning.
39
39
 
40
40
  ## Install
41
41
 
@@ -47,15 +47,18 @@ Local development needs Node 22.12 or later. The storage guides list platform re
47
47
 
48
48
  ## Connect to the Signal Protocol Relay
49
49
 
50
- Follow the [Sandbox quickstart](https://docs.open-e2ee.dev/relay#sandbox-quickstart).
50
+ Follow the [Sandbox quickstart](https://docs.open-e2ee.dev/signal-relay#sandbox-quickstart).
51
51
  In the application directory, `oe new` creates the Relay project and its Sandbox
52
52
  environment. It writes the connection URL to `.env.local` as
53
- `OPEN_E2EE_RELAY_URL`. In a Next.js, Expo, or Vite application, the name has
54
- the public prefix of the framework, for example `EXPO_PUBLIC_OPEN_E2EE_RELAY_URL`.
53
+ `OPEN_E2EE_SIGNAL_RELAY_URL`. In a Next.js, Expo, or Vite application, the name
54
+ has the public prefix of the framework, for example
55
+ `EXPO_PUBLIC_OPEN_E2EE_SIGNAL_RELAY_URL`. An `oe` release before 5.0.0 wrote the
56
+ earlier name, such as `OPEN_E2EE_RELAY_URL`. The examples read the new name
57
+ first and the earlier name second.
55
58
  The URL is public configuration. It is not a credential.
56
59
 
57
- A Sandbox environment uses device-owned identity. `hostedRelaySandboxIdentity`
58
- signs the identity assertion with a key that it keeps in the device-local store.
60
+ A new Sandbox environment defaults to device-owned identity.
61
+ `hostedSignalProtocolRelaySandboxIdentity` signs the identity assertion with a key that it keeps in the device-local store.
59
62
  Use the same store for the client.
60
63
 
61
64
  This example needs that Sandbox environment. It is not an offline script.
@@ -64,22 +67,25 @@ This example needs that Sandbox environment. It is not an offline script.
64
67
  ```ts
65
68
  import {
66
69
  createHostedSignalProtocolClient,
67
- hostedRelaySandboxIdentity,
70
+ hostedSignalProtocolRelaySandboxIdentity,
68
71
  } from "@open-e2ee/signal-protocol-sdk";
69
72
 
70
73
  const signal = await createHostedSignalProtocolClient({
71
74
  adapters: { storage },
72
75
  hosted: {
73
- relayUrl: process.env.OPEN_E2EE_RELAY_URL!,
74
- getIdentityAssertion: hostedRelaySandboxIdentity(storage),
76
+ signalProtocolRelayUrl: process.env.OPEN_E2EE_SIGNAL_RELAY_URL ?? process.env.OPEN_E2EE_RELAY_URL!,
77
+ getIdentityAssertion: hostedSignalProtocolRelaySandboxIdentity(storage),
75
78
  },
76
79
  });
77
80
  ```
78
81
 
79
- `hostedRelaySandboxIdentity` works only in a Sandbox environment. In production,
80
- your identity provider signs the assertion: pass a `getIdentityAssertion`
81
- callback that returns a short-lived assertion for the signed-in user. The
82
- [identity guide](https://docs.open-e2ee.dev/relay/identity) describes the
82
+ `hostedSignalProtocolRelaySandboxIdentity` works only in a Sandbox environment. A production
83
+ project in device-owned mode uses `hostedSignalProtocolRelayDeviceOwnedIdentity(storage)`. A
84
+ production project in application-bound mode needs a `getIdentityAssertion`
85
+ callback that returns a short-lived assertion for the signed-in user from your
86
+ backend. With a [native Clerk or Firebase profile](./docs/RECIPES.md#native-provider-profiles),
87
+ the callback returns the provider token instead. The
88
+ [identity guide](https://docs.open-e2ee.dev/signal-relay/identity) describes the
83
89
  production setup.
84
90
 
85
91
  Register a handler before you start incoming delivery. Persist each message
@@ -90,7 +96,7 @@ before the handler resolves, and use its ID to make repeated writes idempotent.
90
96
  signal.registerHook("onMessageDecrypted", async (message) => {
91
97
  await appMessages.accept(message);
92
98
  });
93
- signal.startRelaySubscription();
99
+ signal.startSignalProtocolRelaySubscription();
94
100
  await signal.send(recipientUserId, "hello");
95
101
  ```
96
102
 
@@ -99,7 +105,7 @@ public prekeys. `send()` establishes the recipient sessions and sends encrypted
99
105
  envelopes. The receive handler gets plaintext after device-local decryption.
100
106
  See [client composition](./docs/CLIENT_COMPOSITION.md) for platform setup.
101
107
 
102
- ## Use your app’s storage and relay
108
+ ## Use your app’s storage and message delivery
103
109
 
104
110
  Choose the device-local store for your runtime. Then supply a relay that authenticates each device and implements your product's access policy, or use [OpenE2EE Signal Protocol Relay](https://open-e2ee.dev/relay/) as the managed delivery path. The SDK does not require the managed service. [Review Relay plans and exact meter definitions.](https://open-e2ee.dev/pricing/#relay-plans)
105
111
 
package/SECURITY.md CHANGED
@@ -7,8 +7,8 @@ backports.
7
7
 
8
8
  | Version | Supported |
9
9
  | -------- | ------------------ |
10
- | 14.0.x | :white_check_mark: |
11
- | < 14.0.0 | :x: |
10
+ | 14.2.x | :white_check_mark: |
11
+ | < 14.2.0 | :x: |
12
12
 
13
13
  ## Reporting a Vulnerability
14
14
 
@@ -86,7 +86,7 @@ Make sure the prekey bundle is fresh and valid:
86
86
  <!-- doc-snippet:skip requires-external-context -->
87
87
  ```typescript
88
88
  import { ProtocolAddress, type DefaultSignalProtocolClient } from '@open-e2ee/signal-protocol-sdk';
89
- import type { SignalProtocolRelayServer } from '@open-e2ee/signal-protocol-sdk/remote/relay';
89
+ import type { SignalProtocolRelayServer } from '@open-e2ee/signal-protocol-sdk/remote/signal-relay';
90
90
 
91
91
  export async function establishBobSession(
92
92
  signal: DefaultSignalProtocolClient,