Simple yet powerful Node.js library for communicating with SmartCard.
Promised-based async API is provided on Windows, macOS and Linux for SmartCard readers built upon the PC/SC standard. Feel the power of universal N-API no matter if your computer runs Windows winscard or Unix pcsclite.
🚀 Prebuilt binaries and examples coming soon!
You will need a C++ compiler installed (gcc/clang on Linux, XCode on macOS, Visual Studio on Windows).
There are two ways to build the library:
node-gyp has been with Node.js since the beginning and is de facto standard. It provides simple API and can be called by
$ npm install-gyp
cmake-js was written as a replacement to node-gyp, providing a full CMake experience and direct Electron compatibility. Call it with
$ npm install-cmake
Both ways will lead to the same result - binary will be created in build/Release/
and you can now run the example:
$ npm run exmaple
Library can be built with both node-gyp and cmake-js on any Node.js version >=6. Some tweaking of compiler paths might be needed, we officially support these combinations:
Can be built on Node.js >= 6.
Officially supported:
Node.js | Windows | macOS | Linux |
---|---|---|---|
6.x | ❌ | ✔️ | ✔️ |
7.x | ❌ | ❌ | ❌ |
8.x | ✔️ | ✔️ | ✔️ |
9.x | ❌ | ✔️ | ✔️ |
10.x | ✔️ | ✔️ | ✔️ |
11.x | ❌ | ✔️ | ✔️ |
12.x | ✔️ | ✔️ | ✔️ |
13.x | ✔️ | ✔️ | ✔️ |
Can be built on Node.js >= 6.
Officially supported:
Node.js | Windows | macOS | Linux |
---|---|---|---|
6.x | ❌ | ✔️ | ✔️ |
7.x | ❌ | ❌ | ❌ |
8.x | ❌ | ✔️ | ✔️ |
9.x | ❌ | ✔️ | ✔️ |
10.x | ✔️ | ✔️ | ✔️ |
11.x | ✔️ | ✔️ | ✔️ |
12.x | ✔️ | ✔️ | ✔️ |
13.x | ✔️ | ✔️ | ✔️ |