Mick00 / carfax-on-blockchain

Typescript version of Scaffold-Eth 🏗
MIT License
0 stars 0 forks source link

Contributors validation #8

Closed Mick00 closed 2 years ago

Mick00 commented 2 years ago

Registrar employee have access to a private page to validate the identity of people who submitted their identity through the form.

The page will show a table with all the users who registered with them by fetching data from the database with a status indicator to show the state of the process.

The different states are:

The process can be started on the front end by clicking a button. Here is the generic process:

  1. format the identity according to the data specification below
  2. Prompt the user to sign the data field
  3. Compose the final data with the signature in the signature field and insert the signer address
  4. Upload the file to IPFS and retrieve the hash of the file
  5. Update the state of the validation to state-1
  6. Send a tx to the contract to register the new identity.
  7. update the state of the validation to state-2

The identity format will be in json. Here is an example: { "data": { "name": "InsureYouCar ltd.", "sector": "insurance", "address": "123 yellow street", "email": "contact@iyc.ca", "website": "iyc.ca", "phone_number": "+1 999 999 9999", "eth_address": "0x1234" }, "signer": "0x00000000000000dead", "signature": "0x12abD21094" }