@open-e2ee/signal-protocol-sdk 0.2.3 → 0.3.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 (601) hide show
  1. package/ADAPTERS.md +4 -4
  2. package/ARCHITECTURE.md +17 -16
  3. package/CHANGELOG.md +39 -0
  4. package/COMMERCIAL.md +6 -6
  5. package/NOTICE +1 -1
  6. package/README.md +44 -34
  7. package/SECURITY.md +16 -13
  8. package/TROUBLESHOOTING.md +5 -5
  9. package/blocking/README.md +6 -5
  10. package/client/README.md +5 -5
  11. package/device/README.md +8 -8
  12. package/dist/blocking/types.d.ts +2 -2
  13. package/dist/blocking/types.js +2 -2
  14. package/dist/client/client.d.ts +46 -45
  15. package/dist/client/client.d.ts.map +1 -1
  16. package/dist/client/client.js +61 -60
  17. package/dist/client/client.js.map +1 -1
  18. package/dist/client/config.d.ts +32 -32
  19. package/dist/client/constants.d.ts +7 -6
  20. package/dist/client/constants.d.ts.map +1 -1
  21. package/dist/client/constants.js +5 -4
  22. package/dist/client/constants.js.map +1 -1
  23. package/dist/client/dual-store.d.ts +2 -2
  24. package/dist/client/dual-store.js +2 -2
  25. package/dist/client/endorsement-manager.d.ts +14 -14
  26. package/dist/client/endorsement-manager.d.ts.map +1 -1
  27. package/dist/client/endorsement-manager.js +15 -15
  28. package/dist/client/endorsement-manager.js.map +1 -1
  29. package/dist/client/event-hooks.d.ts +16 -16
  30. package/dist/client/event-hooks.d.ts.map +1 -1
  31. package/dist/client/event-hooks.js +1 -1
  32. package/dist/client/event-hooks.js.map +1 -1
  33. package/dist/client/files.js +4 -4
  34. package/dist/client/files.js.map +1 -1
  35. package/dist/client/headless.d.ts +7 -7
  36. package/dist/client/headless.d.ts.map +1 -1
  37. package/dist/client/headless.js +4 -4
  38. package/dist/client/key-rotation-core.d.ts +19 -17
  39. package/dist/client/key-rotation-core.d.ts.map +1 -1
  40. package/dist/client/key-rotation-core.js +35 -31
  41. package/dist/client/key-rotation-core.js.map +1 -1
  42. package/dist/client/key-rotation.d.ts +8 -8
  43. package/dist/client/key-rotation.js +8 -8
  44. package/dist/client/media.d.ts +1 -1
  45. package/dist/client/messages.d.ts.map +1 -1
  46. package/dist/client/messages.js +13 -11
  47. package/dist/client/messages.js.map +1 -1
  48. package/dist/client/multi-device.d.ts +5 -4
  49. package/dist/client/multi-device.d.ts.map +1 -1
  50. package/dist/client/multi-device.js.map +1 -1
  51. package/dist/client/prekeys.d.ts +7 -7
  52. package/dist/client/prekeys.js +10 -10
  53. package/dist/client/prekeys.js.map +1 -1
  54. package/dist/client/relay-subscription.d.ts +3 -0
  55. package/dist/client/relay-subscription.d.ts.map +1 -1
  56. package/dist/client/relay-subscription.js +7 -4
  57. package/dist/client/relay-subscription.js.map +1 -1
  58. package/dist/client/retry-utils.d.ts +5 -6
  59. package/dist/client/retry-utils.d.ts.map +1 -1
  60. package/dist/client/retry-utils.js +5 -12
  61. package/dist/client/retry-utils.js.map +1 -1
  62. package/dist/client/retry.js +7 -7
  63. package/dist/client/retry.js.map +1 -1
  64. package/dist/client/sealed-sender-ops.d.ts +3 -3
  65. package/dist/client/sealed-sender-ops.js +5 -5
  66. package/dist/client/sealed-sender-ops.js.map +1 -1
  67. package/dist/client/sessions.d.ts +2 -2
  68. package/dist/client/sessions.js +2 -2
  69. package/dist/client/signal-service-cipher.d.ts +9 -9
  70. package/dist/client/signal-service-cipher.d.ts.map +1 -1
  71. package/dist/client/signal-service-cipher.js +41 -40
  72. package/dist/client/signal-service-cipher.js.map +1 -1
  73. package/dist/client/state.d.ts +1 -1
  74. package/dist/client/state.js +1 -1
  75. package/dist/client/types.d.ts +19 -19
  76. package/dist/client/types.d.ts.map +1 -1
  77. package/dist/device/connection.d.ts +1 -1
  78. package/dist/device/connection.js +2 -2
  79. package/dist/device/connection.js.map +1 -1
  80. package/dist/device/constants.d.ts +4 -4
  81. package/dist/device/constants.js +3 -3
  82. package/dist/device/device-id.d.ts +4 -4
  83. package/dist/device/device-id.js +4 -4
  84. package/dist/device/expo-metadata.d.ts +13 -11
  85. package/dist/device/expo-metadata.d.ts.map +1 -1
  86. package/dist/device/expo-metadata.js +13 -11
  87. package/dist/device/expo-metadata.js.map +1 -1
  88. package/dist/device/lifecycle/manager.d.ts +6 -6
  89. package/dist/device/lifecycle/manager.js +7 -7
  90. package/dist/device/lifecycle/types.d.ts +13 -13
  91. package/dist/device/lifecycle/types.d.ts.map +1 -1
  92. package/dist/device/lifecycle/utils.d.ts +2 -2
  93. package/dist/device/lifecycle/utils.js +5 -5
  94. package/dist/device/lifecycle/utils.js.map +1 -1
  95. package/dist/device/provisioning.d.ts +5 -4
  96. package/dist/device/provisioning.d.ts.map +1 -1
  97. package/dist/device/provisioning.js +5 -4
  98. package/dist/device/provisioning.js.map +1 -1
  99. package/dist/device/transfer.d.ts +2 -2
  100. package/dist/device/transfer.js +3 -3
  101. package/dist/device/transfer.js.map +1 -1
  102. package/dist/encoding/index.d.ts +3 -4
  103. package/dist/encoding/index.d.ts.map +1 -1
  104. package/dist/encoding/index.js.map +1 -1
  105. package/dist/files/index.d.ts +1 -1
  106. package/dist/files/index.js +1 -1
  107. package/dist/hooks/use-connection-presence.d.ts +1 -1
  108. package/dist/hooks/use-connection-presence.js +7 -7
  109. package/dist/hooks/use-connection-presence.js.map +1 -1
  110. package/dist/hooks/use-group-membership.d.ts +2 -2
  111. package/dist/hooks/use-group-membership.d.ts.map +1 -1
  112. package/dist/hooks/use-group-membership.js +6 -6
  113. package/dist/hooks/use-group-membership.js.map +1 -1
  114. package/dist/hooks/use-key-rotation.js +3 -3
  115. package/dist/hooks/use-key-rotation.js.map +1 -1
  116. package/dist/hooks/use-single-flight.d.ts +2 -2
  117. package/dist/hooks/use-single-flight.js +1 -1
  118. package/dist/index.d.ts +4 -3
  119. package/dist/index.d.ts.map +1 -1
  120. package/dist/index.js +22 -4
  121. package/dist/index.js.map +1 -1
  122. package/dist/internal/crypto/ec/ed25519.d.ts +6 -6
  123. package/dist/internal/crypto/ec/ed25519.js +6 -6
  124. package/dist/internal/crypto/ec/x25519-validation.d.ts.map +1 -1
  125. package/dist/internal/crypto/ec/x25519-validation.js +4 -2
  126. package/dist/internal/crypto/ec/x25519-validation.js.map +1 -1
  127. package/dist/internal/crypto/index.d.ts +2 -0
  128. package/dist/internal/crypto/index.d.ts.map +1 -1
  129. package/dist/internal/crypto/index.js +2 -0
  130. package/dist/internal/crypto/index.js.map +1 -1
  131. package/dist/internal/crypto/kdf/hkdf.d.ts +9 -8
  132. package/dist/internal/crypto/kdf/hkdf.d.ts.map +1 -1
  133. package/dist/internal/crypto/kdf/hkdf.js +11 -10
  134. package/dist/internal/crypto/kdf/hkdf.js.map +1 -1
  135. package/dist/internal/crypto/key-prefix.d.ts +3 -3
  136. package/dist/internal/crypto/key-prefix.js +3 -3
  137. package/dist/internal/crypto/pq/kyber.d.ts +7 -7
  138. package/dist/internal/crypto/pq/kyber.js +10 -10
  139. package/dist/internal/crypto/pq/kyber.js.map +1 -1
  140. package/dist/internal/crypto/random.d.ts +1 -1
  141. package/dist/internal/crypto/random.js +1 -1
  142. package/dist/internal/crypto/symmetric/aes-gcm-siv.js +1 -1
  143. package/dist/internal/crypto/symmetric/aes.js +4 -4
  144. package/dist/internal/crypto/symmetric/aes.js.map +1 -1
  145. package/dist/internal/crypto/symmetric/mac.d.ts +1 -1
  146. package/dist/internal/crypto/symmetric/mac.js +3 -3
  147. package/dist/internal/crypto/symmetric/padding.js +1 -1
  148. package/dist/internal/crypto/symmetric/padding.js.map +1 -1
  149. package/dist/internal/crypto/symmetric/streaming-aead.d.ts +7 -1
  150. package/dist/internal/crypto/symmetric/streaming-aead.d.ts.map +1 -1
  151. package/dist/internal/crypto/symmetric/streaming-aead.js +10 -4
  152. package/dist/internal/crypto/symmetric/streaming-aead.js.map +1 -1
  153. package/dist/internal/crypto/utils.d.ts +2 -2
  154. package/dist/internal/crypto/utils.d.ts.map +1 -1
  155. package/dist/internal/crypto/utils.js +16 -14
  156. package/dist/internal/crypto/utils.js.map +1 -1
  157. package/dist/internal/crypto/validation.d.ts +4 -4
  158. package/dist/internal/crypto/validation.js +2 -2
  159. package/dist/internal/encoding/proto/envelope.d.ts +1 -1
  160. package/dist/internal/encoding/proto/envelope.js +1 -1
  161. package/dist/internal/encoding/proto/index.d.ts +4 -4
  162. package/dist/internal/encoding/proto/index.js +4 -4
  163. package/dist/internal/encoding/proto/pq-ratchet-serialize.d.ts +28 -16
  164. package/dist/internal/encoding/proto/pq-ratchet-serialize.d.ts.map +1 -1
  165. package/dist/internal/encoding/proto/pq-ratchet-serialize.js +30 -18
  166. package/dist/internal/encoding/proto/pq-ratchet-serialize.js.map +1 -1
  167. package/dist/internal/encoding/proto/primitives.d.ts +45 -35
  168. package/dist/internal/encoding/proto/primitives.d.ts.map +1 -1
  169. package/dist/internal/encoding/proto/primitives.js +54 -43
  170. package/dist/internal/encoding/proto/primitives.js.map +1 -1
  171. package/dist/internal/encoding/proto/sender-key-message.d.ts +2 -2
  172. package/dist/internal/encoding/proto/sender-key-message.js +2 -2
  173. package/dist/internal/encoding/proto/signal-message.d.ts +13 -13
  174. package/dist/internal/encoding/proto/signal-message.d.ts.map +1 -1
  175. package/dist/internal/encoding/proto/signal-message.js +13 -13
  176. package/dist/internal/encoding/proto/signal-message.js.map +1 -1
  177. package/dist/internal/groups/access-control.d.ts +5 -5
  178. package/dist/internal/groups/access-control.js +6 -6
  179. package/dist/internal/groups/access-control.js.map +1 -1
  180. package/dist/internal/groups/change-actions.d.ts +4 -4
  181. package/dist/internal/groups/change-actions.js +3 -3
  182. package/dist/internal/groups/encrypted-state.js +1 -1
  183. package/dist/internal/groups/encrypted-state.js.map +1 -1
  184. package/dist/internal/groups/group-id.d.ts +1 -1
  185. package/dist/internal/groups/manager.d.ts +24 -23
  186. package/dist/internal/groups/manager.d.ts.map +1 -1
  187. package/dist/internal/groups/manager.js +40 -36
  188. package/dist/internal/groups/manager.js.map +1 -1
  189. package/dist/internal/groups/server-engine.d.ts +29 -21
  190. package/dist/internal/groups/server-engine.d.ts.map +1 -1
  191. package/dist/internal/groups/server-engine.js +55 -50
  192. package/dist/internal/groups/server-engine.js.map +1 -1
  193. package/dist/internal/groups/trust-root.d.ts +2 -2
  194. package/dist/internal/groups/trust-root.js +2 -2
  195. package/dist/internal/groups/types.d.ts +4 -4
  196. package/dist/internal/groups/types.d.ts.map +1 -1
  197. package/dist/internal/groups/wire.d.ts +6 -7
  198. package/dist/internal/groups/wire.d.ts.map +1 -1
  199. package/dist/internal/groups/wire.js +6 -7
  200. package/dist/internal/groups/wire.js.map +1 -1
  201. package/dist/internal/manager/manager.d.ts +14 -12
  202. package/dist/internal/manager/manager.d.ts.map +1 -1
  203. package/dist/internal/manager/manager.js +47 -41
  204. package/dist/internal/manager/manager.js.map +1 -1
  205. package/dist/internal/protocol/double-ratchet/chains.d.ts +8 -6
  206. package/dist/internal/protocol/double-ratchet/chains.d.ts.map +1 -1
  207. package/dist/internal/protocol/double-ratchet/chains.js +10 -8
  208. package/dist/internal/protocol/double-ratchet/chains.js.map +1 -1
  209. package/dist/internal/protocol/double-ratchet/index.d.ts +2 -2
  210. package/dist/internal/protocol/double-ratchet/index.js +2 -2
  211. package/dist/internal/protocol/double-ratchet/ratchet.d.ts +4 -4
  212. package/dist/internal/protocol/double-ratchet/ratchet.js +6 -6
  213. package/dist/internal/protocol/pqxdh/pqxdh.d.ts +21 -18
  214. package/dist/internal/protocol/pqxdh/pqxdh.d.ts.map +1 -1
  215. package/dist/internal/protocol/pqxdh/pqxdh.js +48 -42
  216. package/dist/internal/protocol/pqxdh/pqxdh.js.map +1 -1
  217. package/dist/internal/protocol/sealed-sender/decryption-v2.js +5 -5
  218. package/dist/internal/protocol/sealed-sender/decryption-v2.js.map +1 -1
  219. package/dist/internal/protocol/sealed-sender/decryption.d.ts.map +1 -1
  220. package/dist/internal/protocol/sealed-sender/decryption.js +11 -8
  221. package/dist/internal/protocol/sealed-sender/decryption.js.map +1 -1
  222. package/dist/internal/protocol/sealed-sender/delivery-token.d.ts +2 -2
  223. package/dist/internal/protocol/sealed-sender/delivery-token.js +2 -2
  224. package/dist/internal/protocol/sealed-sender/encryption-v2.js +1 -1
  225. package/dist/internal/protocol/sealed-sender/encryption-v2.js.map +1 -1
  226. package/dist/internal/protocol/sealed-sender/encryption.d.ts +2 -2
  227. package/dist/internal/protocol/sealed-sender/encryption.js +2 -2
  228. package/dist/internal/protocol/sealed-sender/proto/index.d.ts +25 -23
  229. package/dist/internal/protocol/sealed-sender/proto/index.d.ts.map +1 -1
  230. package/dist/internal/protocol/sealed-sender/proto/index.js +32 -30
  231. package/dist/internal/protocol/sealed-sender/proto/index.js.map +1 -1
  232. package/dist/internal/protocol/sealed-sender/trust-root.d.ts +10 -9
  233. package/dist/internal/protocol/sealed-sender/trust-root.d.ts.map +1 -1
  234. package/dist/internal/protocol/sealed-sender/trust-root.js +10 -9
  235. package/dist/internal/protocol/sealed-sender/trust-root.js.map +1 -1
  236. package/dist/internal/protocol/sealed-sender/types.d.ts +13 -14
  237. package/dist/internal/protocol/sealed-sender/types.d.ts.map +1 -1
  238. package/dist/internal/protocol/sealed-sender/types.js +7 -8
  239. package/dist/internal/protocol/sealed-sender/types.js.map +1 -1
  240. package/dist/internal/protocol/sealed-sender/v2-binary.d.ts +1 -1
  241. package/dist/internal/protocol/sealed-sender/v2-binary.js +2 -2
  242. package/dist/internal/protocol/sealed-sender/v2-binary.js.map +1 -1
  243. package/dist/internal/protocol/sender-keys/manager.d.ts +16 -14
  244. package/dist/internal/protocol/sender-keys/manager.d.ts.map +1 -1
  245. package/dist/internal/protocol/sender-keys/manager.js +37 -34
  246. package/dist/internal/protocol/sender-keys/manager.js.map +1 -1
  247. package/dist/internal/protocol/spqr/braid-serialize.d.ts +6 -6
  248. package/dist/internal/protocol/spqr/braid-serialize.js +5 -5
  249. package/dist/internal/protocol/spqr/braid-serialize.js.map +1 -1
  250. package/dist/internal/protocol/spqr/braid.d.ts +3 -3
  251. package/dist/internal/protocol/spqr/braid.js +7 -7
  252. package/dist/internal/protocol/spqr/braid.js.map +1 -1
  253. package/dist/internal/protocol/spqr/index.js +1 -1
  254. package/dist/internal/protocol/spqr/index.js.map +1 -1
  255. package/dist/internal/protocol/spqr/ml-kem-braid/chunk-domain.d.ts +3 -3
  256. package/dist/internal/protocol/spqr/ml-kem-braid/chunk-domain.js +3 -3
  257. package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.js +1 -1
  258. package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.js.map +1 -1
  259. package/dist/internal/protocol/spqr/ml-kem-braid/kdf.d.ts +1 -1
  260. package/dist/internal/protocol/spqr/ml-kem-braid/kdf.js +1 -1
  261. package/dist/internal/protocol/spqr/ml-kem-braid/kdf.js.map +1 -1
  262. package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.d.ts +4 -3
  263. package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.d.ts.map +1 -1
  264. package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.js +4 -3
  265. package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.js.map +1 -1
  266. package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/index.js +2 -2
  267. package/dist/internal/protocol/spqr/ml-kem-braid/progress.d.ts +1 -1
  268. package/dist/internal/protocol/spqr/ml-kem-braid/progress.js +1 -1
  269. package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts +15 -7
  270. package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts.map +1 -1
  271. package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.js +15 -7
  272. package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.js.map +1 -1
  273. package/dist/internal/protocol/spqr/ml-kem-braid/rs/galois/field.js +1 -1
  274. package/dist/internal/protocol/spqr/ml-kem-braid/rs/polynomial.d.ts +3 -3
  275. package/dist/internal/protocol/spqr/ml-kem-braid/rs/polynomial.js +1 -1
  276. package/dist/internal/protocol/spqr/ml-kem-braid/serialize.d.ts +7 -7
  277. package/dist/internal/protocol/spqr/ml-kem-braid/serialize.js +11 -11
  278. package/dist/internal/protocol/spqr/ml-kem-braid/serialize.js.map +1 -1
  279. package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.d.ts +1 -1
  280. package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.js +6 -6
  281. package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.js.map +1 -1
  282. package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts +2 -2
  283. package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts.map +1 -1
  284. package/dist/internal/protocol/spqr/ml-kem-braid/types.js.map +1 -1
  285. package/dist/internal/protocol/spqr/serialize.d.ts +12 -12
  286. package/dist/internal/protocol/spqr/serialize.js +5 -5
  287. package/dist/internal/protocol/spqr/spqr.d.ts +6 -6
  288. package/dist/internal/protocol/spqr/spqr.d.ts.map +1 -1
  289. package/dist/internal/protocol/spqr/spqr.js +47 -42
  290. package/dist/internal/protocol/spqr/spqr.js.map +1 -1
  291. package/dist/internal/protocol/spqr/validate.d.ts +1 -1
  292. package/dist/internal/protocol/triple-ratchet/ratchet.d.ts +12 -12
  293. package/dist/internal/protocol/triple-ratchet/ratchet.d.ts.map +1 -1
  294. package/dist/internal/protocol/triple-ratchet/ratchet.js +11 -11
  295. package/dist/internal/protocol/triple-ratchet/ratchet.js.map +1 -1
  296. package/dist/internal/protocol/username/hash.d.ts.map +1 -1
  297. package/dist/internal/protocol/username/hash.js +6 -4
  298. package/dist/internal/protocol/username/hash.js.map +1 -1
  299. package/dist/internal/protocol/version.d.ts +3 -3
  300. package/dist/internal/protocol/version.js +1 -1
  301. package/dist/internal/protocol/x3dh/x3dh.d.ts +16 -16
  302. package/dist/internal/protocol/x3dh/x3dh.d.ts.map +1 -1
  303. package/dist/internal/protocol/x3dh/x3dh.js +15 -15
  304. package/dist/internal/protocol/x3dh/x3dh.js.map +1 -1
  305. package/dist/internal/protocol/zk/credentials/attributes.d.ts +7 -7
  306. package/dist/internal/protocol/zk/credentials/attributes.js +7 -7
  307. package/dist/internal/protocol/zk/credentials/credentials.d.ts +1 -1
  308. package/dist/internal/protocol/zk/credentials/credentials.js +1 -1
  309. package/dist/internal/protocol/zk/credentials/endorsements.d.ts +11 -11
  310. package/dist/internal/protocol/zk/credentials/endorsements.js +14 -14
  311. package/dist/internal/protocol/zk/credentials/issuance.d.ts +5 -1
  312. package/dist/internal/protocol/zk/credentials/issuance.d.ts.map +1 -1
  313. package/dist/internal/protocol/zk/credentials/issuance.js +5 -1
  314. package/dist/internal/protocol/zk/credentials/issuance.js.map +1 -1
  315. package/dist/internal/protocol/zk/credentials/presentation.d.ts +16 -16
  316. package/dist/internal/protocol/zk/credentials/presentation.d.ts.map +1 -1
  317. package/dist/internal/protocol/zk/credentials/presentation.js +18 -18
  318. package/dist/internal/protocol/zk/credentials/presentation.js.map +1 -1
  319. package/dist/internal/protocol/zk/groups/auth-credential.d.ts +22 -16
  320. package/dist/internal/protocol/zk/groups/auth-credential.d.ts.map +1 -1
  321. package/dist/internal/protocol/zk/groups/auth-credential.js +19 -14
  322. package/dist/internal/protocol/zk/groups/auth-credential.js.map +1 -1
  323. package/dist/internal/protocol/zk/groups/client-zk-group-cipher.d.ts +4 -4
  324. package/dist/internal/protocol/zk/groups/client-zk-group-cipher.js +4 -4
  325. package/dist/internal/protocol/zk/groups/group-params.d.ts +2 -2
  326. package/dist/internal/protocol/zk/groups/group-params.js +2 -2
  327. package/dist/internal/protocol/zk/groups/group-send-endorsement.d.ts +10 -9
  328. package/dist/internal/protocol/zk/groups/group-send-endorsement.d.ts.map +1 -1
  329. package/dist/internal/protocol/zk/groups/group-send-endorsement.js +9 -8
  330. package/dist/internal/protocol/zk/groups/group-send-endorsement.js.map +1 -1
  331. package/dist/internal/protocol/zk/groups/lizard.d.ts +1 -1
  332. package/dist/internal/protocol/zk/groups/lizard.js +4 -4
  333. package/dist/internal/protocol/zk/groups/lizard.js.map +1 -1
  334. package/dist/internal/protocol/zk/groups/profile-key-commitment.d.ts +3 -3
  335. package/dist/internal/protocol/zk/groups/profile-key-commitment.js +3 -3
  336. package/dist/internal/protocol/zk/groups/profile-key-credential.d.ts +11 -11
  337. package/dist/internal/protocol/zk/groups/profile-key-credential.js +7 -7
  338. package/dist/internal/protocol/zk/groups/profile-key-encryption.d.ts +2 -2
  339. package/dist/internal/protocol/zk/groups/profile-key-encryption.js +2 -2
  340. package/dist/internal/protocol/zk/groups/profile-key-struct.d.ts +2 -2
  341. package/dist/internal/protocol/zk/groups/profile-key-struct.js +2 -2
  342. package/dist/internal/protocol/zk/groups/profile-key-version.d.ts +2 -2
  343. package/dist/internal/protocol/zk/groups/profile-key-version.js +2 -2
  344. package/dist/internal/protocol/zk/groups/server-params.d.ts +1 -1
  345. package/dist/internal/protocol/zk/groups/server-params.js +1 -1
  346. package/dist/internal/protocol/zk/groups/uid-encryption.d.ts +4 -4
  347. package/dist/internal/protocol/zk/groups/uid-encryption.js +4 -4
  348. package/dist/internal/protocol/zk/groups/uid-struct.d.ts +2 -2
  349. package/dist/internal/protocol/zk/groups/uid-struct.js +3 -3
  350. package/dist/internal/protocol/zk/groups/uid-struct.js.map +1 -1
  351. package/dist/internal/protocol/zk/proofs/args.d.ts +3 -3
  352. package/dist/internal/protocol/zk/proofs/args.js +3 -3
  353. package/dist/internal/protocol/zk/proofs/sho-sha256.d.ts +3 -3
  354. package/dist/internal/protocol/zk/proofs/sho-sha256.js +3 -3
  355. package/dist/internal/protocol/zk/proofs/sho.d.ts +8 -7
  356. package/dist/internal/protocol/zk/proofs/sho.d.ts.map +1 -1
  357. package/dist/internal/protocol/zk/proofs/sho.js +8 -7
  358. package/dist/internal/protocol/zk/proofs/sho.js.map +1 -1
  359. package/dist/internal/protocol/zk/proofs/statement.d.ts +8 -6
  360. package/dist/internal/protocol/zk/proofs/statement.d.ts.map +1 -1
  361. package/dist/internal/protocol/zk/proofs/statement.js +8 -6
  362. package/dist/internal/protocol/zk/proofs/statement.js.map +1 -1
  363. package/dist/internal/sesame/manager.d.ts +23 -19
  364. package/dist/internal/sesame/manager.d.ts.map +1 -1
  365. package/dist/internal/sesame/manager.js +64 -54
  366. package/dist/internal/sesame/manager.js.map +1 -1
  367. package/dist/internal/sesame/types.d.ts +28 -25
  368. package/dist/internal/sesame/types.d.ts.map +1 -1
  369. package/dist/internal/sesame/types.js +2 -2
  370. package/dist/internal/sesame/types.js.map +1 -1
  371. package/dist/internal/sesame/validation.d.ts +2 -2
  372. package/dist/internal/sesame/validation.js +3 -3
  373. package/dist/internal/sesame/validation.js.map +1 -1
  374. package/dist/internal/session/builder.d.ts +8 -8
  375. package/dist/internal/session/builder.js +22 -22
  376. package/dist/internal/session/builder.js.map +1 -1
  377. package/dist/internal/session/cipher.d.ts +3 -3
  378. package/dist/internal/session/cipher.d.ts.map +1 -1
  379. package/dist/internal/session/cipher.js +51 -40
  380. package/dist/internal/session/cipher.js.map +1 -1
  381. package/dist/internal/session/decryption.js +11 -9
  382. package/dist/internal/session/decryption.js.map +1 -1
  383. package/dist/internal/session/factory.js +1 -1
  384. package/dist/internal/session/factory.js.map +1 -1
  385. package/dist/internal/session/handshake.d.ts +4 -4
  386. package/dist/internal/session/handshake.js +4 -4
  387. package/dist/internal/session/keys.d.ts +3 -4
  388. package/dist/internal/session/keys.d.ts.map +1 -1
  389. package/dist/internal/session/keys.js.map +1 -1
  390. package/dist/internal/session/ratchet.d.ts +8 -8
  391. package/dist/internal/session/ratchet.js +10 -10
  392. package/dist/internal/session/ratchet.js.map +1 -1
  393. package/dist/internal/session/session-resolver.d.ts +6 -6
  394. package/dist/internal/session/session-resolver.js +6 -6
  395. package/dist/internal/session/state.d.ts +12 -12
  396. package/dist/internal/session/state.d.ts.map +1 -1
  397. package/dist/internal/session/state.js +7 -7
  398. package/dist/internal/session/types.d.ts +20 -20
  399. package/dist/internal/session/types.d.ts.map +1 -1
  400. package/dist/internal/session/types.js +3 -3
  401. package/dist/internal/session/validation.d.ts +1 -1
  402. package/dist/internal/session/validation.js +4 -4
  403. package/dist/internal/session/validation.js.map +1 -1
  404. package/dist/keys/branded.d.ts +12 -12
  405. package/dist/keys/branded.js +3 -3
  406. package/dist/keys/generation.d.ts +4 -4
  407. package/dist/keys/generation.js +4 -4
  408. package/dist/keys/identity.d.ts +7 -7
  409. package/dist/keys/identity.d.ts.map +1 -1
  410. package/dist/keys/identity.js +7 -7
  411. package/dist/keys/identity.js.map +1 -1
  412. package/dist/keys/types.d.ts +16 -16
  413. package/dist/keys/types.d.ts.map +1 -1
  414. package/dist/layers.d.ts +1 -1
  415. package/dist/layers.js +1 -1
  416. package/dist/local/store/expo/adapter.d.ts +8 -8
  417. package/dist/local/store/expo/adapter.js +10 -10
  418. package/dist/local/store/expo/adapter.js.map +1 -1
  419. package/dist/local/store/expo/database-key.d.ts +7 -7
  420. package/dist/local/store/expo/database-key.js +7 -7
  421. package/dist/local/store/expo/key-storage.d.ts +1 -1
  422. package/dist/local/store/expo/key-storage.js +4 -4
  423. package/dist/local/store/expo/key-storage.js.map +1 -1
  424. package/dist/local/store/expo/models/kyber-prekey-used.d.ts +6 -6
  425. package/dist/local/store/expo/models/kyber-prekey-used.js +3 -3
  426. package/dist/local/store/expo/models/kyber-prekey.d.ts +1 -1
  427. package/dist/local/store/expo/models/kyber-prekey.js +1 -1
  428. package/dist/local/store/expo/models/message-record.d.ts +2 -2
  429. package/dist/local/store/expo/models/message-record.d.ts.map +1 -1
  430. package/dist/local/store/expo/models/message-record.js +1 -1
  431. package/dist/local/store/expo/models/message-record.js.map +1 -1
  432. package/dist/local/store/expo/models/sender-key.d.ts +11 -10
  433. package/dist/local/store/expo/models/sender-key.d.ts.map +1 -1
  434. package/dist/local/store/expo/models/sender-key.js +11 -10
  435. package/dist/local/store/expo/models/sender-key.js.map +1 -1
  436. package/dist/local/store/expo/schema.d.ts +2 -2
  437. package/dist/local/store/expo/schema.js +2 -2
  438. package/dist/local/store/expo/secure-store-options.d.ts +1 -1
  439. package/dist/local/store/memory/adapter.d.ts +2 -2
  440. package/dist/local/store/memory/adapter.js +12 -12
  441. package/dist/local/store/memory/adapter.js.map +1 -1
  442. package/dist/local/store/node/adapter.d.ts.map +1 -1
  443. package/dist/local/store/node/adapter.js +5 -4
  444. package/dist/local/store/node/adapter.js.map +1 -1
  445. package/dist/local/store/node/database-key.d.ts +8 -8
  446. package/dist/local/store/node/database-key.js +10 -10
  447. package/dist/local/store/node/database-key.js.map +1 -1
  448. package/dist/local/store/node/database.d.ts +5 -5
  449. package/dist/local/store/node/database.js +11 -11
  450. package/dist/local/store/node/database.js.map +1 -1
  451. package/dist/local/store/react-native/adapter.d.ts +6 -6
  452. package/dist/local/store/react-native/adapter.d.ts.map +1 -1
  453. package/dist/local/store/react-native/adapter.js +35 -32
  454. package/dist/local/store/react-native/adapter.js.map +1 -1
  455. package/dist/local/store/react-native/backend-conformance.d.ts +11 -10
  456. package/dist/local/store/react-native/backend-conformance.d.ts.map +1 -1
  457. package/dist/local/store/react-native/backend-conformance.js +13 -12
  458. package/dist/local/store/react-native/backend-conformance.js.map +1 -1
  459. package/dist/local/store/react-native/index.d.ts +1 -1
  460. package/dist/local/store/react-native/reference-backend.d.ts +14 -13
  461. package/dist/local/store/react-native/reference-backend.d.ts.map +1 -1
  462. package/dist/local/store/react-native/reference-backend.js +15 -14
  463. package/dist/local/store/react-native/reference-backend.js.map +1 -1
  464. package/dist/local/store/react-native/storage.d.ts +3 -3
  465. package/dist/local/store/web/adapter.d.ts +3 -3
  466. package/dist/local/store/web/adapter.d.ts.map +1 -1
  467. package/dist/local/store/web/adapter.js +30 -31
  468. package/dist/local/store/web/adapter.js.map +1 -1
  469. package/dist/local/store/web/index.d.ts +1 -1
  470. package/dist/local/vault/index.d.ts +2 -2
  471. package/dist/media/index.d.ts +11 -11
  472. package/dist/media/index.js +9 -9
  473. package/dist/profile/contact-state.d.ts +1 -1
  474. package/dist/profile/contact-state.js +1 -1
  475. package/dist/profile/profile-key.d.ts +2 -2
  476. package/dist/profile/profile-key.js +7 -6
  477. package/dist/profile/profile-key.js.map +1 -1
  478. package/dist/remote/object-store/index.d.ts +1 -1
  479. package/dist/remote/object-store/s3/storage.d.ts +1 -1
  480. package/dist/remote/object-store/types.d.ts +4 -4
  481. package/dist/remote/object-store/types.d.ts.map +1 -1
  482. package/dist/remote/relay/convex/backend.d.ts +4 -4
  483. package/dist/remote/relay/convex/backend.js +3 -3
  484. package/dist/remote/relay/convex/backend.js.map +1 -1
  485. package/dist/remote/relay/convex/component/accounts.d.ts +15 -13
  486. package/dist/remote/relay/convex/component/accounts.d.ts.map +1 -1
  487. package/dist/remote/relay/convex/component/accounts.js +31 -28
  488. package/dist/remote/relay/convex/component/accounts.js.map +1 -1
  489. package/dist/remote/relay/convex/component/certificates.js +1 -1
  490. package/dist/remote/relay/convex/component/cleanup.js +7 -7
  491. package/dist/remote/relay/convex/component/cleanup.js.map +1 -1
  492. package/dist/remote/relay/convex/component/convex.config.d.ts.map +1 -1
  493. package/dist/remote/relay/convex/component/convex.config.js +10 -8
  494. package/dist/remote/relay/convex/component/convex.config.js.map +1 -1
  495. package/dist/remote/relay/convex/component/devices.d.ts +21 -20
  496. package/dist/remote/relay/convex/component/devices.d.ts.map +1 -1
  497. package/dist/remote/relay/convex/component/devices.js +24 -23
  498. package/dist/remote/relay/convex/component/devices.js.map +1 -1
  499. package/dist/remote/relay/convex/component/groups.js +6 -6
  500. package/dist/remote/relay/convex/component/groups.js.map +1 -1
  501. package/dist/remote/relay/convex/component/messages.d.ts.map +1 -1
  502. package/dist/remote/relay/convex/component/messages.js +89 -82
  503. package/dist/remote/relay/convex/component/messages.js.map +1 -1
  504. package/dist/remote/relay/convex/component/provisioning.d.ts +3 -3
  505. package/dist/remote/relay/convex/component/provisioning.d.ts.map +1 -1
  506. package/dist/remote/relay/convex/component/provisioning.js +17 -16
  507. package/dist/remote/relay/convex/component/provisioning.js.map +1 -1
  508. package/dist/remote/relay/convex/component/runtime.d.ts.map +1 -1
  509. package/dist/remote/relay/convex/component/runtime.js +4 -2
  510. package/dist/remote/relay/convex/component/runtime.js.map +1 -1
  511. package/dist/remote/relay/convex/component/schema.js +25 -24
  512. package/dist/remote/relay/convex/component/schema.js.map +1 -1
  513. package/dist/remote/relay/convex/group-server.d.ts +3 -3
  514. package/dist/remote/relay/convex/group-server.js +3 -3
  515. package/dist/remote/relay/convex/relay.d.ts +3 -3
  516. package/dist/remote/relay/convex/relay.d.ts.map +1 -1
  517. package/dist/remote/relay/convex/relay.js +18 -17
  518. package/dist/remote/relay/convex/relay.js.map +1 -1
  519. package/dist/remote/relay/convex/types.d.ts +7 -7
  520. package/dist/remote/relay/convex/types.js +4 -4
  521. package/dist/remote/relay/memory/adapter.js +9 -9
  522. package/dist/remote/relay/memory/adapter.js.map +1 -1
  523. package/dist/remote/relay/types.d.ts +27 -27
  524. package/dist/remote/relay/types.d.ts.map +1 -1
  525. package/dist/safety/fingerprint.d.ts +7 -6
  526. package/dist/safety/fingerprint.d.ts.map +1 -1
  527. package/dist/safety/fingerprint.js +5 -4
  528. package/dist/safety/fingerprint.js.map +1 -1
  529. package/dist/safety/index.d.ts +6 -5
  530. package/dist/safety/index.d.ts.map +1 -1
  531. package/dist/safety/index.js +7 -6
  532. package/dist/safety/index.js.map +1 -1
  533. package/dist/safety/protobuf.js +2 -2
  534. package/dist/safety/protobuf.js.map +1 -1
  535. package/dist/safety/url.d.ts +5 -5
  536. package/dist/safety/url.js +6 -6
  537. package/dist/types/address.d.ts +2 -2
  538. package/dist/types/address.js +2 -2
  539. package/dist/types/api.d.ts +78 -73
  540. package/dist/types/api.d.ts.map +1 -1
  541. package/dist/types/errors.d.ts +63 -403
  542. package/dist/types/errors.d.ts.map +1 -1
  543. package/dist/types/errors.js +62 -537
  544. package/dist/types/errors.js.map +1 -1
  545. package/dist/types/messages.d.ts +16 -16
  546. package/dist/types/messages.d.ts.map +1 -1
  547. package/dist/types/messages.js +7 -7
  548. package/dist/types/messages.js.map +1 -1
  549. package/dist/types/protocol-config.d.ts +52 -49
  550. package/dist/types/protocol-config.d.ts.map +1 -1
  551. package/dist/types/protocol-config.js +36 -34
  552. package/dist/types/protocol-config.js.map +1 -1
  553. package/dist/types/protocol-constants.d.ts +2 -2
  554. package/dist/types/protocol-constants.js +2 -2
  555. package/dist/types/session.d.ts +62 -61
  556. package/dist/types/session.d.ts.map +1 -1
  557. package/dist/types/session.js +13 -14
  558. package/dist/types/session.js.map +1 -1
  559. package/dist/types/trust.d.ts +8 -8
  560. package/dist/types/trust.js +3 -3
  561. package/dist/utils/retry.d.ts.map +1 -1
  562. package/dist/utils/retry.js +2 -4
  563. package/dist/utils/retry.js.map +1 -1
  564. package/docs/ASSURANCE.md +82 -74
  565. package/docs/CLIENT_COMPOSITION.md +19 -15
  566. package/docs/DEVIATIONS.md +507 -425
  567. package/docs/DOCUMENTATION_STANDARDS.md +24 -24
  568. package/docs/E2EE.md +45 -42
  569. package/docs/ERROR_HANDLING.md +29 -105
  570. package/docs/GETTING_STARTED.md +24 -25
  571. package/docs/INTERFACES.md +27 -18
  572. package/docs/PACKAGE_SURFACE.md +23 -21
  573. package/docs/PROTOCOL_POLICY.md +19 -13
  574. package/docs/RECIPES.md +4 -4
  575. package/docs/SECURITY.md +72 -60
  576. package/encoding/README.md +2 -2
  577. package/files/README.md +1 -1
  578. package/groups/README.md +4 -3
  579. package/hooks/README.md +2 -2
  580. package/keys/README.md +15 -14
  581. package/local/store/README.md +82 -67
  582. package/local/store/expo/README.md +17 -12
  583. package/local/store/memory/README.md +4 -3
  584. package/local/store/node/README.md +8 -6
  585. package/local/store/react-native/README.md +14 -12
  586. package/local/store/web/README.md +31 -26
  587. package/local/vault/README.md +4 -4
  588. package/media/README.md +6 -5
  589. package/package.json +1 -1
  590. package/profile/README.md +7 -7
  591. package/remote/README.md +20 -18
  592. package/remote/object-store/README.md +8 -4
  593. package/remote/object-store/convex-r2/README.md +3 -3
  594. package/remote/object-store/s3/README.md +10 -5
  595. package/remote/relay/convex/README.md +5 -5
  596. package/remote/relay/convex/component/README.md +145 -124
  597. package/remote/relay/memory/README.md +6 -5
  598. package/safety/README.md +1 -1
  599. package/sealed-sender/README.md +3 -2
  600. package/types/README.md +1 -1
  601. package/utils/README.md +4 -4
package/ADAPTERS.md CHANGED
@@ -41,7 +41,7 @@ Use:
41
41
  - `InMemorySignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/memory`
42
42
  - or a custom implementation
43
43
 
44
- ### Remote object storage: `SignalProtocolRemoteObjectStore`
44
+ ### Remote object store: `SignalProtocolRemoteObjectStore`
45
45
 
46
46
  Optional encrypted file upload/download support for two-layer attachment encryption.
47
47
 
@@ -54,10 +54,10 @@ Use:
54
54
  - or a custom implementation
55
55
 
56
56
  Both concrete adapters call an authenticated application-backend broker. The
57
- app runtime receives only narrowly scoped, short-lived operations; provider
57
+ app runtime receives only narrowly scoped, short-lived operations. Provider
58
58
  credentials remain on the backend.
59
59
 
60
- Upload requests carry a retry/idempotency `requestId`; the backend returns the
60
+ Upload requests carry a retry/idempotency `requestId`. The backend returns the
61
61
  canonical `objectId` used in encrypted attachment pointers. Provider keys stay
62
62
  private to the backend. The Convex server helper can supply generic validators,
63
63
  R2 calls, expiry parsing, and metadata verification, while app-owned internal
@@ -142,7 +142,7 @@ const bob = await createSignalProtocolClient({
142
142
  - Protect local key material at rest.
143
143
  - Keep contact identity trust decisions stable and explicit.
144
144
  - Persist linked-device identity state atomically enough that startup verification cannot enter a half-linked state.
145
- - Preserve session record semantics; do not treat sessions as opaque blobs without honoring update and archive behavior.
145
+ - Preserve session record semantics. Do not treat sessions as opaque blobs without honoring update and archive behavior.
146
146
 
147
147
  ## Choosing a Shape
148
148
 
package/ARCHITECTURE.md CHANGED
@@ -6,8 +6,9 @@
6
6
  versioned profile based on selected public Signal Protocol specifications. It
7
7
  owns client-side encryption, local protocol state, prekey lifecycle,
8
8
  multi-device session orchestration, group sender keys, sealed sender,
9
- profile/username helpers, and explicit local/remote adapter seams. Public
10
- security guarantees and protocol policy are documented in
9
+ profile/username helpers, and explicit local/remote adapter seams.
10
+
11
+ For public security guarantees and protocol policy, see
11
12
  [Security](./docs/SECURITY.md) and
12
13
  [Protocol Policy](./docs/PROTOCOL_POLICY.md).
13
14
 
@@ -22,9 +23,9 @@ compatibility shim when a boundary is wrong.
22
23
 
23
24
  - Crypto and protocol internals must be auditable from current code, not historical layout names.
24
25
  - Public APIs should be narrow and explicit. Platform and backend adapters live on subpaths.
25
- - Runtime dependencies point inward toward lower protocol layers. Type-only imports are allowed where they describe ports or public contracts.
26
+ - Runtime dependencies point inward toward lower protocol layers. The rule allows type-only imports where they describe ports or public contracts.
26
27
  - Shared protocol strategy, reference-aligned limits, and HKDF info strings belong in `types/protocol-config.ts`, not in the client layer.
27
- - Session record resolution belongs to `internal/session/session-resolver.ts`; SESAME orchestrates it but does not own the shared active/archive helper.
28
+ - Session record resolution belongs to `internal/session/session-resolver.ts`. SESAME orchestrates it but does not own the shared active/archive helper.
28
29
 
29
30
  ## Package Shape
30
31
 
@@ -96,7 +97,7 @@ The executable layer map lives in [layers.ts](./layers.ts).
96
97
  | 5 | Domain/Keys | `keys/` | Key types and generation |
97
98
  | 6 | Domain/Crypto | `internal/crypto/` | Cryptographic primitives and low-level KDF/encryption helpers |
98
99
 
99
- Runtime imports must point inward, toward equal or higher layer numbers. For example, Layer 3 may import Layer 4, 5, or 6; Layer 4 must not import Layer 3.
100
+ Runtime imports must point inward, toward equal or higher layer numbers. For example, Layer 3 may import Layer 4, 5, or 6. Layer 4 must not import Layer 3.
100
101
 
101
102
  Shared non-layer modules:
102
103
 
@@ -159,22 +160,22 @@ await createSignalProtocolClient({
159
160
  ```
160
161
 
161
162
  Strict post-quantum sessions and ML-KEM Braid are the defaults, so application
162
- code should leave `protocol` unset unless the product has made an explicit
163
+ code should leave `protocol` unset unless the product made an explicit
163
164
  compatibility decision. Advanced strategy fields remain available for
164
- diagnostics, telemetry, and algorithm tuning, but compatibility fallback is selected
165
- through `protocol.postQuantum: 'compatible'`, and direct SPQR is selected
166
- through `protocol.braid: 'disabled'`.
165
+ diagnostics, telemetry, and algorithm tuning. To choose compatibility fallback,
166
+ set `protocol.postQuantum: 'compatible'`. To choose direct SPQR, set
167
+ `protocol.braid: 'disabled'`.
167
168
 
168
- Two strategy hooks report protocol events. `onProtocolSelected` fires once per
169
- session establishment, from the handshake. `onBraidProgress` fires on every
170
- braid-mode send and receive, from the SPQR seam that holds the braid state; the
171
- manager carries the strategy into `SessionCipher`, which passes it to `spqrSend`
172
- and `spqrRecv`. Both hooks are guarded, so a consumer that throws cannot break
173
- the protocol path.
169
+ Two strategy hooks report protocol events. The hook `onProtocolSelected` fires
170
+ once per session establishment, from the handshake. The hook `onBraidProgress`
171
+ fires on every braid-mode send and receive, from the SPQR seam that holds the
172
+ braid state. The manager carries the strategy into `SessionCipher`, which passes
173
+ it to `spqrSend` and `spqrRecv`. The SDK guards both hooks, so a consumer that
174
+ throws cannot break the protocol path.
174
175
 
175
176
  ## Session Resolution
176
177
 
177
- Session convergence is a SESAME behavior, but active/archive record manipulation is shared session-domain logic.
178
+ Session convergence is a SESAME behavior, but active/archive record manipulation belongs to shared session-domain logic.
178
179
 
179
180
  - Owner: [internal/session/session-resolver.ts](./internal/session/session-resolver.ts)
180
181
  - Consumed by: [internal/session/cipher.ts](./internal/session/cipher.ts) and [internal/sesame/manager.ts](./internal/sesame/manager.ts)
package/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0
4
+
5
+ - **Breaking: seven error classes and sixteen `EncryptionErrorCode` members are
6
+ removed, because nothing in the library ever threw them.** Each class was
7
+ exported and paired with a type guard, so an application could branch on it —
8
+ but no code path constructed any of them, which made every one of those
9
+ branches dead code that read as handled. Removed, with their `is*` guards:
10
+ `IdentityKeyChangedError`, `SessionConflictError`,
11
+ `RegistrationIdChangedError`, and the four intermediate classes
12
+ `CryptoError`, `SessionError`, `ProtocolError` and `ClientError`. Removed
13
+ codes: `IDENTITY_KEY_CHANGED`, `IDENTITY_KEY_ERROR`, `SESSION_CONFLICT`,
14
+ `REGISTRATION_ID_CHANGED`, `INVALID_REGISTRATION_ID`, `MESSAGE_TOO_OLD`,
15
+ `INVALID_MESSAGE_VERSION`, `RATCHET_ERROR`, `DATABASE_ERROR`,
16
+ `DATABASE_LOCKED`, `KYBER_ERROR`, `KDF_ERROR`, `HMAC_VERIFICATION_FAILED`,
17
+ `SPQR_KEY_ALREADY_USED`, `SPQR_EPOCH_REGRESSION` and `UNKNOWN_ERROR`. The
18
+ enum goes from 49 members to 33.
19
+
20
+ What to use instead: an identity that changed is an identity that is not
21
+ trusted, and the library throws `UntrustedIdentityError` /
22
+ `UNTRUSTED_IDENTITY` for it from five sites on the session and sending
23
+ paths. Code branching on `isIdentityKeyChangedError` or on
24
+ `IDENTITY_KEY_CHANGED` was never reached and should branch on
25
+ `isUntrustedIdentityError` instead. The other removed names have no
26
+ replacement, because there was no event behind them.
27
+
28
+ - **`UntrustedIdentityError` and `isUntrustedIdentityError` are exported from
29
+ the package root.** They were reachable only from
30
+ `@open-e2ee/signal-protocol-sdk/types/errors`, while the error-handling guide
31
+ imported them from the root — so the first thing a reader copied did not
32
+ resolve. `StorageQuotaExceededError` also gains the
33
+ `isStorageQuotaExceededError` guard its five siblings already had.
34
+
35
+ - **Every documented error code is now traceable to a construction site.** A
36
+ check parses the library for the sites that decide whether a class can be
37
+ thrown, and fails the build when an exported error class or a declared code
38
+ survives with none — so the surface cannot drift back. Being named in a
39
+ `switch` counted as use before, which is what hid `IDENTITY_KEY_CHANGED`
40
+ through all nineteen releases that declared it and never threw it.
41
+
3
42
  ## 0.2.3
4
43
 
5
44
  - **`@noble/post-quantum` 0.6.1 → 0.7.0.** Upstream hardening of the
package/COMMERCIAL.md CHANGED
@@ -6,24 +6,24 @@ commercial path; the open-source path is the
6
6
 
7
7
  ## Do you need a commercial license?
8
8
 
9
- You do **not** need one if your application complies with the AGPL — including
9
+ You do **not** need one if your application complies with AGPLv3 — including
10
10
  its network-use provision (section 13): users who interact with your service
11
11
  over a network must be able to obtain the complete corresponding source of your
12
- application under the AGPL.
12
+ application under AGPLv3.
13
13
 
14
14
  You likely **do** need one if any of these describe your product:
15
15
 
16
16
  - Closed-source or proprietary application, mobile or web, that ships or serves
17
17
  this SDK.
18
- - You cannot offer your application's source under AGPL terms — for
18
+ - You cannot offer your application's source under AGPLv3 terms — for
19
19
  contractual, competitive, or policy reasons.
20
20
  - You are embedding the SDK in a product you redistribute to customers who
21
- will not receive AGPL source (OEM).
21
+ will not receive AGPLv3 source (OEM).
22
22
 
23
23
  ## What the commercial license changes
24
24
 
25
25
  - **Grant.** The right to use, modify, and distribute the SDK in a proprietary
26
- product, without the AGPL's source-provision obligations.
26
+ product, without the AGPLv3 source-provision obligations.
27
27
  - **Scope.** Licensed per product, covering `@open-e2ee/signal-protocol-sdk`
28
28
  and its subpath adapters as named in your license record.
29
29
  - **Support.** Any support terms are those stated in your order form; nothing
@@ -51,6 +51,6 @@ Growth and Enterprise start with an email.
51
51
 
52
52
  ## Evaluation
53
53
 
54
- Evaluate under the AGPL first — the full SDK, not a trial build. Nothing about
54
+ Evaluate under AGPLv3 first — the full SDK, not a trial build. Nothing about
55
55
  evaluation, prototyping, or internal proof-of-concept work requires a
56
56
  commercial license before you ship to users.
package/NOTICE CHANGED
@@ -25,5 +25,5 @@ This software is provided as is, without warranty, and is subject to the
25
25
  limitation of liability in the LICENSE file. This notice does not modify the
26
26
  license.
27
27
 
28
- For commercial licensing options that do not require AGPL compliance, contact
28
+ For commercial licensing options that do not require AGPLv3 compliance, contact
29
29
  licensing@open-e2ee.dev.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- <img src="https://raw.githubusercontent.com/open-e2ee/design/v0.2.2/brand/generated/open-e2ee-mark-adaptive.svg" alt="OpenE2EE" width="72" height="72">
1
+ <img src="https://raw.githubusercontent.com/open-e2ee/design/v0.8.0/brand/generated/open-e2ee-mark-adaptive.svg" alt="OpenE2EE" width="72" height="72">
2
2
 
3
3
  # OpenE2EE Signal Protocol SDK
4
4
 
@@ -27,20 +27,20 @@
27
27
  - **Runs where your app runs.** Expo, React Native, modern browsers, and Node from one package.
28
28
  - **Post-quantum by default.** PQXDH and ML-KEM session establishment are on without configuration, and fail closed.
29
29
  - **Real messaging features.** Multi-device, groups, sealed sender, encrypted attachments, safety numbers.
30
- - **Pluggable storage and relay.** Device-local storage is required and yours; the relay is an interface, not a hosted service.
31
- - **AGPL-3.0-or-later, or a commercial license.** Building something closed-source? See [COMMERCIAL](https://github.com/open-e2ee/signal-protocol-js/blob/main/COMMERCIAL.md).
30
+ - **Pluggable storage and relay.** Your application owns the required device-local storage. The relay is an interface, not a hosted service.
31
+ - **AGPLv3, or a commercial license.** Building something closed-source? See [COMMERCIAL](https://github.com/open-e2ee/signal-protocol-js/blob/main/COMMERCIAL.md).
32
32
 
33
- *Not affiliated with Signal Messenger.* This is an independent implementation of the public Signal Protocol specifications — full notice in [NOTICE](https://github.com/open-e2ee/signal-protocol-js/blob/main/NOTICE). It is **not wire-compatible with Signal Messenger or libsignal**: messages, identities, and safety numbers do not interoperate, and every deliberate difference is documented in [DEVIATIONS](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/DEVIATIONS.md).
33
+ *Not affiliated with Signal Messenger.* This package implements the public Signal Protocol specifications independently. [NOTICE](https://github.com/open-e2ee/signal-protocol-js/blob/main/NOTICE) carries the full notice. It is **not wire-compatible with Signal Messenger or libsignal**. Messages, identities, and safety numbers do not interoperate, and [DEVIATIONS](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/DEVIATIONS.md) documents every deliberate difference.
34
34
 
35
- `0.1.x` — public APIs and persisted formats may change before `1.0`.
35
+ Version `0.3.x`. Public APIs and persisted formats may change before `1.0`.
36
36
 
37
37
  ## See it run
38
38
 
39
- [![Linking a second device on the demo page: the scenario runs, then reports what each device can read — the device that was already there holds both messages, and the newly linked device holds only the one sent after it existed.](https://raw.githubusercontent.com/open-e2ee/signal-protocol-js/main/docs/assets/demo/second-device.gif)](https://open-e2ee.dev/demo/#add-a-second-device)
39
+ [![Linking a second device on the demo page. The scenario runs, then reports what each device can read. The device that was already there holds both messages. The newly linked device holds only the message sent after it existed.](https://raw.githubusercontent.com/open-e2ee/signal-protocol-js/main/docs/assets/demo/second-device.gif)](https://open-e2ee.dev/demo/#add-a-second-device)
40
40
 
41
- A second device is linked to an account over the real QR handshake. The message sent before that device existed is not on it — not withheld by a policy, but unreadable because the device's keys did not exist when that message was encrypted.
41
+ The demo links a second device to an account over the real QR handshake. That device does not hold the message sent before it existed. No policy withholds the message. The device cannot read it, because the device's keys did not exist when the sender encrypted it.
42
42
 
43
- Recorded from [open-e2ee.dev/demo](https://open-e2ee.dev/demo), which runs this package in the browser against the in-memory store and the in-memory relay: real protocol and cryptography, simulated in-memory infrastructure. Every scenario there prints the receiving device's own log, unedited.
43
+ The recording comes from [open-e2ee.dev/demo](https://open-e2ee.dev/demo). That page runs this package in the browser against the in-memory store and the in-memory relay. The protocol and the cryptography are real, and the adapters simulate the infrastructure in memory. Every scenario there prints the receiving device's own log, unedited.
44
44
 
45
45
  ## Install
46
46
 
@@ -48,7 +48,7 @@ Recorded from [open-e2ee.dev/demo](https://open-e2ee.dev/demo), which runs this
48
48
  npm install @open-e2ee/signal-protocol-sdk
49
49
  ```
50
50
 
51
- Installing straight from the repository also works — the package compiles itself during install, so TypeScript is the only build requirement:
51
+ Installing straight from the repository also works. The package compiles itself during install, so TypeScript is the only build requirement:
52
52
 
53
53
  ```bash
54
54
  npm install github:open-e2ee/signal-protocol-js
@@ -58,7 +58,7 @@ Adapters declare their runtime requirements as optional peer dependencies, so in
58
58
 
59
59
  ## Quick Start
60
60
 
61
- Two clients, one process, no account and no server. The relay holds the envelope; only Bob's device turns it back into text.
61
+ Two clients, one process, no account and no server. The relay holds the envelope. Only Bob's device turns it back into text.
62
62
 
63
63
  <!-- doc-snippet:run readme-quick-start expect="alice: hello" -->
64
64
  ```ts
@@ -92,23 +92,25 @@ await alice.send("bob", "hello"); // the relay now holds ciphertext and metada
92
92
  bob.startRelaySubscription(); // delivery and local decryption start here
93
93
  ```
94
94
 
95
- Every identifier above is a real export. This exact block is extracted from this README and executed against the packed package by [this repository's CI](https://github.com/open-e2ee/signal-protocol-js/actions/workflows/ci.yml) on every change, and the same sequence runs in the engineering repository's automated checks.
95
+ Every identifier above is a real export. [This repository's CI](https://github.com/open-e2ee/signal-protocol-js/actions/workflows/ci.yml) extracts this exact block from this README and runs it against the packed package on every change. The same sequence runs in the engineering repository's automated checks.
96
96
 
97
97
  Next: [inspect what the relay actually stored](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/GETTING_STARTED.md), then compose the [Expo + Convex production client](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/CLIENT_COMPOSITION.md).
98
98
 
99
99
  ## How it compares
100
100
 
101
- Measured from the GitHub API, the npm registry API, and the published package tarballs on 2026-08-03. Every alternative is a real project doing a real job; the axes below are the ones this SDK was built to change, not a general quality ranking.
101
+ Measured on 2026-08-03, these figures come from the GitHub API, the npm registry API, and the published package tarballs. Every alternative is a real project that does a real job. The axes below are the ones this SDK sets out to change, not a general quality ranking.
102
102
 
103
103
  | | Expo / React Native | Browser | Maintained | Post-quantum | TypeScript-native | Commercial license |
104
104
  |---|---|---|---|---|---|---|
105
- | **`@open-e2ee/signal-protocol-sdk`** | Yes | Yes | Yes — `0.1.x`, active | Key agreement yes — PQXDH + ML-KEM, default and fails closed. Signatures no — identities are classical Ed25519 | Yes | Yes |
105
+ | **`@open-e2ee/signal-protocol-sdk`** | Yes | Yes | Yes — `0.3.x`, active | Key agreement yes — PQXDH + ML-KEM, default and fails closed. Signatures no — identities are classical Ed25519 | Yes | Yes |
106
106
  | [`@signalapp/libsignal-client`](https://github.com/signalapp/libsignal) | No — Node native addon; the 0.99.3 tarball ships binaries for macOS, Linux, and Windows only | No | Yes — very active; repo push 2026-07-31 | Key agreement yes | No — Rust core with TypeScript bindings | No (AGPL-3.0 only) |
107
107
  | [`libsignal-protocol-javascript`](https://github.com/signalapp/libsignal-protocol-javascript) | No | Yes | No — archived, last push 2021-08-04 | No | No — JavaScript | No (GPL-3.0) |
108
108
  | [`@privacyresearch/libsignal-protocol-typescript`](https://github.com/privacyresearchgroup/libsignal-protocol-typescript) | No documented React Native path | Yes | No — last npm publish 2023-05-06, last repo push 2023-07-18 | No | Yes | No (GPL-3.0) |
109
109
  | [`ts-mls`](https://github.com/LukaJCB/ts-mls) | Not stated — browsers, Node, and serverless are the documented targets | Yes | Yes — very active; repo push 2026-08-03 | Key agreement and signatures — ML-KEM and ML-DSA-87 ciphersuites | Yes | Not needed (MIT) |
110
110
 
111
- `ts-mls` implements [MLS (RFC 9420)](https://www.rfc-editor.org/rfc/rfc9420.html), a different protocol with different properties — if MLS suits your product, it is a good library and this table is not an argument against it, and its post-quantum coverage reaches further than this SDK's. `@signalapp/libsignal-client` is the implementation Signal Messenger itself uses; its README states that use outside Signal Messenger is unsupported. If you are shipping a desktop or server application on Node, reach for it first.
111
+ `ts-mls` implements [MLS (RFC 9420)](https://www.rfc-editor.org/rfc/rfc9420.html). That is a different protocol with different properties. If MLS suits your product, `ts-mls` is a good library, and this table is not an argument against it. Its post-quantum coverage also reaches further than this SDK's.
112
+
113
+ `@signalapp/libsignal-client` is the implementation Signal Messenger itself uses. Its README states that it does not support use outside Signal Messenger. Reach for it first when you ship a desktop or server application on Node.
112
114
 
113
115
  The longer version of this table, with a paragraph on each project, is at [open-e2ee.dev/compare](https://open-e2ee.dev/compare).
114
116
 
@@ -116,9 +118,9 @@ The longer version of this table, with a paragraph on each project, is at [open-
116
118
 
117
119
  Cryptography deserves evidence rather than adjectives, so here is what there is and what there is not.
118
120
 
119
- **Audit status.** Reviewed continuously by adversarial AI agents; not audited by any independent firm. Every change passes an adversarial AI review before it merges, and recurring whole-codebase AI audit passes run against the engineering repository. What that covers — and what it does not — is stated in the [assurance summary](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/ASSURANCE.md). No independent firm has audited the SDK, and none is engaged. Nothing here should be read as a third-party assurance claim.
121
+ **Audit status.** Adversarial AI agents review this SDK continuously. No independent firm audits it. Every change passes an adversarial AI review before it merges, and recurring whole-codebase AI audit passes run against the engineering repository. The [assurance summary](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/ASSURANCE.md) states what that covers and what it does not. The SDK has no independent audit and no audit engagement. Read nothing here as a third-party assurance claim.
120
122
 
121
- **Security model and protocol policy.** The [security model](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/SECURITY.md) states the threat model, what is in and out of scope, the storage boundary, and the resource limits. The [protocol policy](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/PROTOCOL_POLICY.md) states which protocol modes are supported and which fail closed.
123
+ **Security model and protocol policy.** The [security model](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/SECURITY.md) states the threat model and the scope boundary. It also states the storage boundary and the resource limits. The [protocol policy](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/PROTOCOL_POLICY.md) states which protocol modes the SDK supports and which fail closed.
122
124
 
123
125
  **Specifications, pinned by revision.** The implementation follows its own versioned profile based on these published specifications:
124
126
 
@@ -132,35 +134,43 @@ Cryptography deserves evidence rather than adjectives, so here is what there is
132
134
  | [FIPS 203 (ML-KEM)](https://csrc.nist.gov/pubs/fips/203/final) | Final, 2024-08-13 |
133
135
  | [RFC 8032 (Ed25519)](https://www.rfc-editor.org/rfc/rfc8032.html) | — |
134
136
 
135
- **Not wire-compatible, and specific about why.** This SDK cannot exchange messages with Signal Messenger or `libsignal`, cannot exchange identities with them, and its safety numbers will never match the ones a Signal Messenger client displays for the same two users. The cryptographic core is the same; the wire profile is deliberately its own. Identities are a versioned composite of separate X25519 and Ed25519 keys rather than one Curve25519 key, so signatures are ordinary RFC 8032 Ed25519 rather than XEdDSA; ML-KEM-1024 keys and ciphertexts are tagged `0x0A`, distinct from the round-3 Kyber1024 `0x08` tag. [DEVIATIONS](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/DEVIATIONS.md) is the complete account — every difference from the specifications and from `libsignal`, with the reason, the cost, and the file that implements it. The threat model boundary is in the [security model](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/SECURITY.md).
137
+ **Not wire-compatible, and specific about why.** This SDK cannot exchange messages or identities with Signal Messenger or `libsignal`. Its safety numbers will never match the ones a Signal Messenger client displays for the same two users. The cryptographic core is the same. The wire profile is deliberately its own.
138
+
139
+ Identities are a versioned composite of separate X25519 and Ed25519 keys rather than one Curve25519 key. Signatures are therefore ordinary RFC 8032 Ed25519 rather than XEdDSA. ML-KEM-1024 keys and ciphertexts carry the tag `0x0A`, which differs from the round-3 Kyber1024 tag `0x08`. [DEVIATIONS](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/DEVIATIONS.md) is the complete account. It names every difference from the specifications and from `libsignal`, with the reason, the cost, and the file that implements it. The [security model](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/SECURITY.md) holds the threat model boundary.
140
+
141
+ **Dependencies: 6.** The package has six direct production dependencies: `@noble/ciphers`, `@noble/curves`, `@noble/hashes`, `@noble/post-quantum`, `async-lock`, and `unique-names-generator`. They resolve to 6 packages in total. The only transitive edges run between the `@noble` packages, so the resolved tree adds nothing the list above does not already name. Everything else in the tree is a development or optional peer dependency.
142
+
143
+ **Automated checks.** The published repository is a mechanized export of a private engineering repository, through an allowlist. The automated checks live in that engineering repository, and they must pass before the export runs. The [assurance summary](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/ASSURANCE.md) carries the current run figures and explains what the checks cover, what stays unpublished, and why. Every release regenerates those figures from a real run, and no one hand-edits them. The published repository runs its own build, typecheck, and production dependency audit in [CI](https://github.com/open-e2ee/signal-protocol-js/actions/workflows/ci.yml) on every change.
136
144
 
137
- **Dependencies: 6.** Six direct production dependencies — `@noble/ciphers`, `@noble/curves`, `@noble/hashes`, `@noble/post-quantum`, `async-lock`, `unique-names-generator` — resolving to 6 packages in total: the only transitive edges are the `@noble` packages depending on one another, so the resolved tree adds nothing the list above does not already name. Everything else in the tree is a development or optional peer dependency.
145
+ **Constant-time posture, honestly.** JavaScript engines offer no machine-level constant-time contract, and this SDK cannot invent one. Selected paths carry best-effort source-level work:
138
146
 
139
- **Automated checks.** The published repository is a mechanized export of a private engineering repository, filtered by an allowlist; the automated checks live there and have to pass before an export is cut. The [assurance summary](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/ASSURANCE.md) carries the current run figures — regenerated from a real run as part of every release, never hand-edited — and explains what the checks cover, what is not published, and why. The published repository runs its own build, typecheck, and production dependency audit in [CI](https://github.com/open-e2ee/signal-protocol-js/actions/workflows/ci.yml) on every change.
147
+ - a full scan when it compares equal-length MACs and identity bytes
148
+ - fixed work on both decapsulation candidates, then a masked choice between them
149
+ - equal-work rejection padding on selected replay and authentication paths
140
150
 
141
- **Constant-time posture, honestly.** JavaScript engines offer no machine-level constant-time contract, and this SDK cannot invent one. What exists is best-effort source-level work on selected paths: full-scan comparison for equal-length MACs and identity bytes, fixed-work derivation of both decapsulation candidates before masked selection, and equal-work rejection padding on selected replay and authentication paths. These are not timing-equivalence proofs. Secret-influenced remainder and compression arithmetic remains, and JIT compilation, allocation, garbage collection, and cache effects stay observable. `secureZeroBytes()` overwrites the exact typed array it is handed and nothing more — not copies, not strings, not engine temporaries. The threat model does not cover hostile same-process code or a high-assurance co-resident timing adversary, and it says so.
151
+ These are not timing-equivalence proofs. Secret-influenced remainder and compression arithmetic remains. JIT compilation, allocation, garbage collection, and cache effects stay observable. `secureZeroBytes()` overwrites the exact typed array the caller hands it and nothing more. It does not touch copies, strings, or engine temporaries. The threat model does not cover hostile same-process code or a high-assurance co-resident timing adversary, and it says so.
142
152
 
143
- **Reporting a vulnerability.** Email security@open-e2ee.dev rather than opening an issue. Acknowledgment within 72 hours, initial assessment within 7 days; the full policy is in [SECURITY.md](https://github.com/open-e2ee/signal-protocol-js/blob/main/SECURITY.md).
153
+ **Reporting a vulnerability.** Email security@open-e2ee.dev rather than opening an issue. Acknowledgment within 72 hours, initial assessment within 7 days. [SECURITY.md](https://github.com/open-e2ee/signal-protocol-js/blob/main/SECURITY.md) carries the full policy.
144
154
 
145
155
  ## Documentation
146
156
 
147
157
  Hosted guides, quickstarts per runtime, and concept docs live at
148
158
  [docs.open-e2ee.dev](https://docs.open-e2ee.dev). The in-repo references below
149
- are versioned with the code:
150
-
151
- - [Getting Started](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/GETTING_STARTED.md) — installation, mental model, first working client.
152
- - [Package Surface](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/PACKAGE_SURFACE.md) — root exports, every subpath, adapter implementations, core concepts.
153
- - [Recipes](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/RECIPES.md) — message flow, protocol policy, multi-device, attachments, usernames.
154
- - [Client Composition](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/CLIENT_COMPOSITION.md) — production composition with Expo and Convex.
155
- - [Architecture](https://github.com/open-e2ee/signal-protocol-js/blob/main/ARCHITECTURE.md) and [Adapters](https://github.com/open-e2ee/signal-protocol-js/blob/main/ADAPTERS.md) — layer model and composition boundaries.
156
- - [Integration Interfaces](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/INTERFACES.md) — the interfaces to implement for custom storage, vaults, relays, and object stores.
159
+ carry the same version as the code:
160
+
161
+ - [Getting Started](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/GETTING_STARTED.md): installation, mental model, first working client.
162
+ - [Package Surface](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/PACKAGE_SURFACE.md): root exports, every subpath, adapter implementations, core concepts.
163
+ - [Recipes](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/RECIPES.md): message flow, protocol policy, multi-device, attachments, usernames.
164
+ - [Client Composition](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/CLIENT_COMPOSITION.md): production composition with Expo and Convex.
165
+ - [Architecture](https://github.com/open-e2ee/signal-protocol-js/blob/main/ARCHITECTURE.md) and [Adapters](https://github.com/open-e2ee/signal-protocol-js/blob/main/ADAPTERS.md): layer model and composition boundaries.
166
+ - [Integration Interfaces](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/INTERFACES.md): the interfaces to implement for custom storage, vaults, relays, and object stores.
157
167
  - [Error Handling](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/ERROR_HANDLING.md) and [Troubleshooting](https://github.com/open-e2ee/signal-protocol-js/blob/main/TROUBLESHOOTING.md).
158
- - [E2EE concepts](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/E2EE.md) — what changes about your architecture when the relay cannot read.
159
- - [Deviations](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/DEVIATIONS.md) — every difference from the Signal Protocol specifications and from `libsignal`, with reasons and costs.
160
- - [API Reference](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/api/README.md) — generated from the exported declarations.
168
+ - [E2EE concepts](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/E2EE.md): what changes about your architecture when the relay cannot read.
169
+ - [Deviations](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/DEVIATIONS.md): every difference from the Signal Protocol specifications and from `libsignal`, with reasons and costs.
170
+ - [API Reference](https://github.com/open-e2ee/signal-protocol-js/blob/main/docs/api/README.md): generated from the exported declarations.
161
171
 
162
172
  ## License and warranty
163
173
 
164
- Licensed under `AGPL-3.0-or-later`; see [LICENSE](https://github.com/open-e2ee/signal-protocol-js/blob/main/LICENSE). For proprietary products that cannot meet AGPL obligations, a commercial license is available — see [COMMERCIAL](https://github.com/open-e2ee/signal-protocol-js/blob/main/COMMERCIAL.md) or email licensing@open-e2ee.dev.
174
+ Licensed under `AGPL-3.0-or-later`. See [LICENSE](https://github.com/open-e2ee/signal-protocol-js/blob/main/LICENSE). A commercial license covers proprietary products that cannot meet AGPLv3 obligations. See [COMMERCIAL](https://github.com/open-e2ee/signal-protocol-js/blob/main/COMMERCIAL.md) or email licensing@open-e2ee.dev.
165
175
 
166
- The software is provided **as is**, without warranties or conditions of any kind. To the extent permitted by applicable law, copyright holders and contributors are not liable for damages arising from its use. Applications remain responsible for evaluating this SDK against their own requirements and for securing their deployment, storage, authentication, authorization, and operations. This summary does not modify the license; the complete warranty disclaimer and limitation of liability are in sections 15 and 16 of the GNU Affero General Public License.
176
+ The license provides the software **as is**, without warranties or conditions of any kind. To the extent that applicable law permits, copyright holders and contributors are not liable for damages that arise from its use. Your application must evaluate this SDK against its own requirements. It must also secure its own deployment, storage, authentication, authorization, and operations. This summary does not modify the license. Sections 15 and 16 of the GNU Affero General Public License carry the complete "Disclaimer of Warranty" and "Limitation of Liability" text.
package/SECURITY.md CHANGED
@@ -7,8 +7,8 @@ backports.
7
7
 
8
8
  | Version | Supported |
9
9
  | ------- | ------------------ |
10
- | 0.2.x | :white_check_mark: |
11
- | < 0.2.0 | :x: |
10
+ | 0.3.x | :white_check_mark: |
11
+ | < 0.3.0 | :x: |
12
12
 
13
13
  ## Reporting a Vulnerability
14
14
 
@@ -22,7 +22,7 @@ We take security vulnerabilities seriously. If you discover a security issue, pl
22
22
  the repository's [Security tab](https://github.com/open-e2ee/signal-protocol-js/security)
23
23
  - Email: security@open-e2ee.dev
24
24
  3. Include the following information:
25
- - Description of the vulnerability
25
+ - What the vulnerability is
26
26
  - Steps to reproduce
27
27
  - Potential impact
28
28
  - Suggested fix (if any)
@@ -30,13 +30,16 @@ We take security vulnerabilities seriously. If you discover a security issue, pl
30
30
  ### Safe Harbor
31
31
 
32
32
  We will not pursue legal action or law-enforcement referral against
33
- good-faith security research on this codebase. Good faith means: make every
34
- effort to avoid privacy violations and data destruction, use your own accounts
35
- and devices for testing, do not exploit a finding beyond what is needed to
36
- demonstrate it, and give us a reasonable window to remediate before public
37
- disclosure. This applies to research on the SDK itself; testing deployed
38
- third-party applications that use the SDK is governed by those applications'
39
- own policies.
33
+ good-faith security research on this codebase. Good faith means all of the
34
+ following:
35
+
36
+ - Make every effort to avoid privacy violations and data destruction.
37
+ - Use your own accounts and devices for testing.
38
+ - Do not exploit a finding beyond what you need to show it.
39
+ - Give us a reasonable window to remediate before public disclosure.
40
+
41
+ This applies to research on the SDK itself. Those applications' own policies
42
+ govern testing of deployed third-party applications that use the SDK.
40
43
 
41
44
  ### What to Expect
42
45
 
@@ -51,7 +54,7 @@ own policies.
51
54
  ### Disclosure Policy
52
55
 
53
56
  - We follow responsible disclosure practices
54
- - We will credit reporters (unless anonymity is requested)
57
+ - We will credit reporters, unless a reporter requests anonymity
55
58
  - We aim to release patches before public disclosure
56
59
  - Public disclosure occurs after patch is available
57
60
 
@@ -112,7 +115,7 @@ write or that no copies exist.
112
115
  However, JIT compilers may:
113
116
 
114
117
  - Optimize away the zeroing before our check runs
115
- - Copy values to CPU registers that aren't zeroed
118
+ - Copy values to CPU registers that are not zeroed
116
119
  - Leave copies in garbage-collected heap memory
117
120
 
118
121
  **Garbage Collection**: Sensitive data in JavaScript objects may persist in heap memory until GC runs. We cannot force immediate collection or guarantee cleanup timing.
@@ -131,7 +134,7 @@ However, JIT compilers may:
131
134
  Browser/runtime timing attacks are possible. Current source-level mitigations include:
132
135
 
133
136
  - Full-scan equal-length comparison helpers on selected MAC/ciphertext paths
134
- - Fixed-work derivation of both decapsulation candidates before masked selection
137
+ - Fixed work on both decapsulation candidates, then a masked choice between them
135
138
  - Fixed-work rejection handling on selected authentication paths
136
139
 
137
140
  These are not hard constant-time guarantees. Ed25519 signature verification
@@ -98,12 +98,12 @@ await signal.encryptMessage('bob:2', 'Hello'); // Secondary device
98
98
 
99
99
  ### Out-of-Order Messages
100
100
 
101
- The protocol handles out-of-order messages automatically via MKSKIPPED. If you're seeing failures:
101
+ The protocol handles out-of-order messages automatically via MKSKIPPED. For failures:
102
102
 
103
- 1. Check that both parties have established sessions
104
- 2. Verify message counters aren't too far apart (maxSkip limit: 1000)
105
- 3. Ensure messages aren't being duplicated
106
- 4. Check that skipped keys haven't expired (7-day default)
103
+ 1. Check that both parties established sessions
104
+ 2. Verify message counters are not too far apart (maxSkip limit: 1000)
105
+ 3. Check that no sender or transport duplicates messages
106
+ 4. Check that skipped keys did not expire (7-day default)
107
107
 
108
108
  ### Decryption Failures
109
109
 
@@ -5,9 +5,9 @@ and optionally projects a snapshot to an application-owned mirror.
5
5
 
6
6
  ## Why it exists
7
7
 
8
- Blocking is a product decision with protocol consequences: blocked recipients
9
- must be rejected consistently without making a remote mirror a second,
10
- conflicting source of truth. `SignalProtocolBlockingManager` centralizes that ordering.
8
+ Blocking is a product decision with protocol consequences. The client must
9
+ reject blocked recipients consistently, and a remote mirror must not become a
10
+ second, conflicting source of truth. `SignalProtocolBlockingManager` centralizes that ordering.
11
11
 
12
12
  ## Usage
13
13
 
@@ -34,8 +34,9 @@ if (await blocking.isBlocked("bob")) {
34
34
  }
35
35
  ```
36
36
 
37
- The local store is authoritative. Mirror failures are logged after the local
38
- mutation succeeds; they do not roll back the local decision. Applications
37
+ The local store is authoritative. The blocking manager logs mirror failures
38
+ after the local mutation succeeds. A mirror failure does not roll back the local
39
+ decision. Applications
39
40
  should provide their own retry or reconciliation policy for the mirror.
40
41
 
41
42
  See the [API reference](../docs/api/namespaces/blocking/README.md) and
package/client/README.md CHANGED
@@ -11,8 +11,8 @@ boundaries explicitly through `createSignalProtocolClient()`.
11
11
 
12
12
  ## Creation
13
13
 
14
- `storage` is required. `relay` is optional for local use and expected for real
15
- messaging. `protocol.postQuantum` and `protocol.braid` both default to
14
+ Every client needs `storage`. Local use can omit `relay`, and real messaging
15
+ needs it. `protocol.postQuantum` and `protocol.braid` both default to
16
16
  `'required'`.
17
17
 
18
18
  ```ts
@@ -157,8 +157,8 @@ const result = await rotateKeysHeadless(relay, userId, deviceId, { storage });
157
157
  ## Linked Devices
158
158
 
159
159
  - device `1` is the primary device
160
- - devices `2-5` are linked devices
161
- - linked devices must already have provisioned identity material in the provided storage before `SignalProtocolClient.create(..., { deviceId: 2 })`
160
+ - linked devices use device IDs `2-5`
161
+ - provision linked-device identity material into the provided storage before `SignalProtocolClient.create(..., { deviceId: 2 })`
162
162
 
163
163
  ## Notes
164
164
 
@@ -166,4 +166,4 @@ const result = await rotateKeysHeadless(relay, userId, deviceId, { storage });
166
166
  - `createSignalProtocolClient()` is the preferred generic composition helper for app
167
167
  setup code.
168
168
  - App-specific React hooks and DB-backed view-state helpers should stay outside this module.
169
- - Use the root package or explicit subpaths for utilities; do not import from `internal/*`.
169
+ - Use the root package or explicit subpaths for utilities. Do not import from `internal/*`.
package/device/README.md CHANGED
@@ -17,8 +17,8 @@ The two onboarding operations are deliberately separate:
17
17
  - **Transfer** migrates local cryptographic state to replacement hardware. It
18
18
  can include identity keys, prekeys, and sessions in an encrypted backup.
19
19
 
20
- The primary device uses ID `1`. Linked device IDs are allocated by the backend
21
- from `2` through `5`; a client must not choose its own linked-device ID.
20
+ The primary device uses ID `1`. The backend allocates linked device IDs from
21
+ `2` through `5`. A client must not choose its own linked-device ID.
22
22
 
23
23
  ## Platform requirements
24
24
 
@@ -127,8 +127,8 @@ const provisioning = await receiveProvisioningMessage(
127
127
  console.log(provisioning.deviceId);
128
128
  ```
129
129
 
130
- Provisioning requires an ACI identity. PNI identity and group/username state
131
- are included only when the host application enables and supplies them.
130
+ Provisioning requires an ACI identity. It includes PNI identity and
131
+ group/username state only when the host application enables and supplies them.
132
132
 
133
133
  ## Transfer cryptographic state
134
134
 
@@ -147,18 +147,18 @@ const backup = await sending.getBackup(sessionIds);
147
147
 
148
148
  The application owns transport selection, peer confirmation, progress UI,
149
149
  interruption recovery, and wiping old-device state after a successful
150
- replacement. Do not erase the old device before the new device has validated
151
- and durably restored the backup.
150
+ replacement. Do not erase the old device before the new device validates and
151
+ durably restores the backup.
152
152
 
153
153
  ## Security boundaries
154
154
 
155
155
  - Provisioning sessions expire after five minutes.
156
156
  - Ephemeral ECDH keys derive the provisioning/transfer encryption keys.
157
- - Identity and backup material is encrypted before it reaches a relay or
157
+ - The SDK encrypts identity and backup material before it reaches a relay or
158
158
  transport.
159
159
  - The QR channel authenticates the session only to the extent that the
160
160
  application protects what the user scans or shares.
161
- - Device names are encrypted for backend storage.
161
+ - The SDK encrypts device names for backend storage.
162
162
  - Backend authentication must bind registration, provisioning, unlink, and
163
163
  removal to the owning account.
164
164
  - Account reset must clear the device-ID cache, platform secret storage, and
@@ -2,8 +2,8 @@
2
2
  * Signal Protocol blocking contracts.
3
3
  *
4
4
  * Blocking is account/contact state, not message content. The core package owns
5
- * the local blocking workflow and lets each app choose whether blocked state is
6
- * purely local, linked-device synced, mirrored to a backend, or all three.
5
+ * the local blocking workflow. Each app chooses whether blocked state is purely
6
+ * local, linked-device synced, mirrored to a backend, or all three.
7
7
  */
8
8
  export interface BlockedRecipientEntry {
9
9
  recipientId: string;
@@ -2,8 +2,8 @@
2
2
  * Signal Protocol blocking contracts.
3
3
  *
4
4
  * Blocking is account/contact state, not message content. The core package owns
5
- * the local blocking workflow and lets each app choose whether blocked state is
6
- * purely local, linked-device synced, mirrored to a backend, or all three.
5
+ * the local blocking workflow. Each app chooses whether blocked state is purely
6
+ * local, linked-device synced, mirrored to a backend, or all three.
7
7
  */
8
8
  export {};
9
9
  //# sourceMappingURL=types.js.map