@trustpin/react-native
    Preparing search index...

    Variable TrustPinConst

    TrustPin: {
        awaitConfiguration(timeoutMs?: number): Promise<void>;
        isConfigurationLoaded(): Promise<boolean>;
        onLogEvent(
            listener: (event: TrustPinLogEvent) => void,
        ): TrustPinEventSubscription;
        onValidationEvent(
            listener: (event: TrustPinValidationEvent) => void,
        ): TrustPinEventSubscription;
        setLogLevel(level: TrustPinLogLevel): Promise<void>;
        validateConnection(
            host: string,
            port?: number,
            timeoutMs?: number,
        ): Promise<void>;
    } = ...

    Type Declaration

    • awaitConfiguration: function
      • Fail-closed readiness gate: resolves once the signed pinning configuration has been fetched, verified, and activated. timeoutMs undefined → native default (the native SDK clamps to its supported range, currently 10–120s). Rejects with FETCH_CERTIFICATE_TIMEOUT when the bound is exceeded.

        Parameters

        • OptionaltimeoutMs: number

        Returns Promise<void>

    • isConfigurationLoaded: function
      • Whether a validated configuration is currently loaded.

        Returns Promise<boolean>

    • onLogEvent: function
    • onValidationEvent: function
    • setLogLevel: function
      • Sets native log verbosity. Full startup coverage requires the native init helper's log-level parameter; this call adjusts verbosity at runtime.

        Parameters

        Returns Promise<void>

    • validateConnection: function
      • Manually validates the TLS certificate of host:port against the pinning configuration (validated natively; certificate material stays native). Resolves on success; rejects with a stable code otherwise.

        Parameters

        • host: string
        • port: number = 443
        • OptionaltimeoutMs: number

        Returns Promise<void>