interface ESPLocalControlAdapterInterface {
    connect(
        nodeId: string,
        baseUrl: string,
        securtiyType: number,
        pop?: string,
        username?: string,
    ): Promise<Record<string, any>>;
    isConnected(nodeId: string): Promise<boolean>;
    sendData(nodeId: string, path: string, data: string): Promise<string>;
}

Methods

  • Connects to the node with the given parameters.

    Parameters

    • nodeId: string

      The ID of the node.

    • baseUrl: string

      The baseUrl to reach node locally.

    • securtiyType: number

      The type of security to use.

    • Optionalpop: string

      Proof of possession.

    • Optionalusername: string

      Optional username for authentication.

    Returns Promise<Record<string, any>>

    A promise that resolves to a record containing connection details.

  • Sends data to the specified path on the node.

    Parameters

    • nodeId: string

      The ID of the node.

    • path: string

      The path to send data to.

    • data: string

      The data to send.

    Returns Promise<string>

    A promise that resolves to a string response from the node.