Files
libhalo/api/common.js

35 lines
997 B
JavaScript

/**
* LibHaLo - Programmatically interact with HaLo tags from the web browser, mobile application or the desktop.
* Copyright by Arx Research, Inc., a Delaware corporation
* License: MIT
*/
const {
HaloTagError,
HaloLogicError,
NFCPermissionRequestDenied,
NFCMethodNotSupported,
NFCAbortedError,
NFCOperationError
} = require("../halo/exceptions");
const {parsePublicKeys, convertSignature, recoverPublicKey} = require("../halo/utils");
/**
* The LibHaLo stable API. Please don't depend on the functions imported from anywhere else
* except the lib's index.js. The library's structure is subject to change in the next versions.
*/
module.exports = {
// exported utils
haloParsePublicKeys: parsePublicKeys,
haloConvertSignature: convertSignature,
haloRecoverPublicKey: recoverPublicKey,
// exceptions
HaloTagError,
HaloLogicError,
NFCPermissionRequestDenied,
NFCMethodNotSupported,
NFCAbortedError,
NFCOperationError
};