openrtc 2.0.0-rc.9 → 2.0.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/README.md +12 -8
- package/dist/DelegatingRuntimeAdapter-BFZDC604.d.ts +397 -0
- package/dist/{types-BHePJWbM.d.ts → ITransport-WV6gGMnX.d.ts} +42 -3
- package/dist/IpcRuntimeAdapter-CJq3dRBF.d.ts +19 -0
- package/dist/OpenRTCShared.d.ts +250 -0
- package/dist/OpenRTCShared.js +1 -0
- package/dist/WasmBridge-5GYKXPXK.js +1 -0
- package/dist/{OpenRTCShared-BswnbjpG.d.ts → assembly-q0jRRpsc.d.ts} +51 -250
- package/dist/{capabilities-YSskrE8H.d.ts → capabilities-BfZi4Cd7.d.ts} +4 -0
- package/dist/chunk-45WBH7E3.js +1 -0
- package/dist/chunk-7FPG3MFF.js +2 -0
- package/dist/chunk-AG2F6MOB.js +1 -0
- package/dist/chunk-CWGKLGJZ.js +1 -0
- package/dist/{chunk-C6PAXO3N.js → chunk-D2OJN5S5.js} +1 -1
- package/dist/chunk-DUY34MGT.js +1 -0
- package/dist/chunk-H5R5ZXXN.js +3 -0
- package/dist/chunk-KJTJLLJE.js +2 -0
- package/dist/{chunk-7Z6N46RB.js → chunk-LRT5GEGH.js} +2 -2
- package/dist/chunk-NRXEG5GQ.js +1 -0
- package/dist/chunk-OEVPKC3W.js +1 -0
- package/dist/chunk-VBUDERMM.js +2 -0
- package/dist/chunk-VOCOZ57Q.js +2 -0
- package/dist/chunk-XPL7PUBW.js +2 -0
- package/dist/chunk-Z2WVSXPW.js +1 -0
- package/dist/chunk-Z6TZLF4B.js +1 -0
- package/dist/controlPlane-P66ZTVNW.js +2 -0
- package/dist/deviceEnrollment-GL4JPVGG.js +2 -0
- package/dist/deviceKey-SBNKLVYF.js +1 -0
- package/dist/deviceManagement-PHY5TIOS.js +1 -0
- package/dist/deviceProfile-3BEQZLJF.js +2 -0
- package/dist/deviceRoster-VZA3TQOR.js +1 -0
- package/dist/dist-FIVA6EPA.js +277 -0
- package/dist/index.d.ts +10 -8
- package/dist/index.js +1 -1
- package/dist/ipcFactory-B6HBECSU.js +1 -0
- package/dist/native.d.ts +7 -8
- package/dist/native.js +1 -1
- package/dist/openrtc-BFF336RG.js +2 -0
- package/dist/openrtc_bg.wasm +0 -0
- package/dist/runtime/WasmRuntimeAdapter.d.ts +4 -4
- package/dist/runtime/WasmRuntimeAdapter.js +1 -1
- package/dist/runtime/device-status.d.ts +2 -4
- package/dist/runtime/factories.d.ts +21 -0
- package/dist/runtime/factories.js +1 -0
- package/dist/runtime/index.d.ts +29 -62
- package/dist/runtime/index.js +1 -2
- package/dist/testing.d.ts +9 -18
- package/dist/testing.js +1 -1
- package/dist/transport/index.d.ts +2 -3
- package/dist/transport/index.js +1 -1
- package/dist/{types-D0pqNSOf.d.ts → types-DVNSd5B9.d.ts} +71 -4
- package/dist/{types-byWIP-WI.d.ts → types-Di034GVQ.d.ts} +72 -15
- package/package.json +3 -27
- package/dist/DelegatingRuntimeAdapter-BLNigcS4.d.ts +0 -134
- package/dist/IEngineBridge-BbsT8hof.d.ts +0 -17
- package/dist/ITransport-BsPcaov7.d.ts +0 -16
- package/dist/OpenRTCShared-TKAQLONA.js +0 -1
- package/dist/WasmBridge-B7NTRYN5.js +0 -1
- package/dist/auth/index.d.ts +0 -78
- package/dist/auth/index.js +0 -1
- package/dist/auth/internal.d.ts +0 -4
- package/dist/auth/internal.js +0 -1
- package/dist/chunk-23XC6TGK.js +0 -2
- package/dist/chunk-2QHDEGVX.js +0 -1
- package/dist/chunk-A7AMB23L.js +0 -2
- package/dist/chunk-BXFXPIXO.js +0 -1
- package/dist/chunk-C7YN5MSV.js +0 -1
- package/dist/chunk-D45U2NXV.js +0 -1
- package/dist/chunk-DZCZLRM5.js +0 -1
- package/dist/chunk-EUNCYGJD.js +0 -1
- package/dist/chunk-IAIGT5G3.js +0 -1
- package/dist/chunk-JIVVHBCB.js +0 -2
- package/dist/chunk-K37WVIZL.js +0 -1
- package/dist/chunk-KWXAZUAZ.js +0 -2
- package/dist/chunk-N26S7V4N.js +0 -1
- package/dist/chunk-N4SX7C3W.js +0 -2
- package/dist/chunk-NB4H5TP3.js +0 -1
- package/dist/chunk-NCL672QJ.js +0 -3
- package/dist/chunk-NT5YHZQH.js +0 -1
- package/dist/chunk-O3D7S5MD.js +0 -1
- package/dist/chunk-RD3JEGGF.js +0 -2
- package/dist/chunk-VK6KX433.js +0 -1
- package/dist/factories-TLUZAXUG.js +0 -1
- package/dist/ipcFactory-QOAZVE56.js +0 -1
- package/dist/openrtc-C53CKZUM.js +0 -2
- package/dist/runtime/legacy.d.ts +0 -18
- package/dist/runtime/legacy.js +0 -1
- package/dist/runtime/tauri.d.ts +0 -6
- package/dist/runtime/tauri.js +0 -1
- package/dist/tauri-BgLgJoQA.d.ts +0 -33
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { P as PeerReconciliationStats } from '../assembly-q0jRRpsc.js';
|
|
2
|
+
export { O as OPENRTC_RUNTIME_POLICY, a as RuntimeClient, R as RuntimePolicySnapshot, D as ScopedConnectionActorError, d as ScopedConnectionActorErrorKind, e as ScopedConnectionActorHandle, f as ScopedConnectionActorHandleOptions, g as ScopedConnectionActorRegistry, h as ScopedConnectionActorState, i as ScopedConnectionClose, j as ScopedConnectionDial, k as ScopedConnectionKey, l as ScopedLogicalChannelHandle, m as ScopedPreferredTransport, n as getRuntimePolicy, o as scopedConnectionKey, p as scopedConnectionKeyToString } from '../assembly-q0jRRpsc.js';
|
|
3
|
+
import { OpenRTCClient } from '../OpenRTCShared.js';
|
|
4
|
+
import { f as OpenRTCCapabilityHandle } from '../types-Di034GVQ.js';
|
|
5
|
+
import { C as Connection, D as RuntimeConnectionTarget, s as RuntimeRawConnection } from '../types-DVNSd5B9.js';
|
|
6
|
+
export { F as ChannelDescriptor, G as ConnectionEvent, H as ConnectionTarget, J as DeviceProfile, K as IncomingStream, I as IrohBrowserProtocolStore, y as IrohDocEntry, x as IrohMutationReceipt, w as IrohNamespaceDescriptor, P as PeerConnectOptions, L as PeerReadiness, M as PeerStreamOptions, N as PresenceLoopOptions, O as RawConnection, k as RuntimeApplicationPayloadReadinessOptions, Q as RuntimeApplicationPayloadRouteOptions, S as RuntimeAuthContext, z as RuntimeAuthIdentity, T as RuntimeAutoConnectPolicy, R as RuntimeChannelDescriptor, v as RuntimeClientOptions, l as RuntimeConnectionEvent, j as RuntimeConnectionStateSnapshot, h as RuntimeDevice, p as RuntimeDeviceConnectOptions, U as RuntimeDevicePresenceStatus, V as RuntimeDeviceStatus, o as RuntimeDeviceStatusSnapshot, f as RuntimeIncomingStream, t as RuntimeJoinRoomOptions, q as RuntimeLocalDeviceInfo, r as RuntimeLocalDeviceProfile, W as RuntimeLogicalChannelFraming, n as RuntimeManagedSession, X as RuntimeManagedSessionKind, m as RuntimeManagedSessionOptions, Y as RuntimeManagedSessionPlatform, b as RuntimePeerConnectOptions, d as RuntimePeerHealth, Z as RuntimePeerLifecycleStatus, c as RuntimePeerReadinessSnapshot, _ as RuntimePeerScope, $ as RuntimePeerSessionSnapshot, a as RuntimePeerState, e as RuntimePeerStreamOptions, E as RuntimePresenceLoopOptions, a0 as RuntimePresencePolicy, u as RuntimeRoomMember, g as RuntimeScopedChannelOptions, i as RuntimeScopedLogicalChannel, B as RuntimeSession, a1 as RuntimeUiConnectionStatus, a2 as ScopedChannelOptions, a3 as ScopedLogicalChannel, a4 as Session, a5 as SessionOptions } from '../types-DVNSd5B9.js';
|
|
6
7
|
import * as Draft14 from '@moq/net';
|
|
7
|
-
import {
|
|
8
|
-
import { R as RuntimeCapabilities } from '../capabilities-
|
|
9
|
-
export { B as BROWSER_WASM_RUNTIME_CAPABILITIES, b as BrowserRuntimeCapabilityHost, N as NATIVE_IPC_RUNTIME_CAPABILITIES, c as NativeRuntimeStatusSnapshot, d as NativeRuntimeTransportFeatureStatus, e as RuntimeAdapterKind, a as RuntimeCapabilityProfile, f as cloneRuntimeCapabilities, r as runtimeCapabilitiesForBrowserHost, g as runtimeCapabilitiesFromNativeStatus, h as runtimeCapabilityProfile } from '../capabilities-
|
|
8
|
+
import { a5 as SignalingOptions, I as ISignalingBackend, j as RuntimeIdentity, i as RoomMember, k as SignalingEnvelope, r as SignalingSession, D as Device, o as DesiredPeerProjection, t as BackendConnectionState, a4 as AppLimits, G as GrantScope, W as JoinRoomOptions, U as IncomingStreamChannelMetadata, a0 as ApplicationCryptoStreamTools, a6 as RoomCreationMode, g as ClientOptions, w as ApplicationPayloadCrypto, h as DiscoveryMode, $ as ProtocolCapabilityMap, a7 as ScanningLoopOptions, a8 as ScanningLoopHandle, a9 as RuntimeBootstrapOptions, aa as RuntimeBootstrapResult, x as ApplicationPayloadReadinessOptions, ab as ManagedApplicationRouteOptions, J as PeerState, K as PeerScope, O as PeerHealth, Q as ChannelDescriptor, ac as JoinRequest, N as NativeConnectParams, q as NativeConnectResult } from '../ITransport-WV6gGMnX.js';
|
|
9
|
+
import { R as RuntimeCapabilities } from '../capabilities-BfZi4Cd7.js';
|
|
10
|
+
export { B as BROWSER_WASM_RUNTIME_CAPABILITIES, b as BrowserRuntimeCapabilityHost, N as NATIVE_IPC_RUNTIME_CAPABILITIES, c as NativeRuntimeStatusSnapshot, d as NativeRuntimeTransportFeatureStatus, e as RuntimeAdapterKind, a as RuntimeCapabilityProfile, f as cloneRuntimeCapabilities, r as runtimeCapabilitiesForBrowserHost, g as runtimeCapabilitiesFromNativeStatus, h as runtimeCapabilityProfile } from '../capabilities-BfZi4Cd7.js';
|
|
10
11
|
export { RuntimeDeviceActiveOptions, isRuntimeDeviceActive, isRuntimeDeviceConnectable, isRuntimeDeviceRoutable } from './device-status.js';
|
|
11
|
-
export { I as IpcRuntimeAdapter, a as IpcRuntimeAdapterOptions
|
|
12
|
+
export { I as IpcRuntimeAdapter, a as IpcRuntimeAdapterOptions } from '../IpcRuntimeAdapter-CJq3dRBF.js';
|
|
12
13
|
export { P as NativeBridge, N as NativeIpcFailureKind, P as PlutoIpcBridge, a as PlutoIpcUnlisten, c as classifyNativeIpcFailure, i as isNativeIpcCommandUnavailable } from '../ipc-CflAVodw.js';
|
|
13
|
-
import '../
|
|
14
|
-
import '../ITransport-BsPcaov7.js';
|
|
15
|
-
import '../DelegatingRuntimeAdapter-BLNigcS4.js';
|
|
14
|
+
import '../DelegatingRuntimeAdapter-BFZDC604.js';
|
|
16
15
|
|
|
17
16
|
declare class Signaling {
|
|
18
17
|
private readonly appTag;
|
|
@@ -31,6 +30,10 @@ declare class Signaling {
|
|
|
31
30
|
signInWithPluto(): Promise<void>;
|
|
32
31
|
signOut(): Promise<void>;
|
|
33
32
|
stopAuthScopedActivity(): Promise<void>;
|
|
33
|
+
setCoordinationHostAvailability(input: {
|
|
34
|
+
available: boolean;
|
|
35
|
+
reason: string;
|
|
36
|
+
}): void;
|
|
34
37
|
getRuntimeCapabilities(): RuntimeCapabilities | undefined;
|
|
35
38
|
getTurnCredentials(): Promise<any>;
|
|
36
39
|
updatePresence(localNodeId: string, ticketStr: string, isOnline?: boolean, ttlMs?: number, metadata?: string): Promise<void>;
|
|
@@ -109,6 +112,12 @@ interface TransportInterface {
|
|
|
109
112
|
interface MoQSessionOptions {
|
|
110
113
|
onSubscriptionTerminated?: (namespace: string, name: string, error: unknown) => void;
|
|
111
114
|
}
|
|
115
|
+
interface MoQDatagramDuplex {
|
|
116
|
+
readonly maxDatagramSize?: number;
|
|
117
|
+
readonly readable: ReadableStream<Uint8Array>;
|
|
118
|
+
readonly writable: WritableStream<Uint8Array>;
|
|
119
|
+
close(): void;
|
|
120
|
+
}
|
|
112
121
|
/**
|
|
113
122
|
* Draft-14 MoQT adapter. The OpenRTC controller owns reconnect and lifecycle;
|
|
114
123
|
* this class owns only one negotiated relay session and its protocol handles.
|
|
@@ -127,6 +136,12 @@ declare class MoQSession {
|
|
|
127
136
|
private readonly setupPromise;
|
|
128
137
|
constructor(transport: TransportInterface, onObject?: (ns: string, name: string, obj: Uint8Array, meta: unknown) => void, role?: number, relayUrl?: URL, options?: MoQSessionOptions);
|
|
129
138
|
requireConnection(): Draft14.Connection.Established;
|
|
139
|
+
/**
|
|
140
|
+
* Open the patched Draft 14 object-datagram surface used only by the Iroh
|
|
141
|
+
* packet carrier. Existing application-data publishing remains on subgroup
|
|
142
|
+
* streams and never shares readiness with this duplex.
|
|
143
|
+
*/
|
|
144
|
+
openDatagramDuplex(publishNamespace: string, subscribeNamespace: string, trackName: string): Promise<MoQDatagramDuplex>;
|
|
130
145
|
init(): Promise<void>;
|
|
131
146
|
waitForSetup(): Promise<void>;
|
|
132
147
|
onClose(callback: (reason?: unknown) => void): () => void;
|
|
@@ -368,7 +383,7 @@ declare class Client {
|
|
|
368
383
|
buildCompoundTicketWithToken(irohTicket: string, grantScope: GrantScope, maxConnections?: number): string;
|
|
369
384
|
setManagedPresenceTicket(ticket: string | null): void;
|
|
370
385
|
clearManagedPresenceTicket(): void;
|
|
371
|
-
registerSessionToken(token: string, grantScope: GrantScope, maxConnections: number): void;
|
|
386
|
+
registerSessionToken(token: string, grantScope: GrantScope, maxConnections: number, expiresAtMs?: number): void;
|
|
372
387
|
revokeSessionToken(token: string): void;
|
|
373
388
|
revokeTokensByScope(grantScope: GrantScope): Promise<string[]>;
|
|
374
389
|
clearSessionTokens(): Promise<void>;
|
|
@@ -525,52 +540,4 @@ declare function createRuntimeJsonFrameDecoder<T = unknown>(onValue: RuntimeJson
|
|
|
525
540
|
declare function concatRuntimeBytes(a: ByteArrayLike, b: ByteArrayLike): ByteArray;
|
|
526
541
|
declare function readRuntimeU32BE(bytes: ByteArrayLike, offset: number): number;
|
|
527
542
|
|
|
528
|
-
type
|
|
529
|
-
spaceKey: string;
|
|
530
|
-
memberId?: string;
|
|
531
|
-
ttl?: number;
|
|
532
|
-
sandboxAppId?: string;
|
|
533
|
-
};
|
|
534
|
-
type MintSpaceTokenResponse = {
|
|
535
|
-
token: string;
|
|
536
|
-
expiresAt: number;
|
|
537
|
-
tokenLifetimeSeconds: number;
|
|
538
|
-
namespaceId: string;
|
|
539
|
-
spaceAppTag: string;
|
|
540
|
-
};
|
|
541
|
-
/**
|
|
542
|
-
* Mint a namespace-scoped Firebase custom token from your backend using the
|
|
543
|
-
* OpenRTC `POST /v1/spaces/tokens` endpoint. Never call this from browser code
|
|
544
|
-
* with a secret key — proxy through your server.
|
|
545
|
-
*/
|
|
546
|
-
type EnableSpaceAuthResponse = {
|
|
547
|
-
success: true;
|
|
548
|
-
space: {
|
|
549
|
-
namespaceId: string;
|
|
550
|
-
requireScopedAuth: boolean;
|
|
551
|
-
status: 'active' | 'revoked';
|
|
552
|
-
};
|
|
553
|
-
};
|
|
554
|
-
/**
|
|
555
|
-
* Opt a provisioned space into scoped-auth mode (required for all spaces).
|
|
556
|
-
* Call from your backend with sk_live_... only.
|
|
557
|
-
*/
|
|
558
|
-
declare function enableSpaceAuth(endpointUrl: string, secretKey: string, namespaceId: string): Promise<EnableSpaceAuthResponse>;
|
|
559
|
-
declare function mintSpaceToken(endpointUrl: string, secretKey: string, request: MintSpaceTokenRequest): Promise<MintSpaceTokenResponse>;
|
|
560
|
-
/**
|
|
561
|
-
* Browser-safe space auth for static sites. Calls the rate-limited
|
|
562
|
-
* `v1SpacePublicTokens` endpoint (pk_live_ + spaceKey only).
|
|
563
|
-
*/
|
|
564
|
-
declare function createPublicSpaceTokenProvider(options: {
|
|
565
|
-
apiKey: string;
|
|
566
|
-
space?: string;
|
|
567
|
-
spaceKey?: string;
|
|
568
|
-
endpointUrl?: string;
|
|
569
|
-
memberIdStorageKey?: string;
|
|
570
|
-
sandboxAppId?: string;
|
|
571
|
-
}): SpaceTokenProvider;
|
|
572
|
-
declare function sandboxSpaceKey(spaceKey: string, sandboxAppId?: string): string;
|
|
573
|
-
declare const spaceToken: typeof createPublicSpaceTokenProvider;
|
|
574
|
-
declare const createSpaceTokenProvider: typeof createPublicSpaceTokenProvider;
|
|
575
|
-
|
|
576
|
-
export { Connection, type CorrelationFields, type EnableSpaceAuthResponse, type MintSpaceTokenRequest, type MintSpaceTokenResponse, type OpenRTCCapabilityRuntime, RuntimeCapabilities, RuntimeConnectionController, RuntimeConnectionTarget, type RuntimeJsonFrameDecoderOptions, type RuntimeJsonFrameHandler, RuntimeRawConnection, type RuntimeU32BEFrameHandler, clog, concatRuntimeBytes, correlationForDriveGrantScope, createPublicSpaceTokenProvider, createRuntimeJsonFrameDecoder, createRuntimeU32BEFrameDecoder, createSpaceTokenProvider, decodeRuntimeJsonPayload, enableSpaceAuth, encodeRuntimeJsonFrame, encodeRuntimeJsonPayload, encodeRuntimeU32BEFrame, logOpenRtcTeardownTrace, mintSpaceToken, openRtcDebug, openRtcDebugEnabled, openRtcDebugInfo, openRtcDebugLog, readRuntimeU32BE, renderCorrelationFields, runtimeForCapability as runtimeFromCapability, sandboxSpaceKey, spaceToken };
|
|
543
|
+
export { Connection, type CorrelationFields, type OpenRTCCapabilityRuntime, RuntimeCapabilities, RuntimeConnectionController, RuntimeConnectionTarget, type RuntimeJsonFrameDecoderOptions, type RuntimeJsonFrameHandler, RuntimeRawConnection, type RuntimeU32BEFrameHandler, clog, concatRuntimeBytes, correlationForDriveGrantScope, createRuntimeJsonFrameDecoder, createRuntimeU32BEFrameDecoder, decodeRuntimeJsonPayload, encodeRuntimeJsonFrame, encodeRuntimeJsonPayload, encodeRuntimeU32BEFrame, logOpenRtcTeardownTrace, openRtcDebug, openRtcDebugEnabled, openRtcDebugInfo, openRtcDebugLog, readRuntimeU32BE, renderCorrelationFields, runtimeForCapability as runtimeFromCapability };
|
package/dist/runtime/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export{
|
|
2
|
-
export{d as createPublicSpaceTokenProvider,H as createSpaceTokenProvider,z as enableSpaceAuth,q as mintSpaceToken,J as sandboxSpaceKey,L as spaceToken};
|
|
1
|
+
export{a as runtimeFromCapability}from'../chunk-OEVPKC3W.js';import'../chunk-XPL7PUBW.js';export{a as isRuntimeDeviceActive,c as isRuntimeDeviceConnectable,b as isRuntimeDeviceRoutable}from'../chunk-CK6WQV7J.js';export{b as Connection,u as IpcRuntimeAdapter,t as RuntimeClient,c as RuntimeConnectionController,g as ScopedConnectionActorError,j as ScopedConnectionActorHandle,k as ScopedConnectionActorRegistry,f as clog,r as concatRuntimeBytes,e as correlationForDriveGrantScope,q as createRuntimeJsonFrameDecoder,m as createRuntimeU32BEFrameDecoder,o as decodeRuntimeJsonPayload,p as encodeRuntimeJsonFrame,n as encodeRuntimeJsonPayload,l as encodeRuntimeU32BEFrame,s as readRuntimeU32BE,d as renderCorrelationFields,h as scopedConnectionKey,i as scopedConnectionKeyToString}from'../chunk-H5R5ZXXN.js';import'../chunk-LRT5GEGH.js';export{a as classifyNativeIpcFailure,b as isNativeIpcCommandUnavailable}from'../chunk-Z2WVSXPW.js';import'../chunk-DUY34MGT.js';import'../chunk-D2OJN5S5.js';export{s as BROWSER_WASM_RUNTIME_CAPABILITIES,t as NATIVE_IPC_RUNTIME_CAPABILITIES,q as OPENRTC_RUNTIME_POLICY,u as cloneRuntimeCapabilities,r as getRuntimePolicy,i as logOpenRtcTeardownTrace,v as runtimeCapabilitiesForBrowserHost,w as runtimeCapabilitiesFromNativeStatus,x as runtimeCapabilityProfile}from'../chunk-VOCOZ57Q.js';export{b as openRtcDebug,a as openRtcDebugEnabled,c as openRtcDebugInfo,d as openRtcDebugLog}from'../chunk-AG2F6MOB.js';import'../chunk-CWGKLGJZ.js';import'../chunk-KJTJLLJE.js';import'../chunk-45WBH7E3.js';import'../chunk-NRXEG5GQ.js';
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { d as OpenRTCClient } from './OpenRTCShared-BswnbjpG.js';
|
|
2
1
|
import { P as PlutoIpcBridge } from './ipc-CflAVodw.js';
|
|
3
|
-
import { a as
|
|
4
|
-
import
|
|
5
|
-
import './
|
|
6
|
-
import './
|
|
7
|
-
import './
|
|
8
|
-
import './
|
|
2
|
+
import { O as OpenRTCOptions, a as OpenRTCClient } from './types-Di034GVQ.js';
|
|
3
|
+
import './OpenRTCShared.js';
|
|
4
|
+
import './assembly-q0jRRpsc.js';
|
|
5
|
+
import './types-DVNSd5B9.js';
|
|
6
|
+
import './ITransport-WV6gGMnX.js';
|
|
7
|
+
import './capabilities-BfZi4Cd7.js';
|
|
9
8
|
|
|
10
9
|
interface OpenRTCV2Endpoints {
|
|
11
10
|
controlPlane: string;
|
|
@@ -15,16 +14,8 @@ interface OpenRTCV2Endpoints {
|
|
|
15
14
|
declare function createTestingOpenRTC(options: OpenRTCOptions, endpoints: OpenRTCV2Endpoints, testing?: {
|
|
16
15
|
deviceId?: string;
|
|
17
16
|
irohTestRelayUrl?: string;
|
|
18
|
-
}): OpenRTCClient
|
|
17
|
+
}): OpenRTCClient;
|
|
19
18
|
/** Native equivalent for emulator and harness lanes; never import in product code. */
|
|
20
|
-
declare function createTestingNativeOpenRTC(options: OpenRTCOptions, endpoints: OpenRTCV2Endpoints, bridge: PlutoIpcBridge): OpenRTCClient
|
|
21
|
-
/**
|
|
22
|
-
* Rollback-harness constructor. This is intentionally confined to the
|
|
23
|
-
* `openrtc/testing` export because it enables plaintext loopback coordination
|
|
24
|
-
* for local emulators and also carries the time-bounded v1 runtime.
|
|
25
|
-
*/
|
|
26
|
-
declare const createTestingLegacyOpenRTC: ((options: RuntimeClientOptions) => Promise<OpenRTCClient>) & {
|
|
27
|
-
native: (options: RuntimeClientOptions, bridge?: PlutoIpcBridge) => OpenRTCClient;
|
|
28
|
-
};
|
|
19
|
+
declare function createTestingNativeOpenRTC(options: OpenRTCOptions, endpoints: OpenRTCV2Endpoints, bridge: PlutoIpcBridge): OpenRTCClient;
|
|
29
20
|
|
|
30
|
-
export {
|
|
21
|
+
export { createTestingNativeOpenRTC, createTestingOpenRTC };
|
package/dist/testing.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a
|
|
1
|
+
import {a}from'./chunk-7FPG3MFF.js';import'./chunk-VBUDERMM.js';import {b}from'./chunk-OEVPKC3W.js';import'./chunk-XPL7PUBW.js';import'./chunk-DUY34MGT.js';import'./chunk-NRXEG5GQ.js';function l(r,n,e={}){return b(r,{endpoints:n,testingAllowInsecureLoopback:true,platform:"web",...e.deviceId?{deviceIdProvider:async()=>e.deviceId}:{},...e.irohTestRelayUrl?{irohTestRelayUrl:e.irohTestRelayUrl}:{},runtimeFactory:async t=>{let{createWasmClient:i}=await import('./runtime/factories.js');return i(t)}})}function s(r,n,e){return b(r,{endpoints:n,testingAllowInsecureLoopback:true,platform:"native",deviceKeyProvider:a(e),deviceIdProvider:async()=>{let t=await e.invoke("get_rtc_local_device_info");return String(t?.deviceId??"")},runtimeFactory:async t=>{let{createIpcClient:i}=await import('./ipcFactory-B6HBECSU.js');return i(t,e)}})}export{s as createTestingNativeOpenRTC,l as createTestingOpenRTC};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { I as ITransport } from '../ITransport-BsPcaov7.js';
|
|
1
|
+
import { c as ProtocolName, Z as RouteDescriptor, F as ITransport, _ as ProtocolCapability, $ as ProtocolCapabilityMap, w as ApplicationPayloadCrypto, a0 as ApplicationCryptoStreamTools } from '../ITransport-WV6gGMnX.js';
|
|
2
|
+
export { a1 as ApplicationCryptoBiStream, a2 as RouteFamily, a3 as RouteImplementationKind } from '../ITransport-WV6gGMnX.js';
|
|
4
3
|
|
|
5
4
|
declare const TRANSPORT_LABELS: readonly ProtocolName[];
|
|
6
5
|
declare function normalizeTransportLabel(value: unknown): ProtocolName | undefined;
|
package/dist/transport/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{e as KEY_AGREEMENT_ALGORITHM,d as KEY_AGREEMENT_PUBLIC_KEY_BYTES,g as deriveApplicationCryptoKey,i as encodeApplicationKeyAgreementPayload,f as generateEphemeralKeyAgreement,c as getPreferredProtocolOrder}from'../chunk-
|
|
1
|
+
export{e as KEY_AGREEMENT_ALGORITHM,d as KEY_AGREEMENT_PUBLIC_KEY_BYTES,g as deriveApplicationCryptoKey,i as encodeApplicationKeyAgreementPayload,f as generateEphemeralKeyAgreement,c as getPreferredProtocolOrder}from'../chunk-LRT5GEGH.js';export{o as TRANSPORT_LABELS,z as createApplicationCryptoStreamTools,y as createSharedSecretApplicationCrypto,x as isApplicationEncryptedPayload,r as isDirectIrohTransportLabel,w as isIndependentTransportLabel,q as isIrohBaseTransportLabel,s as isOptionalTransportLabel,t as isWebRtcTransportLabel,p as normalizeTransportLabel}from'../chunk-AG2F6MOB.js';export{a as ROUTE_DESCRIPTORS,e as getRouteDescriptor,f as listRouteDescriptors}from'../chunk-45WBH7E3.js';
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as ConnectionOptions, o as ApplicationPayloadCrypto, p as ApplicationPayloadReadinessOptions, q as ApplicationPayloadRouteOptions, r as ProtocolName, s as ApplicationPayloadSendOptions, T as TransportLatencySnapshot, t as PeerState, u as PeerScope, v as PeerHealth, w as ChannelDescriptor$1, x as IncomingStreamChannelMetadata, b as Device, m as BackendConnectionState, L as LocalDeviceInfo, c as DeviceStatusSnapshot, y as ManagedDeviceConnectOptions, C as ClientOptions, h as SignalingSession, R as RuntimeIdentity, J as JoinRoomOptions, a as RoomMember, z as DevicePresenceStatus, F as PeerLifecycleStatus, P as PeerSessionSnapshot } from './types-BHePJWbM.js';
|
|
3
|
-
import { I as ITransport } from './ITransport-BsPcaov7.js';
|
|
1
|
+
import { v as ConnectionOptions, w as ApplicationPayloadCrypto, x as ApplicationPayloadReadinessOptions, y as ApplicationPayloadRouteOptions, c as ProtocolName, z as ApplicationPayloadSendOptions, F as ITransport, H as TransportLatencySnapshot, J as PeerState, K as PeerScope, O as PeerHealth, Q as ChannelDescriptor$1, U as IncomingStreamChannelMetadata, D as Device, t as BackendConnectionState, L as LocalDeviceInfo, l as DeviceStatusSnapshot, V as ManagedDeviceConnectOptions, g as ClientOptions, r as SignalingSession, j as RuntimeIdentity, W as JoinRoomOptions, i as RoomMember, X as DevicePresenceStatus, Y as PeerLifecycleStatus, d as PeerSessionSnapshot } from './ITransport-WV6gGMnX.js';
|
|
4
2
|
|
|
5
3
|
type ConnectionHealth = 'unknown' | 'healthy' | 'suspect' | 'stale';
|
|
6
4
|
|
|
@@ -401,6 +399,22 @@ declare class Connection {
|
|
|
401
399
|
private normalizeNegotiationId;
|
|
402
400
|
}
|
|
403
401
|
|
|
402
|
+
type AuthContext = {
|
|
403
|
+
userId: string;
|
|
404
|
+
token?: string | null;
|
|
405
|
+
refreshToken?: string | null;
|
|
406
|
+
customToken?: string | null;
|
|
407
|
+
tokenProvider?: (forceRefresh?: boolean) => Promise<string | null>;
|
|
408
|
+
/**
|
|
409
|
+
* Supplies the platform attestation token required by the configured
|
|
410
|
+
* control plane. Firebase-backed hosted deployments use App Check today;
|
|
411
|
+
* keeping acquisition on the auth context prevents coordination code from
|
|
412
|
+
* owning a second Firebase app or assuming one global project.
|
|
413
|
+
*/
|
|
414
|
+
appCheckTokenProvider?: (forceRefresh?: boolean) => Promise<string | null>;
|
|
415
|
+
expiresAtMs?: number | null;
|
|
416
|
+
};
|
|
417
|
+
|
|
404
418
|
/**
|
|
405
419
|
* App-facing options intentionally hide transport node identifiers from callbacks.
|
|
406
420
|
*/
|
|
@@ -439,6 +453,59 @@ interface RuntimeConnectionTarget {
|
|
|
439
453
|
ticket: string;
|
|
440
454
|
timeoutMs?: number;
|
|
441
455
|
}
|
|
456
|
+
/**
|
|
457
|
+
* Durable browser storage used by the optional upstream Iroh docs, blobs, and
|
|
458
|
+
* gossip protocols. Implementations normally map these atomic operations to
|
|
459
|
+
* IndexedDB; OpenRTC deliberately does not own a second browser database.
|
|
460
|
+
*/
|
|
461
|
+
interface IrohBrowserProtocolStore {
|
|
462
|
+
loadIdentity(): Promise<{
|
|
463
|
+
defaultAuthor: Uint8Array;
|
|
464
|
+
} | null>;
|
|
465
|
+
exportSnapshot(): Promise<{
|
|
466
|
+
authors: unknown[];
|
|
467
|
+
namespaces: unknown[];
|
|
468
|
+
entries: unknown[];
|
|
469
|
+
}>;
|
|
470
|
+
importAuthor(authorId: string, author: Uint8Array): Promise<void>;
|
|
471
|
+
importNamespace(capability: unknown): Promise<void>;
|
|
472
|
+
deleteNamespace(namespaceId: string): Promise<void>;
|
|
473
|
+
applyEntryTransaction(mutation: unknown): Promise<void>;
|
|
474
|
+
acknowledgeOutbox(operationId: string): Promise<void>;
|
|
475
|
+
listBlobManifests(): Promise<unknown[]>;
|
|
476
|
+
getBlobResumeState(contentHash: string): Promise<unknown | null>;
|
|
477
|
+
readBlobRange(contentHash: string, offset: number, length: number): Promise<Uint8Array | null>;
|
|
478
|
+
writeBlobRange(contentHash: string, size: number, chunkBytes: number, offset: number, bytes: Uint8Array): Promise<void>;
|
|
479
|
+
finalizeBlobIfComplete(contentHash: string): Promise<boolean>;
|
|
480
|
+
readBlobOutboardNode(contentHash: string, nodeId: string): Promise<Uint8Array | null>;
|
|
481
|
+
writeBlobOutboardNode(contentHash: string, nodeId: string, pair: Uint8Array): Promise<void>;
|
|
482
|
+
markBlobBaoReady(contentHash: string): Promise<void>;
|
|
483
|
+
writeBlobStagingChunk(sessionId: string, chunkIndex: number, bytes: Uint8Array): Promise<void>;
|
|
484
|
+
finalizeBlobStaging(sessionId: string, contentHash: string, size: number, chunkBytes: number): Promise<void>;
|
|
485
|
+
abortBlobStaging(sessionId: string): Promise<void>;
|
|
486
|
+
deleteBlob(contentHash: string, force: boolean): Promise<boolean>;
|
|
487
|
+
beginBlobImport(contentHash: string, size: number, chunkBytes: number): Promise<void>;
|
|
488
|
+
writeBlobChunk(contentHash: string, size: number, chunkBytes: number, chunkIndex: number, bytes: Uint8Array): Promise<void>;
|
|
489
|
+
finalizeBlobImport(contentHash: string, size: number, chunkBytes: number): Promise<void>;
|
|
490
|
+
flush(): Promise<void>;
|
|
491
|
+
}
|
|
492
|
+
interface IrohNamespaceDescriptor {
|
|
493
|
+
namespaceId: string;
|
|
494
|
+
capabilityKind: 'read' | 'write';
|
|
495
|
+
capability: Uint8Array;
|
|
496
|
+
}
|
|
497
|
+
interface IrohMutationReceipt {
|
|
498
|
+
contentHash: string;
|
|
499
|
+
operationId: string;
|
|
500
|
+
}
|
|
501
|
+
interface IrohDocEntry {
|
|
502
|
+
namespaceId: string;
|
|
503
|
+
authorId: string;
|
|
504
|
+
key: Uint8Array;
|
|
505
|
+
timestamp: number;
|
|
506
|
+
contentHash: string;
|
|
507
|
+
contentLength: number;
|
|
508
|
+
}
|
|
442
509
|
interface RuntimePeerConnectOptions {
|
|
443
510
|
deviceId?: string;
|
|
444
511
|
ticket?: string;
|
|
@@ -595,4 +662,4 @@ type SessionOptions = RuntimeManagedSessionOptions;
|
|
|
595
662
|
type Session = RuntimeManagedSession;
|
|
596
663
|
type ChannelDescriptor = RuntimeChannelDescriptor;
|
|
597
664
|
|
|
598
|
-
export { type
|
|
665
|
+
export { type RuntimePeerSessionSnapshot as $, type AuthContext as A, type RuntimeSession as B, Connection as C, type RuntimeConnectionTarget as D, type RuntimePresenceLoopOptions as E, type ChannelDescriptor as F, type ConnectionEvent as G, type ConnectionTarget as H, type IrohBrowserProtocolStore as I, type DeviceProfile as J, type IncomingStream as K, type PeerReadiness as L, type PeerStreamOptions as M, type PresenceLoopOptions as N, type RawConnection as O, type PeerConnectOptions as P, type RuntimeApplicationPayloadRouteOptions as Q, type RuntimeChannelDescriptor as R, type RuntimeAuthContext as S, type RuntimeAutoConnectPolicy as T, type RuntimeDevicePresenceStatus as U, type RuntimeDeviceStatus as V, type RuntimeLogicalChannelFraming as W, type RuntimeManagedSessionKind as X, type RuntimeManagedSessionPlatform as Y, type RuntimePeerLifecycleStatus as Z, type RuntimePeerScope as _, type RuntimePeerState as a, type RuntimePresencePolicy as a0, type RuntimeUiConnectionStatus as a1, type ScopedChannelOptions as a2, type ScopedLogicalChannel as a3, type Session as a4, type SessionOptions as a5, type RuntimePeerConnectOptions as b, type RuntimePeerReadinessSnapshot as c, type RuntimePeerHealth as d, type RuntimePeerStreamOptions as e, type RuntimeIncomingStream as f, type RuntimeScopedChannelOptions as g, type RuntimeDevice as h, type RuntimeScopedLogicalChannel as i, type RuntimeConnectionStateSnapshot as j, type RuntimeApplicationPayloadReadinessOptions as k, type RuntimeConnectionEvent as l, type RuntimeManagedSessionOptions as m, type RuntimeManagedSession as n, type RuntimeDeviceStatusSnapshot as o, type RuntimeDeviceConnectOptions as p, type RuntimeLocalDeviceInfo as q, type RuntimeLocalDeviceProfile as r, type RuntimeRawConnection as s, type RuntimeJoinRoomOptions as t, type RuntimeRoomMember as u, type RuntimeClientOptions as v, type IrohNamespaceDescriptor as w, type IrohMutationReceipt as x, type IrohDocEntry as y, type RuntimeAuthIdentity as z };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { R as RuntimeChannelDescriptor } from './types-
|
|
1
|
+
import { OpenRTCPeerNamespace, OpenRTCChannelNamespace, OpenRTCDiagnosticsNamespace, OpenRTCDeviceNamespace } from './OpenRTCShared.js';
|
|
2
|
+
import { R as RuntimeChannelDescriptor } from './types-DVNSd5B9.js';
|
|
3
|
+
import { P as PlutoIrohConfiguration, a as PlutoRTCConfiguration, b as PlutoMoQConfiguration, T as TransportOptimization, c as ProtocolName } from './ITransport-WV6gGMnX.js';
|
|
3
4
|
|
|
4
5
|
interface OpenRTCAuthProvider {
|
|
5
6
|
/** Registered provider ID from the developer app capability manifest. */
|
|
@@ -25,6 +26,13 @@ interface OpenRTCAuthProvider {
|
|
|
25
26
|
* enrollment/renewal assertion, never for hourly gateway refreshes.
|
|
26
27
|
*/
|
|
27
28
|
deviceId: string;
|
|
29
|
+
/**
|
|
30
|
+
* Present only after OpenRTC receives the exact structured response
|
|
31
|
+
* indicating that this installation ID is enrolled with another
|
|
32
|
+
* public key. Consumer backends should require recent interactive
|
|
33
|
+
* authentication before authorizing the replacement.
|
|
34
|
+
*/
|
|
35
|
+
recoveryReason?: 'device-key-rotation';
|
|
28
36
|
}): Promise<string | null>;
|
|
29
37
|
/**
|
|
30
38
|
* Optional identity-epoch observer. Notify only when the signed-in
|
|
@@ -45,6 +53,19 @@ interface OpenRTCEnrolledDevice {
|
|
|
45
53
|
lastGrantAtMs: number | null;
|
|
46
54
|
current: boolean;
|
|
47
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Public, non-secret presentation metadata for one enrolled installation.
|
|
58
|
+
* OpenRTC derives a useful browser default when these fields are omitted;
|
|
59
|
+
* native hosts should pass the OS/device information reported by their host.
|
|
60
|
+
*/
|
|
61
|
+
interface OpenRTCDeviceProfile {
|
|
62
|
+
/** Human-readable label such as `Bryant's iPhone` or `Chrome on Android`. */
|
|
63
|
+
name?: string;
|
|
64
|
+
/** Raw OS/runtime label such as `ios`, `android`, `macos`, or `web`. */
|
|
65
|
+
platform?: string;
|
|
66
|
+
/** Optional application-owned public presence metadata, bounded to 4 KiB. */
|
|
67
|
+
metadata?: string;
|
|
68
|
+
}
|
|
48
69
|
interface OpenRTCAttestationProvider {
|
|
49
70
|
readonly kind: 'firebase-app-check' | 'apple-app-attest' | 'play-integrity' | `custom:${string}`;
|
|
50
71
|
/**
|
|
@@ -83,10 +104,10 @@ interface OpenRTCUsageWarning extends OpenRTCUsageUpdate {
|
|
|
83
104
|
kind: 'warning' | 'session-limit';
|
|
84
105
|
}
|
|
85
106
|
interface OpenRTCTransportPreferences {
|
|
86
|
-
iroh?: boolean;
|
|
87
|
-
webrtc?: boolean;
|
|
107
|
+
iroh?: boolean | PlutoIrohConfiguration;
|
|
108
|
+
webrtc?: boolean | PlutoRTCConfiguration;
|
|
88
109
|
relay?: boolean;
|
|
89
|
-
moq?: boolean;
|
|
110
|
+
moq?: boolean | PlutoMoQConfiguration;
|
|
90
111
|
ble?: boolean;
|
|
91
112
|
/**
|
|
92
113
|
* Advanced privacy mode. `relay-only` suppresses direct Iroh addresses,
|
|
@@ -94,13 +115,16 @@ interface OpenRTCTransportPreferences {
|
|
|
94
115
|
* developer manifest's relay opt-in.
|
|
95
116
|
*/
|
|
96
117
|
privacy?: 'direct' | 'relay-only';
|
|
118
|
+
/** Optimize eligible routes for stability/cost or measured latency. */
|
|
119
|
+
optimizeFor?: TransportOptimization;
|
|
97
120
|
/**
|
|
98
121
|
* Advanced native integration for hosts whose Rust process owns the
|
|
99
122
|
* application protocol registry (for example, a Tauri file-transfer host).
|
|
100
123
|
* Normal SDK consumers should leave this disabled.
|
|
101
124
|
*/
|
|
102
125
|
nativeHostProtocols?: boolean;
|
|
103
|
-
|
|
126
|
+
/** Exact route order. Unsupported routes are skipped, never treated as failures. */
|
|
127
|
+
priority?: readonly ProtocolName[];
|
|
104
128
|
}
|
|
105
129
|
interface OpenRTCOptions {
|
|
106
130
|
apiKey: string;
|
|
@@ -119,6 +143,30 @@ interface OpenRTCOptions {
|
|
|
119
143
|
}
|
|
120
144
|
type OpenRTCAccessMode = 'capability' | 'authenticated';
|
|
121
145
|
type OpenRTCLatestStateMode = 'reliable' | 'latest-state';
|
|
146
|
+
interface OpenRTCConnection {
|
|
147
|
+
readonly id: string;
|
|
148
|
+
readonly peerId: string;
|
|
149
|
+
send(message: unknown): Promise<void>;
|
|
150
|
+
onMessage<T = unknown>(callback: (message: T) => void): () => void;
|
|
151
|
+
onClose(callback: () => void): () => void;
|
|
152
|
+
}
|
|
153
|
+
interface OpenRTCChannel<T> {
|
|
154
|
+
send(message: T): Promise<void>;
|
|
155
|
+
sendTo(peerId: string, message: T): Promise<void>;
|
|
156
|
+
onMessage(callback: (event: {
|
|
157
|
+
peerId: string;
|
|
158
|
+
message: T;
|
|
159
|
+
}) => void): () => void;
|
|
160
|
+
}
|
|
161
|
+
interface OpenRTCState<T> {
|
|
162
|
+
/** Replace the locally published value. Delivery is best-effort and coalesced. */
|
|
163
|
+
set(value: T): void;
|
|
164
|
+
/** A null value means the peer disconnected. */
|
|
165
|
+
watch(callback: (event: {
|
|
166
|
+
peerId: string;
|
|
167
|
+
value: T | null;
|
|
168
|
+
}) => void): () => void;
|
|
169
|
+
}
|
|
122
170
|
interface OpenRTCCapabilityHandle {
|
|
123
171
|
readonly kind: 'devices' | 'space' | 'room' | 'ticket';
|
|
124
172
|
readonly id: string;
|
|
@@ -126,6 +174,10 @@ interface OpenRTCCapabilityHandle {
|
|
|
126
174
|
readonly channels: OpenRTCChannelNamespace;
|
|
127
175
|
readonly diagnostics: OpenRTCDiagnosticsNamespace;
|
|
128
176
|
readonly closed: boolean;
|
|
177
|
+
state<T>(name: string): OpenRTCState<T>;
|
|
178
|
+
channel<T>(name: string): OpenRTCChannel<T>;
|
|
179
|
+
/** Observe current and future connections without taking lifecycle ownership. */
|
|
180
|
+
onConnection(callback: (connection: OpenRTCConnection) => void): () => void;
|
|
129
181
|
close(): Promise<void>;
|
|
130
182
|
}
|
|
131
183
|
interface OpenRTCDevicesHandle extends OpenRTCCapabilityHandle {
|
|
@@ -150,20 +202,20 @@ interface OpenRTCRoomHandle extends OpenRTCCapabilityHandle {
|
|
|
150
202
|
}
|
|
151
203
|
interface OpenRTCTicketHandle extends OpenRTCCapabilityHandle {
|
|
152
204
|
readonly kind: 'ticket';
|
|
205
|
+
/**
|
|
206
|
+
* Opaque, install-bound OpenRTC capability credential. This is not a
|
|
207
|
+
* transferable invitation or recipient redemption token. Do not display,
|
|
208
|
+
* log, persist, or send it to another installation.
|
|
209
|
+
* @deprecated This credential exposure is retained only for RC source
|
|
210
|
+
* compatibility and will not be part of the stable invitation workflow.
|
|
211
|
+
*/
|
|
153
212
|
readonly token: string;
|
|
154
213
|
}
|
|
155
214
|
interface OpenRTCDevicesStartOptions {
|
|
156
215
|
auth?: OpenRTCAuthProvider;
|
|
157
216
|
autoConnect?: 'none' | 'online';
|
|
158
217
|
/** Optional local profile; it does not alter the durable device identity. */
|
|
159
|
-
profile?:
|
|
160
|
-
name?: string;
|
|
161
|
-
/**
|
|
162
|
-
* Optional application-owned public presence metadata. It is bounded
|
|
163
|
-
* to 4 KiB and folded into the initial connection/presence operation.
|
|
164
|
-
*/
|
|
165
|
-
metadata?: string;
|
|
166
|
-
};
|
|
218
|
+
profile?: OpenRTCDeviceProfile;
|
|
167
219
|
maxPeers?: number;
|
|
168
220
|
/** Requires the app manifest's advanced-fanout opt-in. */
|
|
169
221
|
advancedFanout?: boolean;
|
|
@@ -205,6 +257,11 @@ interface OpenRTCUsageNamespace {
|
|
|
205
257
|
}
|
|
206
258
|
interface OpenRTCClient {
|
|
207
259
|
readonly devices: {
|
|
260
|
+
/**
|
|
261
|
+
* Returns this installation's durable, app-scoped device ID without
|
|
262
|
+
* starting a capability or performing network work.
|
|
263
|
+
*/
|
|
264
|
+
localId(): Promise<string>;
|
|
208
265
|
start(options?: OpenRTCDevicesStartOptions): Promise<OpenRTCDevicesHandle>;
|
|
209
266
|
listEnrolled(options?: {
|
|
210
267
|
auth?: OpenRTCAuthProvider;
|
|
@@ -231,4 +288,4 @@ interface OpenRTCClient {
|
|
|
231
288
|
close(): Promise<void>;
|
|
232
289
|
}
|
|
233
290
|
|
|
234
|
-
export type { OpenRTCOptions as O, OpenRTCClient as a, OpenRTCAccessMode as b, OpenRTCAttestationProvider as c, OpenRTCAuthProvider as d, OpenRTCBotVerificationProvider as e, OpenRTCCapabilityHandle as f,
|
|
291
|
+
export type { OpenRTCOptions as O, OpenRTCClient as a, OpenRTCAccessMode as b, OpenRTCAttestationProvider as c, OpenRTCAuthProvider as d, OpenRTCBotVerificationProvider as e, OpenRTCCapabilityHandle as f, OpenRTCChannel as g, OpenRTCChannelCatalog as h, OpenRTCConnection as i, OpenRTCDeviceProfile as j, OpenRTCDevicesHandle as k, OpenRTCDevicesStartOptions as l, OpenRTCEnrolledDevice as m, OpenRTCLatestStateMode as n, OpenRTCRoomHandle as o, OpenRTCRoomJoinOptions as p, OpenRTCSpaceHandle as q, OpenRTCSpaceJoinOptions as r, OpenRTCState as s, OpenRTCTicketHandle as t, OpenRTCTicketIssueOptions as u, OpenRTCTransportPreferences as v, OpenRTCUsageNamespace as w, OpenRTCUsageUpdate as x, OpenRTCUsageWarning as y };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openrtc",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -43,18 +43,10 @@
|
|
|
43
43
|
"types": "./dist/testing.d.ts",
|
|
44
44
|
"import": "./dist/testing.js"
|
|
45
45
|
},
|
|
46
|
-
"./auth": {
|
|
47
|
-
"types": "./dist/auth/index.d.ts",
|
|
48
|
-
"import": "./dist/auth/index.js"
|
|
49
|
-
},
|
|
50
46
|
"./runtime": {
|
|
51
47
|
"types": "./dist/runtime/index.d.ts",
|
|
52
48
|
"import": "./dist/runtime/index.js"
|
|
53
49
|
},
|
|
54
|
-
"./runtime/legacy": {
|
|
55
|
-
"types": "./dist/runtime/legacy.d.ts",
|
|
56
|
-
"import": "./dist/runtime/legacy.js"
|
|
57
|
-
},
|
|
58
50
|
"./runtime/device-status": {
|
|
59
51
|
"types": "./dist/runtime/device-status.d.ts",
|
|
60
52
|
"import": "./dist/runtime/device-status.js"
|
|
@@ -63,18 +55,10 @@
|
|
|
63
55
|
"types": "./dist/runtime/WasmRuntimeAdapter.d.ts",
|
|
64
56
|
"import": "./dist/runtime/WasmRuntimeAdapter.js"
|
|
65
57
|
},
|
|
66
|
-
"./runtime/tauri": {
|
|
67
|
-
"types": "./dist/runtime/tauri.d.ts",
|
|
68
|
-
"import": "./dist/runtime/tauri.js"
|
|
69
|
-
},
|
|
70
58
|
"./transport": {
|
|
71
59
|
"types": "./dist/transport/index.d.ts",
|
|
72
60
|
"import": "./dist/transport/index.js"
|
|
73
61
|
},
|
|
74
|
-
"./auth/internal": {
|
|
75
|
-
"types": "./dist/auth/internal.d.ts",
|
|
76
|
-
"import": "./dist/auth/internal.js"
|
|
77
|
-
},
|
|
78
62
|
"./package.json": "./package.json"
|
|
79
63
|
},
|
|
80
64
|
"scripts": {
|
|
@@ -84,8 +68,8 @@
|
|
|
84
68
|
"build:clean": "rm -rf dist && pnpm run build",
|
|
85
69
|
"release:prepare": "pnpm run build:wasm && pnpm run build:clean && pnpm run check:lightweight-entry && pnpm run check:native-bundle",
|
|
86
70
|
"build:types": "tsc --noEmit",
|
|
87
|
-
"build:wasm": "cd ../../crates/openrtc && OPENRTC_REPO_ROOT=$(cd ../.. && pwd) && CARGO_REGISTRY_ROOT=${CARGO_HOME:-$HOME/.cargo} && RUSTUP_TOOLCHAIN=nightly RUSTFLAGS=\"-Zlocation-detail=none --remap-path-prefix=$HOME=/home --remap-path-prefix=$CARGO_REGISTRY_ROOT=/cargo --remap-path-prefix=$OPENRTC_REPO_ROOT=/openrtc\" wasm-pack build --target web --out-dir ../../packages/openrtc/wasm . && rm -rf ../../packages/openrtc/wasm/.gitignore",
|
|
88
|
-
"build:wasm:legacy": "cd ../../crates/openrtc && OPENRTC_REPO_ROOT=$(cd ../.. && pwd) && CARGO_REGISTRY_ROOT=${CARGO_HOME:-$HOME/.cargo} && RUSTUP_TOOLCHAIN=nightly RUSTFLAGS=\"-Zlocation-detail=none --remap-path-prefix=$HOME=/home --remap-path-prefix=$CARGO_REGISTRY_ROOT=/cargo --remap-path-prefix=$OPENRTC_REPO_ROOT=/openrtc\" wasm-pack build --target web --out-dir ../../packages/openrtc/wasm . --features legacy-v1 && rm -rf ../../packages/openrtc/wasm/.gitignore",
|
|
71
|
+
"build:wasm": "cd ../../crates/openrtc && OPENRTC_REPO_ROOT=$(cd ../.. && pwd) && CARGO_REGISTRY_ROOT=${CARGO_HOME:-$HOME/.cargo} && RUSTUP_TOOLCHAIN=nightly RUSTFLAGS=\"-Zlocation-detail=none --remap-path-prefix=$HOME=/home --remap-path-prefix=$CARGO_REGISTRY_ROOT=/cargo --remap-path-prefix=$OPENRTC_REPO_ROOT=/openrtc\" wasm-pack build --target web --out-dir ../../packages/openrtc/wasm . --features iroh-protocols-wasm,iroh-transport-webrtc,iroh-transport-moq && rm -rf ../../packages/openrtc/wasm/.gitignore",
|
|
72
|
+
"build:wasm:legacy": "cd ../../crates/openrtc && OPENRTC_REPO_ROOT=$(cd ../.. && pwd) && CARGO_REGISTRY_ROOT=${CARGO_HOME:-$HOME/.cargo} && RUSTUP_TOOLCHAIN=nightly RUSTFLAGS=\"-Zlocation-detail=none --remap-path-prefix=$HOME=/home --remap-path-prefix=$CARGO_REGISTRY_ROOT=/cargo --remap-path-prefix=$OPENRTC_REPO_ROOT=/openrtc\" wasm-pack build --target web --out-dir ../../packages/openrtc/wasm . --features legacy-v1,iroh-protocols-wasm,iroh-transport-webrtc,iroh-transport-moq && rm -rf ../../packages/openrtc/wasm/.gitignore",
|
|
89
73
|
"test": "pnpm run test:deterministic && pnpm run test:emulator",
|
|
90
74
|
"test:deterministic": "OPENRTC_DETERMINISTIC_TESTS=1 vitest run tests/unit tests/contract",
|
|
91
75
|
"test:emulator": "node ../../tests/emulator/run-emulator-suite.mjs",
|
|
@@ -107,14 +91,6 @@
|
|
|
107
91
|
"@noble/hashes": "^1.8.0",
|
|
108
92
|
"tweetnacl": "^1.0.3"
|
|
109
93
|
},
|
|
110
|
-
"peerDependencies": {
|
|
111
|
-
"firebase": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0"
|
|
112
|
-
},
|
|
113
|
-
"peerDependenciesMeta": {
|
|
114
|
-
"firebase": {
|
|
115
|
-
"optional": true
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
94
|
"devDependencies": {
|
|
119
95
|
"@types/node": "^20.0.0",
|
|
120
96
|
"@vitest/coverage-v8": "^4.0.18",
|