@ping-app/ping-openmls-sdk 0.10.1 → 0.10.2
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/dist/index.cjs +28 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -3
- package/dist/index.d.ts +19 -3
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -1
- package/dist/notification-preview.d.cts +1 -1
- package/dist/notification-preview.d.ts +1 -1
- package/dist/storage/indexeddb.d.cts +1 -1
- package/dist/storage/indexeddb.d.ts +1 -1
- package/dist/transport/websocket.d.cts +1 -1
- package/dist/transport/websocket.d.ts +1 -1
- package/dist/{types-B1GFwNXa.d.cts → types-gAmJFSC-.d.cts} +11 -1
- package/dist/{types-B1GFwNXa.d.ts → types-gAmJFSC-.d.ts} +11 -1
- package/dist/worker.cjs +7 -0
- package/dist/worker.cjs.map +1 -1
- package/dist/worker.js +7 -0
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
- package/wasm/package.json +1 -1
- package/wasm/ping_wasm.d.ts +18 -2
- package/wasm/ping_wasm.js +66 -22
- package/wasm/ping_wasm_bg.wasm +0 -0
- package/wasm/ping_wasm_bg.wasm.d.ts +3 -2
package/dist/index.cjs
CHANGED
|
@@ -2389,6 +2389,34 @@ var MessagingClient = class _MessagingClient {
|
|
|
2389
2389
|
length
|
|
2390
2390
|
});
|
|
2391
2391
|
}
|
|
2392
|
+
/**
|
|
2393
|
+
* {@link exportConversationSecret} together with the MLS epoch the secret was
|
|
2394
|
+
* exported at, from one read under one lock inside the core: the pair can
|
|
2395
|
+
* never disagree across a Commit.
|
|
2396
|
+
*
|
|
2397
|
+
* A host that files a key under an epoch number (a call's media key ring)
|
|
2398
|
+
* takes BOTH from this call. A conversation handle's `epoch` is this thread's
|
|
2399
|
+
* copy and any other read is a second request, so either may be a Commit away
|
|
2400
|
+
* from the secret.
|
|
2401
|
+
*
|
|
2402
|
+
* Same derivation, same arguments and the same refusals as
|
|
2403
|
+
* {@link exportConversationSecret}: at one epoch both answer the same bytes.
|
|
2404
|
+
* `secret` is a secret: never log it, persist it only encrypted, and call
|
|
2405
|
+
* `secret.fill(0)` after use. `epoch` is a plain number and may be logged.
|
|
2406
|
+
*/
|
|
2407
|
+
async exportConversationSecretWithEpoch(conv, label, context, length) {
|
|
2408
|
+
if (length <= 0 || length > 1024) {
|
|
2409
|
+
throw new Error("exportConversationSecretWithEpoch: length must be 1..=1024");
|
|
2410
|
+
}
|
|
2411
|
+
return await this.call({
|
|
2412
|
+
kind: "exportConversationSecretWithEpoch",
|
|
2413
|
+
id: this.nextId++,
|
|
2414
|
+
conv,
|
|
2415
|
+
label,
|
|
2416
|
+
context,
|
|
2417
|
+
length
|
|
2418
|
+
});
|
|
2419
|
+
}
|
|
2392
2420
|
/**
|
|
2393
2421
|
* Subscribe to decrypted application messages, one call per message. A
|
|
2394
2422
|
* batch or page result (the sequenced paths) is fanned out here per
|