Merge pull request #4 from ZclassicCommunity/dev

update to 3.2.0
This commit is contained in:
James 2019-03-18 23:19:39 +01:00 committed by GitHub
commit 57f93e2b61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
65 changed files with 683 additions and 71 deletions

View File

@ -149,7 +149,7 @@ issue #3374. Users should upgrade to 3.0.5.
# Release 2.9 - Independence (July 27th, 2017)
* Multiple Chain Validation: Electrum will download and validate
block headers sent by servers that may follow different branches
of a fork in the Bitcoin blockchain. Instead of a linear sequence,
of a fork in the ZClassic blockchain. Instead of a linear sequence,
block headers are organized in a tree structure. Branching points
are located efficiently using binary search. The purpose of MCV is
to detect and handle blockchain forks that are invisible to the
@ -311,7 +311,7 @@ issue #3374. Users should upgrade to 3.0.5.
wallet that has several accounts. Make sure that you have saved
your seed phrase before you upgrade Electrum.
* This version introduces a separation between wallets types and
keystores types. 'Wallet type' defines the type of Bitcoin contract
keystores types. 'Wallet type' defines the type of ZClassic contract
used in the wallet, while 'keystore type' refers to the method used
to store private keys. Therefore, so-called 'hardware wallets' will
be referred to as 'hardware keystores'.
@ -444,13 +444,13 @@ issue #3374. Users should upgrade to 3.0.5.
* Various GUI improvements
# Release 2.4
* Payment to DNS names storing a Bitcoin addresses (OpenAlias) is
* Payment to DNS names storing a ZClassic addresses (OpenAlias) is
supported directly, without activating a plugin. The verification
uses DNSSEC.
* The DNSSEC verification code was rewritten. The previous code,
which was part of the OpenAlias plugin, is vulnerable and should
not be trusted (Electrum 2.0 to 2.3).
* Payment requests can be signed using Bitcoin addresses stored
* Payment requests can be signed using ZClassic addresses stored
in DNS (OpenAlias). The identity of the requestor is verified using
DNSSEC.
* Payment requests signed with OpenAlias keys can be shared as

View File

@ -0,0 +1,38 @@
Windows Binary Builds
=====================
These scripts can be used for cross-compilation of Windows Electrum executables from Linux/Wine.
Produced binaries are deterministic, so you should be able to generate binaries that match the official releases.
Usage:
1. Install the following dependencies:
- dirmngr
- gpg
- 7Zip
- Wine (>= v2)
For example:
```
$ sudo apt-get install wine-development dirmngr gnupg2 p7zip-full
$ wine --version
wine-2.0 (Debian 2.0-3+b2)
```
or
```
$ pacman -S wine gnupg
$ wine --version
wine-2.21
```
2. Make sure `/opt` is writable by the current user.
3. Run `build.sh`.
4. The generated binaries are in `./dist`.

View File

@ -0,0 +1,89 @@
#!/bin/bash
NAME_ROOT=electrum-zclassic
PYTHON_VERSION=3.5.4
# These settings probably don't need any change
export WINEPREFIX=/opt/wine64
export PYTHONDONTWRITEBYTECODE=1
export PYTHONHASHSEED=22
PYHOME=c:/python$PYTHON_VERSION
PYTHON="wine $PYHOME/python.exe -OO -B"
# Let's begin!
cd `dirname $0`
set -e
mkdir -p tmp
cd tmp
for repo in electrum-zclassic electrum-locale electrum-icons; do
if [ -d $repo ]; then
cd $repo
git pull
git checkout master
cd ..
else
URL=https://github.com/ZClassicCommunity/$repo.git
git clone -b master $URL $repo
fi
done
pushd electrum-locale
for i in ./locale/*; do
dir=$i/LC_MESSAGES
mkdir -p $dir
msgfmt --output-file=$dir/electrum.mo $i/electrum.po || true
done
popd
pushd electrum-zclassic
if [ ! -z "$1" ]; then
git checkout $1
fi
#VERSION=`git describe --tags`
VERSION=3.2.0
echo "Last commit: $VERSION"
find -exec touch -d '2000-11-11T11:11:11+00:00' {} +
popd
rm -rf $WINEPREFIX/drive_c/electrum_zclassic
cp -r electrum-zclassic $WINEPREFIX/drive_c/electrum_zclassic
cp electrum-zclassic/LICENCE .
cp -r electrum-locale/locale $WINEPREFIX/drive_c/electrum_zclassic/lib/
cp electrum-icons/icons_rc.py $WINEPREFIX/drive_c/electrum_zclassic/gui/qt/
# Install frozen dependencies
$PYTHON -m pip install -r ../../deterministic-build/requirements.txt
$PYTHON -m pip install -r ../../deterministic-build/requirements-hw.txt
pushd $WINEPREFIX/drive_c/electrum_zclassic
$PYTHON setup.py install
popd
cd ..
rm -rf dist/
# build standalone and portable versions
wine "C:/python$PYTHON_VERSION/scripts/pyinstaller.exe" --noconfirm --ascii --name $NAME_ROOT-$VERSION -w deterministic.spec
# set timestamps in dist, in order to make the installer reproducible
pushd dist
find -exec touch -d '2000-11-11T11:11:11+00:00' {} +
popd
# build NSIS installer
# $VERSION could be passed to the electrum.nsi script, but this would require some rewriting in the script iself.
wine "$WINEPREFIX/drive_c/Program Files (x86)/NSIS/makensis.exe" /DPRODUCT_VERSION=$VERSION electrum.nsi
cd dist
mv electrum-setup.exe $NAME_ROOT-$VERSION-setup.exe
cd ..
echo "Done."
md5sum dist/electrum*exe

26
contrib/build-wine/build.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
# Lucky number
export PYTHONHASHSEED=22
if [ ! -z "$1" ]; then
to_build="$1"
fi
here=$(dirname "$0")
test -n "$here" -a -d "$here" || exit
echo "Clearing $here/build and $here/dist..."
rm "$here"/build/* -rf
rm "$here"/dist/* -rf
$here/prepare-wine.sh || exit 1
echo "Resetting modification time in C:\Python..."
# (Because of some bugs in pyinstaller)
pushd /opt/wine64/drive_c/python*
find -exec touch -d '2000-11-11T11:11:11+00:00' {} +
popd
ls -l /opt/wine64/drive_c/python*
$here/build-electrum-git.sh $to_build && \
echo "Done."

View File

@ -0,0 +1,133 @@
# -*- mode: python -*-
from PyInstaller.utils.hooks import collect_data_files, collect_submodules, collect_dynamic_libs
import sys
for i, x in enumerate(sys.argv):
if x == '--name':
cmdline_name = sys.argv[i+1]
break
else:
raise BaseException('no name')
home = 'C:\\electrum_zclassic\\'
# see https://github.com/pyinstaller/pyinstaller/issues/2005
hiddenimports = []
hiddenimports += collect_submodules('trezorlib')
hiddenimports += collect_submodules('btchip')
hiddenimports += collect_submodules('keepkeylib')
hiddenimports += collect_submodules('websocket')
# Add libusb binary
binaries = [("c:/python3.5.4/libusb-1.0.dll", ".")]
# Workaround for "Retro Look":
binaries += [b for b in collect_dynamic_libs('PyQt5') if 'qwindowsvista' in b[0]]
datas = [
(home+'lib/currencies.json', 'electrum_zclassic'),
(home+'lib/servers.json', 'electrum_zclassic'),
# (home+'lib/checkpoints.json', 'electrum_zclassic'),
(home+'lib/servers_testnet.json', 'electrum_zclassic'),
# (home+'lib/checkpoints_testnet.json', 'electrum_zclassic'),
(home+'lib/wordlist/english.txt', 'electrum_zclassic/wordlist'),
(home+'lib/locale', 'electrum_zclassic/locale'),
(home+'plugins', 'electrum_plugins'),
('C:\\Program Files (x86)\\ZBar\\bin\\', '.')
]
datas += collect_data_files('trezorlib')
datas += collect_data_files('btchip')
datas += collect_data_files('keepkeylib')
# We don't put these files in to actually include them in the script but to make the Analysis method scan them for imports
a = Analysis([home+'electrum-zclassic',
home+'gui/qt/main_window.py',
home+'gui/text.py',
home+'lib/util.py',
home+'lib/wallet.py',
home+'lib/simple_config.py',
home+'lib/bitcoin.py',
home+'lib/dnssec.py',
home+'lib/commands.py',
home+'plugins/cosigner_pool/qt.py',
home+'plugins/email_requests/qt.py',
home+'plugins/trezor/client.py',
home+'plugins/trezor/qt.py',
home+'plugins/keepkey/qt.py',
home+'plugins/ledger/qt.py',
#home+'packages/requests/utils.py'
],
binaries=binaries,
datas=datas,
#pathex=[home+'lib', home+'gui', home+'plugins'],
hiddenimports=hiddenimports,
hookspath=[])
# http://stackoverflow.com/questions/19055089/pyinstaller-onefile-warning-pyconfig-h-when-importing-scipy-or-scipy-signal
for d in a.datas:
if 'pyconfig' in d[0]:
a.datas.remove(d)
break
# hotfix for #3171 (pre-Win10 binaries)
a.binaries = [x for x in a.binaries if not x[1].lower().startswith(r'c:\windows')]
pyz = PYZ(a.pure)
#####
# "standalone" exe with all dependencies packed into it
exe_standalone = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
name=os.path.join('build\\pyi.win32\\electrum_zclassic', cmdline_name + ".exe"),
debug=False,
strip=None,
upx=False,
icon=home+'icons/electrum-zclassic.ico',
console=False)
# 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(
pyz,
a.scripts,
a.binaries,
a.datas + [ ('is_portable', 'README.md', 'DATA' ) ],
name=os.path.join('build\\pyi.win32\\electrum_zclassic', cmdline_name + "-portable.exe"),
debug=False,
strip=None,
upx=False,
icon=home+'icons/electrum-zclassic.ico',
console=False)
#####
# exe and separate files that NSIS uses to build installer "setup" exe
exe_dependent = EXE(
pyz,
a.scripts,
exclude_binaries=True,
name=os.path.join('build\\pyi.win32\\electrum_zclassic', cmdline_name),
debug=False,
strip=None,
upx=False,
icon=home+'icons/electrum-zclassic.ico',
console=False)
coll = COLLECT(
exe_dependent,
a.binaries,
a.zipfiles,
a.datas,
strip=None,
upx=True,
debug=False,
icon=home+'icons/electrum-zclassic.ico',
console=False,
name=os.path.join('dist', 'electrum-zclassic'))

View File

@ -0,0 +1,173 @@
;--------------------------------
;Include Modern UI
!include "TextFunc.nsh" ;Needed for the $GetSize fuction. I know, doesn't sound logical, it isn't.
!include "MUI2.nsh"
;--------------------------------
;Variables
!define PRODUCT_NAME "ZClassic Electrum"
!define PRODUCT_WEB_SITE "https://github.com/ZClassicCommunity/electrum-zclassic"
!define PRODUCT_PUBLISHER "ZClassic Electrum Technologies"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
;--------------------------------
;General
;Name and file
Name "${PRODUCT_NAME}"
OutFile "dist/electrum-setup.exe"
;Default installation folder
InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
;Get installation folder from registry if available
InstallDirRegKey HKCU "Software\${PRODUCT_NAME}" ""
;Request application privileges for Windows Vista
RequestExecutionLevel admin
;Specifies whether or not the installer will perform a CRC on itself before allowing an install
CRCCheck on
;Sets whether or not the details of the install are shown. Can be 'hide' (the default) to hide the details by default, allowing the user to view them, or 'show' to show them by default, or 'nevershow', to prevent the user from ever seeing them.
ShowInstDetails show
;Sets whether or not the details of the uninstall are shown. Can be 'hide' (the default) to hide the details by default, allowing the user to view them, or 'show' to show them by default, or 'nevershow', to prevent the user from ever seeing them.
ShowUninstDetails show
;Sets the colors to use for the install info screen (the default is 00FF00 000000. Use the form RRGGBB (in hexadecimal, as in HTML, only minus the leading '#', since # can be used for comments). Note that if "/windows" is specified as the only parameter, the default windows colors will be used.
InstallColors /windows
;This command sets the compression algorithm used to compress files/data in the installer. (http://nsis.sourceforge.net/Reference/SetCompressor)
SetCompressor /SOLID lzma
;Sets the dictionary size in megabytes (MB) used by the LZMA compressor (default is 8 MB).
SetCompressorDictSize 64
;Sets the text that is shown (by default it is 'Nullsoft Install System vX.XX') in the bottom of the install window. Setting this to an empty string ("") uses the default; to set the string to blank, use " " (a space).
BrandingText "${PRODUCT_NAME} Installer v${PRODUCT_VERSION}"
;Sets what the titlebars of the installer will display. By default, it is 'Name Setup', where Name is specified with the Name command. You can, however, override it with 'MyApp Installer' or whatever. If you specify an empty string (""), the default will be used (you can however specify " " to achieve a blank string)
Caption "${PRODUCT_NAME}"
;Adds the Product Version on top of the Version Tab in the Properties of the file.
VIProductVersion 1.0.0.0
;VIAddVersionKey - Adds a field in the Version Tab of the File Properties. This can either be a field provided by the system or a user defined field.
VIAddVersionKey ProductName "${PRODUCT_NAME} Installer"
VIAddVersionKey Comments "The installer for ${PRODUCT_NAME}"
VIAddVersionKey CompanyName "${PRODUCT_NAME}"
VIAddVersionKey LegalCopyright "2013-2016 ${PRODUCT_PUBLISHER}"
VIAddVersionKey FileDescription "${PRODUCT_NAME} Installer"
VIAddVersionKey FileVersion ${PRODUCT_VERSION}
VIAddVersionKey ProductVersion ${PRODUCT_VERSION}
VIAddVersionKey InternalName "${PRODUCT_NAME} Installer"
VIAddVersionKey LegalTrademarks "${PRODUCT_NAME} is a trademark of ${PRODUCT_PUBLISHER}"
VIAddVersionKey OriginalFilename "${PRODUCT_NAME}.exe"
;--------------------------------
;Interface Settings
!define MUI_ABORTWARNING
!define MUI_ABORTWARNING_TEXT "Are you sure you wish to abort the installation of ${PRODUCT_NAME}?"
!define MUI_ICON "tmp\electrum-zclassic\icons\electrum-zclassic.ico"
;--------------------------------
;Pages
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
;Installer Sections
;Check if we have Administrator rights
Function .onInit
UserInfo::GetAccountType
pop $0
${If} $0 != "admin" ;Require admin rights on NT4+
MessageBox mb_iconstop "Administrator rights required!"
SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
Quit
${EndIf}
FunctionEnd
Section
SetOutPath $INSTDIR
;Uninstall previous version files
RMDir /r "$INSTDIR\*.*"
Delete "$DESKTOP\${PRODUCT_NAME}.lnk"
Delete "$SMPROGRAMS\${PRODUCT_NAME}\*.*"
;Files to pack into the installer
File /r "dist\electrum-zclassic\*.*"
File "..\..\icons\electrum-zclassic.ico"
;Store installation folder
WriteRegStr HKCU "Software\${PRODUCT_NAME}" "" $INSTDIR
;Create uninstaller
DetailPrint "Creating uninstaller..."
WriteUninstaller "$INSTDIR\Uninstall.exe"
;Create desktop shortcut
DetailPrint "Creating desktop shortcut..."
CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\electrum-zclassic-${PRODUCT_VERSION}.exe" ""
;Create start-menu items
DetailPrint "Creating start-menu items..."
CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}"
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\electrum-zclassic-${PRODUCT_VERSION}.exe" "" "$INSTDIR\electrum-zclassic-${PRODUCT_VERSION}.exe" 0
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME} Testnet.lnk" "$INSTDIR\electrum-zclassic-${PRODUCT_VERSION}.exe" "--testnet" "$INSTDIR\electrum-zclassic-${PRODUCT_VERSION}.exe" 0
;Links zclassiccoin: URI's to Electrum
WriteRegStr HKCU "Software\Classes\bitcoin" "" "URL:bitcoin Protocol"
WriteRegStr HKCU "Software\Classes\bitcoin" "URL Protocol" ""
WriteRegStr HKCU "Software\Classes\bitcoin" "DefaultIcon" "$\"$INSTDIR\electrum-zclassic.ico, 0$\""
WriteRegStr HKCU "Software\Classes\bitcoin\shell\open\command" "" "$\"$INSTDIR\electrum-zclassic-${PRODUCT_VERSION}.exe$\" $\"%1$\""
;Adds an uninstaller possibilty to Windows Uninstall or change a program section
WriteRegStr HKCU "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr HKCU "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\Uninstall.exe"
WriteRegStr HKCU "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr HKCU "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
WriteRegStr HKCU "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
WriteRegStr HKCU "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\electrum-zclassic.ico"
;Fixes Windows broken size estimates
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IntFmt $0 "0x%08X" $0
WriteRegDWORD HKCU "${PRODUCT_UNINST_KEY}" "EstimatedSize" "$0"
SectionEnd
;--------------------------------
;Descriptions
;--------------------------------
;Uninstaller Section
Section "Uninstall"
RMDir /r "$INSTDIR\*.*"
RMDir "$INSTDIR"
Delete "$DESKTOP\${PRODUCT_NAME}.lnk"
Delete "$SMPROGRAMS\${PRODUCT_NAME}\*.*"
RMDir "$SMPROGRAMS\${PRODUCT_NAME}"
DeleteRegKey HKCU "Software\Classes\bitcoin"
DeleteRegKey HKCU "Software\${PRODUCT_NAME}"
DeleteRegKey HKCU "${PRODUCT_UNINST_KEY}"
SectionEnd

View File

@ -0,0 +1,154 @@
#!/bin/bash
# Please update these carefully, some versions won't work under Wine
NSIS_FILENAME=nsis-3.03-setup.exe
NSIS_URL=https://prdownloads.sourceforge.net/nsis/$NSIS_FILENAME?download
NSIS_SHA256=bd3b15ab62ec6b0c7a00f46022d441af03277be893326f6fea8e212dc2d77743
ZBAR_FILENAME=zbarw-20121031-setup.exe
ZBAR_URL=https://sourceforge.net/projects/zbarw/files/$ZBAR_FILENAME/download
ZBAR_SHA256=177e32b272fa76528a3af486b74e9cb356707be1c5ace4ed3fcee9723e2c2c02
LIBUSB_FILENAME=libusb-1.0.22.7z
LIBUSB_URL=https://prdownloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.22/$LIBUSB_FILENAME?download
LIBUSB_SHA256=671f1a420757b4480e7fadc8313d6fb3cbb75ca00934c417c1efa6e77fb8779b
PYTHON_VERSION=3.5.4
## These settings probably don't need change
export WINEPREFIX=/opt/wine64
#export WINEARCH='win32'
PYHOME=c:/python$PYTHON_VERSION
PYTHON="wine $PYHOME/python.exe -OO -B"
# based on https://superuser.com/questions/497940/script-to-verify-a-signature-with-gpg
verify_signature() {
local file=$1 keyring=$2 out=
if out=$(gpg --no-default-keyring --keyring "$keyring" --status-fd 1 --verify "$file" 2>/dev/null) &&
echo "$out" | grep -qs "^\[GNUPG:\] VALIDSIG "; then
return 0
else
echo "$out" >&2
exit 1
fi
}
verify_hash() {
local file=$1 expected_hash=$2
actual_hash=$(sha256sum $file | awk '{print $1}')
if [ "$actual_hash" == "$expected_hash" ]; then
return 0
else
echo "$file $actual_hash (unexpected hash)" >&2
rm "$file"
exit 1
fi
}
download_if_not_exist() {
local file_name=$1 url=$2
if [ ! -e $file_name ] ; then
wget -O $PWD/$file_name "$url"
fi
}
# https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/templates/header.sh
retry() {
local result=0
local count=1
while [ $count -le 3 ]; do
[ $result -ne 0 ] && {
echo -e "\nThe command \"$@\" failed. Retrying, $count of 3.\n" >&2
}
! { "$@"; result=$?; }
[ $result -eq 0 ] && break
count=$(($count + 1))
sleep 1
done
[ $count -gt 3 ] && {
echo -e "\nThe command \"$@\" failed 3 times.\n" >&2
}
return $result
}
# Let's begin!
here=$(dirname $(readlink -e $0))
set -e
# Clean up Wine environment
echo "Cleaning $WINEPREFIX"
rm -rf $WINEPREFIX
echo "done"
wine 'wineboot'
mkdir -p /tmp/electrum-build
cd /tmp/electrum-build
# Install Python
# note: you might need "sudo apt-get install dirmngr" for the following
# keys from https://www.python.org/downloads/#pubkeys
KEYLIST_PYTHON_DEV="531F072D39700991925FED0C0EDDC5F26A45C816 26DEA9D4613391EF3E25C9FF0A5B101836580288 CBC547978A3964D14B9AB36A6AF053F07D9DC8D2 C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF 12EF3DC38047DA382D18A5B999CDEA9DA4135B38 8417157EDBE73D9EAC1E539B126EB563A74B06BF DBBF2EEBF925FAADCF1F3FFFD9866941EA5BBD71 2BA0DB82515BBB9EFFAC71C5C9BE28DEE6DF025C 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D C9B104B3DD3AA72D7CCB1066FB9921286F5E1540 97FC712E4C024BBEA48A61ED3A5CA953F73C700D 7ED10B6531D7C8E1BC296021FC624643487034E5"
KEYRING_PYTHON_DEV="keyring-electrum-build-python-dev.gpg"
for server in $(shuf -e ha.pool.sks-keyservers.net \
hkp://p80.pool.sks-keyservers.net:80 \
keyserver.ubuntu.com \
hkp://keyserver.ubuntu.com:80) ; do
retry gpg --no-default-keyring --keyring $KEYRING_PYTHON_DEV --keyserver "$server" --recv-keys $KEYLIST_PYTHON_DEV \
&& break || : ;
done
for msifile in core dev exe lib pip tools; do
echo "Installing $msifile..."
wget -nc "https://www.python.org/ftp/python/$PYTHON_VERSION/win32/${msifile}.msi"
wget -nc "https://www.python.org/ftp/python/$PYTHON_VERSION/win32/${msifile}.msi.asc"
verify_signature "${msifile}.msi.asc" $KEYRING_PYTHON_DEV
wine msiexec /i "${msifile}.msi" /qb TARGETDIR=C:/python$PYTHON_VERSION
done
# upgrade pip
$PYTHON -m pip install pip --upgrade
# Install pywin32-ctypes (needed by pyinstaller)
$PYTHON -m pip install pywin32-ctypes==0.1.2
# install PySocks
$PYTHON -m pip install win_inet_pton==1.0.1
$PYTHON -m pip install -r $here/../deterministic-build/requirements-binaries.txt
# Install PyInstaller
$PYTHON -m pip install https://github.com/ecdsa/pyinstaller/archive/fix_2952.zip
# Install ZBar
download_if_not_exist $ZBAR_FILENAME "$ZBAR_URL"
verify_hash $ZBAR_FILENAME "$ZBAR_SHA256"
wine "$PWD/$ZBAR_FILENAME" /S
# Upgrade setuptools (so Electrum can be installed later)
$PYTHON -m pip install setuptools --upgrade
# Install NSIS installer
download_if_not_exist $NSIS_FILENAME "$NSIS_URL"
verify_hash $NSIS_FILENAME "$NSIS_SHA256"
wine "$PWD/$NSIS_FILENAME" /S
download_if_not_exist $LIBUSB_FILENAME "$LIBUSB_URL"
verify_hash $LIBUSB_FILENAME "$LIBUSB_SHA256"
7z x -olibusb $LIBUSB_FILENAME -aos
cp libusb/MS32/dll/libusb-1.0.dll $WINEPREFIX/drive_c/python$PYTHON_VERSION/
# Install UPX
#wget -O upx.zip "https://downloads.sourceforge.net/project/upx/upx/3.08/upx308w.zip"
#unzip -o upx.zip
#cp upx*/upx.exe .
# add dlls needed for pyinstaller:
cp $WINEPREFIX/drive_c/python$PYTHON_VERSION/Lib/site-packages/PyQt5/Qt/bin/* $WINEPREFIX/drive_c/python$PYTHON_VERSION/
echo "Wine is configured."

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- mode: python -*-
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2011 thomasv@gitorious
#
# Permission is hereby granted, free of charge, to any person

View File

@ -7,8 +7,8 @@ Exec=sh -c "PATH=\"\\$HOME/.local/bin:\\$PATH\" electrum-zclassic %u"
GenericName[en_US]=Zclassic Wallet
GenericName=Zclassic Wallet
Icon=electrum-zclassic.png
Name[en_US]=Electrum-Zclassic Bitcoin Wallet
Name=Electrum-Zclassic Bitcoin Wallet
Name[en_US]=Electrum-Zclassic Wallet
Name=Electrum-Zclassic Wallet
Categories=Finance;Network;
StartupNotify=false
Terminal=false

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2012 thomasv@gitorious
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2012 thomasv@gitorious
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2012 thomasv@gitorious
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2018 The Electrum developers
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2012 thomasv@gitorious
#
# Permission is hereby granted, free of charge, to any person
@ -569,7 +569,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
def show_about(self):
QMessageBox.about(self, "Electrum-Zclassic",
_("Version")+" %s" % (self.wallet.electrum_version) + "\n\n" +
_("Electrum-Zclassic focus is speed, with low resource usage and simplifying Bitcoin. You do not need to perform regular backups, because your wallet can be recovered from a secret phrase that you can memorize or write on paper. Startup times are instant because it operates in conjunction with high-performance servers that handle the most complicated parts of the Bitcoin system." + "\n\n" +
_("Electrum-Zclassic focus is speed, with low resource usage and simplifying ZClassic. You do not need to perform regular backups, because your wallet can be recovered from a secret phrase that you can memorize or write on paper. Startup times are instant because it operates in conjunction with high-performance servers that handle the most complicated parts of the ZClassic system." + "\n\n" +
_("Uses icons from the Icons8 icon pack (icons8.com).")))
def show_report_bug(self):

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2012 thomasv@gitorious
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2013 ecdsa@github
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2012 thomasv@gitorious
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2014 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2013 ecdsa@github
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2012 thomasv@gitorious
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2016 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2011 thomasv@gitorious
#
# Permission is hereby granted, free of charge, to any person
@ -357,7 +357,7 @@ def base_encode(v, base):
result.append(chars[mod])
long_value = div
result.append(chars[long_value])
# Bitcoin does a little leading-zero-compression:
# ZClassic does a little leading-zero-compression:
# leading 0-bytes in the input become leading-1s
nPad = 0
for c in v:
@ -905,7 +905,7 @@ def xpub_from_xprv(xprv):
def bip32_root(seed, xtype):
I = hmac.new(b"Bitcoin seed", seed, hashlib.sha512).digest()
I = hmac.new(b"ZClassic seed", seed, hashlib.sha512).digest()
master_k = I[0:32]
master_c = I[32:]
K, cK = get_pubkeys_from_secret(master_k)

View File

@ -1,4 +1,4 @@
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2012 thomasv@ecdsa.org
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2015 kyuupichan@gmail
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2011 thomasv@gitorious
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2018 The Electrum developers
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,4 +1,4 @@
# Electrum - Lightweight Bitcoin Client
# Electrum - Lightweight ZClassic Client
# Copyright (c) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person
@ -132,4 +132,3 @@ class Contacts(dict):
if _type != 'address':
data.pop(k)
return data

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2012 thomasv@gitorious
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2011 thomasv@gitorious
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2018 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python2
# -*- mode: python -*-
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2016 The Electrum developers
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2014 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,4 +1,4 @@
# Electrum - Lightweight Bitcoin Client
# Electrum - Lightweight ZClassic Client
# Copyright (c) 2011-2016 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2011 thomasv@gitorious
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,5 +1,5 @@
//
// Simple Bitcoin Payment Protocol messages
// Simple ZClassic Payment Protocol messages
//
// Use fields 1000+ for extensions;
// to avoid conflicts, register extensions via pull-req at

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2014 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -5,7 +5,7 @@
"t": "50001",
"version": "1.2"
},
"electrum.zclassic.ch": {
"electrum.zcl.community": {
"pruning": "-",
"s": "50002",
"t": "50001",

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2014 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2011 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person
@ -36,7 +36,7 @@ import traceback
import sys
#
# Workalike python implementation of Bitcoin's CDataStream class.
# Workalike python implementation of ZClassic's CDataStream class.
#
from .keystore import xpubkey_to_address, xpubkey_to_pubkey
from pyblake2 import blake2b
@ -84,7 +84,7 @@ class BCDataStream(object):
# 0 to 252 : 1-byte-length followed by bytes (if any)
# 253 to 65,535 : byte'253' 2-byte-length followed by bytes
# 65,536 to 4,294,967,295 : byte '254' 4-byte-length followed by bytes
# ... and the Bitcoin client is coded to understand:
# ... and the ZClassic client is coded to understand:
# greater than 4,294,967,295 : byte '255' 8-byte-length followed by bytes of string
# ... but I don't think it actually handles any strings that big.
if self.input is None:
@ -403,7 +403,7 @@ def get_address_from_output_script(_bytes, *, net=None):
if match_decoded(decoded, match):
return TYPE_PUBKEY, bh2u(decoded[0][1])
# Pay-by-Bitcoin-address TxOuts look like:
# Pay-by-ZClassic-address TxOuts look like:
# DUP HASH160 20 BYTES:... EQUALVERIFY CHECKSIG
match = [ opcodes.OP_DUP, opcodes.OP_HASH160, opcodes.OP_PUSHDATA4, opcodes.OP_EQUALVERIFY, opcodes.OP_CHECKSIG ]
if match_decoded(decoded, match):

View File

@ -1,4 +1,4 @@
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2011 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,4 +1,4 @@
# Electrum - Lightweight Bitcoin Client
# Electrum - Lightweight ZClassic Client
# Copyright (c) 2012 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,4 +1,4 @@
ELECTRUM_VERSION = '3.1.3b3' # version of the client package
ELECTRUM_VERSION = '3.2.0' # version of the client package
PROTOCOL_VERSION = '1.2' # protocol version requested
# The hash of the mnemonic seed must begin with this

View File

@ -1,4 +1,4 @@
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2014 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2014 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Electrum - Lightweight Bitcoin Client
# Electrum - Lightweight ZClassic Client
# Copyright (C) 2015 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python2
# -*- mode: python -*-
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2016 The Electrum developers
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- mode: python -*-
#
# Electrum - lightweight Bitcoin client
# Electrum - lightweight ZClassic client
# Copyright (C) 2016 The Electrum developers
#
# Permission is hereby granted, free of charge, to any person

View File

@ -1,8 +1,8 @@
name: electrum
version: master
summary: Bitcoin thin client
summary: ZClassic thin client
description: |
Lightweight Bitcoin client
Lightweight ZClassic client
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: strict