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 🙏

© 2024 – Pkg Stats / Ryan Hefner

fingerprint-scanners

v1.0.16

Published

Capture fingerprint from IB manufactured devices

Downloads

8

Readme

fingerprint-scanner

Why?

fingerprint-scanner makes streaming and capturing fingerprint easier for JavaScript developers by taking the hassle out of working with finding device port streaming and capturing.

  • Finds available port which the fingerprint SDK is currently running.

  • Stream fingerprint and makes available for caputure (it helps to visualize the streaming).

  • Captures and returns fingerprint data in a base64 format.

  • More details are available here: MDS-Specification

Installation

In a node.js environment:

npm i fingerprint-scanner

Usage

  • Add config.js in root folder and add the following
export const DEVICE_DISC_METHOD = "MOSIPDISC";
export const DEVICE_DISC_TYPE = "Finger";
export const IP = "http://localhost";
export const STREAM_TIMEOUT = '10000'
export const DEVICE_ID = '1'
export const DEVICE_SUB_ID = '1'
export const CAPTURE_BODY = {
  env: 'Production',
  purpose: 'Registration',
  specVersion: '0.9.5',   
  captureTime: new Date().toISOString(),
  domainUri: '127.0.0.1:4503',
  timeout: '30000',
  transactionId: '1',
  bio: [
    {
      type: 'Finger',
      count: 1,
      bioSubType: ["Left IndexFinger"],
      requestedScore: '10',
      deviceId: '1',
      deviceSubId: 1,
      previousHash: '',
      exception: ["Left MiddleFinger", "Left RingFinger", "Left LittleFinger"],
    },
  ],
}
import fingerprint from 'fingerprint-scanner'

const data = fingerprint();

// if successful, data will be returned in a base64 format

There are two requests that run in the background and stream, and capture and the config.js file contains the payloads for the two requests.

  • stream
{
  "deviceId": "Internal Id",
  "deviceSubId": "Specific device sub Id",
  "timeout": "Timeout for stream"
}
  • capture
{
  "env":  "Target environment",
  "purpose": "Auth or Registration",
  "specVersion": "Expected MDS spec version",
  "timeout": "Timeout for registration capture",
  "captureTime": "Time of capture request in ISO format",
  "transactionId": "Transaction Id for the current capture",
  "bio": [
    {
      "type": "Type of the biometric data",
      "count":  "Finger/Iris count, in case of face max, is set to 1",
      "bioSubType": ["Array of subtypes"], //Optional
      "exception": ["Finger or Iris to be excluded"],
      "requestedScore": "Expected quality score that should match to complete a successful capture",
      "deviceId": "Internal Id",
      "deviceSubId": "Specific device Id",
      "previousHash": "Hash of the previous block"
    }
  ],
  "customOpts": {
    //max of 50 key-value pairs. This is so that vendor-specific parameters can be sent if necessary. The values cannot be hardcoded and have to be configured by the apps server and should be modifiable upon need by the applications. Vendors are free to include additional parameters and fine-tuning parameters. None of these values should go undocumented by the vendor. No sensitive data should be available in the customOpts.
  }
}

So the ``

To do it manually:

import { findPort, stream, capture } from 'fingerprint scanner';

const devicePort = findPort();

async function scan() {
    stream({devicePort});
    await data = capture({devicePort});
    return data;
}