UMIS SDK
    Preparing search index...

    Interface RelayEmulatorOptions

    What startShellyEmulator needs: where to listen, which keys to obey, the clock, and the optional protections.

    interface RelayEmulatorOptions {
        audiences?: readonly string[];
        cors?: readonly string[];
        digestPasswordEnv?: string;
        host?: string;
        log?: (line: string) => void;
        now: () => number;
        port: number;
        requireSignature?: boolean;
        trust: readonly EcPublicJwk[];
    }
    Index
    audiences?: readonly string[]

    Relay identities a command may name; replaces the defaults (the emulator's own addresses) when given.

    cors?: readonly string[]

    Exact origins (https://host[:port], no path, no wildcard) that browser pages may call the emulator from.

    digestPasswordEnv?: string

    Name of the environment variable that holds the Shelly digest password; when set, Switch.Set needs digest auth too.

    host?: string

    Address to listen on, 127.0.0.1 unless told otherwise.

    log?: (line: string) => void

    Receives one line for each command and each refused request.

    now: () => number

    The clock, in seconds.

    port: number

    TCP port to listen on; 0 lets the operating system pick a free one, which RelayEmulator.url then reports.

    requireSignature?: boolean

    Whether Switch.Set needs a valid X-Umis-Command. True unless told otherwise.

    trust: readonly EcPublicJwk[]

    Public keys whose relay commands the emulator obeys.