Minor fixes in the documentation (#7)

This commit is contained in:
Michał Leszczyński
2023-03-01 22:16:29 +01:00
committed by GitHub
parent 68fcc4b02f
commit bd6328c532
13 changed files with 37 additions and 47 deletions

View File

@@ -4,7 +4,7 @@ Programmatically interact with HaLo tags from the web browser, mobile applicatio
## Usage
The LibHalo supports the following use-cases:
The LibHaLo supports the following use-cases:
1. [Using libhalo as a standalone library in a classic HTML web application](/docs/web-standalone.md)
2. [Using libhalo within a React.js web application](/docs/web-reactjs.md)

View File

@@ -17,7 +17,7 @@ async function execHaloCmdWeb(command, options)
### Input parameter: `command`
An object specifying the command name that you want to invoke, together with the additional command's arguments.
Please check [documentation of the available commands (Halo Command Set)](/docs/halo-command-set.md) for more details.
Please check [documentation of the available commands (HaLo Command Set)](/docs/halo-command-set.md) for more details.
### Input parameter: `options`
@@ -49,7 +49,7 @@ Don't automatically debounce calls to `execHaloCmdWeb` when it's concurrently ca
options.compatibleCallMode: true/false
```
Use the compatible protocol which is compatible with earlier batches of Halo tags.
Use the compatible protocol which is compatible with earlier batches of HaLo tags.
* (default) `true` - use the compatible protocol compatible with all tags (use only if needed);
* `false` - use more recent protocol compatible with tags `v=01.C5` onwards only;
@@ -99,7 +99,7 @@ debugCallback: (cause) => console.log(cause)
The function will return a Promise that will resolve to an object.
Object keys and values will depend on the command that was requested.
Please check [documentation of the available commands (Halo Command Set)](/docs/halo-command-set.md) for more details.
Please check [documentation of the available commands (HaLo Command Set)](/docs/halo-command-set.md) for more details.
### Exceptions

View File

@@ -15,7 +15,7 @@ async function execHaloCmdPCSC(command, reader)
### Input parameter: `command`
An object specifying the command name that you want to invoke, together with the additional command's arguments.
Please check [documentation of the available commands (Halo Command Set)](/docs/halo-command-set.md) for more details.
Please check [documentation of the available commands (HaLo Command Set)](/docs/halo-command-set.md) for more details.
### Input parameter: `reader`
@@ -25,7 +25,7 @@ The Reader object as returned by `nfc-pcsc` library's callback.
The function will return a Promise that will resolve to an object.
Object keys and values will depend on the command that was requested.
Please check [documentation of the available commands (Halo Command Set)](/docs/halo-command-set.md) for more details.
Please check [documentation of the available commands (HaLo Command Set)](/docs/halo-command-set.md) for more details.
### Exceptions

View File

@@ -27,7 +27,7 @@ async function execHaloCmd(command, options)
### Input parameter: `command`
An object specifying the command name that you want to invoke, together with the additional command's arguments.
Please check [documentation of the available commands (Halo Command Set)](/docs/halo-command-set.md) for more details.
Please check [documentation of the available commands (HaLo Command Set)](/docs/halo-command-set.md) for more details.
### Input parameter: `options`
@@ -37,7 +37,7 @@ An object returned from `initNFCManagerHalo` async call.
The function will return a Promise that will resolve to an object.
Object keys and values will depend on the command that was requested.
Please check [documentation of the available commands (Halo Command Set)](/docs/halo-command-set.md) for more details.
Please check [documentation of the available commands (HaLo Command Set)](/docs/halo-command-set.md) for more details.
### Exceptions

View File

@@ -19,7 +19,7 @@ Implement basic code:
```javascript
const nfc = new NFC();
// list of Halo commands that will be executed
// list of HaLo commands that will be executed
// once the tag is detected by the reader
let commands = [
{
@@ -39,7 +39,7 @@ nfc.on('reader', reader => {
reader.on('card', card => {
(async () => {
// the card was detected, we can execute some Halo commands
// the card was detected, we can execute some HaLo commands
// please note you can call execHaloCmdPCSC() multiple times
// in order to execute multiple operations in a single tap
@@ -74,4 +74,4 @@ Please review the [documentation on the execHaloCmdPCSC function](/docs/api-exec
the exact specification of the `execHaloCmdPCSC()` function.
Please review the [documentation of the available commands (Halo Command Set)](/docs/halo-command-set.md) to find
out what commands are available with the Halo tags.
out what commands are available with the HaLo tags.

View File

@@ -2,11 +2,11 @@
## Pre-built CLI binary
Please check "libhalo" GitHub release page for the standalone binary build of the Halo CLI binary.
Please check "libhalo" GitHub release page for the standalone binary build of the HaLo CLI binary.
## Using Halo CLI
## Using HaLo CLI
The Halo CLI will automatically detect the PC/SC card reader and the Halo Tag tapped to it.
The HaLo CLI will automatically detect the PC/SC card reader and the HaLo Tag tapped to it.
Please connect the reader, install appropriate device drivers and tap the tag onto the reader
before executing the commands below.
@@ -28,13 +28,13 @@ before executing the commands below.
./halo-cli sign_raw -k 1 -d bf1b32988255a2371596d00d1a1c58fd37c1f105243bc8d84509ef9214687ba5
```
Please review [documentation of the available commands (Halo Command Set)](/docs/halo-command-set.md) to find out
Please review [documentation of the available commands (HaLo Command Set)](/docs/halo-command-set.md) to find out
more details about the available commands. Please note that the CLI commands are invoked slightly differently,
please review the CLI help for the details about command invocation.
## Building from source
If you wish to build the Halo CLI from source, you can perform the following steps:
If you wish to build the HaLo CLI from source, you can perform the following steps:
1. Clone the repository:
```

View File

@@ -13,12 +13,12 @@ Sign an arbitrary message using ECDSA/Keccak algorithm or sign a raw digest usin
**Note:** You can specify either `message` or `digest`, not both.
**Note:** Set `legacySignCommand` to `true` if your tags are generating URLs
without `v` (version) query string parameter or the `v` parameter is lower than `01.C3` (by lexicographical comparison).
Don't use if all your tags have `v=01.C3` or higher.
without `v` (version) query string parameter or the `v` parameter is lower than `01.C4` (by lexicographical comparison).
Don't use if all your tags have `v=01.C4` or higher.
### Return value
* `input.keyNo` - number of the requested key slot;
* `input.digest` - the digest that was uploaded to the Halo tag for signing (32 bytes, hex encoded);
* `input.digest` - the digest that was uploaded to the HaLo tag for signing (32 bytes, hex encoded);
* `input.message` - (optional) the message that was used to compute the Keccak digest (hex encoded);
* `signature.raw` - raw signature in the (r, s, v) format, where `v` is a recovery param (values: 27 or 28);
* `signature.der` - DER encoded signature (hex encoded);
@@ -113,7 +113,7 @@ so you could use Keccak-256 (without prefix), SHA-256 or other hashing algorithm
## Command: sign_random
Sign a digest composed of a sequential counter (4 bytes) and a random padding (28 bytes) using key #2.
The digest will be internally generated by the Halo Tag, it's not possible to control the value
The digest will be internally generated by the HaLo Tag, it's not possible to control the value
of the digest that will be signed.
### Arguments
@@ -123,7 +123,7 @@ of the digest that will be signed.
### Return value
* `counter` (int) - the current value of key usage counter, incremented with each invocation;
* `digest` (str) - the digest generated by the Halo tag (32 bytes, hex encoded);
* `digest` (str) - the digest generated by the HaLo tag (32 bytes, hex encoded);
* `signature` (str) - DER encoded ECDSA signature of the `digest` (hex encoded);
### Examples

View File

@@ -39,7 +39,7 @@ for both Android and iOS on the same project.
3. Add the following keys in `ios/<<App name>>/Info.plist`:
```
<key>NFCReaderUsageDescription</key>
<string>NFC is used to interact with Halo Tags</string>
<string>NFC is used to interact with HaLo Tags</string>
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>481199130E9F01</string>
@@ -105,4 +105,4 @@ Please check GitHub [arx-research/libhalo-example-react-native](https://github.c
## Advanced usage
* [Documentation of the initNFCManagerHalo API](/docs/api-init-nfc-manager-halo.md)
* [Documentation of the available commands (Halo Command Set)](/docs/halo-command-set.md)
* [Documentation of the available commands (HaLo Command Set)](/docs/halo-command-set.md)

View File

@@ -1,6 +1,6 @@
# Using LibHaLo within a React.js web application
You can use LibHalo within your React.js web application.
You can use LibHaLo within your React.js web application.
## Adding the dependency
@@ -86,4 +86,4 @@ Please check GitHub [arx-research/libhalo-example-reactjs](https://github.com/ar
## Advanced usage
* [Documentation of the execHaloCmdWeb API](/docs/api-exec-cmd-web.md)
* [Documentation of the available commands (Halo Command Set)](/docs/halo-command-set.md)
* [Documentation of the available commands (HaLo Command Set)](/docs/halo-command-set.md)

View File

@@ -1,6 +1,6 @@
# Using LibHaLo as a standalone JavaScript library in a classic HTML application
You can use LibHalo as a single standalone JavaScript file, which could be included
You can use LibHaLo as a single standalone JavaScript file, which could be included
in a classic HTML application.
## Pre-built JavaScript library
@@ -56,7 +56,7 @@ Please review the following demonstrative applications:
## Advanced usage
* [Documentation of the execHaloCmdWeb API](/docs/api-exec-cmd-web.md)
* [Documentation of the available commands (Halo Command Set)](/docs/halo-command-set.md)
* [Documentation of the available commands (HaLo Command Set)](/docs/halo-command-set.md)
## Building library from source

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>Halo ETH Demo</title>
<title>LibHaLo Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
@@ -14,7 +14,7 @@
</head>
<body>
<div class="container">
<h1>Halo ETH Demo</h1>
<h1>LibHaLo Demo</h1>
<h2>Simple message signing (C1 compatible mode)</h2>
<p class="text-muted">
The message will be hashed using Keccak algorithm on the client-side and then the digest will be uploaded to the NFC tag for signing.

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>Halo ETH Demo</title>
<title>LibHaLo Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
@@ -14,7 +14,7 @@
</head>
<body>
<div class="container mt-3 mb-5">
<h1>Halo ETH Demo</h1>
<h1>LibHaLo Demo</h1>
<div class="mb-4">
<div class="mb-2">
@@ -24,14 +24,7 @@
<div class="form-check">
<input class="form-check-input" type="checkbox" id="legacySignCommand">
<label class="form-check-label" for="legacySignCommand">
Version C1 compatibility (<code>command.legacySignCommand</code>)
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="compatibleCallMode" checked>
<label class="form-check-label" for="compatibleCallMode">
Version C3 compatibility (<code>options.compatibleCallMode</code>)
Version C1-C3 compatibility (<code>command.legacySignCommand</code>)
</label>
</div>
</div>
@@ -71,7 +64,6 @@
document.getElementById('statusText').style.color = 'green';
let legacySignCommand = document.getElementById('legacySignCommand').checked;
let compatibleCallMode = document.getElementById('compatibleCallMode').checked;
let digest = document.getElementById('digest').value;
let keyNo = document.getElementById('keyNo').value;
@@ -79,7 +71,6 @@
// all options are optional, you can use them to increase user's experience
let options = {
method: method,
compatibleCallMode: compatibleCallMode,
statusCallback: (cause) => {
if (cause === "init") {
// explicitly ask the user to tap the tag
@@ -99,10 +90,9 @@
};
let command = {
name: "sign",
keyNo: keyNo,
digest: digest,
legacySignCommand: legacySignCommand
name: "write_latch",
latchNo: 2,
data: digest
};
execHaloCmdWeb(command, options)

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>Halo ETH Demo</title>
<title>LibHaLo Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
@@ -14,7 +14,7 @@
</head>
<body>
<div class="container">
<h1>Halo ETH Demo</h1>
<h1>LibHaLo Demo</h1>
<h2>Simple message signing</h2>
<p class="text-muted">
The message will be hashed using Keccak algorithm on the client-side and then the digest will be uploaded to the NFC tag for signing.