Coder Social home page Coder Social logo

timdaub / burner-wallet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from austintgriffith/burner-wallet

0.0 3.0 0.0 8.49 MB

πŸ”₯πŸ‘›Burner Wallet to move xDai quickly in a web browser. Sweep to cold storage when you get home. πŸ πŸ‘¨πŸ»β€πŸš’

Home Page: https://xdai.io

License: MIT License

Shell 0.55% Solidity 12.90% JavaScript 82.96% HTML 1.06% CSS 2.54%

burner-wallet's Introduction

πŸ”₯πŸ‘›Burner Wallet to move xDai quickly in a web browser. Sweep to cold storage when you get home. πŸ πŸ‘¨πŸ»β€πŸš’ https://xdai.io

Read the full article here: Ethereum in Emerging Economies - Mass adoption will start where decentralization is necessary

Unfortunately, it is especially difficult to onboard new users because our ecosystem has such a steep learning curve. Traditional wallets put a huge burden on the user to understand a new currency and deal with seed phrases.

What we need is a way to exchange an intuitive currency like DAI using a simple and ubiquitous platform like the mobile webΒ browser.

burnerwalletvideosplash

Contributing as a Developer/Designer

you'll need ganache installed and running

ganache-cli

clone the burner wallet repo

git clone https://github.com/austintgriffith/burner-wallet.git
cd burner-wallet

initialize burner:

npx clevis init

(You'll need to hit enter a few times to specify some config directories.)

install burner:

npm i

link clevis

alias clevis='./node_modules/clevis/bin.js'

compile, deploy, test, and inject all contracts in the frontend:

clevis test full

start the app:

npm start

Meta Transaction Relay

in a new terminal start the decentralized metatx relayer from Tabookey:

./startLocalRelay.sh

then deploy and test

clevis test withrelay

WTF is Clevis? (It's like truffle and drizzle I think.)

Clevis is used to compile, deploy, and test the smart contracts. It is mainly for orchestration, but it also injects all the contracts into the Dapparatus (frontend).

clevis docs:

Testing locally

Take a look at tests/clevis.js, the metamask() function in particular, to give your MetaMask accounts some ETH when you run the full test.

Original Video

burnerwalletscreencast

Here are two phones exchanging value in a matter of seconds using burners:

burnerwalletdemo

One mobile phone can send DAI to another in 5 seconds with a simple QR code scan without any wallet download, this works on web browsers. Users can even send value through messaging services like WhatsApp with a simple link!

The Burner Wallet runs on the xDai sidechain from POA. Since it is in DAI, a dApp can simply refer to amounts in USD. Plus, block times take 5 seconds and gas costs are virtually abstracted because they are so cheap and paid in DAI. Finally, the bridge between xDai and DAI/ETH is as simple as sending tokens to a specific address.Β 

A burner wallet is automatically generated upon visiting https://xdai.io and your private key is stored in a cookie so it will be there when you come back. However, you should sweep any value you hold to a cold wallet regularly and burn your ephemeral private key. A burner wallet is analogous to cash; you won't carry too much because it can be lost but it's astonishingly easy to exchange.Β 

This can also be very handy in everyday use even for the crypto-initiated. If you are share a Lyft or a pizza with a friend and want to split the cost, just shoot their QR code with your camera and it will open up a new burner wallet to exchange value with them. Just don't forget to sweep to cold storage and burn your key when you get home!

Here is a follow up video to show how to go from fiat to DAI to xDai and back: onrampscreencast


Docker Dev Version

You will want to fork this repo and then clone it down. Since I own the repo I'll just clone it:

cd ~;git clone https://github.com/austintgriffith/burner-wallet.git

Then, fire up a Docker container with your environment all prepared for you:

docker run -ti --rm --name clevis -p 3000:3000 -p 8545:8545 -p 18462:18462 -v ~/burner-wallet:/dapp austingriffith/clevis:latest

Note: You will be prompted for directories to store things, just use the defaults (hit enter): image

This will take a while. Eventually it will stand up React, Ganache, and Clevis. (Note: make sure you don't have anything running on port 3000 or 8545 already)

If you visit http://localhost:3000 you will see an initial error that React is missing the injected contracts. To compile, deploy, and inject those contract, run:

πŸ—œοΈ Clevis:/dapp πŸ—œοΈ clevis test full

Don't forget to point your MetaMask at the local RPC endpoint (http://localhost:8545): image

You can view and edit the code with your IDE of choice within the terminal (not from inside Docker container):

atom ~/burner-wallet

To bring up the relayer, you will want to set your http endpoint:

πŸ—œοΈ Clevis:/dapp πŸ—œοΈ echo 'http://0.0.0.0:8545' > relayhttpprovider.env
πŸ—œοΈ Clevis:/dapp πŸ—œοΈ node xdairelay.js

To follow your React logs you run:

tail -f react.log

To follow your ganache/geth logs:

tail -f geth.log

If you would like to give your intial account some eth to start out:

πŸ—œοΈ Clevis:/dapp πŸ—œοΈ clevis send 5 0 ***YOUR_ETH_ADDRESS***

Or better yet, edit the tests/clevis.js to send you xDai every time you run the test suite: image

Then run:

clevis test full

Your frontend should automatically reload and your account should have xDai: image


Are you a developer or designer that would like to help build the next iteration of the πŸ”₯πŸ‘›Burner WalletπŸ‘›πŸ”₯? Here is a short intro video to explain how to get started:

onrampscreencast

To learn more about Clevis and Dapparatus check out some of the following articles:

https://github.com/austintgriffith/clevis https://github.com/austintgriffith/dapparatus https://medium.com/@austin_48503/buidlguidl-0x0-clevis-dapparatus-533936a8236a https://medium.com/@austin_48503/buidlguidl-0x1-guidlcoin-3be30c6ac76f https://medium.com/@austin_48503/%EF%B8%8Fclevis-blockchain-orchestration-682d2396aeef

burner-wallet's People

Contributors

alexvansande avatar anish-agnihotri avatar austintgriffith avatar borwahs avatar dbe avatar iamonuwa avatar johngrantuk avatar lemiscate avatar marvinkruse avatar mrabino1 avatar nigeon avatar paulrberg avatar pedrouid avatar riusricardo avatar sampot avatar shailysangwan avatar stevenjnpearce avatar

Watchers

 avatar  avatar  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.