awaitConfiguration

suspend fun awaitConfiguration(timeout: Long = TrustPinConstants.DEFAULT_OPERATION_TIMEOUT_MS)

Waits until the pinning configuration has been fetched, signature-verified, and accepted by the SDK's integrity check — the explicit fail-closed gate.

setup validates credentials locally and refreshes the pinning configuration in the background; it deliberately does not block app launch on the network. Call this method when your integration must not proceed without a validated configuration. Returns immediately when one is already available.

For a synchronous, non-fetching state read use isConfigurationLoaded.

Parameters

timeout

End-to-end deadline in milliseconds. Default 30s. Clamped to [MIN_OPERATION_TIMEOUT_MS, MAX_OPERATION_TIMEOUT_MS] (currently 10s–120s).

Throws

if setup has never completed

if a setup call is currently in flight

if the configuration cannot be retrieved (transient network / CDN failure)

if the payload signature does not validate against the configured public key

if the downloaded configuration fails the SDK's integrity check

if the supplied timeout elapses before completion