UseCaptureImageOptions
Extends
ProtectionConfig
Properties
apiKey?
optional apiKey?: string;API key for the TrustNXT protection API (simple init).
Inherited from
ProtectionConfig.apiKeyapiSecret?
optional apiSecret?: string;Shared secret for encrypted/signed API requests.
Inherited from
ProtectionConfig.apiSecretappId?
optional appId?: string;Application identifier for device metadata.
Inherited from
ProtectionConfig.appIdappVersion?
optional appVersion?: string;Application version for device metadata.
Inherited from
ProtectionConfig.appVersionautoProtect?
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.autoProtectbaseUrl?
optional baseUrl?: string;Override the default API base URL.
Inherited from
ProtectionConfig.baseUrlfacing?
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.featureslocationObfuscationRadius?
optional locationObfuscationRadius?: number;Radius within which to obfuscate location results for privacy.
Inherited from
ProtectionConfig.locationObfuscationRadiuslocationProvider?
optional locationProvider?: LocationProvider;Adapter for GPS location — defaults to browser navigator.geolocation.
Inherited from
ProtectionConfig.locationProvidermode
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
| Parameter | Type |
|---|---|
event | CaptureEvent |
Returns
void | Promise<void>
onProtected?
optional onProtected?: (event) => void;Fired when cryptographic sealing succeeds (~1–3 s after capture).
Parameters
| Parameter | Type |
|---|---|
event | ProtectedEvent |
Returns
void
Inherited from
ProtectionConfig.onProtectedonProtectError?
optional onProtectError?: (event) => void;Fired when cryptographic sealing fails.
Parameters
| Parameter | Type |
|---|---|
event | ProtectErrorEvent |
Returns
void
Inherited from
ProtectionConfig.onProtectErrorprotection?
optional protection?: ProtectionOptions;Advanced: provide a pre-built ProtectionOptions object instead of apiKey.
When set, apiKey/apiSecret/sandbox are ignored.
Inherited from
ProtectionConfig.protectionsandbox?
optional sandbox?: boolean;Use sandbox environment (default: false).
Inherited from
ProtectionConfig.sandboxtags?
optional tags?: Record<string, string>;Custom metadata tags applied to protected assets.
Inherited from
ProtectionConfig.tags