p2party 0.14.2 → 0.14.3
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/README.md +10 -10
- package/docs/references.md +1 -1
- package/lib/handlers/reconcile.d.ts +24 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +1 -1
- package/lib/index.min.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/session.js +1 -1
- package/lib/session.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ Apache-2.0 · [LICENSE.md](LICENSE.md)
|
|
|
46
46
|
`window`, or `localStorage`.
|
|
47
47
|
|
|
48
48
|
Immediate delivery over the existing signaling rendezvous is the shipped
|
|
49
|
-
default. Scheduled timing cover is also wired
|
|
49
|
+
default. Scheduled timing cover is also wired: a room policy may
|
|
50
50
|
pin a cadence, lane count, and frames per cell, and every edge in the room then
|
|
51
51
|
emits fixed-size cells on that schedule whether or not there is data to send.
|
|
52
52
|
Sparse post-quantum healing (the OFFER/ADVANCE/ACK epoch exchange) is likewise
|
|
@@ -633,8 +633,8 @@ script in and `window.p2party` is there — no npm, no bundler, no build:
|
|
|
633
633
|
<title>p2party in one file</title>
|
|
634
634
|
|
|
635
635
|
<script
|
|
636
|
-
src="https://cdn.p2party.com/@0.14.
|
|
637
|
-
integrity="sha384-
|
|
636
|
+
src="https://cdn.p2party.com/@0.14.3/p2party.min.js"
|
|
637
|
+
integrity="sha384-dwBCnd3gj0k9HpDetSDOtYhv/CkADQs5h4mz+dI7hdYY1wWQpgvtiOGF4GUrnbqR"
|
|
638
638
|
crossorigin="anonymous"
|
|
639
639
|
></script>
|
|
640
640
|
|
|
@@ -665,9 +665,9 @@ connect directly to each other.
|
|
|
665
665
|
The three published objects:
|
|
666
666
|
|
|
667
667
|
```text
|
|
668
|
-
https://cdn.p2party.com/@0.14.
|
|
669
|
-
https://cdn.p2party.com/@0.14.
|
|
670
|
-
https://cdn.p2party.com/@0.14.
|
|
668
|
+
https://cdn.p2party.com/@0.14.3/p2party.min.js UMD bundle -> window.p2party
|
|
669
|
+
https://cdn.p2party.com/@0.14.3/db.worker.js IndexedDB/OPFS worker
|
|
670
|
+
https://cdn.p2party.com/@0.14.3/libcrypto.wasm the cryptographic module
|
|
671
671
|
```
|
|
672
672
|
|
|
673
673
|
The `integrity` value above is this release's bundle, and the release build
|
|
@@ -688,7 +688,7 @@ same release bytes before calling `connect()`:
|
|
|
688
688
|
import p2party from "p2party";
|
|
689
689
|
|
|
690
690
|
p2party.setWasmSourceUrl(
|
|
691
|
-
new URL("/vendor/p2party-0.14.
|
|
691
|
+
new URL("/vendor/p2party-0.14.3/libcrypto.wasm", window.location.href),
|
|
692
692
|
);
|
|
693
693
|
```
|
|
694
694
|
|
|
@@ -701,8 +701,8 @@ object. The path carries the version, so a URL always names exactly one build
|
|
|
701
701
|
and is safe to cache forever:
|
|
702
702
|
|
|
703
703
|
```sh
|
|
704
|
-
curl -O https://cdn.p2party.com/@0.14.
|
|
705
|
-
curl -O https://cdn.p2party.com/@0.14.
|
|
704
|
+
curl -O https://cdn.p2party.com/@0.14.3/libcrypto.wasm
|
|
705
|
+
curl -O https://cdn.p2party.com/@0.14.3/libcrypto.provenance.json
|
|
706
706
|
```
|
|
707
707
|
|
|
708
708
|
Check what you downloaded before you serve it. The SHA-256 and the SRI value
|
|
@@ -713,7 +713,7 @@ shasum -a 256 libcrypto.wasm
|
|
|
713
713
|
openssl dgst -sha384 -binary libcrypto.wasm | openssl base64 -A
|
|
714
714
|
```
|
|
715
715
|
|
|
716
|
-
For 0.14.
|
|
716
|
+
For 0.14.3 those are
|
|
717
717
|
`7eea31157e69ac61f3a512b624d5c210296302fd289fc2b65c63ecc31a056267` and
|
|
718
718
|
`sha384-pBMyUqQ3KBztxgeJMgDFZeohfj9QlAFNwt4/gRlqT0vlZ2kbkKxv+q5DwbZOBuUP`.
|
|
719
719
|
They are the same bytes npm ships — the release workflow uploads the CDN object
|
package/docs/references.md
CHANGED
|
@@ -152,6 +152,6 @@ third-party security audit. Cite the implementation:
|
|
|
152
152
|
@software{p2party,
|
|
153
153
|
title = {p2party: protocol-v4 end-to-end encryption over a WebRTC room mesh},
|
|
154
154
|
url = {https://github.com/p2party/p2party-js},
|
|
155
|
-
note = {Version 0.14.
|
|
155
|
+
note = {Version 0.14.3}
|
|
156
156
|
}
|
|
157
157
|
```
|
|
@@ -12,5 +12,29 @@ export interface PeerTransferOutcome {
|
|
|
12
12
|
/** Accurate, defensive per-peer delivery state for UI/diagnostics consumers. */
|
|
13
13
|
export declare const getPeerTransferOutcome: (roomId: string, peerId: string, transferId: string) => PeerTransferOutcome;
|
|
14
14
|
export declare const isTransferComplete: (roomId: string, peerId: string, transferId: string) => boolean;
|
|
15
|
+
export interface TransferAck {
|
|
16
|
+
readonly peerId: string;
|
|
17
|
+
/**
|
|
18
|
+
* Distinct chunks this peer has receipted so far, counting decoys: a receipt
|
|
19
|
+
* is emitted per inbound frame, and the padding is what makes every frame
|
|
20
|
+
* indistinguishable, so excluding it would report a fraction of a denominator
|
|
21
|
+
* that includes it.
|
|
22
|
+
*/
|
|
23
|
+
readonly ackedChunks: number;
|
|
24
|
+
readonly complete: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Live outbound progress for one logical send, per peer.
|
|
28
|
+
*
|
|
29
|
+
* The sender already knows this -- every receipt lands in the have-set above --
|
|
30
|
+
* but nothing outside this module could read it, so a UI could say "sending"
|
|
31
|
+
* and then nothing at all until the transfer settled. On a large file that is
|
|
32
|
+
* a progress bar's worth of silence.
|
|
33
|
+
*
|
|
34
|
+
* Derived from the same state selective retransmit uses, so it cannot drift
|
|
35
|
+
* from what the sender actually believes was delivered. Read-only and
|
|
36
|
+
* defensively copied; polling it never affects the transfer.
|
|
37
|
+
*/
|
|
38
|
+
export declare const getTransferAcks: (roomId: string, transferId: string) => TransferAck[];
|
|
15
39
|
export declare const clearTransfer: (roomId: string, peerId: string, transferId: string) => void;
|
|
16
40
|
export declare const waitForCompletion: (roomId: string, peerId: string, transferId: string, timeoutMs: number, signal?: AbortSignal) => Promise<boolean>;
|
package/lib/index.d.ts
CHANGED
|
@@ -208,6 +208,7 @@ export declare const p2party: {
|
|
|
208
208
|
chunksReceivedReal?: number;
|
|
209
209
|
retransmits?: number;
|
|
210
210
|
}>;
|
|
211
|
+
getTransferAcks: (roomId: string, transferId: string) => import(".").TransferAck[];
|
|
211
212
|
getSendChunksCount: (transferId: string) => Promise<number>;
|
|
212
213
|
cancelMessage: (roomId: string, channelLabel: string, merkleRoot?: string | Uint8Array, hash?: string | Uint8Array, transferId?: string) => Promise<void>;
|
|
213
214
|
createTransferId: () => string;
|
|
@@ -351,6 +352,7 @@ export type { State, Room, Peer, Channel, Message, RoomData, MimeType, FileExten
|
|
|
351
352
|
export { createSession, restoreSession, generateSessionIdentity, setWasmSourceUrl, MessageDeliveryError, joinRoom, waitForRoom, waitForPeers, onMessage, setDebugLogging, };
|
|
352
353
|
export { DEFAULT_ROOM_POLICY_V1, canonicalizeRoomPolicyV1, decodeRoomPolicyV1, encodeRoomPolicyV1, hashRoomPolicyV1, roomPoliciesEqualV1, };
|
|
353
354
|
export { MIN_COVER_CADENCE_MS, MAX_COVER_CADENCE_MS, MAX_COVER_LANES, MAX_COVER_FRAMES_PER_CELL, MIN_COVER_SLOT_MS, validateRoomPolicyV1, WIRE_CHUNK_FRAME_LEN, };
|
|
355
|
+
export type { TransferAck } from "./handlers/reconcile";
|
|
354
356
|
export type { RoomAuthMode, RoomCoverMode, RoomPqMode, RoomRendezvousMode, } from "./roomPolicy";
|
|
355
357
|
export type { CreateSessionOptions, EncryptedSessionMessage, GenerateSessionIdentityOptions, GeneratedSessionIdentity, HandshakeTransport, LocalSessionIdentity, P2PartySession, SessionChannelBinding, SessionCryptoOptions, } from "./session";
|
|
356
358
|
export default p2party;
|