Git Product home page Git Product logo

web3e-application's Introduction

Web3E-Application

Applications Using Web3E

Samples showing real world use cases of Web3E

NB: All samples use Platformio IDE

Runs a DApp Server on an embedded device running Arduino framework.

  • When a user connects to the server, the microcontroller produces a random challenge string embedded in the webpage/DApp that is served.
  • The user clicks on the 'Open Gate' button and a Web3 function call in the DApp JavaScript is intercepted by the wallet/Metamask, which prompts the user the sign the challenge string with their private key.
  • The DApp JavaScript embeds the resulting signature and the wallet address into a header which is sent back to the microcontroller as a redirect-URL (like adverts in emails do to analyse who clicked on their email).
  • The DApp uses the signature and the challenge it sent to perform an EC-recover.
  • The address calculated from the EC-recover is first compared with the address sent to check they match. If they match, we know the user owns the private key for that address.
  • The address is checked to see if it holds an ERC875 AlphaWallet office entry attestation token. If the address does, then the microcontroller begins the sequence to open the door.
  • Opening the door is a series of three button presses to simulate opening the intercom (usually the check the identity of the person asking for access), with intercom open the door open command is sent, then the intercom closed. Some electromechanical relays controlled from the device and wired up to the switches perform these actions.

Setup Instructions

  • Install Platformio
  • Clone this repo and open in Platformio.
  • Set up your WiFi credentials in main.cpp
  • Get AlphaWallet Android or iOS
  • Get some testnet Eth. Visit this site on the AlphaWallet DApp browser.
  • Mint some ERC875 tokens. Visit here on your DApp browser.
  • Take a note of the contract address. Copy/paste contract address into the source code inside the 'STORMBIRD_CONTRACT' define.
  • Build and deploy the sample to your Arduino framework device. We used this one.
  • Use the transfer or MagicLink on AlphaWallet to give out the tokens.

Donations

If you support the cause, we could certainly use donations to help fund development:

0xbc8dAfeacA658Ae0857C80D8Aa6dE4D487577c63

web3e-application's People

Contributors

jamessmartcell avatar hboon avatar zhangzhongnan928 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.