Skip to content

lollerfirst/cashu-nfc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cashu-nfc 💳

cashu-nfc is a Node.js project composed of two separate applications: client and merchant. These applications operate on NFC cards to store and read ecash from them.

Overview

  • The client application allows users to charge up their NFC card with e-cash, and perform various operations such as topping up, withdrawing, refreshing, and resetting their card.
  • The merchant application is designed to request payments from customers and store them in a SQLite database, simulating a cashier's cash drawer.

Installation

Linux

Run this to install required dependencies:

sudo apt install -y libnfc-bin pcscd pcsc-tools

Reload the pcsc service:

sudo systemctl restart pcscd.service

With the reader connected, check that the daemon is able to connect with it:

pcsc_scan

Then to install the project, navigate to the root directory and run:

npm install

Running the Applications

Client

To run the client application, use the following command:

npm run client

The client application uses Inquirer to provide a menu-driven interface, allowing you to select from the following operations:

  • Top-up: Add e-cash to your NFC card
  • Withdraw: Remove e-cash from your NFC card
  • Refresh: Swap old e-cash from your card and mint some fresh
  • Reset: Erase the contents in the NFC card

Merchant

To run the merchant application, use the following command:

npm run merchant

The merchant application allows you to:

  • Request payments from customers through the Request Payment option and store them in the SQLite database, just like a cashier's cash drawer.
  • Withdraw cash from the "drawer" as needed with the Cash Out option.

Contribute

Contributions to cashu-nfc are welcome and greatly appreciated. By contributing to this project, you acknowledge that you are contributing to open source software and agree to the terms of the MIT License provided in this project.

By submitting a pull request or issue, you grant permission for your contribution to be licensed under the MIT License. This means that your contribution will be freely available for others to use, modify, and distribute, and you will not be entitled to any royalties or other compensation.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published