@privateid/cryptonets-web-sdk
Advanced tools
Comparing version 4.6.1 to 4.6.3
@@ -107,3 +107,3 @@ import { LOGTYPE } from './types'; | ||
const createCallbackFrontDlScan = ({ callback, returnType }) => (operation, id, response_str) => { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0; | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2; | ||
const isResponse = response_str.length > 0; | ||
@@ -120,14 +120,15 @@ console.log('================[JS RESPONSE]: response_str', isResponse ? JSON.parse(response_str) : ''); // , LOGTYPE.LOG); | ||
age_from_ocr_text: (_d = (_c = returnValue === null || returnValue === void 0 ? void 0 : returnValue.doc_face) === null || _c === void 0 ? void 0 : _c.document_data) === null || _d === void 0 ? void 0 : _d.age_from_ocr_text, | ||
dob_from_ocr_text: (_f = (_e = returnValue === null || returnValue === void 0 ? void 0 : returnValue.doc_face) === null || _e === void 0 ? void 0 : _e.document_data) === null || _f === void 0 ? void 0 : _f.dob_from_ocr_text, | ||
cropped_document: { | ||
data: (_g = (_f = (_e = returnValue === null || returnValue === void 0 ? void 0 : returnValue.doc_face) === null || _e === void 0 ? void 0 : _e.document_data) === null || _f === void 0 ? void 0 : _f.cropped_document_image) === null || _g === void 0 ? void 0 : _g.data, | ||
width: (_l = (_k = (_j = (_h = returnValue === null || returnValue === void 0 ? void 0 : returnValue.doc_face) === null || _h === void 0 ? void 0 : _h.document_data) === null || _j === void 0 ? void 0 : _j.cropped_document_image) === null || _k === void 0 ? void 0 : _k.info) === null || _l === void 0 ? void 0 : _l.width, | ||
height: (_q = (_p = (_o = (_m = returnValue === null || returnValue === void 0 ? void 0 : returnValue.doc_face) === null || _m === void 0 ? void 0 : _m.document_data) === null || _o === void 0 ? void 0 : _o.cropped_document_image) === null || _p === void 0 ? void 0 : _p.info) === null || _q === void 0 ? void 0 : _q.height, | ||
data: (_j = (_h = (_g = returnValue === null || returnValue === void 0 ? void 0 : returnValue.doc_face) === null || _g === void 0 ? void 0 : _g.document_data) === null || _h === void 0 ? void 0 : _h.cropped_document_image) === null || _j === void 0 ? void 0 : _j.data, | ||
width: (_o = (_m = (_l = (_k = returnValue === null || returnValue === void 0 ? void 0 : returnValue.doc_face) === null || _k === void 0 ? void 0 : _k.document_data) === null || _l === void 0 ? void 0 : _l.cropped_document_image) === null || _m === void 0 ? void 0 : _m.info) === null || _o === void 0 ? void 0 : _o.width, | ||
height: (_s = (_r = (_q = (_p = returnValue === null || returnValue === void 0 ? void 0 : returnValue.doc_face) === null || _p === void 0 ? void 0 : _p.document_data) === null || _q === void 0 ? void 0 : _q.cropped_document_image) === null || _r === void 0 ? void 0 : _r.info) === null || _s === void 0 ? void 0 : _s.height, | ||
}, | ||
cropped_mugshot: { | ||
data: (_s = (_r = returnValue === null || returnValue === void 0 ? void 0 : returnValue.doc_face) === null || _r === void 0 ? void 0 : _r.cropped_face_image) === null || _s === void 0 ? void 0 : _s.data, | ||
width: (_v = (_u = (_t = returnValue === null || returnValue === void 0 ? void 0 : returnValue.doc_face) === null || _t === void 0 ? void 0 : _t.cropped_face_image) === null || _u === void 0 ? void 0 : _u.info) === null || _v === void 0 ? void 0 : _v.width, | ||
height: (_y = (_x = (_w = returnValue === null || returnValue === void 0 ? void 0 : returnValue.doc_face) === null || _w === void 0 ? void 0 : _w.cropped_face_image) === null || _x === void 0 ? void 0 : _x.info) === null || _y === void 0 ? void 0 : _y.height, | ||
data: (_u = (_t = returnValue === null || returnValue === void 0 ? void 0 : returnValue.doc_face) === null || _t === void 0 ? void 0 : _t.cropped_face_image) === null || _u === void 0 ? void 0 : _u.data, | ||
width: (_x = (_w = (_v = returnValue === null || returnValue === void 0 ? void 0 : returnValue.doc_face) === null || _v === void 0 ? void 0 : _v.cropped_face_image) === null || _w === void 0 ? void 0 : _w.info) === null || _x === void 0 ? void 0 : _x.width, | ||
height: (_0 = (_z = (_y = returnValue === null || returnValue === void 0 ? void 0 : returnValue.doc_face) === null || _y === void 0 ? void 0 : _y.cropped_face_image) === null || _z === void 0 ? void 0 : _z.info) === null || _0 === void 0 ? void 0 : _0.height, | ||
}, | ||
guid: (_z = returnValue === null || returnValue === void 0 ? void 0 : returnValue.doc_face) === null || _z === void 0 ? void 0 : _z.guid, | ||
puid: (_0 = returnValue === null || returnValue === void 0 ? void 0 : returnValue.doc_face) === null || _0 === void 0 ? void 0 : _0.uuid, | ||
guid: (_1 = returnValue === null || returnValue === void 0 ? void 0 : returnValue.doc_face) === null || _1 === void 0 ? void 0 : _1.guid, | ||
puid: (_2 = returnValue === null || returnValue === void 0 ? void 0 : returnValue.doc_face) === null || _2 === void 0 ? void 0 : _2.uuid, | ||
}; | ||
@@ -134,0 +135,0 @@ if (returnType === 'all') { |
@@ -97,2 +97,16 @@ import { CameraFaceMode, FaceStatuses } from './types'; | ||
}>; | ||
export declare const scanFrontDocumentOcrAge: ({ callback, image, config }: frontScanInterface) => Promise<{ | ||
result: number; | ||
croppedDocument: Uint8ClampedArray; | ||
croppedMugshot: Uint8ClampedArray; | ||
imageData: ImageData; | ||
} | { | ||
result: string; | ||
} | { | ||
result: number; | ||
croppedDocument: Uint8ClampedArray; | ||
croppedMugshot: Uint8ClampedArray; | ||
} | { | ||
result: number; | ||
}>; | ||
interface backScanInterface { | ||
@@ -99,0 +113,0 @@ callback: (returnData: any) => void; |
@@ -62,4 +62,4 @@ import { Base64, ImageType, LOGTYPE, ScreenOrientation } from './types'; | ||
} | ||
export declare const getStatusMessage: (result: number, type?: MessageType) => "" | "Processing hold still" | "Please move back" | "Please move closer" | "Move face into circle" | "Please hold still" | "Remove glasses" | "Remove mask " | "Please look at camera" | "Raise phone level to face" | "Look down a little" | "“Lower phone level to face" | "Look up a little" | "Too dim - increase lighting" | "Too bright - lower lighting" | "Please close mouth" | "Please straighten head" | "Looking for face"; | ||
export declare const getRawFaceValidationStatus: (status: number) => "" | "No Face" | "Valid Face" | "Image Spoof" | "Video Spoof" | "Too Close" | "Too far away" | "Too far to right" | "Too far to left" | "Too far up" | "Too far down" | "Too blurry" | "Glasses on" | "Mask on" | "Chin too far left" | "Chin too far right" | "Chin too far up" | "Chin too far down" | "Image too dim" | "Image too bright" | "Face low confidence value" | "Invalid face background" | "Eyes blink" | "Mouth Open" | "Face rotated right" | "Face rotated left"; | ||
export declare const getStatusMessage: (result: number, type?: MessageType) => "" | "Processing hold still" | "Please move back" | "Please move closer" | "Move face into circle" | "Please hold still" | "Remove glasses" | "Remove mask " | "Please look at camera" | "Raise phone level to face" | "Look down a little" | "“Lower phone level to face" | "Look up a little" | "Too dim - increase lighting" | "Too bright - lower lighting" | "Please close mouth" | "Please straighten head" | "Remove mask and glasses" | "Looking for face"; | ||
export declare const getRawFaceValidationStatus: (status: number) => "" | "No Face" | "Valid Face" | "Image Spoof" | "Video Spoof" | "Too Close" | "Too far away" | "Too far to right" | "Too far to left" | "Too far up" | "Too far down" | "Too blurry" | "Glasses on" | "Mask on" | "Chin too far left" | "Chin too far right" | "Chin too far up" | "Chin too far down" | "Image too dim" | "Image too bright" | "Face low confidence value" | "Invalid face background" | "Eyes blink" | "Mouth Open" | "Face rotated right" | "Face rotated left" | "Face mask and Eye glasses detected"; | ||
export declare const getRawSpoofStatusMessage: (status: number) => "" | "Generic Error" | "Invalid Face" | "Face Too Close To Edge" | "Mobile Phone Detected" | "No Face Detected" | "Real" | "Spoof Detected"; | ||
@@ -66,0 +66,0 @@ export declare const checkPackageSupport: () => Promise<{ |
@@ -242,2 +242,4 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
return 'Please straighten head'; | ||
case 24: | ||
return 'Remove mask and glasses'; | ||
default: | ||
@@ -318,2 +320,4 @@ return ''; | ||
return 'Face rotated left'; | ||
case 24: | ||
return 'Face mask and Eye glasses detected'; | ||
default: | ||
@@ -320,0 +324,0 @@ return ''; |
@@ -5,3 +5,3 @@ { | ||
"description": "CryptoNets WebAssembly SDK", | ||
"version": "4.6.1", | ||
"version": "4.6.3", | ||
"keywords": [ | ||
@@ -8,0 +8,0 @@ "Face recognition", |
@@ -330,3 +330,3 @@ <h1 align="center">Private ID v3 Wasm SDK</h1> | ||
# Scan Front Document Callback Return Data | ||
# Scan Front Document on age Callback Return Data | ||
@@ -363,2 +363,46 @@ ```javascript | ||
## scanFrontDocument | ||
```javascript | ||
import { scanFrontDocumentOcrAge } from '@privateid/cryptonets-web-sdk'; | ||
const { croppedDocument, croppedMugshotData } = scanFrontDocumentOcrAge({ | ||
callback, // Callback function to handle the response | ||
config, // Config setting | ||
}); | ||
``` | ||
# Scan Front Document OCR Age Callback Return Data | ||
```javascript | ||
{ | ||
"callback_status": number, | ||
"doc_validation_status": number, | ||
"cropped_document": { | ||
"data": "", | ||
"width": number, | ||
"height": number | ||
}, | ||
"cropped_mugshot": { | ||
"data": "", | ||
"width": number, | ||
"height": number | ||
}, | ||
"age_from_ocr_text"?: number, | ||
"dob_from_ocr_text"?: string, | ||
} | ||
``` | ||
<b> Document Validation Status </b> | ||
| Property | Description | | ||
|----------|----------------------------| | ||
| -2 | SYSTEM ERROR. Please try again later. | | ||
| -1 | Document Not Detected | | ||
| 0 | Success | | ||
| 1 | Spoof Detected | | ||
| 3 | Hold Still | | ||
| 4 | MOVE JUST A LITTLE CLOSER | | ||
| 9 | TOO BLURRY | | ||
| 18 | SHOW FRONT OF DOCUMENT | | ||
## backScanDocument | ||
@@ -365,0 +409,0 @@ Automatically detects if you are on mobile or desktop. |
{ | ||
"version": "24.11.20-20e036d" | ||
"version": "24.12.09-897ea7a" | ||
} |
{ | ||
"version": "24.11.20-20e036d" | ||
"version": "24.12.09-897ea7a" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
88026942
45
8059
821
4
5
449