Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
fa82f82
Add Satochip hardware wallet support to Electrum v4.5.4
Toporin Mar 20, 2024
20be6e3
Refactor class QRDialog: add optional 'cancel' button
Toporin Mar 20, 2024
7a8d6ca
Satochip: update build scripts for Linux, Windows & MacOS
Toporin Mar 20, 2024
7193d88
Satochip: clean code using flake8
Toporin Mar 20, 2024
ed537de
Satochip: correct flake8 issue in __init__.py
Toporin Mar 21, 2024
88d5092
Merge branch 'master' into electrum-satochip-v4.5.4-0.12
Toporin Jun 8, 2024
040d0ca
Satochip: adapt bitcoin.py/transaction.py calls
Toporin Jun 9, 2024
a41fe39
Clean Satochip plugin code using Flake8 & autopep8
Toporin Jun 20, 2024
fcaacce
Satochip plugin: clean code
Toporin Jun 20, 2024
f075129
Satochip plugin: improve 2FA UX
Toporin Jun 21, 2024
12ff4d1
Satochip plugin: using SeedLayout to import seed in setup Wizard
Toporin Jun 25, 2024
37f719b
Remove unnecessary parenthesis in 'if' statements
Toporin Sep 25, 2024
8d6bd78
Merge branch 'master' into electrum-satochip-v4.5.4-0.12
Toporin Sep 25, 2024
b06e332
qt desktop gui: upgrade qt5->qt6
Toporin Sep 25, 2024
c470901
satochip: fixes and error handling
accumulator Nov 13, 2024
4ba8faf
Merge branch 'master' into electrum-satochip-v4.5.4-0.12
Toporin Jan 21, 2025
133ade3
(minor) correct some PEP8 warnings
Toporin Jan 21, 2025
44cd93d
Patch: electrum.ecc is now a distinct package
Toporin Jan 21, 2025
5bc0b72
Moved Satochip icons from electrum/gui to the satochip plugin folder
Toporin Jan 21, 2025
aa9c241
Remove commented import
Toporin Jan 22, 2025
08d2827
Merge remote-tracking branch 'upstream/master' into electrum-satochip…
Toporin Jun 17, 2025
525715e
Update Satochip plugin
Toporin Jun 17, 2025
861cf34
update pyscard from v2.0.7 to v2.2.2 in requirements
Toporin Jun 17, 2025
424b6d9
use manifest.json instead of loading init file for plugin registration
Toporin Jun 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions contrib/build-linux/appimage/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ RUN apt-get update -q && \
libffi-dev \
libncurses5-dev \
libncurses5 \
libpcsclite-dev \
swig \
libtinfo-dev \
libtinfo5 \
libsqlite3-dev \
Expand Down
2 changes: 1 addition & 1 deletion contrib/build-wine/build-electrum-git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ $WINE_PYTHON -m pip install --no-build-isolation --no-dependencies --no-warn-scr
--cache-dir "$WINE_PIP_CACHE_DIR" -r "$CONTRIB"/deterministic-build/requirements-binaries.txt
info "Installing hardware wallet requirements..."
$WINE_PYTHON -m pip install --no-build-isolation --no-dependencies --no-warn-script-location \
--no-binary :all: --only-binary cffi,cryptography,hidapi \
--no-binary :all: --only-binary cffi,cryptography,hidapi,pyscard \
--cache-dir "$WINE_PIP_CACHE_DIR" -r "$CONTRIB"/deterministic-build/requirements-hw.txt

pushd "$PROJECT_ROOT"
Expand Down
1 change: 1 addition & 0 deletions contrib/build-wine/pyinstaller.spec
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ datas += collect_data_files('trezorlib') # TODO is this needed? and same questi
datas += collect_data_files('safetlib')
datas += collect_data_files('ckcc')
datas += collect_data_files('bitbox02')
datas += collect_data_files('pysatochip')

# some deps rely on importlib metadata
datas += copy_metadata('slip10') # from trezor->slip10
Expand Down
24 changes: 23 additions & 1 deletion contrib/deterministic-build/requirements-hw.txt
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,28 @@ pyaes==1.6.1 \
pycparser==2.22 \
--hash=sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6 \
--hash=sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc
pysatochip==0.12.6 \
--hash=sha256:f751ae93ea784dc3ef77508da56df6222a195d8f7ead53f87d29ea84c7bc8f90 \
--hash=sha256:d1255c5126c0c76b86f5eb1289b1cdc0b14a6f1265c82a63ce07074f6ccb2903
pyscard==2.2.2 \
--hash=sha256:e658f240276c12f836c28159120da499b0593cf6178469095e09a4ada869b9c6 \
--hash=sha256:81e3d3ae40cf47725b5835970433197c4a6a9030af9f08ca74b4ddaf08c339c4 \
--hash=sha256:8f545e55918f6e44eb3dbc6abb6c290efa3f992872e94a4af1ee43f6ecbd160d \
--hash=sha256:44eaafcec0b0bab0344be5209b1456bc2f34a15303e0ae584e2fe6abbe67f777 \
--hash=sha256:77577e6c847c253c642b880087616b08223b74e3942f07d3a6019f7067fe2369 \
--hash=sha256:4e3642fc5b800b4e7ff88742eef01cbb8bd3b3d0f951f56f3fa4fca51ab41bf2 \
--hash=sha256:88e277d809fce5fc29e737ecd135f3871a0813f7d8b27fad5537ed9fa4442a20 \
--hash=sha256:535d03d04477ef0cb9812ca0fad4b71fee6984b30ad72f05f644b6e4e743ccd5 \
--hash=sha256:427164199171d26c565db0d2a577c491253dfdf160408dcd605bd0e8f4f01060 \
--hash=sha256:9ca0f5f3e38b753539f3c65335536dea8a20ca4c660b320f87368070e7febdbc \
--hash=sha256:1480fc9e760487e4fe18b668647cd88bb4d0fd94e075bba6a00a582a93b6def7 \
--hash=sha256:ab1a875666330880ddecacbadc8193dc5c6eb799329e3d6e99281a1de113a4cd \
--hash=sha256:48e8e2e004ef105b488422c9943eca5f6f38648a8e377a94017fa07203d05b4a \
--hash=sha256:b634d762de8058a039cf013dff3946e5eed6ee5d06fd18fe100ecd6af3eb6c35 \
--hash=sha256:ac9eaf1988c9c563a5bf5d54b8c6058ef267a1ad5755d353b9d5a68ec5b2210b \
--hash=sha256:17b50d6aba530e9ef9a1a87d2761d52f378453bbb1735fc0bbdcaadc9597fef1 \
--hash=sha256:3975dc4527996552d9317cc8b3e6a9e7e98c85616c9dc4a34152f622c3c0ffd3 \
--hash=sha256:c77481fb86f4a17bc441d7b36551c1d36a9d3a48c4bb30ab8118886e6f275081
pyserial==3.5 \
--hash=sha256:3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb \
--hash=sha256:c4451db6ba391ca6ca299fb3ec7bae67a5c55dde170964c7a14ceefec02f2cf0
Expand Down Expand Up @@ -435,4 +457,4 @@ urllib3==1.26.20 \
--hash=sha256:40c2dc0c681e47eb8f90e7e27bf6ff7df2e677421fd46756da1161c39ca70d32
wheel==0.45.1 \
--hash=sha256:661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729 \
--hash=sha256:708e7481cc80179af0e556bbf0cc00b8444c7321e2700b8d8580231d13017248
--hash=sha256:708e7481cc80179af0e556bbf0cc00b8444c7321e2700b8d8580231d13017248
2 changes: 1 addition & 1 deletion contrib/osx/make_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ python3 -m pip install --no-build-isolation --no-dependencies --no-binary :all:
|| fail "Could not install build dependencies (mac)"

info "Installing some build-time deps for compilation..."
brew install autoconf automake libtool gettext coreutils pkgconfig
brew install autoconf automake libtool gettext coreutils pkgconfig swig

info "Building PyInstaller."
PYINSTALLER_REPO="https://github.com/pyinstaller/pyinstaller.git"
Expand Down
1 change: 1 addition & 0 deletions contrib/osx/pyinstaller.spec
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ datas += collect_data_files('trezorlib') # TODO is this needed? and same questi
datas += collect_data_files('safetlib')
datas += collect_data_files('ckcc')
datas += collect_data_files('bitbox02')
datas += collect_data_files('pysatochip')

# some deps rely on importlib metadata
datas += copy_metadata('slip10') # from trezor->slip10
Expand Down
4 changes: 4 additions & 0 deletions contrib/requirements/requirements-hw.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ ckcc-protocol>=0.7.7
# device plugin: bitbox02
bitbox02>=6.2.0

# device plugin: satochip
pyscard>=2.0.7
pysatochip==0.12.6

# device plugin: jade
cbor2>=5.4.6,<6.0.0
pyserial>=3.5.0,<4.0.0
Expand Down
20 changes: 16 additions & 4 deletions electrum/gui/qt/qrcodewidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def __init__(
show_text=False,
help_text=None,
show_copy_text_btn=False,
show_cancel_btn=False,
config: SimpleConfig,
):
WindowModalDialog.__init__(self, parent, title)
Expand Down Expand Up @@ -138,10 +139,21 @@ def copy_text_to_clipboard():
hbox.addWidget(b)
b.clicked.connect(print_qr)

b = QPushButton(_("Close"))
hbox.addWidget(b)
b.clicked.connect(self.accept)
b.setDefault(True)
if show_cancel_btn:
b = QPushButton(_("Ok"))
hbox.addWidget(b)
b.clicked.connect(self.accept)
b.setDefault(True)

b = QPushButton(_("Cancel"))
hbox.addWidget(b)
b.clicked.connect(self.reject)
b.setDefault(True)
else:
b = QPushButton(_("Close"))
hbox.addWidget(b)
b.clicked.connect(self.accept)
b.setDefault(True)

vbox.addLayout(hbox)
self.setLayout(vbox)
Expand Down
2 changes: 1 addition & 1 deletion electrum/plugins/payserver/www
Submodule www updated 2 files
+1 −2 create_invoice.html
+148 −114 index.html
82 changes: 82 additions & 0 deletions electrum/plugins/satochip/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
Satochip plugin for electrum
=================================================================================

::

Licence: MIT Licence
Author: Toporin
Language: Python (>= 3.6)
Homepage: https://github.com/Toporin/electrum-satochip

Introduction
============

This plugin allows to integrate the Satochip Hardware Wallet with Electrum. To use it, you need a device with the Satochip javacard applet installed (see https://github.com/Toporin/SatochipApplet).
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!You can use the software on the Bitcoin testnet using the --testnet option.
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)

Clone or download the code from GitHub.

Open a PowerShell command line in the electrum folder

In PowerShell, install the electrum dependencies::

python -m pip install .

You may also ned to install Python3-pyqt5::

python -m pip install pyqt5

Install pyscard from https://pyscard.sourceforge.io/
Pyscard is required to connect to the smartcard::

python -m pip install pyscard


In PowerShell, run electrum on the testnet (-v allows for verbose output)::

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::

sudo apt-get install python3-pyqt5

Check out the code from GitHub::

git clone git://github.com/Toporin/electrum.git
cd electrum

In the electrum folder:

Run install (this should install dependencies)::

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


Empty file.
9 changes: 9 additions & 0 deletions electrum/plugins/satochip/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "satochip",
"fullname": "Satochip Wallet",
"description": "Provides support for Satochip hardware wallet",
"requires": [["pysatochip","pypi.org/project/pysatochip/"]],
"registers_keystore": ["hardware", "satochip", "Satochip wallet"],
"icon":"satochip.png",
"available_for": ["qt"]
}
Loading