Skip to Content

SladeID

new SladeID(config: SladeIDConfig)

The SDK entry point. Handles authentication and transport, and exposes capture-session factories plus the biometrics network methods.

Methods

MethodReturns
createFaceSession(video, opts?)FaceCaptureSession
enrollFace(enrolleeId, result)Promise<FaceEnrollResponse>
matchFace(enrolleeId, result)Promise<FaceMatchResponse>
searchFace(result, opts?)Promise<FaceSearchResponse>
getEnrollmentStatus(enrolleeId, modality?)Promise<EnrollmentStatusResponse>
reader (accessor)FingerprintReaderClient

The result parameter accepts either the capture session’s typed result (FaceCaptureResult) or a hand-built BiometricSample. Hand-built samples are useful for non-browser callers, replays from disk, or tests. reader is a getter that returns the USB FingerprintReaderClient — its enroll / verify / search actions are dispatched via the orchestrator.

getEnrollmentStatus(enrolleeId, modality?)

Fetch a subject’s current enrollment state for one modality. It is a pure metadata lookup — no capture and no hardware — so it resolves for face and fingerprint alike, even with no scanner attached.

// Fingerprint is the default modality. const fp = await sdk.getEnrollmentStatus('subject-123'); if (fp.status === 'fully_enrolled') { /* ready */ } // Face status. const face = await sdk.getEnrollmentStatus('subject-123', 'face'); console.log(face.enrolled, face.status);

modality defaults to 'fingerprint', mirroring the middleware’s backward-compatible default. Fingerprint additionally carries per-position verified / nonVerified detail; face is single-capture, so its status is 'fully_enrolled' or 'not_enrolled' with no positions. When the subject has no record on file the middleware returns an empty body, normalized to status: 'not_enrolled', enrolled: false, total: 0.

For a reader-attached fingerprint enrollment loop, reader.fetchEnrolled covers the same fingerprint data through a direct middleware lookup. Use getEnrollmentStatus when you want a modality-agnostic, middleware-direct lookup that also works for face.

See also