Giter VIP home page Giter VIP logo

simple_hardware_wallet's Introduction

Simple hardware wallet for Arduino

A minimalistic hardware wallet working with electrum transactions.

This sketch is a simple demo that shows how to use arduino-bitcoin library to build your own hardware wallet.

It should be used only for educational or testing purposes as default Arduino boards are not secure, their firmware can be updated from the computer and this process doesn't require any user interaction.

A manual on how to make it more secure will follow.

Required hardware

If you don't have an OLED screen you can try it out with serial only wallet.

Uploading firmware

Follow the manuals from Adafruit to set up the board and OLED screen:

Setting up

Put a xprv.txt file on the SD card with your xprv key (for testnet it will start with tprv). You can generate one here.

Communication with the wallet happens over USB. Open Serial Monitor in the Arduino IDE and type commands.

Keys are stored UNENCRYPTED AS A PLAIN TEXT on SD card.

Available commands:

  • xpub - returns a master public key that you can import to electrum or any other watch-only wallet
  • addr <n>, for example addr 5 - returns a receiving address derived from xpub /0/n/, also shows it on the OLED screen
  • changeaddr <n> - returns a change address derived from xpub /1/n/ and shows it on the OLED screen
  • sign_tx <unsigned_tx_from_electrum> - parses unsigned transaction, asks user for confirmation showing outputs one at a time. User can scroll to another output with button B, confirm with button A and cancel with button C. If user confirmed, wallet will sign a transaction and send it back via serial in hex format. This transaction can be broadcasted to the network from electrum console using broadcast("<signed_tx>") command or just go to blockcypher and broadcast it there.

Future development

This sketch will evolve, we would love to add:

  • native segwit and segwit nested in p2sh support
  • generation of a new key
  • encryption of the key on the SD card
  • mnemonic support
  • PSBT support
  • multisig support
  • electrum plugin

simple_hardware_wallet's People

Contributors

stepansnigirev avatar justinmoon avatar gustavorssilva 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.