Add source file headers (#85)

This commit is contained in:
Michał Leszczyński
2023-03-04 21:51:25 +01:00
committed by GitHub
parent 81469bca10
commit b4dfbffed7
22 changed files with 128 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
/**
* 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 {Action, ArgumentError} = require("argparse");
class JSONParseAction extends Action {

View File

@@ -1,3 +1,9 @@
/**
* 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 {ArgumentParser} = require("argparse");
const {JSONParseAction} = require("./actions");

View File

@@ -1,3 +1,9 @@
/**
* 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 Buffer = require('buffer/').Buffer;
const { NFC } = require('nfc-pcsc');

View File

@@ -1,3 +1,9 @@
/**
* 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 {execCredential} = require("./credential");
const {execWebNFC} = require("./webnfc");
const {

View File

@@ -1,3 +1,9 @@
/**
* 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, NFCOperationError, NFCMethodNotSupported} = require("../halo/exceptions");
const {ERROR_CODES} = require("../halo/errors");
const {arr2hex} = require("../halo/utils");

View File

@@ -1,3 +1,9 @@
/**
* 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 {checkErrors, execHaloCmd} = require("./common");
const {HaloLogicError} = require("../halo/exceptions");
const {readNDEF} = require("./read_ndef");

View File

@@ -1,3 +1,9 @@
/**
* 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 {readNDEF} = require("./read_ndef");
const {HaloLogicError} = require("../halo/exceptions");
const {execHaloCmd, checkErrors} = require("./common");

View File

@@ -1,3 +1,9 @@
/**
* 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 Buffer = require('buffer/').Buffer;
const queryString = require('query-string');
const {HaloLogicError} = require("../halo/exceptions");

View File

@@ -1,3 +1,9 @@
/**
* 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 {ERROR_CODES} = require("../halo/errors");
const {
HaloTagError,

View File

@@ -1,3 +1,9 @@
/**
* 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 CMD_CODES = {
// user commands, can be executed through any interface
"SHARED_CMD_SIGN": 0x01,

View File

@@ -1,3 +1,9 @@
/**
* 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 Buffer = require('buffer/').Buffer;
const ethers = require('ethers');
const {HaloLogicError, HaloTagError} = require("./exceptions");

View File

@@ -1,3 +1,9 @@
/**
* 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
*/
let ERROR_CODES = {
0x01: ["ERROR_CODE_UNKNOWN_CMD", "Unknown command code."],
0x02: ["ERROR_CODE_INVALID_KEY_NO", "Invalid key number."],

View File

@@ -1,3 +1,9 @@
/**
* 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
*/
/**
* This error is thrown when there is an error response from the tag itself.
* The "name" property will contain the exact error name (e.g. ERROR_CODE_INVALID_KEY_NO).

View File

@@ -1,3 +1,9 @@
/**
* 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 FLAGS = {
flagUseText: [0, 0x01],
flagHidePk1: [0, 0x02],

View File

@@ -1,3 +1,9 @@
/**
* 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 {HaloLogicError, HaloTagError} = require("../index");
const EC = require('elliptic').ec;

View File

@@ -1,3 +1,9 @@
/**
* 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 Buffer = require('buffer/').Buffer;
const EC = require('elliptic').ec;
const ethers = require('ethers');

View File

@@ -1,3 +1,9 @@
/**
* 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 {execHaloCmdRN} = require("./drivers/nfc_manager");
const {execHaloCmdPCSC} = require("./drivers/pcsc");
const {

View File

@@ -1,6 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<!--
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
-->
<title>LibHaLo Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

View File

@@ -1,6 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<!--
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
-->
<title>LibHaLo Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

View File

@@ -1,6 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<!--
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
-->
<title>LibHaLo Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

View File

@@ -1,6 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<!--
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
-->
<title>LibHaLo Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

View File

@@ -1,3 +1,9 @@
/**
* 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 {
execHaloCmdWeb,
} = require("../drivers/common");