Type Alias LedgerOptions

LedgerOptions: {
    httpBaseUrl?: string;
    multiplexQueryStreams?: boolean;
    reconnectThreshold?: number;
    token: string;
    wsBaseUrl?: string;
}

Options for creating a handle to a Daml ledger.

Type declaration

  • OptionalhttpBaseUrl?: string

    Optional base URL for the non-streaming endpoints of the JSON API. If this parameter is not provided, the protocol, host and port of the window.location object are used.

  • OptionalmultiplexQueryStreams?: boolean

    Optional to enable/disable feature of all streaming request to the query endpoint being multiplexed through a single web socket, is enabled by default.

  • OptionalreconnectThreshold?: number

    Optional number of milliseconds a connection has to be live to be considered healthy. If the connection is closed after being live for at least this amount of time, the Ledger tries to reconnect, else not.

  • token: string

    JSON web token used for authentication.

  • OptionalwsBaseUrl?: string

    Optional base URL for the streaming endpoints of the JSON API. If this parameter is not provided, the base URL for the non-streaming endpoints is used with the protocol 'http' or 'https' replaced by 'ws' or 'wss', respectively. Specifying this parameter explicitly can be useful when the non-streaming requests are proxied but the streaming request cannot be proxied, as it is the case with the development server of create-react-app.