Programmatically interact with HaLo tags from the web browser, mobile application or the desktop.
Using NPM:
npm install --save @arx-research/libhalo
Using Yarn:
yarn add @arx-research/libhalo
The library exposes the following API functions:
async function execHaloCmdWeb(command, options)
For web browser applications: scan the HaLo tag presented to the smartphone, execute the HaLo command and return the result. Supporting Chrome (Android), Safari (iOS) and other browsers. Installation of additional software is not required on the user's side.
Guides:
- Using libhalo as a standalone library in a classic HTML web application
- Using libhalo within a React.js web application
- Documentation of the execHaloCmdWeb API
- Documentation of the utility functions exposed by LibHaLo
- Interactive examples of using LibHaLo on web
async function execHaloCmdRN(nfcManager, command, options)
For React Native mobile applications (Android/iOS) based on react-native-nfc-manager
library: scan the HaLo tag presented to the smartphone, execute the HaLo command and return the result.
Guides:
- Using libhalo within a React Native mobile application for Android/iOS
- Documentation of the execHaloCmdRN API
- Documentation of the utility functions exposed by LibHaLo
- Interactive examples of using LibHaLo on web
async function execHaloCmdPCSC(command, reader)
For desktop applications based on nfc-pcsc
library: scan the HaLo tag present at the specified reader
, execute the HaLo command and return the result.
Guides:
- Using libhalo as a CLI tool on the desktop computer with PC/SC reader (USB NFC reader)
- Using libhalo to build your own application for desktop computers with PC/SC reader (USB NFC reader)
- Using LibHaLo to build your own application for desktop computers using HaLo Gateway (using remote smartphone as the NFC reader)
- Documentation of the execHaloCmdPCSC API
- Documentation of the utility functions exposed by LibHaLo
This library supports the following HaLo tag commands:
sign
- sign arbitrary data using ECDSA private key on the NFC tag;sign_random
- sign a sequential counter with random pad using ECDSA private key on the NFC tag;write_latch
- write one-time programmable memory slot on the NFC tag;cfg_ndef
- configure the parameters returned in the dynamic URL when the NFC tag is scanned;gen_key
- request generation of the key #3 on the NFC tag;gen_key_confirm
- confirm the generated public key of key slot #3;get_pkeys
- get tag's public keys #1, #2 and #3;version
- check HaLo tag's firmware version (only for PCSC/React Native);read_ndef
- read the dynamic URL generated by the tag (only for PCSC/React Native);
Full articles:
- Documentation of the available commands (HaLo Command Set)
- HaLo Firmware Versions - command compatibility table
This project also features additional tools which could increase interoperability.
The Bridge could be used to locally interconnect the USB NFC reader directly with a web application. This allows to execute multiple HaLo commands against multiple tags very quickly.
Guides:
The Gateway could allow to use a compatible web application on the desktop computer, but with your own smartphone instead of the card reader.
Guides: