Skip to content

Protocols

Fingermark Messaging Protocols

Overview

Fingermark Protocols is an abstraction over @fingermarkglobal/chrome-messages and provides high level interfaces for Chrome's device communication protocols.

Usage

For client side requests

js
import { HTTPClient, USBClient } from '@fingermarkglobal/protocols';

const http = new HTTPClient({ port });
const usb = new HTTPClient({ port });

const request = {
  // request data
};

const httpResponse = await http.send(request);
const usbResponse = await usb.send(request);

For setting up on the chrome app

js
import { HTTPServer, USBServer } from '@fingermarkglobal/protocols';

const http = new HTTPServer({ port });
const usb = new HTTPServer({ port });