@open-e2ee/signal-protocol-sdk 8.0.0 → 8.1.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.
- package/ADAPTERS.md +2 -2
- package/CHANGELOG.md +35 -0
- package/README.md +4 -4
- package/SECURITY.md +2 -2
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +2 -1
- package/dist/client/client.js.map +1 -1
- package/dist/client/hosted-transport.d.ts +9 -0
- package/dist/client/hosted-transport.d.ts.map +1 -1
- package/dist/client/hosted-transport.js +49 -13
- package/dist/client/hosted-transport.js.map +1 -1
- package/dist/internal/protocol/zk/credentials/attributes.d.ts.map +1 -1
- package/dist/internal/protocol/zk/credentials/attributes.js +2 -1
- package/dist/internal/protocol/zk/credentials/attributes.js.map +1 -1
- package/dist/internal/protocol/zk/credentials/credentials.d.ts.map +1 -1
- package/dist/internal/protocol/zk/credentials/credentials.js +8 -6
- package/dist/internal/protocol/zk/credentials/credentials.js.map +1 -1
- package/dist/internal/protocol/zk/credentials/presentation.d.ts.map +1 -1
- package/dist/internal/protocol/zk/credentials/presentation.js +19 -13
- package/dist/internal/protocol/zk/credentials/presentation.js.map +1 -1
- package/dist/internal/protocol/zk/groups/lizard.d.ts +8 -0
- package/dist/internal/protocol/zk/groups/lizard.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/lizard.js +18 -5
- package/dist/internal/protocol/zk/groups/lizard.js.map +1 -1
- package/dist/internal/protocol/zk/groups/profile-key-commitment.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/profile-key-commitment.js +7 -6
- package/dist/internal/protocol/zk/groups/profile-key-commitment.js.map +1 -1
- package/dist/internal/protocol/zk/groups/profile-key-encryption.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/profile-key-encryption.js +3 -2
- package/dist/internal/protocol/zk/groups/profile-key-encryption.js.map +1 -1
- package/dist/internal/protocol/zk/groups/uid-encryption.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/uid-encryption.js +3 -2
- package/dist/internal/protocol/zk/groups/uid-encryption.js.map +1 -1
- package/dist/internal/protocol/zk/proofs/point-multiplication.d.ts +53 -0
- package/dist/internal/protocol/zk/proofs/point-multiplication.d.ts.map +1 -0
- package/dist/internal/protocol/zk/proofs/point-multiplication.js +164 -0
- package/dist/internal/protocol/zk/proofs/point-multiplication.js.map +1 -0
- package/dist/internal/protocol/zk/proofs/sho.d.ts +1 -0
- package/dist/internal/protocol/zk/proofs/sho.d.ts.map +1 -1
- package/dist/internal/protocol/zk/proofs/sho.js.map +1 -1
- package/dist/internal/protocol/zk/proofs/statement.d.ts.map +1 -1
- package/dist/internal/protocol/zk/proofs/statement.js +11 -11
- package/dist/internal/protocol/zk/proofs/statement.js.map +1 -1
- package/dist/local/store/index.d.ts +2 -2
- package/dist/local/store/index.js +2 -2
- package/dist/local/store/sqlite/web/driver.d.ts.map +1 -1
- package/dist/local/store/sqlite/web/driver.js +3 -1
- package/dist/local/store/sqlite/web/driver.js.map +1 -1
- package/dist/local/store/sqlite/web/protocol.d.ts +1 -1
- package/dist/local/store/sqlite/web/protocol.d.ts.map +1 -1
- package/dist/local/store/sqlite/web/worker.d.ts +7 -4
- package/dist/local/store/sqlite/web/worker.d.ts.map +1 -1
- package/dist/local/store/sqlite/web/worker.js +48 -18
- package/dist/local/store/sqlite/web/worker.js.map +1 -1
- package/dist/local/store/web-sqlite/adapter.d.ts +3 -0
- package/dist/local/store/web-sqlite/adapter.d.ts.map +1 -1
- package/dist/local/store/web-sqlite/adapter.js +3 -0
- package/dist/local/store/web-sqlite/adapter.js.map +1 -1
- package/docs/ASSURANCE.md +13 -12
- package/docs/ERROR_HANDLING.md +1 -1
- package/docs/PACKAGE_SURFACE.md +3 -1
- package/examples/browser/index.html +1 -1
- package/local/store/README.md +41 -21
- package/local/store/web/README.md +5 -0
- package/local/store/web-sqlite/README.md +8 -0
- package/package.json +1 -1
package/local/store/README.md
CHANGED
|
@@ -24,29 +24,31 @@ without coupling the client to a database or platform.
|
|
|
24
24
|
|
|
25
25
|
### Web
|
|
26
26
|
|
|
27
|
-
- `IndexedDbSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/web`
|
|
28
|
-
|
|
29
|
-
Use this for browser applications. It implements the full core store
|
|
30
|
-
contract, including SESAME records, sender-key state, retry message records,
|
|
31
|
-
and recovery helpers. It graduated from experimental by completing every
|
|
32
|
-
gate on the checklist below. Deployment still requires the origin-security
|
|
33
|
-
review described in the [web adapter guide](./web/README.md).
|
|
34
|
-
|
|
35
27
|
- `webSqliteStore` and `WebSqliteSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/web-sqlite`
|
|
36
28
|
- `resetWebSqliteStore` and `createPreKeyMaintenanceStore` from the same entry
|
|
37
29
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
the
|
|
42
|
-
|
|
43
|
-
`
|
|
44
|
-
|
|
45
|
-
|
|
30
|
+
Use this for browser applications where the origin private file system
|
|
31
|
+
works. It keeps the full core store state in an SDK-owned SQLite database in
|
|
32
|
+
the origin private file system. SQLite3 Multiple Ciphers encrypts the whole
|
|
33
|
+
file in a Wasm worker, and the database key lives in a secret vault, by
|
|
34
|
+
default IndexedDB in the same origin. The page's Content Security Policy must
|
|
35
|
+
allow `'wasm-unsafe-eval'`. A context without the origin private file system
|
|
36
|
+
gets `OPFS_UNAVAILABLE`. The [web SQLite store guide](./web-sqlite/README.md)
|
|
37
|
+
covers the policy, the tabs, and the security boundary. It graduated from
|
|
38
|
+
experimental by completing every gate on the checklist below.
|
|
46
39
|
|
|
47
40
|
A Tauri 2 app uses this store in its webview. See the
|
|
48
41
|
[Tauri section](./web-sqlite/README.md#tauri).
|
|
49
42
|
|
|
43
|
+
- `IndexedDbSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/web`
|
|
44
|
+
|
|
45
|
+
Use this where the origin private file system is not available, and
|
|
46
|
+
`webSqliteStore` fails with `OPFS_UNAVAILABLE`. It implements the full core
|
|
47
|
+
store contract, including SESAME records, sender-key state, retry message
|
|
48
|
+
records, and recovery helpers. It graduated from experimental by completing
|
|
49
|
+
every gate on the checklist below. Deployment still requires the
|
|
50
|
+
origin-security review described in the [web adapter guide](./web/README.md).
|
|
51
|
+
|
|
50
52
|
### Bare React Native
|
|
51
53
|
|
|
52
54
|
- `reactNativeStore` and `ReactNativeSignalProtocolStore` from `@open-e2ee/signal-protocol-sdk/local/store/react-native`
|
|
@@ -119,7 +121,7 @@ environment an adapter must honor its promises in, not the subject of a test.
|
|
|
119
121
|
source repository, and `npm run soak:web-store` runs longer sessions
|
|
120
122
|
on demand.
|
|
121
123
|
|
|
122
|
-
`WebSqliteSignalProtocolStore` (
|
|
124
|
+
`WebSqliteSignalProtocolStore` (graduated, and the gates keep running):
|
|
123
125
|
|
|
124
126
|
- [x] Storage contract suites pass in real Chromium, Firefox, and WebKit.
|
|
125
127
|
The suites are the same modules the jest gate runs. They run against
|
|
@@ -154,9 +156,27 @@ environment an adapter must honor its promises in, not the subject of a test.
|
|
|
154
156
|
no row of the write, no pinned identity, and the one-time prekey stays.
|
|
155
157
|
The store stays open. After the clamp is removed, the same commit
|
|
156
158
|
succeeds, new writes land, and `PRAGMA integrity_check` returns `ok`.
|
|
159
|
+
A first open under a 1 MB and a 4 MB quota rejects with the same typed
|
|
160
|
+
error, and it writes no database key and no database file. After the
|
|
161
|
+
clamp is removed, the open succeeds. A store with two pool files opens,
|
|
162
|
+
reads, and writes under a 3 MB quota that has no room for a new pool.
|
|
157
163
|
Runs in Chromium on the schedule above. The quota clamp is a DevTools
|
|
158
164
|
protocol call, so Firefox and WebKit do not run it.
|
|
159
|
-
- [
|
|
165
|
+
- [x] Soak evidence: a long run holds latency, memory, and file size flat.
|
|
166
|
+
A soak gate drives the store in real Chromium tabs in three phases:
|
|
167
|
+
150 open/write/read/close cycles in one tab, one session of 2,000
|
|
168
|
+
churn operations over 250 sessions, and 100 writes that two tabs make
|
|
169
|
+
in turn, so that the file moves to the other tab at each write. Each
|
|
170
|
+
write is read back, and `PRAGMA integrity_check` returns `ok` after
|
|
171
|
+
each phase and after each open. A closed store leaves no worker in the
|
|
172
|
+
tab and no lock of the store in the origin. The gate fails if the
|
|
173
|
+
late-run median of latency, of the page heap, or of the worker heap
|
|
174
|
+
grows beyond a small tolerance over the early-run median, if the Wasm
|
|
175
|
+
memory of the worker grows after the first third of the churn, or if
|
|
176
|
+
the database file grows by more than 10% and 64 KiB over the churn.
|
|
177
|
+
Runs in Chromium on each change to the main branch and on each pull
|
|
178
|
+
request that is ready for review. `npm run soak:web-sqlite` also runs
|
|
179
|
+
it in Firefox and WebKit on demand, without the memory checks.
|
|
160
180
|
|
|
161
181
|
`KeyValueSignalProtocolStore` (graduated, and the gates keep running):
|
|
162
182
|
|
|
@@ -305,9 +325,9 @@ The host application must use idempotent writes keyed by message ID.
|
|
|
305
325
|
- `@open-e2ee/signal-protocol-sdk/local/store/react-native` is the same SQLite
|
|
306
326
|
store for bare React Native, on op-sqlite and the react-native-keychain vault.
|
|
307
327
|
- An adapter carries the experimental label until every item on its
|
|
308
|
-
graduation checklist is a named, continuously running CI gate. The
|
|
309
|
-
web adapter and the key-value adapter completed
|
|
310
|
-
|
|
328
|
+
graduation checklist is a named, continuously running CI gate. The web
|
|
329
|
+
SQLite store, the IndexedDB web adapter, and the key-value adapter completed
|
|
330
|
+
theirs.
|
|
311
331
|
- Storage adapters should expose the real package contract instead of app-specific wrappers.
|
|
312
332
|
|
|
313
333
|
## Related Docs
|
|
@@ -66,6 +66,11 @@ and [MDN Content Security Policy guide](https://developer.mozilla.org/docs/Web/H
|
|
|
66
66
|
|
|
67
67
|
## Operational status
|
|
68
68
|
|
|
69
|
+
In a browser where the origin private file system works, use the
|
|
70
|
+
[web SQLite store](../web-sqlite/README.md). Use this adapter where the origin
|
|
71
|
+
private file system is not available, and `webSqliteStore` fails with
|
|
72
|
+
`OPFS_UNAVAILABLE`.
|
|
73
|
+
|
|
69
74
|
The adapter covers the core store contract, including atomic security commits,
|
|
70
75
|
SESAME state, sender-key state, and retry records. Every gate on its
|
|
71
76
|
graduation checklist in the parent [storage guide](../README.md) runs
|
|
@@ -84,6 +84,14 @@ transaction. Each tab reads the writes of the other tabs.
|
|
|
84
84
|
the files, for example a tab that is closing. The file is unchanged. Retry
|
|
85
85
|
the open later.
|
|
86
86
|
|
|
87
|
+
## Full storage
|
|
88
|
+
|
|
89
|
+
When the origin storage quota is full, the open rejects with
|
|
90
|
+
`StorageQuotaExceededError` (`STORAGE_QUOTA_EXCEEDED`). An open that fails
|
|
91
|
+
this way on a new store writes no key and no database file. A write on an open
|
|
92
|
+
store rejects with the same error. SQLite rolls the write back, and the store
|
|
93
|
+
stays open. Free space, then open again or retry the write.
|
|
94
|
+
|
|
87
95
|
## Content Security Policy
|
|
88
96
|
|
|
89
97
|
The engine compiles WebAssembly in its worker. A Content Security Policy
|
package/package.json
CHANGED