Skip to content

nnons/amho-verify-web

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

HaLo Chip Web Verifier

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • TypeScript 62.1%
  • SCSS 15.8%
  • JavaScript 15.1%
  • CSS 4.7%
  • HTML 2.0%
  • Pug 0.3%