@open-e2ee/signal-protocol-sdk 0.1.0-alpha.4 → 0.1.0-alpha.6

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 (497) hide show
  1. package/ADAPTERS.md +15 -15
  2. package/CHANGELOG.md +109 -0
  3. package/README.md +4 -2
  4. package/blocking/README.md +5 -5
  5. package/client/README.md +2 -2
  6. package/dist/blocking/index.d.ts +2 -2
  7. package/dist/blocking/index.d.ts.map +1 -1
  8. package/dist/blocking/index.js +1 -1
  9. package/dist/blocking/index.js.map +1 -1
  10. package/dist/blocking/manager.d.ts +7 -7
  11. package/dist/blocking/manager.d.ts.map +1 -1
  12. package/dist/blocking/manager.js +3 -3
  13. package/dist/blocking/manager.js.map +1 -1
  14. package/dist/blocking/types.d.ts +4 -4
  15. package/dist/blocking/types.d.ts.map +1 -1
  16. package/dist/blocking/types.js +1 -1
  17. package/dist/client/client.d.ts +3 -3
  18. package/dist/client/client.d.ts.map +1 -1
  19. package/dist/client/client.js +11 -11
  20. package/dist/client/client.js.map +1 -1
  21. package/dist/client/compose.d.ts +7 -7
  22. package/dist/client/compose.d.ts.map +1 -1
  23. package/dist/client/config.d.ts +15 -15
  24. package/dist/client/config.d.ts.map +1 -1
  25. package/dist/client/content-adapter.d.ts +4 -4
  26. package/dist/client/content-adapter.d.ts.map +1 -1
  27. package/dist/client/content-adapter.js +1 -1
  28. package/dist/client/content-adapter.js.map +1 -1
  29. package/dist/client/dual-store.d.ts +5 -5
  30. package/dist/client/dual-store.d.ts.map +1 -1
  31. package/dist/client/dual-store.js.map +1 -1
  32. package/dist/client/endorsement-manager.d.ts.map +1 -1
  33. package/dist/client/endorsement-manager.js +2 -2
  34. package/dist/client/endorsement-manager.js.map +1 -1
  35. package/dist/client/event-hooks.d.ts +1 -1
  36. package/dist/client/headless.d.ts +11 -11
  37. package/dist/client/headless.d.ts.map +1 -1
  38. package/dist/client/headless.js +8 -8
  39. package/dist/client/headless.js.map +1 -1
  40. package/dist/client/index.d.ts +2 -2
  41. package/dist/client/index.d.ts.map +1 -1
  42. package/dist/client/index.js +1 -1
  43. package/dist/client/index.js.map +1 -1
  44. package/dist/client/key-rotation-core.d.ts +11 -11
  45. package/dist/client/key-rotation-core.d.ts.map +1 -1
  46. package/dist/client/key-rotation-core.js +22 -22
  47. package/dist/client/key-rotation-core.js.map +1 -1
  48. package/dist/client/media.d.ts +2 -2
  49. package/dist/client/media.js +5 -5
  50. package/dist/client/media.js.map +1 -1
  51. package/dist/client/messages.js +2 -2
  52. package/dist/client/messages.js.map +1 -1
  53. package/dist/client/relay-subscription.d.ts +2 -2
  54. package/dist/client/relay-subscription.d.ts.map +1 -1
  55. package/dist/client/relay-subscription.js +18 -1
  56. package/dist/client/relay-subscription.js.map +1 -1
  57. package/dist/client/retry.js +1 -1
  58. package/dist/client/retry.js.map +1 -1
  59. package/dist/client/sealed-sender-ops.d.ts +1 -1
  60. package/dist/client/sealed-sender-ops.d.ts.map +1 -1
  61. package/dist/client/sealed-sender-ops.js +4 -4
  62. package/dist/client/sealed-sender-ops.js.map +1 -1
  63. package/dist/client/sessions.d.ts.map +1 -1
  64. package/dist/client/sessions.js +3 -0
  65. package/dist/client/sessions.js.map +1 -1
  66. package/dist/client/signal-service-cipher.d.ts +14 -10
  67. package/dist/client/signal-service-cipher.d.ts.map +1 -1
  68. package/dist/client/signal-service-cipher.js +31 -23
  69. package/dist/client/signal-service-cipher.js.map +1 -1
  70. package/dist/client/types.d.ts +8 -8
  71. package/dist/client/types.d.ts.map +1 -1
  72. package/dist/device/connection.js +2 -2
  73. package/dist/device/connection.js.map +1 -1
  74. package/dist/device/device-id.d.ts.map +1 -1
  75. package/dist/device/device-id.js +4 -4
  76. package/dist/device/device-id.js.map +1 -1
  77. package/dist/device/provisioning.d.ts +5 -5
  78. package/dist/device/provisioning.d.ts.map +1 -1
  79. package/dist/device/provisioning.js +9 -9
  80. package/dist/device/provisioning.js.map +1 -1
  81. package/dist/device/transfer.d.ts.map +1 -1
  82. package/dist/device/transfer.js +14 -14
  83. package/dist/device/transfer.js.map +1 -1
  84. package/dist/files/index.d.ts +1 -1
  85. package/dist/files/index.js +1 -1
  86. package/dist/hooks/use-connection-presence.d.ts +5 -5
  87. package/dist/hooks/use-connection-presence.d.ts.map +1 -1
  88. package/dist/hooks/use-connection-presence.js +5 -5
  89. package/dist/hooks/use-connection-presence.js.map +1 -1
  90. package/dist/hooks/use-group-membership.d.ts +2 -2
  91. package/dist/hooks/use-key-rotation.js +2 -2
  92. package/dist/hooks/use-key-rotation.js.map +1 -1
  93. package/dist/index.d.ts +13 -13
  94. package/dist/index.d.ts.map +1 -1
  95. package/dist/index.js +6 -6
  96. package/dist/index.js.map +1 -1
  97. package/dist/internal/crypto/ec/x25519-validation.d.ts.map +1 -1
  98. package/dist/internal/crypto/ec/x25519-validation.js +4 -4
  99. package/dist/internal/crypto/ec/x25519-validation.js.map +1 -1
  100. package/dist/internal/crypto/index.js +1 -1
  101. package/dist/internal/crypto/index.js.map +1 -1
  102. package/dist/internal/crypto/kdf/hkdf.d.ts +1 -1
  103. package/dist/internal/crypto/kdf/hkdf.d.ts.map +1 -1
  104. package/dist/internal/crypto/kdf/hkdf.js +2 -2
  105. package/dist/internal/crypto/kdf/hkdf.js.map +1 -1
  106. package/dist/internal/crypto/key-prefix.d.ts +1 -1
  107. package/dist/internal/crypto/key-prefix.js +1 -1
  108. package/dist/internal/crypto/pq/kyber.d.ts +1 -1
  109. package/dist/internal/crypto/pq/kyber.js +1 -1
  110. package/dist/internal/crypto/symmetric/aes-gcm-siv.d.ts +1 -1
  111. package/dist/internal/crypto/symmetric/aes-gcm-siv.js +1 -1
  112. package/dist/internal/crypto/symmetric/mac.d.ts +3 -3
  113. package/dist/internal/crypto/symmetric/mac.js +3 -3
  114. package/dist/internal/crypto/utils.d.ts +2 -2
  115. package/dist/internal/crypto/utils.js +2 -2
  116. package/dist/internal/encoding/proto/envelope.d.ts +21 -21
  117. package/dist/internal/encoding/proto/envelope.d.ts.map +1 -1
  118. package/dist/internal/encoding/proto/envelope.js +25 -25
  119. package/dist/internal/encoding/proto/envelope.js.map +1 -1
  120. package/dist/internal/encoding/proto/index.d.ts +2 -2
  121. package/dist/internal/encoding/proto/index.d.ts.map +1 -1
  122. package/dist/internal/encoding/proto/index.js +3 -3
  123. package/dist/internal/encoding/proto/index.js.map +1 -1
  124. package/dist/internal/encoding/proto/pq-ratchet-serialize.d.ts +5 -5
  125. package/dist/internal/encoding/proto/pq-ratchet-serialize.d.ts.map +1 -1
  126. package/dist/internal/encoding/proto/pq-ratchet-serialize.js +4 -4
  127. package/dist/internal/encoding/proto/pq-ratchet-serialize.js.map +1 -1
  128. package/dist/internal/encoding/proto/signal-message.d.ts +33 -33
  129. package/dist/internal/encoding/proto/signal-message.d.ts.map +1 -1
  130. package/dist/internal/encoding/proto/signal-message.js +58 -58
  131. package/dist/internal/encoding/proto/signal-message.js.map +1 -1
  132. package/dist/internal/groups/group-id.d.ts +1 -1
  133. package/dist/internal/groups/group-id.js +1 -1
  134. package/dist/internal/groups/group-id.js.map +1 -1
  135. package/dist/internal/groups-v2/access-control.d.ts +8 -1
  136. package/dist/internal/groups-v2/access-control.d.ts.map +1 -1
  137. package/dist/internal/groups-v2/access-control.js +8 -1
  138. package/dist/internal/groups-v2/access-control.js.map +1 -1
  139. package/dist/internal/groups-v2/change-actions.d.ts +8 -3
  140. package/dist/internal/groups-v2/change-actions.d.ts.map +1 -1
  141. package/dist/internal/groups-v2/change-actions.js +8 -3
  142. package/dist/internal/groups-v2/change-actions.js.map +1 -1
  143. package/dist/internal/groups-v2/index.d.ts +7 -2
  144. package/dist/internal/groups-v2/index.d.ts.map +1 -1
  145. package/dist/internal/groups-v2/index.js.map +1 -1
  146. package/dist/internal/groups-v2/manager.d.ts +4 -2
  147. package/dist/internal/groups-v2/manager.d.ts.map +1 -1
  148. package/dist/internal/groups-v2/manager.js +5 -3
  149. package/dist/internal/groups-v2/manager.js.map +1 -1
  150. package/dist/internal/groups-v2/types.d.ts +10 -3
  151. package/dist/internal/groups-v2/types.d.ts.map +1 -1
  152. package/dist/internal/groups-v2/types.js.map +1 -1
  153. package/dist/internal/manager/manager.d.ts +3 -3
  154. package/dist/internal/manager/manager.d.ts.map +1 -1
  155. package/dist/internal/manager/manager.js +28 -17
  156. package/dist/internal/manager/manager.js.map +1 -1
  157. package/dist/internal/protocol/double-ratchet/chains.d.ts +1 -1
  158. package/dist/internal/protocol/double-ratchet/chains.d.ts.map +1 -1
  159. package/dist/internal/protocol/double-ratchet/chains.js +10 -10
  160. package/dist/internal/protocol/double-ratchet/chains.js.map +1 -1
  161. package/dist/internal/protocol/double-ratchet/ratchet.d.ts +3 -3
  162. package/dist/internal/protocol/double-ratchet/ratchet.d.ts.map +1 -1
  163. package/dist/internal/protocol/double-ratchet/ratchet.js +3 -3
  164. package/dist/internal/protocol/double-ratchet/ratchet.js.map +1 -1
  165. package/dist/internal/protocol/pqxdh/pqxdh.d.ts.map +1 -1
  166. package/dist/internal/protocol/pqxdh/pqxdh.js +3 -3
  167. package/dist/internal/protocol/pqxdh/pqxdh.js.map +1 -1
  168. package/dist/internal/protocol/sealed-sender/decryption.js +2 -2
  169. package/dist/internal/protocol/sealed-sender/decryption.js.map +1 -1
  170. package/dist/internal/protocol/sealed-sender/types.d.ts +1 -1
  171. package/dist/internal/protocol/sealed-sender/types.js +1 -1
  172. package/dist/internal/protocol/sender-keys/index.d.ts +1 -1
  173. package/dist/internal/protocol/sender-keys/manager.d.ts +4 -4
  174. package/dist/internal/protocol/sender-keys/manager.d.ts.map +1 -1
  175. package/dist/internal/protocol/sender-keys/manager.js +5 -5
  176. package/dist/internal/protocol/sender-keys/manager.js.map +1 -1
  177. package/dist/internal/protocol/spqr/index.d.ts +1 -1
  178. package/dist/internal/protocol/spqr/index.js +1 -1
  179. package/dist/internal/protocol/spqr/message.d.ts +1 -1
  180. package/dist/internal/protocol/spqr/message.js +1 -1
  181. package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts +3 -3
  182. package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts.map +1 -1
  183. package/dist/internal/protocol/spqr/ml-kem-braid/rs/index.js +2 -2
  184. package/dist/internal/protocol/spqr/ml-kem-braid/rs/index.js.map +1 -1
  185. package/dist/internal/protocol/spqr/ml-kem-braid/rs/lagrange.d.ts +1 -1
  186. package/dist/internal/protocol/spqr/ml-kem-braid/rs/lagrange.js +1 -1
  187. package/dist/internal/protocol/spqr/ml-kem-braid/rs/lagrange.js.map +1 -1
  188. package/dist/internal/protocol/spqr/ml-kem-braid/serialize.d.ts +1 -1
  189. package/dist/internal/protocol/spqr/ml-kem-braid/serialize.js +1 -1
  190. package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.js +5 -5
  191. package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.js.map +1 -1
  192. package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts +1 -1
  193. package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts.map +1 -1
  194. package/dist/internal/protocol/spqr/spqr.d.ts +10 -10
  195. package/dist/internal/protocol/spqr/spqr.d.ts.map +1 -1
  196. package/dist/internal/protocol/spqr/spqr.js +14 -14
  197. package/dist/internal/protocol/spqr/spqr.js.map +1 -1
  198. package/dist/internal/protocol/triple-ratchet/ratchet.d.ts +3 -3
  199. package/dist/internal/protocol/triple-ratchet/ratchet.d.ts.map +1 -1
  200. package/dist/internal/protocol/triple-ratchet/ratchet.js +5 -5
  201. package/dist/internal/protocol/triple-ratchet/ratchet.js.map +1 -1
  202. package/dist/internal/protocol/username/generate.d.ts +1 -1
  203. package/dist/internal/protocol/username/generate.js +1 -1
  204. package/dist/internal/protocol/username/hash.d.ts +1 -1
  205. package/dist/internal/protocol/username/hash.js +1 -1
  206. package/dist/internal/protocol/username/link.d.ts +1 -1
  207. package/dist/internal/protocol/username/link.js +1 -1
  208. package/dist/internal/protocol/username/proof.d.ts +1 -1
  209. package/dist/internal/protocol/username/proof.js +1 -1
  210. package/dist/internal/protocol/x3dh/x3dh.d.ts.map +1 -1
  211. package/dist/internal/protocol/x3dh/x3dh.js +6 -6
  212. package/dist/internal/protocol/x3dh/x3dh.js.map +1 -1
  213. package/dist/internal/protocol/zk/groups/client-zk-group-cipher.d.ts +2 -2
  214. package/dist/internal/protocol/zk/groups/client-zk-group-cipher.js +2 -2
  215. package/dist/internal/sesame/device-registry.d.ts +18 -13
  216. package/dist/internal/sesame/device-registry.d.ts.map +1 -1
  217. package/dist/internal/sesame/device-registry.js +13 -9
  218. package/dist/internal/sesame/device-registry.js.map +1 -1
  219. package/dist/internal/sesame/manager.d.ts +1 -1
  220. package/dist/internal/sesame/manager.d.ts.map +1 -1
  221. package/dist/internal/sesame/manager.js +16 -16
  222. package/dist/internal/sesame/manager.js.map +1 -1
  223. package/dist/internal/session/builder.js +3 -3
  224. package/dist/internal/session/builder.js.map +1 -1
  225. package/dist/internal/session/cipher.d.ts +2 -2
  226. package/dist/internal/session/cipher.d.ts.map +1 -1
  227. package/dist/internal/session/cipher.js +30 -30
  228. package/dist/internal/session/cipher.js.map +1 -1
  229. package/dist/internal/session/decryption.d.ts +1 -1
  230. package/dist/internal/session/decryption.js +10 -10
  231. package/dist/internal/session/decryption.js.map +1 -1
  232. package/dist/internal/session/factory.d.ts.map +1 -1
  233. package/dist/internal/session/factory.js +3 -3
  234. package/dist/internal/session/factory.js.map +1 -1
  235. package/dist/internal/session/handshake.d.ts.map +1 -1
  236. package/dist/internal/session/handshake.js +3 -3
  237. package/dist/internal/session/handshake.js.map +1 -1
  238. package/dist/internal/session/keys.d.ts +1 -1
  239. package/dist/internal/session/ratchet.d.ts.map +1 -1
  240. package/dist/internal/session/ratchet.js +4 -4
  241. package/dist/internal/session/ratchet.js.map +1 -1
  242. package/dist/internal/session/types.d.ts +2 -2
  243. package/dist/internal/session/types.d.ts.map +1 -1
  244. package/dist/internal/session/validation.d.ts.map +1 -1
  245. package/dist/internal/session/validation.js +3 -3
  246. package/dist/internal/session/validation.js.map +1 -1
  247. package/dist/keys/generation.d.ts +1 -1
  248. package/dist/keys/generation.js +1 -1
  249. package/dist/keys/types.d.ts +1 -1
  250. package/dist/keys/types.d.ts.map +1 -1
  251. package/dist/layers.d.ts +2 -2
  252. package/dist/layers.d.ts.map +1 -1
  253. package/dist/layers.js +4 -4
  254. package/dist/layers.js.map +1 -1
  255. package/dist/local/store/expo/adapter.d.ts +11 -11
  256. package/dist/local/store/expo/adapter.d.ts.map +1 -1
  257. package/dist/local/store/expo/adapter.js +9 -9
  258. package/dist/local/store/expo/adapter.js.map +1 -1
  259. package/dist/local/store/expo/database-key.d.ts +2 -2
  260. package/dist/local/store/expo/database-key.d.ts.map +1 -1
  261. package/dist/local/store/expo/database-key.js +5 -5
  262. package/dist/local/store/expo/database-key.js.map +1 -1
  263. package/dist/local/store/expo/db.d.ts +9 -9
  264. package/dist/local/store/expo/db.d.ts.map +1 -1
  265. package/dist/local/store/expo/db.js +3 -3
  266. package/dist/local/store/expo/db.js.map +1 -1
  267. package/dist/local/store/expo/index.d.ts +7 -7
  268. package/dist/local/store/expo/index.d.ts.map +1 -1
  269. package/dist/local/store/expo/index.js +3 -3
  270. package/dist/local/store/expo/index.js.map +1 -1
  271. package/dist/local/store/expo/key-storage.d.ts +1 -1
  272. package/dist/local/store/expo/key-storage.d.ts.map +1 -1
  273. package/dist/local/store/expo/key-storage.js +4 -4
  274. package/dist/local/store/expo/key-storage.js.map +1 -1
  275. package/dist/local/store/expo/models/local-identity.d.ts +1 -1
  276. package/dist/local/store/expo/models/local-identity.js +1 -1
  277. package/dist/local/store/expo/models/sender-key.d.ts +3 -3
  278. package/dist/local/store/expo/models/sender-key.d.ts.map +1 -1
  279. package/dist/local/store/expo/models/sender-key.js +3 -3
  280. package/dist/local/store/expo/models/sender-key.js.map +1 -1
  281. package/dist/local/store/expo/schema.d.ts +1 -1
  282. package/dist/local/store/expo/schema.js +1 -1
  283. package/dist/local/store/expo/secure-store-options.d.ts +2 -2
  284. package/dist/local/store/expo/secure-store-options.d.ts.map +1 -1
  285. package/dist/local/store/expo/secure-store-options.js +1 -1
  286. package/dist/local/store/expo/secure-store-options.js.map +1 -1
  287. package/dist/local/store/index.d.ts +9 -9
  288. package/dist/local/store/index.d.ts.map +1 -1
  289. package/dist/local/store/index.js +8 -8
  290. package/dist/local/store/index.js.map +1 -1
  291. package/dist/local/store/mock/adapter.d.ts +10 -4
  292. package/dist/local/store/mock/adapter.d.ts.map +1 -1
  293. package/dist/local/store/mock/adapter.js +119 -49
  294. package/dist/local/store/mock/adapter.js.map +1 -1
  295. package/dist/local/store/mock/failures.d.ts +34 -0
  296. package/dist/local/store/mock/failures.d.ts.map +1 -0
  297. package/dist/local/store/mock/failures.js +75 -0
  298. package/dist/local/store/mock/failures.js.map +1 -0
  299. package/dist/local/store/mock/index.d.ts +4 -3
  300. package/dist/local/store/mock/index.d.ts.map +1 -1
  301. package/dist/local/store/mock/index.js +5 -4
  302. package/dist/local/store/mock/index.js.map +1 -1
  303. package/dist/local/store/node/adapter.d.ts +4 -4
  304. package/dist/local/store/node/adapter.d.ts.map +1 -1
  305. package/dist/local/store/node/adapter.js +2 -2
  306. package/dist/local/store/node/adapter.js.map +1 -1
  307. package/dist/local/store/node/database-key.js +1 -1
  308. package/dist/local/store/node/database.d.ts.map +1 -1
  309. package/dist/local/store/node/database.js +2 -2
  310. package/dist/local/store/node/database.js.map +1 -1
  311. package/dist/local/store/node/index.d.ts +4 -4
  312. package/dist/local/store/node/index.d.ts.map +1 -1
  313. package/dist/local/store/node/index.js +3 -3
  314. package/dist/local/store/node/index.js.map +1 -1
  315. package/dist/local/store/react-native/adapter.d.ts +5 -5
  316. package/dist/local/store/react-native/adapter.d.ts.map +1 -1
  317. package/dist/local/store/react-native/adapter.js +14 -14
  318. package/dist/local/store/react-native/adapter.js.map +1 -1
  319. package/dist/local/store/react-native/index.d.ts +4 -4
  320. package/dist/local/store/react-native/index.d.ts.map +1 -1
  321. package/dist/local/store/react-native/index.js +3 -3
  322. package/dist/local/store/react-native/index.js.map +1 -1
  323. package/dist/local/store/react-native/storage.d.ts +2 -2
  324. package/dist/local/store/web/adapter.d.ts +4 -4
  325. package/dist/local/store/web/adapter.d.ts.map +1 -1
  326. package/dist/local/store/web/adapter.js +21 -9
  327. package/dist/local/store/web/adapter.js.map +1 -1
  328. package/dist/local/store/web/index.d.ts +4 -4
  329. package/dist/local/store/web/index.d.ts.map +1 -1
  330. package/dist/local/store/web/index.js +3 -3
  331. package/dist/local/store/web/index.js.map +1 -1
  332. package/dist/local/vault/expo-secure-store.d.ts +2 -2
  333. package/dist/local/vault/expo-secure-store.d.ts.map +1 -1
  334. package/dist/local/vault/expo-secure-store.js +5 -5
  335. package/dist/local/vault/expo-secure-store.js.map +1 -1
  336. package/dist/local/vault/index.d.ts +3 -3
  337. package/dist/local/vault/index.d.ts.map +1 -1
  338. package/dist/local/vault/index.js +1 -1
  339. package/dist/local/vault/index.js.map +1 -1
  340. package/dist/logger.d.ts +4 -4
  341. package/dist/logger.d.ts.map +1 -1
  342. package/dist/logger.js +5 -5
  343. package/dist/logger.js.map +1 -1
  344. package/dist/media/index.d.ts +7 -7
  345. package/dist/media/index.d.ts.map +1 -1
  346. package/dist/media/index.js +2 -2
  347. package/dist/profile/cipher.d.ts +1 -1
  348. package/dist/profile/cipher.js +1 -1
  349. package/dist/profile/contact-state.d.ts +1 -1
  350. package/dist/profile/contact-state.d.ts.map +1 -1
  351. package/dist/profile/contact-state.js +3 -3
  352. package/dist/profile/contact-state.js.map +1 -1
  353. package/dist/profile/crypto.d.ts +1 -1
  354. package/dist/profile/crypto.js +1 -1
  355. package/dist/profile/profile-key.d.ts.map +1 -1
  356. package/dist/profile/profile-key.js +3 -3
  357. package/dist/profile/profile-key.js.map +1 -1
  358. package/dist/profile/update-service.d.ts +2 -2
  359. package/dist/profile/update-service.d.ts.map +1 -1
  360. package/dist/profile/update-service.js +2 -2
  361. package/dist/profile/update-service.js.map +1 -1
  362. package/dist/remote/object-store/convex-r2/server.d.ts +1 -1
  363. package/dist/remote/object-store/convex-r2/storage.d.ts +2 -2
  364. package/dist/remote/object-store/convex-r2/storage.d.ts.map +1 -1
  365. package/dist/remote/object-store/index.d.ts +1 -1
  366. package/dist/remote/object-store/index.d.ts.map +1 -1
  367. package/dist/remote/object-store/s3/storage.d.ts +3 -3
  368. package/dist/remote/object-store/s3/storage.d.ts.map +1 -1
  369. package/dist/remote/object-store/s3/storage.js +1 -1
  370. package/dist/remote/object-store/types.d.ts +1 -1
  371. package/dist/remote/object-store/types.d.ts.map +1 -1
  372. package/dist/remote/relay/convex/index.d.ts +10 -10
  373. package/dist/remote/relay/convex/index.d.ts.map +1 -1
  374. package/dist/remote/relay/convex/index.js +6 -6
  375. package/dist/remote/relay/convex/index.js.map +1 -1
  376. package/dist/remote/relay/convex/relay.d.ts +13 -13
  377. package/dist/remote/relay/convex/relay.d.ts.map +1 -1
  378. package/dist/remote/relay/convex/relay.js +12 -12
  379. package/dist/remote/relay/convex/relay.js.map +1 -1
  380. package/dist/remote/relay/convex/types.d.ts +7 -7
  381. package/dist/remote/relay/convex/types.js +1 -1
  382. package/dist/remote/relay/index.d.ts +7 -7
  383. package/dist/remote/relay/index.d.ts.map +1 -1
  384. package/dist/remote/relay/index.js +6 -6
  385. package/dist/remote/relay/index.js.map +1 -1
  386. package/dist/remote/relay/mock/adapter.d.ts +17 -6
  387. package/dist/remote/relay/mock/adapter.d.ts.map +1 -1
  388. package/dist/remote/relay/mock/adapter.js +173 -54
  389. package/dist/remote/relay/mock/adapter.js.map +1 -1
  390. package/dist/remote/relay/mock/failures.d.ts +58 -0
  391. package/dist/remote/relay/mock/failures.d.ts.map +1 -0
  392. package/dist/remote/relay/mock/failures.js +123 -0
  393. package/dist/remote/relay/mock/failures.js.map +1 -0
  394. package/dist/remote/relay/mock/index.d.ts +4 -3
  395. package/dist/remote/relay/mock/index.d.ts.map +1 -1
  396. package/dist/remote/relay/mock/index.js +5 -4
  397. package/dist/remote/relay/mock/index.js.map +1 -1
  398. package/dist/remote/relay/types.d.ts +12 -12
  399. package/dist/remote/relay/types.d.ts.map +1 -1
  400. package/dist/remote/relay/types.js +3 -3
  401. package/dist/safety/protobuf.d.ts +1 -1
  402. package/dist/safety/protobuf.d.ts.map +1 -1
  403. package/dist/types/api.d.ts +8 -8
  404. package/dist/types/api.d.ts.map +1 -1
  405. package/dist/types/errors.d.ts +2 -2
  406. package/dist/types/errors.d.ts.map +1 -1
  407. package/dist/types/errors.js +2 -2
  408. package/dist/types/errors.js.map +1 -1
  409. package/dist/types/messages.d.ts +1 -1
  410. package/dist/types/protocol-config.d.ts +20 -4
  411. package/dist/types/protocol-config.d.ts.map +1 -1
  412. package/dist/types/protocol-config.js +17 -2
  413. package/dist/types/protocol-config.js.map +1 -1
  414. package/dist/types/protocol-constants.d.ts +1 -1
  415. package/dist/types/protocol-constants.js +1 -1
  416. package/dist/utils/binary-transfer.d.ts +1 -1
  417. package/dist/utils/errors.d.ts +2 -2
  418. package/dist/utils/errors.js +2 -2
  419. package/dist/utils/retry.d.ts +4 -3
  420. package/dist/utils/retry.d.ts.map +1 -1
  421. package/dist/utils/retry.js +20 -1
  422. package/dist/utils/retry.js.map +1 -1
  423. package/dist/zk/groups.d.ts +1 -1
  424. package/dist/zk/groups.js +1 -1
  425. package/docs/CLIENT_COMPOSITION.md +7 -5
  426. package/docs/DEVIATIONS.md +97 -80
  427. package/docs/GETTING_STARTED.md +12 -8
  428. package/docs/INTERFACES.md +22 -22
  429. package/docs/PACKAGE_SURFACE.md +12 -12
  430. package/docs/PROTOCOL_POLICY.md +2 -2
  431. package/docs/RECIPES.md +6 -2
  432. package/docs/api/classes/EndorsementManager.md +1 -1
  433. package/docs/api/classes/{SignalBlockingManager.md → SignalProtocolBlockingManager.md} +5 -5
  434. package/docs/api/classes/SignalProtocolClient.md +4 -4
  435. package/docs/api/functions/createDefaultSignalProtocolContentAdapter.md +13 -0
  436. package/docs/api/functions/{createDefaultSignalLogger.md → createDefaultSignalProtocolLogger.md} +5 -5
  437. package/docs/api/functions/{resolveSignalLogger.md → resolveSignalProtocolLogger.md} +5 -5
  438. package/docs/api/interfaces/BlockedRecipientEntry.md +1 -1
  439. package/docs/api/interfaces/ILogger.md +1 -1
  440. package/docs/api/interfaces/IProtocolStore.md +1 -1
  441. package/docs/api/interfaces/ISenderKeyStore.md +1 -1
  442. package/docs/api/interfaces/ISesameStore.md +1 -1
  443. package/docs/api/interfaces/ISignalProtocolClient.md +2 -2
  444. package/docs/api/interfaces/{ISignalLocalSecretVault.md → ISignalProtocolLocalSecretVault.md} +4 -4
  445. package/docs/api/interfaces/{ISignalLocalStore.md → ISignalProtocolLocalStore.md} +4 -4
  446. package/docs/api/interfaces/{ISignalRelayServer.md → ISignalProtocolRelayServer.md} +3 -3
  447. package/docs/api/interfaces/{InspectedSignalContent.md → InspectedSignalProtocolContent.md} +2 -2
  448. package/docs/api/interfaces/MLKEMBraidAgentState.md +1 -1
  449. package/docs/api/interfaces/MessageHeader.md +1 -1
  450. package/docs/api/interfaces/PreKeyMaintenanceStore.md +2 -1
  451. package/docs/api/interfaces/SealedSenderConfig.md +1 -1
  452. package/docs/api/interfaces/{SignalBlockingHooks.md → SignalProtocolBlockingHooks.md} +2 -2
  453. package/docs/api/interfaces/SignalProtocolBlockingManagerOptions.md +31 -0
  454. package/docs/api/interfaces/{SignalBlockingMirror.md → SignalProtocolBlockingMirror.md} +2 -2
  455. package/docs/api/interfaces/{SignalBlockingStore.md → SignalProtocolBlockingStore.md} +2 -2
  456. package/docs/api/interfaces/SignalProtocolClientAdapterConfig.md +3 -3
  457. package/docs/api/interfaces/SignalProtocolClientCompositionOptions.md +2 -2
  458. package/docs/api/interfaces/SignalProtocolClientConfig.md +10 -10
  459. package/docs/api/interfaces/SignalProtocolClientHooks.md +1 -1
  460. package/docs/api/interfaces/SignalProtocolClientIdentityConfig.md +1 -1
  461. package/docs/api/interfaces/SignalProtocolClientMediaConfig.md +2 -2
  462. package/docs/api/interfaces/SignalProtocolConfig.md +1 -1
  463. package/docs/api/interfaces/{SignalContentAdapter.md → SignalProtocolContentAdapter.md} +4 -4
  464. package/docs/api/interfaces/{SignalRemoteObjectStore.md → SignalProtocolRemoteObjectStore.md} +2 -2
  465. package/docs/api/namespaces/blocking/README.md +10 -10
  466. package/docs/api/namespaces/encoding/functions/bytesToUrlSafeBase64.md +2 -2
  467. package/docs/api/namespaces/keys/functions/generateKemOneTimePreKeys.md +1 -1
  468. package/docs/api/namespaces/media/functions/prepareMediaAttachmentUpload.md +1 -1
  469. package/docs/api/namespaces/media/functions/resolveMediaAttachment.md +1 -1
  470. package/docs/api/namespaces/media/interfaces/DeleteMediaAttachmentOptions.md +1 -1
  471. package/docs/api/namespaces/media/interfaces/ExecuteMediaAttachmentJobOptions.md +1 -1
  472. package/docs/api/namespaces/media/interfaces/PrepareMediaAttachmentUploadOptions.md +1 -1
  473. package/docs/api/namespaces/media/interfaces/ResolveMediaAttachmentOptions.md +1 -1
  474. package/docs/api/namespaces/media/variables/downloadMediaAttachment.md +1 -1
  475. package/docs/api/type-aliases/GroupId.md +1 -1
  476. package/docs/api/variables/MAX_RECEIVER_CHAINS.md +1 -1
  477. package/docs/api/variables/ONE_TIME_PREKEY_BATCH_SIZE.md +1 -1
  478. package/docs/api/variables/{defaultSignalLogger.md → defaultSignalProtocolLogger.md} +5 -5
  479. package/files/README.md +1 -1
  480. package/local/store/README.md +10 -10
  481. package/local/store/expo/README.md +5 -5
  482. package/local/store/mock/README.md +32 -1
  483. package/local/store/node/README.md +1 -1
  484. package/local/store/react-native/README.md +1 -1
  485. package/local/store/web/README.md +1 -1
  486. package/local/vault/README.md +3 -3
  487. package/package.json +1 -1
  488. package/remote/README.md +19 -19
  489. package/remote/object-store/README.md +3 -3
  490. package/remote/object-store/convex-r2/README.md +1 -1
  491. package/remote/object-store/s3/README.md +1 -1
  492. package/remote/relay/README.md +2 -2
  493. package/remote/relay/convex/README.md +4 -4
  494. package/remote/relay/mock/README.md +38 -1
  495. package/types/README.md +1 -1
  496. package/docs/api/functions/createDefaultSignalContentAdapter.md +0 -13
  497. package/docs/api/interfaces/SignalBlockingManagerOptions.md +0 -31
@@ -9,24 +9,24 @@
9
9
  This SDK implements the same cryptographic core as the published Signal Protocol
10
10
  specifications — X3DH/PQXDH key agreement, the Double Ratchet, the ML-KEM Braid
11
11
  post-quantum ratchet, Sesame multi-device session management, sealed sender, and
12
- Signal's zero-knowledge group credential system. In many places it is faithful
12
+ the Signal Protocol's zero-knowledge group credential system. In many places it is faithful
13
13
  down to the byte: the same KDF labels, the same chain-key constants, the same
14
14
  protobuf field numbers, the same iteration counts.
15
15
 
16
16
  It is **not wire-compatible with Signal Messenger or with `libsignal`**, and it
17
17
  is not intended to be. Messages produced by this SDK cannot be decrypted by a
18
- Signal client, identities cannot be exchanged, safety numbers computed here
19
- cannot be compared against safety numbers shown in Signal, and sessions cannot be
18
+ Signal Messenger client, identities cannot be exchanged, safety numbers computed here
19
+ cannot be compared against safety numbers shown in Signal Messenger, and sessions cannot be
20
20
  migrated in either direction. This is a distinct wire profile —
21
- `IndependentProfileV1` — that shares Signal's cryptographic design and
21
+ `IndependentProfileV1` — that shares the Signal Protocol's cryptographic design and
22
22
  deliberately does not share its encoding.
23
23
 
24
24
  That distinction matters in a specific way. Reading "implements X3DH and the
25
25
  Double Ratchet" reasonably leads someone to expect interoperability. There is
26
- none. Reading "Signal-compatible safety numbers" would reasonably lead someone to
27
- expect that a user could verify a contact by comparing a number shown in this SDK
28
- against the same contact's number in Signal. They cannot; the numbers are
29
- computed over different inputs and will never match.
26
+ none. Reading "safety numbers compatible with Signal Messenger" would reasonably
27
+ lead someone to expect that a user could verify a contact by comparing a number
28
+ shown in this SDK against the same contact's number in Signal Messenger. They
29
+ cannot; the numbers are computed over different inputs and will never match.
30
30
 
31
31
  This document is the complete, honest account of where and why the profile
32
32
  differs. Each entry names the implementing file, the specification section or
@@ -39,8 +39,8 @@ Deviations fall into three kinds:
39
39
  - **Deviation** — does something different from the specification or from
40
40
  `libsignal`, deliberately.
41
41
  - **Extension** — adds a mechanism the specification does not describe.
42
- - **Independent design** — shares a name and a goal with a Signal system, but is
43
- the SDK's own construction rather than a port of Signal's.
42
+ - **Independent design** — shares a name and a goal with a Signal Protocol system, but is
43
+ the SDK's own construction rather than a port of the corresponding `libsignal` system.
44
44
 
45
45
  A fourth label, **faithful**, appears in the table where an area follows the
46
46
  specification closely enough that its presence in this document is only to
@@ -58,23 +58,23 @@ model and what is out of scope.
58
58
  | Area | Specification followed | Deviation or extension | Why | Consequence |
59
59
  |---|---|---|---|---|
60
60
  | **Identity keys** | X3DH §2.2; `libsignal` `identity_key.rs` | **Deviation.** A 67-byte composite of separate X25519 and Ed25519 keys replaces the single 33-byte Curve25519 identity key | Avoids XEdDSA, a non-standard signature scheme with no vetted JavaScript implementation; standard Ed25519 is independently verifiable | Two keys to store and rotate; larger identity; **no wire compatibility for any identity-bearing material** |
61
- | **Prekey signatures** | X3DH §2.2, §4.5 | **Deviation.** RFC 8032 Ed25519 over a domain-separated context binding the identity commitment, algorithm tag, and key ID — not XEdDSA over the bare key | Defeats cross-algorithm and cross-key-ID substitution that a bare-key signature does not cover | Strictly stronger binding; signatures are unverifiable by Signal clients and vice versa |
62
- | **Safety numbers** | `libsignal` `fingerprint.rs` | **Deviation.** Iteration and digit encoding are byte-identical, but the input is a composite-identity commitment under an SDK domain string, the QR version is `3`, and the two halves are ordered by user ID rather than by digit string | Follows from the composite identity; a single-key fingerprint cannot authenticate both components | **Safety numbers are not comparable to Signal's.** The ordering rule also differs from `libsignal` even on the single-key path |
63
- | **X3DH / PQXDH** | X3DH rev. 1; PQXDH rev. 3 | **Faithful** on DH order, the `0xFF`×32 prefix, zero-salt HKDF, and KEM-secret position. **Deviation:** ML-KEM-1024 (FIPS 203) runs under an info string naming `CRYSTALS-KYBER-1024` | Standardized ML-KEM preferred over round-3 Kyber; the label was inherited from `libsignal` and not updated | Identical label with a different KEM means the same transcript derives a **different** shared secret, with no domain separation signalling it. Violates PQXDH §2.2 |
61
+ | **Prekey signatures** | X3DH §2.2, §4.5 | **Deviation.** RFC 8032 Ed25519 over a domain-separated context binding the identity commitment, algorithm tag, and key ID — not XEdDSA over the bare key | Defeats cross-algorithm and cross-key-ID substitution that a bare-key signature does not cover | Strictly stronger binding; signatures are unverifiable by Signal Messenger clients and vice versa |
62
+ | **Safety numbers** | `libsignal` `fingerprint.rs` | **Deviation.** Iteration and digit encoding are byte-identical, but the input is a composite-identity commitment under an SDK domain string, the QR version is `3`, and the two halves are ordered by user ID rather than by digit string | Follows from the composite identity; a single-key fingerprint cannot authenticate both components | **Safety numbers are not comparable to Signal Messenger's.** The ordering rule also differs from `libsignal` even on the single-key path |
63
+ | **X3DH / PQXDH** | X3DH rev. 1; PQXDH rev. 3 | **Faithful** on DH order, the `0xFF`×32 prefix, zero-salt HKDF, KEM-secret position, and — since `0.1.0-alpha.6` — on PQXDH §2.2's info-string construction. **Deviation:** ML-KEM-1024 (FIPS 203) replaces round-3 Kyber1024 | Standardized ML-KEM preferred over round-3 Kyber. The info string names it, and names this application rather than `libsignal`'s, as §2.1 and §2.2 require | Wire-incompatible with `libsignal` by construction, and the label now says so. Sessions established before `0.1.0-alpha.6` derive a different `SK` and cannot be continued |
64
64
  | **Associated data** | X3DH §3.3 | **Deviation.** `AD` is a domain-separated HMAC input over SHA-256 commitments to both composite identities, not `IK_A ‖ IK_B` | Binds the Ed25519 component, which a raw-key `AD` would leave uncovered | Stronger binding; wire-incompatible |
65
- | **Double Ratchet** | Double Ratchet rev. 4 | **Faithful** on `WhisperRatchet`, `WhisperMessageKeys`, the `0x01`/`0x02` seeds, the 80-byte split, AES-256-CBC, the `0x44` version byte, and 8-byte MAC truncation | — | The ratchet core is Signal's |
66
- | **Message wire format** | `libsignal` `wire.proto` | **Faithful** field numbers 1–8. **Extension:** fields at 100+ carry identity type and ML-KEM one-time prekey material. **Deviation:** address binding uses variable-length UTF-8 user IDs and 4-byte device IDs instead of 17-byte ServiceIds and 1-byte device IDs | The SDK binds application-defined identifiers, not Signal ACIs | Wire-incompatible; a Signal client would silently ignore the added fields |
65
+ | **Double Ratchet** | Double Ratchet rev. 4 | **Faithful** on `WhisperRatchet`, `WhisperMessageKeys`, the `0x01`/`0x02` seeds, the 80-byte split, AES-256-CBC, the `0x44` version byte, and 8-byte MAC truncation | — | The ratchet core follows the Double Ratchet specification |
66
+ | **Message wire format** | `libsignal` `wire.proto` | **Faithful** field numbers 1–8. **Extension:** fields at 100+ carry identity type and ML-KEM one-time prekey material. **Deviation:** address binding uses variable-length UTF-8 user IDs and 4-byte device IDs instead of 17-byte ServiceIds and 1-byte device IDs | The SDK binds application-defined identifiers, not Signal Messenger ACIs | Wire-incompatible; a Signal Messenger client would silently ignore the added fields |
67
67
  | **Skipped keys and archiving** | Double Ratchet §2.6; `libsignal` `consts.rs` | **Deviation.** The 2000-key cap is global rather than per-chain, eviction is by wall-clock timestamp, and skipped keys expire after 7 days. Session records serialize as JSON, not protobuf | Simpler storage accounting and bounded growth | **Legitimate messages can become undecryptable** where `libsignal` would still decrypt them: a 5× smaller effective cap, cross-chain eviction, and a hard 7-day limit for offline recipients |
68
- | **Padding** | — | **Extension.** ISO 7816-4 bit padding to 160-byte buckets inside the library | Length hiding by default rather than left to the application | `libsignal` does not pad at this layer; Signal's apps do. PKCS#7 then adds a block, so ciphertext lands 16 bytes past each boundary |
69
- | **SPQR / ML-KEM Braid** | ML-KEM Braid rev. 1 | **Deviation.** Same protocol, same KDF labels, same Reed–Solomon parameters, byte-identical message framing — except `hek = SHA3-256(ek_seed ‖ ek_vector)`, the operand order the specification states, which is the reverse of Signal's implementation | The normative text was followed over the executable reference | Wire-visible. Headers, ciphertexts, and shared secrets diverge; a braid session cannot complete a single epoch against Signal's implementation. Also means the KEM is not FIPS 203 in braid mode |
70
- | **Triple Ratchet** | `libsignal` `triple_ratchet.rs` | **Faithful.** The PQ secret enters as the HKDF salt at message-key expansion, same label, same order | — | The braiding construction is Signal's |
68
+ | **Padding** | — | **Extension.** ISO 7816-4 bit padding to 160-byte buckets inside the library | Length hiding by default rather than left to the application | `libsignal` does not pad at this layer; Signal Messenger's apps do. PKCS#7 then adds a block, so ciphertext lands 16 bytes past each boundary |
69
+ | **SPQR / ML-KEM Braid** | ML-KEM Braid rev. 1 | **Deviation.** Same protocol, same KDF labels, same Reed–Solomon parameters, byte-identical message framing — except `hek = SHA3-256(ek_seed ‖ ek_vector)`, the operand order the specification states, which is the reverse of `libsignal`'s implementation | The normative text was followed over the executable reference | Wire-visible. Headers, ciphertexts, and shared secrets diverge; a braid session cannot complete a single epoch against `libsignal`'s implementation. Also means the KEM is not FIPS 203 in braid mode |
70
+ | **Triple Ratchet** | `libsignal` `triple_ratchet.rs` | **Faithful.** The PQ secret enters as the HKDF salt at message-key expansion, same label, same order | — | The braiding construction follows the ML-KEM Braid specification |
71
71
  | **Sesame** | Sesame rev. 2 | **Deviation** on session expiry (§4.2 applies only to unacknowledged sessions) and on deleted devices (hard-removed rather than marked stale). **Extensions:** QR provisioning, device transfer, encrypted device names, identity-change gating, a 5-device cap | Product requirements the specification does not address | Hard deletion **drops the MAXLATENCY window, so in-flight messages from a just-removed device become permanently undecryptable**. Device transfer clones ratchet state, which weakens the forward-secrecy bound |
72
72
  | **Sealed sender v1** | `libsignal` `sealed_sender.rs` | **Deviation.** Correct labels, cipher, and MAC length, but the 96-byte HKDF output is split `(cipher, mac, chain)` where `libsignal` splits `(chain, cipher, mac)`; keys in the salt omit the `0x05` type byte; the inner envelope is a hand-rolled varint format rather than the `UnidentifiedSenderMessage.Message` protobuf | The slice order and the missing prefix are unintentional; the envelope is a deliberate simplification | Self-consistent and secure, but every v1 key sits in a different slot than `libsignal`'s. The envelope also drops the message-type field |
73
- | **Sealed sender v2** | `libsignal` `sealed_sender.rs` | **Faithful** on all four labels, the KEM, AES-256-GCM-SIV, the multi-recipient binary format, and the `0x3FFF` registration-ID mask | — | The v2 construction is Signal's |
74
- | **Delivery token** | `libsignal` `profile_key.rs` | **Faithful.** `deriveAccessKey` is Signal's `ProfileKey::derive_access_key`, and reproduces `libsignal`'s published known-answer values | — | Not an SDK invention, despite what the module name suggests |
73
+ | **Sealed sender v2** | `libsignal` `sealed_sender.rs` | **Faithful** on all four labels, the KEM, AES-256-GCM-SIV, the multi-recipient binary format, and the `0x3FFF` registration-ID mask | — | The v2 construction follows `libsignal` |
74
+ | **Delivery token** | `libsignal` `profile_key.rs` | **Faithful.** `deriveAccessKey` follows `libsignal`'s `ProfileKey::derive_access_key`, and reproduces `libsignal`'s published known-answer values | — | Not an SDK invention, despite what the module name suggests |
75
75
  | **Sender keys** | `libsignal` `sender_keys.rs` | **Deviation.** Protobuf field numbers and `0x33` framing match, and the `0x01`/`0x02` seeds match, but message-key derivation **omits HKDF-Extract**, signatures are Ed25519 not XEdDSA, and `distributionUuid` carries a UTF-8 string rather than 16 UUID bytes | The Ed25519 choice follows the identity profile; the missing Extract appears unintentional | Group message keys differ from `libsignal`'s for the same chain key. Confirmed numerically, not merely by inspection |
76
- | **Groups v2** | Signal Private Group System | **Independent design.** Real zkgroup primitives underneath, but the client is the state authority: it re-encrypts and uploads whole group state, and server signatures are not verified | Ships a working group system without a validating server | The relay **cannot validate group changes**, so it cannot enforce roles or membership. This is a materially weaker trust model than Signal's, where the server validates every change against zero-knowledge presentations |
77
- | **zkgroup / zkcredential** | `libsignal` `zkgroup`, `zkcredential`, `poksho` | **Faithful** port of the Ristretto255 KVAC and Sigma-protocol system, verified against `libsignal`'s known-answer vectors. **Deviation:** server parameter derivation uses SDK-specific labels | Server keys are the SDK's own trust root, not Signal's | The zero-knowledge properties are real. Credentials are not interchangeable with Signal's |
76
+ | **Groups v2** | Signal Private Group System | **Independent design.** Real zkgroup primitives underneath, but the client is the state authority: it re-encrypts and uploads whole group state, and server signatures are not verified | Ships a working group system without a validating server | The relay **cannot validate group changes**, so it cannot enforce roles or membership. This is a materially weaker trust model than the Signal Private Group System, where the server validates every change against zero-knowledge presentations |
77
+ | **zkgroup / zkcredential** | `libsignal` `zkgroup`, `zkcredential`, `poksho` | **Faithful** port of the Ristretto255 KVAC and Sigma-protocol system, verified against `libsignal`'s known-answer vectors. **Deviation:** server parameter derivation uses SDK-specific labels | Server keys are the SDK's own trust root, not Signal Messenger's | The zero-knowledge properties are real. Credentials are not interchangeable with Signal Messenger's |
78
78
  | **Registration IDs** | `libsignal` `sealed_sender.rs` | **Faithful** as of 0.1.0-alpha.4. Generated in `[1, 16383]`, strictly inside the 14 bits the wire format reserves | — | Through alpha.3 the range ran to 16384, which masked to `0` on the wire in multi-recipient sealed sender for roughly 1 install in 16,384 |
79
79
 
80
80
  ---
@@ -157,7 +157,7 @@ or which identity it belongs to. Binding all three defeats cross-algorithm
157
157
  substitution (presenting an X25519 signature as an ML-KEM one) and cross-key-ID
158
158
  substitution. This is strictly stronger than the specification requires.
159
159
 
160
- **Cost.** Wire incompatibility, and a signature format that no Signal
160
+ **Cost.** Wire incompatibility, and a signature format that no Signal Messenger
161
161
  implementation can verify.
162
162
 
163
163
  The same Ed25519-instead-of-XEdDSA choice applies to sealed sender certificates
@@ -169,10 +169,10 @@ this codebase. Where the frozen upstream specification snapshots mention them,
169
169
  that is upstream text; the SDK's own documentation consistently states that
170
170
  ordinary Ed25519 is used instead.
171
171
 
172
- ### 1.3 Safety numbers are not comparable to Signal's
172
+ ### 1.3 Safety numbers are not comparable to Signal Messenger's
173
173
 
174
174
  State this without hedging: **a safety number produced by this SDK will never
175
- match the safety number Signal shows for the same two users.** A user cannot
175
+ match the safety number Signal Messenger shows for the same two users.** A user cannot
176
176
  verify a contact by reading a number out of one application and comparing it
177
177
  against the other.
178
178
 
@@ -193,7 +193,7 @@ SDK's low-level single-key path, which is otherwise byte-identical to
193
193
  `libsignal`. The SDK orders by user identifier — `localId.localeCompare(remoteId)`
194
194
  (`safety/core.ts:177`) — where `libsignal` orders by the encoded digit strings
195
195
  themselves ([`fingerprint.rs:32-40`][fp]). Both rules are symmetric, so the two
196
- parties always agree with each other; they simply do not agree with Signal, and
196
+ parties always agree with each other; they simply do not agree with Signal Messenger, and
197
197
  roughly half the time the halves come out in the opposite order. `localeCompare`
198
198
  is additionally locale-sensitive, so two devices with different default locales
199
199
  can in principle disagree with each other on the ordering of the same pair of
@@ -209,7 +209,7 @@ cross-verification swap and constant-time comparison match as well.
209
209
  The QR format version is the SDK's own: `3` for the composite path
210
210
  (`safety/core.ts:46`), where `libsignal` knows only versions 1 and 2 and returns
211
211
  `VersionMismatch` for anything else. Using a distinct version in the same
212
- protobuf namespace is the correct fail-closed choice — a Signal client rejects
212
+ protobuf namespace is the correct fail-closed choice — a Signal Messenger client rejects
213
213
  the code rather than misreading it.
214
214
 
215
215
  The SDK also offers an emoji fingerprint (`safety/core.ts:308-392`) and
@@ -223,7 +223,7 @@ number and should not be presented to users as an equal-strength alternative.
223
223
  Registration IDs are generated in the closed range `[1, 16383]`
224
224
  (`keys/generation.ts:43-46`). The wire format reserves exactly 14 bits, and
225
225
  `libsignal` rejects any ID where `id & 0x3FFF != id`
226
- ([`sealed_sender.rs:1508-1515`][ss]); Signal's own helper generates `[1, 16380]`.
226
+ ([`sealed_sender.rs:1508-1515`][ss]); `libsignal`'s own helper generates `[1, 16380]`.
227
227
 
228
228
  Through 0.1.0-alpha.3 the range was `[1, 16384]`, an off-by-one: 16384 is
229
229
  `0x4000` and does not fit in 14 bits, and the SDK's multi-recipient sealed sender
@@ -259,33 +259,49 @@ remote X25519 point is validated before any DH is computed
259
259
  far more strictly than `libsignal` requires
260
260
  (`internal/session/handshake.ts:107-138`).
261
261
 
262
- ### 2.1 ML-KEM-1024 runs under an info string naming Kyber
262
+ ### 2.1 The info strings name this application and this KEM
263
263
 
264
264
  The SDK uses ML-KEM-1024 (FIPS 203) where `libsignal` uses round-3 Kyber1024,
265
265
  tagged `0x0A` rather than `0x08` (`internal/crypto/pq/kyber.ts:79`). That much is
266
266
  deliberate: the standardized algorithm is preferred over the round-3 draft, and a
267
267
  single unambiguous tag is preferred over carrying a legacy fallback.
268
268
 
269
- The info string was not updated to match (`types/protocol-config.ts:365`):
269
+ The info strings are the SDK's own (`types/protocol-config.ts:363-386`):
270
270
 
271
271
  ```text
272
- WhisperText_X25519_SHA-256_CRYSTALS-KYBER-1024
272
+ OpenE2EE_X25519_SHA-256_ML-KEM-1024 (PQXDH)
273
+ OpenE2EE (X3DH)
273
274
  ```
274
275
 
275
- This is byte-identical to `libsignal`'s label ([`pqxdh.rs:73-74`][pq]) while
276
- naming a KEM the SDK does not use. Two consequences:
277
-
278
- 1. **It violates the SDK's own pinned specification.** PQXDH §2.2 requires the
279
- info string to be the concatenation of the four PQXDH parameters *including
280
- the actual `pqkem`*. The running `pqkem` is ML-KEM-1024; the string says
281
- CRYSTALS-KYBER-1024.
282
- 2. **It removes the domain separation that would make the incompatibility
283
- self-evident.** Two implementations feeding the identical label derive
284
- different shared secrets, because the KEM underneath differs. A label naming
285
- ML-KEM-1024 would make the non-interoperability explicit at the KDF layer.
286
-
287
- Changing the label to name ML-KEM-1024 would satisfy §2.2 and improve the
288
- situation. It is a pre-1.0 format break, and is flagged rather than fixed here.
276
+ Both parameters the specifications leave to the implementer are set to what
277
+ this SDK is and runs. PQXDH §2.2 defines the info string as `info`, `curve`,
278
+ `hash`, and `pqkem` joined by `_`, with each representation implementer-chosen;
279
+ §2.1 defines `info` as an application identifier of at least 8 bytes. X3DH §2.1
280
+ defines the same `info` parameter, and §3.3 uses it as the HKDF info with
281
+ nothing appended.
282
+
283
+ Through `0.1.0-alpha.5` these were `libsignal`'s labels — `WhisperText` and
284
+ `WhisperText_X25519_SHA-256_CRYSTALS-KYBER-1024` ([`pqxdh.rs:73-74`][pq]) —
285
+ which was wrong on both parameters:
286
+
287
+ 1. **`pqkem` named a KEM the SDK does not run**, violating §2.2. Worse than a
288
+ labelling error: two implementations feeding an identical label derived
289
+ *different* shared secrets, because the KEM underneath differed, with
290
+ nothing at the KDF layer to signal it. Domain separation is the one job the
291
+ info string has.
292
+ 2. **`info` named someone else's application.** The specifications ask for an
293
+ identifier of the application deriving the key. This SDK is not Signal
294
+ Messenger, and the label saying otherwise was inherited, not chosen.
295
+
296
+ Both are corrected as of `0.1.0-alpha.6`. This is a
297
+ pre-1.0 format break: sessions established under the old labels derive a
298
+ different `SK` and cannot be continued. Nothing else about the derivation
299
+ changed.
300
+
301
+ An application that needs `libsignal`'s known-answer vectors can still get them
302
+ by setting `protocolStrategy.keyExchangeInfoString` to the old label
303
+ explicitly, which is what that option is for. Doing so re-adopts the §2.2
304
+ violation knowingly rather than by default.
289
305
 
290
306
  ### 2.2 Associated data binds identity commitments
291
307
 
@@ -309,8 +325,8 @@ Ed25519 signing component unbound — the component that authenticates every pre
309
325
  the peer will ever publish. Hashing the commitment covers both.
310
326
 
311
327
  **Cost.** This is the single largest wire deviation in the message path. The
312
- truncation to 8 bytes matches Signal's convention, and the construction is sound
313
- and domain-separated, but a Signal client and this SDK cannot exchange a single
328
+ truncation to 8 bytes matches `libsignal`'s convention, and the construction is sound
329
+ and domain-separated, but a Signal Messenger client and this SDK cannot exchange a single
314
330
  message.
315
331
 
316
332
  ### 2.3 One-time prekey deletion is deferred
@@ -380,7 +396,7 @@ field 6.
380
396
  have: `recipientIdentityType` on both message types, and `kemOneTimePreKeyId` /
381
397
  `kemOneTimeCiphertext` on prekey messages
382
398
  (`internal/encoding/proto/signal-message.ts:80`, `:226-228`). High numbering
383
- avoids collision with future upstream fields. A Signal client would parse the
399
+ avoids collision with future upstream fields. A Signal Messenger client would parse the
384
400
  message and silently ignore them, losing the identity-type binding.
385
401
 
386
402
  **Deviation.** `libsignal` binds addresses as a 17-byte fixed-width ServiceId plus
@@ -388,7 +404,7 @@ a 1-byte device ID ([`protocol.rs:246-260`][proto]). The SDK binds a
388
404
  format-version byte, a varint-length-prefixed UTF-8 user ID, and a 4-byte
389
405
  big-endian device ID (`internal/encoding/proto/signal-message.ts:84-92`). The
390
406
  encoding is unambiguous, but it authenticates an application-defined identifier
391
- rather than a Signal ACI or PNI — which is the correct thing for this SDK to bind
407
+ rather than a Signal Messenger ACI or PNI — which is the correct thing for this SDK to bind
392
408
  and an incompatible thing to put on the wire.
393
409
 
394
410
  The SDK is also stricter than `libsignal` on decode, requiring fields that
@@ -446,7 +462,7 @@ storage.
446
462
 
447
463
  **Session records serialize as JSON, not protobuf** (`types/session.ts:1002-1028`).
448
464
  This is acknowledged in the source as a simplicity and debuggability choice.
449
- Consequences worth naming: stored sessions are not portable to or from any Signal
465
+ Consequences worth naming: stored sessions are not portable to or from any Signal Messenger
450
466
  client, and key material sits in immutable JavaScript strings that cannot be
451
467
  zeroed, where `libsignal`'s byte vectors can be.
452
468
 
@@ -458,7 +474,7 @@ padding — a `0x80` terminator followed by zeros
458
474
  rejects malformed padding with a deliberately generic error to avoid a padding
459
475
  oracle.
460
476
 
461
- `libsignal` does not bucket-pad at this layer; in Signal, that lives in the client
477
+ `libsignal` does not bucket-pad at this layer; in Signal Messenger, that lives in the client
462
478
  applications. Doing it in the library means length hiding is on by default rather
463
479
  than a thing each integrator must remember.
464
480
 
@@ -472,7 +488,7 @@ past each boundary rather than on it.
472
488
 
473
489
  ## 4. SPQR and the ML-KEM Braid
474
490
 
475
- This is the same protocol as Signal's SparsePostQuantumRatchet v1, implemented
491
+ This is the same protocol as the SparsePostQuantumRatchet v1 protocol, implemented
476
492
  independently and pinned against `SparsePostQuantumRatchet v1.5.1` (commit
477
493
  `f2589fef`). The fidelity is high and specific:
478
494
 
@@ -483,10 +499,10 @@ independently and pinned against `SparsePostQuantumRatchet v1.5.1` (commit
483
499
  (`internal/protocol/spqr/ml-kem-braid/kdf.ts:32-92`).
484
500
  - **The Reed–Solomon erasure layer matches**: GF(2^16) with primitive polynomial
485
501
  `0x1100b`, 32-byte chunks, 16 polynomials, degree bound 35. Reed–Solomon is
486
- present in Signal's implementation; it is not an SDK addition.
502
+ present in `libsignal`; it is not an SDK addition.
487
503
  - **The production wire framing is byte-compatible**:
488
504
  `VERSION ‖ LEB128(epoch) ‖ LEB128(chain_index) ‖ MSG_TYPE ‖ [LEB128(chunk_index) ‖ CHUNK]`
489
- (`internal/encoding/proto/pq-ratchet-serialize.ts`), matching Signal's
505
+ (`internal/encoding/proto/pq-ratchet-serialize.ts`), matching `libsignal`'s
490
506
  `serialize.rs`, with the same message-type values and the same epoch offset.
491
507
  - **ML-KEM-768 with the same incremental split** (32-byte seed, 1152-byte vector,
492
508
  960/128-byte ciphertext parts).
@@ -500,18 +516,18 @@ One divergence breaks interoperability completely. The SDK computes
500
516
  hek = SHA3-256(ek_seed || ek_vector)
501
517
  ```
502
518
 
503
- Signal's implementation, via libcrux, builds the encapsulation key as
519
+ `libsignal`, via libcrux, builds the encapsulation key as
504
520
  `t̂ ‖ ρ` before hashing — the reverse order.
505
521
 
506
522
  The SDK follows the **normative text of the published ML-KEM Braid
507
- specification**, which states seed-first ordering. Signal's code follows FIPS 203,
523
+ specification**, which states seed-first ordering. `libsignal` follows FIPS 203,
508
524
  which serializes vector-first. The specification and the reference implementation
509
525
  disagree, and the SDK chose the specification.
510
526
 
511
527
  The value feeds the Fujisaki–Okamoto transform, so the consequences cascade:
512
- different header bytes, so Signal's header validation rejects the SDK's output;
528
+ different header bytes, so `libsignal`'s header validation rejects the SDK's output;
513
529
  different ciphertext; different shared secret; different epoch secret; different
514
- authenticator ratchet. **A braid session between this SDK and Signal's
530
+ authenticator ratchet. **A braid session between this SDK and Signal Messenger's
515
531
  implementation cannot complete a single epoch.**
516
532
 
517
533
  Two further consequences a reader should not have to infer:
@@ -521,7 +537,7 @@ Two further consequences a reader should not have to infer:
521
537
  is a permutation of the same material — but a FIPS conformance claim would not
522
538
  hold for this path. Direct (non-braid) mode uses stock ML-KEM-768.
523
539
  - The SDK resolves the same spec-versus-code conflict in the *opposite* direction
524
- elsewhere: for `KDF_AUTH`, it follows Signal's Rust reference rather than the
540
+ elsewhere: for `KDF_AUTH`, it follows the `libsignal` Rust reference rather than the
525
541
  written specification. The two choices are individually defensible and
526
542
  collectively inconsistent about which artifact is authoritative.
527
543
 
@@ -533,17 +549,17 @@ braid session persisted under the former ordering.
533
549
 
534
550
  **Extension.** An opt-in direct mode (`protocol.braid: 'disabled'`) uses stock
535
551
  ML-KEM-768 and adds wire message types `0x80`–`0x82`
536
- (`internal/encoding/proto/pq-ratchet-serialize.ts:38-45`). Signal's parser rejects
552
+ (`internal/encoding/proto/pq-ratchet-serialize.ts:38-45`). `libsignal`'s parser rejects
537
553
  anything above `6`, so these are visible only within the SDK; they occupy a byte
538
- range Signal has not claimed. This mode has no Signal analogue.
554
+ range `libsignal` has not claimed. This mode has no Signal Protocol analogue.
539
555
 
540
556
  **Independent design.** Persisted SPQR state uses a flat message with 20 fields
541
- where Signal uses an 11-variant `oneof` over nested structures. Serialized SPQR
557
+ where `libsignal` uses an 11-variant `oneof` over nested structures. Serialized SPQR
542
558
  state is not portable in either direction.
543
559
 
544
560
  **Deviation.** Skipped-key eviction in the SPQR chain triggers at the cap and
545
- evicts by wall-clock timestamp, where Signal triggers at `max_ooo × 11/10 + 1` and
546
- evicts by message index. Signal's rule is deterministic and index-anchored; the
561
+ evicts by wall-clock timestamp, where `libsignal` triggers at `max_ooo × 11/10 + 1` and
562
+ evicts by message index. `libsignal`'s rule is deterministic and index-anchored; the
547
563
  SDK's introduces a clock dependency into ratchet state.
548
564
 
549
565
  ### 4.3 The Triple Ratchet is faithful
@@ -564,7 +580,7 @@ wire. It is documented in the PR that accompanied this file as cleanup work.
564
580
  ## 5. Sesame
565
581
 
566
582
  Sesame has no reference implementation to compare against — `libsignal` does not
567
- implement it; device and session management lives in the Signal service and its
583
+ implement it; device and session management lives in the Signal Messenger service and its
568
584
  clients. Everything below is measured against the pinned specification text
569
585
  (revision 2) alone.
570
586
 
@@ -689,13 +705,14 @@ internally inconsistent about this.
689
705
  ([`sealed_sender.rs:2055-2075`][ss]); the unseal path reconstructs the envelope
690
706
  with a fixed type instead.
691
707
 
692
- ### 6.3 The delivery token is Signal's, not the SDK's
708
+ ### 6.3 The delivery token follows `libsignal`, not an SDK invention
693
709
 
694
710
  Despite the module name, `deriveAccessKey`
695
711
  (`internal/protocol/sealed-sender/delivery-token.ts:52-91`) is `libsignal`'s
696
712
  `ProfileKey::derive_access_key` — AES-256-GCM over 16 zero bytes with a zero
697
- nonce, truncated to 16 bytes — and it reproduces `libsignal`'s published test
698
- vectors exactly. It is a 16-byte value derived from the recipient's profile key
713
+ nonce, truncated to 16 bytes — and it reproduces the values `libsignal`
714
+ publishes for that derivation. It is a 16-byte value derived from the
715
+ recipient's profile key
699
716
  that proves to the relay that the sender knows that profile key, gating anonymous
700
717
  delivery to contacts. It never enters the sealed-sender wire format; it is
701
718
  presented out of band.
@@ -705,7 +722,7 @@ construction that no code implements. That description is wrong and is corrected
705
722
  in the PR accompanying this file.
706
723
 
707
724
  Certificate signatures use Ed25519 rather than XEdDSA, per §1.2, so SDK
708
- certificates cannot validate against a Signal trust root or vice versa. The
725
+ certificates cannot validate against a Signal Messenger trust root or vice versa. The
709
726
  revocation list is empty where `libsignal` revokes one key ID, which is
710
727
  appropriate for a different trust root but worth noting.
711
728
 
@@ -760,11 +777,11 @@ is incorrect. Flagged for correction.
760
777
  ### 7.3 Groups v2 is an independent design
761
778
 
762
779
  The zero-knowledge primitives underneath are real and faithful (§7.4). The group
763
- system built on them is not Signal's.
780
+ system built on them is not the Signal Private Group System.
764
781
 
765
- What is faithful: role and access-control enum values match Signal's exactly,
782
+ What is faithful: role and access-control enum values match `libsignal`'s exactly,
766
783
  group ID derivation from the master key is correct, the `__signal_group__v2__!`
767
- identifier encoding is Signal's, authentication genuinely uses zkgroup
784
+ identifier encoding follows `libsignal`, authentication genuinely uses zkgroup
768
785
  credentials, and member identifiers and profile keys are encrypted with real
769
786
  `UidCiphertext` and `ProfileKeyCiphertext`.
770
787
 
@@ -772,7 +789,7 @@ What differs, and it is structural:
772
789
 
773
790
  **The client is the state authority.** The SDK's client applies a change,
774
791
  re-encrypts the entire group state, and uploads it
775
- (`internal/groups-v2/manager.ts:1176-1193`). Signal's client submits only a set of
792
+ (`internal/groups-v2/manager.ts:1176-1193`). Signal Messenger's client submits only a set of
776
793
  change actions, each carrying zero-knowledge presentations, and the **server**
777
794
  validates every action and signs the result.
778
795
 
@@ -783,21 +800,21 @@ no zero-knowledge presentations for it to check. Any authenticated member can
783
800
  rewrite roles, membership, and the ban list. Server signatures are returned but
784
801
  never verified on receipt.
785
802
 
786
- This is a materially weaker trust model than Signal's Private Group System, and
803
+ This is a materially weaker trust model than the Signal Private Group System, and
787
804
  anyone deploying group messaging on this SDK needs to know it: group membership
788
805
  and roles are enforced by cooperating clients, not by the server, and not
789
806
  cryptographically against a malicious member. It is a reasonable position for an
790
807
  SDK that ships without a validating server component, and it is not what a reader
791
- of Signal's group documentation would assume.
808
+ of the Signal Private Group System documentation would assume.
792
809
 
793
810
  **Serialization is JSON**, not protobuf, both for group state
794
811
  (`internal/groups-v2/manager.ts:1229-1236`) and for the blob payloads inside the
795
812
  AES-256-GCM-SIV envelope (`internal/groups-v2/encrypted-state.ts:70-81`). Every
796
- encrypted group title and description is undecryptable by Signal even with the
813
+ encrypted group title and description is undecryptable by Signal Messenger even with the
797
814
  correct master key.
798
815
 
799
816
  **Invite links** use `https://join.open-e2ee.dev/#` with a 49-byte raw payload
800
- (`internal/groups-v2/invite-link.ts:36`, `:78-85`), where Signal uses
817
+ (`internal/groups-v2/invite-link.ts:36`, `:78-85`), where `libsignal` uses
801
818
  `https://signal.group/#` with a protobuf. This is labelled accurately in source as
802
819
  the package's own format.
803
820
 
@@ -820,7 +837,7 @@ One deviation: server secret parameters are derived under four SDK-specific labe
820
837
  rather than `libsignal`'s single seeded derivation
821
838
  (`internal/protocol/zk/groups/server-params.ts:43-54`). The same randomness
822
839
  therefore yields different server keys, and credentials are not interchangeable
823
- with Signal's. That follows from the SDK being its own trust root.
840
+ with Signal Messenger's. That follows from the SDK being its own trust root.
824
841
 
825
842
  Credential serialization is also ad hoc and carries no version byte, where
826
843
  `libsignal` uses a leading version byte. That is a forward-compatibility gap
@@ -851,9 +868,9 @@ within this review.
851
868
  are correct and unit tests exist, but the outputs were not diffed against
852
869
  `libsignal`'s. A subtle error here would silently corrupt every `UidStruct`.
853
870
  - **SPQR state-machine transition equivalence.** State names, message types, and
854
- chunk counts match Signal's; the eleven-state transition table was not diffed
871
+ chunk counts match `libsignal`'s; the eleven-state transition table was not diffed
855
872
  transition by transition.
856
- - **Whether the SPQR decoder enforces a bound on stored points.** Signal caps
873
+ - **Whether the SPQR decoder enforces a bound on stored points.** `libsignal` caps
857
874
  stored points per polynomial; no equivalent bound was located in the SDK's
858
875
  decoder.
859
876
  - **Whether SPQR state mutations are rolled back when message authentication
@@ -107,7 +107,9 @@ This is the target DX the package is moving toward. It is shown here so app
107
107
  developers can understand the intended mental model while the current stable API
108
108
  still uses `storage`, `remoteObjectStore`, hooks, and transition-only media helpers.
109
109
 
110
+ <!-- mock-snippet:skip target-message-api-not-yet-shipped -->
110
111
  ```ts
112
+ // Real protocol and cryptography; simulated in-memory infrastructure.
111
113
  import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
112
114
  import { createInMemoryDeviceStorage } from "@open-e2ee/signal-protocol-sdk/device/storage/memory";
113
115
  import { mockRelay } from "@open-e2ee/signal-protocol-sdk/remote/relay/mock";
@@ -180,8 +182,8 @@ const signal = await createSignalProtocolClient({
180
182
  ```
181
183
 
182
184
  Attachments use the same message API. On Expo, pass the picker URI; the Signal
183
- client copies or persists the bytes through `deviceStorage.files` before upload
184
- so retry can continue after restart:
185
+ Protocol client copies or persists the bytes through `deviceStorage.files`
186
+ before upload so retry can continue after restart:
185
187
 
186
188
  ```ts
187
189
  await signal.messages.send({
@@ -226,7 +228,9 @@ Use mock adapters for local examples and development:
226
228
  the demo sends while Bob is offline, inspects the relay-visible ciphertext, and
227
229
  then starts Bob's subscription to show the decrypted plaintext entering the app.
228
230
 
231
+ <!-- mock-snippet:run getting-started-stable-local-clients expect="bob decrypted: alice: hello" -->
229
232
  ```ts
233
+ // Real protocol and cryptography; simulated in-memory infrastructure.
230
234
  import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
231
235
  import { mockStore } from "@open-e2ee/signal-protocol-sdk/local/store/mock";
232
236
  import { mockRelay } from "@open-e2ee/signal-protocol-sdk/remote/relay/mock";
@@ -315,11 +319,11 @@ import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
315
319
  import { expoStore } from "@open-e2ee/signal-protocol-sdk/local/store/expo";
316
320
  import {
317
321
  convexRelay,
318
- type ConvexSignalRelayApi,
322
+ type ConvexSignalProtocolRelayApi,
319
323
  } from "@open-e2ee/signal-protocol-sdk/remote/relay/convex";
320
324
  import { api } from "../convex/_generated/api";
321
325
 
322
- const signalApi = api.signal satisfies ConvexSignalRelayApi;
326
+ const signalApi = api.signal satisfies ConvexSignalProtocolRelayApi;
323
327
 
324
328
  // The relay handles server-side public keys, devices, and encrypted envelopes.
325
329
  const relay = convexRelay({
@@ -522,8 +526,8 @@ partial-byte store. Native background download code should implement the same
522
526
  `MediaAttachmentTransfer` interface.
523
527
 
524
528
  For background-safe uploads, use the durable client operation. The current API
525
- persists bounded recovery metadata through the existing Signal storage adapter;
526
- the target message-first API moves that responsibility behind
529
+ persists bounded recovery metadata through the existing Signal Protocol storage
530
+ adapter; the target message-first API moves that responsibility behind
527
531
  `deviceStorage.messages`. The operation tries the upload when it is due and
528
532
  returns either a completed pointer or a pending job id for later recovery:
529
533
 
@@ -560,8 +564,8 @@ await signal.media.processPending({
560
564
  ```
561
565
 
562
566
  On receive, ask the media planner what work this device should do. Your app
563
- supplies the IDs it has already processed or cached; the Signal package returns
564
- the safe next step without taking ownership of your app database:
567
+ supplies the IDs it has already processed or cached; the Signal Protocol package
568
+ returns the safe next step without taking ownership of your app database:
565
569
 
566
570
  ```ts
567
571
  const mediaWork = media.planMediaAttachmentProcessing({
@@ -12,30 +12,30 @@ policy.
12
12
 
13
13
  ```text
14
14
  SignalProtocolClient
15
- ├── ISignalLocalStore device-local protocol state
16
- ├── ISignalRelayServer authenticated device, prekey, and envelope service
17
- ├── SignalRemoteObjectStore brokered encrypted-object operations (optional)
15
+ ├── ISignalProtocolLocalStore device-local protocol state
16
+ ├── ISignalProtocolRelayServer authenticated device, prekey, and envelope service
17
+ ├── SignalProtocolRemoteObjectStore brokered encrypted-object operations (optional)
18
18
  ├── media callbacks application-owned attachment bytes and caches
19
19
  └── lifecycle hooks application reactions and observability
20
20
 
21
21
  Local-store bootstrap
22
- └── ISignalLocalSecretVault small platform-managed bootstrap secrets
22
+ └── ISignalProtocolLocalSecretVault small platform-managed bootstrap secrets
23
23
  ```
24
24
 
25
25
  The interfaces are public contracts, but they do not make an implementation
26
26
  secure by themselves. Each adapter must preserve the ownership and atomicity
27
27
  requirements described below.
28
28
 
29
- ## `ISignalLocalStore`
29
+ ## `ISignalProtocolLocalStore`
30
30
 
31
- `ISignalLocalStore` persists the current device's identities, prekeys, sessions,
31
+ `ISignalProtocolLocalStore` persists the current device's identities, prekeys, sessions,
32
32
  sender keys, contact trust, retry records, and operational metadata.
33
33
 
34
34
  ```ts
35
- import type { ISignalLocalStore } from "@open-e2ee/signal-protocol-sdk/local/store";
35
+ import type { ISignalProtocolLocalStore } from "@open-e2ee/signal-protocol-sdk/local/store";
36
36
  import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
37
37
 
38
- const storage: ISignalLocalStore = appProtocolStore;
38
+ const storage: ISignalProtocolLocalStore = appProtocolStore;
39
39
 
40
40
  const client = await createSignalProtocolClient({
41
41
  identity: { userId },
@@ -56,16 +56,16 @@ A production implementation must:
56
56
  Available adapters and their status are documented in the
57
57
  [local-store guide](../local/store/README.md).
58
58
 
59
- ## `ISignalLocalSecretVault`
59
+ ## `ISignalProtocolLocalSecretVault`
60
60
 
61
- `ISignalLocalSecretVault` is a deliberately small interface for bootstrap
61
+ `ISignalProtocolLocalSecretVault` is a deliberately small interface for bootstrap
62
62
  secrets that must live outside the main local store, such as a database
63
63
  encryption key.
64
64
 
65
65
  ```ts
66
- import type { ISignalLocalSecretVault } from "@open-e2ee/signal-protocol-sdk";
66
+ import type { ISignalProtocolLocalSecretVault } from "@open-e2ee/signal-protocol-sdk";
67
67
 
68
- const vault: ISignalLocalSecretVault = {
68
+ const vault: ISignalProtocolLocalSecretVault = {
69
69
  getSecret: (name) => platformSecrets.getBytes(name),
70
70
  setSecret: (name, value) => platformSecrets.setBytes(name, value),
71
71
  deleteSecret: (name) => platformSecrets.delete(name),
@@ -77,23 +77,23 @@ device migration, uninstall persistence, and deletion behavior depend on the
77
77
  selected platform service and host configuration. See the
78
78
  [secret-vault guide](../local/vault/README.md).
79
79
 
80
- ## `ISignalRelayServer`
80
+ ## `ISignalProtocolRelayServer`
81
81
 
82
- `ISignalRelayServer` represents the authenticated application backend used for
82
+ `ISignalProtocolRelayServer` represents the authenticated application backend used for
83
83
  device registration, account identity state, public prekeys, encrypted-envelope
84
84
  delivery, provisioning, key rotation, and encrypted group coordination.
85
85
 
86
86
  ```ts
87
- import type { ISignalRelayServer } from "@open-e2ee/signal-protocol-sdk/remote/relay";
87
+ import type { ISignalProtocolRelayServer } from "@open-e2ee/signal-protocol-sdk/remote/relay";
88
88
  import {
89
89
  convexRelay,
90
- type ConvexSignalRelayApi,
90
+ type ConvexSignalProtocolRelayApi,
91
91
  } from "@open-e2ee/signal-protocol-sdk/remote/relay/convex";
92
92
  import { api } from "../convex/_generated/api";
93
93
 
94
- const signalApi = api.signal satisfies ConvexSignalRelayApi;
94
+ const signalApi = api.signal satisfies ConvexSignalProtocolRelayApi;
95
95
 
96
- const relay: ISignalRelayServer = convexRelay({
96
+ const relay: ISignalProtocolRelayServer = convexRelay({
97
97
  convex,
98
98
  api: signalApi,
99
99
  currentUserId: userId,
@@ -110,17 +110,17 @@ The relay stores public protocol material, ciphertext, and required routing
110
110
  metadata. It must not require device private keys or decrypted message content.
111
111
  See the [relay guide](../remote/relay/README.md).
112
112
 
113
- ## `SignalRemoteObjectStore`
113
+ ## `SignalProtocolRemoteObjectStore`
114
114
 
115
- `SignalRemoteObjectStore` supplies short-lived upload and download operations
115
+ `SignalProtocolRemoteObjectStore` supplies short-lived upload and download operations
116
116
  for already encrypted objects. It is provider-neutral and optional.
117
117
 
118
118
  ```ts
119
119
  import type {
120
- SignalRemoteObjectStore,
120
+ SignalProtocolRemoteObjectStore,
121
121
  } from "@open-e2ee/signal-protocol-sdk/remote/object-store";
122
122
 
123
- const remoteObjectStore: SignalRemoteObjectStore = {
123
+ const remoteObjectStore: SignalProtocolRemoteObjectStore = {
124
124
  createUpload: (request) => appObjectBroker.createUpload(request),
125
125
  createDownload: (request) => appObjectBroker.createDownload(request),
126
126
  completeUpload: (request) => appObjectBroker.completeUpload(request),