openrtc 2.0.1 → 2.2.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 +11 -8
- package/dist/{DelegatingRuntimeAdapter-fgz5OPQx.d.ts → DelegatingRuntimeAdapter-BkLR3TNN.d.ts} +33 -31
- package/dist/{ITransport-UNOXiRJD.d.ts → ITransport-yaruAmx3.d.ts} +48 -84
- package/dist/{IpcRuntimeAdapter-CI3vCzk0.d.ts → IpcRuntimeAdapter-DDKeQ6UC.d.ts} +6 -6
- package/dist/WasmBridge-DVQ2YPRB.js +1 -0
- package/dist/{assembly-CLdwe5T-.d.ts → assembly-BTzwQuwI.d.ts} +67 -74
- package/dist/{capabilities-BUe5YldR.d.ts → capabilities-BwzPe51I.d.ts} +19 -19
- package/dist/chunk-2IRNZN3N.js +1 -0
- package/dist/chunk-4MLJXEVV.js +2 -0
- package/dist/chunk-AJQVMVYW.js +1 -0
- package/dist/chunk-BOS554IK.js +2 -0
- package/dist/chunk-DI5VSZ2T.js +2 -0
- package/dist/chunk-F4BJ72HN.js +1 -0
- package/dist/{chunk-LRT5GEGH.js → chunk-FKEKINIM.js} +2 -2
- package/dist/chunk-GND6UW37.js +1 -0
- package/dist/{chunk-Z2WVSXPW.js → chunk-HUG5AX7R.js} +1 -1
- package/dist/chunk-LN4ALFT6.js +1 -0
- package/dist/chunk-NXM5ZGHD.js +2 -0
- package/dist/chunk-OUFHVLDQ.js +2 -0
- package/dist/chunk-SUWCBTBQ.js +1 -0
- package/dist/chunk-UGZJJQPM.js +3 -0
- package/dist/chunk-ZA44REGI.js +2 -0
- package/dist/controlPlane-JJFURVOX.js +1 -0
- package/dist/{OpenRTCShared.d.ts → coreClient.d.ts} +61 -66
- package/dist/coreClient.js +1 -0
- package/dist/{deviceEnrollment-33NZEARB.js → deviceEnrollment-Z2EHP2EX.js} +1 -1
- package/dist/deviceKey-Y35WSEQQ.js +1 -0
- package/dist/deviceProfile-CR2C7OYR.js +2 -0
- package/dist/index.d.ts +30 -30
- package/dist/index.js +1 -1
- package/dist/{ipc-CflAVodw.d.ts → ipc-CPnNwv6f.d.ts} +3 -3
- package/dist/ipcFactory-DQFK65VE.js +1 -0
- package/dist/openrtc-INQDCF23.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 +10 -10
- package/dist/runtime/device-status.js +1 -1
- package/dist/runtime/factories.d.ts +8 -8
- package/dist/runtime/factories.js +1 -1
- package/dist/runtime/index.d.ts +50 -50
- package/dist/runtime/index.js +1 -1
- package/dist/testing.d.ts +29 -28
- package/dist/testing.js +1 -1
- package/dist/transport/index.d.ts +24 -24
- package/dist/transport/index.js +1 -1
- package/dist/{types-DhmY9hBy.d.ts → types-C4TIUgOJ.d.ts} +74 -70
- package/dist/{types-l3m3GrOe.d.ts → types-D67HlF0p.d.ts} +58 -102
- package/package.json +2 -6
- package/dist/OpenRTCShared.js +0 -1
- package/dist/WasmBridge-P5646IVR.js +0 -1
- package/dist/chunk-45WBH7E3.js +0 -1
- package/dist/chunk-5OTF7W2N.js +0 -3
- package/dist/chunk-7FPG3MFF.js +0 -2
- package/dist/chunk-AG2F6MOB.js +0 -1
- package/dist/chunk-CWGKLGJZ.js +0 -1
- package/dist/chunk-HIXXBEWX.js +0 -1
- package/dist/chunk-IKZ33R7R.js +0 -2
- package/dist/chunk-KJTJLLJE.js +0 -2
- package/dist/chunk-QCPSLUKO.js +0 -1
- package/dist/chunk-VBUDERMM.js +0 -2
- package/dist/chunk-XPL7PUBW.js +0 -2
- package/dist/chunk-Y35AKFCM.js +0 -1
- package/dist/chunk-ZQF5KSOK.js +0 -2
- package/dist/controlPlane-YAMXWHAF.js +0 -1
- package/dist/deviceKey-SBNKLVYF.js +0 -1
- package/dist/deviceProfile-3BEQZLJF.js +0 -2
- package/dist/ipcFactory-JTMNUTZI.js +0 -1
- package/dist/native.d.ts +0 -15
- package/dist/native.js +0 -1
- package/dist/openrtc-JUV7TOTL.js +0 -2
- /package/dist/{deviceManagement-PHY5TIOS.js → deviceManagement-SUMBRXXC.js} +0 -0
- /package/dist/{deviceRoster-VZA3TQOR.js → deviceRoster-EUF6BBF5.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '../ITransport-
|
|
1
|
+
import { e as RuntimeDevice, D as DeviceStatus } from '../types-D67HlF0p.js';
|
|
2
|
+
import '../ITransport-yaruAmx3.js';
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
interface DeviceActiveOptions {
|
|
5
5
|
now?: number;
|
|
6
6
|
/**
|
|
7
7
|
* Optional local freshness window for durable roster rows. Leave undefined
|
|
@@ -10,15 +10,15 @@ interface RuntimeDeviceActiveOptions {
|
|
|
10
10
|
staleAfterMs?: number;
|
|
11
11
|
}
|
|
12
12
|
type RuntimeDeviceActivityStatus = Pick<Partial<RuntimeDevice>, 'online' | 'lastSeenAt' | 'updatedAt' | 'createdAt' | 'expiresAt'>;
|
|
13
|
-
type RuntimeDeviceRouteStatus = Pick<Partial<
|
|
14
|
-
type
|
|
13
|
+
type RuntimeDeviceRouteStatus = Pick<Partial<DeviceStatus>, 'settledReady' | 'readinessState' | 'connectionStatus'>;
|
|
14
|
+
type DevicePresence = Pick<RuntimeDevice, 'online' | 'ticket'> & Pick<Partial<DeviceStatus>, 'connectable' | 'presenceStatus' | 'online' | 'ticket'>;
|
|
15
15
|
/**
|
|
16
16
|
* True when a runtime device row is currently live enough to display or
|
|
17
17
|
* consider for app-level routing. This is deliberately separate from
|
|
18
|
-
* `
|
|
18
|
+
* `isDeviceConnectable`: a peer can be active/present before it has a
|
|
19
19
|
* usable ticket, and a stale durable row should not keep app UIs alive.
|
|
20
20
|
*/
|
|
21
|
-
declare function
|
|
21
|
+
declare function isDeviceActive(device: RuntimeDeviceActivityStatus, options?: DeviceActiveOptions): boolean;
|
|
22
22
|
/**
|
|
23
23
|
* True once OpenRTC has a routable peer projection for normal app payloads.
|
|
24
24
|
*
|
|
@@ -27,11 +27,11 @@ declare function isRuntimeDeviceActive(device: RuntimeDeviceActivityStatus, opti
|
|
|
27
27
|
* are not proof that an application-level protocol has exchanged its own
|
|
28
28
|
* ready/capability message over the mesh.
|
|
29
29
|
*/
|
|
30
|
-
declare function
|
|
30
|
+
declare function isDeviceRoutable(device: RuntimeDeviceRouteStatus): boolean;
|
|
31
31
|
/**
|
|
32
32
|
* True when the discovery row currently has enough fresh presence to attempt
|
|
33
33
|
* a dial. This is a discovery gate, not a connected/readiness gate.
|
|
34
34
|
*/
|
|
35
|
-
declare function
|
|
35
|
+
declare function isDeviceConnectable(device: DevicePresence): boolean;
|
|
36
36
|
|
|
37
|
-
export { type
|
|
37
|
+
export { type DeviceActiveOptions, isDeviceActive, isDeviceConnectable, isDeviceRoutable };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as
|
|
1
|
+
export{a as isDeviceActive,c as isDeviceConnectable,b as isDeviceRoutable}from'../chunk-CK6WQV7J.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { c as RuntimeFactoryOptions, b as PlutoRuntimeAssembly } from '../assembly-
|
|
2
|
-
import { I as IpcRuntimeAdapter } from '../IpcRuntimeAdapter-
|
|
3
|
-
import { W as WasmBridge } from '../DelegatingRuntimeAdapter-
|
|
4
|
-
import { P as PlutoIpcBridge } from '../ipc-
|
|
5
|
-
import '../types-
|
|
6
|
-
import '../ITransport-
|
|
7
|
-
import '../capabilities-
|
|
1
|
+
import { c as RuntimeFactoryOptions, b as PlutoRuntimeAssembly } from '../assembly-BTzwQuwI.js';
|
|
2
|
+
import { I as IpcRuntimeAdapter } from '../IpcRuntimeAdapter-DDKeQ6UC.js';
|
|
3
|
+
import { W as WasmBridge } from '../DelegatingRuntimeAdapter-BkLR3TNN.js';
|
|
4
|
+
import { P as PlutoIpcBridge } from '../ipc-CPnNwv6f.js';
|
|
5
|
+
import '../types-D67HlF0p.js';
|
|
6
|
+
import '../ITransport-yaruAmx3.js';
|
|
7
|
+
import '../capabilities-BwzPe51I.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @deprecated Legacy assembly helper. Use `OpenRTC()` for app code.
|
|
@@ -13,7 +13,7 @@ import '../capabilities-BUe5YldR.js';
|
|
|
13
13
|
declare function createWasmClient(options: RuntimeFactoryOptions): Promise<PlutoRuntimeAssembly<WasmBridge>>;
|
|
14
14
|
/**
|
|
15
15
|
* @deprecated Legacy assembly helper. Native applications should use
|
|
16
|
-
* `
|
|
16
|
+
* `OpenRTC.native` from `openrtc`.
|
|
17
17
|
* Removal target: OpenRTC 0.2.0.
|
|
18
18
|
*/
|
|
19
19
|
declare function createIpcClient(options: RuntimeFactoryOptions, bridge: PlutoIpcBridge): PlutoRuntimeAssembly<IpcRuntimeAdapter>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$2}from'../chunk-
|
|
1
|
+
import {a as a$2}from'../chunk-GND6UW37.js';import {t,a as a$3}from'../chunk-UGZJJQPM.js';import'../chunk-HUG5AX7R.js';import'../chunk-DUY34MGT.js';import'../chunk-F4BJ72HN.js';import'../chunk-OUFHVLDQ.js';import'../chunk-AJQVMVYW.js';import {a as a$1}from'../chunk-NXM5ZGHD.js';import'../chunk-NRXEG5GQ.js';import'../chunk-FKEKINIM.js';import'../chunk-SUWCBTBQ.js';import'../chunk-LN4ALFT6.js';var n=false;function a(){n||(n=true,a$3(async()=>{let t=await import('../openrtc-INQDCF23.js');return {initWasm:t.default,WasmClient:t.WasmClient,start:t.start}}));}async function d(t){a();let e=a$1(t),{WasmBridge:i}=await import('../WasmBridge-DVQ2YPRB.js');return a$2(e,new i(e))}function y(t$1,e){let i=a$1(t$1);return a$2(i,new t({...i,bridge:e}))}export{y as createIpcClient,d as createWasmClient};
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { C as Connection, D as RuntimeConnectionTarget, s as RuntimeRawConnection } from '../types-l3m3GrOe.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-l3m3GrOe.js';
|
|
1
|
+
import { a as PeerReconciliationStats } from '../assembly-BTzwQuwI.js';
|
|
2
|
+
export { D as ConnectionActor, d as ConnectionActorError, e as ConnectionActorErrorKind, f as ConnectionActorKey, g as ConnectionActorOptions, h as ConnectionActorState, i as ConnectionActors, j as ConnectionClose, k as ConnectionDial, l as LogicalChannel, P as PolicySnapshot, m as PreferredTransport, n as RUNTIME_POLICY, R as RuntimeClient, o as connectionActorKey, p as connectionActorKeyString, q as getRuntimePolicy } from '../assembly-BTzwQuwI.js';
|
|
3
|
+
import { Client as Client$1 } from '../coreClient.js';
|
|
4
|
+
import { b as Avenue } from '../types-C4TIUgOJ.js';
|
|
7
5
|
import * as Draft14 from '@moq/net';
|
|
8
|
-
import { a7 as SignalingOptions, I as ISignalingBackend,
|
|
9
|
-
import {
|
|
10
|
-
export { B as
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
|
|
6
|
+
import { a7 as SignalingOptions, I as ISignalingBackend, m as RuntimeIdentity, l as RoomMember, n as SignalingEnvelope, u as SignalingSession, D as Device, r as DesiredPeerProjection, w as BackendConnectionState, a6 as AppLimits, G as GrantScope, Y as JoinRoomOptions, W as ChannelMetadata, a2 as CryptoStreams, a8 as RoomCreationMode, h as ClientOptions, z as PayloadCrypto, k as DiscoveryMode, a1 as ProtocolCapabilityMap, a9 as ScanningLoopOptions, aa as ScanningLoopHandle, ab as RuntimeBootstrapOptions, ac as RuntimeBootstrapResult, F as ApplicationPayloadReadinessOptions, ad as ManagedApplicationRouteOptions, Q as PeerState, T as PeerScope, U as PeerHealth, V as ChannelDescriptor, ae as JoinRequest, N as NativeConnectParams, t as NativeConnectResult } from '../ITransport-yaruAmx3.js';
|
|
7
|
+
import { a as Connection, t as ConnectionTarget, m as RawConnection } from '../types-D67HlF0p.js';
|
|
8
|
+
export { v as AutoConnectPolicy, B as BrowserProtocolStore, C as ChannelDescriptor, w as ChannelFraming, i as ConnectionEvent, g as ConnectionState, x as ConnectionStatus, k as DeviceConnectOptions, y as DevicePresence, l as DeviceProfile, D as DeviceStatus, I as IncomingStream, q as IrohDocEntry, p as IrohMutationReceipt, J as JoinRoomOptions, L as LocalDeviceInfo, M as ManagedOptions, j as ManagedSession, N as NamespaceDescriptor, z as PayloadRouteOptions, P as PeerConnectOptions, E as PeerLifecycleStatus, b as PeerReadiness, F as PeerSessionSnapshot, d as PeerStreamOptions, u as PresenceLoopOptions, G as PresencePolicy, h as ReadinessOptions, H as RuntimeAuthContext, r as RuntimeAuthIdentity, o as RuntimeClientOptions, e as RuntimeDevice, c as RuntimePeerHealth, K as RuntimePeerScope, R as RuntimePeerState, n as RuntimeRoomMember, s as RuntimeSession, S as ScopedChannelOptions, f as ScopedLogicalChannel, O as SessionKind, Q as SessionPlatform } from '../types-D67HlF0p.js';
|
|
9
|
+
import { R as RuntimeCapabilities } from '../capabilities-BwzPe51I.js';
|
|
10
|
+
export { B as BROWSER_CAPABILITIES, a as CapabilityHost, C as CapabilityProfile, N as NATIVE_CAPABILITIES, b as NativeRuntimeStatus, c as RuntimeAdapterKind, T as TransportStatus, d as browserCapabilities, e as capabilityProfile, f as cloneCapabilities, s as statusCapabilities } from '../capabilities-BwzPe51I.js';
|
|
11
|
+
export { DeviceActiveOptions, isDeviceActive, isDeviceConnectable, isDeviceRoutable } from './device-status.js';
|
|
12
|
+
export { a as IpcAdapterOptions, I as IpcRuntimeAdapter } from '../IpcRuntimeAdapter-DDKeQ6UC.js';
|
|
13
|
+
export { P as NativeBridge, N as NativeIpcFailureKind, P as PlutoIpcBridge, a as PlutoIpcUnlisten, c as classifyIpcFailure, i as isIpcUnavailable } from '../ipc-CPnNwv6f.js';
|
|
14
|
+
import '../DelegatingRuntimeAdapter-BkLR3TNN.js';
|
|
15
15
|
|
|
16
16
|
declare class Signaling {
|
|
17
17
|
private readonly appTag;
|
|
@@ -29,12 +29,12 @@ declare class Signaling {
|
|
|
29
29
|
signInAnonymously(): Promise<void>;
|
|
30
30
|
signInWithPluto(): Promise<void>;
|
|
31
31
|
signOut(): Promise<void>;
|
|
32
|
-
|
|
32
|
+
stopAuthActivity(): Promise<void>;
|
|
33
33
|
setCoordinationHostAvailability(input: {
|
|
34
34
|
available: boolean;
|
|
35
35
|
reason: string;
|
|
36
36
|
}): void;
|
|
37
|
-
|
|
37
|
+
capabilities(): RuntimeCapabilities | undefined;
|
|
38
38
|
getTurnCredentials(): Promise<any>;
|
|
39
39
|
updatePresence(localNodeId: string, ticketStr: string, isOnline?: boolean, ttlMs?: number, metadata?: string): Promise<void>;
|
|
40
40
|
setOffline(localNodeId: string): Promise<void>;
|
|
@@ -55,21 +55,21 @@ declare class Signaling {
|
|
|
55
55
|
submitDesiredPeerProjection(revision: number, peers: DesiredPeerProjection[]): Promise<void>;
|
|
56
56
|
notifyDisconnectRequested(remoteNodeId: string): void;
|
|
57
57
|
startPresenceLoop(userId: string, localNodeId: string, deviceName: string, ticket: string, metadata?: string): void;
|
|
58
|
-
|
|
58
|
+
forceReconnect(): void;
|
|
59
59
|
isConnected(nodeId: string): Promise<boolean>;
|
|
60
60
|
getConnectionStates(): Promise<BackendConnectionState[]>;
|
|
61
|
-
|
|
61
|
+
onStateChange(callback: (state: BackendConnectionState) => void): (() => void) | Promise<() => void>;
|
|
62
62
|
supportsRustPeerLifecycleProjection(): boolean;
|
|
63
63
|
setWasmClient(client: any): void;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
type
|
|
66
|
+
type CapabilityRuntime = Client$1;
|
|
67
67
|
/**
|
|
68
68
|
* Low-level escape hatch used only by `openrtc/runtime`. Product code should
|
|
69
69
|
* prefer the capability namespaces. Keeping this registry here prevents a
|
|
70
70
|
* runtime pointer from leaking onto the provider-neutral root surface.
|
|
71
71
|
*/
|
|
72
|
-
declare function runtimeForCapability(handle:
|
|
72
|
+
declare function runtimeForCapability(handle: Avenue): CapabilityRuntime;
|
|
73
73
|
|
|
74
74
|
interface MoQSubscriberOptions {
|
|
75
75
|
maxPendingSubscriptions?: number;
|
|
@@ -247,16 +247,16 @@ declare class RoomManager {
|
|
|
247
247
|
stopHeartbeat(_roomId?: string): void;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
type
|
|
251
|
-
type
|
|
250
|
+
type ProtocolHint = 'control' | 'explicit' | 'native-main' | 'unknown';
|
|
251
|
+
type IncomingStreamEvent = {
|
|
252
252
|
type: 'bi' | 'uni';
|
|
253
253
|
stream: any;
|
|
254
254
|
remoteNodeId: string;
|
|
255
255
|
transportStableId?: number;
|
|
256
256
|
traceId?: string;
|
|
257
|
-
protocolHint?:
|
|
258
|
-
channel?:
|
|
259
|
-
applicationCrypto?:
|
|
257
|
+
protocolHint?: ProtocolHint;
|
|
258
|
+
channel?: ChannelMetadata | null;
|
|
259
|
+
applicationCrypto?: CryptoStreams;
|
|
260
260
|
invalid?: boolean;
|
|
261
261
|
};
|
|
262
262
|
|
|
@@ -277,10 +277,10 @@ declare class Client {
|
|
|
277
277
|
get node(): any;
|
|
278
278
|
set node(node: any);
|
|
279
279
|
attachIncomingStreamSource(source: unknown, localNodeId: string): void;
|
|
280
|
-
getApplicationCrypto(connection?: Connection):
|
|
281
|
-
resolveApplicationCryptoForPeer(peerId?: string, connection?: Connection):
|
|
280
|
+
getApplicationCrypto(connection?: Connection): PayloadCrypto | undefined;
|
|
281
|
+
resolveApplicationCryptoForPeer(peerId?: string, connection?: Connection): PayloadCrypto | undefined;
|
|
282
282
|
releaseApplicationKeyAgreementReply(connectionId: string, action: 'response' | 'ack', claimId: string): void;
|
|
283
|
-
waitForApplicationCryptoForPeer(peerId?: string, timeoutMs?: number): Promise<
|
|
283
|
+
waitForApplicationCryptoForPeer(peerId?: string, timeoutMs?: number): Promise<PayloadCrypto | undefined>;
|
|
284
284
|
destroy(): void;
|
|
285
285
|
dispose(): void;
|
|
286
286
|
get apiKey(): string | undefined;
|
|
@@ -298,7 +298,7 @@ declare class Client {
|
|
|
298
298
|
wasmLoaded: boolean;
|
|
299
299
|
peerReconciliation: Readonly<PeerReconciliationStats>;
|
|
300
300
|
};
|
|
301
|
-
|
|
301
|
+
reconciliationStats(): Readonly<PeerReconciliationStats>;
|
|
302
302
|
getProtocolCapabilities(): ProtocolCapabilityMap;
|
|
303
303
|
getRuntimeStatus(): Promise<{
|
|
304
304
|
runtime: 'tauri' | 'browser' | 'unknown';
|
|
@@ -346,7 +346,7 @@ declare class Client {
|
|
|
346
346
|
}>;
|
|
347
347
|
openUni(peerId: string): Promise<WritableStream<Uint8Array>>;
|
|
348
348
|
getConnections(): Connection[];
|
|
349
|
-
|
|
349
|
+
readyConnections(options?: ApplicationPayloadReadinessOptions): Connection[];
|
|
350
350
|
getConnectionForPeer(connectionId?: string, remoteNodeId?: string): Connection | null;
|
|
351
351
|
hasApplicationRouteForPeer(connectionId?: string, remoteNodeId?: string): boolean;
|
|
352
352
|
ensureManagedApplicationRoute(options: ManagedApplicationRouteOptions): Promise<Connection>;
|
|
@@ -370,7 +370,7 @@ declare class Client {
|
|
|
370
370
|
scope?: PeerScope;
|
|
371
371
|
channelId?: string;
|
|
372
372
|
timeoutMs?: number;
|
|
373
|
-
|
|
373
|
+
keepManualDisconnect?: boolean;
|
|
374
374
|
}): Promise<Connection>;
|
|
375
375
|
clearManualDisconnectProjection(id: string): void;
|
|
376
376
|
disconnectPeer(id: string, scope?: PeerScope): Promise<void>;
|
|
@@ -379,7 +379,7 @@ declare class Client {
|
|
|
379
379
|
getTicket(): Promise<string>;
|
|
380
380
|
getNodeId(): Promise<string>;
|
|
381
381
|
getNodeIdFromTicket(ticket: string): Promise<string | null>;
|
|
382
|
-
|
|
382
|
+
getTicketWithToken(grantScope: GrantScope, maxConnections?: number): Promise<string>;
|
|
383
383
|
buildCompoundTicketWithToken(irohTicket: string, grantScope: GrantScope, maxConnections?: number): string;
|
|
384
384
|
setManagedPresenceTicket(ticket: string | null): void;
|
|
385
385
|
clearManagedPresenceTicket(): void;
|
|
@@ -401,17 +401,17 @@ declare class Client {
|
|
|
401
401
|
startPresence?: boolean;
|
|
402
402
|
}): Promise<void>;
|
|
403
403
|
stopListening(): void;
|
|
404
|
-
|
|
404
|
+
forceReconnect(): void;
|
|
405
405
|
wrapChannelWritable(writable: WritableStream<Uint8Array>, channelId: string, metadata?: Record<string, unknown> | null): WritableStream<Uint8Array>;
|
|
406
406
|
updatePresence(isOnline?: boolean, ttlMs?: number, metadata?: string, ticketOverride?: string): Promise<void>;
|
|
407
407
|
onConnection(callback: (conn: Connection) => void): () => void;
|
|
408
408
|
onDisconnection(callback: (conn: Connection) => void): () => void;
|
|
409
409
|
onMessage(callback: (conn: Connection, msg: any) => void): () => void;
|
|
410
|
-
onIncomingStream(callback: (stream:
|
|
410
|
+
onIncomingStream(callback: (stream: IncomingStreamEvent) => boolean | void): () => void;
|
|
411
411
|
registerChannel(descriptor: ChannelDescriptor): void;
|
|
412
412
|
unregisterChannel(channelId: string): void;
|
|
413
413
|
listChannels(): ChannelDescriptor[];
|
|
414
|
-
|
|
414
|
+
onChannelStream(channelId: string, callback: (stream: IncomingStreamEvent) => boolean | void): () => void;
|
|
415
415
|
onRoomJoinRequest(callback: (request: JoinRequest) => void): () => void;
|
|
416
416
|
isMoQDataReady(peerId: string | null): boolean;
|
|
417
417
|
sendMoQData(peerId: string | null, data: Uint8Array, options?: {
|
|
@@ -426,13 +426,13 @@ declare class Client {
|
|
|
426
426
|
* readiness, and channel orchestration remain in their existing managers until
|
|
427
427
|
* those boundaries can be tightened independently.
|
|
428
428
|
*/
|
|
429
|
-
declare class
|
|
429
|
+
declare class ConnectionController {
|
|
430
430
|
private readonly client;
|
|
431
431
|
private readonly backend;
|
|
432
432
|
private readonly onLifecycleMutation;
|
|
433
433
|
constructor(client: Client, backend: ISignalingBackend | null, onLifecycleMutation?: () => void);
|
|
434
434
|
connectToDevice(params: NativeConnectParams): Promise<NativeConnectResult>;
|
|
435
|
-
connectRaw(target:
|
|
435
|
+
connectRaw(target: ConnectionTarget): Promise<RawConnection>;
|
|
436
436
|
openBi(nodeId: string): Promise<{
|
|
437
437
|
readable: ReadableStream<Uint8Array>;
|
|
438
438
|
writable: WritableStream<Uint8Array>;
|
|
@@ -441,7 +441,7 @@ declare class RuntimeConnectionController {
|
|
|
441
441
|
isConnected(nodeId: string): Promise<boolean>;
|
|
442
442
|
disconnectNode(nodeId: string): Promise<void>;
|
|
443
443
|
disconnectDevice(deviceId: string): Promise<void>;
|
|
444
|
-
|
|
444
|
+
excludeAutoConnect(deviceId: string, excluded: boolean): Promise<void>;
|
|
445
445
|
disconnectPeer(id: string, scope?: string): Promise<void>;
|
|
446
446
|
forceDisconnectPeer(id: string): Promise<void>;
|
|
447
447
|
private clearManualDisconnectProjection;
|
|
@@ -484,9 +484,9 @@ interface CorrelationFields {
|
|
|
484
484
|
* the Phase 0 parser's primary regex set). Empty fields are dropped.
|
|
485
485
|
* Exposed for tests.
|
|
486
486
|
*/
|
|
487
|
-
declare function
|
|
487
|
+
declare function renderCorrelation(fields: CorrelationFields): string;
|
|
488
488
|
/** @deprecated Use correlationForScope() */
|
|
489
|
-
declare function
|
|
489
|
+
declare function grantCorrelation(scope: string, extra?: CorrelationFields): CorrelationFields;
|
|
490
490
|
/**
|
|
491
491
|
* Phase 7 structured-log call. Emits a single `console.log` line of the
|
|
492
492
|
* form `<tag> <fields> <message>` — the exact shape the Phase 0
|
|
@@ -505,7 +505,7 @@ declare function clog(tag: string, fields: CorrelationFields, message?: string,
|
|
|
505
505
|
* Stack lines are tagged `[OpenRTC][teardown-trace:stack]`.
|
|
506
506
|
* Native / Tauri: run with `PLUTO_RTC_TEARDOWN_TRACE=1` to log matching Rust iroh disconnect lines to stderr.
|
|
507
507
|
*/
|
|
508
|
-
declare function
|
|
508
|
+
declare function logTeardownTrace(kind: string, details?: Record<string, unknown>): void;
|
|
509
509
|
|
|
510
510
|
declare function openRtcDebugEnabled(): boolean;
|
|
511
511
|
declare function openRtcDebug(message: string, data?: unknown): void;
|
|
@@ -526,18 +526,18 @@ declare function openRtcDebugLog(message: string, data?: unknown): void;
|
|
|
526
526
|
type ByteArray = Uint8Array<ArrayBuffer>;
|
|
527
527
|
type ByteArrayLike = Uint8Array<ArrayBufferLike>;
|
|
528
528
|
|
|
529
|
-
type
|
|
530
|
-
type
|
|
531
|
-
interface
|
|
529
|
+
type U32FrameHandler = (payload: ByteArray) => void;
|
|
530
|
+
type JsonFrameHandler<T = unknown> = (value: T, payload: ByteArray) => void;
|
|
531
|
+
interface JsonDecoderOptions {
|
|
532
532
|
onInvalidJson?: (error: unknown, payload: ByteArray) => void;
|
|
533
533
|
}
|
|
534
|
-
declare function
|
|
535
|
-
declare function
|
|
536
|
-
declare function
|
|
537
|
-
declare function
|
|
538
|
-
declare function
|
|
539
|
-
declare function
|
|
534
|
+
declare function encodeU32Frame(payload: ByteArrayLike): ByteArray;
|
|
535
|
+
declare function createU32Decoder(onFrame: U32FrameHandler): (chunk: ByteArrayLike) => void;
|
|
536
|
+
declare function encodeJsonPayload(value: unknown): ByteArray;
|
|
537
|
+
declare function decodeJsonPayload<T = unknown>(payload: ByteArrayLike): T;
|
|
538
|
+
declare function encodeJsonFrame(value: unknown): ByteArray;
|
|
539
|
+
declare function createJsonDecoder<T = unknown>(onValue: JsonFrameHandler<T>, options?: JsonDecoderOptions): (chunk: ByteArrayLike) => void;
|
|
540
540
|
declare function concatRuntimeBytes(a: ByteArrayLike, b: ByteArrayLike): ByteArray;
|
|
541
541
|
declare function readRuntimeU32BE(bytes: ByteArrayLike, offset: number): number;
|
|
542
542
|
|
|
543
|
-
export {
|
|
543
|
+
export { type CapabilityRuntime, ConnectionController, ConnectionTarget, type CorrelationFields, type JsonDecoderOptions, type JsonFrameHandler, RawConnection, RuntimeCapabilities, type U32FrameHandler, clog, concatRuntimeBytes, createJsonDecoder, createU32Decoder, decodeJsonPayload, encodeJsonFrame, encodeJsonPayload, encodeU32Frame, grantCorrelation, logTeardownTrace, openRtcDebug, openRtcDebugEnabled, openRtcDebugInfo, openRtcDebugLog, readRuntimeU32BE, renderCorrelation, runtimeForCapability as runtimeFromCapability };
|
package/dist/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as runtimeFromCapability}from'../chunk-
|
|
1
|
+
export{a as runtimeFromCapability}from'../chunk-2IRNZN3N.js';import'../chunk-ZA44REGI.js';export{a as isDeviceActive,c as isDeviceConnectable,b as isDeviceRoutable}from'../chunk-CK6WQV7J.js';export{i as ConnectionActor,f as ConnectionActorError,j as ConnectionActors,b as ConnectionController,t as IpcRuntimeAdapter,s as RuntimeClient,e as clog,q as concatRuntimeBytes,g as connectionActorKey,h as connectionActorKeyString,p as createJsonDecoder,l as createU32Decoder,n as decodeJsonPayload,o as encodeJsonFrame,m as encodeJsonPayload,k as encodeU32Frame,d as grantCorrelation,r as readRuntimeU32BE,c as renderCorrelation}from'../chunk-UGZJJQPM.js';export{a as classifyIpcFailure,b as isIpcUnavailable}from'../chunk-HUG5AX7R.js';import'../chunk-DUY34MGT.js';import'../chunk-F4BJ72HN.js';export{s as BROWSER_CAPABILITIES,t as NATIVE_CAPABILITIES,q as RUNTIME_POLICY,v as browserCapabilities,x as capabilityProfile,u as cloneCapabilities,r as getRuntimePolicy,i as logTeardownTrace,w as statusCapabilities}from'../chunk-OUFHVLDQ.js';import'../chunk-AJQVMVYW.js';import'../chunk-NXM5ZGHD.js';import'../chunk-NRXEG5GQ.js';import'../chunk-FKEKINIM.js';export{b as openRtcDebug,a as openRtcDebugEnabled,c as openRtcDebugInfo,d as openRtcDebugLog}from'../chunk-SUWCBTBQ.js';import'../chunk-LN4ALFT6.js';
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { P as PlutoIpcBridge } from './ipc-
|
|
4
|
-
import './
|
|
5
|
-
import './assembly-
|
|
6
|
-
import './types-
|
|
7
|
-
import './capabilities-
|
|
1
|
+
import { i as CoordinationGatewayGrantRequest, j as CoordinationGatewayGrant } from './ITransport-yaruAmx3.js';
|
|
2
|
+
import { A as AttestationProvider, a as AuthProvider, B as BotVerificationProvider, e as DeviceProfile, O as Options, C as Client } from './types-C4TIUgOJ.js';
|
|
3
|
+
import { P as PlutoIpcBridge } from './ipc-CPnNwv6f.js';
|
|
4
|
+
import './coreClient.js';
|
|
5
|
+
import './assembly-BTzwQuwI.js';
|
|
6
|
+
import './types-D67HlF0p.js';
|
|
7
|
+
import './capabilities-BwzPe51I.js';
|
|
8
8
|
|
|
9
|
-
interface
|
|
9
|
+
interface DeviceProof {
|
|
10
10
|
publicKeyJwk: JsonWebKey;
|
|
11
11
|
signature: string;
|
|
12
12
|
nonce: string;
|
|
13
13
|
issuedAt: number;
|
|
14
14
|
}
|
|
15
|
-
interface
|
|
15
|
+
interface DeviceKey {
|
|
16
16
|
readonly publicKeyJwk: JsonWebKey;
|
|
17
17
|
readonly thumbprint: string;
|
|
18
|
-
proof(challenge: (nonce: string, issuedAt: number) => string): Promise<
|
|
18
|
+
proof(challenge: (nonce: string, issuedAt: number) => string): Promise<DeviceProof>;
|
|
19
19
|
}
|
|
20
|
-
interface
|
|
21
|
-
getOrCreate(appTag: string): Promise<
|
|
20
|
+
interface DeviceKeyProvider {
|
|
21
|
+
getOrCreate(appTag: string): Promise<DeviceKey>;
|
|
22
22
|
delete?(appTag: string): Promise<void>;
|
|
23
23
|
/**
|
|
24
24
|
* Optional platform-secure record storage. Native hosts use this for the
|
|
@@ -30,7 +30,7 @@ interface OpenRTCDeviceKeyProvider {
|
|
|
30
30
|
deleteSecureRecord?(appTag: string, key: string): Promise<void>;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
interface
|
|
33
|
+
interface Endpoints {
|
|
34
34
|
controlPlane: string;
|
|
35
35
|
gateway: string;
|
|
36
36
|
}
|
|
@@ -60,12 +60,12 @@ interface AuthenticatedDeviceCertificate extends CachedDeviceCertificate {
|
|
|
60
60
|
principalId: string;
|
|
61
61
|
enrolled: boolean;
|
|
62
62
|
}
|
|
63
|
-
interface
|
|
63
|
+
interface ControlPlaneEvents {
|
|
64
64
|
beforeLogicalOperation?: (operation: string) => void;
|
|
65
65
|
onLogicalOperation?: (operation: string) => void;
|
|
66
|
-
onAuthEpochChanged?: (auth:
|
|
66
|
+
onAuthEpochChanged?: (auth: AuthProvider) => void;
|
|
67
67
|
}
|
|
68
|
-
declare class
|
|
68
|
+
declare class ControlPlane {
|
|
69
69
|
readonly apiKey: string;
|
|
70
70
|
private readonly endpoints;
|
|
71
71
|
private readonly keyProvider;
|
|
@@ -75,7 +75,7 @@ declare class OpenRTCV2ControlPlane {
|
|
|
75
75
|
readonly appTag: string;
|
|
76
76
|
private keyPromise;
|
|
77
77
|
private readonly authEpochs;
|
|
78
|
-
constructor(apiKey: string, endpoints:
|
|
78
|
+
constructor(apiKey: string, endpoints: Endpoints, keyProvider: DeviceKeyProvider, attestation?: AttestationProvider | undefined, events?: ControlPlaneEvents, botVerification?: BotVerificationProvider | undefined);
|
|
79
79
|
private record;
|
|
80
80
|
private before;
|
|
81
81
|
private authEpoch;
|
|
@@ -83,7 +83,7 @@ declare class OpenRTCV2ControlPlane {
|
|
|
83
83
|
private key;
|
|
84
84
|
private post;
|
|
85
85
|
capability(kind: 'space' | 'room' | 'ticket', id: string, maxPeers?: number, advancedFanout?: boolean): Promise<CredentialSource>;
|
|
86
|
-
deviceCertificate(auth:
|
|
86
|
+
deviceCertificate(auth: AuthProvider, deviceId: string, avenue?: CoordinationGatewayGrantRequest['avenue'], profile?: DeviceProfile, rejected?: AuthenticatedDeviceCertificate): Promise<{
|
|
87
87
|
source: CredentialSource;
|
|
88
88
|
principalId: string;
|
|
89
89
|
enrolled: boolean;
|
|
@@ -91,7 +91,7 @@ declare class OpenRTCV2ControlPlane {
|
|
|
91
91
|
private resolveAuthenticatedDevice;
|
|
92
92
|
private deviceCertificateResult;
|
|
93
93
|
private enrollAuthenticatedDevice;
|
|
94
|
-
listEnrolledDevices(auth:
|
|
94
|
+
listEnrolledDevices(auth: AuthProvider, deviceId: string): Promise<Array<{
|
|
95
95
|
deviceId: string;
|
|
96
96
|
name?: string;
|
|
97
97
|
platform?: string;
|
|
@@ -99,15 +99,15 @@ declare class OpenRTCV2ControlPlane {
|
|
|
99
99
|
lastGrantAtMs: number | null;
|
|
100
100
|
current: boolean;
|
|
101
101
|
}>>;
|
|
102
|
-
revokeDevice(auth:
|
|
103
|
-
revokeAllDevices(auth:
|
|
102
|
+
revokeDevice(auth: AuthProvider, currentDeviceId: string, targetDeviceId: string): Promise<void>;
|
|
103
|
+
revokeAllDevices(auth: AuthProvider, currentDeviceId: string, exceptCurrent: boolean): Promise<void>;
|
|
104
104
|
private deleteDeviceKey;
|
|
105
105
|
private deviceManagement;
|
|
106
106
|
durableRoomMembership(source: CredentialSource, roomId: string, action: 'join' | 'leave'): Promise<void>;
|
|
107
107
|
grantProvider(source: CredentialSource, input?: {
|
|
108
108
|
maxPeers?: number;
|
|
109
109
|
features?: Record<string, boolean>;
|
|
110
|
-
deviceProfile?: Pick<
|
|
110
|
+
deviceProfile?: Pick<DeviceProfile, 'name' | 'platform'>;
|
|
111
111
|
/**
|
|
112
112
|
* Keeps the transport/admission credential relay synchronized
|
|
113
113
|
* when a capability or device certificate is renewed in place.
|
|
@@ -122,12 +122,13 @@ declare class OpenRTCV2ControlPlane {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
/** Focused control-plane factory for live harnesses that do not need a transport runtime. */
|
|
125
|
-
declare function
|
|
126
|
-
declare function
|
|
125
|
+
declare function controlPlane(apiKey: string, endpoints: Endpoints, keyNamespace: string): ControlPlane;
|
|
126
|
+
declare function OpenRTC(options: Options, endpoints: Endpoints, testing?: {
|
|
127
127
|
deviceId?: string;
|
|
128
128
|
irohTestRelayUrl?: string;
|
|
129
|
-
}):
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
}): Client;
|
|
130
|
+
declare namespace OpenRTC {
|
|
131
|
+
var native: (options: Options, endpoints: Endpoints, bridge: PlutoIpcBridge) => Client;
|
|
132
|
+
}
|
|
132
133
|
|
|
133
|
-
export {
|
|
134
|
+
export { OpenRTC, controlPlane };
|
package/dist/testing.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-DI5VSZ2T.js';import {a as a$1}from'./chunk-BOS554IK.js';import {c}from'./chunk-4MLJXEVV.js';import {b}from'./chunk-2IRNZN3N.js';import'./chunk-ZA44REGI.js';import'./chunk-DUY34MGT.js';import'./chunk-NRXEG5GQ.js';function d(o){let r=e=>`${e}:${o}`;return {getOrCreate:e=>c.getOrCreate(r(e)),delete:async e=>{await c.delete?.(r(e));},readSecureRecord:(e,t)=>c.readSecureRecord?.(r(e),t)??Promise.resolve(null),writeSecureRecord:(e,t,n)=>c.writeSecureRecord?.(r(e),t,n)??Promise.resolve(),deleteSecureRecord:(e,t)=>c.deleteSecureRecord?.(r(e),t)??Promise.resolve()}}function y(o,r,e){return new a(o,r,d(e))}function s(o,r,e={}){return b(o,{endpoints:r,testingAllowInsecureLoopback:true,platform:"web",...e.deviceId?{deviceIdProvider:async()=>e.deviceId}:{},...e.irohTestRelayUrl?{irohTestRelayUrl:e.irohTestRelayUrl}:{},runtimeFactory:async t=>{let{createWasmClient:n}=await import('./runtime/factories.js');return n(t)}})}s.native=function(o,r,e){return b(o,{endpoints:r,testingAllowInsecureLoopback:true,platform:"native",deviceKeyProvider:a$1(e),deviceIdProvider:async()=>{let t=await e.invoke("get_rtc_local_device_info");return String(t?.deviceId??"")},runtimeFactory:async t=>{let{createIpcClient:n}=await import('./ipcFactory-DQFK65VE.js');return n(t,e)}})};export{s as OpenRTC,y as controlPlane};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { c as ProtocolName, $ as RouteDescriptor,
|
|
2
|
-
export { a3 as
|
|
1
|
+
import { c as ProtocolName, $ as RouteDescriptor, K as ITransport, a0 as ProtocolCapability, a1 as ProtocolCapabilityMap, z as PayloadCrypto, a2 as CryptoStreams } from '../ITransport-yaruAmx3.js';
|
|
2
|
+
export { a3 as CryptoBiStream, a4 as RouteFamily, a5 as RouteKind } from '../ITransport-yaruAmx3.js';
|
|
3
3
|
|
|
4
4
|
declare const TRANSPORT_LABELS: readonly ProtocolName[];
|
|
5
|
-
declare function
|
|
6
|
-
declare function
|
|
7
|
-
declare function
|
|
8
|
-
declare function
|
|
9
|
-
declare function
|
|
10
|
-
declare function
|
|
5
|
+
declare function normalizeTransport(value: unknown): ProtocolName | undefined;
|
|
6
|
+
declare function isBaseIroh(value: unknown): boolean;
|
|
7
|
+
declare function isDirectIroh(value: unknown): boolean;
|
|
8
|
+
declare function isOptionalTransport(value: unknown): boolean;
|
|
9
|
+
declare function isWebRtc(value: unknown): boolean;
|
|
10
|
+
declare function isIndependent(value: unknown): boolean;
|
|
11
11
|
|
|
12
12
|
declare const ROUTE_DESCRIPTORS: readonly RouteDescriptor[];
|
|
13
13
|
declare function getRouteDescriptor(id: ProtocolName): RouteDescriptor;
|
|
@@ -19,37 +19,37 @@ declare class TransportFactory {
|
|
|
19
19
|
static createTransport(name: ProtocolName): ITransport;
|
|
20
20
|
static getProtocolCapability(name: ProtocolName): ProtocolCapability;
|
|
21
21
|
static getProtocolCapabilities(): ProtocolCapabilityMap;
|
|
22
|
-
static
|
|
22
|
+
static preferredProtocols(options?: {
|
|
23
23
|
runtime?: 'browser' | 'native' | 'any';
|
|
24
24
|
includePathLabels?: boolean;
|
|
25
25
|
}): ProtocolName[];
|
|
26
26
|
static assertProtocolAvailable(name: ProtocolName): void;
|
|
27
27
|
}
|
|
28
|
-
declare function
|
|
28
|
+
declare function preferredProtocols(options?: Parameters<typeof TransportFactory.preferredProtocols>[0]): ProtocolName[];
|
|
29
29
|
|
|
30
|
-
declare function
|
|
31
|
-
declare function
|
|
30
|
+
declare function isEncryptedPayload(payload: Uint8Array): boolean;
|
|
31
|
+
declare function createSharedCrypto(key: Uint8Array, options?: {
|
|
32
32
|
requireEncrypted?: boolean;
|
|
33
33
|
randomBytes?: (byteLength: number) => Uint8Array;
|
|
34
34
|
replayProtection?: boolean;
|
|
35
|
-
}):
|
|
36
|
-
declare function
|
|
35
|
+
}): PayloadCrypto;
|
|
36
|
+
declare function createCryptoStreams(crypto: PayloadCrypto, options?: {
|
|
37
37
|
typeId?: number;
|
|
38
38
|
maxFrameBytes?: number;
|
|
39
|
-
}):
|
|
39
|
+
}): CryptoStreams;
|
|
40
40
|
|
|
41
|
-
declare const
|
|
42
|
-
declare const
|
|
43
|
-
interface
|
|
44
|
-
algorithm: typeof
|
|
41
|
+
declare const PUBLIC_KEY_BYTES = 32;
|
|
42
|
+
declare const KEY_ALGORITHM = "openrtc:x25519-hkdf:v1";
|
|
43
|
+
interface KeyAgreementPayload {
|
|
44
|
+
algorithm: typeof KEY_ALGORITHM;
|
|
45
45
|
publicKey: string;
|
|
46
46
|
}
|
|
47
|
-
interface
|
|
47
|
+
interface KeyAgreement {
|
|
48
48
|
publicKey: Uint8Array;
|
|
49
49
|
secretKey: Uint8Array;
|
|
50
50
|
}
|
|
51
|
-
declare function
|
|
52
|
-
declare function
|
|
53
|
-
declare function
|
|
51
|
+
declare function createKeyAgreement(randomBytes?: (byteLength: number) => Uint8Array): KeyAgreement;
|
|
52
|
+
declare function deriveCryptoKey(localSecretKey: Uint8Array, remotePublicKey: Uint8Array, localNodeId: string, remoteNodeId: string): Uint8Array;
|
|
53
|
+
declare function encodeKeyAgreement(publicKey: Uint8Array): KeyAgreementPayload;
|
|
54
54
|
|
|
55
|
-
export {
|
|
55
|
+
export { CryptoStreams, KEY_ALGORITHM, type KeyAgreementPayload, PUBLIC_KEY_BYTES, PayloadCrypto, ProtocolName, ROUTE_DESCRIPTORS, RouteDescriptor, TRANSPORT_LABELS, createCryptoStreams, createKeyAgreement, createSharedCrypto, deriveCryptoKey, encodeKeyAgreement, getRouteDescriptor, isBaseIroh, isDirectIroh, isEncryptedPayload, isIndependent, isOptionalTransport, isWebRtc, listRouteDescriptors, normalizeTransport, preferredProtocols };
|
package/dist/transport/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{e as
|
|
1
|
+
export{e as KEY_ALGORITHM,d as PUBLIC_KEY_BYTES,f as createKeyAgreement,g as deriveCryptoKey,i as encodeKeyAgreement,c as preferredProtocols}from'../chunk-FKEKINIM.js';export{o as TRANSPORT_LABELS,z as createCryptoStreams,y as createSharedCrypto,q as isBaseIroh,r as isDirectIroh,x as isEncryptedPayload,w as isIndependent,s as isOptionalTransport,t as isWebRtc,p as normalizeTransport}from'../chunk-SUWCBTBQ.js';export{a as ROUTE_DESCRIPTORS,e as getRouteDescriptor,f as listRouteDescriptors}from'../chunk-LN4ALFT6.js';
|