-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add support for Satochip hardware wallet #5523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
71e51de
64191bd
6668a05
9a770c1
707bb8c
3ea3e2b
ecfff27
dc70165
9fa120a
23ee3e8
1f2b83c
5789ad6
a4e6ff5
1017b1c
dc612ba
591b297
98a2321
636b9f5
bb04379
037fcd0
5eeab49
23d857a
75fb217
fdff14f
6676fad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| Electrum - Lightweight Bitcoin client | ||
| ===================================== | ||
|
|
||
| :: | ||
|
|
||
| Licence: MIT Licence | ||
| Author: Thomas Voegtlin | ||
| Language: Python | ||
| Homepage: https://electrum.org/ | ||
|
|
||
|
|
||
| .. image:: https://travis-ci.org/spesmilo/electrum.svg?branch=master | ||
| :target: https://travis-ci.org/spesmilo/electrum | ||
| :alt: Build Status | ||
| .. image:: https://coveralls.io/repos/github/spesmilo/electrum/badge.svg?branch=master | ||
| :target: https://coveralls.io/github/spesmilo/electrum?branch=master | ||
| :alt: Test coverage statistics | ||
| .. image:: https://img.shields.io/badge/help-translating-blue.svg | ||
| :target: https://crowdin.com/project/electrum | ||
| :alt: Help translating Electrum online | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| Getting started | ||
| =============== | ||
|
|
||
| Electrum is a pure python application. If you want to use the | ||
| Qt interface, install the Qt dependencies:: | ||
|
|
||
| sudo apt-get install python3-pyqt5 | ||
|
|
||
| If you downloaded the official package (tar.gz), you can run | ||
| Electrum from its root directory, without installing it on your | ||
| system; all the python dependencies are included in the 'packages' | ||
| directory. To run Electrum from its root directory, just do:: | ||
|
|
||
| ./electrum | ||
|
|
||
| You can also install Electrum on your system, by running this command:: | ||
|
|
||
| sudo apt-get install python3-setuptools | ||
| pip3 install .[fast] | ||
|
|
||
| This will download and install the Python dependencies used by | ||
| Electrum, instead of using the 'packages' directory. | ||
| The 'fast' extra contains some optional dependencies that we think | ||
| are often useful but they are not strictly needed. | ||
|
|
||
| If you cloned the git repository, you need to compile extra files | ||
| before you can run Electrum. Read the next section, "Development | ||
| Version". | ||
|
|
||
|
|
||
|
|
||
| Development version | ||
| =================== | ||
|
|
||
| Check out the code from GitHub:: | ||
|
|
||
| git clone git://github.com/spesmilo/electrum.git | ||
| cd electrum | ||
|
|
||
| Run install (this should install dependencies):: | ||
|
|
||
| pip3 install .[fast] | ||
|
|
||
| Render the SVG icons to PNGs (optional):: | ||
|
|
||
| for i in lock unlock confirmed status_lagging status_disconnected status_connected_proxy status_connected status_waiting preferences; do convert -background none icons/$i.svg icons/$i.png; done | ||
|
|
||
| Compile the icons file for Qt:: | ||
|
|
||
| sudo apt-get install pyqt5-dev-tools | ||
| pyrcc5 icons.qrc -o gui/qt/icons_rc.py | ||
|
|
||
| Compile the protobuf description file:: | ||
|
|
||
| sudo apt-get install protobuf-compiler | ||
| protoc --proto_path=lib/ --python_out=lib/ lib/paymentrequest.proto | ||
|
|
||
| Create translations (optional):: | ||
|
|
||
| sudo apt-get install python-requests gettext | ||
| ./contrib/make_locale | ||
|
|
||
|
|
||
|
|
||
|
|
||
| Creating Binaries | ||
| ================= | ||
|
|
||
|
|
||
| To create binaries, create the 'packages' directory:: | ||
|
|
||
| ./contrib/make_packages | ||
|
|
||
| This directory contains the python dependencies used by Electrum. | ||
|
|
||
| Mac OS X / macOS | ||
| -------- | ||
|
|
||
| See `contrib/build-osx/`. | ||
|
|
||
| Windows | ||
| ------- | ||
|
|
||
| See `contrib/build-wine/`. | ||
|
|
||
|
|
||
| Android | ||
| ------- | ||
|
|
||
| See `gui/kivy/Readme.txt` file. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,113 +1,97 @@ | ||
| Electrum - Lightweight Bitcoin client | ||
| ===================================== | ||
| Electrum-Satochip - Lightweight Bitcoin client for the Satochip Hardware Wallet | ||
| ================================================================================= | ||
|
|
||
| :: | ||
|
|
||
| Licence: MIT Licence | ||
| Author: Thomas Voegtlin | ||
| Author: Thomas Voegtlin, modified by Toporin | ||
| Language: Python (>= 3.6) | ||
| Homepage: https://electrum.org/ | ||
| Homepage: | ||
|
|
||
| Introduction | ||
| ============ | ||
|
|
||
| .. image:: https://travis-ci.org/spesmilo/electrum.svg?branch=master | ||
| :target: https://travis-ci.org/spesmilo/electrum | ||
| :alt: Build Status | ||
| .. image:: https://coveralls.io/repos/github/spesmilo/electrum/badge.svg?branch=master | ||
| :target: https://coveralls.io/github/spesmilo/electrum?branch=master | ||
| :alt: Test coverage statistics | ||
| .. image:: https://d322cqt584bo4o.cloudfront.net/electrum/localized.svg | ||
| :target: https://crowdin.com/project/electrum | ||
| :alt: Help translate Electrum online | ||
| This is a fork of Electrum modified for use with the Satochip Hardware Wallet. To use it, you need a device with the Satochip Javacard Applet installed. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe undo changes in this file?? if you want a readme specific to your plugin, see e.g. https://github.com/spesmilo/electrum/blob/2a80f6a3ad1997762734b157a023f8dcd16f2f7f/electrum/plugins/coldcard/README.md |
||
| If the wallet is not intialized yet, Electrum will perform the setup (you only need to do this once). During setup, a seed is created: this seed allows you to recover your wallet at anytime, so make sure to BACKUP THE SEED SECURELY! During setup, a PIN code is also created: this PIN allows to unlock th device to access your funds. If you try too many wrong PIN, your device will be locked indefinitely (it is 'bricked'). If you loose your PIN or brick your device, you can only recover your funds with the seed backup. | ||
|
|
||
| The Satochip wallet is currently in Beta, use with caution! In this phase, it is strongly recommended to use the software on the Bitcoin testnet only. | ||
| This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. | ||
|
|
||
| Rem: Electrum uses Python 3.x. In case of error, check first that you are not trying to run Electrum with Python 2.x or with Python 2.x libraries. | ||
|
|
||
| Development version (Windows 64bits) | ||
| ===================================== | ||
|
|
||
| Install the latest python 3.6 release from https://www.python.org (https://www.python.org/downloads/release/python-368/) | ||
| (Caution: installing another release than 3.6 may cause incompatibility issues with pyscard) | ||
|
|
||
| Getting started | ||
| =============== | ||
| Clone or download the code from GitHub. | ||
|
|
||
| Electrum is a pure python application. If you want to use the | ||
| Qt interface, install the Qt dependencies:: | ||
| Open a PowerShell command line in the electrum folder | ||
|
|
||
| sudo apt-get install python3-pyqt5 | ||
| In PowerShell, install the electrum dependencies:: | ||
|
|
||
| If you downloaded the official package (tar.gz), you can run | ||
| Electrum from its root directory without installing it on your | ||
| system; all the python dependencies are included in the 'packages' | ||
| directory. To run Electrum from its root directory, just do:: | ||
| python -m pip install . | ||
| You may also ned to install Python3-pyqt5:: | ||
|
|
||
| ./run_electrum | ||
| python -m pip install pyqt5 | ||
| Install pyscard from https://pyscard.sourceforge.io/ | ||
| Pyscard is required to connect to the smartcard:: | ||
|
|
||
| You can also install Electrum on your system, by running this command:: | ||
| python -m pip install pyscard | ||
| In case of error message, you may also install pyscard from the installer: | ||
| Download the .whl files from https://sourceforge.net/projects/pyscard/files/pyscard/pyscard%201.9.7/ and run:: | ||
|
|
||
| sudo apt-get install python3-setuptools | ||
| python3 -m pip install .[fast] | ||
| python -m pip install pyscard-1.9.7-cp36-cp36m-win_amd64.whl | ||
|
|
||
| This will download and install the Python dependencies used by | ||
| Electrum instead of using the 'packages' directory. | ||
| The 'fast' extra contains some optional dependencies that we think | ||
| are often useful but they are not strictly needed. | ||
| In PowerShell, run electrum on the testnet (-v allows for verbose output):: | ||
|
|
||
| If you cloned the git repository, you need to compile extra files | ||
| before you can run Electrum. Read the next section, "Development | ||
| Version". | ||
| python .\run_electrum -v --testnet | ||
|
|
||
| Development version (Ubuntu) | ||
| ============================== | ||
| (Electrum requires Python 3.6, which should be installed by default on Ubuntu) | ||
| (If necessary, install pip: sudo apt-get install python3-pip) | ||
|
|
||
| Electrum is a pure python application. To use the | ||
| Qt interface, install the Qt dependencies:: | ||
|
|
||
| Development version | ||
| =================== | ||
| sudo apt-get install python3-pyqt5 | ||
|
|
||
| Check out the code from GitHub:: | ||
|
|
||
| git clone git://github.com/spesmilo/electrum.git | ||
| git clone git://github.com/Toporin/electrum.git | ||
| cd electrum | ||
|
|
||
| In the electrum folder: | ||
|
|
||
| Run install (this should install dependencies):: | ||
|
|
||
| python3 -m pip install .[fast] | ||
|
|
||
|
|
||
| Compile the protobuf description file:: | ||
|
|
||
| sudo apt-get install protobuf-compiler | ||
| protoc --proto_path=electrum --python_out=electrum electrum/paymentrequest.proto | ||
|
|
||
| Create translations (optional):: | ||
|
|
||
| sudo apt-get install python-requests gettext | ||
| ./contrib/pull_locale | ||
|
|
||
|
|
||
|
|
||
|
|
||
| Creating Binaries | ||
| ================= | ||
|
|
||
| Linux (tarball) | ||
| --------------- | ||
|
|
||
| See :code:`contrib/build-linux/README.md`. | ||
|
|
||
|
|
||
| Linux (AppImage) | ||
| ---------------- | ||
|
|
||
| See :code:`contrib/build-linux/appimage/README.md`. | ||
|
|
||
|
|
||
| Mac OS X / macOS | ||
| ---------------- | ||
|
|
||
| See :code:`contrib/osx/README.md`. | ||
|
|
||
|
|
||
| Windows | ||
| ------- | ||
|
|
||
| See :code:`contrib/build-wine/README.md`. | ||
|
|
||
|
|
||
| Android | ||
| ------- | ||
| python3 -m pip install . | ||
| Install pyscard (https://pyscard.sourceforge.io/) | ||
| Pyscard is required to connect to the smartcard:: | ||
| sudo apt-get install pcscd | ||
| sudo apt-get install python3-pyscard | ||
| (For alternatives, see https://github.com/LudovicRousseau/pyscard/blob/master/INSTALL.md for more detailed installation instructions) | ||
|
|
||
|
|
||
| To run Electrum use:: | ||
| python3 electrum -v --testnet | ||
| Test suite | ||
| ============= | ||
|
|
||
| To run the test suite, run:: | ||
|
|
||
| python -m unittest electrum.plugins.satochip.test_CardConnector | ||
| The test suite uses the following default PIN code: "12345678". | ||
| If you run the test suite after (or before) electrum, you may block the card if the PIN used are not the same! | ||
| If the card is locked, you will have to reinstall the javacard applet on the card. | ||
|
|
||
| See :code:`electrum/gui/kivy/Readme.md`. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,8 @@ hiddenimports += collect_submodules('safetlib') | |
| hiddenimports += collect_submodules('btchip') | ||
| hiddenimports += collect_submodules('keepkeylib') | ||
| hiddenimports += collect_submodules('websocket') | ||
| hiddenimports += collect_submodules('satochip') #DebugSatochip | ||
| hiddenimports += collect_submodules('smartcard') #DebugSatochip | ||
| hiddenimports += collect_submodules('ckcc') | ||
| hiddenimports += ['PyQt5.QtPrintSupport'] # needed by Revealer | ||
|
|
||
|
|
@@ -44,6 +46,7 @@ datas = [ | |
| (home+'electrum/plugins', 'electrum/plugins'), | ||
| ('C:\\Program Files (x86)\\ZBar\\bin\\', '.'), | ||
| (home+'electrum/gui/icons', 'electrum/gui/icons'), | ||
| (PYHOME+'\\Lib\\site-packages\\smartcard\\scard\\_scard.cp36-win32.pyd', '.\\smartcard\\scard\\') #debugSatochip | ||
| ] | ||
| datas += collect_data_files('trezorlib') | ||
| datas += collect_data_files('safetlib') | ||
|
|
@@ -68,6 +71,7 @@ a = Analysis([home+'run_electrum', | |
| home+'electrum/plugins/safe_t/qt.py', | ||
| home+'electrum/plugins/keepkey/qt.py', | ||
| home+'electrum/plugins/ledger/qt.py', | ||
| home+'electrum/plugins/satochip/qt.py', #DebugSatochip | ||
| home+'electrum/plugins/coldcard/qt.py', | ||
| #home+'packages/requests/utils.py' | ||
| ], | ||
|
|
@@ -121,7 +125,7 @@ exe_standalone = EXE( | |
| strip=None, | ||
| upx=False, | ||
| icon=home+'electrum/gui/icons/electrum.ico', | ||
| console=False) | ||
| console=True) #DebugSatochip True | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. leftover by mistake?? |
||
| # console=True makes an annoying black box pop up, but it does make Electrum output command line commands, with this turned off no output will be given but commands can still be used | ||
|
|
||
| exe_portable = EXE( | ||
|
|
@@ -134,7 +138,7 @@ exe_portable = EXE( | |
| strip=None, | ||
| upx=False, | ||
| icon=home+'electrum/gui/icons/electrum.ico', | ||
| console=False) | ||
| console=True) #DebugSatochip True | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same |
||
|
|
||
| ##### | ||
| # exe and separate files that NSIS uses to build installer "setup" exe | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,14 @@ PYINSTALLER_REPO="https://github.com/SomberNight/pyinstaller.git" | |
| PYINSTALLER_COMMIT=d1cdd726d6a9edc70150d5302453fb90fdd09bf2 | ||
| # ^ tag 3.4, plus a custom commit that fixes cross-compilation with MinGW | ||
|
|
||
| #DebugSatochip pyscard | ||
| #PYSCARD_FILENAME=pyscard-1.9.7-cp36-cp36m-win_amd64.whl #python64-bits | ||
| #PYSCARD_URL=https://sourceforge.net/projects/pyscard/files/pyscard/pyscard%201.9.7/pyscard-1.9.7-cp36-cp36m-win_amd64.whl/download | ||
| #PYSCARD_SHA256=c63a87e4e7c87ce4c1299a1d8e0cae4e43f27451ca210f2c54f2dcd7467565c5 | ||
| PYSCARD_FILENAME=pyscard-1.9.8-cp36-cp36m-win32.whl #python32-bits | ||
| PYSCARD_URL=https://ci.appveyor.com/api/buildjobs/j60tkykj6vh0ppiy/artifacts/dist%2Fpyscard-1.9.8-cp36-cp36m-win32.whl | ||
| PYSCARD_SHA256=4641b5db53fb3562671b7b7c685ddf8f715180e2809106fb2a9361dfad553b4b | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this not available on pypi/pip? i.e. https://pypi.org/project/pyscard/ ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The maintainer of the project does not provide official releases for Windows 32-bit apparently. Since the project is open-source, it should be possible to build it from sources but it looks quite complex (LudovicRousseau/pyscard#55). The link provided in the script comes from the appveyor account for pyscard (https://ci.appveyor.com/project/LudovicRousseau/pyscard), and is the suggested workaround provided by the maintainer (see LudovicRousseau/pyscard#55 (comment)) |
||
|
|
||
| PYTHON_VERSION=3.6.8 | ||
|
|
||
| ## These settings probably don't need change | ||
|
|
@@ -65,6 +73,12 @@ download_if_not_exist "$CACHEDIR/$ZBAR_FILENAME" "$ZBAR_URL" | |
| verify_hash "$CACHEDIR/$ZBAR_FILENAME" "$ZBAR_SHA256" | ||
| wine "$CACHEDIR/$ZBAR_FILENAME" /S | ||
|
|
||
| #DebugSatochip install pyscard | ||
| info "Installing pyscard..." | ||
| download_if_not_exist $PYSCARD_FILENAME "$PYSCARD_URL" | ||
| verify_hash $PYSCARD_FILENAME "$PYSCARD_SHA256" | ||
| $PYTHON -m pip install "$PWD/$PYSCARD_FILENAME" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. instead of $PWD, use $CACHEDIR |
||
|
|
||
| info "Installing NSIS." | ||
| download_if_not_exist "$CACHEDIR/$NSIS_FILENAME" "$NSIS_URL" | ||
| verify_hash "$CACHEDIR/$NSIS_FILENAME" "$NSIS_SHA256" | ||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../run_electrum |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| Copyright (c) 2010-2011, Jeff Bell [www.randombell.com] | [jeffbell@randombell.com]. | ||
| Copyright (c) 2010-2011, Jeff Bell [www.randombell.com] | [jeffbell@randombell.com]. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please clean this so that git sees no change |
||
| This font may be distributed freely however must retain this document as well as the Readme.txt file. | ||
| This Font Software is licensed under the SIL Open Font License, Version 1.1. | ||
| This license is available with a FAQ at: http://scripts.sil.org/OFL | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ UPDATE HISTORY: | |
|
|
||
| 1/22/11 - Made minor corrections to all previous letters and punctuation. Corrected issue with number 8's top filling in. | ||
|
|
||
| ABOUT THE AUTHOR: | ||
| ABOUT THE AUTHOR: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please clean this so that git sees no change |
||
| Jeff Bell has produced fonts before, but this is the first one in over 10 years. His original 3 fonts were under the name DJ-JOHNNYRKA and include "CASPER", "BEVERLY HILLS COP", "THE GODFATHER" and "FIDDUMS FAMILY". | ||
|
|
||
| For more information on Jeff Bell and his work can be found online: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.