Giter Club home page Giter Club logo

hwi's Introduction

Bitcoin Hardware Wallet Interface

Build Status

The Bitcoin Hardware Wallet Interface is a Python library and command line tool for interacting with hardware wallets. It provides a standard way for software to work with hardware wallets without needing to implement device specific drivers. Python software can use the provided library (hwilib). Software in other languages can execute the hwi tool.

Prerequisites

Python 3 is required. The libraries and udev rules for each device must also be installed. Some libraries will need to be installed

For Ubuntu/Debian:

sudo apt install libusb-1.0-0-dev libudev-dev

For macOS:

brew install libusb

This project uses the Poetry dependency manager. Once HWI's source has been downloaded with git clone, it and its dependencies can be installed via poetry by execting the following in the root source directory:

poetry install

Pip can also be used to install all of the dependencies (in virtualenv or system):

pip3 install hidapi # HID API needed in general
pip3 install ecdsa
pip3 install pyaes
pip3 install typing_extensions
pip3 install mnemonic
pip3 install libusb1

Install

git clone https://github.com/bitcoin-core/HWI.git
cd HWI

Usage

To use, first enumerate all devices and find the one that you want to use with

./hwi.py enumerate

Once the device type and device path is known, issue commands to it like so:

./hwi.py -t <type> -d <path> <command> <command args>

All output will be in JSON form and sent to stdout. Additional information or prompts will be sent to stderr and will not necessarily be in JSON. This additional information is for debugging purposes.

Device Support

The below table lists what devices and features are supported for each device.

Please also see docs for additional information about each device.

Feature \ Device Ledger Nano S Trezor One Trezor Model T Digital BitBox KeepKey Coldcard
Support Planned Yes Yes Yes Yes Yes Yes
Implemented Yes Yes Yes Yes Yes Yes
xpub retrieval Yes Yes Yes Yes Yes Yes
Message Signing Yes Yes Yes Yes Yes Yes
Device Setup N/A Yes Yes Yes Yes N/A
Device Wipe N/A Yes Yes Yes Yes N/A
Device Recovery N/A Yes Yes N/A Yes N/A
Device Backup N/A N/A N/A Yes N/A Yes
P2PKH Inputs Yes Yes Yes Yes Yes Yes
P2SH-P2WPKH Inputs Yes Yes Yes Yes Yes Yes
P2WPKH Inputs Yes Yes Yes Yes Yes Yes
P2SH Multisig Inputs Yes Yes Yes Yes Yes Yes
P2SH-P2WSH Multisig Inputs Yes Yes Yes Yes No Yes
P2WSH Multisig Inputs Yes Yes Yes Yes Yes Yes
Bare Multisig Inputs Yes N/A N/A Yes N/A N/A
Arbitrary scriptPubKey Inputs Yes N/A N/A Yes N/A N/A
Arbitrary redeemScript Inputs Yes N/A N/A Yes N/A N/A
Arbitrary witnessScript Inputs Yes N/A N/A Yes N/A N/A
Non-wallet inputs Yes Yes Yes Yes Yes Yes
Mixed Segwit and Non-Segwit Inputs N/A Yes N/A Yes Yes Yes
Display on device screen Yes Yes Yes N/A Yes Yes

Using with Bitcoin Core

See Using Bitcoin Core with Hardware Wallets.

License

This project is available under the MIT License, Copyright Andrew Chow.

hwi's People

Contributors

achow101 avatar instagibbs avatar jb55 avatar sjors avatar gabridome avatar hugohn avatar jonasnick avatar doc-hex avatar fanquake avatar fivepiece avatar jonathancross avatar rcasatta avatar tongokongo avatar lontivero avatar nopara73 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.