Repository: BTCPrivate/electrum-btcp Branch: master Commit: 709449fc32f4 Files: 257 Total size: 1.8 MB Directory structure: gitextract_plcqy8dy/ ├── .gitignore ├── .idea/ │ ├── electrum.iml │ ├── misc.xml │ ├── modules.xml │ └── vcs.xml ├── .travis.yml ├── AUTHORS ├── Dockerfile ├── Info.plist ├── LICENCE ├── MANIFEST.in ├── README.rst ├── RELEASE-NOTES ├── app.fil ├── brewfile ├── build-docker.sh ├── clean.sh ├── config ├── contrib/ │ ├── build-wine/ │ │ ├── README.md │ │ ├── build-electrum-git.sh │ │ ├── build.sh │ │ ├── deterministic.spec │ │ ├── electrum.nsi │ │ ├── prepare-hw.sh │ │ ├── prepare-pyinstaller.sh │ │ └── prepare-wine.sh │ ├── freeze_packages.sh │ ├── make_apk │ ├── make_download │ ├── make_locale │ ├── make_packages │ ├── requirements.txt │ └── sign_packages ├── create-dmg.sh ├── docs/ │ └── release-tests.md ├── electrum-btcp ├── electrum-env ├── electrum.conf.sample ├── electrum.desktop ├── gui/ │ ├── __init__.py │ ├── kivy/ │ │ ├── Makefile │ │ ├── Readme.txt │ │ ├── __init__.py │ │ ├── data/ │ │ │ ├── fonts/ │ │ │ │ └── tron/ │ │ │ │ ├── License.txt │ │ │ │ └── Readme.txt │ │ │ ├── glsl/ │ │ │ │ ├── default.fs │ │ │ │ ├── default.vs │ │ │ │ ├── header.fs │ │ │ │ └── header.vs │ │ │ ├── images/ │ │ │ │ └── defaulttheme.atlas │ │ │ ├── java-classes/ │ │ │ │ └── org/ │ │ │ │ └── electrum/ │ │ │ │ └── qr/ │ │ │ │ └── SimpleScannerActivity.java │ │ │ └── style.kv │ │ ├── i18n.py │ │ ├── main.kv │ │ ├── main_window.py │ │ ├── nfc_scanner/ │ │ │ ├── __init__.py │ │ │ ├── scanner_android.py │ │ │ └── scanner_dummy.py │ │ ├── tools/ │ │ │ ├── bitcoin_intent.xml │ │ │ ├── blacklist.txt │ │ │ └── buildozer.spec │ │ └── uix/ │ │ ├── __init__.py │ │ ├── combobox.py │ │ ├── context_menu.py │ │ ├── dialogs/ │ │ │ ├── __init__.py │ │ │ ├── amount_dialog.py │ │ │ ├── bump_fee_dialog.py │ │ │ ├── checkbox_dialog.py │ │ │ ├── choice_dialog.py │ │ │ ├── fee_dialog.py │ │ │ ├── fx_dialog.py │ │ │ ├── installwizard.py │ │ │ ├── label_dialog.py │ │ │ ├── nfc_transaction.py │ │ │ ├── password_dialog.py │ │ │ ├── qr_dialog.py │ │ │ ├── qr_scanner.py │ │ │ ├── question.py │ │ │ ├── seed_options.py │ │ │ ├── settings.py │ │ │ ├── tx_dialog.py │ │ │ └── wallets.py │ │ ├── drawer.py │ │ ├── gridview.py │ │ ├── menus.py │ │ ├── qrcodewidget.py │ │ ├── screens.py │ │ └── ui_screens/ │ │ ├── about.kv │ │ ├── address.kv │ │ ├── history.kv │ │ ├── invoice.kv │ │ ├── invoices.kv │ │ ├── network.kv │ │ ├── proxy.kv │ │ ├── receive.kv │ │ ├── requests.kv │ │ ├── send.kv │ │ ├── server.kv │ │ └── status.kv │ ├── qt/ │ │ ├── __init__.py │ │ ├── address_dialog.py │ │ ├── address_list.py │ │ ├── amountedit.py │ │ ├── console.py │ │ ├── contact_list.py │ │ ├── fee_slider.py │ │ ├── history_list.py │ │ ├── installwizard.py │ │ ├── invoice_list.py │ │ ├── main_window.py │ │ ├── network_dialog.py │ │ ├── password_dialog.py │ │ ├── paytoedit.py │ │ ├── qrcodewidget.py │ │ ├── qrtextedit.py │ │ ├── qrwindow.py │ │ ├── request_list.py │ │ ├── seed_dialog.py │ │ ├── transaction_dialog.py │ │ ├── util.py │ │ └── utxo_list.py │ ├── stdio.py │ └── text.py ├── icns-from-vector.sh ├── icons/ │ └── electrum.icns ├── icons.qrc ├── lib/ │ ├── __init__.py │ ├── base_wizard.py │ ├── bitcoin.py │ ├── blockchain.py │ ├── checkpoints.json │ ├── checkpoints_testnet.json │ ├── coinchooser.py │ ├── commands.py │ ├── contacts.py │ ├── currencies.json │ ├── daemon.py │ ├── dnssec.py │ ├── equihash.py │ ├── exchange_rate.py │ ├── i18n.py │ ├── interface.py │ ├── jsonrpc.py │ ├── keystore.py │ ├── mnemonic.py │ ├── msqr.py │ ├── network.py │ ├── old_mnemonic.py │ ├── paymentrequest.proto │ ├── paymentrequest.py │ ├── paymentrequest_pb2.py │ ├── pem.py │ ├── plot.py │ ├── plugins.py │ ├── qrscanner.py │ ├── ripemd.py │ ├── rsakey.py │ ├── segwit_addr.py │ ├── servers-orig.json │ ├── servers.json │ ├── servers_testnet.json │ ├── simple_config.py │ ├── storage.py │ ├── synchronizer.py │ ├── tests/ │ │ ├── __init__.py │ │ ├── test_bitcoin.py │ │ ├── test_interface.py │ │ ├── test_mnemonic.py │ │ ├── test_simple_config.py │ │ ├── test_storage_upgrade.py │ │ ├── test_transaction.py │ │ ├── test_util.py │ │ ├── test_wallet.py │ │ └── test_wallet_vertical.py │ ├── transaction.py │ ├── util.py │ ├── verifier.py │ ├── version.py │ ├── wallet.py │ ├── websockets.py │ ├── wordlist/ │ │ ├── chinese_simplified.txt │ │ ├── english.txt │ │ ├── japanese.txt │ │ ├── portuguese.txt │ │ └── spanish.txt │ └── x509.py ├── packages.txt ├── plugins/ │ ├── README │ ├── __init__.py │ ├── audio_modem/ │ │ ├── __init__.py │ │ └── qt.py │ ├── cosigner_pool/ │ │ ├── __init__.py │ │ └── qt.py │ ├── digitalbitbox/ │ │ ├── __init__.py │ │ ├── cmdline.py │ │ ├── digitalbitbox.py │ │ └── qt.py │ ├── email_requests/ │ │ ├── __init__.py │ │ └── qt.py │ ├── greenaddress_instant/ │ │ ├── __init__.py │ │ └── qt.py │ ├── hw_wallet/ │ │ ├── __init__.py │ │ ├── cmdline.py │ │ ├── plugin.py │ │ └── qt.py │ ├── keepkey/ │ │ ├── __init__.py │ │ ├── client.py │ │ ├── clientbase.py │ │ ├── cmdline.py │ │ ├── keepkey.py │ │ ├── plugin.py │ │ ├── qt.py │ │ └── qt_generic.py │ ├── labels/ │ │ ├── __init__.py │ │ ├── kivy.py │ │ ├── labels.py │ │ └── qt.py │ ├── ledger/ │ │ ├── __init__.py │ │ ├── auth2fa.py │ │ ├── cmdline.py │ │ ├── ledger.py │ │ └── qt.py │ ├── trezor/ │ │ ├── __init__.py │ │ ├── client.py │ │ ├── clientbase.py │ │ ├── cmdline.py │ │ ├── plugin.py │ │ ├── qt.py │ │ ├── qt_generic.py │ │ └── trezor.py │ ├── trustedcoin/ │ │ ├── __init__.py │ │ ├── cmdline.py │ │ ├── qt.py │ │ └── trustedcoin.py │ └── virtualkeyboard/ │ ├── __init__.py │ └── qt.py ├── pubkeys/ │ ├── Animazing.asc │ ├── ThomasV.asc │ ├── kyuupichan.asc │ └── wozz.asc ├── requirements.txt ├── requirements_travis.txt ├── run-docker.sh ├── scripts/ │ ├── bip70 │ ├── block_headers │ ├── estimate_fee │ ├── get_history │ ├── peers │ ├── servers │ ├── txradar │ ├── util.py │ └── watch_address ├── setup-mac.sh ├── setup-release.py ├── setup.py ├── snap/ │ └── snapcraft.yaml └── tox.ini ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ ####-*.patch *.pyc *.swp build/ dist/ *.egg/ /electrum.py .DS_Store contrib/pyinstaller/ Electrum_BTCP.egg-info/ gui/qt/icons_rc.py locale/ .devlocaltmp/ *_trial_temp packages env/ .tox/ .buildozer/ bin/ # tox files .cache/ .coverage # User-specific stuff: .idea/**/workspace.xml .idea/**/tasks.xml .idea/dictionaries ================================================ FILE: .idea/electrum.iml ================================================ ================================================ FILE: .idea/misc.xml ================================================ ================================================ FILE: .idea/modules.xml ================================================ ================================================ FILE: .idea/vcs.xml ================================================ ================================================ FILE: .travis.yml ================================================ sudo: false language: python python: - 3.5 - 3.6 install: - pip install -r requirements_travis.txt cache: - pip script: - tox after_success: - if [ "$TRAVIS_BRANCH" = "master" ]; then pip install pycurl requests && contrib/make_locale; fi - coveralls ================================================ FILE: AUTHORS ================================================ ThomasV - Creator and maintainer. Animazing / Tachikoma - Styled the new GUI. Mac version. Azelphur - GUI stuff. Coblee - Alternate coin support and py2app support. Deafboy - Ubuntu packages. EagleTM - Bugfixes. ErebusBat - Mac distribution. Genjix - Porting pro-mode functionality to lite-gui and worked on server Slush - Work on the server. Designed the original Stratum spec. Julian Toash (Tuxavant) - Various fixes to the client. rdymac - Website and translations. kyuupichan - Miscellaneous. ================================================ FILE: Dockerfile ================================================ FROM ubuntu:18.04 ENV VERSION 1.0.0 RUN set -x \ && apt-get update \ && apt-get install -y curl \ && curl -sL https://github.com/BTCPrivate/electrum-btcp/archive/P!${VERSION}.tar.gz |tar xvz \ && mv electrum-btcp-P-${VERSION} electrum-btcp \ && cd electrum-btcp \ && apt-get install -y $(grep -vE "^\s*#" packages.txt | tr "\n" " ") \ && pip3 install -r requirements.txt \ && pip3 install pyblake2 \ && protoc --proto_path=lib/ --python_out=lib/ lib/paymentrequest.proto \ && pyrcc5 icons.qrc -o gui/qt/icons_rc.py \ && ./contrib/make_locale WORKDIR /electrum-btcp ENV DISPLAY :0 CMD ./electrum ================================================ FILE: Info.plist ================================================ CFBundleURLTypes CFBundleURLName bitcoinprivate CFBundleURLSchemes bitcoinprivate LSArchitecturePriority x86_64 i386 ================================================ FILE: LICENCE ================================================ The MIT License (MIT) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: MANIFEST.in ================================================ include LICENCE RELEASE-NOTES AUTHORS include README.rst include electrum.conf.sample include electrum.desktop include *.py include electrum recursive-include lib *.py recursive-include gui *.py recursive-include plugins *.py recursive-include packages *.py recursive-include packages cacert.pem include app.fil include icons.qrc recursive-include icons * recursive-include scripts * ================================================ FILE: README.rst ================================================ BTCP Electrum - Lightweight Bitcoin Private Wallet ========================================== .. image:: https://opencollective.com/electrum-btcp/backers/badge.svg :alt: Backers on Open Collective :target: #backers .. image:: https://opencollective.com/electrum-btcp/sponsors/badge.svg :alt: Sponsors on Open Collective :target: #sponsors Download the current Release: https://github.com/BTCPrivate/electrum-btcp/releases/ Viewing & Sending from Z addresses is not yet supported on this wallet. Know about your data directory: Linux & Mac: ~/.electrum-btcp/ Windows: C:\Users\YourUserName\AppData\Roaming\Electrum-btcp\ ~/.electrum-btcp/wallets/ has your wallet files - BACK UP THIS FOLDER You can also use the 'Export Private Keys' and 'Show Seed' functions from inside the application to write down and safely store your the keys to your funds. Please use the issue tracker for bug reports, feature requests, and other mission-critical information. It is actively monitored by the Zclassic development team. For general support, please visit our Discord: https://discord.gg/2PRZ5q Development Version =================== First, clone from Github:: git clone git://github.com/BTCPrivate/electrum-btcp.git cd electrum-btcp For Mac: -------- Using Homebrew:: # Setup Homebrew ./setup-mac # Install Homebrew dependencies brew bundle # Install Python dependencies pip3 install -r requirements.txt # Build icons pyrcc5 icons.qrc -o gui/qt/icons_rc.py # Compile the protobuf description file protoc --proto_path=lib/ --python_out=lib/ lib/paymentrequest.proto # Build .app, .dmg ./create-dmg # Run ./electrum-btcp For Linux: ---------- Install Dependencies:: sudo apt-get install $(grep -vE "^\s*#" packages.txt | tr "\n" " ") pip install -r requirements.txt // ^ pip3 for newer version (Ubuntu with ledger wallet) ln -s /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so # For yum installations (no apt-get), or for a clean python env, use Anaconda with Python 3: #https://poweruphosting.com/blog/install-anaconda-python-ubuntu-16-04/ Compile the icons file for Qt:: pyrcc5 icons.qrc -o gui/qt/icons_rc.py For the Linux app launcher (start menu) icon:: sudo desktop-file-install electrum.desktop Compile the protobuf description file:: protoc --proto_path=lib/ --python_out=lib/ lib/paymentrequest.proto Create translations (optional):: ./contrib/make_locale Run:: ./electrum-btcp For Ubuntu 18.04 including Docker install: ---------------------- Update apt package index and upgrade packages as needed sudo apt-get update && apt-get upgrade Install Docker package from Ubuntu repository sudo apt install docker.io Build the docker image:: sudo ./build-docker.sh Run the docker image:: ./run-docker.sh For Linux with docker: ---------------------- Build the docker image:: ./build-docker.sh Run the docker image:: ./run-docker.sh Building Releases ================= MacOS ------ Simply - :: ./setup-mac.sh sudo ./create-dmg.sh Windows ------- See `contrib/build-wine/README` file. Android ------- See `gui/kivy/Readme.txt` file. UPSTREAM PATCH: https://github.com/spesmilo/electrum/blob/master/gui/kivy/Readme.md --- To just create binaries, create the 'packages/' directory:: ./contrib/make_packages (This directory contains the Python dependencies used by Electrum.) BTCP Hints and Debug =================== There are several useful scripts in: scripts This is a good initial check to determine whether things are working: cd scripts python3 block_headers -- The Zclassic Wiki is located at: https://github.com/z-classic/zclassic/wiki. Please use this as a reference and feel free to contribute. ~/.electrum-btcp/ ~/.electrum-btcp/wallets/ has your wallet files - ** back up this folder ** ~/.electrum-btcp/config has your Electrum connection object. Credits +++++++ Contributors ------------ This project exists thanks to all the people who contribute! .. image:: https://opencollective.com/electrum-btcp/contributors.svg?width=890&button=false Backers ------- Thank you to all our backers! `Become a backer`__. .. image:: https://opencollective.com/electrum-btcp/backers.svg?width=890 :target: https://opencollective.com/electrum-btcp#backers __ Backer_ .. _Backer: https://opencollective.com/electrum-btcp#backer Sponsors -------- Support us by becoming a sponsor. Your logo will show up here with a link to your website. `Become a sponsor`__. .. image:: https://opencollective.com/electrum-btcp/sponsor/0/avatar.svg :target: https://opencollective.com/electrum-btcp/sponsor/0/website __ Sponsor_ .. _Sponsor: https://opencollective.com/electrum-btcp#sponsor Original Project Info --------------------- :: Forked from **spesmilo/electrum**: https://github.com/spesmilo/electrum Licence: MIT Licence Author: Thomas Voegtlin Language: Python (GUI: Qt, Kivy) Platforms: Windows, Mac, Linux, Android 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 --- The Bitcoin Private Team ================================================ FILE: RELEASE-NOTES ================================================ # Release 3.0.5 : (Security update) This is a follow-up to the 3.0.4 release, which did not completely fix issue #3374. Users should upgrade to 3.0.5. * The JSONRPC interface is password protected * JSONRPC commands are disabled if the GUI is running, except 'ping', which is used to determine if a GUI is already running # Release 3.0.4 : (Security update) * Fix a vulnerability caused by Cross-Origin Resource Sharing (CORS) in the JSONRPC interface. Previous versions of Electrum are vulnerable to port scanning and deanonimization attacks from malicious websites. Wallets that are not password-protected are vulnerable to theft. * Bundle QR scanner with Android app * Minor bug fixes # Release 3.0.3 * Qt GUI: sweeping now uses the Send tab, allowing fees to be set * Windows: if using the installer binary, there is now a separate shortcut for "Electrum Testnet" * Digital Bitbox: added suport for p2sh-segwit * OS notifications for incoming transactions * better transaction size estimation: - fees for segwit txns were somewhat underestimated (#3347) - some multisig txns were underestimated - handle uncompressed pubkeys * fix #3321: testnet for Windows binaries * fix #3264: Ledger/dbb signing on some platforms * fix #3407: KeepKey sending to p2sh output * other minor fixes and usability improvements # Release 3.0.2 * Android: replace requests tab with address tab, with access to private keys * sweeping minikeys: search for both compressed and uncompressed pubkeys * fix wizard crash when attempting to reset Google Authenticator * fix #3248: fix Ledger+segwit signing * fix #3262: fix SSL payment request signing * other minor fixes. # Release 3.0.1 * minor bug and usability fixes # Release 3.0 - Uncanny Valley (November 1st, 2017) * The project was migrated to Python3 and Qt5. Python2 is no longer supported. If you cloned the source repository, you will need to run "python3 setup.py install" in order to install the new dependencies. * Segwit support: - Native segwit scripts are supported using a new type of seed. The version number for segwit seeds is 0x100. The install wizard will not create segwit seeds by default; users must opt-in with the segwit option. - Native segwit scripts are represented using bech32 addresses, following BIP173. Please note that BIP173 is still in draft status, and that other wallets/websites may not support it. Thus, you should keep a non-segwit wallet in order to be able to receive bitcoins during the transition period. If BIP173 ends up being rejected or substantially modified, your wallet may have to be restored from seed. This will not affect funds sent to bech32 addresses, and it will not affect the capacity of Electrum to spend these funds. - Segwit scripts embedded in p2sh are supported with hardware wallets or bip39 seeds. To create a segwit-in-p2sh wallet, trezor/ledger users will need to enter a BIP49 derivation path. - The BIP32 master keys of segwit wallets are serialized using new version numbers. The new version numbers encode the script type, and they result in the following prefixes: * xpub/xprv : p2pkh or p2sh * ypub/yprv : p2wpkh-in-p2sh * Ypub/Yprv : p2wsh-in-p2sh * zpub/zprv : p2wpkh * Zpub/Zprv : p2wsh These values are identical for mainnet and testnet; tpub/tprv prefixes are no longer used in testnet wallets. - The Wallet Import Format (WIF) is similarly extended for segwit scripts. After a base58-encoded key is decoded to binary, its first byte encodes the script type: * 128 + 0: p2pkh * 128 + 1: p2wpkh * 128 + 2: p2wpkh-in-p2sh * 128 + 5: p2sh * 128 + 6: p2wsh * 128 + 7: p2wsh-in-p2sh The distinction between p2sh and p2pkh in private key means that it is not possible to import a p2sh private key and associate it to a p2pkh address. * A new version of the Electrum protocol is required by the client (version 1.1). Servers using older versions of the protocol will not be displayed in the GUI. * By default, transactions are time-locked to the height of the current block. Other values of locktime may be passed using the command line. # Release 2.9.3 * fix configuration file issue #2719 * fix ledger signing of non-RBF transactions * disable 'spend confirmed only' option by default # Release 2.9.2 * force headers download if headers file is corrupted * add websocket to windows builds # Release 2.9.1 * fix initial headers download * validate contacts on import * command-line option for locktime # 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, 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 classical SPV model. * The desired branch of a blockchain fork can be selected using the network dialog. Branches are identified by the hash and height of the diverging block. Coin splitting is possible using RBF transaction (a tutorial will be added). * Multibit support: If the user enters a BIP39 seed (or uses a hardware wallet), the full derivation path is configurable in the install wizard. * Option to send only confirmed coins * Qt GUI: - Network dialog uses tabs and gets updated by network events. - The gui tabs use icons * Kivy GUI: - separation between network dialog and wallet settings dialog. - option for manual server entry - proxy configuration * Daemon: The wallet password can be passed as parameter to the JSONRPC API. * Various other bugfixes and improvements. # Release 2.8.3 * Fix crash on reading older wallet formats. * TrustedCoin: remove pay-per-tx option # Release 2.8.2 * show paid invoices in history tab * improve CPFP dialog * fixes for trezor, keepkey * other minor bugfixes # Release 2.8.1 * fix Digital Bitbox plugin * fix daemon jsonrpc * fix trustedcoin wallet creation * other minor bugfixes # Release 2.8.0 (March 9, 2017) * Wallet file encryption using ECIES: A keypair is derived from the wallet password. Once the wallet is decrypted, only the public key is retained in memory, in order to save the encrypted file. * The daemon requires wallets to be explicitly loaded before commands can use them. Wallets can be loaded using: 'electrum daemon load_wallet [-w path]'. This command will require a password if the wallet is encrypted. * Invoices and contacts are stored in the wallet file and are no longer shared between wallets. Previously created invoices and contacts files may be imported from the menu. * Fees improvements: - Dynamic fees are enabled by default. - Child Pays For Parent (CPFP) dialog in the GUI. - RBF is automatically proposed for low fee transactions. * Support for Segregated Witness (testnet only). * Support for Digital Bitbox hardware wallet. * The GUI shows a blue icon when connected using a proxy. # Release 2.7.18 * enforce https on exchange rate APIs * use hardcoded list of exchanges * move 'Freeze' menu to Coins (utxo) tab * various bugfixes # Release 2.7.17 * fix a few minor regressions in the Qt GUI # Release 2.7.16 * add Testnet support (fix #541) * allow daemon to be launched in the foreground (fix #1873) * Qt: use separate tabs for addresses and UTXOs * Qt: update fee slider with a network callback * Ledger: new ui and mobile 2fa validation (neocogent) # Release 2.7.15 * Use fee slider for both static and dynamic fees. * Add fee slider to RBF dialog (fix #2083). * Simplify fee preferences. * Critical: Fix password update issue (#2097). This bug prevents password updates in multisig and 2FA wallets. It may also cause wallet corruption if the wallet contains several master private keys (such as 2FA wallets that have been restored from seed). Affected wallets will need to be restored again. # Release 2.7.14 * Merge exchange_rate plugin with main code * Faster synchronization and transaction creation * Fix bugs #2096, #2016 # Release 2.7.13 * fix message signing with imported keys * add size to transaction details window * move plot plugin to main code * minor bugfixes # Release 2.7.12 various bugfixes # Release 2.7.11 * fix offline signing (issue #195) * fix android crashes caused by threads # Release 2.7.10 * various fixes for hardware wallets * improve fee bumping * separate sign and broadcast buttons in Qt tx dialog * allow spaces in private keys # Release 2.7.9 * Fix a bug with the ordering of pubkeys in recent multisig wallets. Affected wallets will regenerate their public keys when opened for the first time. This bug does not affect address generation. * Fix hardware wallet issues #1975, #1976 # Release 2.7.8 * Fix a bug with fee bumping * Fix crash when parsing request (issue #1969) # Release 2.7.7 * Fix utf8 encoding bug with old wallet seeds (issue #1967) * Fix delete request from menu (isue #1968) # Release 2.7.6 * Fixes a critical bug with imported private keys (issue #1966). Keys imported in Electrum 2.7.x were not encrypted, even if the wallet had a password. If you imported private keys using Electrum 2.7.x, you will need to import those keys again. If you imported keys in 2.6 and converted with 2.7.x, you don't need to do anything, but you still need to upgrade in order to be able to spend. * Wizard: Hide seed options in a popup dialog. # Release 2.7.5 * Add number of confirmations to request status. (issue #1757) * In the GUI, refer to passphrase as 'seed extension'. * Fix bug with utf8 encoded passphrases. * Kivy wizard: add a dialog for seed options. * Kivy wizard: add current word to suggestions, because some users don't see the space key. # Release 2.7.4 * Fix private key import in wizard * Fix Ledger display (issue #1961) * Fix old watching-only wallets (issue #1959) * Fix Android compatibility (issue #1947) # Release 2.7.3 * fix Trezor and Keepkey support in Windows builds * fix sweep private key dialog * minor fixes: #1958, #1959 # Release 2.7.2 * fix bug in password update (issue #1954) * fix fee slider (issue #1953) # Release 2.7.1 * fix wizard crash with old seeds * fix issue #1948: fee slider # Release 2.7.0 (Oct 2 2016) * The wallet file format has been upgraded. This upgrade is not backward compatible, which means that a wallet upgraded to the 2.7 format will not be readable by earlier versions of Electrum. Multiple accounts inside the same wallet are not supported in the new format; the Qt GUI will propose to split any 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 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'. * Hardware keystores: - The Ledger Nano S is supported. - Hardware keystores can be used as cosigners in multi-signature wallets. - Multiple hardware cosigners can be used in the same multisig wallet. One icon per keystore is displayed in the satus bar. Each connected device will co-sign the transaction. * Replace-By-Fee: RBF transactions are supported in both Qt and Android. A warning is displayed in the history for transactions that are replaceable, have unconfirmed parents, or that have very low fees. * Dynamic fees: Dynamic fees are enabled by default. A slider allows the user to select the expected confirmation time of their transaction. The expected confirmation times of incoming transactions is also displayed in the history. * The install wizards of Qt and Kivy have been unified. * Qt GUI (Desktop): - A fee slider is visible in the in send tab - The Address tab is hidden by default, can be shown with Ctrl-A - UTXOs are displayed in the Address tab * Kivy GUI (Android): - The GUI displays the complete transaction history. - Multisig wallets are supported. - Wallets can be created and deleted in the GUI. * Seed phrases can be extended with a user-chosen passphrase. The length of seed phrases is standardized to 12 words, using 132 bits of entropy (including 2FA seeds). In the wizard, the type of the seed is displayed in the seed input dialog. * TrustedCoin users can request a reset of their Google Authenticator account, if they still have their seed. # Release 2.6.4 (bugfixes) * fix coinchooser bug (#1703) * fix daemon JSONRPC (#1731) * fix command-line broadcast (#1728) * QT: add colors to labels # Release 2.6.3 (bugfixes) * fix command line parsing of transactions * fix signtransaction --privkey (#1715) # Release 2.6.2 (bugfixes) * fix Trustedcoin restore from seed (bug #1704) * small improvements to kivy GUI # Release 2.6.1 (bugfixes) * fix broadcast command (bug #1688) * fix tx dialog (bug #1690) * kivy: support old-type seed phrases in wizard # Release 2.6 * The source code is relicensed under the MIT Licence * First official release of the Kivy GUI, with android APK * The old 'android' and 'gtk' GUIs are deprecated * Separation between plugins and GUIs * The command line uses jsonrpc to communicate with the daemon * New command: 'notify
' * Alternative coin selection policy, designed to help preserve user privacy. Enable it by setting the Coin Selection preference to Privacy. * The install wizard has been rewritten and improved * Support minikeys as used in Casascius coins for private key import and sweeping * Much improved support for TREZOR and KeepKey devices: - full device information display - initialize a new or wiped device in 4 ways: 1) device generates a new wallet 2) you enter a seed 3) you enter a BIP39 mnemonic to generate the seed 4) you enter a master private key - KeepKey secure seed recovery (KeepKey only) - change / set / disable PIN - set homescreen (TREZOR only) - set a session timeout. Once a session has timed out, further use of the device requires your PIN and passhphrase to be re-entered - enable / disable passphrases - device wipe - multiple device support # Release 2.5.4 * increase MIN_RELAY_TX_FEE to avoid dust transactions # Release 2.5.3 (bugfixes) * installwizard: do not allow direct copy-paste of the seed * installwizard: fix bug #1531 (starting offline) # Release 2.5.2 (bugfixes) * fix bug #1513 (client tries to broadcast transaction while not connected) * fix synchronization bug (#1520) * fix command line bug (#1494) * fixes for exchange rate plugin # Release 2.5.1 (bugfixes) * signatures in transactions were still using the old class * make sure that setup.py uses python2 * fix wizard crash with trustedcoin plugin * fix socket infinite loop * fix history bug #1479 # Release 2.5 * Low-S values are used in signatures (BIP 62). * The Kivy GUI has been merged into master. * The Qt GUI supports multiple windows in the same process. When a new Electrum instance is started, it checks for an already running Electrum process, and connects to it. * The network layer uses select(), so all server communication is handled by a single thread. Moreover, the synchronizer, verifier, and exchange rate plugin now run as separate jobs within the networking thread instead of as their own threads. * Plugins are revamped, particularly the exchange rate plugin. # Release 2.4.4 * Fix bug with TrustedCoin plugin # Release 2.4.3 * Support for KeepKey hardware wallet * Simplified Chinese wordlist * Minor bugfixes and GUI tweaks # Release 2.4.2 * Command line can read arguments from stdin (pipe) * Speedup fee computation for large transactions * Various bugfixes # Release 2.4.1 * Use ssl.PROTOCOL_TLSv1 * Fix DNSSEC issues with ECDSA signatures * Replace TLSLite dependency with minimal RSA implementation * Dynamic Fees: using estimatefee value returned by server * Various GUI improvements # Release 2.4 * Payment to DNS names storing a Bitcoin 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 in DNS (OpenAlias). The identity of the requestor is verified using DNSSEC. * Payment requests signed with OpenAlias keys can be shared as bitcoin: URIs, if they are simple (a single address-type output). The BIP21 URI scheme is extended with 'name', 'sig', 'time', 'exp'. * Arbitrary m-of-n multisig wallets are supported (n<=15). * Multisig transactions can be signed with TREZOR. When you create the multisig wallet, just enter the xpub of your existing TREZOR wallet. * Transaction fees set manually in the GUI are retained, including when the user uses the '!' shortcut. * New 'email' plugin, that enables sending and receiving payment requests by email. * The daemon supports Websocket notifications of payments. # Release 2.3.3 * fix proxy settings (issue #1309) * improvements to the transaction dialog: - request password after showing transaction - show change addresses in yellow color # Release 2.3.2 * minor bugfixes * updated ledger plugin * sort inputs/outputs lexicographically (BIP-LI01) # Release 2.3.1 * patch a bug with payment requests # Release 2.3 * Improved logic for the network layer. * More efficient coin selection. Spend oldest coins first, and minimize the number of transaction inputs. * Plugins are loaded independently of the GUI. As a result, Openalias, TrustedCoin and TREZOR wallets can be used with the command line. Example: 'electrum payto ' * The command line has been refactored: - Arguments are parsed with argparse. - The inline help includes a description of options. - Some commands have been renamed. Notably, 'mktx' and 'payto' have been merged into a single command, with a --broadcast option. Type 'electrum --help' for a complete overview. * The command line accepts the '!' syntax to send the maximum amount available. It can be combined with the '--from' option. Example: 'payto ! --from ' * The command line also accepts a '?' shortcut for private keys arguments, that triggers a prompt. * Payment requests can be managed with the command line, using the following commands: 'addrequest', 'rmrequest', 'listrequests'. Payment requests can be signed with a SSL certificate, and published as bip70 files in a public web directory. To see the relevant configuration variables, type 'electrum addrequest --help' * Commands can be called with jsonrpc, using the 'jsonrpc' gui. The jsonrpc interface may be called by php. # Release 2.2 * Show amounts (thousands separators and decimal point) according to locale in GUI * Show unmatured coins in balance * Fix exchange rates plugin * Network layer: refactoring and fixes # Release 2.1.1 * patch a bug that prevents new wallet creation. * fix connection issue on osx binaries # Release 2.1 * Faster startup, thanks to the following optimizations: 1. Transaction input/outputs are cached in the wallet file 2. Fast X509 certificate parser, not using pyasn1 anymore. 3. The Label Sync plugin only requests modified labels. * The 'Invoices' and 'Send' tabs have been merged. * Contacts are stored in a separate file, shared between wallets. * A Search Box is available in the GUI (Ctrl-S) * Payment requests have an expiration date and can be exported to BIP70 files. * file: scheme support in BIP72 URIs: "bitcoin:?r=file:///..." * Own addresses are shown in green in the Transaction dialog. * Address History dialog. * The OpenAlias plugin was improved. * Various bug fixes and GUI improvements. * A new LabelSync backend is being used an import of the old database was made but since the release came later it's recommended that you do a full push when you upgrade. # Release 2.0.4 - Minor GUI improvements * The password dialog will ask for password again if the user enters a wrong password * The Master Public Key dialog displays which keys belong to the wallet, and which are cosigners * The transaction dialog will ask to save unsaved transaction received from cosigner pool, when user clicks on 'Close' * The multisig restore dialog accepts xprv keys. * The network daemon must be started explicitly before using commands that require a connection Example: electrum daemon start electrum getaddressunspent electrum daemon status electrum daemon stop If a daemon is running, the GUI will use it. # Release 2.0.3 - bugfixes and minor GUI improvements * Do not use daemon threads (fix #960) * Add a zoom button to receive tab * Add exchange rate conversion to receive tab * Use Tor's default port number in default proxy config # Release 2.0.2 - bugfixes * Fix transaction sweep (#1066) * Fix thread timing bug (#1054) # Release 2.0.1 - bugfixes * Fix critical bug in TREZOR address derivation: passphrases were not NFKD normalized. TREZOR users who created a wallet protected by a passphrase containing utf-8 characters with diacritics are affected. These users will have to open their wallet with version 2.0 and to move their funds to a new wallet. * Use a file socket for the daemon (fixes network dialog issues) * Fix crash caused by QR scanner icon when zbar not installed. * Fix CosignerPool plugin * Label Sync plugin: Fix label sharing between multisig wallets # Release 2.0 * Before you upgrade, make sure you have saved your wallet seed on paper. * Documentation is now hosted on a wiki: http://electrum.orain.org * New seed derivation method (not compatible with BIP39). The seed phrase includes a version number, that refers to the wallet structure. The version number also serves as a checksum, and it will prevent the import of seeds from incompatible wallets. Old Electrum seeds are still supported. * New address derivation (BIP32). Standard wallets are single account and use a gap limit of 20. * Support for Multisig wallets using parallel BIP32 derivations and P2SH addresses ("2 of 2", "2 of 3"). * Compact serialization format for unsigned or partially signed transactions, that includes the BIP32 master public key and derivation needed to sign inputs. Serialized transactions can be sent to cosigners or to cold storage using QR codes (using Andreas Schildbach's base 43 idea). * Support for BIP70 payment requests: - Verification of the chain of signatures uses tlslite. - In the GUI, payment requests are shown in the 'Invoices' tab. * Support for hardware wallets: TREZOR (SatoshiLabs) and Btchip (Ledger). * Two-factor authentication service by TrustedCoin. This service uses "2 of 3" multisig wallets and Google Authenticator. Note that wallets protected by this service can be deterministically restored from seed, without Trustedcoin's server. * Cosigner Pool plugin: encrypted communication channel for multisig wallets, to send and receive partially signed transactions. * Audio Modem plugin: send and receive transactions by sound. * OpenAlias plugin: send bitcoins to aliases verified using DNSSEC. * New 'Receive' tab in the GUI: - create and manage payment requests, with QR Codes - the former 'Receive' tab was renamed to 'Addresses' - the former Point of Sale plugin is replaced by a resizeable window that pops up if you click on the QR code * The 'Send' tab in the Qt GUI supports transactions with multiple outputs, and raw hexadecimal scripts. * The GUI can connect to the Electrum daemon: "electrum -d" will start the daemon if it is not already running, and the GUI will connect to it. The daemon can serve several clients. It times out if no client uses if for more than 5 minutes. * The install wizard can be used to import addresses or private keys. A watching-only wallet is created by entering a list of addresses in the wizard dialog. * New file format: Wallets files are saved as JSON. Note that new wallet files cannot be read by older versions of Electrum. Old wallet files will be converted to the new format; this operation may take some time, because public keys will be derived for each address of your wallet. * The client accepts servers with a CA-signed SSL certificate. * ECIES encrypt/decrypt methods, availabe in the GUI and using the command line: encrypt decrypt * The Android GUI has received various updates and it is much more stable. Another script was added to Android, called Authenticator, that works completely offline: it reads an unsigned transaction shown as QR code, signs it and shows the result as a QR code. # Release 1.9.8 * Electrum servers were upgraded to version 0.9. The new server stores a Patrica tree of all UTXOs, an idea proposed by Alan Reiner in the bitcointalk forum. This property allows the client to directly request the balance of any address. The new commands are: 1. getaddressbalance
2. getaddressunspent
3. getutxoaddress * Command-line commands that require a connection to the network spawn a daemon, that remains connected and handles subsequent commands. The daemon terminates itself if it remains unused for more than one minute. The purpose of this is to make scripting more efficient. For example, a bash script using many electrum commands will open only one connection. # Release 1.9.7 * Fix for offline signing * Various bugfixes * GUI usability improvements * Coinbase Buyback plugin # Release 1.9.6 * During wallet creation, do not write seed to disk until it is encrypted. * Confirmation dialog if the transaction fee is higher than 1mBTC. * bugfixes # Release 1.9.5 * Coin control: select addresses to send from * Put addresses that have been used in a minimized section (Qt GUI) * Allow non ascii chars in passwords # Release 1.9.4 bugfixes: offline transactions # Release 1.9.3 bugfixes: connection problems, transactions staying unverified # Release 1.9.2 * fix a syntax error # Release 1.9.1 * fix regression with --offline mode * fix regression with --portable mode: use a dedicated directory # Release 1.9 * The client connects to multiple servers in order to retrieve block headers and find the longest chain * SSL certificate validation (to prevent MITM) * Deterministic signatures (RFC 6979) * Menu to create/restore/open wallets * Create transactions with multiple outputs from CSV (comma separated values) * New text gui: stdio * Plugins are no longer tied to the qt GUI, they can reach all GUIs * Proxy bugs have been fixed # Release 1.8.1 * Notification option when receiving new tranactions * Confirm dialogue before sending large amounts * Alternative datafile location for non-windows systems * Fix offline wallet creation * Remove enforced tx fee * Tray icon improvements * Various bugfixes # Release 1.8 * Menubar in classic gui * Updated the QR Code plugin to enable offline/online wallets to transmit unsigned/signed transactions via QR code. * Fixed bug where never-confirmed transactions prevented further spending # Release 1.7.4 * Increase default fee * fix create and restore in command line * fix verify message in the gui # Release 1.7.3: * Classic GUI can display amounts in mBTC * Account selector in the classic GUI * Changed the way the portable flag uses without supplying a -w argument * Classic GUI asks users to enter their seed on wallet creation # Release 1.7.2: * Transactions that are in the same block are displayed in chronological order in the history. * The client computes transaction priority and rejects zero-fee transactions that need a fee. * The default fee was lowered to 200 uBTC per kb. * Due to an internal format change, your history may be pruned when you open your wallet for the first time after upgrading to 1.7.2. If this is the case, please visit a full server to restore your full history. You will only need to do that once. # Release 1.7.1: bugfixes. # Release 1.7 * The Classic GUI can be extended with plugins. Developers who want to add new features or third-party services to Electrum are invited to write plugins. Some previously existing and non-essential features of Electrum (point-of-sale mode, qrcode scanner) were removed from the core and are now available as plugins. * The wallet waits for 2 confirmations before creating new addresses. This makes recovery from seed more robust. Note that it might create unwanted gaps if you use Electrum 1.7 together with older versions of Electrum. * An interactive Python console replaces the 'Wall' tab. The provided python environment gives users access to the wallet and gui. Most electrum commands are available as python function in the console. Custom scripts an be loaded with a "run(filename)" command. Tab-completions are available. * The location of the Electrum folder in Windows changed from LOCALAPPDATA to APPDATA. Discussion on this topic can be found here: https://bitcointalk.org/index.php?topic=144575.0 * Private keys can be exported from within the classic GUI: For a single address, use the address menu (right-click). To export the keys of your entire wallet, use the settings dialog (import/export tab). * It is possible to create, sign and redeem multisig transaction using the command line interface. This is made possible by the following new commands: dumpprivkey, listunspent, createmultisig, createrawtransaction, decoderawtransaction, signrawtransaction The syntax of these commands is similar to their bitcoind counterpart. For an example, see Gavin's tutorial: https://gist.github.com/gavinandresen/3966071 * Offline wallets now work in a way similar to Armory: 1. user creates an unsigned transaction using the online (watching-only) wallet. 2. unsigned transaction is copied to the offline computer, and signed by the offline wallet. 3. signed transaction is copied to the online computer, broadcasted by the online client. 4. All these steps can be done via the command line interface or the classic GUI. * Many command line commands have been renamed in order to make the syntax consistent with bitcoind. # Release 1.6.2 == Classic GUI * Added new version notification # Release 1.6.1 (11-01-2013) == Core * It is now possible to restore a wallet from MPK (this will create a watching-only wallet) * A switch button allows to easily switch between Lite and Classic GUI. == Classic GUI * Seed and MPK help dialogs were rewritten * Point of Sale: requested amounts can be expressed in other currencies and are converted to bitcoin. == Lite GUI * The receiving button was removed in favor of a menu item to keep it consistent with the history toggle. # Release 1.6.0 (07-01-2013) == Core * (Feature) Add support for importing, signing and verifiying compressed keys * (Feature) Auto reconnect to random server on disconnect * (Feature) Ultimate fallback to HTTP port 80 if TCP doesn't work on any server * (Bug) Under rare circumstances changing password with incorrect password could damage wallet == Lite GUI * (Chore) Use blockchain.info for exchange rate data * (Feature) added currency conversion for BRL, CNY, RUB * (Feature) Saraha theme * (Feature) csv import/export for transactions including labels == Classic GUI * (Chore) pruning servers now called "p", full servers "f" to avoid confusion with terms * (Feature) Debits in history shown in red * (Feature) csv import/export for transactions including labels # Release 1.5.8 (02-01-2013) == Core * (Bug) Fix pending address balance on received coins for pruning servers * (Bug) Fix history command line option to show output again (regression by SPV) * (Chore) Add timeout to blockchain headers file download by HTTP * (Feature) new option: -L, --language: default language used in GUI. == Lite GUI * (Bug) Sending to auto-completed contacts works again * (Chore) Added version number to title bar == Classic GUI * (Feature) Language selector in options. # Release 1.5.7 (18-12-2012) == Core * The blockchain headers file is no longer included in the packages, it is downloaded on startup. * New command line option: -P or --portable, for portable wallets. With this flag, all preferences are saved to the wallet file, and the blockchain headers file is in the same directory as the wallet == Lite GUI * (Feature) Added the ability to export your transactions to a CSV file. * (Feature) Added a label dialog after sending a transaction. * (Feature) Reworked receiving addresses; instead of a random selection from one of your receiving addresses a new widget will show listing unused addresses. * (Chore) Removed server selection. With all the new server options a simple menu item does not suffice anymore. ================================================ FILE: app.fil ================================================ gui/qt/__init__.py gui/qt/main_window.py gui/qt/history_list.py gui/qt/contact_list.py gui/qt/invoice_list.py gui/qt/request_list.py gui/qt/installwizard.py gui/qt/network_dialog.py gui/qt/password_dialog.py gui/qt/util.py gui/qt/seed_dialog.py gui/qt/transaction_dialog.py gui/qt/address_dialog.py gui/qt/qrcodewidget.py gui/qt/qrtextedit.py gui/qt/qrwindow.py gui/kivy/main.kv gui/kivy/main_window.py gui/kivy/uix/dialogs/__init__.py gui/kivy/uix/dialogs/fee_dialog.py gui/kivy/uix/dialogs/installwizard.py gui/kivy/uix/dialogs/settings.py gui/kivy/uix/dialogs/wallets.py gui/kivy/uix/ui_screens/history.kv gui/kivy/uix/ui_screens/receive.kv gui/kivy/uix/ui_screens/send.kv plugins/labels/qt.py plugins/trezor/qt.py plugins/virtualkeyboard/qt.py ================================================ FILE: brewfile ================================================ tap "caskroom/cask" brew "python3" brew "protobuf" # brew "zbar" - brew "gmp" # required by gmpy brew "gettext" tap "brewsci/science" brew "matplotlib" # required for matplotlib used in Plot History brew "libusb-compat" # ledger wallet ================================================ FILE: build-docker.sh ================================================ #!/bin/bash docker build -t electrum-btcp:latest . ================================================ FILE: clean.sh ================================================ #!/bin/bash sudo rm -rf build/ sudo rm -rf dist/ sudo rm -rf __pycache__ sudo rm -rf Electrum_BTCP.egg-info sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Electrum_BTCP-* ================================================ FILE: config ================================================ { "server": "35.224.186.7:50001:t" } ================================================ FILE: contrib/build-wine/README.md ================================================ 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 - Wine (>= v2) For example: ``` $ sudo apt-get install wine-development dirmngr gnupg2 $ sudo ln -sf /usr/bin/wine-development /usr/local/bin/wine $ 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`. ================================================ FILE: contrib/build-wine/build-electrum-git.sh ================================================ #!/bin/bash NAME_ROOT=electrum 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 cd tmp for repo in electrum electrum-locale electrum-icons; do if [ -d $repo ]; then cd $repo git pull git checkout master cd .. else URL=https://github.com/spesmilo/$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 if [ ! -z "$1" ]; then git checkout $1 fi VERSION=`git describe --tags` echo "Last commit: $VERSION" find -exec touch -d '2000-11-11T11:11:11+00:00' {} + popd rm -rf $WINEPREFIX/drive_c/electrum cp -r electrum $WINEPREFIX/drive_c/electrum cp electrum/LICENCE . cp -r electrum-locale/locale $WINEPREFIX/drive_c/electrum/lib/ cp electrum-icons/icons_rc.py $WINEPREFIX/drive_c/electrum/gui/qt/ # Install frozen dependencies $PYTHON -m pip install -r ../../requirements.txt pushd $WINEPREFIX/drive_c/electrum $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 ================================================ FILE: contrib/build-wine/build.sh ================================================ #!/bin/bash # Lucky number export PYTHONHASHSEED=22 if [ ! -z "$1" ]; then to_build="$1" fi here=$(dirname "$0") echo "Clearing $here/build and $here/dist..." rm $here/build/* -rf rm $here/dist/* -rf $here/prepare-wine.sh && \ $here/prepare-pyinstaller.sh && \ $here/prepare-hw.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." ================================================ FILE: contrib/build-wine/deterministic.spec ================================================ # -*- mode: python -*- from PyInstaller.utils.hooks import collect_data_files, collect_submodules import sys import os for i, x in enumerate(sys.argv): if x == '--name': cmdline_name = sys.argv[i+1] break else: raise BaseException('no name') home = os.getcwd()+'\\' # see https://github.com/pyinstaller/pyinstaller/issues/2005 hiddenimports = [] # hiddenimports += collect_submodules('trezorlib') # hiddenimports += collect_submodules('btchip') # hiddenimports += collect_submodules('keepkeylib') datas = [ (home+'lib/currencies.json', 'electrum'), (home+'lib/servers.json', 'electrum'), (home+'lib/checkpoints.json', 'electrum'), (home+'lib/servers_testnet.json', 'electrum'), (home+'lib/checkpoints_testnet.json', 'electrum'), (home+'lib/wordlist/english.txt', 'electrum/wordlist'), # (home+'lib/locale', 'electrum/locale'), (home+'plugins', 'electrum_plugins'), ] # 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-btcp', 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' ], 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-btcp', cmdline_name + ".exe"), debug=False, strip=None, upx=False, icon=home+'icons/electrum.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, # name=os.path.join('build\\pyi.win32\\electrum', cmdline_name + "-portable.exe"), # debug=False, # strip=None, # upx=False, # icon=home+'icons/electrum.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', cmdline_name), # debug=False, # strip=None, # upx=False, # icon=home+'icons/electrum.ico', # console=False) # coll = COLLECT( # exe_dependent, # a.binaries, # a.zipfiles, # a.datas, # strip=None, # upx=True, # debug=False, # icon=home+'icons/electrum.ico', # console=False, # name=os.path.join('dist', 'electrum')) ================================================ FILE: contrib/build-wine/electrum.nsi ================================================ ;-------------------------------- ;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 "Electrum" !define PRODUCT_WEB_SITE "https://github.com/spesmilo/electrum" !define PRODUCT_PUBLISHER "Electrum Technologies GmbH" !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\icons\electrum.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\*.*" File "..\..\icons\electrum.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-${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-${PRODUCT_VERSION}.exe" "" "$INSTDIR\electrum-${PRODUCT_VERSION}.exe" 0 CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME} Testnet.lnk" "$INSTDIR\electrum-${PRODUCT_VERSION}.exe" "--testnet" "$INSTDIR\electrum-${PRODUCT_VERSION}.exe" 0 ;Links bitcoinprivate: URI's to Electrum WriteRegStr HKCU "Software\Classes\bitcoin" "" "URL:bitcoinprivate Protocol" WriteRegStr HKCU "Software\Classes\bitcoin" "URL Protocol" "" WriteRegStr HKCU "Software\Classes\bitcoin" "DefaultIcon" "$\"$INSTDIR\electrum.ico, 0$\"" WriteRegStr HKCU "Software\Classes\bitcoin\shell\open\command" "" "$\"$INSTDIR\electrum-${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.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 ================================================ FILE: contrib/build-wine/prepare-hw.sh ================================================ #!/bin/bash TREZOR_GIT_URL=https://github.com/trezor/python-trezor.git KEEPKEY_GIT_URL=https://github.com/keepkey/python-keepkey.git BTCHIP_GIT_URL=https://github.com/LedgerHQ/btchip-python.git BRANCH=master PYTHON_VERSION=3.5.4 # These settings probably don't need any change export WINEPREFIX=/opt/wine64 PYHOME=c:/python$PYTHON_VERSION PYTHON="wine $PYHOME/python.exe -OO -B" # Let's begin! cd `dirname $0` set -e cd tmp $PYTHON -m pip install setuptools --upgrade $PYTHON -m pip install cython --upgrade $PYTHON -m pip install trezor==0.7.16 --upgrade $PYTHON -m pip install keepkey==4.0.0 --upgrade $PYTHON -m pip install btchip-python==0.1.23 --upgrade ================================================ FILE: contrib/build-wine/prepare-pyinstaller.sh ================================================ #!/bin/bash PYTHON_VERSION=3.5.4 PYINSTALLER_GIT_URL=https://github.com/ecdsa/pyinstaller.git BRANCH=fix_2952 export WINEPREFIX=/opt/wine64 PYHOME=c:/python$PYTHON_VERSION PYTHON="wine $PYHOME/python.exe -OO -B" cd `dirname $0` set -e cd tmp if [ ! -d "pyinstaller" ]; then git clone -b $BRANCH $PYINSTALLER_GIT_URL pyinstaller fi cd pyinstaller git pull git checkout $BRANCH $PYTHON setup.py install cd .. wine "C:/python$PYTHON_VERSION/scripts/pyinstaller.exe" -v ================================================ FILE: contrib/build-wine/prepare-wine.sh ================================================ #!/bin/bash # Please update these carefully, some versions won't work under Wine NSIS_URL=https://prdownloads.sourceforge.net/nsis/nsis-3.02.1-setup.exe?download NSIS_SHA256=736c9062a02e297e335f82252e648a883171c98e0d5120439f538c81d429552e 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 0 fi } verify_hash() { local file=$1 expected_hash=$2 out= actual_hash=$(sha256sum $file | awk '{print $1}') if [ "$actual_hash" == "$expected_hash" ]; then return 0 else echo "$file $actual_hash (unexpected hash)" >&2 exit 0 fi } # Let's begin! cd `dirname $0` set -e # Clean up Wine environment echo "Cleaning $WINEPREFIX" rm -rf $WINEPREFIX echo "done" wine 'wineboot' echo "Cleaning tmp" rm -rf tmp mkdir -p tmp echo "done" cd tmp # Install Python # note: you might need "sudo apt-get install dirmngr" for the following # keys from https://www.python.org/downloads/#pubkeys KEYRING_PYTHON_DEV=keyring-electrum-build-python-dev.gpg gpg --no-default-keyring --keyring $KEYRING_PYTHON_DEV --recv-keys 531F072D39700991925FED0C0EDDC5F26A45C816 26DEA9D4613391EF3E25C9FF0A5B101836580288 CBC547978A3964D14B9AB36A6AF053F07D9DC8D2 C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF 12EF3DC38047DA382D18A5B999CDEA9DA4135B38 8417157EDBE73D9EAC1E539B126EB563A74B06BF DBBF2EEBF925FAADCF1F3FFFD9866941EA5BBD71 2BA0DB82515BBB9EFFAC71C5C9BE28DEE6DF025C 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D C9B104B3DD3AA72D7CCB1066FB9921286F5E1540 97FC712E4C024BBEA48A61ED3A5CA953F73C700D 7ED10B6531D7C8E1BC296021FC624643487034E5 for msifile in core dev exe lib pip tools; do echo "Installing $msifile..." wget "https://www.python.org/ftp/python/$PYTHON_VERSION/win32/${msifile}.msi" wget "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 $PYTHON -m pip install pypiwin32 # Install PyQt $PYTHON -m pip install PyQt5 ## Install pyinstaller #$PYTHON -m pip install pyinstaller==3.3 # Install ZBar #wget -q -O zbar.exe "https://sourceforge.net/projects/zbar/files/zbar/0.10/zbar-0.10-setup.exe/download" #wine zbar.exe # install Cryptodome $PYTHON -m pip install pycryptodomex # install PySocks $PYTHON -m pip install win_inet_pton # install websocket (python2) $PYTHON -m pip install websocket-client # Upgrade setuptools (so Electrum can be installed later) $PYTHON -m pip install setuptools --upgrade # Install NSIS installer wget -q -O nsis.exe "$NSIS_URL" verify_hash nsis.exe $NSIS_SHA256 wine nsis.exe /S # 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. Please run prepare-pyinstaller.sh" ================================================ FILE: contrib/freeze_packages.sh ================================================ #!/bin/bash # Run this after a new release to update dependencies venv_dir=~/.electrum-venv contrib=$(dirname "$0") which virtualenv > /dev/null 2>&1 || { echo "Please install virtualenv" && exit 1; } rm $venv_dir -rf virtualenv $venv_dir source $venv_dir/bin/activate echo "Installing dependencies" pushd $contrib/.. python setup.py install popd pip freeze | sed '/^Electrum/ d' > $contrib/requirements.txt echo "Updated requirements" ================================================ FILE: contrib/make_apk ================================================ #!/bin/bash pushd lib VERSION=$(python -c "import version; print version.ELECTRUM_VERSION")".0" popd echo $VERSION echo $VERSION > contrib/apk_version pushd ./gui/kivy/; make apk; popd ================================================ FILE: contrib/make_download ================================================ #!/usr/bin/python2 import re import os from versions import version, version_win, version_mac, version_android, version_apk from versions import download_template, download_page with open(download_template) as f: string = f.read() string = string.replace("##VERSION##", version) string = string.replace("##VERSION_WIN##", version_win) string = string.replace("##VERSION_MAC##", version_mac) string = string.replace("##VERSION_ANDROID##", version_android) string = string.replace("##VERSION_APK##", version_apk) files = { 'tgz': "Electrum-%s.tar.gz" % version, 'zip': "Electrum-%s.zip" % version, 'mac': "electrum-%s.dmg" % version_mac, 'win': "electrum-%s.exe" % version_win, 'win_setup': "electrum-%s-setup.exe" % version_win, 'win_portable': "electrum-%s-portable.exe" % version_win, } for k, n in files.items(): path = "dist/%s"%n link = "https://download.electrum.org/%s/%s"%(version,n) if not os.path.exists(path): os.system("wget -q %s -O %s" % (link, path)) if not os.path.getsize(path): os.unlink(path) string = re.sub("
(.*?)
"%k, '', string, flags=re.DOTALL + re.MULTILINE) continue sigpath = path + '.asc' siglink = link + '.asc' if not os.path.exists(sigpath): os.system("wget -q %s -O %s" % (siglink, sigpath)) if not os.path.getsize(sigpath): os.unlink(sigpath) string = re.sub("
(.*?)
"%k, '', string, flags=re.DOTALL + re.MULTILINE) continue if os.system("gpg --verify %s"%sigpath) != 0: raise BaseException(sigpath) string = string.replace("##link_%s##"%k, link) with open(download_page,'w') as f: f.write(string) ================================================ FILE: contrib/make_locale ================================================ #!/usr/bin/env python3 import os import io import zipfile import requests os.chdir(os.path.dirname(os.path.realpath(__file__))) os.chdir('..') # Generate fresh translation template if not os.path.exists('lib/locale'): os.mkdir('lib/locale') cmd = 'xgettext -s --no-wrap -f app.fil --output=lib/locale/messages.pot' print('Generate template') os.system(cmd) os.chdir('lib') crowdin_identifier = 'electrum' crowdin_file_name = 'electrum-client/messages.pot' locale_file_name = 'locale/messages.pot' crowdin_api_key = None filename = '~/.crowdin_api_key' if os.path.exists(filename): with open(filename) as f: crowdin_api_key = f.read().strip() if "crowdin_api_key" in os.environ: crowdin_api_key = os.environ["crowdin_api_key"] if crowdin_api_key: # Push to Crowdin print('Push to Crowdin') url = ('https://api.crowdin.com/api/project/' + crowdin_identifier + '/update-file?key=' + crowdin_api_key) with open(locale_file_name,'rb') as f: files = {crowdin_file_name: f} requests.request('POST', url, files=files) # Build translations print('Build translations') response = requests.request('GET', 'https://api.crowdin.com/api/project/' + crowdin_identifier + '/export?key=' + crowdin_api_key).content print(response) # Download & unzip print('Download translations') s = requests.request('GET', 'https://crowdin.com/download/project/' + crowdin_identifier + '.zip').content zfobj = zipfile.ZipFile(io.BytesIO(s)) print('Unzip translations') for name in zfobj.namelist(): if not name.startswith('electrum-client/locale'): continue if name.endswith('/'): if not os.path.exists(name[16:]): os.mkdir(name[16:]) else: with open(name[16:], 'wb') as output: output.write(zfobj.read(name)) # Convert .po to .mo print('Installing') for lang in os.listdir('locale'): if lang.startswith('messages'): continue # Check LC_MESSAGES folder mo_dir = 'locale/%s/LC_MESSAGES' % lang if not os.path.exists(mo_dir): os.mkdir(mo_dir) cmd = 'msgfmt --output-file="%s/electrum.mo" "locale/%s/electrum.po"' % (mo_dir,lang) print('Installing', lang) os.system(cmd) ================================================ FILE: contrib/make_packages ================================================ #!/bin/bash contrib=$(dirname "$0") whereis pip3 if [ $? -ne 0 ] ; then echo "Install pip3" ; exit ; fi rm $contrib/../packages/ -r #Install pure python modules in electrum directory pip3 install -r $contrib/requirements.txt -t $contrib/../packages ================================================ FILE: contrib/requirements.txt ================================================ certifi==2017.11.5 chardet==3.0.4 dnspython==1.15.0 ecdsa==0.13.3 idna==2.6 jsonrpclib-pelix==0.3.1 pbkdf2==1.3 protobuf==3.5.0.post1 pyaes==1.6.1 PySocks==1.6.7 qrcode==5.3 requests==2.18.4 six==1.11.0 urllib3==1.22 ================================================ FILE: contrib/sign_packages ================================================ #!/usr/bin/python2 import os import getpass if __name__ == '__main__': os.chdir("dist") password = getpass.getpass("Password:") for f in os.listdir('.'): if f.endswith('asc'): continue os.system( "gpg --sign --armor --detach --passphrase \"%s\" %s"%(password, f) ) os.chdir("..") ================================================ FILE: create-dmg.sh ================================================ #!/bin/sh echo "Cleaning..." sudo sh ./clean.sh VERSION=$(python3 -c "from lib import version; print(version.ELECTRUM_VERSION)") VERSION=${VERSION//ELECTRUM_VERSION=/} echo "Creating package $VERSION" echo "Running brew install" brew bundle echo "Running pip3 install" pip3 install -r requirements.txt echo "Building icons" pyrcc5 icons.qrc -o gui/qt/icons_rc.py echo "Compiling the protobuf description file" protoc --proto_path=lib/ --python_out=lib/ lib/paymentrequest.proto echo "Compiling translations" ./contrib/make_locale echo "Creating package $VERSION" sudo python3 setup.py sdist echo "Creating .app from python using py2app" sudo ARCHFLAGS="-arch i386 -arch x86_64" sudo python3 setup-release.py py2app --includes sip sudo mkdir dist/installer-mac/ sudo mv "dist/Electrum BTCP.app" "dist/installer-mac/" sudo touch "dist/installer-mac/To install, copy it into Applications" echo "Creating .dmg" sudo hdiutil create -fs HFS+ -volname "Electrum BTCP - Installer" -srcfolder "dist/installer-mac" dist/electrum-btcp-$VERSION-macosx.dmg echo "Done! .dmg and .app are in dist/" ================================================ FILE: docs/release-tests.md ================================================ ## BTCP Electrum Wallet **Tests to perform before each release** ### 1. Connection 1. User can connect for the first time (Green Dot). 1. User can connect without having a BTCPrivate directory 2. User can connect having an existing, matching, BTCPrivate directory 2. User can connect consecutively. This includes being able to resume from previous blockchain headers sync ### 2. User can import b addr private key 1. User can import b addr private key (from ZCL, BTC, and BTCP) 2. User can export b addr private key (from ZCL, BTC, and BTCP) 3. User can Sweep from a b addr private key (from ZCL, BTC, and BTCP) ### 3. Transactions 1. User can send from b->b 2. User can receive from z->b 3. User can receive from b->b 4. User can send from bx (multisig) 5. User can send to bx (multisig) 6. All transactions become Verified 7. Coinbase transaction error handling is correctly done ('e.g. needs to send full amount to Z'). ================================================ FILE: electrum-btcp ================================================ #!/usr/bin/env python3 # -*- mode: python -*- # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, merge, # publish, distribute, sublicense, and/or sell copies of the Software, # and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. import os import sys # from https://gist.github.com/tito/09c42fb4767721dc323d import threading try: import jnius except: jnius = None if jnius: orig_thread_run = threading.Thread.run def thread_check_run(*args, **kwargs): try: return orig_thread_run(*args, **kwargs) finally: jnius.detach() threading.Thread.run = thread_check_run script_dir = os.path.dirname(os.path.realpath(__file__)) is_bundle = getattr(sys, 'frozen', False) is_local = not is_bundle and os.path.exists(os.path.join(script_dir, "electrum.desktop")) is_android = 'ANDROID_DATA' in os.environ is_macOS = sys.platform == 'darwin' # move this back to gui/kivy/__init.py once plugins are moved os.environ['KIVY_DATA_DIR'] = os.path.abspath(os.path.dirname(__file__)) + '/gui/kivy/data/' if is_local or is_android: sys.path.insert(0, os.path.join(script_dir, 'packages')) def check_imports(): # pure-python dependencies need to be imported here for pyinstaller try: import dns import pyaes import ecdsa import requests import qrcode import pbkdf2 import google.protobuf import jsonrpclib except ImportError as e: sys.exit("Error: %s. Try 'sudo pip install '"%str(e)) # the following imports are for pyinstaller from google.protobuf import descriptor from google.protobuf import message from google.protobuf import reflection from google.protobuf import descriptor_pb2 from jsonrpclib import SimpleJSONRPCServer # make sure that certificates are here if is_bundle and is_macOS: requests.utils.DEFAULT_CA_BUNDLE_PATH = os.path.join(os.path.dirname(__file__), 'cacert.pem') assert os.path.exists(requests.utils.DEFAULT_CA_BUNDLE_PATH) if not is_android: check_imports() # load local module as electrum if is_local or is_android or is_macOS: import imp imp.load_module('electrum', *imp.find_module('lib')) imp.load_module('electrum_gui', *imp.find_module('gui')) imp.load_module('electrum_plugins', *imp.find_module('plugins')) from electrum import bitcoin from electrum import SimpleConfig, Network from electrum.wallet import Wallet, Imported_Wallet from electrum.storage import WalletStorage from electrum.util import print_msg, print_stderr, json_encode, json_decode from electrum.util import set_verbosity, InvalidPassword from electrum.commands import get_parser, known_commands, Commands, config_variables from electrum import daemon from electrum import keystore from electrum.mnemonic import Mnemonic import electrum_plugins # get password routine def prompt_password(prompt, confirm=True): import getpass password = getpass.getpass(prompt, stream=None) if password and confirm: password2 = getpass.getpass("Confirm: ") if password != password2: sys.exit("Error: Passwords do not match.") if not password: password = None return password def run_non_RPC(config): cmdname = config.get('cmd') storage = WalletStorage(config.get_wallet_path()) if storage.file_exists(): sys.exit("Error: Remove the existing wallet first!") def password_dialog(): return prompt_password("Password (hit return if you do not wish to encrypt your wallet):") if cmdname == 'restore': text = config.get('text').strip() passphrase = config.get('passphrase', '') password = password_dialog() if keystore.is_private(text) else None if keystore.is_address_list(text): wallet = Imported_Wallet(storage) for x in text.split(): wallet.import_address(x) elif keystore.is_private_key_list(text): k = keystore.Imported_KeyStore({}) storage.put('keystore', k.dump()) storage.put('use_encryption', bool(password)) wallet = Imported_Wallet(storage) for x in text.split(): wallet.import_private_key(x, password) storage.write() else: if keystore.is_seed(text): k = keystore.from_seed(text, passphrase, False) elif keystore.is_master_key(text): k = keystore.from_master_key(text) else: sys.exit("Error: Seed or key not recognized") if password: k.update_password(None, password) storage.put('keystore', k.dump()) storage.put('wallet_type', 'standard') storage.put('use_encryption', bool(password)) storage.write() wallet = Wallet(storage) if not config.get('offline'): network = Network(config) network.start() wallet.start_threads(network) print_msg("Recovering wallet...") wallet.synchronize() wallet.wait_until_synchronized() msg = "Recovery successful" if wallet.is_found() else "Found no history for this wallet" else: msg = "This wallet was restored offline. It may contain more addresses than displayed." print_msg(msg) elif cmdname == 'create': password = password_dialog() passphrase = config.get('passphrase', '') seed_type = 'segwit' if config.get('segwit') else 'standard' seed = Mnemonic('en').make_seed(seed_type) k = keystore.from_seed(seed, passphrase, False) storage.put('keystore', k.dump()) storage.put('wallet_type', 'standard') wallet = Wallet(storage) wallet.update_password(None, password, True) wallet.synchronize() print_msg("Your wallet generation seed is:\n\"%s\"" % seed) print_msg("Please keep it in a safe place; if you lose it, you will not be able to restore your wallet.") wallet.storage.write() print_msg("Wallet saved in '%s'" % wallet.storage.path) sys.exit(0) def init_daemon(config_options): config = SimpleConfig(config_options) storage = WalletStorage(config.get_wallet_path()) if not storage.file_exists(): print_msg("Error: Wallet file not found.") print_msg("Type 'electrum create' to create a new wallet, or provide a path to a wallet with the -w option") sys.exit(0) if storage.is_encrypted(): if config.get('password'): password = config.get('password') else: password = prompt_password('Password:', False) if not password: print_msg("Error: Password required") sys.exit(1) else: password = None config_options['password'] = password def init_cmdline(config_options, server): config = SimpleConfig(config_options) cmdname = config.get('cmd') cmd = known_commands[cmdname] if cmdname == 'signtransaction' and config.get('privkey'): cmd.requires_wallet = False cmd.requires_password = False if cmdname in ['payto', 'paytomany'] and config.get('unsigned'): cmd.requires_password = False if cmdname in ['payto', 'paytomany'] and config.get('broadcast'): cmd.requires_network = True # instanciate wallet for command-line storage = WalletStorage(config.get_wallet_path()) if cmd.requires_wallet and not storage.file_exists(): print_msg("Error: Wallet file not found.") print_msg("Type 'electrum create' to create a new wallet, or provide a path to a wallet with the -w option") sys.exit(0) # important warning if cmd.name in ['getprivatekeys']: print_stderr("WARNING: ALL your private keys are secret.") print_stderr("Exposing a single private key can compromise your entire wallet!") print_stderr("In particular, DO NOT use 'redeem private key' services proposed by third parties.") # commands needing password if (cmd.requires_wallet and storage.is_encrypted() and server is None)\ or (cmd.requires_password and (storage.get('use_encryption') or storage.is_encrypted())): if config.get('password'): password = config.get('password') else: password = prompt_password('Password:', False) if not password: print_msg("Error: Password required") sys.exit(1) else: password = None config_options['password'] = password if cmd.name == 'password': new_password = prompt_password('New password:') config_options['new_password'] = new_password return cmd, password def run_offline_command(config, config_options): cmdname = config.get('cmd') cmd = known_commands[cmdname] password = config_options.get('password') if cmd.requires_wallet: storage = WalletStorage(config.get_wallet_path()) if storage.is_encrypted(): storage.decrypt(password) wallet = Wallet(storage) else: wallet = None # check password if cmd.requires_password and storage.get('use_encryption'): try: seed = wallet.check_password(password) except InvalidPassword: print_msg("Error: This password does not decode this wallet.") sys.exit(1) if cmd.requires_network: print_msg("Warning: running command offline") # arguments passed to function args = [config.get(x) for x in cmd.params] # decode json arguments args = list(map(json_decode, args)) # options kwargs = {} for x in cmd.options: kwargs[x] = (config_options.get(x) if x in ['password', 'new_password'] else config.get(x)) cmd_runner = Commands(config, wallet, None) func = getattr(cmd_runner, cmd.name) result = func(*args, **kwargs) # save wallet if wallet: wallet.storage.write() return result def init_plugins(config, gui_name): from electrum.plugins import Plugins return Plugins(config, is_local or is_android, gui_name) if __name__ == '__main__': # on osx, delete Process Serial Number arg generated for apps launched in Finder sys.argv = list(filter(lambda x: not x.startswith('-psn'), sys.argv)) # old 'help' syntax if len(sys.argv) > 1 and sys.argv[1] == 'help': sys.argv.remove('help') sys.argv.append('-h') # read arguments from stdin pipe and prompt for i, arg in enumerate(sys.argv): if arg == '-': if not sys.stdin.isatty(): sys.argv[i] = sys.stdin.read() break else: raise BaseException('Cannot get argument from stdin') elif arg == '?': sys.argv[i] = input("Enter argument:") elif arg == ':': sys.argv[i] = prompt_password('Enter argument (will not echo):', False) # parse command line parser = get_parser() args = parser.parse_args() # config is an object passed to the various constructors (wallet, interface, gui) if is_android: config_options = { 'verbose': True, 'cmd': 'gui', 'gui': 'kivy', } else: config_options = args.__dict__ f = lambda key: config_options[key] is not None and key not in config_variables.get(args.cmd, {}).keys() config_options = {key: config_options[key] for key in filter(f, config_options.keys())} if config_options.get('server'): config_options['auto_connect'] = False config_options['cwd'] = os.getcwd() # fixme: this can probably be achieved with a runtime hook (pyinstaller) if is_bundle and hasattr(sys, '_MEIPASS') and os.path.exists(os.path.join(sys._MEIPASS, 'is_portable')): config_options['portable'] = True if config_options.get('portable'): config_options['electrum_path'] = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'electrum_data') # kivy sometimes freezes when we write to sys.stderr set_verbosity(config_options.get('verbose') and config_options.get('gui')!='kivy') # check uri uri = config_options.get('url') if uri: if not uri.startswith('bitcoin:'): print_stderr('unknown command:', uri) sys.exit(1) config_options['url'] = uri # todo: defer this to gui config = SimpleConfig(config_options) cmdname = config.get('cmd') if config.get('testnet'): bitcoin.NetworkConstants.set_testnet() # run non-RPC commands separately if cmdname in ['create', 'restore']: run_non_RPC(config) sys.exit(0) if cmdname == 'gui': fd, server = daemon.get_fd_or_server(config) if fd is not None: plugins = init_plugins(config, config.get('gui', 'qt')) d = daemon.Daemon(config, fd, True) d.start() d.init_gui(config, plugins) sys.exit(0) else: result = server.gui(config_options) elif cmdname == 'daemon': subcommand = config.get('subcommand') if subcommand in ['load_wallet']: init_daemon(config_options) if subcommand in [None, 'start']: fd, server = daemon.get_fd_or_server(config) if fd is not None: if subcommand == 'start': pid = os.fork() if pid: print_stderr("starting daemon (PID %d)" % pid) sys.exit(0) init_plugins(config, 'cmdline') d = daemon.Daemon(config, fd, False) d.start() if config.get('websocket_server'): from electrum import websockets websockets.WebSocketServer(config, d.network).start() if config.get('requests_dir'): path = os.path.join(config.get('requests_dir'), 'index.html') if not os.path.exists(path): print("Requests directory not configured.") print("You can configure it using https://github.com/spesmilo/electrum-merchant") sys.exit(1) d.join() sys.exit(0) else: result = server.daemon(config_options) else: server = daemon.get_server(config) if server is not None: result = server.daemon(config_options) else: print_msg("Daemon not running") sys.exit(1) else: # command line server = daemon.get_server(config) init_cmdline(config_options, server) if server is not None: result = server.run_cmdline(config_options) else: cmd = known_commands[cmdname] if cmd.requires_network: print_msg("Daemon not running; try 'electrum daemon start'") sys.exit(1) else: init_plugins(config, 'cmdline') result = run_offline_command(config, config_options) # print result if isinstance(result, str): print_msg(result) elif type(result) is dict and result.get('error'): print_stderr(result.get('error')) elif result is not None: print_msg(json_encode(result)) sys.exit(0) ================================================ FILE: electrum-env ================================================ #!/bin/bash # # This script creates a virtualenv named 'env' and installs all # python dependencies before activating the env and running Electrum. # If 'env' already exists, it is activated and Electrum is started # without any installations. Additionally, the PYTHONPATH environment # variable is set properly before running Electrum. # # python-qt and its dependencies will still need to be installed with # your package manager. if [ -e ./env/bin/activate ]; then source ./env/bin/activate else virtualenv env -p `which python3` source ./env/bin/activate python3 setup.py install fi export PYTHONPATH="/usr/local/lib/python3.5/site-packages:$PYTHONPATH" ./electrum-btcp "$@" deactivate ================================================ FILE: electrum.conf.sample ================================================ # Configuration file for the electrum client # Settings defined here are shared across wallets # # copy this file to /etc/electrum.conf if you want read-only settings [client] server = electrum.novit.ro:50001:t proxy = None gap_limit = 5 # booleans use python syntax use_change = True gui = qt num_zeros = 2 # default transaction fee is in Satoshis fee = 10000 winpos-qt = [799, 226, 877, 435] ================================================ FILE: electrum.desktop ================================================ # If you want electrum to appear in a linux app launcher ("start menu"), install this by doing: # sudo desktop-file-install electrum.desktop [Desktop Entry] Comment=Lightweight Bitcoin Private Client Exec=electrum-btcp %u GenericName[en_US]=Bitcoin Private Wallet GenericName=Bitcoin Private Wallet Icon=electrum Name[en_US]=Bitcoin Private Electrum Wallet Name=Bitcoin Private Electrum Wallet Categories=Finance;Network; StartupNotify=false Terminal=false Type=Application MimeType=x-scheme-handler/bitcoin; ================================================ FILE: gui/__init__.py ================================================ # To create a new GUI, please add its code to this directory. # Three objects are passed to the ElectrumGui: config, daemon and plugins # The Wallet object is instanciated by the GUI # Notifications about network events are sent to the GUI by using network.register_callback() ================================================ FILE: gui/kivy/Makefile ================================================ PYTHON = python3 # needs kivy installed or in PYTHONPATH .PHONY: theming apk clean theming: $(PYTHON) -m kivy.atlas theming/light 1024 theming/light/*.png prepare: # running pre build setup @cp tools/buildozer.spec ../../buildozer.spec # copy electrum to main.py @cp ../../electrum ../../main.py @-if [ ! -d "../../.buildozer" ];then \ cd ../..; buildozer android debug;\ cp -f gui/kivy/tools/blacklist.txt .buildozer/android/platform/python-for-android/src/blacklist.txt;\ rm -rf ./.buildozer/android/platform/python-for-android/dist;\ fi apk: @make prepare @-cd ../..; buildozer android debug deploy run @make clean release: @make prepare @-cd ../..; buildozer android release @make clean clean: # Cleaning up # rename main.py to electrum @-rm ../../main.py # remove buildozer.spec @-rm ../../buildozer.spec ================================================ FILE: gui/kivy/Readme.txt ================================================ Before compiling, create packages: `contrib/make_packages` Commands:: `make theming` to make a atlas out of a list of pngs `make apk` to make a apk If something in included modules like kivy or any other module changes then you need to rebuild the distribution. To do so: rm -rf .buildozer/android/platform/python-for-android/dist how to build with ssl: rm -rf .buildozer/android/platform/build/ ./contrib/make_apk pushd /opt/electrum/.buildozer/android/platform/build/build/libs_collections/Electrum/armeabi-v7a cp libssl1.0.2g.so /opt/crystax-ndk-10.3.2/sources/openssl/1.0.2g/libs/armeabi-v7a/libssl.so cp libcrypto1.0.2g.so /opt/crystax-ndk-10.3.2/sources/openssl/1.0.2g/libs/armeabi-v7a/libcrypto.so popd ./contrib/make_apk ================================================ FILE: gui/kivy/__init__.py ================================================ #!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, merge, # publish, distribute, sublicense, and/or sell copies of the Software, # and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # # Kivy GUI import sys import os try: sys.argv = [''] import kivy except ImportError: # This error ideally shouldn't raised with pre-built packages sys.exit("Error: Could not import kivy. Please install it using the" + \ "instructions mentioned here `http://kivy.org/#download` .") # minimum required version for kivy kivy.require('1.8.0') from kivy.logger import Logger class ElectrumGui: def __init__(self, config, daemon, plugins): Logger.debug('ElectrumGUI: initialising') self.daemon = daemon self.network = daemon.network self.config = config self.plugins = plugins def main(self): from .main_window import ElectrumWindow self.config.open_last_wallet() w = ElectrumWindow(config=self.config, network=self.network, plugins = self.plugins, gui_object=self) w.run() if w.wallet: self.config.save_last_wallet(w.wallet) ================================================ FILE: gui/kivy/data/fonts/tron/License.txt ================================================ Copyright (c) 2010-2011, Jeff Bell [www.randombell.com] | [jeffbell@randombell.com]. 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 ================================================ FILE: gui/kivy/data/fonts/tron/Readme.txt ================================================ TR2N v1.3 ABOUT THE FONT: A font based upon the poster text for TRON LEGACY. The font is different from the pre-existing TRON font currently on the web. Similar in minor aspects but different in most. Style based upon text from different region posters. UPDATE HISTORY: 3/7/11 - Adjusted the letter B (both lowercase and uppercase), capped off the ends of T, P and R, added a few more punctuation marks, as well as added the TR and TP ligature to allow for the solid bar connect as in the poster art. 1/22/11 - Made minor corrections to all previous letters and punctuation. Corrected issue with number 8's top filling in. ABOUT THE AUTHOR: 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: www.randombell.com www.damovieman.deviantart.com http://www.imdb.com/name/nm3983081/ http://www.vimeo.com/user4004969/videos ================================================ FILE: gui/kivy/data/glsl/default.fs ================================================ $HEADER$ void main (void){ gl_FragColor = frag_color * texture2D(texture0, tex_coord0); } ================================================ FILE: gui/kivy/data/glsl/default.vs ================================================ $HEADER$ void main (void) { frag_color = color * vec4(1.0, 1.0, 1.0, opacity); tex_coord0 = vTexCoords0; gl_Position = projection_mat * modelview_mat * vec4(vPosition.xy, 0.0, 1.0); } ================================================ FILE: gui/kivy/data/glsl/header.fs ================================================ #ifdef GL_ES precision highp float; #endif /* Outputs from the vertex shader */ varying vec4 frag_color; varying vec2 tex_coord0; /* uniform texture samplers */ uniform sampler2D texture0; ================================================ FILE: gui/kivy/data/glsl/header.vs ================================================ #ifdef GL_ES precision highp float; #endif /* Outputs to the fragment shader */ varying vec4 frag_color; varying vec2 tex_coord0; /* vertex attributes */ attribute vec2 vPosition; attribute vec2 vTexCoords0; /* uniform variables */ uniform mat4 modelview_mat; uniform mat4 projection_mat; uniform vec4 color; uniform float opacity; ================================================ FILE: gui/kivy/data/images/defaulttheme.atlas ================================================ {"defaulttheme-0.png": {"progressbar_background": [391, 227, 24, 24], "tab_btn_disabled": [264, 137, 32, 32], "tab_btn_pressed": [366, 137, 32, 32], "image-missing": [152, 171, 48, 48], "splitter_h": [174, 123, 32, 7], "splitter_down": [501, 253, 7, 32], "splitter_disabled_down": [503, 291, 7, 32], "vkeyboard_key_down": [468, 137, 32, 32], "vkeyboard_disabled_key_down": [400, 137, 32, 32], "selector_right": [248, 223, 55, 62], "player-background": [2, 287, 103, 103], "selector_middle": [191, 223, 55, 62], "spinner": [235, 82, 29, 37], "tab_btn_disabled_pressed": [298, 137, 32, 32], "switch-button_disabled": [277, 291, 43, 32], "textinput_disabled_active": [372, 326, 64, 64], "splitter_grip": [36, 50, 12, 26], "vkeyboard_key_normal": [2, 44, 32, 32], "button_disabled": [80, 82, 29, 37], "media-playback-stop": [302, 171, 48, 48], "splitter": [501, 87, 7, 32], "splitter_down_h": [140, 123, 32, 7], "sliderh_background_disabled": [72, 132, 41, 37], "modalview-background": [464, 456, 45, 54], "button": [142, 82, 29, 37], "splitter_disabled": [502, 137, 7, 32], "checkbox_radio_disabled_on": [433, 87, 32, 32], "slider_cursor": [402, 171, 48, 48], "vkeyboard_disabled_background": [68, 221, 64, 64], "checkbox_disabled_on": [297, 87, 32, 32], "sliderv_background_disabled": [2, 78, 37, 41], "button_disabled_pressed": [111, 82, 29, 37], "audio-volume-muted": [102, 171, 48, 48], "close": [417, 231, 20, 20], "action_group_disabled": [452, 171, 33, 48], "vkeyboard_background": [2, 221, 64, 64], "checkbox_off": [331, 87, 32, 32], "tab_disabled": [305, 253, 96, 32], "sliderh_background": [115, 132, 41, 37], "switch-button": [322, 291, 43, 32], "tree_closed": [439, 231, 20, 20], "bubble_btn_pressed": [435, 291, 32, 32], "selector_left": [134, 223, 55, 62], "filechooser_file": [174, 326, 64, 64], "checkbox_radio_disabled_off": [399, 87, 32, 32], "checkbox_radio_on": [196, 137, 32, 32], "checkbox_on": [365, 87, 32, 32], "button_pressed": [173, 82, 29, 37], "audio-volume-high": [464, 406, 48, 48], "audio-volume-low": [2, 171, 48, 48], "progressbar": [305, 227, 32, 24], "previous_normal": [487, 187, 19, 32], "separator": [504, 342, 5, 48], "filechooser_folder": [240, 326, 64, 64], "checkbox_radio_off": [467, 87, 32, 32], "textinput_active": [306, 326, 64, 64], "textinput": [438, 326, 64, 64], "player-play-overlay": [122, 395, 117, 115], "media-playback-pause": [202, 171, 48, 48], "sliderv_background": [41, 78, 37, 41], "ring": [354, 402, 108, 108], "bubble_arrow": [487, 175, 16, 10], "slider_cursor_disabled": [352, 171, 48, 48], "checkbox_disabled_off": [469, 291, 32, 32], "action_group_down": [2, 121, 33, 48], "spinner_disabled": [204, 82, 29, 37], "splitter_disabled_h": [106, 123, 32, 7], "bubble": [107, 325, 65, 65], "media-playback-start": [252, 171, 48, 48], "vkeyboard_disabled_key_normal": [434, 137, 32, 32], "overflow": [230, 137, 32, 32], "tree_opened": [461, 231, 20, 20], "action_item": [339, 227, 24, 24], "bubble_btn": [401, 291, 32, 32], "audio-volume-medium": [52, 171, 48, 48], "action_group": [37, 121, 33, 48], "spinner_pressed": [266, 82, 29, 37], "filechooser_selected": [2, 392, 118, 118], "tab": [403, 253, 96, 32], "action_bar": [158, 133, 36, 36], "action_view": [365, 227, 24, 24], "tab_btn": [332, 137, 32, 32], "switch-background": [192, 291, 83, 32], "splitter_disabled_down_h": [72, 123, 32, 7], "action_item_down": [367, 291, 32, 32], "switch-background_disabled": [107, 291, 83, 32], "textinput_disabled": [241, 399, 111, 111], "splitter_grip_h": [483, 239, 26, 12]}} ================================================ FILE: gui/kivy/data/java-classes/org/electrum/qr/SimpleScannerActivity.java ================================================ package org.electrum.qr; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.content.Intent; import java.util.Arrays; import me.dm7.barcodescanner.zxing.ZXingScannerView; import com.google.zxing.Result; import com.google.zxing.BarcodeFormat; public class SimpleScannerActivity extends Activity implements ZXingScannerView.ResultHandler { private ZXingScannerView mScannerView; final String TAG = "org.electrum.SimpleScannerActivity"; @Override public void onCreate(Bundle state) { super.onCreate(state); mScannerView = new ZXingScannerView(this); // Programmatically initialize the scanner view mScannerView.setFormats(Arrays.asList(BarcodeFormat.QR_CODE)); setContentView(mScannerView); // Set the scanner view as the content view } @Override public void onResume() { super.onResume(); mScannerView.setResultHandler(this); // Register ourselves as a handler for scan results. mScannerView.startCamera(); // Start camera on resume } @Override public void onPause() { super.onPause(); mScannerView.stopCamera(); // Stop camera on pause } @Override public void handleResult(Result rawResult) { Intent resultIntent = new Intent(); resultIntent.putExtra("text", rawResult.getText()); resultIntent.putExtra("format", rawResult.getBarcodeFormat().toString()); setResult(Activity.RESULT_OK, resultIntent); this.finish(); } } ================================================ FILE: gui/kivy/data/style.kv ================================================ #:kivy 1.0