Coder Social home page Coder Social logo

dms's Introduction

Dead Man's Switch

This is a simple project implementing Dead Man's Swtich at Ethereum Blockchain for the event Decentralized Database Hackathon promoted by BLUZELLE at Launch Academy, Vancouver BC.

Our Team

What it is?

A dead man's switch is a switch that is automatically operated if the human operator becomes incapacitated, such as through death, loss of consciousness, or being bodily removed from control. Originally applied to switches on a vehicle or machine, it has since come to be used to describe other intangible uses like in computer software.

Software versions of dead man's switches are generally only used by people with technical expertise, and can serve several purposes; such as sending a notification to friends or deleting and encrypting data. The "non-event" triggering these can be almost anything, such as failing to log in for 7 consecutive days, not responding to an automated e-mail, ping, a GPS-enabled telephone not moving for a period of time, or merely failing to type a code within a few minutes of a computer's boot. An example of a software based dead man's switch is a Dead Man's Switch which starts when the computer boots up and can encrypt or delete user specified data if an unauthorised user should ever gain access to the protected computer. Google's Inactive Account Manager allows the account holder to nominate someone else to access their services if not used for an extended period.

Source: https://en.wikipedia.org/wiki/Dead_man%27s_switch

How it will work here?

Basically we created an smart contract on Ethereum Blockchain that a trustor will attach a secret information and sign the contract with his private key. This contract will expire eventually in some point of time in future. The trustor have to interact with our dApp to inform he is alive and so his secret remains protect. If in case the trustor do not interact with the dApp we assume he's dead so the smart contract will expire. In that event, anyone with the trustor public address can recover his secret.

Flowchart

Dead Man's Switch Flowchart

Requirements

Node.js version +5

Installation

Install testrpc and truffle

npm install -g ethereumjs-testrpc
npm install -g truffle

Then clone this project and install the node dependencies

git clone https://github.com/deadmenswitch/dms.git
cd dms
npm install

Open a second terminal window and execute testrpc and leave the window opened. At this point you should copy the mnemonic seed and configure your Metamask to access the accounts.

testrpc

At the first terminal window, where you ran npm install, execute the following commands. It will compile the smart contract and migrate to our blockchain

truffle compile
truffle migrate

If everthing went well (you can see a few log lines at testrpc output) you can start the dApp

npm run dev

Now you should see these following lines

Project is running at http://localhost:8080/
...
webpack: Compiled successfully.

Go to your web browser and access the accress http://localhost:8080/create.html to create and deploy the smart contract.

Done!

License

This project is licensed under the MIT License - see the LICENSE file for details

dms's People

Contributors

gfnord avatar tsuianthonyvr avatar alex-precosky avatar absolutespace avatar

Watchers

James Cloos 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.