@open-e2ee/signal-protocol-sdk 8.1.0 → 9.0.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 (387) hide show
  1. package/ADAPTERS.md +13 -31
  2. package/ARCHITECTURE.md +5 -7
  3. package/CHANGELOG.md +258 -0
  4. package/README.md +36 -48
  5. package/SECURITY.md +2 -2
  6. package/client/README.md +9 -0
  7. package/device/README.md +16 -7
  8. package/dist/client/client.d.ts +25 -16
  9. package/dist/client/client.d.ts.map +1 -1
  10. package/dist/client/client.js +115 -95
  11. package/dist/client/client.js.map +1 -1
  12. package/dist/client/config.d.ts +10 -17
  13. package/dist/client/config.d.ts.map +1 -1
  14. package/dist/client/config.js.map +1 -1
  15. package/dist/client/event-hooks.js +27 -0
  16. package/dist/client/event-hooks.js.map +1 -1
  17. package/dist/client/group-outbox.d.ts +31 -1
  18. package/dist/client/group-outbox.d.ts.map +1 -1
  19. package/dist/client/group-outbox.js +67 -58
  20. package/dist/client/group-outbox.js.map +1 -1
  21. package/dist/client/group-receive-authorization.d.ts +5 -0
  22. package/dist/client/group-receive-authorization.d.ts.map +1 -0
  23. package/dist/client/group-receive-authorization.js +32 -0
  24. package/dist/client/group-receive-authorization.js.map +1 -0
  25. package/dist/client/group-sender-key-operations.d.ts +15 -0
  26. package/dist/client/group-sender-key-operations.d.ts.map +1 -0
  27. package/dist/client/group-sender-key-operations.js +31 -0
  28. package/dist/client/group-sender-key-operations.js.map +1 -0
  29. package/dist/client/groups.d.ts +3 -1
  30. package/dist/client/groups.d.ts.map +1 -1
  31. package/dist/client/groups.js +5 -2
  32. package/dist/client/groups.js.map +1 -1
  33. package/dist/client/hosted-anonymous-delivery.d.ts +9 -1
  34. package/dist/client/hosted-anonymous-delivery.d.ts.map +1 -1
  35. package/dist/client/hosted-anonymous-delivery.js +61 -22
  36. package/dist/client/hosted-anonymous-delivery.js.map +1 -1
  37. package/dist/client/hosted-transport.d.ts +7 -0
  38. package/dist/client/hosted-transport.d.ts.map +1 -1
  39. package/dist/client/hosted-transport.js +44 -6
  40. package/dist/client/hosted-transport.js.map +1 -1
  41. package/dist/client/key-rotation.d.ts.map +1 -1
  42. package/dist/client/key-rotation.js +2 -4
  43. package/dist/client/key-rotation.js.map +1 -1
  44. package/dist/client/prekeys.d.ts.map +1 -1
  45. package/dist/client/prekeys.js +1 -1
  46. package/dist/client/prekeys.js.map +1 -1
  47. package/dist/client/relay-device-refusal.d.ts +32 -0
  48. package/dist/client/relay-device-refusal.d.ts.map +1 -0
  49. package/dist/client/relay-device-refusal.js +36 -0
  50. package/dist/client/relay-device-refusal.js.map +1 -0
  51. package/dist/client/relay-subscription.d.ts +2 -0
  52. package/dist/client/relay-subscription.d.ts.map +1 -1
  53. package/dist/client/relay-subscription.js +3 -1
  54. package/dist/client/relay-subscription.js.map +1 -1
  55. package/dist/client/relay-work.d.ts +26 -0
  56. package/dist/client/relay-work.d.ts.map +1 -1
  57. package/dist/client/relay-work.js +37 -0
  58. package/dist/client/relay-work.js.map +1 -1
  59. package/dist/client/sealed-sender.d.ts.map +1 -1
  60. package/dist/client/sealed-sender.js +12 -17
  61. package/dist/client/sealed-sender.js.map +1 -1
  62. package/dist/client/sender-key-distribution.d.ts.map +1 -1
  63. package/dist/client/sender-key-distribution.js +4 -1
  64. package/dist/client/sender-key-distribution.js.map +1 -1
  65. package/dist/client/sessions.d.ts.map +1 -1
  66. package/dist/client/sessions.js +2 -4
  67. package/dist/client/sessions.js.map +1 -1
  68. package/dist/client/signal-service-cipher.d.ts +94 -6
  69. package/dist/client/signal-service-cipher.d.ts.map +1 -1
  70. package/dist/client/signal-service-cipher.js +483 -184
  71. package/dist/client/signal-service-cipher.js.map +1 -1
  72. package/dist/client/types.d.ts +7 -0
  73. package/dist/client/types.d.ts.map +1 -1
  74. package/dist/client/types.js.map +1 -1
  75. package/dist/index.d.ts +27 -21
  76. package/dist/index.d.ts.map +1 -1
  77. package/dist/index.js +8 -17
  78. package/dist/index.js.map +1 -1
  79. package/dist/internal/crypto/pq/kyber.d.ts +1 -1
  80. package/dist/internal/crypto/pq/kyber.js +1 -1
  81. package/dist/internal/encoding/proto/sender-key-message.d.ts +2 -2
  82. package/dist/internal/encoding/proto/sender-key-message.d.ts.map +1 -1
  83. package/dist/internal/encoding/proto/sender-key-message.js +5 -2
  84. package/dist/internal/encoding/proto/sender-key-message.js.map +1 -1
  85. package/dist/internal/groups/manager.d.ts.map +1 -1
  86. package/dist/internal/groups/manager.js +5 -2
  87. package/dist/internal/groups/manager.js.map +1 -1
  88. package/dist/internal/groups/wire.d.ts +0 -2
  89. package/dist/internal/groups/wire.d.ts.map +1 -1
  90. package/dist/internal/groups/wire.js +0 -6
  91. package/dist/internal/groups/wire.js.map +1 -1
  92. package/dist/internal/manager/manager.d.ts +8 -7
  93. package/dist/internal/manager/manager.d.ts.map +1 -1
  94. package/dist/internal/manager/manager.js +34 -37
  95. package/dist/internal/manager/manager.js.map +1 -1
  96. package/dist/internal/protocol/double-ratchet/ratchet.d.ts +0 -17
  97. package/dist/internal/protocol/double-ratchet/ratchet.d.ts.map +1 -1
  98. package/dist/internal/protocol/double-ratchet/ratchet.js +0 -4
  99. package/dist/internal/protocol/double-ratchet/ratchet.js.map +1 -1
  100. package/dist/internal/protocol/sealed-sender/certificate.d.ts +2 -32
  101. package/dist/internal/protocol/sealed-sender/certificate.d.ts.map +1 -1
  102. package/dist/internal/protocol/sealed-sender/certificate.js +4 -85
  103. package/dist/internal/protocol/sealed-sender/certificate.js.map +1 -1
  104. package/dist/internal/protocol/sealed-sender/index.d.ts +2 -2
  105. package/dist/internal/protocol/sealed-sender/index.d.ts.map +1 -1
  106. package/dist/internal/protocol/sealed-sender/index.js +2 -6
  107. package/dist/internal/protocol/sealed-sender/index.js.map +1 -1
  108. package/dist/internal/protocol/sealed-sender/proto/index.d.ts +0 -19
  109. package/dist/internal/protocol/sealed-sender/proto/index.d.ts.map +1 -1
  110. package/dist/internal/protocol/sealed-sender/proto/index.js +1 -48
  111. package/dist/internal/protocol/sealed-sender/proto/index.js.map +1 -1
  112. package/dist/internal/protocol/sender-keys/manager.d.ts +9 -13
  113. package/dist/internal/protocol/sender-keys/manager.d.ts.map +1 -1
  114. package/dist/internal/protocol/sender-keys/manager.js +90 -95
  115. package/dist/internal/protocol/sender-keys/manager.js.map +1 -1
  116. package/dist/internal/protocol/spqr/index.d.ts +1 -1
  117. package/dist/internal/protocol/spqr/index.d.ts.map +1 -1
  118. package/dist/internal/protocol/spqr/index.js +2 -2
  119. package/dist/internal/protocol/spqr/index.js.map +1 -1
  120. package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.d.ts +0 -2
  121. package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.d.ts.map +1 -1
  122. package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.js +4 -12
  123. package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.js.map +1 -1
  124. package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts.map +1 -1
  125. package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.js +1 -3
  126. package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.js.map +1 -1
  127. package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts +1 -0
  128. package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts.map +1 -1
  129. package/dist/internal/protocol/spqr/serialize.d.ts.map +1 -1
  130. package/dist/internal/protocol/spqr/serialize.js +1 -4
  131. package/dist/internal/protocol/spqr/serialize.js.map +1 -1
  132. package/dist/internal/protocol/spqr/spqr.d.ts +1 -1
  133. package/dist/internal/protocol/spqr/spqr.d.ts.map +1 -1
  134. package/dist/internal/protocol/spqr/spqr.js +2 -3
  135. package/dist/internal/protocol/spqr/spqr.js.map +1 -1
  136. package/dist/internal/protocol/x3dh/x3dh.d.ts.map +1 -1
  137. package/dist/internal/protocol/x3dh/x3dh.js +1 -1
  138. package/dist/internal/protocol/x3dh/x3dh.js.map +1 -1
  139. package/dist/internal/protocol/zk/credentials/credentials.d.ts +3 -54
  140. package/dist/internal/protocol/zk/credentials/credentials.d.ts.map +1 -1
  141. package/dist/internal/protocol/zk/credentials/credentials.js +4 -91
  142. package/dist/internal/protocol/zk/credentials/credentials.js.map +1 -1
  143. package/dist/internal/protocol/zk/credentials/endorsements.d.ts +3 -64
  144. package/dist/internal/protocol/zk/credentials/endorsements.d.ts.map +1 -1
  145. package/dist/internal/protocol/zk/credentials/endorsements.js +4 -134
  146. package/dist/internal/protocol/zk/credentials/endorsements.js.map +1 -1
  147. package/dist/internal/protocol/zk/credentials/index.d.ts +3 -3
  148. package/dist/internal/protocol/zk/credentials/index.d.ts.map +1 -1
  149. package/dist/internal/protocol/zk/credentials/index.js +3 -3
  150. package/dist/internal/protocol/zk/credentials/index.js.map +1 -1
  151. package/dist/internal/protocol/zk/credentials/issuance.d.ts +3 -26
  152. package/dist/internal/protocol/zk/credentials/issuance.d.ts.map +1 -1
  153. package/dist/internal/protocol/zk/credentials/issuance.js +3 -80
  154. package/dist/internal/protocol/zk/credentials/issuance.js.map +1 -1
  155. package/dist/internal/protocol/zk/credentials/presentation.d.ts +4 -73
  156. package/dist/internal/protocol/zk/credentials/presentation.d.ts.map +1 -1
  157. package/dist/internal/protocol/zk/credentials/presentation.js +4 -152
  158. package/dist/internal/protocol/zk/credentials/presentation.js.map +1 -1
  159. package/dist/internal/protocol/zk/groups/auth-credential.d.ts +1 -61
  160. package/dist/internal/protocol/zk/groups/auth-credential.d.ts.map +1 -1
  161. package/dist/internal/protocol/zk/groups/auth-credential.js +2 -196
  162. package/dist/internal/protocol/zk/groups/auth-credential.js.map +1 -1
  163. package/dist/internal/protocol/zk/groups/group-send-endorsement.d.ts +1 -86
  164. package/dist/internal/protocol/zk/groups/group-send-endorsement.d.ts.map +1 -1
  165. package/dist/internal/protocol/zk/groups/group-send-endorsement.js +1 -152
  166. package/dist/internal/protocol/zk/groups/group-send-endorsement.js.map +1 -1
  167. package/dist/internal/protocol/zk/groups/index.d.ts +4 -4
  168. package/dist/internal/protocol/zk/groups/index.d.ts.map +1 -1
  169. package/dist/internal/protocol/zk/groups/index.js +4 -4
  170. package/dist/internal/protocol/zk/groups/index.js.map +1 -1
  171. package/dist/internal/protocol/zk/groups/profile-key-credential.d.ts +2 -57
  172. package/dist/internal/protocol/zk/groups/profile-key-credential.d.ts.map +1 -1
  173. package/dist/internal/protocol/zk/groups/profile-key-credential.js +2 -174
  174. package/dist/internal/protocol/zk/groups/profile-key-credential.js.map +1 -1
  175. package/dist/internal/protocol/zk/groups/server-params.d.ts +8 -72
  176. package/dist/internal/protocol/zk/groups/server-params.d.ts.map +1 -1
  177. package/dist/internal/protocol/zk/groups/server-params.js +8 -108
  178. package/dist/internal/protocol/zk/groups/server-params.js.map +1 -1
  179. package/dist/internal/protocol/zk/proofs/sign.d.ts +1 -2
  180. package/dist/internal/protocol/zk/proofs/sign.d.ts.map +1 -1
  181. package/dist/internal/protocol/zk/proofs/sign.js +2 -11
  182. package/dist/internal/protocol/zk/proofs/sign.js.map +1 -1
  183. package/dist/internal/sesame/device-registry.d.ts +24 -4
  184. package/dist/internal/sesame/device-registry.d.ts.map +1 -1
  185. package/dist/internal/sesame/device-registry.js +55 -28
  186. package/dist/internal/sesame/device-registry.js.map +1 -1
  187. package/dist/internal/sesame/manager.d.ts +79 -11
  188. package/dist/internal/sesame/manager.d.ts.map +1 -1
  189. package/dist/internal/sesame/manager.js +381 -280
  190. package/dist/internal/sesame/manager.js.map +1 -1
  191. package/dist/internal/session/cipher.d.ts +0 -5
  192. package/dist/internal/session/cipher.d.ts.map +1 -1
  193. package/dist/internal/session/cipher.js +3 -9
  194. package/dist/internal/session/cipher.js.map +1 -1
  195. package/dist/internal/session/ratchet.d.ts.map +1 -1
  196. package/dist/internal/session/ratchet.js +0 -2
  197. package/dist/internal/session/ratchet.js.map +1 -1
  198. package/dist/internal/session/record-locks.d.ts +46 -0
  199. package/dist/internal/session/record-locks.d.ts.map +1 -0
  200. package/dist/internal/session/record-locks.js +72 -0
  201. package/dist/internal/session/record-locks.js.map +1 -0
  202. package/dist/local/store/expo/adapter.d.ts +8 -2
  203. package/dist/local/store/expo/adapter.d.ts.map +1 -1
  204. package/dist/local/store/expo/adapter.js +24 -3
  205. package/dist/local/store/expo/adapter.js.map +1 -1
  206. package/dist/local/store/expo/driver.d.ts +7 -0
  207. package/dist/local/store/expo/driver.d.ts.map +1 -1
  208. package/dist/local/store/expo/driver.js +16 -0
  209. package/dist/local/store/expo/driver.js.map +1 -1
  210. package/dist/local/store/key-value/adapter.d.ts +3 -3
  211. package/dist/local/store/key-value/adapter.d.ts.map +1 -1
  212. package/dist/local/store/key-value/adapter.js +91 -53
  213. package/dist/local/store/key-value/adapter.js.map +1 -1
  214. package/dist/local/store/key-value/backend-conformance.d.ts.map +1 -1
  215. package/dist/local/store/key-value/backend-conformance.js +25 -0
  216. package/dist/local/store/key-value/backend-conformance.js.map +1 -1
  217. package/dist/local/store/key-value/batch.d.ts +3 -1
  218. package/dist/local/store/key-value/batch.d.ts.map +1 -1
  219. package/dist/local/store/key-value/batch.js +9 -1
  220. package/dist/local/store/key-value/batch.js.map +1 -1
  221. package/dist/local/store/key-value/storage.d.ts +6 -0
  222. package/dist/local/store/key-value/storage.d.ts.map +1 -1
  223. package/dist/local/store/key-value/transactional-backend.d.ts +1 -1
  224. package/dist/local/store/key-value/transactional-backend.js +1 -1
  225. package/dist/local/store/memory/adapter.d.ts +13 -3
  226. package/dist/local/store/memory/adapter.d.ts.map +1 -1
  227. package/dist/local/store/memory/adapter.js +122 -73
  228. package/dist/local/store/memory/adapter.js.map +1 -1
  229. package/dist/local/store/reliability.d.ts +16 -0
  230. package/dist/local/store/reliability.d.ts.map +1 -1
  231. package/dist/local/store/reliability.js +58 -28
  232. package/dist/local/store/reliability.js.map +1 -1
  233. package/dist/local/store/sqlite/migrations.d.ts.map +1 -1
  234. package/dist/local/store/sqlite/migrations.js +18 -0
  235. package/dist/local/store/sqlite/migrations.js.map +1 -1
  236. package/dist/local/store/sqlite/models/skipped-sender-key.d.ts +3 -3
  237. package/dist/local/store/sqlite/models/skipped-sender-key.d.ts.map +1 -1
  238. package/dist/local/store/sqlite/models/skipped-sender-key.js +13 -17
  239. package/dist/local/store/sqlite/models/skipped-sender-key.js.map +1 -1
  240. package/dist/local/store/sqlite/store.d.ts +3 -3
  241. package/dist/local/store/sqlite/store.d.ts.map +1 -1
  242. package/dist/local/store/sqlite/store.js +53 -23
  243. package/dist/local/store/sqlite/store.js.map +1 -1
  244. package/dist/local/store/web/adapter.d.ts +3 -3
  245. package/dist/local/store/web/adapter.d.ts.map +1 -1
  246. package/dist/local/store/web/adapter.js +122 -73
  247. package/dist/local/store/web/adapter.js.map +1 -1
  248. package/dist/local/vault/electron-safe-storage.d.ts.map +1 -1
  249. package/dist/local/vault/electron-safe-storage.js +15 -2
  250. package/dist/local/vault/electron-safe-storage.js.map +1 -1
  251. package/dist/profile/index.d.ts +2 -1
  252. package/dist/profile/index.d.ts.map +1 -1
  253. package/dist/profile/index.js +2 -1
  254. package/dist/profile/index.js.map +1 -1
  255. package/dist/profile/own-profile-key.d.ts +42 -0
  256. package/dist/profile/own-profile-key.d.ts.map +1 -0
  257. package/dist/profile/own-profile-key.js +64 -0
  258. package/dist/profile/own-profile-key.js.map +1 -0
  259. package/dist/profile/profile-key.d.ts +1 -34
  260. package/dist/profile/profile-key.d.ts.map +1 -1
  261. package/dist/profile/profile-key.js +3 -63
  262. package/dist/profile/profile-key.js.map +1 -1
  263. package/dist/profile/update-service.js +1 -1
  264. package/dist/profile/update-service.js.map +1 -1
  265. package/dist/remote/relay/index.d.ts +4 -7
  266. package/dist/remote/relay/index.d.ts.map +1 -1
  267. package/dist/remote/relay/index.js +5 -7
  268. package/dist/remote/relay/index.js.map +1 -1
  269. package/dist/remote/relay/types.d.ts +3 -3
  270. package/dist/types/api.d.ts +29 -8
  271. package/dist/types/api.d.ts.map +1 -1
  272. package/dist/username/link.d.ts.map +1 -1
  273. package/dist/username/link.js +1 -5
  274. package/dist/username/link.js.map +1 -1
  275. package/dist/utils/bounded-fan-out.d.ts +99 -0
  276. package/dist/utils/bounded-fan-out.d.ts.map +1 -0
  277. package/dist/utils/bounded-fan-out.js +180 -0
  278. package/dist/utils/bounded-fan-out.js.map +1 -0
  279. package/dist/utils/keyed-lock.d.ts +16 -0
  280. package/dist/utils/keyed-lock.d.ts.map +1 -0
  281. package/dist/utils/keyed-lock.js +39 -0
  282. package/dist/utils/keyed-lock.js.map +1 -0
  283. package/dist/versions.d.ts +3 -3
  284. package/dist/versions.js +3 -3
  285. package/dist/zk/credentials.d.ts +2 -2
  286. package/dist/zk/credentials.js +2 -2
  287. package/dist/zk/groups.d.ts +3 -3
  288. package/dist/zk/groups.d.ts.map +1 -1
  289. package/dist/zk/groups.js +3 -3
  290. package/dist/zk/groups.js.map +1 -1
  291. package/docs/ASSURANCE.md +69 -28
  292. package/docs/CLIENT_COMPOSITION.md +9 -3
  293. package/docs/DEVIATIONS.md +45 -27
  294. package/docs/GETTING_STARTED.md +42 -320
  295. package/docs/INTERFACES.md +7 -7
  296. package/docs/PACKAGE_SURFACE.md +14 -16
  297. package/docs/RECIPES.md +6 -112
  298. package/groups/README.md +9 -1
  299. package/hooks/README.md +11 -2
  300. package/local/store/README.md +26 -6
  301. package/local/store/expo/README.md +18 -5
  302. package/local/store/key-value/README.md +5 -3
  303. package/local/store/node/README.md +2 -1
  304. package/local/store/web-sqlite/README.md +28 -8
  305. package/local/vault/README.md +21 -2
  306. package/package.json +1 -30
  307. package/remote/README.md +12 -78
  308. package/remote/object-store/convex-r2/README.md +20 -42
  309. package/remote/relay/README.md +21 -18
  310. package/zk/README.md +6 -7
  311. package/dist/client/dual-store.d.ts +0 -70
  312. package/dist/client/dual-store.d.ts.map +0 -1
  313. package/dist/client/dual-store.js +0 -123
  314. package/dist/client/dual-store.js.map +0 -1
  315. package/dist/client/multi-device.d.ts +0 -74
  316. package/dist/client/multi-device.d.ts.map +0 -1
  317. package/dist/client/multi-device.js +0 -105
  318. package/dist/client/multi-device.js.map +0 -1
  319. package/dist/groups/server.d.ts +0 -10
  320. package/dist/groups/server.d.ts.map +0 -1
  321. package/dist/groups/server.js +0 -6
  322. package/dist/groups/server.js.map +0 -1
  323. package/dist/internal/encoding/index.d.ts +0 -2
  324. package/dist/internal/encoding/index.d.ts.map +0 -1
  325. package/dist/internal/encoding/index.js +0 -2
  326. package/dist/internal/encoding/index.js.map +0 -1
  327. package/dist/internal/groups/server-engine.d.ts +0 -118
  328. package/dist/internal/groups/server-engine.d.ts.map +0 -1
  329. package/dist/internal/groups/server-engine.js +0 -1268
  330. package/dist/internal/groups/server-engine.js.map +0 -1
  331. package/dist/internal/protocol/index.d.ts +0 -24
  332. package/dist/internal/protocol/index.d.ts.map +0 -1
  333. package/dist/internal/protocol/index.js +0 -9
  334. package/dist/internal/protocol/index.js.map +0 -1
  335. package/dist/internal/protocol/sealed-sender/trust-root.d.ts +0 -56
  336. package/dist/internal/protocol/sealed-sender/trust-root.d.ts.map +0 -1
  337. package/dist/internal/protocol/sealed-sender/trust-root.js +0 -90
  338. package/dist/internal/protocol/sealed-sender/trust-root.js.map +0 -1
  339. package/dist/internal/protocol/triple-ratchet/index.d.ts +0 -21
  340. package/dist/internal/protocol/triple-ratchet/index.d.ts.map +0 -1
  341. package/dist/internal/protocol/triple-ratchet/index.js +0 -19
  342. package/dist/internal/protocol/triple-ratchet/index.js.map +0 -1
  343. package/dist/internal/protocol/triple-ratchet/ratchet.d.ts +0 -233
  344. package/dist/internal/protocol/triple-ratchet/ratchet.d.ts.map +0 -1
  345. package/dist/internal/protocol/triple-ratchet/ratchet.js +0 -254
  346. package/dist/internal/protocol/triple-ratchet/ratchet.js.map +0 -1
  347. package/dist/internal/protocol/zk/proofs/index.d.ts +0 -13
  348. package/dist/internal/protocol/zk/proofs/index.d.ts.map +0 -1
  349. package/dist/internal/protocol/zk/proofs/index.js +0 -7
  350. package/dist/internal/protocol/zk/proofs/index.js.map +0 -1
  351. package/dist/local/store/sqlite/index.d.ts +0 -20
  352. package/dist/local/store/sqlite/index.d.ts.map +0 -1
  353. package/dist/local/store/sqlite/index.js +0 -18
  354. package/dist/local/store/sqlite/index.js.map +0 -1
  355. package/dist/remote/object-store/convex-r2/server/index.d.ts +0 -2
  356. package/dist/remote/object-store/convex-r2/server/index.d.ts.map +0 -1
  357. package/dist/remote/object-store/convex-r2/server/index.js +0 -2
  358. package/dist/remote/object-store/convex-r2/server/index.js.map +0 -1
  359. package/dist/remote/object-store/convex-r2/server.d.ts +0 -129
  360. package/dist/remote/object-store/convex-r2/server.d.ts.map +0 -1
  361. package/dist/remote/object-store/convex-r2/server.js +0 -244
  362. package/dist/remote/object-store/convex-r2/server.js.map +0 -1
  363. package/dist/remote/relay/memory/adapter.d.ts +0 -252
  364. package/dist/remote/relay/memory/adapter.d.ts.map +0 -1
  365. package/dist/remote/relay/memory/adapter.js +0 -1058
  366. package/dist/remote/relay/memory/adapter.js.map +0 -1
  367. package/dist/remote/relay/memory/failures.d.ts +0 -58
  368. package/dist/remote/relay/memory/failures.d.ts.map +0 -1
  369. package/dist/remote/relay/memory/failures.js +0 -124
  370. package/dist/remote/relay/memory/failures.js.map +0 -1
  371. package/dist/remote/relay/memory/group-server.d.ts +0 -13
  372. package/dist/remote/relay/memory/group-server.d.ts.map +0 -1
  373. package/dist/remote/relay/memory/group-server.js +0 -19
  374. package/dist/remote/relay/memory/group-server.js.map +0 -1
  375. package/dist/remote/relay/memory/index.d.ts +0 -11
  376. package/dist/remote/relay/memory/index.d.ts.map +0 -1
  377. package/dist/remote/relay/memory/index.js +0 -7
  378. package/dist/remote/relay/memory/index.js.map +0 -1
  379. package/examples/browser/README.md +0 -35
  380. package/examples/browser/index.html +0 -27
  381. package/examples/browser/src/exchange.ts +0 -69
  382. package/examples/browser/src/main.ts +0 -63
  383. package/examples/browser/src/style.css +0 -9
  384. package/examples/browser/src/worker.ts +0 -10
  385. package/examples/browser/vite.config.ts +0 -9
  386. package/remote/relay/memory/README.md +0 -72
  387. package/scripts/oe-groups.mjs +0 -166
package/docs/RECIPES.md CHANGED
@@ -8,90 +8,11 @@
8
8
  Working shapes for the tasks applications do most often. Each example
9
9
  uses public exports only.
10
10
 
11
- ## Two local clients
11
+ ## Hosted Client Setup
12
12
 
13
- This local demo sends while Bob is offline so you can see the relay's encrypted
14
- envelope and Bob's decrypted plaintext in the same workflow.
15
-
16
- <!-- doc-snippet:run recipes-two-local-clients expect="bob decrypted: alice: hello" -->
17
- ```ts
18
- // Real protocol and cryptography; simulated in-memory infrastructure.
19
- import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
20
- import { inMemoryStore } from "@open-e2ee/signal-protocol-sdk/local/store/memory";
21
- import { inMemoryRelay } from "@open-e2ee/signal-protocol-sdk/remote/relay/memory";
22
-
23
- const relay = inMemoryRelay();
24
-
25
- // The relay knows which devices exist, but it does not get plaintext.
26
- await relay.registerDevice("alice", {
27
- encryptedDeviceName: new ArrayBuffer(0),
28
- });
29
- await relay.registerDevice("bob", { encryptedDeviceName: new ArrayBuffer(0) });
30
-
31
- // Each client represents one device. Its storage is local to that device.
32
- const alice = await createSignalProtocolClient({
33
- identity: { userId: "alice" },
34
- adapters: { storage: inMemoryStore(), relay },
35
- });
36
-
37
- const bob = await createSignalProtocolClient({
38
- identity: { userId: "bob" },
39
- adapters: { storage: inMemoryStore(), relay },
40
- });
41
-
42
- await alice.syncToServer();
43
- await bob.syncToServer();
44
-
45
- // Send while Bob is offline so we can inspect what the relay stores.
46
- const sent = await alice.send("bob", "hello");
47
- console.log("alice sent:", sent.messageId);
48
-
49
- // The relay-visible envelope contains metadata plus ciphertext, not plaintext.
50
- const [queuedEnvelope] = relay.getPendingMessages("bob", 1);
51
- const ciphertextLength =
52
- typeof queuedEnvelope.ciphertext === "string"
53
- ? queuedEnvelope.ciphertext.length
54
- : queuedEnvelope.ciphertext.byteLength;
55
- const ciphertextPreview =
56
- typeof queuedEnvelope.ciphertext === "string"
57
- ? `${queuedEnvelope.ciphertext.slice(0, 32)}...`
58
- : `${queuedEnvelope.ciphertext.byteLength} encrypted bytes`;
59
-
60
- console.log("relay sees encrypted envelope:", {
61
- messageType: queuedEnvelope.messageType,
62
- ciphertextLength,
63
- ciphertextPreview,
64
- });
65
-
66
- const decrypted = new Promise<void>((resolve) => {
67
- // Plaintext enters your app only after Bob's Signal Protocol client decrypts it.
68
- bob.registerHook("onMessageDecrypted", async (message) => {
69
- console.log("bob decrypted:", `${message.senderId}: ${message.content}`);
70
- resolve();
71
- });
72
- });
73
-
74
- // Starting the subscription delivers Bob's queued encrypted envelope.
75
- bob.startRelaySubscription();
76
- await decrypted;
77
- ```
78
-
79
- Example output:
80
-
81
- ```text
82
- alice sent: msg-1
83
- relay sees encrypted envelope: {
84
- messageType: 'prekey_bundle',
85
- ciphertextLength: 3464,
86
- ciphertextPreview: '<base64 ciphertext preview>...'
87
- }
88
- bob decrypted: alice: hello
89
- ```
90
-
91
- The first message usually uses a `prekey_bundle` envelope because it establishes
92
- the session. Later messages on the same session use `ciphertext`. In both cases
93
- the relay sees encrypted envelope bytes. Bob receives decrypted content only
94
- through the `onMessageDecrypted` hook.
13
+ The recipes require a configured Relay project, an identity-assertion callback,
14
+ and device-local storage. Use the Relay Sandbox for development. The
15
+ [getting-started guide](./GETTING_STARTED.md) describes these inputs.
95
16
 
96
17
  ## Production composition with Expo on the Signal Protocol Relay
97
18
 
@@ -114,35 +35,8 @@ const signal = await createHostedSignalProtocolClient({
114
35
  });
115
36
  ```
116
37
 
117
- Production bootstrapping must register or provision the current device with the
118
- relay before other clients rely on user-level send discovery. In Signal Protocol
119
- that belongs in the device lifecycle and authentication bootstrap. Expo apps
120
- must also complete the [database bootstrap](../local/store/expo/README.md)
121
- before creating the client.
122
-
123
- ## Local development
124
-
125
- <!-- doc-snippet:run recipes-local-development expect="" -->
126
- ```ts
127
- // Real protocol and cryptography; simulated in-memory infrastructure.
128
- import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
129
- import { inMemoryRelay } from "@open-e2ee/signal-protocol-sdk/remote/relay/memory";
130
- import { inMemoryStore } from "@open-e2ee/signal-protocol-sdk/local/store/memory";
131
-
132
- const relay = inMemoryRelay();
133
-
134
- const alice = await createSignalProtocolClient({
135
- // `identity` is the app account/device being represented.
136
- identity: { userId: "alice" },
137
- // `adapters` are the concrete storage/relay implementation for this run.
138
- adapters: { storage: inMemoryStore(), relay },
139
- });
140
-
141
- const bob = await createSignalProtocolClient({
142
- identity: { userId: "bob" },
143
- adapters: { storage: inMemoryStore(), relay },
144
- });
145
- ```
38
+ The hosted factory authenticates and registers the current device. Expo apps
39
+ must complete the [database setup](../local/store/expo/README.md) first.
146
40
 
147
41
  ## App message flow
148
42
 
package/groups/README.md CHANGED
@@ -11,7 +11,15 @@ backend stores opaque encrypted group state and sequences changes, while each
11
11
  member device owns group secrets, decrypted state, authorization credentials,
12
12
  and sender-key rotation.
13
13
 
14
- ## Usage
14
+ ## Client usage
15
+
16
+ The OpenE2EE Signal Protocol Relay supplies group authorization and encrypted
17
+ state storage. The SDK contains the group client, local cryptography, and public
18
+ transport types. Server authorization engines and credential issuers are outside
19
+ the published package.
20
+
21
+ The following advanced example composes an application-owned group transport.
22
+ Its credential callbacks request credentials from the authenticated service.
15
23
 
16
24
  <!-- doc-snippet:skip requires-external-context -->
17
25
  ```ts
package/hooks/README.md CHANGED
@@ -10,6 +10,16 @@ The core SDK is framework-neutral. React hooks live on a separate package
10
10
  subpath. Non-React consumers therefore do not load React, and UI code can
11
11
  subscribe to SDK state without duplicating effect cleanup.
12
12
 
13
+ ## Setup
14
+
15
+ Install the peers `react` 19.0.0 or later and `react-native` 0.83.6 or later.
16
+ The entry loads both, also in a web app: the relay lifecycle and key rotation
17
+ hooks read `AppState` from `react-native`.
18
+
19
+ ```sh
20
+ npm install react react-native
21
+ ```
22
+
13
23
  ## Usage
14
24
 
15
25
  ```tsx
@@ -59,8 +69,7 @@ for example while an Android foreground service runs. Outside React, call
59
69
  `bindRelayLifecycle(signal, AppState)` from
60
70
  `@open-e2ee/signal-protocol-sdk/client`.
61
71
 
62
- Install a compatible React version when importing this subpath. Do not call
63
- these hooks outside React components or custom hooks. Event callbacks from
72
+ Do not call these hooks outside React components or custom hooks. Event callbacks from
64
73
  `SignalProtocolClient.registerHook()` are a separate, framework-neutral API.
65
74
 
66
75
  See the [client guide](../client/README.md) and
@@ -287,20 +287,40 @@ security transition. The shared adapter contract verifies
287
287
  failure rollback, compare-and-swap behavior, one-time-prekey replay rejection,
288
288
  and exact per-user session deletion.
289
289
 
290
- For the key-value store, the supplied backend's `atomicWrite` is a security boundary,
291
- not a batching optimization. It must commit `check`, `set`, `remove`, and
292
- `removeSessionsForUser` operations in one crash-durable transaction. The final
293
- operation must enumerate exact plaintext session metadata inside that same
294
- transaction. An adapter that matches a prefix or enumerates before the
290
+ For the key-value store, the supplied backend's `atomicWrite` is a security boundary.
291
+ It must commit `check`, `set`, `remove`, `removeSessionsForUser`, and
292
+ `pruneSkippedSenderKeys` operations in one crash-durable transaction.
293
+ The `removeSessionsForUser` operation must enumerate exact plaintext session
294
+ metadata inside that transaction. An adapter that matches a prefix or enumerates before the
295
295
  transaction can leave a concurrently-created session trusted under a rotated
296
296
  identity.
297
297
 
298
+ The `pruneSkippedSenderKeys` operation enumerates keys under its exact `keyPrefix`
299
+ inside the transaction. It removes the lowest numeric chain indexes until
300
+ `maxCount` keys remain. The chain index is the last colon-separated key component.
301
+ The operation observes earlier writes in the same batch. Equal indexes belong
302
+ to distinct generations and remain separate entries.
303
+
304
+ For eviction ties, the store may remove either generation.
305
+ Use `createTransactionalKeyValueBackend` to apply
306
+ these operations through the shared interpreter, and verify custom backends
307
+ with `assertBackendConformance`.
308
+
298
309
  ## Design Notes
299
310
 
300
311
  Received content uses the same encryption and transaction boundary as protocol state.
301
312
 
302
313
  The `commitSessionTrust` method commits received content, ratchet state, contact trust, and consumed prekeys together.
303
- The `storeSenderKeyRecord` method commits received content and skipped-key consumption together.
314
+ The `storeSenderKeyRecord` method commits the full sender-key record and every
315
+ `SenderKeyReceiveCommit` effect together. These effects include skipped-key
316
+ additions, capacity eviction, skipped-key consumption, and optional received
317
+ content. The manager stages additions until authentication and decryption
318
+ succeed.
319
+
320
+ The store applies additions in order, with capacity eviction before
321
+ each addition. A rejected commit preserves the prior record, skipped keys,
322
+ and received content. This applies to current and archived generations and
323
+ to receives without a durable ID. A retry uses that preserved state.
304
324
 
305
325
  An adapter must reject the complete transaction if any write fails.
306
326
  When the database file of a SQLite store cannot grow because the disk or the
@@ -47,11 +47,11 @@ Options:
47
47
  `open-e2ee-signal-protocol.db`.
48
48
  - `vault`: the `SignalProtocolLocalSecretVault` that holds the database key.
49
49
  Default: `ExpoSecureStoreSignalProtocolSecretVault`.
50
- - `encryptionAtRest`: pass `false` to store the database without encryption,
51
- for example on the web, where `expo-sqlite` has no SQLCipher. The store then
52
- does not use the vault, and it logs a warning at each open. A database
53
- created with one setting does not open with the other. Default: `true`, and
54
- the open fails when the build has no SQLCipher.
50
+ - `encryptionAtRest`: pass `false` to store the database without encryption.
51
+ The store then does not use the vault, and it logs a warning at each open. A
52
+ database created with one setting does not open with the other. Default:
53
+ `true`, and the open fails when the build has no SQLCipher (see
54
+ [Web](#web)).
55
55
  - `logger`: receives the warning of each open without encryption.
56
56
 
57
57
  A store holds its name until `close()`. In one process, the opens and resets
@@ -62,6 +62,19 @@ and the second open fails.
62
62
  Keep application tables in a separate database file. The SDK database holds
63
63
  only SDK tables.
64
64
 
65
+ ## Web
66
+
67
+ The web build of `expo-sqlite` has no SQLCipher, and Expo SecureStore has no
68
+ web implementation. On the web, `expoStore()` and `resetExpoStore()` therefore
69
+ fail with `SqliteEncryptionUnavailableError` (`KEY_STORAGE_ERROR`). They fail
70
+ before they use the vault or a database file, also when the app passes its own
71
+ vault. A native build without the `useSQLCipher` option fails in the same way.
72
+
73
+ For an encrypted store in a browser, use
74
+ [`./local/store/web-sqlite`](../web-sqlite/README.md). `encryptionAtRest: false`
75
+ opens this store on the web without encryption. Use it only when the app
76
+ accepts protocol state in plaintext in the browser storage of the origin.
77
+
65
78
  ## Lost key and reset
66
79
 
67
80
  When the database file exists and the vault holds no key for it, `expoStore`
@@ -132,9 +132,11 @@ Realm file. If you already use a Realm, add `realmKeyValueSchema` to its schema
132
132
  list, or open a separate Realm file for the store.
133
133
 
134
134
  The adapter is tested with the conformance kit on realm 20.2.0 in Node,
135
- including a reopen of the same Realm file. The SDK does not test it on a
136
- device. Run the conformance kit on your target devices with your Realm build
137
- before you ship.
135
+ including a reopen of the same Realm file. Manual checks ran the kit in
136
+ React Native apps in the iOS 26.2 simulator and in an Android emulator. All
137
+ 13 cases passed in each. The SDK does not test the adapter
138
+ on a physical device. Run the conformance kit on your target devices with
139
+ your Realm build before you ship.
138
140
 
139
141
  ### Realm maintenance status
140
142
 
@@ -61,7 +61,8 @@ only SDK tables.
61
61
 
62
62
  Use a supported Electron major: the Electron team supports the latest three
63
63
  stable majors ([release timelines](https://www.electronjs.org/docs/latest/tutorial/electron-timelines)).
64
- CI tests Electron 44 on Linux, macOS, and Windows. The binding uses Node-API,
64
+ CI tests the latest major, Electron 44, on Linux, macOS, and Windows, and the
65
+ oldest supported major, Electron 42, on Linux. The binding uses Node-API,
65
66
  so its prebuild loads in each supported major without a rebuild.
66
67
 
67
68
  Open the store in the main process, with the vault over Electron's
@@ -148,10 +148,12 @@ move to the other after an error that is not `OPFS_UNAVAILABLE`.
148
148
  ## Tauri
149
149
 
150
150
  A Tauri 2 app uses this entry in its webview. The entry runs unchanged in
151
- WKWebView on macOS and iOS. A manual check ran it with Tauri 2.12 on macOS
152
- 15.7 and in the iOS 18.0 simulator. No CI job runs it in Tauri. It needs no
153
- Tauri headers (`app.security.headers`) and no capability, because the store
154
- makes no IPC call.
151
+ WebView2 on Windows, in the Android WebView, and in WKWebView on macOS and iOS.
152
+ A CI job runs it in a Tauri 2.12 app in WebView2 on Windows and in the Android
153
+ WebView on an Android emulator. Manual checks ran it with Tauri 2.12 on
154
+ macOS 15.7 and in the iOS 17.5 and 18.0 simulators. It needs no Tauri headers
155
+ (`app.security.headers`) and no capability, because the store makes no IPC
156
+ call.
155
157
 
156
158
  Put the policy from [Content Security Policy](#content-security-policy) in
157
159
  `app.security.csp` of `tauri.conf.json`. When the app uses Tauri IPC, add the
@@ -183,11 +185,29 @@ IPC sources to `connect-src`:
183
185
  where the webview keeps its data. Set these values before the first release,
184
186
  and never change them. A change moves the data, and the app then cannot find
185
187
  its database or its vault.
186
- - **Linux.** WebKitGTK 2.54 has no OPFS synchronous access handles. On it,
187
- the expected result of the open is a rejection with `OPFS_UNAVAILABLE`. See
188
+ - **Windows of one app.** Each window of the app is its own JavaScript
189
+ context. The windows of one origin share the database. A reset fails
190
+ with `INVALID_STATE` while any window holds the store. See [Tabs](#tabs).
191
+ - **Website data.** The database and the vault key are website data of the
192
+ webview. In WKWebView, `navigator.storage.persist()` returns `false`, so
193
+ the webview does not promise to keep them. A clear of all website data,
194
+ for example with `clear_all_browsing_data`, removes the database and the
195
+ key together. The next open then creates a new, empty store and reports
196
+ no error. The open fails with `LOCAL_STORE_KEY_LOST` only when the file
197
+ stays and the key goes. See [Lost key and reset](#lost-key-and-reset).
198
+ - **Loss of all data.** The app must find a loss of all website data itself.
199
+ For example, write a marker to the store with `setMetadata`. Keep a record
200
+ in the app data directory, outside the webview data, that the device has a
201
+ store. When the record exists and the marker does not, treat the device as
202
+ a new device. Do not clear the website data of the webview that holds the
203
+ store.
204
+ - **Linux.** WebKitGTK has no OPFS synchronous access handles, so the open
205
+ rejects with `OPFS_UNAVAILABLE`. A CI job checks this refusal in a Tauri
206
+ app with WebKitGTK 2.52. See
188
207
  [When OPFS is not available](#when-opfs-is-not-available).
189
- - **Windows and Android.** WebView2 and the Android WebView are not yet
190
- tested.
208
+ - **Android.** A CI job runs every check in a debug APK in the Android
209
+ WebView 133 on an Android API 36 emulator, and every check passes. The
210
+ origin of the webview is `http://tauri.localhost`.
191
211
  - **Key custody.** The default vault keeps the key in IndexedDB in the same
192
212
  origin as the database. An app that needs OS keychain custody passes its own
193
213
  vault. See [Security boundary](#security-boundary).
@@ -108,6 +108,24 @@ The protection is that of the OS key store
108
108
  refuses that key: on Linux, it accepts only a ciphertext that starts with
109
109
  `v11`, the prefix of a key from a secret service.
110
110
 
111
+ On Linux, the vault gives these results for the backends of
112
+ `getSelectedStorageBackend()`:
113
+
114
+ | Backend | Secret store | Result |
115
+ |---|---|---|
116
+ | `gnome_libsecret` | GNOME Keyring | The vault works. |
117
+ | `kwallet5` | KWallet 5, and KWallet 6 through its `kwalletd5` name | The vault works. |
118
+ | `kwallet6` | KWallet 6 | The vault works. |
119
+ | `basic_text` | None | The vault refuses the backend. |
120
+ | `gnome_libsecret`, `kwallet5`, or `kwallet6` with no secret service | None: the fixed fallback key, `v10` | The vault refuses the key. |
121
+ | `gnome_libsecret`, `kwallet5`, or `kwallet6`, with the Chromium feature `SecretPortalKeyProviderUseForEncryption` and a Secret portal | The key of the Secret portal, `v12` | The vault refuses the key. |
122
+
123
+ The Secret portal of xdg-desktop-portal gives a key to each app. Outside a
124
+ Flatpak or Snap sandbox, Electron asks for the key as the Chromium app. Each
125
+ Electron app of the user then gets the same key. Electron uses the portal key
126
+ only with the `SecretPortalKeyProviderUseForEncryption` feature, which is off
127
+ by default. Without that feature, a running portal does not change the key.
128
+
111
129
  The vault fails with an `EncryptionError` that has the code
112
130
  `KEY_STORAGE_ERROR`:
113
131
 
@@ -116,8 +134,9 @@ The vault fails with an `EncryptionError` that has the code
116
134
  - on Linux, when the backend is `basic_text`, which encrypts with a fixed
117
135
  password, or `unknown`;
118
136
  - on Linux, when a ciphertext does not start with `v11`, for example when no
119
- secret service answered and `safeStorage` used its fixed key. The vault
120
- file does not change;
137
+ secret service answered and `safeStorage` used its fixed key, or when
138
+ `safeStorage` used the key of the Secret portal. The vault file does not
139
+ change;
121
140
  - when `safeStorage` cannot encrypt or decrypt, for example when the OS key
122
141
  is gone or the macOS signature of the app is not valid. The Electron error
123
142
  is the `originalError`. It can say that `safeStorage` is temporarily
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-e2ee/signal-protocol-sdk",
3
- "version": "8.1.0",
3
+ "version": "9.0.0",
4
4
  "description": "Pure TypeScript Signal Protocol SDK for encrypted chat in Expo, React Native, browsers, and Node. Post-quantum by default.",
5
5
  "keywords": [
6
6
  "open-e2ee",
@@ -51,9 +51,6 @@
51
51
  "main": "./dist/index.js",
52
52
  "module": "./dist/index.js",
53
53
  "types": "./dist/index.d.ts",
54
- "bin": {
55
- "oe-groups": "./scripts/oe-groups.mjs"
56
- },
57
54
  "exports": {
58
55
  ".": {
59
56
  "types": "./dist/index.d.ts",
@@ -63,10 +60,6 @@
63
60
  "types": "./dist/remote/relay/index.d.ts",
64
61
  "default": "./dist/remote/relay/index.js"
65
62
  },
66
- "./remote/relay/memory": {
67
- "types": "./dist/remote/relay/memory/index.d.ts",
68
- "default": "./dist/remote/relay/memory/index.js"
69
- },
70
63
  "./remote/relay/types": {
71
64
  "types": "./dist/remote/relay/types.d.ts",
72
65
  "default": "./dist/remote/relay/types.js"
@@ -143,10 +136,6 @@
143
136
  "types": "./dist/groups/index.d.ts",
144
137
  "default": "./dist/groups/index.js"
145
138
  },
146
- "./groups/server": {
147
- "types": "./dist/groups/server.d.ts",
148
- "default": "./dist/groups/server.js"
149
- },
150
139
  "./hooks": {
151
140
  "types": "./dist/hooks/index.d.ts",
152
141
  "default": "./dist/hooks/index.js"
@@ -251,10 +240,6 @@
251
240
  "types": "./dist/remote/object-store/convex-r2/index.d.ts",
252
241
  "default": "./dist/remote/object-store/convex-r2/index.js"
253
242
  },
254
- "./remote/object-store/convex-r2/server": {
255
- "types": "./dist/remote/object-store/convex-r2/server/index.d.ts",
256
- "default": "./dist/remote/object-store/convex-r2/server/index.js"
257
- },
258
243
  "./remote/object-store/s3": {
259
244
  "types": "./dist/remote/object-store/s3/index.d.ts",
260
245
  "default": "./dist/remote/object-store/s3/index.js"
@@ -326,13 +311,6 @@
326
311
  "docs/RECIPES.md",
327
312
  "docs/SECURITY.md",
328
313
  "encoding/README.md",
329
- "examples/browser/README.md",
330
- "examples/browser/index.html",
331
- "examples/browser/src/exchange.ts",
332
- "examples/browser/src/main.ts",
333
- "examples/browser/src/style.css",
334
- "examples/browser/src/worker.ts",
335
- "examples/browser/vite.config.ts",
336
314
  "files/README.md",
337
315
  "groups/README.md",
338
316
  "hooks/README.md",
@@ -353,9 +331,7 @@
353
331
  "remote/object-store/convex-r2/README.md",
354
332
  "remote/object-store/s3/README.md",
355
333
  "remote/relay/README.md",
356
- "remote/relay/memory/README.md",
357
334
  "safety/README.md",
358
- "scripts/oe-groups.mjs",
359
335
  "sealed-sender/README.md",
360
336
  "types/README.md",
361
337
  "username/README.md",
@@ -380,7 +356,6 @@
380
356
  "prepublishOnly": "npm run build"
381
357
  },
382
358
  "peerDependencies": {
383
- "@convex-dev/r2": ">=0.10.2",
384
359
  "@op-engineering/op-sqlite": ">=18.2.5",
385
360
  "better-sqlite3-multiple-ciphers": ">=13.0.3",
386
361
  "convex": ">=1.42.1",
@@ -396,9 +371,6 @@
396
371
  "react-native-keychain": ">=10.0.0"
397
372
  },
398
373
  "peerDependenciesMeta": {
399
- "@convex-dev/r2": {
400
- "optional": true
401
- },
402
374
  "@op-engineering/op-sqlite": {
403
375
  "optional": true
404
376
  },
@@ -455,7 +427,6 @@
455
427
  "image-size": "file:./vendor/image-size-disabled"
456
428
  },
457
429
  "devDependencies": {
458
- "@convex-dev/r2": "^0.10.2",
459
430
  "@op-engineering/op-sqlite": "^18.2.5",
460
431
  "@swc/core": "^1.15.43",
461
432
  "@types/async-lock": "^1.4.0",
package/remote/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  > Infrastructure | Implements `SignalProtocolRelayServer` and `SignalProtocolRemoteObjectStore` | [Architecture](../ARCHITECTURE.md)
4
4
 
5
- The backend layer is responsible for server-owned protocol state: public
6
- prekeys, device registration, encrypted-envelope delivery, and provisioning
7
- support.
5
+ The remote modules contain client adapters and transport contracts for public
6
+ prekeys, device registration, encrypted envelopes, and encrypted objects.
7
+ The published package excludes relay and object-store server implementations.
8
8
 
9
9
  ## Why it exists
10
10
 
@@ -18,8 +18,7 @@ replaceable and prevent them from owning private keys or plaintext.
18
18
  ### Relay
19
19
 
20
20
  - the OpenE2EE Signal Protocol Relay through `createHostedSignalProtocolClient()` from the package root
21
- - `InMemorySignalProtocolRelayServer` from `@open-e2ee/signal-protocol-sdk/remote/relay/memory`
22
- - custom implementations via `SignalProtocolRelayServer`
21
+ - custom client transports via `SignalProtocolRelayServer`
23
22
 
24
23
  ### Remote object store
25
24
 
@@ -116,57 +115,10 @@ The adapter accepts the generated module directly. The functions
116
115
  time-sensitive credentials or await provider metadata. The functions
117
116
  `createUpload` and `deleteObject` are mutations.
118
117
 
119
- The optional server entry point removes repetitive broker plumbing without
120
- taking ownership away from the application:
121
-
122
- <!-- doc-snippet:skip requires-external-context -->
123
- ```ts
124
- // convex/signalObjectStore.ts
125
- import { R2 } from "@convex-dev/r2";
126
- import {
127
- defineConvexR2ObjectStore,
128
- type ConvexR2ObjectCallbacks,
129
- } from "@open-e2ee/signal-protocol-sdk/remote/object-store/convex-r2/server";
130
- import { components, internal } from "./_generated/api";
131
-
132
- const objects =
133
- internal.signalObjectStoreModel satisfies ConvexR2ObjectCallbacks;
134
-
135
- export const {
136
- createUpload,
137
- createDownload,
138
- completeUpload,
139
- deleteObject,
140
- } = defineConvexR2ObjectStore({
141
- r2: new R2(components.r2),
142
- limits: {
143
- maxContentLength: 50 * 1024 * 1024,
144
- allowedContentTypes: ["application/octet-stream"],
145
- downloadExpiresInSeconds: 15 * 60,
146
- },
147
- objects,
148
- });
149
- ```
150
-
151
- The application defines the referenced internal functions in
152
- `convex/signalObjectStoreModel.ts`:
153
-
154
- - `reserve` authenticates the caller and idempotently persists
155
- `requestId -> objectId -> providerKey`.
156
- - `resolve` authorizes `download` or `complete` and returns the provider key
157
- plus the reserved content type and length.
158
- - `complete` re-authorizes the caller and idempotently marks an upload complete
159
- after the helper verifies synchronized R2 metadata. The action needs this
160
- second authorization because its query and mutation are separate
161
- transactions.
162
- - `remove` authorizes deletion and records the logical removal. It returns the
163
- stable provider key, so the caller can schedule component deletion
164
- transactionally.
165
-
166
- The helper supplies public validators and extracts expiry from the actual
167
- Signature Version 4 URLs. It verifies uploaded size and content type, and it
168
- calls the R2 component with the correct Convex contexts. It has no runtime
169
- import of `@convex-dev/r2`. S3-only consumers do not load the component.
118
+ The application supplies these broker functions. Each function authenticates
119
+ and authorizes its caller. The broker owns idempotent reservations, object
120
+ metadata, provider keys, and completion checks. See the
121
+ [Convex R2 client contract](./object-store/convex-r2/README.md).
170
122
 
171
123
  ### Amazon S3 and S3-compatible storage
172
124
 
@@ -193,29 +145,11 @@ const remoteObjectStore = s3ObjectStore({
193
145
  Every remote object store should receive only ciphertext plus the metadata
194
146
  needed to authorize and construct short-lived operations.
195
147
 
196
- ## Local development
197
-
198
- Use `InMemorySignalProtocolRelayServer` when multiple clients need a shared in-memory relay:
199
-
200
- <!-- doc-snippet:run remote-shared-memory-relay expect="" -->
201
- ```ts
202
- // Real protocol and cryptography; simulated in-memory infrastructure.
203
- import { DefaultSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
204
- import { InMemorySignalProtocolRelayServer } from "@open-e2ee/signal-protocol-sdk/remote/relay/memory";
205
- import { InMemorySignalProtocolStore } from "@open-e2ee/signal-protocol-sdk/local/store/memory";
206
-
207
- const relay = new InMemorySignalProtocolRelayServer();
148
+ ## Sandbox development
208
149
 
209
- const alice = await DefaultSignalProtocolClient.create("alice", {
210
- storage: new InMemorySignalProtocolStore(),
211
- relay,
212
- });
213
-
214
- const bob = await DefaultSignalProtocolClient.create("bob", {
215
- storage: new InMemorySignalProtocolStore(),
216
- relay,
217
- });
218
- ```
150
+ Use a Sandbox connection URL from the OpenE2EE console with
151
+ `createHostedSignalProtocolClient()`. Supply the same identity-assertion callback
152
+ and device-local store that your application uses for production.
219
153
 
220
154
  ## Related Docs
221
155