darvilab-kyc-sdk v1.0.12
��# DarviLab KYC SDK
Installation
Install the package using npm:
npm i darvilab-kyc-sdk
Building from Source
To build the package from the repository, follow these steps:
- Install dependencies:
npm i
- Compile TypeScript code:
npm run typescript
This will create a dist
folder containing the compiled TypeScript code.
Publishing
To publish the package using npm, first login:
npm login
Then, publish the package:
npm publish
Usage
To use the package in your project:
import { DarviLabRecognitionService } from "darvilab-kyc-sdk";
const services = new DarviLabRecognitionService(hostname);
await services.compareImages(imageOne, imageTwo, endpoint);
DarviLabRecognitionService Class
compareImages(image1: string, image2: string, endpoint: string) => Promise
Compares two images and returns the result in JSON format.
extractFace(image1: string, image_2: string, endpoint: string) => Promise
Extracts faces from document and returns the result in JSON format.
brightnessCheck(image1: string, endpoint: string) => Promise
Performs brightness check on an document and returns the result in JSON format.
enhanceFace(image1: string, endpoint: string) => Promise
Enhances the quality of a face from the document and returns the result in JSON format.
labeledPaddleOcr(image1: string, endpoint: string) => Promise
Performs OCR (Optical Character Recognition) on a labeled Paddle image and returns the result in JSON format.
extractDocument(image1: string, endpoint: string) => Promise
Extracts information from a document image and returns the result in JSON format.
docClassify(image1: string, endpoint: string) => Promise
Classifies a document image and returns the result in JSON format.
ageGenderClassify(image1: string, endpoint: string) => Promise
Classifies the age and gender of a person in the document and returns the result in JSON format.
labeledDrivingLicense(image1: string, endpoint: string) => Promise
Performs analysis on a labeled driving license image and returns the result in JSON format.
liveliness(images: string[], endpoint: string) => Promise
Checks liveliness of a person using multiple images and returns the result in JSON format.
labeledCitizenshipBack(image1: string, endpoint: string) => Promise
Analyzes the back side of a labeled citizenship card and returns the result in JSON format.
labeledCitizenshipFront(image1: string, endpoint: string) => Promise
Analyzes the front side of a labeled citizenship card and returns the result in JSON format.
passportPicAnalysis(image1: string, endpoint: string) => Promise
Analyzes a passport picture and returns the result in JSON format.
paddleOcr(image1: string, endpoint: string) => Promise
Performs OCR on a Paddle image and returns the result in JSON format.
Each method of the DarviLabRecognitionService
class accepts a base64 string image and an endpoint string, providing results in a promise with a JSON format output.