Skip to main content
. 2023 Mar 2;23(5):2757. doi: 10.3390/s23052757
Algorithm 1: Algorithm for Sign-Up/Registration Process
Input: Ethereum Address and Password
Initialization:
  • a)

    Initialize Metamask wallet account with faucet Ether

  • b)

    Connect to Ropsten Test Network

  1. Function register(user_password):

  2. account = web3.currentProvider.selectedAddress

  3. promise = addAuth(user_password).send(from: account)

  4. if (promise) then

  5. print(“User Registered”)

  6. result = true

  7. else

  8. result = false

  9. return result

  10. Function submitfunction(userpassword):

  11. if(userpassword) then

  12. c = character_count(userpassword)

  13. registered = register(userpassword)

  14. if registered then

  15. store c in database mapped with Ethereum Address

  16. else

  17. print (“Enter Password”)