@abraca/dabra 1.0.4 → 1.0.5
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/abracadabra-provider.cjs +561 -36
- package/dist/abracadabra-provider.cjs.map +1 -1
- package/dist/abracadabra-provider.esm.js +558 -37
- package/dist/abracadabra-provider.esm.js.map +1 -1
- package/dist/index.d.ts +163 -2
- package/package.json +1 -1
- package/src/AbracadabraProvider.ts +11 -8
- package/src/index.ts +1 -0
- package/src/sync/BroadcastChannelSync.ts +235 -0
- package/src/webrtc/AbracadabraWebRTC.ts +68 -1
- package/src/webrtc/DataChannelRouter.ts +73 -5
- package/src/webrtc/E2EEChannel.ts +195 -0
- package/src/webrtc/ManualSignaling.ts +197 -0
- package/src/webrtc/YjsDataChannel.ts +37 -30
- package/src/webrtc/index.ts +5 -1
- package/src/webrtc/types.ts +18 -0
package/src/webrtc/types.ts
CHANGED
|
@@ -98,6 +98,10 @@ export const CHANNEL_NAMES = {
|
|
|
98
98
|
CUSTOM: "custom",
|
|
99
99
|
} as const;
|
|
100
100
|
|
|
101
|
+
// ── E2EE ────────────────────────────────────────────────────────────────────
|
|
102
|
+
|
|
103
|
+
export type { E2EEIdentity } from "./E2EEChannel.ts";
|
|
104
|
+
|
|
101
105
|
// ── Configuration ───────────────────────────────────────────────────────────
|
|
102
106
|
|
|
103
107
|
export interface AbracadabraWebRTCConfiguration {
|
|
@@ -107,6 +111,13 @@ export interface AbracadabraWebRTCConfiguration {
|
|
|
107
111
|
/** Server base URL (http/https). Signaling URL derived automatically. */
|
|
108
112
|
url: string;
|
|
109
113
|
|
|
114
|
+
/**
|
|
115
|
+
* Override the signaling WebSocket URL. When set, signaling connects to
|
|
116
|
+
* this server instead of deriving from `url`. Useful for local spaces that
|
|
117
|
+
* piggyback a remote server's signaling endpoint.
|
|
118
|
+
*/
|
|
119
|
+
signalingUrl?: string;
|
|
120
|
+
|
|
110
121
|
/** JWT token or async token factory. */
|
|
111
122
|
token: string | (() => string) | (() => Promise<string>);
|
|
112
123
|
|
|
@@ -142,6 +153,13 @@ export interface AbracadabraWebRTCConfiguration {
|
|
|
142
153
|
/** Auto-connect on construction. Default: true. */
|
|
143
154
|
autoConnect?: boolean;
|
|
144
155
|
|
|
156
|
+
/**
|
|
157
|
+
* E2EE identity for application-level encryption on data channels.
|
|
158
|
+
* When provided, all data channel messages (except key-exchange) are
|
|
159
|
+
* encrypted with AES-256-GCM using X25519 ECDH-derived session keys.
|
|
160
|
+
*/
|
|
161
|
+
e2ee?: import("./E2EEChannel.ts").E2EEIdentity;
|
|
162
|
+
|
|
145
163
|
/** WebSocket polyfill for signaling (e.g. for Node.js). */
|
|
146
164
|
WebSocketPolyfill?: any;
|
|
147
165
|
}
|