TrustNXTTrustNXT
React SDKAPI ReferenceInterfaces

UseCaptureImageOptions

Extends

  • ProtectionConfig

Properties

apiKey?

optional apiKey?: string;

API key for the TrustNXT protection API (simple init).

Inherited from

ProtectionConfig.apiKey

apiSecret?

optional apiSecret?: string;

Shared secret for encrypted/signed API requests.

Inherited from

ProtectionConfig.apiSecret

appId?

optional appId?: string;

Application identifier for device metadata.

Inherited from

ProtectionConfig.appId

appVersion?

optional appVersion?: string;

Application version for device metadata.

Inherited from

ProtectionConfig.appVersion

autoProtect?

optional autoProtect?: boolean;

When true (default), captures are automatically queued for protection. Set to false for deferred flows where the consumer calls enqueueProtection() manually after additional user input.

Inherited from

ProtectionConfig.autoProtect

baseUrl?

optional baseUrl?: string;

Override the default API base URL.

Inherited from

ProtectionConfig.baseUrl

facing?

optional facing?: Facing;

Desired camera facing direction. Reactive — changing this value will switch the camera automatically (no manual toggleFacing needed).

Default

"environment"

features?

optional features?: Features;

Feature flags / metadata to embed in every seal.

Inherited from

ProtectionConfig.features

locationObfuscationRadius?

optional locationObfuscationRadius?: number;

Radius within which to obfuscate location results for privacy.

Inherited from

ProtectionConfig.locationObfuscationRadius

locationProvider?

optional locationProvider?: LocationProvider;

Adapter for GPS location — defaults to browser navigator.geolocation.

Inherited from

ProtectionConfig.locationProvider

mode

mode: "image";

onCapture?

optional onCapture?: (event) => void | Promise<void>;

Fired immediately when an image is captured (raw blob for instant preview). Contains captureId for correlation with onProtected/onProtectError.

Parameters

ParameterType
eventCaptureEvent

Returns

void | Promise<void>


onProtected?

optional onProtected?: (event) => void;

Fired when cryptographic sealing succeeds (~1–3 s after capture).

Parameters

ParameterType
eventProtectedEvent

Returns

void

Inherited from

ProtectionConfig.onProtected

onProtectError?

optional onProtectError?: (event) => void;

Fired when cryptographic sealing fails.

Parameters

ParameterType
eventProtectErrorEvent

Returns

void

Inherited from

ProtectionConfig.onProtectError

protection?

optional protection?: ProtectionOptions;

Advanced: provide a pre-built ProtectionOptions object instead of apiKey. When set, apiKey/apiSecret/sandbox are ignored.

Inherited from

ProtectionConfig.protection

sandbox?

optional sandbox?: boolean;

Use sandbox environment (default: false).

Inherited from

ProtectionConfig.sandbox

tags?

optional tags?: Record<string, string>;

Custom metadata tags applied to protected assets.

Inherited from

ProtectionConfig.tags

On this page