PHP WebShell

Текущая директория: /usr/lib/node_modules/bitgo/node_modules/smoldot/dist/mjs/internals

Просмотр файла: remote-instance.d.ts

import * as instance from './local-instance.js';
export interface ConnectConfig {
    wasmModule: Promise<WebAssembly.Module>;
    forbidTcp: boolean;
    forbidWs: boolean;
    forbidNonLocalWs: boolean;
    forbidWss: boolean;
    forbidWebRtc: boolean;
    maxLogLevel: number;
    cpuRateLimit: number;
    portToServer: MessagePort;
    eventCallback: (event: instance.Event) => void;
}
export declare function connectToInstanceServer(config: ConnectConfig): Promise<instance.Instance>;
/**
 * Configuration for {@link startInstanceServer}.
 */
export interface ServerConfig {
    /**
     * Environment variables that the instance can pull.
     */
    envVars: string[];
    /**
     * Returns the number of milliseconds since an arbitrary epoch.
     */
    performanceNow: () => number;
    /**
     * Fills the given buffer with randomly-generated bytes.
     */
    getRandomValues: (buffer: Uint8Array) => void;
}
/**
 * Returns a `Promise` that resolves when the instance shuts down. Since the function is also
 * an asynchronous function, the actual return type is `Promise<Promise<void>>`. That is, the
 * outer `Promise` yields once the instance starts, and the inner `Promise` yields once the
 * instance shuts down.
 */
export declare function startInstanceServer(config: ServerConfig, initPortToClient: MessagePort): Promise<Promise<void>>;

Выполнить команду


Для локальной разработки. Не используйте в интернете!