Skip to content

Commit

Permalink
Add support for the Blockstream Jade hww
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieDriver committed May 18, 2022
1 parent cbc6974 commit d59ad50
Show file tree
Hide file tree
Showing 18 changed files with 1,349 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contrib/build-wine/deterministic.spec
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ hiddenimports += collect_submodules('keepkeylib')
hiddenimports += collect_submodules('websocket')
hiddenimports += collect_submodules('ckcc')
hiddenimports += collect_submodules('bitbox02')
hiddenimports += ['electrum.plugins.jade.jade']
hiddenimports += ['electrum.plugins.jade.jadepy.jade']
hiddenimports += ['PyQt5.QtPrintSupport'] # needed by Revealer


Expand Down Expand Up @@ -69,6 +71,7 @@ a = Analysis([home+'run_electrum',
home+'electrum/plugins/keepkey/qt.py',
home+'electrum/plugins/ledger/qt.py',
home+'electrum/plugins/coldcard/qt.py',
home+'electrum/plugins/jade/qt.py',
#home+'packages/requests/utils.py'
],
binaries=binaries,
Expand Down
5 changes: 5 additions & 0 deletions contrib/deterministic-build/requirements-hw.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,8 @@ wheel==0.37.1 \
colorama==0.4.4 \
--hash=sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b \
--hash=sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2
cbor==1.0.0 \
--hash=sha256:13225a262ddf5615cbd9fd55a76a0d53069d18b07d2e9f19c39e6acb8609bbb6
pyserial==3.5.0 \
--hash=sha256:c4451db6ba391ca6ca299fb3ec7bae67a5c55dde170964c7a14ceefec02f2cf0 \
--hash=sha256:3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb
3 changes: 3 additions & 0 deletions contrib/osx/osx.spec
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ hiddenimports += collect_submodules('keepkeylib')
hiddenimports += collect_submodules('websocket')
hiddenimports += collect_submodules('ckcc')
hiddenimports += collect_submodules('bitbox02')
hiddenimports += ['electrum.plugins.jade.jade']
hiddenimports += ['electrum.plugins.jade.jadepy.jade']
hiddenimports += ['PyQt5.QtPrintSupport'] # needed by Revealer

datas = [
Expand Down Expand Up @@ -75,6 +77,7 @@ a = Analysis([electrum+ MAIN_SCRIPT,
electrum+'electrum/plugins/keepkey/qt.py',
electrum+'electrum/plugins/ledger/qt.py',
electrum+'electrum/plugins/coldcard/qt.py',
electrum+'electrum/plugins/jade/qt.py',
],
binaries=binaries,
datas=datas,
Expand Down
2 changes: 2 additions & 0 deletions contrib/requirements/requirements-hw.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ keepkey>=6.3.1
btchip-python>=0.1.32
ckcc-protocol>=0.7.7
bitbox02>=6.0.0
cbor>=1.0.0,<2.0.0
pyserial>=3.5.0,<4.0.0
2 changes: 2 additions & 0 deletions contrib/udev/55-usb-jade.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
KERNEL=="ttyUSB*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl", SYMLINK+="jade%n"
KERNEL=="ttyACM*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="55d4", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl", SYMLINK+="jade%n"
1 change: 1 addition & 0 deletions contrib/udev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ These are necessary for the devices to be usable on Linux environments.
- `51-trezor.rules` (Trezor): https://github.com/trezor/trezor-common/blob/master/udev/51-trezor.rules
- `51-usb-keepkey.rules` (Keepkey): https://github.com/keepkey/udev-rules/blob/master/51-usb-keepkey.rules
- `51-safe-t.rules` (Archos): https://github.com/archos-safe-t/safe-t-common/blob/master/udev/51-safe-t.rules
- `55-usb-jade.rules` (Blockstream Jade): https://github.com/Blockstream/Jade

# Usage

Expand Down
Binary file added electrum/gui/icons/jade.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added electrum/gui/icons/jade_unpaired.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions electrum/plugins/jade/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from electrum.i18n import _

fullname = 'Blockstream Jade Wallet'
description = 'Provides support for the Blockstream Jade hardware wallet'
#requires = [('', 'github.com/')]
registers_keystore = ('hardware', 'jade', _("Jade wallet"))
available_for = ['qt', 'cmdline']
14 changes: 14 additions & 0 deletions electrum/plugins/jade/cmdline.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from electrum.plugin import hook
from .jade import JadePlugin
from ..hw_wallet import CmdLineHandler

class Plugin(JadePlugin):
handler = CmdLineHandler()
@hook
def init_keystore(self, keystore):
if not isinstance(keystore, self.keystore_class):
return
keystore.handler = self.handler

def create_handler(self, window):
return self.handler
Loading

0 comments on commit d59ad50

Please sign in to comment.