UNPKG

@casual-simulation/aux-vm-browser

Version:

A set of utilities required to securely run an AUX in a web browser.

49 lines 1.97 kB
import type { BotsState, Bot, UpdatedBot, ProxyClientPartitionConfig, ProxyClientPartition, AuxPartitionRealtimeStrategy, StateUpdatedEvent } from '@casual-simulation/aux-common'; import type { StatusUpdate, Action, CurrentVersion } from '@casual-simulation/aux-common'; import type { Observable } from 'rxjs'; /** * Attempts to create a proxy client partition that is loaded from a remote inst. * @param options The options to use. * @param config The config to use. */ export declare function createProxyClientPartition(config: ProxyClientPartitionConfig): Promise<ProxyClientPartitionImpl>; export declare class ProxyClientPartitionImpl implements ProxyClientPartition { private _bridge; private _onBotsAdded; private _onBotsRemoved; private _onBotsUpdated; private _onStateUpdated; private _onVersionUpdated; private _onError; private _onEvents; private _onStatusUpdated; private _proxies; private _sub; private _space; get space(): string; set space(value: string); type: 'proxy_client'; state: BotsState; private: boolean; realtimeStrategy: AuxPartitionRealtimeStrategy; get onBotsAdded(): Observable<Bot[]>; get onBotsRemoved(): Observable<string[]>; get onBotsUpdated(): Observable<UpdatedBot[]>; get onStateUpdated(): Observable<StateUpdatedEvent>; get onVersionUpdated(): Observable<CurrentVersion>; get onError(): Observable<any>; get onEvents(): Observable<Action[]>; get onStatusUpdated(): Observable<StatusUpdate>; constructor(config: ProxyClientPartitionConfig); init(): Promise<void>; private _handleOnBotsAdded; private _handleOnBotsRemoved; private _handleOnBotsUpdated; private _handleOnStateUpdated; applyEvents(events: any[]): Promise<any[]>; sendRemoteEvents(events: any[]): Promise<void>; connect(): void; unsubscribe(): void; closed: boolean; } //# sourceMappingURL=ProxyClientPartition.d.ts.map