Coder Social home page Coder Social logo

halo-verify-web's Introduction

HaLo Scanner App

This app scans HaLo NFC chip. A HaLo is a "hardware locked" cryptographic asset such as a print, collectable or merchandise. HaLo chips can be scanned via NFC to authenticate the asset as well as make any claims for fungible or non-fungbile assets if available.

Get Started

Setup

To test locally, you should first set up your environment variables by creating a .env file including the following

  • REACT_APP_INFURA_PROJECT_ID: the project ID from an active Infura API key.
  • REACT_APP_BRIDGE_NODE: the URL of a KONG bridge node that is used to create HaLo off-chain records (the default is https://bridge.cryptocash.dev, no API key required).
  • REACT_APP_ARWEAVE_NODE: the URL of an Arweave node (the default is https://arweave.net, no API key required).
  • REACT_APP_TAG_DOMAIN: the domain resolving to the HaLo scanner. The default is eth.vrfy.ch, however, this will fail unless the tag is being scanned at this domain.

For local testing we recommend exposing the app (from localhost:3000) using something like localtunnel.

Note: HaLo scanning functionality will only work through an HTTPS connection.

Installation and Usage with localtunnel

  • npm i
  • npm install -g localtunnel
  • lt --port 3000
  • Edit the REACT_APP_TAG_DOMAIN variable in .env to match the domain given by localtunnel, e.g. https://little-bobcat-81.loca.lt
  • npm start
  • On your smartphone, navigate to the localtunnel domain

Usage

With the app loaded on your NFC-enabled smartphone, tap Initiate Scan and hold the chip to your phone's NFC antenna. On iPhones the antenna is located at the top of the phone. On Androids location can vary significantly and some trial and error may be required.

New Chip

If you have an unassociated HaLo chip, the app will allow you to "mint" an image, name and description to the chip. This feature is currently in alpha; it creates records on Arweave via the KONG bridge that are cross pinned on IPFS.

Minting does not require gas as no contract calls are made. The minting process is off-chain and generates a signature that could be used in a future contract to generate an on-chain asset (e.g. an NFT). It consists of the following steps:

  1. Connect to the wallet of the minter.
  2. Scan the chip to collect identifying public key information (device_id).
  3. Select an image (media), add a name and description.
  4. Sign a recent block hash from the selected chain using the chip (default is Ethereum mainnet).
  5. From the minter wallet, generate an EIP-712 signature of several parameters: including the pre-calculated IPFS hash of the media along with the name, description, device_id, the signature generated by the device and block hash used to generate the signature and the address of the minter wallet.
  6. POST this data to the KONG bridge server which will add the media and tag it will the information from the previous step on Arweave.

Minting is a one time process per chain and is non-reversible.

Previously Associated Chip

If you have a previously associated HaLo chip, the app will retrieve any record information about the chip directly from Arweave. Loading content from Arweave may take a moment.

Testing

If you would like to first test mint with a chip, we recommend first connecting a wallet to a testnet (e.g. Ropsten), then refreshing the app and continuing through the minting flow. These records will only be revealed by a wallet connected to the testnet.

Note: You must have a HaLo chip in order to scan via this app. This app will not scan KONG Cash or SiLo chips.

Roadmap

  • Allow assets to be created across various chainId's.
  • Show the chainId in a human-readable fashion, e.g. Ropsten.
  • Render a spinner for assets that slowly load from Arweave.
  • Add and render video content.
  • Add and render 3D content.
  • Link to existing Arweave/IPFS resource rather than upload.
  • WebNFC for Androids.
  • ERS verification and asset retrieval.

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.