Skip to main content

setTimeOutMs

Sets the request timeout, in milliseconds, for transport-level operations.

Signature​

dcent.setTimeOutMs(ms: number): void

Parameters​

FieldTypeNotes
msnumberTimeout in milliseconds — a positive, finite number. An invalid value is always stored. If no request has been made yet (or since the last popupWindowClose()), the next call rejects with INVALID_PARAMS, and after that calls resolve with internal_error — even after a valid value is set — until popupWindowClose() resets the connector. Once a request has been made (even one whose popup was closed or never connected), the call throws INVALID_PARAMS immediately and the previous timeout stays in effect; the stored value is applied after the next popupWindowClose(), with the same reject-then-internal_error result unless a valid value is set before then. Pass a positive number.

Notes​

  • The default timeout is 180000 (180 s / 3 minutes) — you rarely need to change it.
  • If no transport exists yet, the value is cached and applied when the connection is created.
  • On expiry the transport layer returns time_out (5006). The hardware-level device timeout is device_timeout (5003).
dcent.setTimeOutMs(180000) // 180s (default)
info

Some requests ask the device to sign more than once (up to three times) — e.g. Cardano CIP-95 governance / voting — so they take longer. The 180000 default is sized to cover this; only lower it for a single, quick signature.