dikript-react-identity-comparison-sdk
Version:
A Dikript's React SDK for identity comparison and liveness checks.
44 lines (43 loc) • 1.68 kB
TypeScript
/**
* API utility functions for Dikript Identity Comparison SDK
*/
/**
* Response interface for liveness check
*/
export interface LivenessResponse {
isLive: boolean;
confidence: number;
message?: string;
}
/**
* Response interface for identity comparison
*/
export interface IdentityComparisonResponse {
isMatch: boolean;
confidence: number;
message?: string;
matchDetails?: {
faceMatch?: boolean;
idMatch?: boolean;
};
}
/**
* Send an image for liveness check
* @param {string} dataUrl - Base64 encoded image data URL
* @param {string} apiKey - API key for authentication
* @param {string} apiUrl - Base URL for API requests
* @param {number} timeout - Timeout in milliseconds (optional)
* @returns {Promise<LivenessResponse>} - Response from the liveness check API
*/
export declare function sendImageForLiveness(apiUrl: string, apiKey: string, dataUrl: string, timeout?: number): Promise<LivenessResponse>;
/**
* Send an image for identity comparison
* @param {string} dataUrl - Base64 encoded image data URL
* @param {string} idType - Type of ID (e.g., BVN, NIN)
* @param {string} idNumber - ID number
* @param {string} apiKey - API key for authentication
* @param {string} apiUrl - Base URL for API requests
* @param {number} timeout - Timeout in milliseconds (optional)
* @returns {Promise<IdentityComparisonResponse>} - Response from the identity comparison API
*/
export declare function sendImageForIdentityComparison(apiUrl: string, apiKey: string, dataUrl: string, idType: string, idNumber: string, timeout?: number): Promise<IdentityComparisonResponse>;