Code Monkey home page Code Monkey logo

cryptonfc's Introduction

CryptoNFC

cryptoNFC provides crypto-backed NFC charge and payments. It uses the decentralized Wavelet network to send PERL tokens from user to user.

Dependencies

Usage

As the owner of the IC card, run python3 client/get_key.py, and use this credential to log into the Wavelet testnet.

In contract/transfer-nfc/, run:

cargo build --release --target wasm32-unknown-unknown

and upload the transfer-nfc.wasm file to the smart contract uploader.

As the party who wants to receive tokens, run:

$ export SERIAL_DEVICE=[path to the serial device of the NFC reader]
$ export CONTRACT_ID=[the ID of the smart contract]
$ export RECIPIENT_ID=[the ID of the recipient of the tokens]
$ python3 client/cryptoNFC.py [number of microPERLs to send]

Then, tap the user's IC card to the IC reader.

How does it work?

By sending tokens to a smart contract associated with an IC card, a user can effectively charge their IC card, and remit those tokens to another party using an IC card reader.

What's going on under the hood?

We use the UID of a ISO/IEC 14443 A/MIFARE card to generate a unique identity for a user in the Wavelet network, which they can use to log in and upload a smart contract which can authorize token to be sent to a third party. By sending tokens to the smart contract via the charge_ic function of the smart contract, the user can providing another party with the contract ID and UID, the user can authorize that party to deduct some tokens using the ic_transaction function of the same contract.

Flowchart

Authors

cryptonfc's People

Contributors

waybeforenow avatar zk1tty avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.