@open-e2ee/signal-protocol-sdk 7.2.0 → 8.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 (688) hide show
  1. package/ADAPTERS.md +54 -7
  2. package/ARCHITECTURE.md +1 -0
  3. package/CHANGELOG.md +503 -0
  4. package/README.md +9 -5
  5. package/SECURITY.md +2 -2
  6. package/THIRD_PARTY_NOTICES.md +429 -0
  7. package/client/README.md +1 -2
  8. package/device/README.md +50 -19
  9. package/dist/client/client.d.ts +31 -5
  10. package/dist/client/client.d.ts.map +1 -1
  11. package/dist/client/client.js +149 -90
  12. package/dist/client/client.js.map +1 -1
  13. package/dist/client/event-hooks.d.ts.map +1 -1
  14. package/dist/client/event-hooks.js +2 -0
  15. package/dist/client/event-hooks.js.map +1 -1
  16. package/dist/client/files.d.ts.map +1 -1
  17. package/dist/client/files.js +19 -2
  18. package/dist/client/files.js.map +1 -1
  19. package/dist/client/headless.d.ts +1 -1
  20. package/dist/client/headless.js +1 -1
  21. package/dist/client/hosted-anonymous-delivery.d.ts.map +1 -1
  22. package/dist/client/hosted-anonymous-delivery.js +2 -1
  23. package/dist/client/hosted-anonymous-delivery.js.map +1 -1
  24. package/dist/client/hosted-connection.d.ts +1 -1
  25. package/dist/client/hosted-connection.d.ts.map +1 -1
  26. package/dist/client/hosted-connection.js +8 -12
  27. package/dist/client/hosted-connection.js.map +1 -1
  28. package/dist/client/hosted-group-authority.d.ts.map +1 -1
  29. package/dist/client/hosted-group-authority.js +2 -1
  30. package/dist/client/hosted-group-authority.js.map +1 -1
  31. package/dist/client/hosted-groups.d.ts.map +1 -1
  32. package/dist/client/hosted-groups.js +2 -1
  33. package/dist/client/hosted-groups.js.map +1 -1
  34. package/dist/client/hosted-push.d.ts.map +1 -1
  35. package/dist/client/hosted-push.js +2 -1
  36. package/dist/client/hosted-push.js.map +1 -1
  37. package/dist/client/hosted-transport.d.ts.map +1 -1
  38. package/dist/client/hosted-transport.js +10 -11
  39. package/dist/client/hosted-transport.js.map +1 -1
  40. package/dist/client/hosted-trust.d.ts +11 -11
  41. package/dist/client/hosted-trust.d.ts.map +1 -1
  42. package/dist/client/hosted-trust.js +12 -12
  43. package/dist/client/hosted-trust.js.map +1 -1
  44. package/dist/client/messages.d.ts.map +1 -1
  45. package/dist/client/messages.js +6 -1
  46. package/dist/client/messages.js.map +1 -1
  47. package/dist/client/multi-device.d.ts.map +1 -1
  48. package/dist/client/multi-device.js +2 -1
  49. package/dist/client/multi-device.js.map +1 -1
  50. package/dist/client/relay-work.d.ts +30 -0
  51. package/dist/client/relay-work.d.ts.map +1 -0
  52. package/dist/client/relay-work.js +189 -0
  53. package/dist/client/relay-work.js.map +1 -0
  54. package/dist/client/retry.d.ts.map +1 -1
  55. package/dist/client/retry.js +2 -0
  56. package/dist/client/retry.js.map +1 -1
  57. package/dist/client/sessions.d.ts.map +1 -1
  58. package/dist/client/sessions.js +3 -0
  59. package/dist/client/sessions.js.map +1 -1
  60. package/dist/client/signal-service-cipher.d.ts +19 -11
  61. package/dist/client/signal-service-cipher.d.ts.map +1 -1
  62. package/dist/client/signal-service-cipher.js +48 -46
  63. package/dist/client/signal-service-cipher.js.map +1 -1
  64. package/dist/client/state.d.ts +8 -0
  65. package/dist/client/state.d.ts.map +1 -1
  66. package/dist/client/state.js +11 -0
  67. package/dist/client/state.js.map +1 -1
  68. package/dist/device/connection.d.ts +1 -1
  69. package/dist/device/connection.d.ts.map +1 -1
  70. package/dist/device/connection.js +4 -11
  71. package/dist/device/connection.js.map +1 -1
  72. package/dist/device/device-id.d.ts +10 -4
  73. package/dist/device/device-id.d.ts.map +1 -1
  74. package/dist/device/device-id.js +15 -9
  75. package/dist/device/device-id.js.map +1 -1
  76. package/dist/device/device-name-crypto.d.ts.map +1 -1
  77. package/dist/device/device-name-crypto.js +2 -2
  78. package/dist/device/device-name-crypto.js.map +1 -1
  79. package/dist/device/expo/index.d.ts +25 -8
  80. package/dist/device/expo/index.d.ts.map +1 -1
  81. package/dist/device/expo/index.js +58 -8
  82. package/dist/device/expo/index.js.map +1 -1
  83. package/dist/device/index.d.ts +2 -2
  84. package/dist/device/index.d.ts.map +1 -1
  85. package/dist/device/index.js +3 -2
  86. package/dist/device/index.js.map +1 -1
  87. package/dist/device/lifecycle/index.d.ts +4 -2
  88. package/dist/device/lifecycle/index.d.ts.map +1 -1
  89. package/dist/device/lifecycle/index.js.map +1 -1
  90. package/dist/device/lifecycle/manager.d.ts +12 -14
  91. package/dist/device/lifecycle/manager.d.ts.map +1 -1
  92. package/dist/device/lifecycle/manager.js +52 -97
  93. package/dist/device/lifecycle/manager.js.map +1 -1
  94. package/dist/device/lifecycle/types.d.ts +26 -16
  95. package/dist/device/lifecycle/types.d.ts.map +1 -1
  96. package/dist/device/lifecycle/utils.d.ts +8 -4
  97. package/dist/device/lifecycle/utils.d.ts.map +1 -1
  98. package/dist/device/lifecycle/utils.js +12 -16
  99. package/dist/device/lifecycle/utils.js.map +1 -1
  100. package/dist/device/provisioning.d.ts.map +1 -1
  101. package/dist/device/provisioning.js +6 -8
  102. package/dist/device/provisioning.js.map +1 -1
  103. package/dist/device/react-native/index.d.ts +40 -0
  104. package/dist/device/react-native/index.d.ts.map +1 -0
  105. package/dist/device/react-native/index.js +74 -0
  106. package/dist/device/react-native/index.js.map +1 -0
  107. package/dist/device/transfer.d.ts +15 -7
  108. package/dist/device/transfer.d.ts.map +1 -1
  109. package/dist/device/transfer.js +30 -22
  110. package/dist/device/transfer.js.map +1 -1
  111. package/dist/device/types.d.ts +15 -7
  112. package/dist/device/types.d.ts.map +1 -1
  113. package/dist/device/types.js.map +1 -1
  114. package/dist/device/vault-text.d.ts +13 -0
  115. package/dist/device/vault-text.d.ts.map +1 -0
  116. package/dist/device/vault-text.js +17 -0
  117. package/dist/device/vault-text.js.map +1 -0
  118. package/dist/index.d.ts +9 -5
  119. package/dist/index.d.ts.map +1 -1
  120. package/dist/index.js +9 -5
  121. package/dist/index.js.map +1 -1
  122. package/dist/internal/crypto/index.d.ts +3 -3
  123. package/dist/internal/crypto/index.d.ts.map +1 -1
  124. package/dist/internal/crypto/index.js +3 -3
  125. package/dist/internal/crypto/index.js.map +1 -1
  126. package/dist/internal/crypto/random-host.d.ts +1 -1
  127. package/dist/internal/crypto/random-host.d.ts.map +1 -1
  128. package/dist/internal/crypto/random-host.js +3 -2
  129. package/dist/internal/crypto/random-host.js.map +1 -1
  130. package/dist/internal/crypto/random-host.native.d.ts +6 -1
  131. package/dist/internal/crypto/random-host.native.d.ts.map +1 -1
  132. package/dist/internal/crypto/random-host.native.js +14 -10
  133. package/dist/internal/crypto/random-host.native.js.map +1 -1
  134. package/dist/internal/crypto/random-host.node.d.ts +1 -1
  135. package/dist/internal/crypto/random-host.node.d.ts.map +1 -1
  136. package/dist/internal/crypto/random-host.node.js +1 -1
  137. package/dist/internal/crypto/random-host.node.js.map +1 -1
  138. package/dist/internal/crypto/random.d.ts +12 -3
  139. package/dist/internal/crypto/random.d.ts.map +1 -1
  140. package/dist/internal/crypto/random.js +14 -3
  141. package/dist/internal/crypto/random.js.map +1 -1
  142. package/dist/internal/crypto/utils.d.ts.map +1 -1
  143. package/dist/internal/crypto/utils.js +10 -6
  144. package/dist/internal/crypto/utils.js.map +1 -1
  145. package/dist/internal/encoding/proto/primitives.d.ts +2 -0
  146. package/dist/internal/encoding/proto/primitives.d.ts.map +1 -1
  147. package/dist/internal/encoding/proto/primitives.js +2 -1
  148. package/dist/internal/encoding/proto/primitives.js.map +1 -1
  149. package/dist/internal/encoding/proto/signal-message.d.ts +1 -0
  150. package/dist/internal/encoding/proto/signal-message.d.ts.map +1 -1
  151. package/dist/internal/encoding/proto/signal-message.js +2 -1
  152. package/dist/internal/encoding/proto/signal-message.js.map +1 -1
  153. package/dist/internal/groups/authority-certificate.d.ts.map +1 -1
  154. package/dist/internal/groups/authority-certificate.js +2 -1
  155. package/dist/internal/groups/authority-certificate.js.map +1 -1
  156. package/dist/internal/groups/encrypted-state.d.ts.map +1 -1
  157. package/dist/internal/groups/encrypted-state.js +9 -7
  158. package/dist/internal/groups/encrypted-state.js.map +1 -1
  159. package/dist/internal/groups/invite-link.d.ts.map +1 -1
  160. package/dist/internal/groups/invite-link.js +2 -1
  161. package/dist/internal/groups/invite-link.js.map +1 -1
  162. package/dist/internal/groups/manager.d.ts.map +1 -1
  163. package/dist/internal/groups/manager.js +5 -5
  164. package/dist/internal/groups/manager.js.map +1 -1
  165. package/dist/internal/groups/sdk-store.d.ts.map +1 -1
  166. package/dist/internal/groups/sdk-store.js +4 -3
  167. package/dist/internal/groups/sdk-store.js.map +1 -1
  168. package/dist/internal/groups/server-engine.d.ts +6 -1
  169. package/dist/internal/groups/server-engine.d.ts.map +1 -1
  170. package/dist/internal/groups/server-engine.js +11 -15
  171. package/dist/internal/groups/server-engine.js.map +1 -1
  172. package/dist/internal/groups/wire.d.ts.map +1 -1
  173. package/dist/internal/groups/wire.js +2 -1
  174. package/dist/internal/groups/wire.js.map +1 -1
  175. package/dist/internal/platform/blob.d.ts +10 -0
  176. package/dist/internal/platform/blob.d.ts.map +1 -0
  177. package/dist/internal/platform/blob.js +30 -0
  178. package/dist/internal/platform/blob.js.map +1 -0
  179. package/dist/internal/platform/env.d.ts +13 -0
  180. package/dist/internal/platform/env.d.ts.map +1 -0
  181. package/dist/internal/platform/env.js +17 -0
  182. package/dist/internal/platform/env.js.map +1 -0
  183. package/dist/internal/platform/index.d.ts +5 -0
  184. package/dist/internal/platform/index.d.ts.map +1 -0
  185. package/dist/internal/platform/index.js +5 -0
  186. package/dist/internal/platform/index.js.map +1 -0
  187. package/dist/internal/platform/url.d.ts +72 -0
  188. package/dist/internal/platform/url.d.ts.map +1 -0
  189. package/dist/internal/platform/url.js +275 -0
  190. package/dist/internal/platform/url.js.map +1 -0
  191. package/dist/internal/platform/utf8.d.ts +28 -0
  192. package/dist/internal/platform/utf8.d.ts.map +1 -0
  193. package/dist/internal/platform/utf8.js +167 -0
  194. package/dist/internal/platform/utf8.js.map +1 -0
  195. package/dist/internal/protocol/sealed-sender/delivery-token.d.ts +1 -1
  196. package/dist/internal/protocol/sealed-sender/delivery-token.d.ts.map +1 -1
  197. package/dist/internal/protocol/sealed-sender/delivery-token.js +5 -10
  198. package/dist/internal/protocol/sealed-sender/delivery-token.js.map +1 -1
  199. package/dist/internal/protocol/sealed-sender/proto/index.d.ts.map +1 -1
  200. package/dist/internal/protocol/sealed-sender/proto/index.js +2 -4
  201. package/dist/internal/protocol/sealed-sender/proto/index.js.map +1 -1
  202. package/dist/internal/protocol/sender-keys/manager.d.ts.map +1 -1
  203. package/dist/internal/protocol/sender-keys/manager.js +4 -3
  204. package/dist/internal/protocol/sender-keys/manager.js.map +1 -1
  205. package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/index.d.ts +4 -4
  206. package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/index.d.ts.map +1 -1
  207. package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/index.js +8 -10
  208. package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/index.js.map +1 -1
  209. package/dist/internal/protocol/username/hash.d.ts.map +1 -1
  210. package/dist/internal/protocol/username/hash.js +18 -3
  211. package/dist/internal/protocol/username/hash.js.map +1 -1
  212. package/dist/internal/protocol/username/link.d.ts.map +1 -1
  213. package/dist/internal/protocol/username/link.js +2 -1
  214. package/dist/internal/protocol/username/link.js.map +1 -1
  215. package/dist/internal/protocol/username/proof.d.ts.map +1 -1
  216. package/dist/internal/protocol/username/proof.js +2 -1
  217. package/dist/internal/protocol/username/proof.js.map +1 -1
  218. package/dist/internal/sesame/device-registry.d.ts +16 -3
  219. package/dist/internal/sesame/device-registry.d.ts.map +1 -1
  220. package/dist/internal/sesame/device-registry.js +10 -7
  221. package/dist/internal/sesame/device-registry.js.map +1 -1
  222. package/dist/internal/sesame/index.d.ts +1 -1
  223. package/dist/internal/sesame/index.d.ts.map +1 -1
  224. package/dist/internal/sesame/manager.d.ts.map +1 -1
  225. package/dist/internal/sesame/manager.js +3 -2
  226. package/dist/internal/sesame/manager.js.map +1 -1
  227. package/dist/internal/session/index.d.ts +1 -2
  228. package/dist/internal/session/index.d.ts.map +1 -1
  229. package/dist/internal/session/index.js +1 -1
  230. package/dist/internal/session/index.js.map +1 -1
  231. package/dist/internal/session/validation.d.ts +0 -80
  232. package/dist/internal/session/validation.d.ts.map +1 -1
  233. package/dist/internal/session/validation.js +0 -134
  234. package/dist/internal/session/validation.js.map +1 -1
  235. package/dist/local/store/device-record.d.ts +18 -0
  236. package/dist/local/store/device-record.d.ts.map +1 -0
  237. package/dist/local/store/device-record.js +34 -0
  238. package/dist/local/store/device-record.js.map +1 -0
  239. package/dist/local/store/expo/adapter.d.ts +59 -238
  240. package/dist/local/store/expo/adapter.d.ts.map +1 -1
  241. package/dist/local/store/expo/adapter.js +83 -640
  242. package/dist/local/store/expo/adapter.js.map +1 -1
  243. package/dist/local/store/expo/driver.d.ts +16 -0
  244. package/dist/local/store/expo/driver.d.ts.map +1 -0
  245. package/dist/local/store/expo/driver.js +141 -0
  246. package/dist/local/store/expo/driver.js.map +1 -0
  247. package/dist/local/store/expo/index.d.ts +3 -12
  248. package/dist/local/store/expo/index.d.ts.map +1 -1
  249. package/dist/local/store/expo/index.js +1 -8
  250. package/dist/local/store/expo/index.js.map +1 -1
  251. package/dist/local/store/expo/maintenance.d.ts +3 -2
  252. package/dist/local/store/expo/maintenance.d.ts.map +1 -1
  253. package/dist/local/store/expo/maintenance.js +5 -34
  254. package/dist/local/store/expo/maintenance.js.map +1 -1
  255. package/dist/local/store/index.d.ts +10 -5
  256. package/dist/local/store/index.d.ts.map +1 -1
  257. package/dist/local/store/index.js +10 -5
  258. package/dist/local/store/index.js.map +1 -1
  259. package/dist/local/store/key-value/adapter.d.ts +326 -0
  260. package/dist/local/store/key-value/adapter.d.ts.map +1 -0
  261. package/dist/local/store/key-value/adapter.js +1472 -0
  262. package/dist/local/store/key-value/adapter.js.map +1 -0
  263. package/dist/local/store/{react-native → key-value}/backend-conformance.d.ts +6 -6
  264. package/dist/local/store/key-value/backend-conformance.d.ts.map +1 -0
  265. package/dist/local/store/{react-native → key-value}/backend-conformance.js +3 -3
  266. package/dist/local/store/key-value/backend-conformance.js.map +1 -0
  267. package/dist/local/store/key-value/batch.d.ts +41 -0
  268. package/dist/local/store/key-value/batch.d.ts.map +1 -0
  269. package/dist/local/store/key-value/batch.js +77 -0
  270. package/dist/local/store/key-value/batch.js.map +1 -0
  271. package/dist/local/store/key-value/device-record.d.ts +23 -0
  272. package/dist/local/store/key-value/device-record.d.ts.map +1 -0
  273. package/dist/local/store/key-value/device-record.js +33 -0
  274. package/dist/local/store/key-value/device-record.js.map +1 -0
  275. package/dist/local/store/key-value/index.d.ts +24 -0
  276. package/dist/local/store/key-value/index.d.ts.map +1 -0
  277. package/dist/local/store/key-value/index.js +8 -0
  278. package/dist/local/store/key-value/index.js.map +1 -0
  279. package/dist/local/store/key-value/realm/index.d.ts +83 -0
  280. package/dist/local/store/key-value/realm/index.d.ts.map +1 -0
  281. package/dist/local/store/key-value/realm/index.js +102 -0
  282. package/dist/local/store/key-value/realm/index.js.map +1 -0
  283. package/dist/local/store/{react-native → key-value}/storage.d.ts +6 -6
  284. package/dist/local/store/key-value/storage.d.ts.map +1 -0
  285. package/dist/local/store/key-value/storage.js.map +1 -0
  286. package/dist/local/store/key-value/transactional-backend.d.ts +50 -0
  287. package/dist/local/store/key-value/transactional-backend.d.ts.map +1 -0
  288. package/dist/local/store/key-value/transactional-backend.js +90 -0
  289. package/dist/local/store/key-value/transactional-backend.js.map +1 -0
  290. package/dist/local/store/key-value/value-key.d.ts +34 -0
  291. package/dist/local/store/key-value/value-key.d.ts.map +1 -0
  292. package/dist/local/store/key-value/value-key.js +83 -0
  293. package/dist/local/store/key-value/value-key.js.map +1 -0
  294. package/dist/local/store/memory/adapter.d.ts +8 -0
  295. package/dist/local/store/memory/adapter.d.ts.map +1 -1
  296. package/dist/local/store/memory/adapter.js +60 -75
  297. package/dist/local/store/memory/adapter.js.map +1 -1
  298. package/dist/local/store/node/adapter.d.ts +74 -130
  299. package/dist/local/store/node/adapter.d.ts.map +1 -1
  300. package/dist/local/store/node/adapter.js +83 -727
  301. package/dist/local/store/node/adapter.js.map +1 -1
  302. package/dist/local/store/node/index.d.ts +8 -6
  303. package/dist/local/store/node/index.d.ts.map +1 -1
  304. package/dist/local/store/node/index.js +3 -7
  305. package/dist/local/store/node/index.js.map +1 -1
  306. package/dist/local/store/node/maintenance.d.ts +5 -0
  307. package/dist/local/store/node/maintenance.d.ts.map +1 -0
  308. package/dist/local/store/node/maintenance.js +7 -0
  309. package/dist/local/store/node/maintenance.js.map +1 -0
  310. package/dist/local/store/node/owner-lock.d.ts +26 -0
  311. package/dist/local/store/node/owner-lock.d.ts.map +1 -0
  312. package/dist/local/store/node/owner-lock.js +88 -0
  313. package/dist/local/store/node/owner-lock.js.map +1 -0
  314. package/dist/local/store/react-native/adapter.d.ts +63 -274
  315. package/dist/local/store/react-native/adapter.d.ts.map +1 -1
  316. package/dist/local/store/react-native/adapter.js +80 -1406
  317. package/dist/local/store/react-native/adapter.js.map +1 -1
  318. package/dist/local/store/react-native/index.d.ts +7 -19
  319. package/dist/local/store/react-native/index.d.ts.map +1 -1
  320. package/dist/local/store/react-native/index.js +2 -7
  321. package/dist/local/store/react-native/index.js.map +1 -1
  322. package/dist/local/store/react-native/maintenance.d.ts +5 -0
  323. package/dist/local/store/react-native/maintenance.d.ts.map +1 -0
  324. package/dist/local/store/react-native/maintenance.js +7 -0
  325. package/dist/local/store/react-native/maintenance.js.map +1 -0
  326. package/dist/local/store/sqlite/better-sqlite3-multiple-ciphers-driver.d.ts +38 -0
  327. package/dist/local/store/sqlite/better-sqlite3-multiple-ciphers-driver.d.ts.map +1 -0
  328. package/dist/local/store/sqlite/better-sqlite3-multiple-ciphers-driver.js +196 -0
  329. package/dist/local/store/sqlite/better-sqlite3-multiple-ciphers-driver.js.map +1 -0
  330. package/dist/local/store/sqlite/database.d.ts +20 -0
  331. package/dist/local/store/sqlite/database.d.ts.map +1 -0
  332. package/dist/local/store/sqlite/database.js +41 -0
  333. package/dist/local/store/sqlite/database.js.map +1 -0
  334. package/dist/local/store/sqlite/driver.d.ts +138 -0
  335. package/dist/local/store/sqlite/driver.d.ts.map +1 -0
  336. package/dist/local/store/sqlite/driver.js +10 -0
  337. package/dist/local/store/sqlite/driver.js.map +1 -0
  338. package/dist/local/store/sqlite/encryption.d.ts +61 -0
  339. package/dist/local/store/sqlite/encryption.d.ts.map +1 -0
  340. package/dist/local/store/sqlite/encryption.js +98 -0
  341. package/dist/local/store/sqlite/encryption.js.map +1 -0
  342. package/dist/local/store/sqlite/errors.d.ts +70 -0
  343. package/dist/local/store/sqlite/errors.d.ts.map +1 -0
  344. package/dist/local/store/sqlite/errors.js +101 -0
  345. package/dist/local/store/sqlite/errors.js.map +1 -0
  346. package/dist/local/store/sqlite/executor.d.ts +22 -0
  347. package/dist/local/store/sqlite/executor.d.ts.map +1 -0
  348. package/dist/local/store/sqlite/executor.js +129 -0
  349. package/dist/local/store/sqlite/executor.js.map +1 -0
  350. package/dist/local/store/sqlite/index.d.ts +20 -0
  351. package/dist/local/store/sqlite/index.d.ts.map +1 -0
  352. package/dist/local/store/sqlite/index.js +18 -0
  353. package/dist/local/store/sqlite/index.js.map +1 -0
  354. package/dist/local/store/sqlite/key-storage/account.d.ts +45 -0
  355. package/dist/local/store/sqlite/key-storage/account.d.ts.map +1 -0
  356. package/dist/local/store/sqlite/key-storage/account.js +125 -0
  357. package/dist/local/store/sqlite/key-storage/account.js.map +1 -0
  358. package/dist/local/store/sqlite/key-storage/contact-identities.d.ts +19 -0
  359. package/dist/local/store/sqlite/key-storage/contact-identities.d.ts.map +1 -0
  360. package/dist/local/store/sqlite/key-storage/contact-identities.js +85 -0
  361. package/dist/local/store/sqlite/key-storage/contact-identities.js.map +1 -0
  362. package/dist/local/store/sqlite/key-storage/context.d.ts +19 -0
  363. package/dist/local/store/sqlite/key-storage/context.d.ts.map +1 -0
  364. package/dist/local/store/sqlite/key-storage/context.js +18 -0
  365. package/dist/local/store/sqlite/key-storage/context.js.map +1 -0
  366. package/dist/local/store/sqlite/key-storage/identity-keys.d.ts +18 -0
  367. package/dist/local/store/sqlite/key-storage/identity-keys.d.ts.map +1 -0
  368. package/dist/local/store/sqlite/key-storage/identity-keys.js +88 -0
  369. package/dist/local/store/sqlite/key-storage/identity-keys.js.map +1 -0
  370. package/dist/local/store/sqlite/key-storage/index.d.ts +108 -0
  371. package/dist/local/store/sqlite/key-storage/index.d.ts.map +1 -0
  372. package/dist/local/store/sqlite/key-storage/index.js +241 -0
  373. package/dist/local/store/sqlite/key-storage/index.js.map +1 -0
  374. package/dist/local/store/sqlite/key-storage/message-records.d.ts +41 -0
  375. package/dist/local/store/sqlite/key-storage/message-records.d.ts.map +1 -0
  376. package/dist/local/store/sqlite/key-storage/message-records.js +133 -0
  377. package/dist/local/store/sqlite/key-storage/message-records.js.map +1 -0
  378. package/dist/local/store/sqlite/key-storage/metadata.d.ts +16 -0
  379. package/dist/local/store/sqlite/key-storage/metadata.d.ts.map +1 -0
  380. package/dist/local/store/sqlite/key-storage/metadata.js +53 -0
  381. package/dist/local/store/sqlite/key-storage/metadata.js.map +1 -0
  382. package/dist/local/store/sqlite/key-storage/one-time-prekeys.d.ts +36 -0
  383. package/dist/local/store/sqlite/key-storage/one-time-prekeys.d.ts.map +1 -0
  384. package/dist/local/store/sqlite/key-storage/one-time-prekeys.js +129 -0
  385. package/dist/local/store/sqlite/key-storage/one-time-prekeys.js.map +1 -0
  386. package/dist/local/store/sqlite/key-storage/session-trust.d.ts +10 -0
  387. package/dist/local/store/sqlite/key-storage/session-trust.d.ts.map +1 -0
  388. package/dist/local/store/sqlite/key-storage/session-trust.js +88 -0
  389. package/dist/local/store/sqlite/key-storage/session-trust.js.map +1 -0
  390. package/dist/local/store/sqlite/key-storage/sessions.d.ts +50 -0
  391. package/dist/local/store/sqlite/key-storage/sessions.d.ts.map +1 -0
  392. package/dist/local/store/sqlite/key-storage/sessions.js +209 -0
  393. package/dist/local/store/sqlite/key-storage/sessions.js.map +1 -0
  394. package/dist/local/store/sqlite/key-storage/signed-prekeys.d.ts +69 -0
  395. package/dist/local/store/sqlite/key-storage/signed-prekeys.d.ts.map +1 -0
  396. package/dist/local/store/sqlite/key-storage/signed-prekeys.js +219 -0
  397. package/dist/local/store/sqlite/key-storage/signed-prekeys.js.map +1 -0
  398. package/dist/local/store/sqlite/maintenance.d.ts +7 -0
  399. package/dist/local/store/sqlite/maintenance.d.ts.map +1 -0
  400. package/dist/local/store/sqlite/maintenance.js +32 -0
  401. package/dist/local/store/sqlite/maintenance.js.map +1 -0
  402. package/dist/local/store/sqlite/migrations.d.ts +31 -0
  403. package/dist/local/store/sqlite/migrations.d.ts.map +1 -0
  404. package/dist/local/store/sqlite/migrations.js +232 -0
  405. package/dist/local/store/sqlite/migrations.js.map +1 -0
  406. package/dist/local/store/{expo → sqlite}/models/ec-one-time-prekey.d.ts +17 -22
  407. package/dist/local/store/sqlite/models/ec-one-time-prekey.d.ts.map +1 -0
  408. package/dist/local/store/{expo → sqlite}/models/ec-one-time-prekey.js +61 -99
  409. package/dist/local/store/sqlite/models/ec-one-time-prekey.js.map +1 -0
  410. package/dist/local/store/{expo → sqlite}/models/ec-signed-prekey.d.ts +22 -25
  411. package/dist/local/store/sqlite/models/ec-signed-prekey.d.ts.map +1 -0
  412. package/dist/local/store/{expo → sqlite}/models/ec-signed-prekey.js +82 -128
  413. package/dist/local/store/sqlite/models/ec-signed-prekey.js.map +1 -0
  414. package/dist/local/store/sqlite/models/identity-key-id.d.ts.map +1 -0
  415. package/dist/local/store/sqlite/models/identity-key-id.js.map +1 -0
  416. package/dist/local/store/{expo → sqlite}/models/index.d.ts +5 -5
  417. package/dist/local/store/sqlite/models/index.d.ts.map +1 -0
  418. package/dist/local/store/{expo → sqlite}/models/index.js +12 -5
  419. package/dist/local/store/sqlite/models/index.js.map +1 -0
  420. package/dist/local/store/{expo → sqlite}/models/kyber-one-time-prekey.d.ts +17 -20
  421. package/dist/local/store/sqlite/models/kyber-one-time-prekey.d.ts.map +1 -0
  422. package/dist/local/store/{expo → sqlite}/models/kyber-one-time-prekey.js +65 -105
  423. package/dist/local/store/sqlite/models/kyber-one-time-prekey.js.map +1 -0
  424. package/dist/local/store/{expo → sqlite}/models/kyber-prekey-used.d.ts +3 -3
  425. package/dist/local/store/sqlite/models/kyber-prekey-used.d.ts.map +1 -0
  426. package/dist/local/store/{expo → sqlite}/models/kyber-prekey-used.js +13 -25
  427. package/dist/local/store/sqlite/models/kyber-prekey-used.js.map +1 -0
  428. package/dist/local/store/{expo → sqlite}/models/kyber-prekey.d.ts +16 -19
  429. package/dist/local/store/sqlite/models/kyber-prekey.d.ts.map +1 -0
  430. package/dist/local/store/{expo → sqlite}/models/kyber-prekey.js +67 -111
  431. package/dist/local/store/sqlite/models/kyber-prekey.js.map +1 -0
  432. package/dist/local/store/sqlite/models/local-identity.d.ts +51 -0
  433. package/dist/local/store/sqlite/models/local-identity.d.ts.map +1 -0
  434. package/dist/local/store/sqlite/models/local-identity.js +150 -0
  435. package/dist/local/store/sqlite/models/local-identity.js.map +1 -0
  436. package/dist/local/store/{expo → sqlite}/models/message-record.d.ts +15 -44
  437. package/dist/local/store/sqlite/models/message-record.d.ts.map +1 -0
  438. package/dist/local/store/{expo → sqlite}/models/message-record.js +43 -109
  439. package/dist/local/store/sqlite/models/message-record.js.map +1 -0
  440. package/dist/local/store/sqlite/models/recipient-identity.d.ts +21 -0
  441. package/dist/local/store/sqlite/models/recipient-identity.d.ts.map +1 -0
  442. package/dist/local/store/sqlite/models/recipient-identity.js +59 -0
  443. package/dist/local/store/sqlite/models/recipient-identity.js.map +1 -0
  444. package/dist/local/store/sqlite/models/replaced-prekeys.d.ts +23 -0
  445. package/dist/local/store/sqlite/models/replaced-prekeys.d.ts.map +1 -0
  446. package/dist/local/store/sqlite/models/replaced-prekeys.js +42 -0
  447. package/dist/local/store/sqlite/models/replaced-prekeys.js.map +1 -0
  448. package/dist/local/store/{expo → sqlite}/models/sender-key.d.ts +22 -23
  449. package/dist/local/store/sqlite/models/sender-key.d.ts.map +1 -0
  450. package/dist/local/store/{expo → sqlite}/models/sender-key.js +66 -94
  451. package/dist/local/store/sqlite/models/sender-key.js.map +1 -0
  452. package/dist/local/store/sqlite/models/sesame-user-record.d.ts +32 -0
  453. package/dist/local/store/sqlite/models/sesame-user-record.d.ts.map +1 -0
  454. package/dist/local/store/sqlite/models/sesame-user-record.js +78 -0
  455. package/dist/local/store/sqlite/models/sesame-user-record.js.map +1 -0
  456. package/dist/local/store/{expo → sqlite}/models/session.d.ts +24 -20
  457. package/dist/local/store/sqlite/models/session.d.ts.map +1 -0
  458. package/dist/local/store/{expo → sqlite}/models/session.js +54 -72
  459. package/dist/local/store/sqlite/models/session.js.map +1 -0
  460. package/dist/local/store/sqlite/models/skipped-sender-key.d.ts +24 -0
  461. package/dist/local/store/sqlite/models/skipped-sender-key.d.ts.map +1 -0
  462. package/dist/local/store/sqlite/models/skipped-sender-key.js +62 -0
  463. package/dist/local/store/sqlite/models/skipped-sender-key.js.map +1 -0
  464. package/dist/local/store/sqlite/op-sqlite-driver.d.ts +14 -0
  465. package/dist/local/store/sqlite/op-sqlite-driver.d.ts.map +1 -0
  466. package/dist/local/store/sqlite/op-sqlite-driver.js +180 -0
  467. package/dist/local/store/sqlite/op-sqlite-driver.js.map +1 -0
  468. package/dist/local/store/sqlite/open-store.d.ts +83 -0
  469. package/dist/local/store/sqlite/open-store.d.ts.map +1 -0
  470. package/dist/local/store/sqlite/open-store.js +177 -0
  471. package/dist/local/store/sqlite/open-store.js.map +1 -0
  472. package/dist/local/store/sqlite/schema.d.ts +102 -0
  473. package/dist/local/store/sqlite/schema.d.ts.map +1 -0
  474. package/dist/local/store/sqlite/schema.js +61 -0
  475. package/dist/local/store/sqlite/schema.js.map +1 -0
  476. package/dist/local/store/sqlite/store.d.ts +199 -0
  477. package/dist/local/store/sqlite/store.d.ts.map +1 -0
  478. package/dist/local/store/sqlite/store.js +494 -0
  479. package/dist/local/store/sqlite/store.js.map +1 -0
  480. package/dist/local/store/sqlite/web/driver.d.ts +50 -0
  481. package/dist/local/store/sqlite/web/driver.d.ts.map +1 -0
  482. package/dist/local/store/sqlite/web/driver.js +169 -0
  483. package/dist/local/store/sqlite/web/driver.js.map +1 -0
  484. package/dist/local/store/sqlite/web/protocol.d.ts +80 -0
  485. package/dist/local/store/sqlite/web/protocol.d.ts.map +1 -0
  486. package/dist/local/store/sqlite/web/protocol.js +13 -0
  487. package/dist/local/store/sqlite/web/protocol.js.map +1 -0
  488. package/dist/local/store/sqlite/web/sqlite3mc/sqlite3.mjs +14526 -0
  489. package/dist/local/store/sqlite/web/sqlite3mc/sqlite3.wasm +0 -0
  490. package/dist/local/store/sqlite/web/worker.d.ts +36 -0
  491. package/dist/local/store/sqlite/web/worker.d.ts.map +1 -0
  492. package/dist/local/store/sqlite/web/worker.js +616 -0
  493. package/dist/local/store/sqlite/web/worker.js.map +1 -0
  494. package/dist/local/store/web/adapter.d.ts +5 -14
  495. package/dist/local/store/web/adapter.d.ts.map +1 -1
  496. package/dist/local/store/web/adapter.js +119 -106
  497. package/dist/local/store/web/adapter.js.map +1 -1
  498. package/dist/local/store/web/device-record.d.ts +23 -0
  499. package/dist/local/store/web/device-record.d.ts.map +1 -0
  500. package/dist/local/store/web/device-record.js +31 -0
  501. package/dist/local/store/web/device-record.js.map +1 -0
  502. package/dist/local/store/web-sqlite/adapter.d.ts +98 -0
  503. package/dist/local/store/web-sqlite/adapter.d.ts.map +1 -0
  504. package/dist/local/store/web-sqlite/adapter.js +151 -0
  505. package/dist/local/store/web-sqlite/adapter.js.map +1 -0
  506. package/dist/local/store/web-sqlite/index.d.ts +14 -0
  507. package/dist/local/store/web-sqlite/index.d.ts.map +1 -0
  508. package/dist/local/store/web-sqlite/index.js +3 -0
  509. package/dist/local/store/web-sqlite/index.js.map +1 -0
  510. package/dist/local/store/web-sqlite/maintenance.d.ts +5 -0
  511. package/dist/local/store/web-sqlite/maintenance.d.ts.map +1 -0
  512. package/dist/local/store/web-sqlite/maintenance.js +7 -0
  513. package/dist/local/store/web-sqlite/maintenance.js.map +1 -0
  514. package/dist/local/store/web-sqlite/store-locks.d.ts +33 -0
  515. package/dist/local/store/web-sqlite/store-locks.d.ts.map +1 -0
  516. package/dist/local/store/web-sqlite/store-locks.js +60 -0
  517. package/dist/local/store/web-sqlite/store-locks.js.map +1 -0
  518. package/dist/local/vault/electron-safe-storage.d.ts +45 -0
  519. package/dist/local/vault/electron-safe-storage.d.ts.map +1 -0
  520. package/dist/local/vault/electron-safe-storage.js +212 -0
  521. package/dist/local/vault/electron-safe-storage.js.map +1 -0
  522. package/dist/local/vault/index.d.ts +4 -2
  523. package/dist/local/vault/index.d.ts.map +1 -1
  524. package/dist/local/vault/indexed-db.d.ts +37 -0
  525. package/dist/local/vault/indexed-db.d.ts.map +1 -0
  526. package/dist/local/vault/indexed-db.js +102 -0
  527. package/dist/local/vault/indexed-db.js.map +1 -0
  528. package/dist/local/vault/react-native-keychain.d.ts +12 -0
  529. package/dist/local/vault/react-native-keychain.d.ts.map +1 -0
  530. package/dist/local/vault/react-native-keychain.js +71 -0
  531. package/dist/local/vault/react-native-keychain.js.map +1 -0
  532. package/dist/local/vault/require.d.ts +10 -0
  533. package/dist/local/vault/require.d.ts.map +1 -0
  534. package/dist/local/vault/require.js +16 -0
  535. package/dist/local/vault/require.js.map +1 -0
  536. package/dist/logger.d.ts.map +1 -1
  537. package/dist/logger.js +2 -1
  538. package/dist/logger.js.map +1 -1
  539. package/dist/media/index.d.ts.map +1 -1
  540. package/dist/media/index.js +2 -1
  541. package/dist/media/index.js.map +1 -1
  542. package/dist/profile/contact-state.d.ts.map +1 -1
  543. package/dist/profile/contact-state.js +2 -4
  544. package/dist/profile/contact-state.js.map +1 -1
  545. package/dist/profile/index.d.ts +0 -1
  546. package/dist/profile/index.d.ts.map +1 -1
  547. package/dist/profile/index.js +0 -2
  548. package/dist/profile/index.js.map +1 -1
  549. package/dist/profile/profile-key.d.ts +16 -11
  550. package/dist/profile/profile-key.d.ts.map +1 -1
  551. package/dist/profile/profile-key.js +29 -29
  552. package/dist/profile/profile-key.js.map +1 -1
  553. package/dist/profile/update-service.d.ts +6 -0
  554. package/dist/profile/update-service.d.ts.map +1 -1
  555. package/dist/profile/update-service.js +3 -1
  556. package/dist/profile/update-service.js.map +1 -1
  557. package/dist/remote/object-store/validation.d.ts.map +1 -1
  558. package/dist/remote/object-store/validation.js +2 -1
  559. package/dist/remote/object-store/validation.js.map +1 -1
  560. package/dist/remote/relay/memory/adapter.d.ts +2 -3
  561. package/dist/remote/relay/memory/adapter.d.ts.map +1 -1
  562. package/dist/remote/relay/memory/adapter.js +22 -30
  563. package/dist/remote/relay/memory/adapter.js.map +1 -1
  564. package/dist/remote/relay/memory/failures.d.ts.map +1 -1
  565. package/dist/remote/relay/memory/failures.js +2 -1
  566. package/dist/remote/relay/memory/failures.js.map +1 -1
  567. package/dist/remote/relay/memory/group-server.d.ts +5 -1
  568. package/dist/remote/relay/memory/group-server.d.ts.map +1 -1
  569. package/dist/remote/relay/memory/group-server.js +11 -1
  570. package/dist/remote/relay/memory/group-server.js.map +1 -1
  571. package/dist/safety/url.d.ts.map +1 -1
  572. package/dist/safety/url.js +21 -26
  573. package/dist/safety/url.js.map +1 -1
  574. package/dist/types/api.d.ts +15 -2
  575. package/dist/types/api.d.ts.map +1 -1
  576. package/dist/types/errors.d.ts +97 -1
  577. package/dist/types/errors.d.ts.map +1 -1
  578. package/dist/types/errors.js +105 -1
  579. package/dist/types/errors.js.map +1 -1
  580. package/dist/types/session.d.ts.map +1 -1
  581. package/dist/types/session.js +2 -1
  582. package/dist/types/session.js.map +1 -1
  583. package/dist/utils/retry.d.ts +2 -0
  584. package/dist/utils/retry.d.ts.map +1 -1
  585. package/dist/utils/retry.js +4 -2
  586. package/dist/utils/retry.js.map +1 -1
  587. package/docs/ASSURANCE.md +80 -8
  588. package/docs/CLIENT_COMPOSITION.md +1 -2
  589. package/docs/DEVIATIONS.md +1 -1
  590. package/docs/ERROR_HANDLING.md +6 -0
  591. package/docs/GETTING_STARTED.md +1 -2
  592. package/docs/PACKAGE_SURFACE.md +29 -11
  593. package/docs/RECIPES.md +1 -2
  594. package/examples/browser/index.html +1 -1
  595. package/local/store/README.md +117 -37
  596. package/local/store/expo/README.md +67 -47
  597. package/local/store/key-value/README.md +278 -0
  598. package/local/store/node/README.md +206 -46
  599. package/local/store/react-native/README.md +120 -61
  600. package/local/store/web/README.md +9 -0
  601. package/local/store/web-sqlite/README.md +202 -0
  602. package/local/vault/README.md +115 -2
  603. package/package.json +42 -23
  604. package/profile/README.md +9 -11
  605. package/remote/README.md +1 -2
  606. package/dist/local/store/expo/database-key.d.ts +0 -142
  607. package/dist/local/store/expo/database-key.d.ts.map +0 -1
  608. package/dist/local/store/expo/database-key.js +0 -312
  609. package/dist/local/store/expo/database-key.js.map +0 -1
  610. package/dist/local/store/expo/db.d.ts +0 -95
  611. package/dist/local/store/expo/db.d.ts.map +0 -1
  612. package/dist/local/store/expo/db.js +0 -147
  613. package/dist/local/store/expo/db.js.map +0 -1
  614. package/dist/local/store/expo/key-storage.d.ts +0 -429
  615. package/dist/local/store/expo/key-storage.d.ts.map +0 -1
  616. package/dist/local/store/expo/key-storage.js +0 -1361
  617. package/dist/local/store/expo/key-storage.js.map +0 -1
  618. package/dist/local/store/expo/models/ec-one-time-prekey.d.ts.map +0 -1
  619. package/dist/local/store/expo/models/ec-one-time-prekey.js.map +0 -1
  620. package/dist/local/store/expo/models/ec-signed-prekey.d.ts.map +0 -1
  621. package/dist/local/store/expo/models/ec-signed-prekey.js.map +0 -1
  622. package/dist/local/store/expo/models/identity-key-id.d.ts.map +0 -1
  623. package/dist/local/store/expo/models/identity-key-id.js.map +0 -1
  624. package/dist/local/store/expo/models/index.d.ts.map +0 -1
  625. package/dist/local/store/expo/models/index.js.map +0 -1
  626. package/dist/local/store/expo/models/kyber-one-time-prekey.d.ts.map +0 -1
  627. package/dist/local/store/expo/models/kyber-one-time-prekey.js.map +0 -1
  628. package/dist/local/store/expo/models/kyber-prekey-used.d.ts.map +0 -1
  629. package/dist/local/store/expo/models/kyber-prekey-used.js.map +0 -1
  630. package/dist/local/store/expo/models/kyber-prekey.d.ts.map +0 -1
  631. package/dist/local/store/expo/models/kyber-prekey.js.map +0 -1
  632. package/dist/local/store/expo/models/local-identity.d.ts +0 -52
  633. package/dist/local/store/expo/models/local-identity.d.ts.map +0 -1
  634. package/dist/local/store/expo/models/local-identity.js +0 -166
  635. package/dist/local/store/expo/models/local-identity.js.map +0 -1
  636. package/dist/local/store/expo/models/message-record.d.ts.map +0 -1
  637. package/dist/local/store/expo/models/message-record.js.map +0 -1
  638. package/dist/local/store/expo/models/recipient-identity.d.ts +0 -21
  639. package/dist/local/store/expo/models/recipient-identity.d.ts.map +0 -1
  640. package/dist/local/store/expo/models/recipient-identity.js +0 -66
  641. package/dist/local/store/expo/models/recipient-identity.js.map +0 -1
  642. package/dist/local/store/expo/models/replaced-prekey-utils.d.ts +0 -33
  643. package/dist/local/store/expo/models/replaced-prekey-utils.d.ts.map +0 -1
  644. package/dist/local/store/expo/models/replaced-prekey-utils.js +0 -54
  645. package/dist/local/store/expo/models/replaced-prekey-utils.js.map +0 -1
  646. package/dist/local/store/expo/models/sender-key.d.ts.map +0 -1
  647. package/dist/local/store/expo/models/sender-key.js.map +0 -1
  648. package/dist/local/store/expo/models/session.d.ts.map +0 -1
  649. package/dist/local/store/expo/models/session.js.map +0 -1
  650. package/dist/local/store/expo/schema.d.ts +0 -1917
  651. package/dist/local/store/expo/schema.d.ts.map +0 -1
  652. package/dist/local/store/expo/schema.js +0 -197
  653. package/dist/local/store/expo/schema.js.map +0 -1
  654. package/dist/local/store/node/database-encryption.d.ts +0 -109
  655. package/dist/local/store/node/database-encryption.d.ts.map +0 -1
  656. package/dist/local/store/node/database-encryption.js +0 -202
  657. package/dist/local/store/node/database-encryption.js.map +0 -1
  658. package/dist/local/store/node/database-file-commit.d.ts +0 -8
  659. package/dist/local/store/node/database-file-commit.d.ts.map +0 -1
  660. package/dist/local/store/node/database-file-commit.js +0 -62
  661. package/dist/local/store/node/database-file-commit.js.map +0 -1
  662. package/dist/local/store/node/database-key.d.ts +0 -129
  663. package/dist/local/store/node/database-key.d.ts.map +0 -1
  664. package/dist/local/store/node/database-key.js +0 -293
  665. package/dist/local/store/node/database-key.js.map +0 -1
  666. package/dist/local/store/node/database-lock.d.ts +0 -8
  667. package/dist/local/store/node/database-lock.d.ts.map +0 -1
  668. package/dist/local/store/node/database-lock.js +0 -44
  669. package/dist/local/store/node/database-lock.js.map +0 -1
  670. package/dist/local/store/node/database.d.ts +0 -226
  671. package/dist/local/store/node/database.d.ts.map +0 -1
  672. package/dist/local/store/node/database.js +0 -813
  673. package/dist/local/store/node/database.js.map +0 -1
  674. package/dist/local/store/react-native/backend-conformance.d.ts.map +0 -1
  675. package/dist/local/store/react-native/backend-conformance.js.map +0 -1
  676. package/dist/local/store/react-native/reference-backend.d.ts +0 -43
  677. package/dist/local/store/react-native/reference-backend.d.ts.map +0 -1
  678. package/dist/local/store/react-native/reference-backend.js +0 -178
  679. package/dist/local/store/react-native/reference-backend.js.map +0 -1
  680. package/dist/local/store/react-native/storage.d.ts.map +0 -1
  681. package/dist/local/store/react-native/storage.js.map +0 -1
  682. package/dist/profile/storage.d.ts +0 -61
  683. package/dist/profile/storage.d.ts.map +0 -1
  684. package/dist/profile/storage.js +0 -145
  685. package/dist/profile/storage.js.map +0 -1
  686. /package/dist/local/store/{react-native → key-value}/storage.js +0 -0
  687. /package/dist/local/store/{expo → sqlite}/models/identity-key-id.d.ts +0 -0
  688. /package/dist/local/store/{expo → sqlite}/models/identity-key-id.js +0 -0
package/ADAPTERS.md CHANGED
@@ -33,15 +33,39 @@ The storage interface handles client-owned Signal Protocol state:
33
33
 
34
34
  Use:
35
35
 
36
- - `ExpoSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/expo`
37
- - Expo integration helpers like `getKeyStorage`, `getDatabaseKeyManager`, `clearDatabaseKeyCache`, and `createPreKeyMaintenanceStore` from `@open-e2ee/signal-protocol-sdk/local/store/expo`
36
+ - `expoStore` and `ExpoSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/expo` (`await expoStore()` opens the SDK-owned SQLCipher database; `resetExpoStore` deletes it and opens an empty one; `createPreKeyMaintenanceStore` takes an open store)
37
+ - `reactNativeStore` and `ReactNativeSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/react-native` (bare React Native: `await reactNativeStore()` opens the SDK-owned SQLCipher database on op-sqlite with its key in the react-native-keychain vault; `resetReactNativeStore` deletes it and opens an empty one; `createPreKeyMaintenanceStore` takes an open store)
38
38
  - `IndexedDbSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/web`
39
- - `ReactNativeSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/react-native` (use `await ReactNativeSignalProtocolStore.create({ storage })` with a caller-provided key-value backend, verified with the exported backend-conformance kit)
40
- - `NodeSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/node`
39
+ - `webSqliteStore` and `WebSqliteSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/web-sqlite` (`await webSqliteStore()` opens the SDK-owned SQLite database in the origin private file system, encrypted in a Wasm worker; `resetWebSqliteStore` deletes it and opens an empty one; `createPreKeyMaintenanceStore` takes an open store; the page's Content Security Policy must allow `'wasm-unsafe-eval'`)
40
+ - `KeyValueSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/key-value` (use `await KeyValueSignalProtocolStore.create({ storage, vault })` with a caller-provided key-value backend, verified with the exported backend-conformance kit, and a secret vault that holds the value key)
41
+ - `createRealmKeyValueBackend` from `@open-e2ee/signal-protocol-sdk/local/store/key-value/realm` (a key-value backend over an application-installed Realm)
42
+ - `createTransactionalKeyValueBackend` from `@open-e2ee/signal-protocol-sdk/local/store/key-value` (a key-value backend over another engine's transaction, through a synchronous `KeyValueTransaction` handle; the SDK applies each `atomicWrite` batch inside the transaction)
43
+ - `nodeStore` and `NodeSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/node` (`await nodeStore({ directory, vault })` opens the SDK-owned SQLCipher database on the `better-sqlite3-multiple-ciphers` peer; `resetNodeStore` deletes it and opens an empty one; one process at a time owns the file; `createPreKeyMaintenanceStore` takes an open store)
41
44
  - `InMemorySignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/memory`
42
45
  - or a custom implementation
43
46
 
44
- The bare React Native store uses `expo-crypto` for random bytes. A bare React Native application must install Expo modules.
47
+ On React Native and Expo, the SDK reads random bytes only from the global `crypto.getRandomValues`. Install `react-native-get-random-values` 2.x or `react-native-quick-crypto`, and load it before the first SDK call. Without a global source, the SDK throws `SecureRandomUnavailableError`.
48
+
49
+ ### Local secret vault: `SignalProtocolLocalSecretVault`
50
+
51
+ The device ID, the device-lifecycle state, the own profile key, and the value
52
+ key of the key-value store live in the vault that the application passes. The SDK does not choose a vault, and it
53
+ never writes these secrets to `localStorage`. A call without a vault throws an
54
+ `EncryptionError` with code `SECRET_VAULT_REQUIRED`.
55
+
56
+ Use:
57
+
58
+ - `ExpoSecureStoreSignalProtocolSecretVault` from `@open-e2ee/signal-protocol-sdk/local/vault/expo-secure-store`
59
+ - or a custom implementation
60
+
61
+ ### Device metadata
62
+
63
+ The shared `./device` entries take platform metadata as an input and omit each
64
+ field that the application does not supply. These entries read it from the
65
+ platform:
66
+
67
+ - `@open-e2ee/signal-protocol-sdk/device/expo` (`react-native`, `expo-constants`, `expo-device`)
68
+ - `@open-e2ee/signal-protocol-sdk/device/react-native` (`react-native`, `react-native-device-info`)
45
69
 
46
70
  ### Remote object store: `SignalProtocolRemoteObjectStore`
47
71
 
@@ -65,6 +89,30 @@ private to the backend. The Convex server helper can supply generic validators,
65
89
  R2 calls, expiry parsing, and metadata verification, while app-owned internal
66
90
  functions retain authentication, authorization, and persistence.
67
91
 
92
+ ### Local secret vault: `SignalProtocolLocalSecretVault`
93
+
94
+ Stores small bootstrap secrets, such as a database encryption key, in the
95
+ platform secret store, apart from the local store.
96
+
97
+ Use:
98
+
99
+ - `ExpoSecureStoreSignalProtocolSecretVault` from `@open-e2ee/signal-protocol-sdk/local/vault/expo-secure-store`
100
+ - `ReactNativeKeychainSignalProtocolSecretVault` from `@open-e2ee/signal-protocol-sdk/local/vault/react-native-keychain` (optional peer `react-native-keychain` 10.0.0 or later)
101
+ - `ElectronSafeStorageSignalProtocolSecretVault` from `@open-e2ee/signal-protocol-sdk/local/vault/electron-safe-storage`, in the Electron main process, with the app's `safeStorage`
102
+ - or a custom implementation
103
+
104
+ The Expo and React Native adapters keep the secret on this device. The Electron
105
+ adapter keeps only ciphertexts in a file that the app names, and the key that
106
+ decrypts them stays in the OS secret store. It fails closed on the Linux
107
+ `basic_text` backend. The react-native-keychain adapter
108
+ sets fixed options that the application cannot change: iOS
109
+ `AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY`, Android `AES_GCM_NO_AUTH` storage at the
110
+ `SECURE_SOFTWARE` level, and no `cloudSync` key. react-native-keychain 10.0.0
111
+ turns iCloud sync on for any `cloudSync` value, `false` included
112
+ ([issue #800](https://github.com/oblador/react-native-keychain/issues/800)).
113
+ The [secret-vault guide](./local/vault/README.md) gives the reason for each
114
+ option.
115
+
68
116
  ## Composition
69
117
 
70
118
  ### Minimal local client
@@ -88,11 +136,10 @@ const signal = await createSignalProtocolClient({
88
136
  import { createHostedSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
89
137
  import { expoStore } from "@open-e2ee/signal-protocol-sdk/local/store/expo";
90
138
 
91
- // Initialize the application-owned Expo/SQLCipher database bindings first.
92
139
  const signal = await createHostedSignalProtocolClient({
93
140
  adapters: {
94
141
  // Expo storage owns this device's private keys and session state.
95
- storage: expoStore(),
142
+ storage: await expoStore(),
96
143
  },
97
144
  hosted: {
98
145
  // The environment-scoped connection URL from the OpenE2EE console.
package/ARCHITECTURE.md CHANGED
@@ -73,6 +73,7 @@ import {
73
73
  Platform and backend integrations are explicit subpaths such as:
74
74
 
75
75
  - `@open-e2ee/signal-protocol-sdk/local/store/expo`
76
+ - `@open-e2ee/signal-protocol-sdk/local/store/react-native`
76
77
  - `@open-e2ee/signal-protocol-sdk/local/store/memory`
77
78
  - `@open-e2ee/signal-protocol-sdk/remote/relay/memory`
78
79
  - `@open-e2ee/signal-protocol-sdk/remote/object-store/convex-r2`
package/CHANGELOG.md CHANGED
@@ -1,5 +1,508 @@
1
1
  # Changelog
2
2
 
3
+ ## 8.0.0
4
+
5
+ 8.0.0 is a major release. The entries below give the details. To upgrade from
6
+ 7.2.0:
7
+
8
+ 1. **React Native and Expo: install a global random source.** Install
9
+ `react-native-get-random-values` 2.x or `react-native-quick-crypto`, and
10
+ load it before the first SDK call.
11
+ 2. **Pass a secret vault.** The profile key, the device ID, the
12
+ device-lifecycle state, and the key-value store's value key live in a
13
+ `SignalProtocolLocalSecretVault` that the app passes. A call without one
14
+ throws `SECRET_VAULT_REQUIRED`. Bare React Native apps can use
15
+ `./local/vault/react-native-keychain`, Expo apps
16
+ `./local/vault/expo-secure-store`, and Electron apps
17
+ `./local/vault/electron-safe-storage`.
18
+ 3. **Key-value store: change the import and the names.** The store moves from
19
+ `./local/store/react-native` to `./local/store/key-value`, and its names
20
+ drop the `ReactNative` prefix. To keep existing data, move its value key
21
+ into the vault before the first open.
22
+ 4. **Bare React Native: `./local/store/react-native` is now the SQLite
23
+ store.** `reactNativeStore()` opens an SDK-owned SQLCipher database on the
24
+ optional peer `@op-engineering/op-sqlite` 18.2.5 or later, with the
25
+ op-sqlite SQLCipher build turned on.
26
+ 5. **Expo: await the store.** Replace `expoStore()` with `await expoStore()`.
27
+ The SDK owns the database, its schema, and its key.
28
+ 6. **Node and Electron: open the new SQLCipher store.** `nodeStore({
29
+ directory, vault })` opens an SDK-owned SQLCipher database on the optional
30
+ peer `better-sqlite3-multiple-ciphers` 13.0.3 or later. It does not read
31
+ the files of the 7.2.0 Node store.
32
+ 7. **Remove the deleted names.** The `./local/store/expo/db` and
33
+ `./local/store/expo/schema` entries, the Expo database and key functions,
34
+ the profile-key storage functions, `createReferenceReactNativeBackend`, and
35
+ the `drizzle-orm`, `expo-crypto`, and `fs-native-extensions` peers are
36
+ removed.
37
+ 8. **Hosted Relay: copy the connection URL from the console again.** The
38
+ API path and the developer environment kind changed, and the sandbox and
39
+ staging hosts moved to new names.
40
+
41
+ Browser apps can also use the new `./local/store/web-sqlite` store, an
42
+ encrypted SQLite database in the origin private file system. It is optional,
43
+ and the IndexedDB store stays at `./local/store/web`.
44
+
45
+ - **Removed: the optional `expo-crypto` peer.** The SDK does not load
46
+ `expo-crypto`, so `package.json` no longer lists it. An app that installed
47
+ `expo-crypto` only for the SDK can uninstall it.
48
+ - **Added: web SQLite store gates in WebKit.** A macOS job runs the web
49
+ SQLite store's contract, interruption, and multi-tab gates in WebKit on
50
+ each change to the web SQLite store, the SQLite core, the storage contract,
51
+ the key vault, the gate, or a dependency. Linux WebKit (WebKitGTK) has no
52
+ origin private file system, so the web SQLite store does not run there. In
53
+ each job that must run these gates, a gate that skips for want of the
54
+ origin private file system fails. The store stays experimental: its
55
+ storage-pressure and soak gates do not exist yet.
56
+ - **Fixed: the SQLite stores report full storage as
57
+ `StorageQuotaExceededError`.** When the database file cannot grow because
58
+ the disk or the storage quota is full, a write on the Expo, bare React
59
+ Native, Node, or web SQLite store rejects with `StorageQuotaExceededError`
60
+ (`STORAGE_QUOTA_EXCEEDED`), with the SQLite error as `originalError`. It
61
+ rejected with the SQLite error or a `KEY_STORAGE_ERROR`, and the web SQLite
62
+ store reported a full origin quota as a disk I/O error. The rejected write
63
+ does not persist, the store stays open, and the write succeeds after space
64
+ frees.
65
+ - **Changed: each store and vault guide names the optional peers of its
66
+ entry.** Each guide has an install command for the peers that its entry
67
+ loads. For example, `./local/store/web` and `./local/store/web-sqlite` need
68
+ `idb`, and a bundler fails the app build without it.
69
+ - **Fixed: a group delete deletes the skipped sender keys.** The in-memory,
70
+ key-value, and IndexedDB stores kept them after
71
+ `deleteAllSenderKeysForGroup`. These keys decrypt skipped group messages.
72
+ The stores now delete them together with the sender keys of the group. A
73
+ group whose identifier starts with the identifier of the deleted group
74
+ keeps its keys.
75
+ - **Fixed: sender keys no longer collide.** Group `a` with sender `b:c` and
76
+ group `a:b` with sender `c` shared keys. In the in-memory and IndexedDB
77
+ stores, they shared one sender key record. In IndexedDB, they also shared
78
+ one skipped key. In database version 7, a sender key record has an array
79
+ key of group, sender, and device. The key of a skipped key adds the index,
80
+ and a group index finds the skipped keys of a group. The in-memory store
81
+ keys both with JSON arrays.
82
+ - **Changed: IndexedDB version 7 deletes stored sender keys.** The upgrade
83
+ deletes the version 6 sender key records and skipped keys. After the
84
+ upgrade, each group needs a new sender key distribution before its messages
85
+ decrypt. A late message for a deleted skipped key does not decrypt.
86
+ - **Fixed: `deleteAllSenderKeysForGroup` on the Expo store deletes the
87
+ group's skipped message keys.** On a store from `expoStore()`, it deleted
88
+ the group's sender keys and kept each skipped message key, which still
89
+ decrypts its message after the group is gone.
90
+ - **Fixed: the Expo store keeps SESAME user records and device identity
91
+ pins.** On a store from `expoStore()`, `setUserRecord` stored nothing, and
92
+ `setDeviceRecord` stored only the session. A user or device with no session
93
+ had no record, and `getDeviceRecord` returned the identity from the contact
94
+ trust store, not the pin that was set. The store now returns each user and
95
+ device that was set, with the pin that was set and the device's current
96
+ session, if any. `setDeviceRecord` and `deleteDeviceRecord` change the
97
+ record and its session together or not at all. `getAllUserIds` and
98
+ `getSesameDeviceIds` list the users and devices that were set, as on the
99
+ other stores.
100
+ - **Fixed: the Expo store keeps a registration ID that is set before the
101
+ identity key.** On a store from `expoStore()`, `setLocalRegistrationId` did
102
+ nothing until an identity key was stored.
103
+ - **Fixed: a client on the key-value store can send after it establishes a
104
+ session.** `./local/store/key-value` (`./local/store/react-native` before
105
+ the move) lost the session from each SESAME device record, so every send
106
+ failed with `No active session`. It also returned the device identity pin as
107
+ a plain object, not its bytes, after a reopen. The store now joins each
108
+ device with the session under its session key, and it keeps the pin bytes.
109
+ - **Fixed: a client on the IndexedDB store can send after it establishes a
110
+ session.** `./local/store/web` returned each SESAME device record with no
111
+ session, so every send failed with `No active session`. `getUserRecord` and
112
+ `getDeviceRecord` on the IndexedDB store, and `getUserRecord` on the
113
+ in-memory store, now join each device with the session under its address,
114
+ and the stored identity pin wins over one derived from the session. On the
115
+ IndexedDB store, `setDeviceRecord` writes the device and its session in one
116
+ transaction, and `deleteDeviceRecord` removes the session with the device.
117
+ - **Fixed: the in-memory store returns no session for a device whose session
118
+ is deleted.** After `deleteSessionRecord`, `getDeviceRecord` and
119
+ `getUserRecord` on `./local/store/memory` returned the session that
120
+ `setDeviceRecord` stored earlier. The store now keeps each device without
121
+ its session and joins the device with the session under its address, as
122
+ the other stores do. `setDeviceRecord` rejects a session record that is not
123
+ current, and `setUserRecord` stores no session.
124
+ - **Added: `./local/store/web-sqlite`, a web store on encrypted SQLite.**
125
+ `webSqliteStore(options?)` opens an SDK-owned SQLite database in the origin
126
+ private file system. The SQLite3 Multiple Ciphers Wasm engine runs in a
127
+ dedicated module worker and encrypts the whole file. On first use the store
128
+ creates the database key in the secret vault, by default IndexedDB in the
129
+ same origin, then the file. Each open applies the SDK migrations.
130
+ `resetWebSqliteStore(options?)` deletes the file, creates a new key, and
131
+ opens an empty store. `createPreKeyMaintenanceStore` takes an open store.
132
+ The tabs of an origin share the database, and the opens and resets of a
133
+ name run one at a time across the tabs. A reset fails with `INVALID_STATE`
134
+ while any tab has the store open. The page's Content Security Policy must
135
+ allow `'wasm-unsafe-eval'` for the worker; without it, the open fails with
136
+ `SQLITE_ENGINE_UNAVAILABLE`. A context without OPFS gets
137
+ `OPFS_UNAVAILABLE`. The key in IndexedDB protects a copy of the database
138
+ file; it is not an XSS defense.
139
+ - **Breaking: the SDK owns the Expo database.** `expoStore(options?)`
140
+ opens an SDK-owned SQLCipher database in the `expo-sqlite` default
141
+ directory. On first use it creates the database key in the secret vault
142
+ (Expo SecureStore by default), then the file. Each open applies the SDK
143
+ migrations. `ExpoSignalProtocolStore` has no public constructor, and
144
+ `close()` closes the store. An open fails with `LOCAL_STORE_KEY_LOST` when
145
+ the file exists and the vault holds no key for it. It fails with
146
+ `INVALID_STATE` when a store of the process holds the same name, or when a
147
+ newer SDK wrote the file. `createPreKeyMaintenanceStore` takes the open
148
+ store. The options accept `encryptionAtRest: false`, which opens a
149
+ plaintext database and does not use the vault. An open with the other
150
+ setting than the one that created the file fails with
151
+ `SqliteKeyMismatchError` (`KEY_STORAGE_ERROR`), not `LOCAL_STORE_KEY_LOST`.
152
+ Keep application tables in a separate database file.
153
+ - **Breaking: `expoStore()` is now async.** It returns a promise of the open
154
+ store. Replace `expoStore()` with `await expoStore()`.
155
+ `ExpoSignalProtocolStoreFactoryOptions` is now `ExpoSignalProtocolStoreOptions`.
156
+ - **Breaking: the Expo module functions that exposed the database or its key
157
+ are removed.** The `./local/store/expo` entry no longer exports
158
+ `getKeyStorage`, `resetKeyStorage`, `getDatabaseKeyManager`,
159
+ `resetDatabaseKeyManager`, `clearDatabaseKeyCache`, `getPrimaryIdentityKey`,
160
+ or `getContactIdentity`. The `./local/store/expo/db` entry, with
161
+ `configureSignalProtocolExpoDbBindings`,
162
+ `resetSignalProtocolExpoDbBindings`, `getDrizzle`, `getRawDatabase`, and its
163
+ tables, is removed. The `./local/store/expo/schema` entry is removed. The
164
+ `drizzle-orm` peer dependency is removed.
165
+ - **Breaking: `ExpoSignalProtocolStore.getDatabaseKey()` is removed.** The
166
+ database key stays in the secret vault, and the store does not return it.
167
+ - **Changed: `clearAllKeys` on the Expo store empties every table and keeps
168
+ the database key.** The file stays open with the same key.
169
+ `resetExpoStore(options?)` is the full teardown: it deletes the database
170
+ file, creates a new key, and opens an empty store. It is the only way to
171
+ open a store whose key is lost.
172
+ - **Added: `@open-e2ee/signal-protocol-sdk/local/vault/electron-safe-storage`.**
173
+ `ElectronSafeStorageSignalProtocolSecretVault` is a
174
+ `SignalProtocolLocalSecretVault` for the Electron main process. The app
175
+ passes its own `safeStorage`, so the SDK does not import `electron`. The
176
+ vault encrypts each secret with `safeStorage` and keeps only the ciphertexts
177
+ in a file that the app names. It fails closed when async encryption is not
178
+ available, on the Linux `basic_text` and `unknown` backends, and on Linux
179
+ when a ciphertext does not start with `v11`. A `v10` ciphertext means that
180
+ no secret service answered, so `safeStorage` used its fixed fallback key.
181
+ - **Added: the optional peer `better-sqlite3-multiple-ciphers` 13.0.3 or
182
+ later.** The SQLite store for Node and Electron uses it. An app that does
183
+ not use that store does not install it.
184
+ - **Breaking: the Node store is an SDK-owned SQLCipher database.**
185
+ `nodeStore(options)` takes `{ directory, vault }` in place of the optional
186
+ `{ dataDir }`, and opens an encrypted SQLite database on
187
+ `better-sqlite3-multiple-ciphers` in `directory`. On first use it creates
188
+ the database key in `vault`, then the file. The options also accept `name`,
189
+ `encryptionAtRest: false`, and `logger`, as the Expo store does. It runs in
190
+ Node and in the Electron main process; in Electron, pass the safeStorage
191
+ vault. `NodeSignalProtocolStore` has no public constructor, and
192
+ `NodeSignalProtocolStoreConfig` is now `NodeSignalProtocolStoreOptions`.
193
+ `close()` closes the store. An open fails with `LOCAL_STORE_KEY_LOST` when
194
+ the file exists and the vault holds no key for it, and with
195
+ `INVALID_STATE` when a store of the process holds the same file or a newer
196
+ SDK wrote it. The store does not read the files of the earlier Node store.
197
+ Keep application tables in a separate database file.
198
+ - **Breaking: the `fs-native-extensions` peer dependency is removed.**
199
+ - **The Node store has one owner process.** An open store holds the owner
200
+ lock `<name>.lock` beside the database until `close()`, and the operating
201
+ system releases it when the process exits. An open or a reset in another
202
+ process fails at once with `SqliteStoreInUseError` (`KEY_STORAGE_ERROR`),
203
+ before it reads the vault or touches the file.
204
+ - **Added: `resetNodeStore(options)`, `createPreKeyMaintenanceStore(store)`,
205
+ and `sqliteDatabaseKeySlot(path)` on `./local/store/node`.**
206
+ `resetNodeStore` deletes the database file, creates a new key, and opens an
207
+ empty store. `sqliteDatabaseKeySlot` names the vault slot of the key for a
208
+ database path, so an app can move the key when it moves the directory.
209
+ - **Changed: the Node store has the semantics of the Expo store.** A user
210
+ record is the aggregate of the user's sessions, so `setUserRecord` stores
211
+ nothing. `setDeviceRecord` does not pin the identity key of a device,
212
+ `setDeviceSession` does not require a registered device, and
213
+ `setLocalRegistrationId` stores nothing before the identity key.
214
+ `deleteAllSenderKeysForGroup` keeps the group's skipped sender keys.
215
+ - **The Expo store runs on a shared SQLite core.** The store's schema,
216
+ queries, and transactions move from the Expo entry to an internal core that
217
+ runs on any SQLite binding. Every statement and transaction on the
218
+ database goes through one queue, so concurrent store calls no longer
219
+ collide in `BEGIN` or `ROLLBACK`. A save that replaces a signed prekey with
220
+ the same key ID now zeroes the private key that it replaces.
221
+ - **The Expo account wipe empties every SDK table.** `clearAllKeys` and
222
+ `wipeAllSignalProtocolData` on the Expo store now empty every SDK table, as
223
+ the web and Node stores do. This adds the metadata, sender keys, skipped
224
+ sender keys, message records, profile keys, group master keys, group state
225
+ cache, and auth credential cache, and for `clearAllKeys` the KEM one-time
226
+ prekeys.
227
+ - **A bare React Native app can bundle the SDK.** The root entry no longer
228
+ uses `export * as` to export the `safety`, `keys`, `encoding`, `blocking`,
229
+ and `media` namespaces. `@react-native/babel-preset` has no transform for
230
+ that syntax, so Metro in a bare React Native app rejected the whole bundle.
231
+ The namespaces and their members do not change.
232
+ - **Added: `EncryptionErrorCode.SQLITE_ENGINE_UNAVAILABLE`,
233
+ `EncryptionErrorCode.OPFS_UNAVAILABLE`, and
234
+ `EncryptionErrorCode.OPFS_FILE_BUSY`.** The web SQLite store fails with
235
+ these codes when its Wasm engine cannot load in its worker, when the browser context has no OPFS storage for it, or when it
236
+ cannot open its database file this time, usually because another tab still
237
+ holds the file. Retry after `OPFS_FILE_BUSY`; the file is unchanged. An
238
+ exhaustive `switch` over `EncryptionErrorCode` needs the three new cases.
239
+ - **Changed: the package ships the SQLite3 Multiple Ciphers 2.5.1 Wasm
240
+ engine.** `dist/local/store/sqlite/web/sqlite3mc/` holds `sqlite3.mjs` and
241
+ `sqlite3.wasm` from the signed release, about 1.5 MB. `sqlite3.wasm` is
242
+ unmodified. `sqlite3.mjs` carries two recorded patches, so a failed pool
243
+ install never deletes the database files and a failed attach holds no file
244
+ handle. Both files are pinned by sha256. Only the worker of
245
+ `./local/store/web-sqlite` loads them. `THIRD_PARTY_NOTICES.md` lists their
246
+ licenses.
247
+ - **Added: the bare React Native SQLite store at `./local/store/react-native`.**
248
+ `reactNativeStore(options?)` opens an SDK-owned SQLCipher database on
249
+ op-sqlite, with its key in the react-native-keychain vault by default, on
250
+ the same SQLite core and with the same options, errors, and reset as
251
+ `expoStore`. `resetReactNativeStore(options?)` deletes the database
252
+ and opens an empty store, and `createPreKeyMaintenanceStore` takes the open
253
+ store. `close()` checkpoints the write-ahead log into the database file
254
+ before it closes the connection. The app turns on the op-sqlite SQLCipher build with
255
+ `"op-sqlite": { "sqlcipher": true }` in its `package.json`. Without it, an
256
+ encrypted open fails with `KEY_STORAGE_ERROR` before it creates a file.
257
+ `@op-engineering/op-sqlite` 18.2.5 or later is an optional peer, and only
258
+ this entry imports it.
259
+ - **Breaking: the own profile key lives in the application's secret vault.**
260
+ The SDK no longer writes the profile key to `localStorage`, and it no longer
261
+ picks a storage by platform. `getOwnProfileKey`, `setOwnProfileKey`,
262
+ `getOrCreateOwnProfileKey`, `getOwnProfileKeyBase64`, and
263
+ `rotateOwnProfileKey` take a `SignalProtocolLocalSecretVault` as their first
264
+ argument. `updateEncryptedProfile` takes a `vault` parameter when it gets no
265
+ `profileKey`. The vault holds the key as its raw 32 bytes under
266
+ `signal_profile_key_v1`. To upgrade, pass the vault to each call. On Expo,
267
+ use `ExpoSecureStoreSignalProtocolSecretVault` from
268
+ `@open-e2ee/signal-protocol-sdk/local/vault/expo-secure-store`. Remove each
269
+ use of `setProfileKeyStorage`, `getProfileKeyStorage`,
270
+ `resetProfileKeyStorage`, `createMemoryStorage`, and `ProfileKeyStorage`.
271
+ These exports are deleted.
272
+ - **Breaking: the device ID and the device-lifecycle state live in the
273
+ application's secret vault.** `getDeviceId` and `preloadDeviceId` take the
274
+ vault as their first argument. `DeviceLifecycleDeps` has a `vault` field in
275
+ place of `secureStore`, and the `DeviceLifecycleSecureStore` type is
276
+ deleted. The vault holds each value as UTF-8 text. To upgrade, pass the same
277
+ vault to `DeviceLifecycleManager`, `getDeviceId`, and `preloadDeviceId`. The
278
+ SDK does not read the plain SecureStore values that an earlier version
279
+ wrote, so reset the device when you upgrade.
280
+ - **Breaking: a call without a vault throws `SECRET_VAULT_REQUIRED`.** Each
281
+ function above, and the `DeviceLifecycleManager` constructor, throws an
282
+ `EncryptionError` with the new code `EncryptionErrorCode.SECRET_VAULT_REQUIRED`
283
+ when the vault is absent. The error context names the operation.
284
+ - **Breaking: the shared `./device` entries import no platform package.**
285
+ `./device`, `./device/device-id`, and `./device/lifecycle` now load without
286
+ Expo, React Native, or `react-native-device-info`. They take platform
287
+ metadata as input, and they omit each field that the application does not
288
+ supply. To upgrade:
289
+ - Spread `getDeviceLifecyclePlatform()` into the `DeviceLifecycleManager`
290
+ dependencies. `DeviceLifecycleDeps` extends the new
291
+ `DeviceLifecyclePlatform` type: `generateDeviceName`,
292
+ `getDeviceFingerprint`, `deviceType`, `platform`, `osVersion`, and
293
+ `appVersion`, each optional. Without `generateDeviceName`, the device name
294
+ is `Unknown Device`. Without `getDeviceFingerprint`, registration sends no
295
+ `idfv` and does not reclaim a device.
296
+ - Pass the same facts to `getLocalDeviceMetadata`, which now takes them as
297
+ its argument.
298
+ - Pass a `TransferDeviceInfo` to `generateTransferQRCode`,
299
+ `prepareNewDeviceTransfer`, `createEmptyBackup`, `createDeviceBackup`, and
300
+ `prepareOldDeviceTransferWithBackup`. Get it from
301
+ `getTransferDeviceInfo()`, or pass `{}` to send no metadata. The QR code
302
+ omits `deviceType` when the metadata has no platform, and
303
+ `TransferQRCode.deviceType` is optional.
304
+ - **Added: `./device/react-native`.** It reads device metadata on bare React
305
+ Native through `react-native` and `react-native-device-info`, and it reaches
306
+ no Expo package. It exports `getDeviceMetadata`, `getTransferDeviceInfo`,
307
+ and `getDeviceLifecyclePlatform`. Its lifecycle facts include a fingerprint
308
+ from `getUniqueId()`.
309
+ - **Changed: `./device/expo` reads the lifecycle and transfer metadata.** It
310
+ now imports `expo-device` too, and it adds `getTransferDeviceInfo` and
311
+ `getDeviceLifecyclePlatform`. Expo has no device fingerprint without another
312
+ package, so its lifecycle facts have no `getDeviceFingerprint`. Supply one
313
+ to keep reclaim detection.
314
+ - **Added: a secret vault for bare React Native apps.**
315
+ `ReactNativeKeychainSignalProtocolSecretVault` from
316
+ `@open-e2ee/signal-protocol-sdk/local/vault/react-native-keychain` stores
317
+ vault secrets with `react-native-keychain`, a new optional peer at 10.0.0 or
318
+ later. The adapter sets fixed options that the app cannot change: iOS
319
+ `AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY`, Android `AES_GCM_NO_AUTH` storage at
320
+ the `SECURE_SOFTWARE` level, and no `cloudSync` key. The secret stays on the
321
+ device. react-native-keychain 10.0.0 turns iCloud sync on for any
322
+ `cloudSync` value, `false` included, so the adapter never sends that key.
323
+ - **Breaking: React Native and Expo apps must install a global random
324
+ source.** The SDK reads random bytes on React Native only from the global
325
+ `crypto.getRandomValues`. It no longer uses `expo-crypto` for random bytes,
326
+ and the key-value store no longer imports `expo-crypto`. To
327
+ upgrade, install `react-native-get-random-values` 2.x or
328
+ `react-native-quick-crypto`, and load it before the first SDK call.
329
+ Without a global source, the SDK throws `SecureRandomUnavailableError`.
330
+ - Added: `SecureRandomUnavailableError`, with the code
331
+ `SECURE_RANDOM_UNAVAILABLE` and the guard `isSecureRandomUnavailableError`,
332
+ exported from `/types`. The SDK throws it when the runtime has no
333
+ cryptographically secure random source.
334
+ - **Breaking: `getGroupServiceIds` on the in-memory relay is now
335
+ asynchronous.** It returns a `Promise`. To upgrade, `await` each call.
336
+ - **Breaking: `GroupAuthorizationServerEngine` takes its runtime as a
337
+ required argument.** The engine no longer picks a host random source, so a
338
+ server bundle of the engine reaches no client platform seam. To upgrade,
339
+ pass a `GroupServerEngineRuntime` with `now` and `randomBytes` as the second
340
+ constructor argument. The in-memory relay's
341
+ `InMemoryGroupAuthorizationServer` still supplies its own runtime.
342
+ - Fixed: the username discriminator had a small bias toward low values. The
343
+ SDK now draws it with rejection sampling, so each value in the range has
344
+ the same probability.
345
+ - **Fixed: on React Native, the hosted Relay socket did not open.** The SDK
346
+ built the socket URL with the `protocol` setter of `URL`, and the React
347
+ Native `URL` has no setters. Now the SDK builds the URL itself.
348
+ - **Fixed: on React Native, `isVerifyUrl`, `parseVerifyUrl`, and
349
+ `parseProvisioningQR` accepted a lookalike custom-scheme link,** such as
350
+ `signalprotocol://verify-evil`. The React Native `URL` reads no host or path
351
+ for a custom scheme. The SDK now parses these links, the relay connection
352
+ URL, Web Push endpoints, object store URLs, and TUS upload locations with
353
+ its own parser, which gives the same result on every runtime.
354
+ - **Changed: the SDK rejects a URL that is not in a canonical form.** Upgrade
355
+ step: give each URL as ASCII, without credentials, a fragment, an empty
356
+ query (`?` with nothing after it), or a `.` or `..` path segment. Write the
357
+ host in the form that a WHATWG `URL` gives, and do not use an `xn--` label,
358
+ an IPv4 address in a short or hexadecimal form, or an IPv6 address in a
359
+ non-compressed form. Do not write a port with a leading zero. Percent-encode
360
+ a space, a non-ASCII character, and a `'` in a query. This applies to the
361
+ verification and provisioning links and their `VerifyLinkConfig` and link
362
+ prefix, the relay connection URL, Web Push endpoints, and object store
363
+ upload and download URLs. A TUS server must return a `Location` that is an
364
+ absolute URL, a path that starts with `/`, or a relative path, not a
365
+ network-path reference that starts with `//`. A query value that is not
366
+ valid UTF-8 now makes a verification or provisioning link invalid.
367
+ - **Changed: `encryptFile` and `decryptFile` throw an `EncryptionError` with
368
+ the new code `BINARY_BLOB_UNAVAILABLE` when the runtime's `Blob` cannot hold
369
+ bytes.** The React Native `Blob` rejects binary parts and has no
370
+ `arrayBuffer()` or `text()`, so these methods cannot work there. They now
371
+ throw before they touch the session, so the key message stays unconsumed.
372
+ Upgrade step: on React Native, use `streamingEncrypt` and `streamingDecrypt`
373
+ from `@open-e2ee/signal-protocol-sdk/files`.
374
+ - **Fixed: on a React Native runtime without `Buffer`, `TextDecoder`, or
375
+ `structuredClone`, the stores, the relay clients, and message decoding
376
+ failed.** These parts now use the SDK's base64, UTF-8, and clone functions.
377
+ UTF-8 decoding uses the runtime's `TextDecoder` only when it passes a
378
+ conformance check, and a built-in WHATWG decoder otherwise, so invalid
379
+ UTF-8 gives the same result on every runtime.
380
+ - Changed: the Expo store models decode base64 strictly. A stored key that is
381
+ not padded standard base64 with zero trailing bits now fails to load.
382
+ Before, the models skipped invalid characters. The SDK writes only this
383
+ form, so the change affects only a row that was changed by hand.
384
+ - Fixed: the Convex relay's `subscribe` threw in a browser that loads the SDK
385
+ without a bundler `define`, where there is no `process` global. It now
386
+ falls back to polling there, as it does when `EXPO_PUBLIC_CONVEX_URL` is not
387
+ set.
388
+ - **Fixed: the Expo store's `getDetailedStats()` and full data wipe now
389
+ complete.** Before, both read or deleted a table that does not exist, so
390
+ `getDetailedStats()` failed and the wipe (`wipeAllSignalProtocolData()` on
391
+ the store from `getKeyStorage()`) rolled back. The `users` count is now the
392
+ number of distinct users that have a session.
393
+ - Fixed: on the Expo store, a signed prekey that reuses the ID of a replaced
394
+ signed prekey is now the current signed prekey. Before, the store kept the
395
+ replaced mark, so `getEcSignedPreKey()` returned `null`.
396
+ - Fixed: `createPreKeyMaintenanceStore().cullReplacedPreKeys()` on the Expo
397
+ store now culls the four prekey tables one at a time. Before, it opened
398
+ four transactions at the same time on one connection, and the cull failed
399
+ with "cannot start a transaction within a transaction".
400
+ - **Breaking: the key-value store moves to `./local/store/key-value`.** In
401
+ 7.2.0, `./local/store/react-native` exported it. Change each import of the
402
+ key-value store from `@open-e2ee/signal-protocol-sdk/local/store/react-native`
403
+ to `@open-e2ee/signal-protocol-sdk/local/store/key-value`.
404
+ `./local/store/react-native` now exports the bare React Native SQLite
405
+ store.
406
+ - **Breaking: the key-value store names drop the React Native prefix.** The
407
+ store works over any key-value backend, so its names do not name a
408
+ platform. Change each name:
409
+ - `ReactNativeSignalProtocolStore` → `KeyValueSignalProtocolStore`
410
+ - `reactNativeStore` → `keyValueStore`
411
+ - `ReactNativeStoreFactoryOptions` → `KeyValueSignalProtocolStoreOptions`,
412
+ which `create`, `reset`, and `keyValueStore` all take
413
+ - `ReactNativeKeyValueStorage` → `KeyValueStorage`
414
+ - `ReactNativeKeyValueOperation` → `KeyValueOperation`
415
+ - **Breaking: the key-value store keeps its value key in a secret vault.**
416
+ Before, the store wrote its 32-byte value key into the same key-value
417
+ backend as the data it encrypted, under `@signal:databaseKey`, and logged a
418
+ warning. Pass a `SignalProtocolLocalSecretVault` backed by the platform
419
+ keychain or keystore, such as `ReactNativeKeychainSignalProtocolSecretVault`,
420
+ as `vault` to `create`, `reset`, or `keyValueStore`. Without a vault,
421
+ each of them throws `SECRET_VAULT_REQUIRED`. To keep
422
+ existing data, before the first open on this version, read the base64 value
423
+ of `@signal:databaseKey` from your backend, write its decoded bytes to the
424
+ vault under `signal_key_value_encryption_key`, and remove
425
+ `@signal:databaseKey` from the backend. The key-value store guide describes
426
+ key custody.
427
+ - **Breaking: a lost value key is an error, not a new key.** When the backend
428
+ holds store data and the vault holds no key, `create` rejects with an
429
+ `EncryptionError` whose code is the new `LOCAL_STORE_KEY_LOST`, and it
430
+ changes nothing. Before, a missing key gave a new key that could not read
431
+ the old data. Catch the code, and then restore the vault entry or call
432
+ `KeyValueSignalProtocolStore.reset({ storage, vault })`. `reset` deletes
433
+ every store record, and then makes a new key. If the process stops between
434
+ the two steps, the next `create` opens an empty store.
435
+ - **Breaking: `createReferenceReactNativeBackend` is no longer exported.** It
436
+ is now test code of the SDK. To verify your backend, use
437
+ `assertBackendConformance` or `runBackendConformance`, which stay exported.
438
+ To get an in-memory backend for your own tests, write one that passes the
439
+ kit.
440
+ - Added: `./local/store/key-value/realm` with `createRealmKeyValueBackend`, a
441
+ key-value backend over an open Realm. The SDK does not import `realm` and
442
+ does not declare it as a dependency or peer. Your application installs
443
+ `realm` and adds `realmKeyValueSchema` to its schema list. Each store write
444
+ runs in one `realm.write` transaction. The adapter is tested with the
445
+ conformance kit on realm 20.2.0 in Node. Realm has no maintainer since
446
+ 2025-09-30. The key-value store guide lists its known build issues.
447
+ - Added: `createTransactionalKeyValueBackend` in `./local/store/key-value`,
448
+ with the types `TransactionalKeyValueEngine`, `KeyValueTransaction`, and
449
+ `KeyValueReader`. It makes a key-value backend from an engine's own
450
+ transaction and a synchronous handle with `get`, `set`, `delete`, and
451
+ `keysWithPrefix`. The SDK applies each `atomicWrite` batch inside that
452
+ transaction, so a backend does not copy the batch rules. The Realm backend
453
+ uses it. To upgrade a backend that you wrote for an engine with
454
+ transactions, replace its `atomicWrite` code with this function and run the
455
+ conformance kit again. The key-value store guide has an op-sqlite sketch.
456
+ - **Fixed: `stop()` resolved while a relay delivery or a retry request was in
457
+ progress.** The decrypt then went on after logout and wrote to the store
458
+ after the app could have closed it. `stop()` now resolves only after the SDK
459
+ work of the deliveries, retry requests, and receipt sends in progress
460
+ finishes. It does not wait for app hooks, so a hook can await `stop()`. This
461
+ includes the session hooks of a resend for a retry request, when the resend
462
+ sets up a session with a new or stale device. Another resend to the same
463
+ user that waits while such a hook runs stops waiting and sends nothing, and
464
+ its message record stays for the next retry request. When a hook returns
465
+ after `stop()`, the SDK drops the work after the hook and writes nothing
466
+ more. The relay delivers the envelope again after the next start, and the
467
+ hook gets the plaintext again. A delivery that fails is logged and no longer
468
+ rejects as an unhandled promise.
469
+ - **Breaking: the managed Signal Protocol Relay hosts use the lane tokens.**
470
+ The SDK pins `https://sandbox.relay.open-e2ee.dev`,
471
+ `https://stage.relay.open-e2ee.dev`, and
472
+ `https://stage-sandbox.relay.open-e2ee.dev`.
473
+ `https://relay.open-e2ee.dev` does not change. A connection URL on
474
+ `development.relay.open-e2ee.dev`, `staging.relay.open-e2ee.dev`, or
475
+ `staging-customer-development.relay.open-e2ee.dev` is now invalid. Copy the
476
+ connection URL from the console again.
477
+ - **Breaking: the Signal Protocol Relay API path is `/signal/v1/*`.** A
478
+ connection URL is now `https://<host>/signal/v1/connection/<key>`, and the
479
+ SDK sends each request under `/signal/v1/`. The SDK rejects a connection URL
480
+ with the old `/v1/connection/` path, and a connection document whose
481
+ `protocolEndpoint` is not `<origin>/signal/v1`.
482
+ - **Breaking: the developer environment kind is `sandbox`.** The
483
+ `environment` of a hosted Relay connection is now `'sandbox' |
484
+ 'production'`. The SDK rejects a connection document that names the old
485
+ kind. The Relay gives a sandbox publishable key the prefix `pk_sandbox_`.
486
+
487
+ - **A bare React Native example.** `examples/react-native` runs the encrypted
488
+ exchange in a React Native 0.87.1 app with no Expo module. Alice uses
489
+ `reactNativeStore()` on the op-sqlite SQLCipher build, with the database key
490
+ in `react-native-keychain`. On each launch, the app logs the SQLCipher
491
+ version and the first 16 bytes of the SDK database file, and requires that a
492
+ wrong key fails the open of an SDK database. The run fails when the build has
493
+ no SQLCipher or when the file starts with the plaintext SQLite header. CI
494
+ builds the release APK and runs it twice on an Android emulator, and requires
495
+ these lines on each run. On every change, CI also builds the example's Metro
496
+ release bundle with the packed SDK and the stock Babel preset, and compiles
497
+ it with Hermes.
498
+
499
+ - **The Expo example checks that SQLCipher encrypts its database.** On each launch,
500
+ `examples/expo` logs the SQLCipher version and the first 16 bytes of the SDK
501
+ database file. The run fails when the build has no SQLCipher or when the
502
+ file starts with the plaintext SQLite header. The Android emulator job
503
+ requires both lines on each run. The example now depends on
504
+ `expo-file-system` to read the file.
505
+
3
506
  ## 7.2.0
4
507
 
5
508
  - **Fixed: a send now reaches every device that the relay lists for the