npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

flve-sdk

v0.1.0

Published

TypeScript SDK for Face Liveness Verification Engine (FLVE)

Downloads

104

Readme

flve-ts-sdk

TypeScript SDK for Face Liveness Verification Engine (FLVE)

Installation

npm install @labaid-ai/flve-sdk

Quick Start

import { createClient } from '@labaid-ai/flve-sdk';
import * as fs from 'fs';

// Create client pointing to HuggingFace Space
const client = createClient({
  baseUrl: 'https://farukhannan-flve.hf.space',
  headers: {
    // Add authentication token if required
    // 'Authorization': 'Bearer YOUR_HF_TOKEN'
  }
});

// Read image file
const imageBytes = fs.readFileSync('path/to/image.jpg');

// Enroll a face
const enrollResponse = await client.enroll({
  userId: 'user123',
  imageData: imageBytes,
  format: 'IMAGE_FORMAT_JPEG',
});

// Verify a face
const verifyResponse = await client.verify({
  referenceId: enrollResponse.referenceId,
  imageData: imageBytes,
  format: 'IMAGE_FORMAT_JPEG',
});

console.log('Match:', verifyResponse.isMatch);
console.log('Confidence:', verifyResponse.confidenceScore);

Note: This SDK connects to the FLVE HuggingFace Space at https://farukhannan-flve.hf.space. The space may take a few seconds to wake up from sleep mode on first request.

Features

  • Face Enrollment: Register faces for verification
  • Face Verification: Verify faces against enrolled references
  • Liveness Detection: Check if face is live (anti-spoofing)
  • eKYC: Electronic Know Your Customer with challenge-response
  • Streaming: Real-time video verification support
  • TypeScript: Full type safety and autocompletion

API Specifications

This SDK includes bundled API specifications in the specs/ directory:

  • specs/openapi.yaml - REST API specification
  • specs/proto/ - gRPC Protocol Buffer definitions

These are included for reference and documentation purposes.

API Reference

Client Methods

enroll(request: EnrollRequest): Promise<EnrollResponse>

Enroll a new face for verification.

verify(request: VerifyRequest): Promise<VerifyResponse>

Verify a face against an enrolled reference.

checkLiveness(request: LivenessRequest): Promise<LivenessResponse>

Check if a face is live (anti-spoofing).

startEKYC(request: StartEKYCRequest): Promise<StartEKYCResponse>

Start an eKYC session with challenges.

submitEKYCFrame(request: SubmitEKYCFrameRequest): Promise<SubmitEKYCFrameResponse>

Submit a frame during eKYC session.

completeEKYC(request: CompleteEKYCRequest): Promise<CompleteEKYCResponse>

Complete an eKYC session and get results.

getEKYCStatus(request: GetEKYCStatusRequest): Promise<GetEKYCStatusResponse>

Get the status of an eKYC session.

health(request?: HealthRequest): Promise<HealthResponse>

Check service health.

Configuration

Default Configuration

The SDK is pre-configured to use the HuggingFace Space:

  • Base URL: https://farukhannan-flve.hf.space
  • Timeout: 30000ms
  • Retry: Enabled with 3 attempts

Custom Configuration

const client = createClient({
  baseUrl: 'https://farukhannan-flve.hf.space',
  timeout: 30000,
  retry: {
    enabled: true,
    maxAttempts: 3,
    backoffMs: 1000,
  },
  headers: {
    // Add HuggingFace authentication token if needed
    'Authorization': 'Bearer YOUR_HF_TOKEN',
  },
  interceptors: {
    request: (config) => {
      // Modify request before sending
      console.log('Request:', config);
      return config;
    },
    response: (response) => {
      // Process response
      return response;
    },
    error: (error) => {
      // Handle errors
      console.error('Request failed:', error);
    },
  },
});

Environment Variables

For local development or custom deployments, you can override the base URL:

const client = createClient({
  baseUrl: process.env.FLVE_API_URL || 'https://farukhannan-flve.hf.space',
});

License

MIT

Version

0.1.0


Generated by FLVE SDK Generator
This SDK is auto-generated and self-contained. All API specifications are bundled for portability.