@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
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../types/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AA8BH;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAG/B,IAAI;IACJ,OAAO;IAHhB,YACE,OAAe,EACR,IAAyB,EACzB,OAAgC;QAEvC,KAAK,CAAC,OAAO,CAAC,CAAC;oBAHR,IAAI;uBACJ,OAAO;QAGd,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAE9B,6CAA6C;QAC7C,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IAED,yDAAyD;IACzD,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;IAC/B,CAAC;IAED,kDAAkD;IAClD,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC;IACjC,CAAC;IAED,yDAAyD;IACzD,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC;IACrC,CAAC;CACF;AAED;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,mB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AO,KAAK,YAAY,eAAe,CAAC;AAC1C,CAAC;AAED,0EAA0E;AAC1E,qGAAqG;AACrG,MAAM,CAAC,MAAM,+BAA+B,GAAG,6CAA6C,CAAC;AAC7F,mGAAmG;AACnG,MAAM,CAAC,MAAM,6BAA6B,GAAG,2CAA2C,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Reads of a member that has a Signal Protocol Relay name and a deprecated
3
+ * earlier name.
4
+ *
5
+ * SDK 14 accepts the earlier name of each such option and member. An option
6
+ * read takes the new name first and the earlier name second. A member read
7
+ * takes the name that the nearest level of the object defines, so a subclass
8
+ * override of either name wins. SDK 15.0.0 removes the earlier names and this
9
+ * module.
10
+ *
11
+ * The module is not in a package entry point.
12
+ */
13
+ /** The two names of one member, and the operation that reads it. */
14
+ export interface RenamedMember {
15
+ readonly newName: string;
16
+ readonly earlierName: string;
17
+ readonly operation: string;
18
+ }
19
+ /**
20
+ * Returns the value of an option that the caller sets by either name.
21
+ *
22
+ * The new name wins. Two values with the same identity, or two byte arrays
23
+ * with the same bytes, are the same value. Undefined means not set.
24
+ *
25
+ * @throws SignalProtocolRelayNameConflictError when both names hold values
26
+ * that are not the same.
27
+ */
28
+ export declare function readRenamedOption<T>(newValue: T | undefined, earlierValue: T | undefined, member: RenamedMember): T | undefined;
29
+ /**
30
+ * Returns the member of an object that the caller implements under either
31
+ * name, such as a `SignalProtocolRelayServer`.
32
+ *
33
+ * The name that the nearest level of the object defines wins, and the new
34
+ * name wins when one level defines both. An SDK class defines both names, so
35
+ * a subclass that overrides only one name gives its override. When the
36
+ * chosen name holds no value, the read takes the other name. A method comes
37
+ * back bound to its object. The read does not compare the two members,
38
+ * because an SDK class keeps one name as a forward to the other.
39
+ */
40
+ export declare function readRenamedImplementation<T extends object, K extends keyof T, E extends keyof T>(source: T, newName: K, earlierName: E): NonNullable<T[K]> | NonNullable<T[E]> | undefined;
41
+ //# sourceMappingURL=renamed-member.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renamed-member.d.ts","sourceRoot":"","sources":["../../types/renamed-member.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,oEAAoE;AACpE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAUD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,QAAQ,EAAE,CAAC,GAAG,SAAS,EACvB,YAAY,EAAE,CAAC,GAAG,SAAS,EAC3B,MAAM,EAAE,aAAa,GACpB,CAAC,GAAG,SAAS,CASf;AAuBD;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EAC9F,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,CAAC,EACV,WAAW,EAAE,CAAC,GACb,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CASnD"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Reads of a member that has a Signal Protocol Relay name and a deprecated
3
+ * earlier name.
4
+ *
5
+ * SDK 14 accepts the earlier name of each such option and member. An option
6
+ * read takes the new name first and the earlier name second. A member read
7
+ * takes the name that the nearest level of the object defines, so a subclass
8
+ * override of either name wins. SDK 15.0.0 removes the earlier names and this
9
+ * module.
10
+ *
11
+ * The module is not in a package entry point.
12
+ */
13
+ import { SignalProtocolRelayNameConflictError } from './errors.js';
14
+ function sameValue(a, b) {
15
+ if (Object.is(a, b))
16
+ return true;
17
+ if (!(a instanceof Uint8Array) || !(b instanceof Uint8Array) || a.length !== b.length) {
18
+ return false;
19
+ }
20
+ return a.every((byte, index) => byte === b[index]);
21
+ }
22
+ /**
23
+ * Returns the value of an option that the caller sets by either name.
24
+ *
25
+ * The new name wins. Two values with the same identity, or two byte arrays
26
+ * with the same bytes, are the same value. Undefined means not set.
27
+ *
28
+ * @throws SignalProtocolRelayNameConflictError when both names hold values
29
+ * that are not the same.
30
+ */
31
+ export function readRenamedOption(newValue, earlierValue, member) {
32
+ if (newValue !== undefined && earlierValue !== undefined && !sameValue(newValue, earlierValue)) {
33
+ throw new SignalProtocolRelayNameConflictError(member.newName, member.earlierName, member.operation);
34
+ }
35
+ return newValue !== undefined ? newValue : earlierValue;
36
+ }
37
+ /**
38
+ * Returns the name that the nearest level of an object defines, where a
39
+ * level is the object itself or one of its prototypes. The new name wins
40
+ * when one level defines both names.
41
+ */
42
+ function nearestRenamedName(source, newName, earlierName) {
43
+ for (let level = source; level !== null && level !== Object.prototype; level = Object.getPrototypeOf(level)) {
44
+ if (Object.prototype.hasOwnProperty.call(level, newName))
45
+ return newName;
46
+ if (Object.prototype.hasOwnProperty.call(level, earlierName))
47
+ return earlierName;
48
+ }
49
+ return newName;
50
+ }
51
+ /**
52
+ * Returns the member of an object that the caller implements under either
53
+ * name, such as a `SignalProtocolRelayServer`.
54
+ *
55
+ * The name that the nearest level of the object defines wins, and the new
56
+ * name wins when one level defines both. An SDK class defines both names, so
57
+ * a subclass that overrides only one name gives its override. When the
58
+ * chosen name holds no value, the read takes the other name. A method comes
59
+ * back bound to its object. The read does not compare the two members,
60
+ * because an SDK class keeps one name as a forward to the other.
61
+ */
62
+ export function readRenamedImplementation(source, newName, earlierName) {
63
+ const first = nearestRenamedName(source, newName, earlierName);
64
+ const second = first === newName ? earlierName : newName;
65
+ const member = source[first] ?? source[second];
66
+ if (member === undefined || member === null)
67
+ return undefined;
68
+ if (typeof member === 'function') {
69
+ return member.bind(source);
70
+ }
71
+ return member;
72
+ }
73
+ //# sourceMappingURL=renamed-member.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renamed-member.js","sourceRoot":"","sources":["../../types/renamed-member.ts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AAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC;YAAE,OAAO,OAAO,CAAC;QACzE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC;YAAE,OAAO,WAAW,CAAC;IACnF,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,yBAAyB,CACvC,MAAS,EACT,OAAU,EACV,WAAc;IAEd,MAAM,KAAK,GAAG,kBAAkB,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC/D,MAAM,MAAM,GAAG,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC;IACzD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;IAC/C,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAC9D,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE,CAAC;QACjC,OAAQ,MAA0C,CAAC,IAAI,CAAC,MAAM,CAA0C,CAAC;IAC3G,CAAC;IACD,OAAO,MAA+C,CAAC;AACzD,CAAC"}
@@ -21,10 +21,10 @@
21
21
  * `stopped` option.
22
22
  */
23
23
  /** Relay requests that one client has in flight at most. */
24
- export declare const RELAY_REQUESTS_IN_FLIGHT = 4;
24
+ export declare const SIGNAL_RELAY_REQUESTS_IN_FLIGHT = 4;
25
25
  /** The options of a BoundedFanOut. */
26
26
  export interface BoundedFanOutOptions {
27
- /** Relay requests in flight at most. Default: RELAY_REQUESTS_IN_FLIGHT */
27
+ /** Relay requests in flight at most. Default: SIGNAL_RELAY_REQUESTS_IN_FLIGHT */
28
28
  limit?: number;
29
29
  /** The error for work that a stop signal ended. */
30
30
  stopped: () => Error;
@@ -1 +1 @@
1
- {"version":3,"file":"bounded-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CAAC,CAAC,CAO7E;IAED;;;;;OAKG;IACG,GAAG,CAAC,CAAC,EAAE,CAAC,EACZ,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,EAC5C,UAAU,CAAC,EAAE,WAAW,GACvB,OAAO,CAAC,CAAC,EAAE,CAAC,CAmBd;IAED,kDAAkD;IAClD,MAAM,CAAC,UAAU,CAAC,EAAE,WAAW,GAAG,YAAY,CAE7C;IAED,OAAO,CAAC,OAAO;IAsBf,OAAO,CAAC,OAAO;CAOhB;AAED;;;;GAIG;AACH,qBAAa,YAAY;IAIrB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC;IAL9B,OAAO,CAAC,KAAK,CAA2C;IAExD,YACmB,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,MAAM,KAAK,EACpB,UAAU,CAAC,EAAE,WAAW,YAAA,EACvC;IAEJ,yEAAyE;IACzE,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAEzF;IAED,oEAAoE;IAC9D,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAiBhD;CACF"}
@@ -21,7 +21,7 @@
21
21
  * `stopped` option.
22
22
  */
23
23
  /** Relay requests that one client has in flight at most. */
24
- export const RELAY_REQUESTS_IN_FLIGHT = 4;
24
+ export const SIGNAL_RELAY_REQUESTS_IN_FLIGHT = 4;
25
25
  /**
26
26
  * One or more items of a fan-out failed. Every item settled before this error.
27
27
  */
@@ -57,7 +57,7 @@ export class BoundedFanOut {
57
57
  inFlight = 0;
58
58
  waiting = [];
59
59
  constructor(options) {
60
- const limit = options.limit ?? RELAY_REQUESTS_IN_FLIGHT;
60
+ const limit = options.limit ?? SIGNAL_RELAY_REQUESTS_IN_FLIGHT;
61
61
  if (!Number.isInteger(limit) || limit < 1) {
62
62
  throw new RangeError(`The fan-out limit must be a positive integer, not ${limit}`);
63
63
  }
@@ -1 +1 @@
1
- {"version":3,"file":"bounded-fan-out.js","sourceRoot":"","sources":["../../utils/bounded-fan-out.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAe1C;;GAEG;AACH,MAAM,OAAO,WAAyB,SAAQ,KAAK;IACjD,qDAAqD;IAC5C,MAAM,CAAqB;IAEpC,gDAAgD;IACvC,QAAQ,CAA8B;IAE/C,YAAY,QAAqC;QAC/C,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAClF,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QACxB,MAAM,MAAM,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACtE,KAAK,CAAC,GAAG,MAAM,CAAC,MAAM,OAAO,QAAQ,CAAC,MAAM,0BAA0B,MAAM,EAAE,CAAC,CAAC;QAChF,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,Q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B,UAAwB;sBAFxB,MAAM;uBACN,OAAO;0BACP,UAAU;IAC1B,CAAC;IAEJ,yEAAyE;IACzE,GAAG,CAAO,KAAmB,EAAE,IAA4C;QACzE,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;IACvE,CAAC;IAED,oEAAoE;IACpE,KAAK,CAAC,GAAG,CAAI,KAAuB;QAClC,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;QACxE,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;QACtE,CAAC;QACD,IAAI,IAAI,CAAC,UAAU,EAAE,OAAO;YAAE,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACnD,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,KAAK,EAAE,CAAC;YAC7B,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;YACrB,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;YACtB,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
@@ -33,9 +33,9 @@ export interface SignalProtocolRetryConfig {
33
33
  * Non-retryable:
34
34
  * - The eight codes in NON_RETRYABLE_ERROR_CODES (invalid prekey bundle,
35
35
  * untrusted identity, and the rest)
36
- * - The Relay code UPGRADE_REQUIRED (HostedRelayUpgradeRequiredError)
37
- * - The Relay code DEVICE_REVOKED (HostedRelayDeviceRevokedError)
38
- * - An unknown device (HostedRelayDeviceUnknownError)
36
+ * - The Relay code UPGRADE_REQUIRED (HostedSignalProtocolRelayUpgradeRequiredError)
37
+ * - The Relay code DEVICE_REVOKED (HostedSignalProtocolRelayDeviceRevokedError)
38
+ * - An unknown device (HostedSignalProtocolRelayDeviceUnknownError)
39
39
  *
40
40
  * Retryable:
41
41
  * - Network/timeout errors
@@ -1 +1 @@
1
- {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../utils/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;;GAIG;AACH,OAAO,EAAE,CAAC;AACV,MAAM,WAAW,yBAAyB;IACxC,qFAAqF;IACrF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uFAAuF;IACvF,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC;CACzC;AAsFD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAqCtD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,SAAS,CAAC,CAAC,EAC/B,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,MAAM,GAAE,yBAA8B,GACrC,OAAO,CAAC,CAAC,CAAC,CAyCZ"}
1
+ {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../utils/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;;GAIG;AACH,OAAO,EAAE,CAAC;AACV,MAAM,WAAW,yBAAyB;IACxC,qFAAqF;IACrF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uFAAuF;IACvF,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC;CACzC;AAsFD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAsCtD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,SAAS,CAAC,CAAC,EAC/B,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,MAAM,GAAE,yBAA8B,GACrC,OAAO,CAAC,CAAC,CAAC,CAyCZ"}
@@ -85,9 +85,9 @@ function isRaceConditionError(error) {
85
85
  * Non-retryable:
86
86
  * - The eight codes in NON_RETRYABLE_ERROR_CODES (invalid prekey bundle,
87
87
  * untrusted identity, and the rest)
88
- * - The Relay code UPGRADE_REQUIRED (HostedRelayUpgradeRequiredError)
89
- * - The Relay code DEVICE_REVOKED (HostedRelayDeviceRevokedError)
90
- * - An unknown device (HostedRelayDeviceUnknownError)
88
+ * - The Relay code UPGRADE_REQUIRED (HostedSignalProtocolRelayUpgradeRequiredError)
89
+ * - The Relay code DEVICE_REVOKED (HostedSignalProtocolRelayDeviceRevokedError)
90
+ * - An unknown device (HostedSignalProtocolRelayDeviceUnknownError)
91
91
  *
92
92
  * Retryable:
93
93
  * - Network/timeout errors
@@ -108,6 +108,7 @@ export function isRetryableError(error) {
108
108
  }
109
109
  // The Relay refuses this device for good. The error name identifies an
110
110
  // unknown device, because its code NOT_FOUND also names other failures.
111
+ // The error keeps its earlier name until SDK 15.0.0.
111
112
  if (code === 'DEVICE_REVOKED' || error.name === 'HostedRelayDeviceUnknownError') {
112
113
  return false;
113
114
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ret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AAE,CAAC,CAAC;YAC1F,SAAS,GAAG,eAAe,CAAC;YAE5B,IACE,OAAO,KAAK,aAAa,GAAG,CAAC;gBAC7B,CAAC,gBAAgB,CAAC,eAAe,CAAC;gBAClC,CAAC,WAAW,CAAC,eAAe,CAAC,EAC7B,CAAC;gBACD,MAAM;YACR,CAAC;YAED,MAAM,KAAK,GAAG,qBAAqB,CACjC,OAAO,EACP,SAAS,EACT,QAAQ,EACR,mBAAmB,CAAC,iBAAiB,EACrC,YAAY,CACb,CAAC;YACF,MAAM,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IAED,MAAM,SAAS,IAAI,IAAI,KAAK,CAAC,GAAG,aAAa,gCAAgC,CAAC,CAAC;AACjF,CAAC"}
package/docs/ASSURANCE.md CHANGED
@@ -16,16 +16,16 @@ Private testing also exists in other open-source projects. [SQLite publishes som
16
16
 
17
17
  Engineering CI runs the default automated checks on pull requests that are ready for review and on changes to the main branch. Release preparation requires a passing run.
18
18
 
19
- Most recent full run on 2026-11-02:
19
+ Most recent full run on 2026-11-08:
20
20
 
21
21
  | | |
22
22
  |---|---|
23
- | Test modules | 606 |
24
- | Test cases | 12,678 |
25
- | Passed | 12,674 |
23
+ | Test modules | 613 |
24
+ | Test cases | 12,905 |
25
+ | Passed | 12,901 |
26
26
  | Skipped | 4 |
27
27
  | Failed | 0 |
28
- | Wall time | 695 s |
28
+ | Wall time | 479 s |
29
29
 
30
30
  The total counts test cases. One test case can contain several assertions. Separate commands run the longer performance and endurance checks.
31
31
 
@@ -42,7 +42,7 @@ Release tooling generates this table from a completed run. It refuses results fr
42
42
 
43
43
  Run release builds of the Expo example and the bare React Native example on an Android emulator. Both use Hermes V1. The Expo build uses Expo SDK 57 and React Native 0.86. The bare build uses React Native 0.87.1.
44
44
  - **Public API:** check exported types, import paths, documented calls, and expected example output against the packed package.
45
- - **React Native hosts:** add the packed package to React Native and Expo projects without an override of peer conflicts. The projects cover React Native 0.83 through 0.87 and the Expo SDK 55 through 57 lines. Build the Expo example's Hermes bundle on Expo SDK 55 and 57.
45
+ - **React Native hosts:** add the packed package to React Native and Expo projects without an override of peer conflicts. The projects cover React Native 0.83, 0.85, 0.86, and 0.87. They also cover the Expo SDK 55, 56, and 57 lines. Build the Expo example's Hermes bundle on Expo SDK 55 and 57.
46
46
  - **Errors:** check construction sites for exported error classes and codes. Reject unresolved code forwarding.
47
47
 
48
48
  The browser storage job also runs 2,000 open, write, read, and close cycles of the IndexedDB store. It also runs a soak of the web SQLite store. Each checks for upward memory and latency drift.
@@ -71,7 +71,7 @@ On a pull request, a job on macOS or Windows runs only when a maintainer request
71
71
  | A process killed at a step of a conversion leaves a store that the next encrypted open finishes or starts again, with every row. A kill between the end of the copy and the commit point leaves the plaintext file beside a complete encrypted copy. The next open then fails with `INVALID_STATE` and keeps the copy, and it finishes after the plaintext file is deleted. A directory move after the commit point makes the open fail with `INVALID_STATE`, and it changes no file and no vault entry. | Default automated checks: Linux, Node 26 | A child process converts 2,000 rows inside the owner lock and stops at one step. The parent kills it and opens the store again. |
72
72
  | In the Electron main process, the store passes the shared storage contract with its key in the real `safeStorage`. The file has no SQLite header, and the vault file keeps only a ciphertext of the key. | Electron store job: Electron 44 on Linux, macOS, and Windows, and Electron 42 on Linux | Electron from its npm package, with the GNOME keyring through libsecret on Linux, the Keychain on macOS, and DPAPI on Windows. A push to the main branch or a pull request runs this job only when it changes the store, the vault, the storage contract, the job, or a dependency. |
73
73
  | In the Electron main process, a conversion with its key in the real `safeStorage` writes a file with no SQLite header and keeps the data. The vault then holds only the main key, and an open without the option reads the data. | Electron store job: Electron 44 on Linux, macOS, and Windows, and Electron 42 on Linux | The same Electron runs as the row above. |
74
- | In an app that Electron Forge packages with ASAR, the store opens in the main process and in a utility process with its key in the real `safeStorage`, and a value that one launch writes reads back after a relaunch. The binding loads from `app.asar.unpacked`, and the file has no SQLite header. | Electron package job: Linux x64, macOS arm64, and Windows x64 | `electron-forge package` with Electron Forge 7.11.2 of an app that installs the packed package, with the auto-unpack-natives plugin and the fuses that the [Node store guide](../local/store/node/README.md#packaging) gives. On macOS, the job signs the app ad hoc and requires `codesign --verify --deep --strict` to pass before the first launch. A push to the main branch or a pull request runs this job only when it changes the store, the vault, the packaged app, the job, or a dependency. |
74
+ | In an app that Electron Forge packages with ASAR, the store opens in the main process and in a utility process with its key in the real `safeStorage`, and a value that one launch writes reads back after a relaunch. The binding loads from `app.asar.unpacked`, and the file has no SQLite header. | Electron package job: Linux x64, macOS arm64, and Windows x64 | `electron-forge package` with Electron Forge 8.0.1 of an app that installs the packed package, with the auto-unpack-natives plugin and the fuses that the [Node store guide](../local/store/node/README.md#packaging) gives. On macOS, the job signs the app ad hoc and requires `codesign --verify --deep --strict` to pass before the first launch. A push to the main branch or a pull request runs this job only when it changes the store, the vault, the packaged app, the job, or a dependency. |
75
75
  | On Linux, the vault refuses the `basic_text` backend of `safeStorage`. The store does not open, and no key reaches the disk. | Electron store job: Linux, Electron 44 and 42 | Electron with `--password-store=basic`. |
76
76
  | On Linux, the vault refuses the fixed fallback key that `safeStorage` uses when no secret service answers. The store does not open, and no key reaches the disk. | Electron store job: Linux, Electron 44 and 42 | Electron with `--password-store=gnome-libsecret` and no unlocked keyring on the D-Bus session. |
77
77
  | On Linux, the store passes the shared storage contract with its key in KWallet, on the `kwallet5` and `kwallet6` backends of `safeStorage`. | Electron store job: Linux, Electron 44. KWallet 6 job: Ubuntu 26.04, Electron 44 | Electron with `--password-store=kwallet5` on KWallet 5, and with `--password-store=kwallet6` on KWallet 6.24. A new wallet opens with no prompt, through the `pamOpen` call that `pam_kwallet` makes at login. The test checks the backend that `safeStorage` selected, and the harness removes the key from the wallet. Run 36528132421 also passed `--password-store=kwallet5` on KWallet 6.24. No job runs that case again. |
@@ -217,7 +217,7 @@ This statement describes our process. It is not an independent security assessme
217
217
 
218
218
  ## Checks you can run
219
219
 
220
- [Public CI](https://github.com/open-e2ee/signal-protocol-js/actions/workflows/ci.yml) runs on pushes and pull requests. On a draft pull request, it runs only the first two checks. Its logs show these checks:
220
+ [Public CI](https://github.com/open-e2ee/signal-protocol-js/actions/workflows/ci.yml) runs on each push to the main branch and on each pull request, draft or ready for review. Its logs show these checks:
221
221
 
222
222
  - Install from the committed lockfile, compile the SDK, and check its types.
223
223
  - Check dependencies for known advisories at moderate severity or higher.
@@ -34,8 +34,12 @@ const signal = await createSignalProtocolClient({
34
34
  the environment connection URL to your application configuration.
35
35
  `getIdentityAssertion` returns a short-lived signed assertion. The hosted
36
36
  factory uses it for device registration and authentication. In a Sandbox
37
- environment, `hostedRelaySandboxIdentity(storage)` supplies it. In production,
38
- it returns an assertion for the signed-in user from your identity provider.
37
+ environment, `hostedSignalProtocolRelaySandboxIdentity(storage)` supplies it. In a production
38
+ project in device-owned mode, `hostedSignalProtocolRelayDeviceOwnedIdentity(storage)`
39
+ supplies it. In a production project in application-bound mode, it returns an
40
+ assertion for the signed-in user from your backend. With a
41
+ [native Clerk or Firebase profile](./RECIPES.md#native-provider-profiles), it
42
+ returns the provider token instead.
39
43
 
40
44
  <!-- doc-snippet:skip requires-external-context -->
41
45
  ```ts
@@ -49,7 +53,7 @@ const signal = await createHostedSignalProtocolClient({
49
53
  },
50
54
  hosted: {
51
55
  // The environment-scoped connection URL from the OpenE2EE console.
52
- relayUrl: process.env.EXPO_PUBLIC_OPEN_E2EE_RELAY_URL!,
56
+ signalProtocolRelayUrl: process.env.EXPO_PUBLIC_OPEN_E2EE_SIGNAL_RELAY_URL ?? process.env.EXPO_PUBLIC_OPEN_E2EE_RELAY_URL!,
53
57
  // Returns a short-lived signed assertion for the signed-in user.
54
58
  getIdentityAssertion,
55
59
  },
@@ -68,7 +72,7 @@ const signal = await createSignalProtocolClient({
68
72
  identity: { userId },
69
73
  adapters: {
70
74
  storage,
71
- relay,
75
+ signalProtocolRelay,
72
76
  // Brokered remote storage of encrypted byte objects.
73
77
  remoteObjectStore: convexR2ObjectStore({
74
78
  convex,
@@ -110,9 +114,9 @@ developer-facing protocol config:
110
114
  import { DefaultSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
111
115
 
112
116
  const signal = await DefaultSignalProtocolClient.create(userId, {
113
- // Low-level creation uses the same storage/relay/protocol concepts.
117
+ // Low-level creation uses the same storage, Relay, and protocol concepts.
114
118
  storage,
115
- relay,
119
+ signalProtocolRelay,
116
120
  protocol: { postQuantum: "required", braid: "required" },
117
121
  });
118
122
  ```
@@ -145,7 +149,7 @@ store-by-store wiring exercise:
145
149
  `createExpoDeviceStorage({ database, files })`
146
150
  - a message-first receive path shaped like
147
151
  `signal.messages.subscribe({ conversationId }, handler)` in place of hook
148
- registration plus manual `startRelaySubscription()`
152
+ registration plus manual `startSignalProtocolRelaySubscription()`
149
153
 
150
154
  Low-level hooks would remain for advanced integrations. When this lands it will
151
155
  be a breaking change and this guide will lead with it. Until then, wire the
@@ -83,7 +83,7 @@ model and what is out of scope.
83
83
  | **SPQR / ML-KEM Braid** | ML-KEM Braid rev. 1 | **Deviation.** Same protocol, same KDF labels, same Reed–Solomon parameters, byte-identical message framing — except `hek = SHA3-256(ek_seed ‖ ek_vector)`, the operand order the specification states, which is the reverse of `libsignal`'s implementation | The normative text was followed over the executable reference | Wire-visible. Headers, ciphertexts, and shared secrets diverge; a braid session cannot complete a single epoch against `libsignal`'s implementation. Also means the KEM is not FIPS 203 in braid mode |
84
84
  | **Triple Ratchet** | `libsignal` `triple_ratchet.rs` | **Faithful.** The PQ secret enters as the HKDF salt at message-key expansion, same label, same order | — | The braiding construction follows the ML-KEM Braid specification |
85
85
  | **Sesame** | Sesame rev. 2 | **Faithful** on deleted devices: a removed device is marked and kept for MAXLATENCY, and its archived sessions still decrypt. **Deviation** on session expiry (§4.2 applies only to unacknowledged sessions) and on device-list currency on the Convex relay only (the sender reads the relay's list at most once per 60 s). The Signal Protocol Relay and the memory relay reject a stale declared device set, as §3.3 requires. **Deviation** on stale-record cleanup timing (§5.1: the cleanup runs after the resume, not after a fetch of the whole mailbox, and the Relay's 30-day TTL cap bounds it). **Extensions:** device transfer, encrypted device names, identity-change gating, a 5-device cap | Product requirements the specification does not address | On the Convex relay, a device linked or removed less than 60 s ago can miss a send or still receive one. A client clock that moves forward against the Relay clock between a removal and the cleanup can lose a message accepted just before the removal. Device transfer copies the identity private key and no ratchet state, so each device starts its own sessions |
86
- | **Device-set reconciliation** | Signal's server `MessageController`; Signal's Desktop client `sendToGroup` | **Deviation** in detail. The answer order, one post for each device of a direct send, a bound on direct sends, no empty sync post, a refusal for each not-found group destination, an acknowledgment marker, and a group body sealed again with the same ciphertext (§5.6) | The Relay takes one destination for each direct body, keeps one record for each account, admits a delivery epoch at most 5 minutes ahead of its clock and at most 24 hours behind it from the release that follows v2026.10.25, and stores each send attempt | A phase that does not match in 10 restarts fails the send with `DeviceSetReconciliationError`. A relay that does not acknowledge the comparison raises `DEVICE_SET_UNCHECKED` |
86
+ | **Device-set reconciliation** | Signal's server `MessageController`; Signal's Desktop client `sendToGroup` | **Deviation** in detail. The answer order, one post for each device of a direct send, a bound on direct sends, no empty sync post, a refusal for each not-found group destination, an acknowledgment marker, a group body sealed again with the same ciphertext, and a post again to the recovered generation of a device whose mailbox generation is retired (§5.6) | The Relay takes one destination for each direct body, keeps one record for each account, admits a delivery epoch at most 5 minutes ahead of its clock and at most 24 hours behind it from the release that follows v2026.10.25, and stores each send attempt | A phase that does not match in 10 restarts fails the send with `DeviceSetReconciliationError`. A relay that does not acknowledge the comparison raises `DEVICE_SET_UNCHECKED` |
87
87
  | **Sealed sender** | `libsignal` `sealed_sender.rs` | **Faithful** on the multi-recipient transport labels, KEM, AES-256-GCM-SIV, binary format, and `0x3FFF` registration-ID mask. **Extension:** sender and server certificates require signed Relay scope and issuer validity under operator-owned Ed25519 roots | Binds anonymous delivery to one Relay deployment and supports explicit issuer rotation and revocation | The transport follows `libsignal`; certificates are not interchangeable with Signal Messenger or another deployment |
88
88
  | **Delivery token** | `libsignal` `profile_key.rs` | **Faithful.** `deriveAccessKey` follows `libsignal`'s `ProfileKey::derive_access_key`, and reproduces `libsignal`'s published known-answer values | — | Not an SDK invention, despite what the module name suggests |
89
89
  | **Sender keys** | `libsignal` `sender_keys.rs` | **Deviation.** Protobuf fields, chain seeds, and HKDF-Extract/Expand match. The SDK uses frame version `0x44`, Ed25519 signatures, and UTF-8 distribution identifiers. | The identity profile selects Ed25519. The frame version marks the correction of the former missing Extract. | Message-key derivation matches the reference. Former SDK state and messages require a reset. Frames still differ from Signal Messenger. |
@@ -98,11 +98,12 @@ model and what is out of scope.
98
98
  | **Delivery receipt lifespan** | Signal's Android client | **Faithful.** A stored receipt is sent only within 1 day after it becomes owed, as Android's receipt job lives for 1 day. The receipt is durable across a restart, as on Android | — | A receipt that cannot go out within 1 day is not sent, and no hook reports it (§8.3) |
99
99
  | **Receive admission bounds** | Signal's Desktop client | **Extension.** Before a decrypt, the receive queue checks `maxItems`, `maxBytes`, and the group share `blockedGroupShare`. The defaults are provisional. Desktop decrypts each envelope as it arrives and bounds stored content only by age and attempts | The SDK shares a storage budget with the application in a browser and on mobile | A refused envelope is not acknowledged. It stays at the Relay and expires there with no local hook. The messages behind it still arrive (§8.5) |
100
100
  | **Legacy received content** | Signal's job migration of a retired format | **Faithful** for unreadable rows: the open deletes them and logs a count. **Deviation** for readable rows: the open deletes each readable SDK 11 row too, and counts it in a separate field. Signal converts each readable pending item to the new format | A founder ruling deletes the readable rows. The constraint is Relay retention: the Relay keeps an undelivered envelope for at most 30 days in production, and a readable row is in a store that SDK 12.0.0 or later never opened | Where the constraint holds, the content of such a row never reaches the application. A device that received the content on SDK 11 inside the last 30 days is not covered: 13.x would complete that row on redelivery, and the sweep does not restore it. The count line holds no key and no value (§8.6) |
101
+ | **Relay socket authentication** | Signal's Android client `OkHttpWebSocketConnection`; `libsignal` `chat.rs`; Signal's server `WebSocketDisconnectionRequestListener` | **Faithful.** The mailbox socket sends its credential once, at the handshake, and stays open until the server closes it or it fails. The Relay closes it with 4401 when the authority must be checked again, as Signal's server does. **Deviation** in detail. The handshake credential is a device token that expires after 15 minutes, and the open socket outlives it. The Relay also closes the socket with 4401 at the end of each usage period | The Relay keeps its device credential short-lived for HTTP requests, and it counts monthly activity at the handshake | A renewal touches only HTTP requests and the next reconnect. An authority change reaches an open socket only through the 4401 close (§9.1) |
101
102
  | **zkgroup / zkcredential** | `libsignal` `zkgroup`, `zkcredential`, `poksho` | **Faithful** port of the Ristretto255 KVAC and Sigma-protocol system, verified against `libsignal`'s known-answer vectors. **Deviation:** server parameter derivation is structured as four labeled derivations rather than one seeded derivation | Server keys are the deploying operator's own trust root (each deployment generates its own seed), not Signal Messenger's | The zero-knowledge properties are real. Credentials are not interchangeable with Signal Messenger's |
102
103
  | **Registration IDs** | `libsignal` `sealed_sender.rs` | **Faithful.** Generated in `[1, 16383]`, strictly inside the 14 bits the wire format reserves | — | — |
103
104
  | **Linked-device registration IDs** | Signal's device linking | **Faithful** for a new link: the linked device gets its own fresh registration ID. **Deviation:** a device that a 12.0.x release linked keeps the ID of its active device, and a link that a 12.0.x release began keeps its stored ID (§5.7) | A changed ID on a live device fails its next prekey sync. A fresh ID on a link already begun can reserve a second device | Two devices of one account can share a registration ID. The sender-key handoff ledger keys each row by the device, so they stay apart |
104
105
  | **Linked-device group keys** | Signal's device linking | **Deviation.** The link copies each group master key from the active device's group store in the calling process. A group record that a release before 12.0.0 wrote, and that the active device has not read since, is not copied (§5.8) | The SDK has no storage service, and the link sends no master key through the Relay | The process that links the device must hold the active device's store. Such an unread group initializes from its first group message |
105
- | **Posting deadline and send progress** | Signal's Android client `IndividualSendJob`; Signal's Desktop client `conversationJobQueue` | **Faithful** on a window of 1 day and on progress at the deadline: an accepted device stays accepted. **Deviation** in detail. The deadline also ends 24 hours after the send timestamp, has no message-expiry term, and never moves on a restart. A lost Relay answer is acceptance-unknown, not failed. An automatic retry posts the stored bytes and epoch. With a store that lists its metadata keys, the SDK replays open sends at start and on reconnect, as the Signal job runners do, and reports each end once through `onSendOutcome`. On a custom store without the listing method, the application replays (§5.9) | The Relay admits an epoch at most 24 hours behind its clock, keeps a fingerprint of each operation, and charges each accepted operation. Custom stores stay supported, so the listing method is optional | A direct send posts nothing at or after its deadline. When the acceptance of a device is not known, the send throws `SendAcceptanceUnknownError`, and a replay or a resend after it can add one charged unit. When the plaintext of an open send is gone, `onSendOutcome` reports `content-required` |
106
+ | **Posting deadline and send progress** | Signal's Android client `IndividualSendJob`; Signal's Desktop client `conversationJobQueue` | **Faithful** on a window of 1 day and on progress at the deadline: an accepted device stays accepted. **Deviation** in detail. The deadline also ends 24 hours after the send timestamp, has no message-expiry term, and never moves on a restart. A lost Relay answer is acceptance-unknown, not failed. An automatic retry posts the stored bytes and epoch. With a store that lists its metadata keys, the SDK replays open sends at start and on reconnect, as the Signal job runners do, and reports each end once through `onSendOutcome`. On a custom store without the listing method, the application replays. A `PERIOD_CLOSED` refusal gets one repeat of the same post, and a second refusal keeps the device pending (§5.9) | The Relay admits an epoch at most 24 hours behind its clock, keeps a fingerprint of each operation, and charges each accepted operation. Custom stores stay supported, so the listing method is optional | A direct send posts nothing at or after its deadline. When the acceptance of a device is not known, the send throws `SendAcceptanceUnknownError`, and a replay or a resend after it can add one charged unit. When the plaintext of an open send is gone, `onSendOutcome` reports `content-required` |
106
107
 
107
108
  ---
108
109
 
@@ -778,7 +779,7 @@ removal clause is strict: the cleanup deletes the record only when
778
779
  removal is therefore gone from the Relay before `maxLatency` passes after the
779
780
  removal, and the record outlives it. The §3.1 guarantee for messages in flight
780
781
  thus holds without a fetch of the whole mailbox. The Convex relay keeps a
781
- message for 7 days (`remote/relay/convex/component/messages.ts:18`), so the
782
+ message for 7 days (`remote/signal-relay/convex/component/messages.ts:18`), so the
782
783
  bound holds there too.
783
784
 
784
785
  Two caveats limit the bound:
@@ -908,7 +909,7 @@ it never runs.
908
909
 
909
910
  ### 5.6 Device-set reconciliation differs in detail
910
911
 
911
- Reviewed: 2026-11-01.
912
+ Reviewed: 2026-11-04.
912
913
 
913
914
  The reconciliation of §5.5 follows Signal's server and Signal's Desktop
914
915
  client in its rule: the server compares, the client repairs and posts again,
@@ -926,12 +927,13 @@ Signal's Android client. The following details differ.
926
927
  | D6 | A direct send also stops at 10 restarts | One bound for every send | Signal's Desktop client has no bound on missing or extra devices for a one-to-one send | The restart bound test of the direct send |
927
928
  | D7 | No empty sync post. A `needsSync` mark on the recipient receipt and one read of the own list replace it | A Relay post needs at least one destination | Signal's server accepts an empty sync list, and Signal's Android client addresses its own device | A new own device repairs the sync phase and the recipient post is not sent again. The own list is read only on `needsSync` with no own record, and a failed read leaves the sync phase pending |
928
929
  | D8 | A group post settles a not-found account as a refusal of each of its destinations, and the Relay accepts the rest | `NOT_FOUND` is a fan-out result code. A refusal of the whole post would use a restart | This is equivalent to the group-send-token path of Signal's server, which sends to the accounts it resolves and returns the others. Only the form differs: a refusal code for each destination | A removed account settles as refused and the send adds nothing. A lost response resumes as a duplicate with no not-found account |
929
- | D9 | The receipt of a declared post carries a `deviceSetChecked` mark | The identified Relay route passes unknown keys, and a deployment lane can lag the SDK | Signal ships its client and server together | A receipt without the mark raises `DEVICE_SET_UNCHECKED` through `onRelayProtocolError` |
930
- | D10 | The SDK seals a group body again only before the Relay accepts it, and only after a definite refusal | The Relay keys each delivery operation by message ID, class, destination device, generation and epoch, and keeps a fingerprint of it. It answers `RETRY_CONFLICT` to a changed body under the same operation. It also refuses a new operation whose message ID a row or journal entry of that mailbox holds. The message ID alone is not the operation key | Signal stores nothing on the server for a send attempt | A refused body is replaced in one write. A crash before the post of the replaced body posts it on resume. A `RETRY_CONFLICT` answer to a group shared post counts as acceptance and raises no `onRelayProtocolError` report |
930
+ | D9 | The receipt of a declared post carries a `deviceSetChecked` mark | The identified Relay route passes unknown keys, and a deployment lane can lag the SDK | Signal ships its client and server together | A receipt without the mark raises `DEVICE_SET_UNCHECKED` through `onSignalProtocolRelayProtocolError` |
931
+ | D10 | The SDK seals a group body again only before the Relay accepts it, and only after a definite refusal | The Relay keys each delivery operation by message ID, class, destination device, generation and epoch, and keeps a fingerprint of it. It answers `RETRY_CONFLICT` to a changed body under the same operation. It also refuses a new operation whose message ID a row or journal entry of that mailbox holds. The message ID alone is not the operation key | Signal stores nothing on the server for a send attempt | A refused body is replaced in one write. A crash before the post of the replaced body posts it on resume. A `RETRY_CONFLICT` answer to a group shared post counts as acceptance and raises no `onSignalProtocolRelayProtocolError` report |
931
932
  | D11 | A group restart keeps the group ciphertext, seals the shared body again, and replaces it in one write. It does not encrypt the content again | One group pass posts the same ciphertext in the shared body and in the device posts. A new ciphertext would change a device post that the Relay already accepted. The Relay keys that post by its operation, so its replay would get `RETRY_CONFLICT`. The message-ID check of each mailbox also refuses a new operation under the same message ID | Signal's Desktop client encrypts again for each attempt | The group ciphertext is byte-equal before and after the replacement, the accepted device post replays to its stored receipt, and the new body names the repaired destinations. A repaired pre-message that gets `RETRY_CONFLICT` records no sender-key handoff |
932
933
  | D12 | A declared post with no `recipientRegistrationId` skips the registration check | The field is optional on every Relay route | Signal's server compares the registration of each device of a post | A Relay test posts an unnamed registration |
933
934
  | D13 | A declaration that names the sender device gets 400 | The Relay refuses a malformed declaration before it compares | Signal's server answers 409 and names the sender device as an extra device | Relay tests on the direct and the group routes. The SDK does not declare the sender device |
934
935
  | D14 | The identified group route compares the declared device set, with the codes and the order of the direct route | The route serves Relay API customers | Signal has no identified group route | Relay tests. No SDK code calls the route |
936
+ | D15 | When the Relay refuses a device post with `NOT_FOUND`, the SDK reads the device list of the account again. When the list names the device at a different mailbox generation, the SDK handles the refusal as a stale device: it archives the session, starts a new session from the new prekey bundle, and posts again only to the new generation, under the same message ID and epoch. When the list names the same generation, does not name the device, or cannot be read, the device keeps its `NOT_FOUND` refusal. The other devices of the account keep their acceptance | A recovered device keeps its device ID and gets a new registration and a new mailbox generation. The Relay refuses a post to a retired generation with `NOT_FOUND` before the mailbox records the delivery. It admits each destination device separately. The founder ruling "Relay delivery assurance takeover: twelve founder rulings on the stage run, fan-out baseline, SDK remainder, billing handoffs, log retention, CI shape and probes (2026-11-04, founder)" sets this path, with a check that the Relay charges no device twice | Signal's server refuses the whole request with 410 and names the stale devices. Signal's Android and Desktop clients then archive those sessions, encrypt again and send the request again. The Relay accepts the live devices of the same request, so a full resend would post them again | On each route, a post to a retired generation is followed by one post to the recovered generation with the first epoch. The live device and the recovered device each have one charge, and the retired generation has none. A restart and a replay add no charged post. A declared post gets the stale device-set refusal that drives the repair. A `NOT_FOUND` stays a refusal when the list names the same generation, does not name the device, or cannot be read |
935
937
 
936
938
  ### 5.7 Registration IDs of linked devices
937
939
 
@@ -978,7 +980,7 @@ which sends a group key sync to the own devices.
978
980
 
979
981
  ### 5.9 The posting deadline and send progress
980
982
 
981
- Reviewed: 2026-11-01.
983
+ Reviewed: 2026-11-04.
982
984
 
983
985
  Signal's Android client gives a send job a lifespan of one day from its
984
986
  creation, and Signal's Desktop client stops a send job one day after its
@@ -994,7 +996,7 @@ A retry request has its own posting deadline, in row P9. The following details d
994
996
 
995
997
  | ID | Deviation | Constraint | Why Signal's form does not fit | Guarantee test |
996
998
  |---|---|---|---|---|
997
- | P1 | The deadline is the earlier of 24 hours after the SDK first stores the send and 24 hours after its `clientTimestamp` | The epoch of each post is the send timestamp, and the Relay admits an epoch at most 24 hours behind its clock. A founder ruling sets this term | Signal has no caller timestamp and no admission window | A send backdated by 23 hours posts inside the remaining hour and posts nothing after it. A send backdated by 24 hours posts nothing and throws `SendNeverAcceptedByRelayError` |
999
+ | P1 | The deadline is the earlier of 24 hours after the SDK first stores the send and 24 hours after its `clientTimestamp` | The epoch of each post is the send timestamp, and the Relay admits an epoch at most 24 hours behind its clock. A founder ruling sets this term | Signal has no caller timestamp and no admission window | A send backdated by 23 hours posts inside the remaining hour and posts nothing after it. A send backdated by 24 hours posts nothing and throws `SendNeverAcceptedBySignalProtocolRelayError` |
998
1000
  | P2 | The deadline has no message-expiry term | The SDK has no message expiry. `SendOptions.expiresIn` is a future feature. The founder ruling "DA1 F1 posting window terms: the 24-hour terms only, no expiry term until a message expiry feature exists (2026-10-28, founder)" sets this term. When that feature ships, its timer starts after acceptance and controls local deletion only, and it never ends a pending post | Signal starts its expiry timer after the send | The stored deadline is 24 hours after the clock read that first stores the send, with no other term. At `deadlineAt` plus 1 ms, a replay of a declared or an undeclared send posts nothing and throws `SendAcceptanceUnknownError` |
999
1001
  | P3 | A replay, a restart or a repair never moves the deadline | The deadline bounds the age of the kept epoch, and the Relay refuses an older epoch. A founder ruling says that retries and restarts never reset it | Signal's Android client starts a new job for a pending send | The deadline after a replay, a restart and a repair equals the first stored value. The deadline read after a restart equals the stored value |
1000
1002
  | P4 | A device whose Relay answer is lost, or whose answer follows an uncertain request, ends acceptance-unknown, not failed | The Relay can accept a post whose answer the SDK does not get, and a later post under the same ID can add one charged unit | Signal's Desktop client shows such a send as failed | An unanswered post and then an `OPERATION_EXPIRED` refusal end with `SendAcceptanceUnknownError`. A replay with no stored evidence for a device does not count that device as refused |
@@ -1004,6 +1006,7 @@ A retry request has its own posting deadline, in row P9. The following details d
1004
1006
  | P8 | A manual resend with `resendMessage` after a send end is a new operation. It has a fresh stored operation time, the message ID `<clientMessageId>:manual:N` and its own posting deadline 24 hours after its creation. Its content keeps the original timestamp, and the receive queue of a recipient drops a copy with the same sender and the same original timestamp. The drop needs the timestamp that the content adapter reads from the message, so raw string or byte content takes no drop key and a recipient that holds it receives the copy again. A resend of a group send posts the content of its send log entry, so each copy carries the group context of the original send, not the current one. The recipient records the message with the completion of its receive record. When a delivery receipt is due, it records the message right after the receipt-due write and again with the completion of the receipt. The record expires after 60 days. The caller-origin receive path gives every decrypted message to the caller, and a caller that keeps its own records removes a copy itself. Only a send younger than 30 days takes a new manual resend. The Relay can charge the resend as a new message, and the message might already have arrived | The Relay admits an operation time at most 24 hours behind its clock and charges each accepted operation. The founder ruling "DA1 F4 manual resend identity: a fresh operation epoch with the original timestamp in the content (2026-10-28, founder)" sets this identity. The SDK encrypts the content again for each device, as the retry-request resend does | Signal's clients resend the stored message with its original timestamp in a new job, and the receivers drop a copy by sender and timestamp alone. The SDK uses the same key. The key has no conversation, so a sent transcript from a second own device with the same timestamp drops with no hook, also when the two transcripts name two conversations. A Signal client drops a duplicate transcript by the same key, so that drop is upstream-equal behavior and not a deviation. Signal's server keeps no operation time and charges no send | A resend posts under a fresh operation time and the manual message ID, with the original timestamp in the content. The Relay admits it after the original ended at its deadline. The entry stores its operation time, and a stored send without manual entries reads as an empty list. A recipient that holds the original drops the resend copy, and a recipient that never got the original receives it once. A later message of the same sender with the same timestamp drops, from any device of the sender. Two own devices send transcripts with one timestamp to two conversations, and the second transcript drops with no hook. When no receipt is owed, a stop before the completion of the receive record runs `onMessageDecrypted` again. When a receipt is owed, only a stop before the receipt-due write runs it again. A new resend at or after 30 days from the send throws and posts nothing |
1005
1007
  | P9 | A retry request has a posting deadline 24 hours after the first failure of its message, and no post starts at or after it. A request whose post is due then ends as `posting-deadline`. After its posting deadline, a request whose post the Relay accepted posts nothing more and waits for its content until its 14-day deadline. At that deadline, a retry request whose latest attempt the Relay answered or holds ends as `request-expired` and resets no session. A retry request whose latest attempt the Relay did not accept ends as `posting-deadline`. `OPERATION_EXPIRED` before the posting deadline ends the request as `posting-deadline` with acceptance unknown. Each `posting-deadline` end resets the session, emits one `onRetryTerminal` event and posts no replacement attempt. At client start, the SDK moves each stored retry request record to the current key prefix, and rewrites a stored `expired-content` end as `request-expired` with its time, its emitted flag and its recovery. The reader also reads a stored `expired-content` end as `request-expired`, until the next major SDK version and for at least 60 days after the publish day of 14.0.0 | The Relay admits an epoch at most 24 hours behind its clock. Its `OPERATION_EXPIRED` also answers an accepted operation that left its retained period, so it does not prove that the Relay holds nothing. The founder ruling "DA1 F3 OPERATION_EXPIRED before the posting deadline: end as acceptance-unknown now, resend on proof after DA1-Q3 (2026-10-28, founder)" sets this end. The version 2 code `DELIVERY_ALREADY_ACCEPTED` proves that the Relay holds the attempt, so a retry request reads it as `RETRY_CONFLICT` and posts no replacement | Signal's server refuses a send only for a wrong device set, before it stores anything, so a Signal client repairs and sends again at once. Signal's Android client gives its retry receipt job a lifespan of one day | A stored attempt that gets `OPERATION_EXPIRED` before the posting deadline posts no attempt 2, ends as `posting-deadline`, resets the session and emits one `onRetryTerminal` event. A fresh attempt and a stale-session repeat end the same way. No retry request posts at or after its first failure plus 24 hours, also after a restart. A request whose post the Relay accepted posts nothing after its posting deadline, ends as `request-expired` at its deadline and resets no session. A request whose posts all failed, and that no pass ended at its posting deadline, ends as `posting-deadline` at its deadline and resets the session. The class `request-expired` is not the delivery error cause `request-ended`. A stored `expired-content` end moves to the current prefix as `request-expired`, with its time, its emitted flag and its recovery kept. A stored `expired-content` record that the move has not reached reads as `request-expired`. A retry request that SDK 13.3 stored derives the posting deadline from its first failure, at most its deadline. A stored `posting-deadline` record reads back, and an unknown terminal class or a posting deadline that is not a number still reads as corrupt |
1006
1008
  | P10 | With a store that implements `listMetadataKeys`, as every built-in store does, the SDK replays each open send at start and when the Relay connection returns, ends each send at its posting deadline, and reports each end once through `onSendOutcome`. An internal send of the SDK, such as a sender key distribution, never reaches `onSendOutcome`. The SDK keeps no content of a sender key distribution at rest, so it does not replay one: with the listing method, it ends an open distribution at its deadline and reports nothing, and a retry request of the receiver recovers a lost distribution, as in Signal. An open sender key distribution that an earlier SDK version stored carries no marker, so the SDK reports `content-required` for it once for each client run before its deadline, and reports its end through `onSendOutcome` once, at its deadline. When the stored plaintext of an open send is gone or does not match the send, the SDK reports `content-required` once for each client run, and the send stays open until its deadline. On a custom store without the optional listing method, the SDK does not replay open sends by itself, and the application replays with the same `clientMessageId` | The founder ruling "Managed-group receive follows Signal's complete workflow (DA13-L correction)" keeps custom stores supported through a documented contract and conformance tests, so the store contract does not require the listing method. The SDK keeps the plaintext of a send only when the store and the content recovery policy keep resendable content | Signal's clients keep each pending send as a job, with its content, in their own database, and run the job queue at start and when the network returns. The SDK runs on a store that the application provides, and that store can keep no content | An open send replays at start under its stored epoch and bytes, and again when the Relay connection returns. A send past its deadline at start ends with the class that its stored progress gives, posts nothing, and reports once, also across a restart before the report. A send whose plaintext is gone or does not match its digest reports `content-required` once for each client run. A store without the method starts no driver, logs one line, and still reports the end of an application send, and the conformance suite skips its listing cases on that store |
1009
+ | P11 | After a `PERIOD_CLOSED` refusal of a device post, the SDK posts the same request one more time, with the same message ID, epoch and bytes. It does not encrypt again. When the Relay refuses the repeat with `PERIOD_CLOSED` too, the device stays pending: the send throws a retryable error with its deadline, the send stays open, and a later replay posts the same operation. On the sealed route the error code is `DELIVERY_FAILED`, because that route gives each code outside its safe codes as `DELIVERY_FAILED` | The Relay refuses a new admission with `PERIOD_CLOSED` when its admission period ended. It refuses after its duplicate check and before it stores the post, and it reads the period again for each request. The founder ruling "Relay delivery assurance takeover: twelve founder rulings on the stage run, fan-out baseline, SDK remainder, billing handoffs, log retention, CI shape and probes (2026-11-04, founder)" sets one automatic repeat of the same operation | Signal's server has no admission period and no `PERIOD_CLOSED` answer | On each route, a `PERIOD_CLOSED` refusal and then an acceptance end the send with one charged operation under one epoch. Two `PERIOD_CLOSED` refusals make two identical posts and keep the send open with no outcome, and a later replay completes the same operation with one charge. The sealed carrier repeats an identical body once and does not repeat a `QUOTA_EXCEEDED` refusal |
1007
1010
 
1008
1011
  ---
1009
1012
 
@@ -1684,6 +1687,53 @@ readable count and no key or value, and that a second open logs nothing.
1684
1687
 
1685
1688
  ---
1686
1689
 
1690
+ ## 9. Relay mailbox socket
1691
+
1692
+ Reviewed: 2026-11-04.
1693
+
1694
+ The hosted transport keeps one mailbox socket to the Relay for each
1695
+ subscription (`client/hosted-mailbox-subscription.ts`). Signal's clients keep
1696
+ one authenticated chat socket to Signal's server. This section states where
1697
+ the two follow the same model and where they differ.
1698
+
1699
+ ### 9.1 The socket outlives its handshake token
1700
+
1701
+ **Faithful.** The socket sends the device token once, in its handshake
1702
+ subprotocol, and the Relay authorizes it there. The socket stays open until
1703
+ the Relay closes it or it fails. A token renewal does not close or reopen it.
1704
+ Signal's Android client sends its credentials only in the handshake request
1705
+ (`OkHttpWebSocketConnection.java:167`), and `libsignal` attaches its
1706
+ authenticated headers to the initial websocket connect (`chat.rs:201-206`).
1707
+ When the authority must be checked again, the Relay closes the socket with
1708
+ 4401 `AUTHORITY_REVALIDATE`, and the subscription reconnects. Signal's server
1709
+ closes the chat socket with 4401 "Reauthentication required" for the same
1710
+ purpose (`WebSocketDisconnectionRequestListener.java:31`).
1711
+
1712
+ **Deviation** in detail. Signal's credential is a long-lived account
1713
+ password. The Relay credential is a device token that expires 15 minutes
1714
+ after it is issued. The open socket outlives the token. The hosted transport
1715
+ renews the token only when an HTTP request or a reconnect needs it. The Relay
1716
+ also closes the socket with 4401 at the end of the usage period that the
1717
+ handshake counted in, which is the end of the billing period for a paid
1718
+ Production project and the start of the next UTC month for other projects, so
1719
+ that a long-lived socket counts once in the monthly activity of the next
1720
+ period.
1721
+
1722
+ The constraint is that the Relay issues a short-lived device token and checks
1723
+ it on each HTTP request. A device that only receives sends no pull, so the
1724
+ Relay counts its monthly activity at the socket handshake.
1725
+ **Consequence:** a revocation, an account deletion, a security hold, or a
1726
+ recovery change reaches an open socket only through the 4401 close. A Relay
1727
+ that does not send that close keeps serving an open socket after the token
1728
+ expires.
1729
+
1730
+ Guarantee tests assert that one socket stays open across two token renewals
1731
+ while Relay receipts continue on it, that a 4401 close after the renewals
1732
+ reconnects with the current token, and that each presence watch stays on the
1733
+ open socket across a renewal.
1734
+
1735
+ ---
1736
+
1687
1737
  ## Unverified and needs review
1688
1738
 
1689
1739
  This review lists the following items rather than asserts them. It could not