diff --git a/docs/web-standalone.md b/docs/web-standalone.md index 428264a..7d0f5fe 100644 --- a/docs/web-standalone.md +++ b/docs/web-standalone.md @@ -49,8 +49,8 @@ async function btnPressed() { Please review the following demonstrative applications: -* [Simple digest signing demo (version >=C3)](/web/examples/simple.html) -* [Simple digest signing demo (earlier versions)](/web/examples/compatible-c1.html) +* [Simple digest signing demo (version >=C4)](/web/examples/simple.html) +* [Simple digest signing demo (earlier versions)](/web/examples/compatible.html) * [More advanced message signing demo (all versions)](/web/examples/demo.html) ## Advanced usage diff --git a/fronts/common.js b/drivers/common.js similarity index 100% rename from fronts/common.js rename to drivers/common.js diff --git a/fronts/credential.js b/drivers/credential.js similarity index 100% rename from fronts/credential.js rename to drivers/credential.js diff --git a/fronts/nfc_manager.js b/drivers/nfc_manager.js similarity index 100% rename from fronts/nfc_manager.js rename to drivers/nfc_manager.js diff --git a/fronts/pcsc.js b/drivers/pcsc.js similarity index 100% rename from fronts/pcsc.js rename to drivers/pcsc.js diff --git a/fronts/pcsc_ndef.js b/drivers/pcsc_ndef.js similarity index 100% rename from fronts/pcsc_ndef.js rename to drivers/pcsc_ndef.js diff --git a/fronts/webnfc.js b/drivers/webnfc.js similarity index 100% rename from fronts/webnfc.js rename to drivers/webnfc.js diff --git a/index.js b/index.js index 2eb60ee..abec3cb 100644 --- a/index.js +++ b/index.js @@ -1,9 +1,9 @@ -const {initNFCManagerHalo} = require("./fronts/nfc_manager"); -const {execHaloCmdPCSC} = require("./fronts/pcsc"); +const {initNFCManagerHalo} = require("./drivers/nfc_manager"); +const {execHaloCmdPCSC} = require("./drivers/pcsc"); const { execHaloCmdWeb, execHaloCmd -} = require("./fronts/common"); +} = require("./drivers/common"); const { HaloTagError, HaloLogicError, @@ -13,6 +13,10 @@ const { NFCOperationError } = require("./halo/exceptions"); +/** + * 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 = { // for desktop usage execHaloCmdPCSC, diff --git a/web/examples/compatible-c1.html b/web/examples/compatible.html similarity index 100% rename from web/examples/compatible-c1.html rename to web/examples/compatible.html diff --git a/web/weblib.js b/web/weblib.js index b4ab676..3f3a227 100644 --- a/web/weblib.js +++ b/web/weblib.js @@ -1,6 +1,6 @@ const { execHaloCmdWeb, -} = require("../fronts/common"); +} = require("../drivers/common"); const { HaloTagError, HaloLogicError,