@privateid/ultra-web-sdk-alpha
Version:
CryptoNets WebAssembly SDK
87 lines • 3.25 kB
JavaScript
export const WASM_DATABASE_NAME = '/privid-wasm';
export const WASM_DATABASE_VERSION = 21;
export const SAFARI_MIN_VERSION_FOR_SIMD = 16;
export const SAFARI_MIN_SUBVERSION_FOR_SIMD = 4;
// Default configuration values for face enrollment
export const DEFAULT_ENROLL_CONFIG = {
input_image_format: 'rgba',
angle_rotation_left_threshold: 20.0,
angle_rotation_right_threshold: 20.0,
threshold_high_vertical_enroll: 0.9,
threshold_down_vertical_enroll: 2.2,
anti_spoofing_threshold: 0.8,
threshold_profile_enroll: 0.66,
blur_threshold_enroll_pred: 40,
threshold_user_too_close: 0.52,
threshold_user_too_far: 0.165,
allow_only_one_face: true,
threshold_user_up: 0.15,
threshold_user_down: 0.9,
threshold_user_left: 0.8,
threshold_user_right: 0.2,
};
// Mobile-specific enroll config overrides
export const MOBILE_ENROLL_CONFIG_OVERRIDES = {
threshold_user_too_far: 0.31,
threshold_user_too_close: 0.55,
threshold_user_right: 0.2,
threshold_user_left: 0.8,
threshold_profile_enroll: 0.66,
};
// Default configuration values for face prediction
export const DEFAULT_PREDICT_CONFIG = {
input_image_format: 'rgba',
angle_rotation_left_threshold: 20.0,
angle_rotation_right_threshold: 20.0,
anti_spoofing_threshold: 0.8,
threshold_profile_predict: 0.66,
blur_threshold_enroll_pred: 40,
threshold_user_too_close: 0.52,
threshold_user_too_far: 0.165,
threshold_user_up: 0.15,
threshold_user_down: 0.9,
threshold_user_left: 0.8,
threshold_user_right: 0.2,
threshold_high_vertical_predict: 0.9,
threshold_down_vertical_predict: 2.2,
url_name_override: '',
disallowed_results: [20],
disable_predict_mf: false,
mf_count_override: 5,
};
// Default configuration for age estimation
export const DEFAULT_AGE_ESTIMATION_CONFIG = {
anti_spoofing_threshold: 0.8,
mf_count_override: 5,
disable_estimate_age_mf: false,
threshold_user_too_close: 0.8,
threshold_profile_enroll: 0.6,
threshold_user_too_far: 0.2,
allow_only_one_face: false,
};
// Default configuration for document scanning
export const DEFAULT_DOCUMENT_SCAN_CONFIG = {
input_image_format: 'rgba',
fingers_over_document_threshold: 0.2,
};
// Default configuration for document OCR
export const DEFAULT_DOCUMENT_OCR_CONFIG = {
input_image_format: 'rgba',
calculate_age_from_ocr_text: true,
threshold_doc_x: 0.0,
threshold_doc_y: 0.0,
threshold_doc_too_close: 0.99,
threshold_doc_too_far: 0.1,
};
// Debug types that enable image creation
export const DEBUG_TYPES_WITH_IMAGES = ['900', '901', '902', '903'];
// Browser compatibility messages
export const BROWSER_COMPATIBILITY_MESSAGES = {
OPERA_MOBILE_NOT_SUPPORTED: 'Opera mobile version 72 and below is not support WASM',
OPERA_NOT_SUPPORTED: 'Opera version 43 and below is not support WASM',
CHROME_NOT_SUPPORTED: 'Chrome version 57 and below is not support WASM',
FIREFOX_NOT_SUPPORTED: 'Firefox version 52 and below is not support WASM',
ANDROID_BROWSER_NOT_SUPPORTED: 'Android Browser version 96 and below is not supported.',
UNABLE_TO_LOAD_WASM: 'Unable to load wasm',
};
//# sourceMappingURL=wasm.constants.js.map