Skip to content

Commit

Permalink
Merge #475: Add support for the Blockstream Jade hww
Browse files Browse the repository at this point in the history
db17fed Add tests for Jade hww using qemu emulator (Jamie C. Driver)
44d556e Add support for the Blockstream Jade hww (Jamie C. Driver)

Pull request description:

ACKs for top commit:
  achow101:
    ACK db17fed

Tree-SHA512: 879f510fb171a6570bab415d880bd86de9e02ef481d901802515e07ac4c7ba93cdfddf62a5663cf85538f3b78224f8699b7d5aacc8120395d959b5f95510b794
  • Loading branch information
achow101 committed Nov 24, 2021
2 parents a109bcd + db17fed commit fa5986a
Show file tree
Hide file tree
Showing 21 changed files with 1,795 additions and 54 deletions.
24 changes: 24 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@ device_matrix_template: &DEVICE_MATRIX_TEMPLATE
- tar -xvf "mcu.tar.gz"
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz"
- tar -xvf "bitcoin.tar.gz"
- env:
DEVICE: --jade
depends_on:
- Jade Sim Builder
- dist_builder
- bitcoind_builder
fetch_sim_script:
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/Jade Sim Builder/sim/jade.tar.gz"
- tar -xvf "jade.tar.gz"
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz"
- tar -xvf "bitcoin.tar.gz"
- env:
DEVICE: --ledger
depends_on:
Expand Down Expand Up @@ -102,6 +113,7 @@ task:
hwilib/devices/bitbox02.py
hwilib/devices/coldcard.py
hwilib/devices/digitalbitbox.py
hwilib/devices/jade.py
hwilib/devices/__init__.py
hwilib/devices/keepkey.py
hwilib/devices/ledger.py
Expand Down Expand Up @@ -185,6 +197,18 @@ task:
sim_artifacts:
path: "mcu.tar.gz"

task:
env:
DEVICE: --jade
name: Jade Sim Builder
sim_work_cache:
folder: test/work/jade
build_script:
- cd test; ./setup_environment.sh $DEVICE; cd ..
- tar -czf jade.tar.gz test/work/jade/simulator
sim_artifacts:
path: "jade.tar.gz"

task:
env:
DEVICE: --ledger
Expand Down
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
exclude = *.pyc,__pycache__,hwilib/devices/btchip/,hwilib/devices/ckcc/,hwilib/devices/trezorlib/,test/work/,hwilib/ui
exclude = *.pyc,__pycache__,hwilib/devices/btchip/,hwilib/devices/ckcc/,hwilib/devices/jadepy/,hwilib/devices/trezorlib/,test/work/,hwilib/ui
ignore = E261,E302,E305,E501,E722,W5
per-file-ignores = setup.py:E122
5 changes: 4 additions & 1 deletion ci/cirrus.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ RUN apt-get install -y \
libdb-dev \
libdb++-dev \
libevent-dev \
libgcrypt20-dev \
libnewlib-arm-none-eabi \
libsdl2-dev \
libsdl2-image-dev \
libssl-dev \
libtool \
libudev-dev \
libusb-1.0-0-dev \
ninja-build \
pkg-config \
protobuf-compiler \
qemu-user-static
Expand All @@ -48,7 +50,7 @@ ENV PATH="/root/.cargo/bin:$PATH"
# as needed.
# e.g.,
# docker build -f ci/cirrus.Dockerfile -t hwi_test .
# docker run -it --entrypoint /bin/bash hwi_tst
# docker run -it --entrypoint /bin/bash hwi_test
# cd test; poetry run ./run_tests.py --ledger --coldcard --interface=cli --device-only
####################

Expand All @@ -68,6 +70,7 @@ ENV PATH="/root/.cargo/bin:$PATH"
#RUN cd test; ./setup_environment.sh --bitbox01
#RUN cd test; ./setup_environment.sh --ledger
#RUN cd test; ./setup_environment.sh --keepkey
#RUN cd test; ./setup_environment.sh --jade
#RUN cd test; ./setup_environment.sh --bitcoind
#
## Once everything has been built, put rest of files in place
Expand Down
92 changes: 47 additions & 45 deletions docs/devices/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,51 +10,51 @@ The table below lists what devices and features are supported for each device.
* ```` - supported by the firmware and not implemented in HWI
* ```` - not supported by the firmware

+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| Feature \\ Device | Ledger Nano X | Ledger Nano S | Trezor One | Trezor Model T | BitBox01 | BitBox02 | KeepKey | Coldcard |
+====================================+===============+===============+============+================+==========+==========+=========+==========+
| Support Planned |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| Implemented |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| xpub retrieval |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| Message Signing |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| Device Setup |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| Device Wipe |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| Device Recovery |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| Device Backup |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| P2PKH Inputs |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| P2SH-P2WPKH Inputs |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| P2WPKH Inputs |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| P2SH Multisig Inputs |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| P2SH-P2WSH Multisig Inputs |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| P2WSH Multisig Inputs |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| Bare Multisig Inputs |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| Arbitrary scriptPubKey Inputs |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| Arbitrary redeemScript Inputs |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| Arbitrary witnessScript Inputs |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| Non-wallet inputs |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| Mixed Segwit and Non-Segwit Inputs |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
| Display on device screen |||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| Feature \\ Device | Ledger Nano X | Ledger Nano S | Trezor One | Trezor Model T | BitBox01 | BitBox02 | KeepKey | Coldcard | Blockstream Jade |
+====================================+===============+===============+============+================+==========+==========+=========+==========+==================+
| Support Planned ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| Implemented ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| xpub retrieval ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| Message Signing ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| Device Setup ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| Device Wipe ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| Device Recovery ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| Device Backup ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| P2PKH Inputs ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| P2SH-P2WPKH Inputs ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| P2WPKH Inputs ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| P2SH Multisig Inputs ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| P2SH-P2WSH Multisig Inputs ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| P2WSH Multisig Inputs ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| Bare Multisig Inputs ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| Arbitrary scriptPubKey Inputs ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| Arbitrary redeemScript Inputs ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| Arbitrary witnessScript Inputs ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| Non-wallet inputs ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| Mixed Segwit and Non-Segwit Inputs ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+
| Display on device screen ||||||||||
+------------------------------------+---------------+---------------+------------+----------------+----------+----------+---------+----------+------------------+

Support Policy
================
Expand Down Expand Up @@ -99,3 +99,5 @@ Device APIs
:members:
.. automodule:: hwilib.devices.coldcard
:members:
.. automodule:: hwilib.devices.jade
:members:
1 change: 1 addition & 0 deletions hwilib/devices/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
'digitalbitbox',
'coldcard',
'bitbox02',
'jade'
]

0 comments on commit fa5986a

Please sign in to comment.