diff --git a/.deosrc b/.deosrc index 35a14d740..6284b8439 100644 --- a/.deosrc +++ b/.deosrc @@ -20,37 +20,3 @@ LIB := $(CURDIR)/lib OBJ := $(CURDIR)/obj/darwin SRC := $(CURDIR)/src TEST := $(CURDIR)/test -MACRO := $(INCLUDE)/.macro -VAULT := $(APP)/vault -VENV := $(CURDIR)/venv/darwin -FILES := $(wildcard $(LIB)/*.c) -TFILES := $(wildcard $(TEST)/*.c) -TBINS := $(patsubst $(TEST)/%,$(BIN)/darwin/%,$(TFILES:.c=.test)) -OBJECTS := $(patsubst $(LIB)/%,$(OBJ)/%,$(FILES:.c=.o)) -UI_GENERATED := $(VAULT)/src/ui_mainwindow.py\ - $(VAULT)/src/ui_addgroup_dialog.py\ - $(VAULT)/src/ui_trezor_passphrase_dialog.py\ - $(VAULT)/src/ui_add_password_dialog.py\ - $(VAULT)/src/ui_initialize_dialog.py\ - $(VAULT)/src/ui_enter_pin_dialog.py\ - $(VAULT)/src/ui_trezor_chooser_dialog.py -CC := clang -CFLAGS := -std=c89 -Wall -g -CEXE := $(BIN)/darwin/deos -CINCLUDE := -I$(VENV)/include/python2.7 -I$(MACRO) -CLINK := -lpython2.7 -CTARGET := $(SRC)/main.c -MKDIR := mkdir -NEWENV := virtualenv --always-copy --no-site-packages -PIP := pip -PYQT := ext/pyqt -RM := rm -rf -SETENV := source $(VENV)/bin/activate -DEOS := $(SETENV) && deos -QMAKE := /usr/local/Cellar/qt5/5.7.0/bin/qmake -REQUIRE := $(ETC)/python/requirements.txt -SIP := ext/sip -VIRTUAL := venv/darwin -XMCC := cd $(SRC) && python xmcc.py -XMOD := chmod +x - diff --git a/.git-crypt/.gitattributes b/.git-crypt/.gitattributes new file mode 100644 index 000000000..17ef6016c --- /dev/null +++ b/.git-crypt/.gitattributes @@ -0,0 +1,3 @@ +# Do not edit this file. To specify the files to encrypt, create your own +# .gitattributes file in the directory where your files are. +* !filter !diff diff --git a/.git-crypt/keys/default/0/111095C1F77FD92380BC99A6D9A845730F1067AA.gpg b/.git-crypt/keys/default/0/111095C1F77FD92380BC99A6D9A845730F1067AA.gpg new file mode 100644 index 000000000..d7093b567 Binary files /dev/null and b/.git-crypt/keys/default/0/111095C1F77FD92380BC99A6D9A845730F1067AA.gpg differ diff --git a/.gitattributes b/.gitattributes index 176a458f9..8daf3e786 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ * text=auto +*.key filter=git-crypt diff=git-crypt diff --git a/.gitignore b/.gitignore index e0b97f824..2132f77ac 100644 --- a/.gitignore +++ b/.gitignore @@ -8,27 +8,25 @@ app/vault/ui_*py *.pwdb #[dotfolders] -.backup/ +.DocumentRevisions-V100/ +.fseventsd/ +.TemporaryItems/ +.Trashes/ #[folders] app/vault/src/atdlib/ -bin/ etc/blockstack/* etc/zerotier/* ext/pyqt/ ext/sip/ include/.macro/ -obj/ node_modules/ src/atdlib/build/ tests/blockstack/integration/* -var/backup/* -var/log/deos/* -var/privkey/* -venv/ #[dotfiles] .DS_Store +.metadata_never_index .nvmrc #[files] diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..fbc157538 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,36 @@ +[submodule "app/bitcoin.sh"] + path = app/bitcoin.sh + url = https://github.com/0x47d/bitcoin.sh.git +[submodule "app/urbit.sh"] + path = app/urbit.sh + url = https://github.com/0x47d/urbit.sh.git +[submodule "app/code.news"] + path = app/code.news + url = https://github.com/0x47d/code.news.git +[submodule "app/freebird.im"] + path = app/freebird.im + url = https://github.com/0x47d/freebird.im.git +[submodule "app/urbit.news"] + path = app/urbit.news + url = https://github.com/0x47d/urbit.news.git +[submodule "var/wiki"] + path = var/wiki + url = https://github.com/0x47d/deos-wiki.git +[submodule "app/desantis.co"] + path = app/desantis.co + url = https://github.com/0x47d/desantis.co.git +[submodule "ext/git-crypt"] + path = ext/git-crypt + url = https://github.com/0x47d/git-crypt.git +[submodule "doc/bips"] + path = doc/bips + url = https://github.com/b17c01n/bips.git +[submodule "doc/macos-security-and-privacy"] + path = doc/macos-security-and-privacy + url = https://github.com/0x47d/macos-security-and-privacy.git +[submodule "doc/js-stack"] + path = doc/js-stack + url = https://github.com/0x47d/js-stack.git +[submodule "ext/urbit"] + path = ext/urbit + url = https://github.com/0x47d/urbit.git diff --git a/Makefile b/Makefile index c549a182a..ee37f9d82 100644 --- a/Makefile +++ b/Makefile @@ -1,111 +1,19 @@ include .deosrc -all: - @ $(MAKE) install - @ $(MAKE) run +all: init + @-echo "$@"; -atdlib: - @-rm -rf src/atdlib/build/ src/atdlib/atdlib/*.pyc - @-$(SETENV) && cd src/atdlib && python setup.py install - @-$(SETENV) && cd src/atdlib && python setup.py build - @-$(SETENV) && cd test && python main.py - @-rm -rf src/atdlib/atdlib/*.pyc - -help: - @ echo 'export PATH="$(BIN)/darwin:$(PATH)"' - -run: build - @ $(DEOS) - -build: $(OBJECTS) - @-$(XMCC) - @ $(CC) $(CFLAGS) -I$(INCLUDE) $(CINCLUDE) $(CTARGET) $(OBJECTS) \ - -o $(CEXE) $(CLINK) - @ $(XMOD) $(CEXE) - @ clear - -install: clean - @-$(MKDIR) $(BIN) $(BIN)/darwin $(EXT) $(INCLUDE) $(LIB) $(MACRO) - @ $(MAKE) $(VIRTUAL) - @ $(MAKE) $(SIP) - @ $(MAKE) $(PYQT) - @ clear - -uninstall: clean - @-$(RM) $(PYQT) $(SIP) $(VENV) - @ clear +init: clean + @-mkdir .DocumentRevisions-V100; + @-mkdir .fseventsd; + @-touch .fseventsd/no_log; + @-mkdir .TemporaryItems; + @-mkdir .Trashes; + @-touch .metadata_never_index; clean: - @-$(RM) $(CEXE)* $(MACRO)/*.def - @ clear - -freeze: - @ $(SETENV) && pip freeze > etc/python/requirements.txt - -tdd: - @-rm -rf app/tdd - @-$(SETENV) && cd app && django-admin.py startproject tdd && \ - cd tdd && python manage.py migrate && python manage.py runserver & - @-$(SETENV) && python $(TEST)/functional_tests.py - @-rm geckodriver.log - @-pkill -f firefox - @-kill `ps aux | grep 'manage.py runserver' | awk '{print $2}'` \ - >/dev/null 2>/dev/null - @-rm -rf app/tdd - -test: $(TBINS) - -$(BIN)/darwin/%.test: $(OBJECTS) - @#-rm docs/atdlib/$*.dot - @-clang -std=c89 -I$(INCLUDE) test/$*.c $(OBJECTS) -o bin/darwin/$*.test - @-$(XMOD) bin/darwin/$*.test - @-bin/darwin/$*.test - @-rm $(BIN)/darwin/*.test - @#dot -Tpng docs/atdlib/$*.dot > var/img/$*.png - -vault: $(UI_GENERATED) - @-rm $(VAULT)/src/*.pyc - @-rm -rf $(VAULT)/src/atdlib - @-mkdir $(VAULT)/src/atdlib - @-touch $(VAULT)/src/atdlib/__init__.py - @-cp $(SRC)/vault.py $(VAULT)/src/atdlib/vault.py - @-$(SETENV) && python $(VAULT)/src/vault.py - @-rm $(VAULT)/src/*.pyc - @-rm -rf $(VAULT)/src/atdlib - -vault.sdk: - @-$(SETENV) && python src/vault.py - -$(VAULT)/src/ui_%.py: $(VAULT)/view/%.ui - @-$(SETENV) && $(VENV)/bin/pyuic4 -o $@ $< - -$(OBJ)/%.o: $(LIB)/%.c $(INCLUDE)/%.h - @-rm $(OBJ)/$*.o - @ $(CC) -std=c89 -Wall -g -I$(INCLUDE) -c $(LIB)/$*.c -o $(OBJ)/$*.o - @ clear - -$(VIRTUAL): - @-$(MKDIR) venv $(VIRTUAL) - @ $(NEWENV) $(VENV) - @ $(SETENV) && $(PIP) install -r $(REQUIRE) - @ clear - -$(PYQT): - @ cp $(EXT)/.cache/PyQt-mac-gpl-4.11.4.tar.gz $(EXT)/pyqt.tar.gz - @ gunzip $(EXT)/pyqt.tar.gz && tar -xvf $(EXT)/pyqt.tar - @-$(RM) $(EXT)/pyqt.tar - @ mv PyQt-mac-gpl-4.11.4 $(EXT)/pyqt - @ $(SETENV) && cd $(EXT)/pyqt && \ - python configure-ng.py --confirm-license --qmake=$(QMAKE) && \ - make && make install - @ clear - -$(SIP): - @ cp $(EXT)/.cache/sip-4.18.1.tar.gz $(EXT)/sip.tar.gz - @ gunzip $(EXT)/sip.tar.gz && tar -xvf $(EXT)/sip.tar - @-$(RM) $(EXT)/sip.tar - @ mv sip-4.18.1 $(EXT)/sip - @ $(SETENV) && cd $(EXT)/sip && \ - python configure.py --incdir=$(VENV)/include/python2.7 && \ - make && make install - @ clear + @-rm -rf .DocumentRevisions-V100/; + @-rm -rf .fseventsd/; + @-rm -rf .TemporaryItems/; + @-rm -rf .Trashes/; + @-rm .metadata_never_index; diff --git a/README.md b/README.md index 4fe987729..2cbee15a3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# [ΔOS: Decentralized Operating System](https://www.desantis.io) | [![Build Status](https://travis-ci.org/DeSantisInc/DeOS.svg?branch=master)](https://travis-ci.org/DeSantisInc/DeOS) +# [DeOS: Decentralized Operating System](https://bitcoin.sh) | [![Build Status](https://travis-ci.org/DeSantisInc/DeOS.svg?branch=master)](https://travis-ci.org/DeSantisInc/DeOS) > *The languages of intelligence (writing) and self-interest (money) are the* > *mind's greatest creations; both must be decentralized or all is lost.* diff --git a/RELEASE.md b/RELEASE.md index 9d0d5fed2..f2a3580df 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,6 +1,15 @@ # Release Notes -## ΔOS v0.8-alpha.8 +## DeOS v0.1.2-atd.id.1 + +* WIP + +## DeOS v0.1.2-atd.id.0 + +* init-fork: `atd.id` +* fix: `travis-ci` + +## DeOS v0.8-alpha.8 * add-`atdlib`: `vault_module.c` * add-`atdlib`: `deos_module.c` diff --git a/app/bitcoin.sh b/app/bitcoin.sh new file mode 160000 index 000000000..3571a654d --- /dev/null +++ b/app/bitcoin.sh @@ -0,0 +1 @@ +Subproject commit 3571a654d379a5166af0829615a9a0f801947908 diff --git a/app/code.news b/app/code.news new file mode 160000 index 000000000..f23678a45 --- /dev/null +++ b/app/code.news @@ -0,0 +1 @@ +Subproject commit f23678a45af0d2cd635b6e1ec3d1b14c582acba6 diff --git a/app/desantis.co b/app/desantis.co new file mode 160000 index 000000000..7ddc2ef0a --- /dev/null +++ b/app/desantis.co @@ -0,0 +1 @@ +Subproject commit 7ddc2ef0ae77273071a68a94f0cc71d7849fd420 diff --git a/app/freebird.im b/app/freebird.im new file mode 160000 index 000000000..fa6eccc1f --- /dev/null +++ b/app/freebird.im @@ -0,0 +1 @@ +Subproject commit fa6eccc1f2a901ddc21a271ee214ddabb7afeaa2 diff --git a/app/urbit.news b/app/urbit.news new file mode 160000 index 000000000..528273403 --- /dev/null +++ b/app/urbit.news @@ -0,0 +1 @@ +Subproject commit 52827340377c82042a9d88017f8616580f9a19e5 diff --git a/app/urbit.sh b/app/urbit.sh new file mode 160000 index 000000000..8ceaff6b7 --- /dev/null +++ b/app/urbit.sh @@ -0,0 +1 @@ +Subproject commit 8ceaff6b704395a412939a5a7819b7f4ca362348 diff --git a/app/vault/src/backup.py b/app/vault/src/backup.py deleted file mode 100644 index 7e071f0fd..000000000 --- a/app/vault/src/backup.py +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -import cPickle - -from Crypto.PublicKey import RSA -from Crypto.Cipher import AES, PKCS1_OAEP -from Crypto import Random - -from encoding import Magic, Padding - -class Backup(object): - """ - Performs backup and restore for password storage. - """ - RSA_KEYSIZE = 2048 - SYMMETRIC_KEYSIZE = 32 - BLOCKSIZE = 16 - - def __init__(self, trezor): - """ - Create with no keys prepared. - - @param trezor: Trezor client object to use for encrypting private key - """ - self.encryptedPrivate = None # encrypted private key. - self.encryptedEphemeral = None # ephemeral key used to encrypt - # private RSA key. - self.ephemeralIv = None # IV used to encrypt private key with - # ephemeral key. - self.publicKey = None - self.trezor = trezor - - def generate(self): - """ - Generate key and encrypt private key. - """ - key = RSA.generate(self.RSA_KEYSIZE) - privateDer = key.exportKey(format="DER") - self.publicKey = key.publickey() - self.wrapPrivateKey(privateDer) - - def wrapPrivateKey(self, privateKey): - """ - Wrap serialized private key by encrypting it with trezor. - """ - # Trezor client won't allow to encrypt whole serialized RSA key - # in one go - it's too big. We need an ephemeral symmetric key - # and encrypt the small ephemeral with Trezor. - rng = Random.new() - ephemeral = rng.read(self.SYMMETRIC_KEYSIZE) - self.ephemeralIv = rng.read(self.BLOCKSIZE) - cipher = AES.new(ephemeral, AES.MODE_CBC, self.ephemeralIv) - padded = Padding(self.BLOCKSIZE).pad(privateKey) - self.encryptedPrivate = cipher.encrypt(padded) - self.encryptedEphemeral = self.trezor.encrypt_keyvalue( - Magic.backupNode, Magic.backupKey, ephemeral, - ask_on_encrypt=False, ask_on_decrypt=True) - - def unwrapPrivateKey(self): - """ - Decrypt private RSA key using self.encryptedEphemeral from - self.encryptedPrivate. Encrypted ephemeral key will be - decrypted with Trezor. - - @returns RSA private key as Crypto.RSA._RSAobj - """ - ephemeral = self.trezor.decrypt_keyvalue(Magic.backupNode, - Magic.backupKey, - self.encryptedEphemeral, - ask_on_encrypt=False, - ask_on_decrypt=True) - cipher = AES.new(ephemeral, AES.MODE_CBC, self.ephemeralIv) - padded = cipher.decrypt(self.encryptedPrivate) - privateDer = Padding(self.BLOCKSIZE).unpad(padded) - privateKey = RSA.importKey(privateDer) - return privateKey - - def serialize(self): - """ - Return object data as serialized string. - """ - publicDer = self.publicKey.exportKey(format="DER") - picklable = (self.ephemeralIv, - self.encryptedEphemeral, - self.encryptedPrivate, - publicDer) - return cPickle.dumps(picklable, cPickle.HIGHEST_PROTOCOL) - - def deserialize(self, serialized): - """ - Set object data from serialized string - """ - unpickled = cPickle.loads(serialized) - (self.ephemeralIv, - self.encryptedEphemeral, - self.encryptedPrivate, - publicDer) = unpickled - self.publicKey = RSA.importKey(publicDer) - - def encryptPassword(self, password): - """ - Encrypt password with RSA under OAEP padding and return it. - Password must be shorter than modulus length minus padding - length. - """ - cipher = PKCS1_OAEP.new(self.publicKey) - encrypted = cipher.encrypt(password) - return encrypted - - def decryptPassword(self, encryptedPassword, privateKey): - """ - Decrypt RSA-OAEP encrypted password. - """ - cipher = PKCS1_OAEP.new(privateKey) - password = cipher.decrypt(encryptedPassword) - return password diff --git a/app/vault/src/dialogs.py b/app/vault/src/dialogs.py deleted file mode 100644 index 005d511d6..000000000 --- a/app/vault/src/dialogs.py +++ /dev/null @@ -1,176 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -from PyQt4 import QtGui, QtCore - -from ui_addgroup_dialog import Ui_AddGroupDialog -from ui_trezor_passphrase_dialog import Ui_TrezorPassphraseDialog -from ui_add_password_dialog import Ui_AddPasswordDialog -from ui_initialize_dialog import Ui_InitializeDialog -from ui_enter_pin_dialog import Ui_EnterPinDialog -from ui_trezor_chooser_dialog import Ui_TrezorChooserDialog - -class AddGroupDialog(QtGui.QDialog, Ui_AddGroupDialog): - - def __init__(self, groups): - QtGui.QDialog.__init__(self) - self.setupUi(self) - self.newGroupEdit.textChanged.connect(self.validate) - self.groups = groups - # disabled for empty string - button = self.buttonBox.button(QtGui.QDialogButtonBox.Ok) - button.setEnabled(False) - - def newGroupName(self): - return self.newGroupEdit.text() - - def validate(self): - """ - Validates input if name is not empty and - is different from existing group names. - """ - valid = True - text = self.newGroupEdit.text() - if text.isEmpty(): - valid = False - if unicode(text).encode("utf-8") in self.groups: - valid = False - button = self.buttonBox.button(QtGui.QDialogButtonBox.Ok) - button.setEnabled(valid) - -class TrezorPassphraseDialog(QtGui.QDialog, Ui_TrezorPassphraseDialog): - - def __init__(self): - QtGui.QDialog.__init__(self) - self.setupUi(self) - - def passphrase(self): - return self.passphraseEdit.text() - -class AddPasswordDialog(QtGui.QDialog, Ui_AddPasswordDialog): - - def __init__(self): - QtGui.QDialog.__init__(self) - self.setupUi(self) - self.pwEdit1.textChanged.connect(self.validatePw) - self.pwEdit2.textChanged.connect(self.validatePw) - self.showHideButton.clicked.connect(self.switchPwVisible) - - def key(self): - return self.keyEdit.text() - - def pw1(self): - return self.pwEdit1.text() - - def pw2(self): - return self.pwEdit2.text() - - def validatePw(self): - same = self.pw1() == self.pw2() - button = self.buttonBox.button(QtGui.QDialogButtonBox.Ok) - button.setEnabled(same) - - def switchPwVisible(self): - pwMode = self.pwEdit1.echoMode() - if pwMode == QtGui.QLineEdit.Password: - newMode = QtGui.QLineEdit.Normal - else: - newMode = QtGui.QLineEdit.Password - - self.pwEdit1.setEchoMode(newMode) - self.pwEdit2.setEchoMode(newMode) - -class InitializeDialog(QtGui.QDialog, Ui_InitializeDialog): - - def __init__(self): - QtGui.QDialog.__init__(self) - self.setupUi(self) - self.masterEdit1.textChanged.connect(self.validate) - self.masterEdit2.textChanged.connect(self.validate) - self.pwFileEdit.textChanged.connect(self.validate) - self.pwFileButton.clicked.connect(self.selectPwFile) - self.validate() - - def pw1(self): - return self.masterEdit1.text() - - def pw2(self): - return self.masterEdit2.text() - - def pwFile(self): - return self.pwFileEdit.text() - - def validate(self): - """ - Enable OK button only if both master and backup are repeated - without typo and some password file is selected. - """ - same = self.pw1() == self.pw2() - fileSelected = not self.pwFileEdit.text().isEmpty() - button = self.buttonBox.button(QtGui.QDialogButtonBox.Ok) - button.setEnabled(same and fileSelected) - - def selectPwFile(self): - """ - Show file dialog and return file user chose to store the - encrypted password database. - """ - path = QtCore.QDir.currentPath() - dialog = QtGui.QFileDialog(self, "Select password database file", - path, "(*.pwdb)") - dialog.setAcceptMode(QtGui.QFileDialog.AcceptSave) - - res = dialog.exec_() - if not res: - return - - fname = dialog.selectedFiles()[0] - self.pwFileEdit.setText(fname) - -class EnterPinDialog(QtGui.QDialog, Ui_EnterPinDialog): - - def __init__(self): - QtGui.QDialog.__init__(self) - self.setupUi(self) - self.pb1.clicked.connect(self.pinpadPressed) - self.pb2.clicked.connect(self.pinpadPressed) - self.pb3.clicked.connect(self.pinpadPressed) - self.pb4.clicked.connect(self.pinpadPressed) - self.pb5.clicked.connect(self.pinpadPressed) - self.pb6.clicked.connect(self.pinpadPressed) - self.pb7.clicked.connect(self.pinpadPressed) - self.pb8.clicked.connect(self.pinpadPressed) - self.pb9.clicked.connect(self.pinpadPressed) - - def pin(self): - return self.pinEdit.text() - - def pinpadPressed(self): - sender = self.sender() - objName = sender.objectName() - digit = objName[-1] - self.pinEdit.setText(self.pinEdit.text() + digit) - -class TrezorChooserDialog(QtGui.QDialog, Ui_TrezorChooserDialog): - - def __init__(self, deviceMap): - """ - Create dialog and fill it with labels from deviceMap - @param deviceMap: dict device string -> device label - """ - QtGui.QDialog.__init__(self) - self.setupUi(self) - - for deviceStr, label in deviceMap.items(): - item = QtGui.QListWidgetItem(label) - item.setData(QtCore.Qt.UserRole, QtCore.QVariant(deviceStr)) - self.trezorList.addItem(item) - self.trezorList.setCurrentRow(0) - - def chosenDeviceStr(self): - """ - Returns device string of chosen Trezor - """ - itemData = self.trezorList.currentItem().data(QtCore.Qt.UserRole) - deviceStr = str(itemData.toString()) - return deviceStr diff --git a/app/vault/src/encoding.py b/app/vault/src/encoding.py deleted file mode 100644 index 671dde81a..000000000 --- a/app/vault/src/encoding.py +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -import struct - -from PyQt4 import QtCore - -def q2s(s): - """ - Convert QString to UTF-8 string object - """ - return str(s.toUtf8()) - -def s2q(s): - """ - Convert UTF-8 encoded string to QString - """ - return QtCore.QString.fromUtf8(s) - -class Magic(object): - """ - Few magic constant definitions so that we know which nodes to search - for keys. - """ - u = lambda fmt, s: struct.unpack(fmt, s)[0] - headerStr = "TZPW" - hdr = u("!I", headerStr) - unlockNode = [hdr, u("!I", "ULCK")] # for unlocking wrapped AES-CBC key. - groupNode = [hdr, u("!I", "GRUP")] # for generating keys for individual - # password groups. - # the unlock and backup key is written - # in this weird way to fit display - # nicely. - unlockKey = "Decrypt master key?" # string to derive wrapping key from. - backupNode = [hdr, u("!I", "BKUP")] # for unlocking wrapped backup private - # RSA key. - backupKey = "Decrypt backup key?" # string to derive backup wrapping key - # from. - -class Padding(object): - """ - PKCS#7 Padding for block cipher having 16-byte blocks - """ - def __init__(self, blocksize): - self.blocksize = blocksize - def pad(self, s): - BS = self.blocksize - return s + (BS - len(s) % BS) * chr(BS - len(s) % BS) - def unpad(self, s): - return s[0:-ord(s[-1])] diff --git a/app/vault/src/vault.py b/app/vault/src/vault.py deleted file mode 100755 index 893627046..000000000 --- a/app/vault/src/vault.py +++ /dev/null @@ -1,545 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -import csv -import os.path -import sys - -from PyQt4 import QtCore -from PyQt4 import QtGui -from Crypto import Random - -from trezorlib import messages_pb2 as proto -from trezorlib.client import BaseClient -from trezorlib.client import CallException -from trezorlib.client import PinException -from trezorlib.client import ProtocolMixin -from trezorlib.transport import ConnectionError -from trezorlib.transport_hid import HidTransport - -from backup import Backup -from dialogs import AddGroupDialog -from dialogs import TrezorPassphraseDialog -from dialogs import AddPasswordDialog -from dialogs import InitializeDialog -from dialogs import EnterPinDialog -from dialogs import TrezorChooserDialog -from encoding import q2s -from encoding import s2q - -from atdlib.vault import DeOS_VAULT_CACHE_INDEX -from atdlib.vault import DeOS_VAULT_KEY_INDEX -from atdlib.vault import DeOS_VAULT_PASSWD_INDEX -from atdlib.vault import DeOS_PasswordMap -from atdlib.vault import DeOS_Vault -from atdlib.vault import DeOS_VaultSettings -from atdlib.vault import DeOS_Trezor -from atdlib.vault import DeOS_TrezorClient - -from ui_mainwindow import Ui_MainWindow - -class MainWindow(DeOS_Vault, Ui_MainWindow): - """ - Main window for the application with groups, and password lists. - """ - KEY_IDX = DeOS_VAULT_KEY_INDEX - PASSWORD_IDX = DeOS_VAULT_PASSWD_INDEX - CACHE_IDX = DeOS_VAULT_CACHE_INDEX - - def __init__(self, passwds, database): - """ - @param passwds: a PasswordMap instance w/ encrypted passwords - @param database: file name for saving pwMap - """ - DeOS_Vault.__init__(self, passwds, database) - self.groupsTree.setModel(self.groupsFilter) - self.groupsTree.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) - self.groupsTree.customContextMenuRequested.connect(self.showGroupsContextMenu) - self.groupsTree.clicked.connect(self.loadPasswordsBySelection) - self.groupsTree.selectionModel().selectionChanged.connect(self.loadPasswordsBySelection) - self.groupsTree.setSortingEnabled(True) - self.passwordTable.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) - self.passwordTable.customContextMenuRequested.connect(self.showPasswdContextMenu) - self.passwordTable.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows) - self.passwordTable.setSelectionMode(QtGui.QAbstractItemView.SingleSelection) - # Shortcut - shortcut = QtGui.QShortcut(QtGui.QKeySequence("Ctrl+C"), self.passwordTable, self.copyPasswordFromSelection) - shortcut.setContext(QtCore.Qt.WidgetShortcut) - # Action Triggers - self.actionQuit.triggered.connect(self.close) - self.actionBackup.triggered.connect(self.saveBackup) - self.actionSave.triggered.connect(self.saveDatabase) - self.actionSave.setShortcut(QtGui.QKeySequence("Ctrl+S")) - # Header Key/Value Items - headerKey = QtGui.QTableWidgetItem("Key"); - headerValue = QtGui.QTableWidgetItem("Value"); - # Password Table - self.passwordTable.setColumnCount(2) - self.passwordTable.setHorizontalHeaderItem(self.KEY_IDX, headerKey) - self.passwordTable.setHorizontalHeaderItem(self.PASSWORD_IDX, headerValue) - # Search Edit - self.searchEdit.textChanged.connect(self.filterGroups) - # Groups - groupNames = self.pwMap.groups.keys() - for groupName in groupNames: - item = QtGui.QStandardItem(s2q(groupName)) - self.groupsModel.appendRow(item) - # Groups Tree - self.groupsTree.sortByColumn(0, QtCore.Qt.AscendingOrder) - - def setModified(self, modified): - """ - Sets the modified flag so that user is notified when exiting - with unsaved changes. - """ - self._set_modified(modified) - self.setWindowTitle(self._get_window_title(modified)) - - def showGroupsContextMenu(self, point): - """ - Show context menu for group management. - @param point: point in self.groupsTree where click occured - """ - self.addGroupMenu = QtGui.QMenu(self) - newGroupAction = QtGui.QAction('Add group', self) - deleteGroupAction = QtGui.QAction('Delete group', self) - self.addGroupMenu.addAction(newGroupAction) - self.addGroupMenu.addAction(deleteGroupAction) - # disable deleting if no point is clicked on - proxyIdx = self.groupsTree.indexAt(point) - itemIdx = self.groupsFilter.mapToSource(proxyIdx) - item = self.groupsModel.itemFromIndex(itemIdx) - if item is None: - deleteGroupAction.setEnabled(False) - action = self.addGroupMenu.exec_(self.groupsTree.mapToGlobal(point)) - if action == newGroupAction: - self.createGroup() - elif action == deleteGroupAction: - self.deleteGroup(item) - - def showPasswdContextMenu(self, point): - """ - Show context menu for password management. - @param point: point in self.passwordTable where click occured - """ - self.passwdMenu = QtGui.QMenu(self) - showPasswordAction = QtGui.QAction('Show password', self) - copyPasswordAction = QtGui.QAction('Copy password', self) - copyPasswordAction.setShortcut(QtGui.QKeySequence( "Ctrl+C")) - newItemAction = QtGui.QAction('New item', self) - deleteItemAction = QtGui.QAction('Delete item', self) - editItemAction = QtGui.QAction('Edit item', self) - self.passwdMenu.addAction(showPasswordAction) - self.passwdMenu.addAction(copyPasswordAction) - self.passwdMenu.addSeparator() - self.passwdMenu.addAction(newItemAction) - self.passwdMenu.addAction(deleteItemAction) - self.passwdMenu.addAction(editItemAction) - # disable creating if no group is selected - if self.selectedGroup is None: - newItemAction.setEnabled(False) - # disable deleting if no point is clicked on - item = self.passwordTable.itemAt(point.x(), point.y()) - if item is None: - deleteItemAction.setEnabled(False) - showPasswordAction.setEnabled(False) - copyPasswordAction.setEnabled(False) - editItemAction.setEnabled(False) - action = self.passwdMenu.exec_(self.passwordTable.mapToGlobal(point)) - if action == newItemAction: - self.createPassword() - elif action == deleteItemAction: - self.deletePassword(item) - elif action == showPasswordAction: - self.showPassword(item) - elif action == editItemAction: - self.editPassword(item) - elif action == copyPasswordAction: - self.copyPasswordFromItem(item) - - def createGroup(self): - """ - Slot to create a password group. - """ - dialog = AddGroupDialog(self.pwMap.groups) - if not dialog.exec_(): - return - groupName = dialog.newGroupName() - newItem = QtGui.QStandardItem(groupName) - self.groupsModel.appendRow(newItem) - self.pwMap.addGroup(q2s(groupName)) - # make new item selected to save a few clicks - itemIdx = self.groupsModel.indexFromItem(newItem) - proxyIdx = self.groupsFilter.mapFromSource(itemIdx) - self.groupsTree.selectionModel().select(proxyIdx, - QtGui.QItemSelectionModel.ClearAndSelect | QtGui.QItemSelectionModel.Rows) - self.groupsTree.sortByColumn(0, QtCore.Qt.AscendingOrder) - # Make item's passwords loaded so new key-value entries can be created - # right away - better from UX perspective. - self.loadPasswords(newItem) - self.setModified(True) - - def deleteGroup(self, item): - msgBox = QtGui.QMessageBox(text="Are you sure about delete?") - msgBox.setStandardButtons(QtGui.QMessageBox.Yes | QtGui.QMessageBox.No) - res = msgBox.exec_() - if res != QtGui.QMessageBox.Yes: - return - name = q2s(item.text()) - self.selectedGroup = None - del self.pwMap.groups[name] - itemIdx = self.groupsModel.indexFromItem(item) - self.groupsModel.takeRow(itemIdx.row()) - self.passwordTable.setRowCount(0) - self.groupsTree.clearSelection() - self.setModified(True) - - def deletePassword(self, item): - msgBox = QtGui.QMessageBox(text="Are you sure about delete?") - msgBox.setStandardButtons(QtGui.QMessageBox.Yes | QtGui.QMessageBox.No) - res = msgBox.exec_() - if res != QtGui.QMessageBox.Yes: - return - row = self.passwordTable.row(item) - self.passwordTable.removeRow(row) - group = self.pwMap.groups[self.selectedGroup] - group.removeEntry(row) - - self.passwordTable.resizeRowsToContents() - self.setModified(True) - - def cachePassword(self, row, password): - """ - Cache decrypted password for group and row. Cached items are - keps as data of QTableWidgetItem so that deletion invalidates - cache. Cache applies to currently selectedGroup. Switching - between groups clears the table and thus invalidates cached - passwords. - """ - item = self.passwordTable.item(row, MainWindow.CACHE_IDX) - item.setData(QtCore.Qt.UserRole, QtCore.QVariant(s2q(password))) - - def cachedPassword(self, row): - """ - Retrieve cached password for given row of currently - selected group. Returns password as string or None - if no password cached. - """ - item = self.passwordTable.item(row, MainWindow.CACHE_IDX) - cached = item.data(QtCore.Qt.UserRole) - if cached.isValid(): - return q2s(cached.toString()) - return None - - def cachedOrDecrypt(self, row): - """ - Try retrieving cached password for item in given row, - otherwise decrypt with Trezor. - """ - cached = self.cachedPassword(row) - if cached is not None: - return cached - else: # decrypt with Trezor - group = self.pwMap.groups[self.selectedGroup] - pwEntry = group.entry(row) - encPw = pwEntry[1] - decrypted = self.pwMap.decryptPassword(encPw, self.selectedGroup) - return decrypted - - def showPassword(self, item): - # check if this password has been decrypted, - # use cached version - row = self.passwordTable.row(item) - try: - decrypted = self.cachedOrDecrypt(row) - except CallException: - return - item = QtGui.QTableWidgetItem(s2q(decrypted)) - self.cachePassword(row, decrypted) - self.passwordTable.setItem(row, self.PASSWORD_IDX, item) - - def createPassword(self): - """ - Slot to create key-value password entry. - """ - if self.selectedGroup is None: - return - group = self.pwMap.groups[self.selectedGroup] - dialog = AddPasswordDialog() - if not dialog.exec_(): - return - rowCount = self.passwordTable.rowCount() - self.passwordTable.setRowCount(rowCount+1) - item = QtGui.QTableWidgetItem(dialog.key()) - pwItem = QtGui.QTableWidgetItem("*****") - self.passwordTable.setItem(rowCount, self.KEY_IDX, item) - self.passwordTable.setItem(rowCount, self.PASSWORD_IDX, pwItem) - plainPw = q2s(dialog.pw1()) - encPw = self.pwMap.encryptPassword(plainPw, self.selectedGroup) - bkupPw = self.pwMap.backupKey.encryptPassword(plainPw) - group.addEntry(q2s(dialog.key()), encPw, bkupPw) - self.cachePassword(rowCount, plainPw) - self.passwordTable.resizeRowsToContents() - self.setModified(True) - - def editPassword(self, item): - row = self.passwordTable.row(item) - group = self.pwMap.groups[self.selectedGroup] - try: - decrypted = self.cachedOrDecrypt(row) - except CallException: - return - dialog = AddPasswordDialog() - entry = group.entry(row) - dialog.keyEdit.setText(s2q(entry[0])) - dialog.pwEdit1.setText(s2q(decrypted)) - dialog.pwEdit2.setText(s2q(decrypted)) - if not dialog.exec_(): - return - item = QtGui.QTableWidgetItem(dialog.key()) - pwItem = QtGui.QTableWidgetItem("*****") - self.passwordTable.setItem(row, self.KEY_IDX, item) - self.passwordTable.setItem(row, self.PASSWORD_IDX, pwItem) - plainPw = q2s(dialog.pw1()) - encPw = self.pwMap.encryptPassword(plainPw, self.selectedGroup) - bkupPw = self.pwMap.backupKey.encryptPassword(plainPw) - group.updateEntry(row, q2s(dialog.key()), encPw, bkupPw) - self.cachePassword(row, plainPw) - self.setModified(True) - - def copyPasswordFromSelection(self): - """ - Copy selected password to clipboard. Password is decrypted if - necessary. - """ - indexes = self.passwordTable.selectedIndexes() - if not indexes: - return - #there will be more indexes as the selection is on a row - row = indexes[0].row() - item = self.passwordTable.item(row, 1) - self.copyPasswordFromItem(item) - - def copyPasswordFromItem(self, item): - row = self.passwordTable.row(item) - try: - decrypted = self.cachedOrDecrypt(row) - except CallException: - return - clipboard = QtGui.QApplication.clipboard() - clipboard.setText(s2q(decrypted)) - self.cachePassword(row, decrypted) - - def loadPasswords(self, item): - """ - Slot that should load items for group that has been clicked on. - """ - #self.passwordTable.clear() - name = q2s(item.text()) - self.selectedGroup = name - group = self.pwMap.groups[name] - self.passwordTable.setRowCount(len(group.entries)) - self.passwordTable.setColumnCount(2) - i = 0 - for key, encValue, bkupValue in group.entries: - item = QtGui.QTableWidgetItem(s2q(key)) - pwItem = QtGui.QTableWidgetItem("*****") - self.passwordTable.setItem(i, self.KEY_IDX, item) - self.passwordTable.setItem(i, self.PASSWORD_IDX, pwItem) - i = i+1 - self.passwordTable.resizeRowsToContents() - - def loadPasswordsBySelection(self): - proxyIdx = self.groupsTree.currentIndex() - itemIdx = self.groupsFilter.mapToSource(proxyIdx) - selectedItem = self.groupsModel.itemFromIndex(itemIdx) - if not selectedItem: - return - self.loadPasswords(selectedItem) - - def filterGroups(self, substring): - """ - Filter groupsTree view to have items containing given substring. - """ - self.groupsFilter.setFilterFixedString(substring) - self.groupsTree.sortByColumn(0, QtCore.Qt.AscendingOrder) - - def saveBackup(self): - """ - Uses backup key encrypted by Trezor to decrypt all - passwords at once and export them. Export format is - CSV: group, key, password - """ - dialog = QtGui.QFileDialog(self, - "Select backup export file", - "", "CVS files (*.csv)") - dialog.setAcceptMode(QtGui.QFileDialog.AcceptSave) - res = dialog.exec_() - if not res: - return - fname = q2s(dialog.selectedFiles()[0]) - backupKey = self.pwMap.backupKey - try: - privateKey = backupKey.unwrapPrivateKey() - except CallException: - return - with file(fname, "w") as f: - csv.register_dialect("escaped", doublequote=False, escapechar='\\') - writer = csv.writer(f, dialect="escaped") - sortedGroupNames = sorted(self.pwMap.groups.keys()) - for groupName in sortedGroupNames: - group = self.pwMap.groups[groupName] - for entry in group.entries: - key, _, bkupPw = entry - password = backupKey.decryptPassword(bkupPw, privateKey) - csvEntry = (groupName, key, password) - writer.writerow(csvEntry) - - def saveDatabase(self): - """ - Save main database file. - """ - self.pwMap.save(self.dbFilename) - self.setModified(False) - - def closeEvent(self, event): - if self.modified: - msgBox = QtGui.QMessageBox( - text="Password database is modified. Save on exit?") - msgBox.setStandardButtons(QtGui.QMessageBox.Yes | - QtGui.QMessageBox.No | QtGui.QMessageBox.Cancel ) - reply = msgBox.exec_() - if not reply or reply == QtGui.QMessageBox.Cancel: - event.ignore() - return - elif reply == QtGui.QMessageBox.Yes: - self.saveDatabase() - event.accept() - -class TrezorChooser(DeOS_Trezor): - """ - Class for working with Trezor device via HID - """ - def __init__(self): - DeOS_Trezor.__init__(self) - - def getDevice(self): - """ - Get one from available devices. Widget will be shown if more - devices are available. - """ - devices = self._get_devices() - if not devices: - return None - transport = self.chooseDevice(devices) - client = DeOS_TrezorClient(transport) - return client - - def chooseDevice(self, devices): - """ - Choose device from enumerated list. If there's only one Trezor, - that will be chosen. - - If there are multiple Trezors, diplays a widget with list - of Trezor devices to choose from. - - @returns HidTransport object of selected device - """ - if not len(devices): - raise RuntimeError("No Trezor connected!") - if len(devices) == 1: - try: - return HidTransport(devices[0]) - except IOError: - raise RuntimeError("Trezor is currently in use") - # maps deviceId string to device label - deviceMap = {} - for device in devices: - try: - transport = HidTransport(device) - client = DeOS_TrezorClient(transport) - label = client.features.label and client.features.label or "" - client.close() - - deviceMap[device[0]] = label - except IOError: - # device in use, do not offer as choice - continue - if not deviceMap: - raise RuntimeError("All connected Trezors are in use!") - dialog = TrezorChooserDialog(deviceMap) - if not dialog.exec_(): - sys.exit(9) - deviceStr = dialog.chosenDeviceStr() - return HidTransport([deviceStr, None]) - -def initializeStorage(trezor, pwMap, settings): - """ - Initialize new encrypted password file, ask for master passphrase. - Initialize RSA keypair for backup, encrypt private RSA key using - backup passphrase and Trezor's cipher-key-value system. Makes sure - a session is created on Trezor so that the passphrase will be cached - until disconnect. - - @param trezor: Trezor client - @param pwMap: PasswordMap where to put encrypted backupKeys - @param settings: Settings object to store password database location - """ - dialog = InitializeDialog() - if not dialog.exec_(): - sys.exit(4) - masterPassphrase = q2s(dialog.pw1()) - trezor.prefillPassphrase(masterPassphrase) - backup = Backup(trezor) - backup.generate() - pwMap.backupKey = backup - settings.dbFilename = q2s(dialog.pwFile()) - settings.store() - -def main(): - app = QtGui.QApplication(sys.argv) - try: - trezorChooser = TrezorChooser() - trezor = trezorChooser.getDevice() - except (ConnectionError, RuntimeError), e: - msgText = "Connection to Trezor failed: " + e.message - msgBox = QtGui.QMessageBox(text=msgText) - msgBox.exec_() - sys.exit(1) - if trezor is None: - msgText = "No available Trezor found, quitting." - msgBox = QtGui.QMessageBox(text=msgText) - msgBox.exec_() - sys.exit(1) - trezor.clear_session() - # print "label:", trezor.features.label - pwMap = DeOS_PasswordMap(trezor) - settings = DeOS_VaultSettings() - if settings.dbFilename and os.path.isfile(settings.dbFilename): - try: - pwMap.load(settings.dbFilename) - except PinException: - msgBox = QtGui.QMessageBox(text="Invalid PIN") - msgBox.exec_() - sys.exit(8) - except CallException: - # button cancel on Trezor, so exit - sys.exit(6) - except Exception, e: - msgText = "Could not decrypt passwords: " + e.message - msgBox = QtGui.QMessageBox(text=msgText) - msgBox.exec_() - sys.exit(5) - else: - initializeStorage(trezor, pwMap, settings) - rng = Random.new() - pwMap.outerIv = rng.read(DeOS_PasswordMap.BLOCKSIZE) - pwMap.outerKey = rng.read(DeOS_PasswordMap.KEYSIZE) - pwMap.encryptedBackupKey = "" - mainWindow = MainWindow(pwMap, settings.dbFilename) - mainWindow.show() - retCode = app.exec_() - sys.exit(retCode) - -if __name__ == "__main__": - main() diff --git a/app/vault/vault.pro b/app/vault/vault.pro deleted file mode 100644 index 99e79e100..000000000 --- a/app/vault/vault.pro +++ /dev/null @@ -1,14 +0,0 @@ -QT += core\ - gui -TARGET = vault -TEMPLATE = app -SOURCES += main.cpp\ - mainwindow.cpp -HEADERS += mainwindow.h -FORMS += mainwindow.ui\ - addgroup_dialog.ui\ - trezor_passphrase_dialog.ui\ - add_password_dialog.ui\ - initialize_dialog.ui\ - enter_pin_dialog.ui\ - trezor_chooser_dialog.ui diff --git a/app/vault/view/add_password_dialog.ui b/app/vault/view/add_password_dialog.ui deleted file mode 100644 index b988faffa..000000000 --- a/app/vault/view/add_password_dialog.ui +++ /dev/null @@ -1,152 +0,0 @@ - - - AddPasswordDialog - - - - 0 - 0 - 400 - 266 - - - - Add/edit password - - - - - - Key - - - - - - - 64 - - - - - - - Password/value - - - - - - - 64 - - - QLineEdit::Password - - - - - - - Repeat password/value - - - - - - - - - - 64 - - - QLineEdit::Password - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Show/hide - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - AddPasswordDialog - accept() - - - 257 - 239 - - - 157 - 274 - - - - - buttonBox - rejected() - AddPasswordDialog - reject() - - - 325 - 239 - - - 286 - 274 - - - - - diff --git a/app/vault/view/addgroup_dialog.ui b/app/vault/view/addgroup_dialog.ui deleted file mode 100644 index 34681b411..000000000 --- a/app/vault/view/addgroup_dialog.ui +++ /dev/null @@ -1,91 +0,0 @@ - - - AddGroupDialog - - - - 0 - 0 - 415 - 111 - - - - Add new group - - - - - - Name of new group - - - - - - - 64 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - AddGroupDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - AddGroupDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/app/vault/view/enter_pin_dialog.ui b/app/vault/view/enter_pin_dialog.ui deleted file mode 100644 index 16e545992..000000000 --- a/app/vault/view/enter_pin_dialog.ui +++ /dev/null @@ -1,170 +0,0 @@ - - - EnterPinDialog - - - - 0 - 0 - 359 - 300 - - - - Enter PIN - - - - - - Enter PIN - - - - - - - 20 - - - 20 - - - 40 - - - 20 - - - - - ? - - - - - - - ? - - - - - - - ? - - - - - - - QLineEdit::Password - - - - - - - ? - - - - - - - ? - - - - - - - ? - - - - - - - ? - - - - - - - ? - - - - - - - ? - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - pinEdit - pb8 - pb9 - buttonBox - pb7 - pb4 - pb5 - pb6 - pb1 - pb2 - pb3 - - - - - buttonBox - accepted() - EnterPinDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - EnterPinDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/app/vault/view/initialize_dialog.ui b/app/vault/view/initialize_dialog.ui deleted file mode 100644 index 1ae061d4d..000000000 --- a/app/vault/view/initialize_dialog.ui +++ /dev/null @@ -1,129 +0,0 @@ - - - InitializeDialog - - - - 0 - 0 - 400 - 378 - - - - Initialize master passphrase - - - - - - Qt::NoFocus - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This is initialization step of TrezorPass. You need to choose master passphrase that will be used to unlock passwords encrypted with the device.</p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The passphrase is used to derive keys along with secret seed inside Trezor. If forgotten, there's only bruteforcing left.</p></body></html> - - - - - - - Password database file - - - - - - - - - - - - Select... - - - - - - - - - Master passphrase - - - - - - - QLineEdit::Password - - - - - - - Repeat master passphrase - - - - - - - QLineEdit::Password - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - InitializeDialog - accept() - - - 257 - 487 - - - 157 - 274 - - - - - buttonBox - rejected() - InitializeDialog - reject() - - - 325 - 487 - - - 286 - 274 - - - - - diff --git a/app/vault/view/mainwindow.ui b/app/vault/view/mainwindow.ui deleted file mode 100644 index 7898bedf3..000000000 --- a/app/vault/view/mainwindow.ui +++ /dev/null @@ -1,157 +0,0 @@ - - - MainWindow - - - - 0 - 0 - 1030 - 785 - - - - - 0 - 0 - - - - Vault - - - - - - - - - true - - - - 0 - 0 - - - - Search - - - - - - - - 0 - 0 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Qt::Horizontal - - - - - 0 - 0 - - - - Groups - - - - - - - - - - Passwords - - - - - - QAbstractItemView::NoEditTriggers - - - false - - - - - - - - - - - - - 0 - 0 - 1030 - 28 - - - - - File - - - - - - - - - - - TopToolBarArea - - - false - - - - - - Backup/Export - - - - - Quit - - - - - Save database - - - - - - - diff --git a/app/vault/view/trezor_chooser_dialog.ui b/app/vault/view/trezor_chooser_dialog.ui deleted file mode 100644 index 8022db69a..000000000 --- a/app/vault/view/trezor_chooser_dialog.ui +++ /dev/null @@ -1,74 +0,0 @@ - - - TrezorChooserDialog - - - - 0 - 0 - 400 - 300 - - - - Choose Trezor to use - - - - - - Choose Trezor to use - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - TrezorChooserDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - TrezorChooserDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/app/vault/view/trezor_passphrase_dialog.ui b/app/vault/view/trezor_passphrase_dialog.ui deleted file mode 100644 index 7c53b565b..000000000 --- a/app/vault/view/trezor_passphrase_dialog.ui +++ /dev/null @@ -1,91 +0,0 @@ - - - TrezorPassphraseDialog - - - - 0 - 0 - 400 - 133 - - - - Dialog - - - - - - Enter passphrase for Trezor: - - - - - - - QLineEdit::Password - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - TrezorPassphraseDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - TrezorPassphraseDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff --git a/app/wallet/.gitignore b/app/wallet/.gitignore deleted file mode 100644 index 91c873b1e..000000000 --- a/app/wallet/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -####-*.patch -*.pyc -*.swp -build/ -dist/ -*.egg/ -/electrum.py -contrib/pyinstaller/ -Electrum.egg-info/ -gui/qt/icons_rc.py -locale/ -.devlocaltmp/ -*_trial_temp -packages -env/ -.tox/ -.buildozer/ -bin/ diff --git a/app/wallet/.travis.yml b/app/wallet/.travis.yml deleted file mode 100644 index e295adab6..000000000 --- a/app/wallet/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -sudo: false -language: python -python: - - "2.7" -install: - - pip install tox -script: - - tox diff --git a/app/wallet/AUTHORS b/app/wallet/AUTHORS deleted file mode 100644 index 0a938ec3e..000000000 --- a/app/wallet/AUTHORS +++ /dev/null @@ -1,12 +0,0 @@ -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. diff --git a/app/wallet/Info.plist b/app/wallet/Info.plist deleted file mode 100644 index a8f58f733..000000000 --- a/app/wallet/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleURLTypes - - - CFBundleURLName - bitcoin - CFBundleURLSchemes - - bitcoin - - - - LSArchitecturePriority - - x86_64 - i386 - - - diff --git a/app/wallet/LICENCE b/app/wallet/LICENCE deleted file mode 100644 index b8bb97185..000000000 --- a/app/wallet/LICENCE +++ /dev/null @@ -1,20 +0,0 @@ -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. diff --git a/app/wallet/MANIFEST.in b/app/wallet/MANIFEST.in deleted file mode 100644 index 4fa5491a6..000000000 --- a/app/wallet/MANIFEST.in +++ /dev/null @@ -1,16 +0,0 @@ -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 * - diff --git a/app/wallet/README.rst b/app/wallet/README.rst deleted file mode 100644 index 55db495bc..000000000 --- a/app/wallet/README.rst +++ /dev/null @@ -1,110 +0,0 @@ -Electrum - Lightweight Bitcoin client -===================================== - -:: - - Licence: MIT Licence - Author: Thomas Voegtlin - Language: Python - Homepage: https://electrum.org/ - - -.. image:: https://travis-ci.org/spesmilo/electrum.svg?branch=master - :target: https://travis-ci.org/spesmilo/electrum - :alt: Build Status - - - - - -Getting started -=============== - -Electrum is a pure python application. However, if you want to use the -Qt interface, then you need to install the Qt dependencies:: - - sudo apt-get install python-qt4 - -If you downloaded the official package (tar.gz), then you can run -Electrum from its root directory, without installing it on your -system; all the python dependencies are included in the 'packages' -directory. To run Electrum from its root directory, just do:: - - ./electrum - -You can also install Electrum on your system, by running this command:: - - python setup.py install - -This will download and install the Python dependencies used by -Electrum, instead of using the 'packages' directory. - -If you cloned the git repository, then you need to compile extra files -before you can run Electrum. Read the next section, "Development -Version". - - - -Development version -=================== - -Check out the code from Github:: - - git clone git://github.com/spesmilo/electrum.git - cd electrum - -Run install (this should install dependencies):: - - python setup.py install - -Compile the icons file for Qt:: - - sudo apt-get install pyqt4-dev-tools - pyrcc4 icons.qrc -o gui/qt/icons_rc.py - -Compile the protobuf description file:: - - sudo apt-get install protobuf-compiler - protoc --proto_path=lib/ --python_out=lib/ lib/paymentrequest.proto - -Create translations (optional):: - - sudo apt-get install python-pycurl gettext - ./contrib/make_locale - - - - -Creating Binaries -================= - - -In order to create binaries, you must create the 'packages' directory:: - - ./contrib/make_packages - -This directory contains the python dependencies used by Electrum. - -Mac OS X --------- - -:: - - # On MacPorts installs: - sudo python setup-release.py py2app - - # On Homebrew installs: - ARCHFLAGS="-arch i386 -arch x86_64" sudo python setup-release.py py2app --includes sip - - sudo hdiutil create -fs HFS+ -volname "Electrum" -srcfolder dist/Electrum.app dist/electrum-VERSION-macosx.dmg - -Windows -------- - -See `contrib/build-wine/README` file. - - -Android -------- - -See `gui/kivy/Readme.txt` file. diff --git a/app/wallet/RELEASE-NOTES b/app/wallet/RELEASE-NOTES deleted file mode 100644 index b43baa137..000000000 --- a/app/wallet/RELEASE-NOTES +++ /dev/null @@ -1,654 +0,0 @@ -# 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. diff --git a/app/wallet/app.fil b/app/wallet/app.fil deleted file mode 100644 index 835b6748f..000000000 --- a/app/wallet/app.fil +++ /dev/null @@ -1,29 +0,0 @@ -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 diff --git a/app/wallet/contrib/build-wine/README b/app/wallet/contrib/build-wine/README deleted file mode 100644 index b9818c59b..000000000 --- a/app/wallet/contrib/build-wine/README +++ /dev/null @@ -1,12 +0,0 @@ -These scripts can be used for cross-compilation of Windows Electrum executables from Linux/Wine. - -Usage: -1. Install Wine (tested with wine-1.7.18) -2. Run "./prepare-wine.sh", it will download all dependencies. When you'll be asked, always leave default settings and press "Next >". -3. Run "./prepare-hw.sh" to build support for hardware wallets (TREZOR) -4. Run "./build-electrum-git.sh". Sources will be packed into three separate versions to dist/ directory: - * Standalone compressed executable is "dist/electrum.exe" - * Uncompressed binaries are in "dist/electrum". They're useful for comparsion with other builds. - * NSIS-based installer of Electrum is "electrum-setup.exe" -7. Everytime you want to rebuild new version of Electrum just change the path to ZIP file in "build-electrum.sh" and re-run the script. - diff --git a/app/wallet/contrib/build-wine/build-electrum-git.sh b/app/wallet/contrib/build-wine/build-electrum-git.sh deleted file mode 100755 index 435474962..000000000 --- a/app/wallet/contrib/build-wine/build-electrum-git.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash - -# You probably need to update only this link -ELECTRUM_GIT_URL=git://github.com/spesmilo/electrum.git -BRANCH=master -NAME_ROOT=electrum - - -# These settings probably don't need any change -export WINEPREFIX=/opt/wine64 - -PYHOME=c:/python27 -PYTHON="wine $PYHOME/python.exe -OO -B" - - -# Let's begin! -cd `dirname $0` -set -e - -cd tmp - -if [ -d "electrum-git" ]; then - # GIT repository found, update it - echo "Pull" - cd electrum-git - git checkout master - git pull - cd .. -else - # GIT repository not found, clone it - echo "Clone" - git clone -b $BRANCH $ELECTRUM_GIT_URL electrum-git -fi - -cd electrum-git -VERSION=`git describe --tags` -echo "Last commit: $VERSION" - -cd .. - -rm -rf $WINEPREFIX/drive_c/electrum -cp -r electrum-git $WINEPREFIX/drive_c/electrum -cp electrum-git/LICENCE . - -# add python packages (built with make_packages) -cp -r ../../../packages $WINEPREFIX/drive_c/electrum/ - -# add locale dir -cp -r ../../../lib/locale $WINEPREFIX/drive_c/electrum/lib/ - -# Build Qt resources -wine $WINEPREFIX/drive_c/Python27/Lib/site-packages/PyQt4/pyrcc4.exe C:/electrum/icons.qrc -o C:/electrum/lib/icons_rc.py -wine $WINEPREFIX/drive_c/Python27/Lib/site-packages/PyQt4/pyrcc4.exe C:/electrum/icons.qrc -o C:/electrum/gui/qt/icons_rc.py - -cd .. - -rm -rf dist/ - -# build standalone version -$PYTHON "C:/pyinstaller/pyinstaller.py" --noconfirm --ascii -w deterministic.spec - -# 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.exe $NAME_ROOT-$VERSION.exe -mv electrum-setup.exe $NAME_ROOT-$VERSION-setup.exe -mv electrum $NAME_ROOT-$VERSION -zip -r $NAME_ROOT-$VERSION.zip $NAME_ROOT-$VERSION -cd .. - -# build portable version -cp portable.patch $WINEPREFIX/drive_c/electrum -pushd $WINEPREFIX/drive_c/electrum -patch < portable.patch -popd -$PYTHON "C:/pyinstaller/pyinstaller.py" --noconfirm --ascii -w deterministic.spec -cd dist -mv electrum.exe $NAME_ROOT-$VERSION-portable.exe -cd .. - -echo "Done." diff --git a/app/wallet/contrib/build-wine/deterministic.spec b/app/wallet/contrib/build-wine/deterministic.spec deleted file mode 100644 index f6b7d0b12..000000000 --- a/app/wallet/contrib/build-wine/deterministic.spec +++ /dev/null @@ -1,85 +0,0 @@ -# -*- mode: python -*- - -home = 'C:\\electrum\\' - -# 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', - 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' - ], - pathex=[home+'lib', home+'gui', home+'plugins', home+'packages'], - hiddenimports=['lib', 'gui'], - hookspath=[]) - -##### include folder in distribution ####### -def extra_datas(mydir): - def rec_glob(p, files): - import os - import glob - for d in glob.glob(p): - if os.path.isfile(d): - files.append(d) - rec_glob("%s/*" % d, files) - files = [] - rec_glob("%s/*" % mydir, files) - extra_datas = [] - for f in files: - d = f.split('\\') - t = '' - for a in d[2:]: - if len(t)==0: - t = a - else: - t = t+'\\'+a - extra_datas.append((t, f, 'DATA')) - - return extra_datas -########################################### - -# append dirs - -# cacert.pem -a.datas += [ ('requests/cacert.pem', home+'packages/requests/cacert.pem', 'DATA') ] - -# Py folders that are needed because of the magic import finding -a.datas += extra_datas(home+'gui') -a.datas += extra_datas(home+'lib') -a.datas += extra_datas(home+'plugins') -a.datas += extra_datas(home+'packages') - -pyz = PYZ(a.pure) -exe = EXE(pyz, - a.scripts, - a.binaries, - a.datas, - name=os.path.join('build\\pyi.win32\\electrum', 'electrum.exe'), - debug=False, - strip=None, - upx=False, - icon=home+'icons/electrum.ico', - console=False) - # The 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 - -coll = COLLECT(exe, - 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')) diff --git a/app/wallet/contrib/build-wine/electrum.nsi b/app/wallet/contrib/build-wine/electrum.nsi deleted file mode 100644 index 4495652c9..000000000 --- a/app/wallet/contrib/build-wine/electrum.nsi +++ /dev/null @@ -1,166 +0,0 @@ -;-------------------------------- -;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 "..\..\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 - - ;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.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.exe" "" "$INSTDIR\electrum.exe" 0 - - ;Links bitcoin: URI's to Electrum - WriteRegStr HKCU "Software\Classes\bitcoin" "" "URL:bitcoin Protocol" - WriteRegStr HKCU "Software\Classes\bitcoin" "URL Protocol" "" - WriteRegStr HKCU "Software\Classes\bitcoin" "DefaultIcon" "$\"$INSTDIR\electrum.ico, 0$\"" - WriteRegStr HKCU "Software\Classes\bitcoin\shell\open\command" "" "$\"$INSTDIR\electrum.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 \ No newline at end of file diff --git a/app/wallet/contrib/build-wine/portable.patch b/app/wallet/contrib/build-wine/portable.patch deleted file mode 100644 index e8f96b5b0..000000000 --- a/app/wallet/contrib/build-wine/portable.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/electrum b/electrum -index 8c972c6..46903b7 100755 ---- a/electrum -+++ b/electrum -@@ -454,6 +454,8 @@ if __name__ == '__main__': - if config_options.get('server'): - config_options['auto_connect'] = False - -+ 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') - diff --git a/app/wallet/contrib/build-wine/prepare-hw.sh b/app/wallet/contrib/build-wine/prepare-hw.sh deleted file mode 100755 index 1890eca5c..000000000 --- a/app/wallet/contrib/build-wine/prepare-hw.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/bash - -TREZOR_GIT_URL=git://github.com/trezor/python-trezor.git -KEEPKEY_GIT_URL=git://github.com/keepkey/python-keepkey.git -BTCHIP_GIT_URL=git://github.com/LedgerHQ/btchip-python.git - -BRANCH=master - -# These settings probably don't need any change -export WINEPREFIX=/opt/wine64 - -PYHOME=c:/python27 -PYTHON="wine $PYHOME/python.exe " - -# Let's begin! -cd `dirname $0` -set -e - -cd tmp - -# downoad mingw-get-setup.exe -#wget http://downloads.sourceforge.net/project/mingw/Installer/mingw-get-setup.exe -#wine mingw-get-setup.exe - -#echo "add c:\MinGW\bin to PATH using regedit" -#regedit -#exit - -#wine mingw-get install gcc -#wine mingw-get install mingw-utils -#wine mingw-get install mingw32-libz - -#create cfg file -#printf "[build]\ncompiler=mingw32\n" > /opt/me/wine64/drive_c/Python27/Lib/distutils/distutils.cfg - -# Install Cython -#wine "$PYHOME\\Scripts\\easy_install.exe" cython - - -# not working -##wine "$PYHOME\\Scripts\\easy_install.exe" hidapi - -#git clone https://github.com/trezor/cython-hidapi.git - -#replace: from distutils.core import setup, Extenstion - -#cd cython-hidapi -#git submodule init -#git submodule update -#$PYTHON setup.py install -#cd .. - -# trezor -if ! [ -d "trezor-0.7.4" ]; then - wget "https://pypi.python.org/packages/16/f1/e30d601857ab48f80ab73d15cda957528b5fa3b90bd8168f1e5a1fdd5b1d/trezor-0.7.4.tar.gz" - tar -xvzf trezor-0.7.4.tar.gz -fi -cd trezor-0.7.4 -$PYTHON setup.py install -cd .. - -#keepkey -if [ -d "keepkey-git" ]; then - cd keepkey-git - git checkout master - git pull - cd .. -else - git clone -b $BRANCH $KEEPKEY_GIT_URL keepkey-git -fi -cd keepkey-git -# checkout 2 commits before v0.7.3, because it fails to build -# git checkout v0.7.3 -git checkout 7abe0f0c9026907e9a8db1d231e084df2c175817 -$PYTHON setup.py install -cd .. - -#btchip -if [ -d "btchip-git" ]; then - cd btchip-git - git checkout master - git pull - cd .. -else - git clone -b $BRANCH $BTCHIP_GIT_URL btchip-git -fi -cd btchip-git -$PYTHON setup.py install -cd .. - diff --git a/app/wallet/contrib/build-wine/prepare-wine.sh b/app/wallet/contrib/build-wine/prepare-wine.sh deleted file mode 100755 index e63497547..000000000 --- a/app/wallet/contrib/build-wine/prepare-wine.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash - -# Please update these links carefully, some versions won't work under Wine -PYTHON_URL=http://www.python.org/ftp/python/2.7.8/python-2.7.8.msi -PYQT4_URL=http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.1/PyQt4-4.11.1-gpl-Py2.7-Qt4.8.6-x32.exe -PYWIN32_URL=http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/pywin32-219.win32-py2.7.exe/download -PYINSTALLER_URL=https://pypi.python.org/packages/source/P/PyInstaller/PyInstaller-2.1.zip -NSIS_URL=http://prdownloads.sourceforge.net/nsis/nsis-2.46-setup.exe?download -SETUPTOOLS_URL=https://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe - - -## These settings probably don't need change -export WINEPREFIX=/opt/wine64 -#export WINEARCH='win32' - -PYHOME=c:/python27 -PYTHON="wine $PYHOME/python.exe -OO -B" - -# 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 -wget -O python.msi "$PYTHON_URL" -wine msiexec /q /i python.msi - -# Install PyWin32 -wget -O pywin32.exe "$PYWIN32_URL" -wine pywin32.exe - -# Install PyQt4 -wget -O PyQt.exe "$PYQT4_URL" -wine PyQt.exe - -# Install pyinstaller -wget -O pyinstaller.zip "$PYINSTALLER_URL" -unzip pyinstaller.zip -mv PyInstaller-2.1 $WINEPREFIX/drive_c/pyinstaller - -# Install ZBar -#wget -q -O zbar.exe "http://sourceforge.net/projects/zbar/files/zbar/0.10/zbar-0.10-setup.exe/download" -#wine zbar.exe - -# Install setuptools -wget -O setuptools.exe "$SETUPTOOLS_URL" -wine setuptools.exe - -# Install NSIS installer -wget -q -O nsis.exe "$NSIS_URL" -wine nsis.exe - -# Install UPX -#wget -O upx.zip "http://upx.sourceforge.net/download/upx308w.zip" -#unzip -o upx.zip -#cp upx*/upx.exe . - -# add dlls needed for pyinstaller: -cp $WINEPREFIX/drive_c/windows/system32/msvcp90.dll $WINEPREFIX/drive_c/Python27/ -cp $WINEPREFIX/drive_c/windows/system32/msvcm90.dll $WINEPREFIX/drive_c/Python27/ diff --git a/app/wallet/contrib/make_apk b/app/wallet/contrib/make_apk deleted file mode 100755 index 8cb07491c..000000000 --- a/app/wallet/contrib/make_apk +++ /dev/null @@ -1,7 +0,0 @@ -#!/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 diff --git a/app/wallet/contrib/make_download b/app/wallet/contrib/make_download deleted file mode 100755 index 82bf2258c..000000000 --- a/app/wallet/contrib/make_download +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/python2 -import sys -import re -import hashlib -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) - - diff --git a/app/wallet/contrib/make_locale b/app/wallet/contrib/make_locale deleted file mode 100755 index ea453798d..000000000 --- a/app/wallet/contrib/make_locale +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env python2 -from StringIO import StringIO -import os, zipfile, pycurl -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' - -if os.path.exists('../contrib/crowdin_api_key.txt'): - crowdin_api_key = open('../contrib/crowdin_api_key.txt').read().strip() - # Push to Crowdin - print 'Push to Crowdin' - url = ('https://api.crowdin.com/api/project/' + crowdin_identifier + '/update-file?key=' + crowdin_api_key) - c = pycurl.Curl() - c.setopt(c.URL, url) - c.setopt(c.POST, 1) - fields = [('files[' + crowdin_file_name + ']', (pycurl.FORM_FILE, locale_file_name))] - c.setopt(c.HTTPPOST, fields) - c.perform() - # Build translations - print 'Build translations' - response = requests.request('GET', 'http://api.crowdin.com/api/project/' + crowdin_identifier + '/export?key=' + crowdin_api_key).content - print response - -# Download & unzip -print 'Download translations' -zfobj = zipfile.ZipFile(StringIO(requests.request('GET', 'http://crowdin.com/download/project/' + crowdin_identifier + '.zip').content)) - -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: - output = open(name[16:],'w') - output.write(zfobj.read(name)) - output.close() - -# 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) diff --git a/app/wallet/contrib/make_packages b/app/wallet/contrib/make_packages deleted file mode 100755 index 7043dc179..000000000 --- a/app/wallet/contrib/make_packages +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/python2 - -import sys, re, shutil, os, hashlib -import imp -import getpass - -if __name__ == '__main__': - - d = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir)) - os.chdir(d) - v = imp.load_source('version', 'lib/version.py') - version = v.ELECTRUM_VERSION - print "version", version - - # copy dependencies into 'packages' directory - deps = [ - 'aes', - 'ecdsa', - 'pbkdf2', - 'requests', # note: requests-2.5.1 is needed to build with pyinstaller - 'qrcode', - 'google/protobuf', - 'dns', - 'six', - 'jsonrpclib', - ] - for module in deps: - f, pathname, descr = imp.find_module(module) - target = 'packages/' + module + descr[0] - if os.path.exists(target): - continue - d = os.path.dirname(target) - if d and not (os.path.exists(d)): - os.makedirs(d) - if descr[0]: - shutil.copy(pathname, target) - else: - shutil.copytree(pathname, target, ignore=shutil.ignore_patterns('*.pyc')) - - # fix google/__init__.py needed by pyinstaller - n = 'packages/google/__init__.py' - if not os.path.exists(n): - os.system("echo \# do not remove>%s"%n) - - # patch requests and add cacert.pem - import requests - crt = requests.certs.where() - n = 'packages/requests/certs.py' - with open(n, 'r') as f: - s = f.read() - s = s.replace("'%s'"%crt, "os.path.join(os.path.dirname(__file__), 'cacert.pem')") - with open(n, 'w') as f: - f.write(s) - shutil.copy(crt, 'packages/requests/cacert.pem') - - os.system("pyrcc4 icons.qrc -o gui/qt/icons_rc.py") - os.system("python setup.py sdist --format=zip,gztar") - - print "Packages are ready in dist" - - diff --git a/app/wallet/contrib/sign_packages b/app/wallet/contrib/sign_packages deleted file mode 100755 index 54aeb1411..000000000 --- a/app/wallet/contrib/sign_packages +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/python2 - -import sys, re, shutil, os, hashlib -import imp -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("..") - - - diff --git a/app/wallet/electrum b/app/wallet/electrum deleted file mode 100755 index c3e9cdbb7..000000000 --- a/app/wallet/electrum +++ /dev/null @@ -1,394 +0,0 @@ -#!/usr/bin/env python2 -# -*- 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, "setup-release.py")) -is_android = 'ANDROID_DATA' in os.environ - -# 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')) -elif is_bundle and sys.platform=='darwin': - sys.path.insert(0, os.getcwd() + "/lib/python2.7/packages") - - -def check_imports(): - # pure-python dependencies need to be imported here for pyinstaller - try: - import dns - import aes - import ecdsa - import requests - import six - import qrcode - import pbkdf2 - import google.protobuf - import jsonrpclib - except ImportError as e: - sys.exit("Error: %s. Try 'sudo pip install '"%e.message) - # 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 - # check that we have the correct version of ecdsa - try: - from ecdsa.ecdsa import curve_secp256k1, generator_secp256k1 - except Exception: - sys.exit("cannot import ecdsa.curve_secp256k1. You probably need to upgrade ecdsa.\nTry: sudo pip install --upgrade ecdsa") - # make sure that certificates are here - assert os.path.exists(requests.utils.DEFAULT_CA_BUNDLE_PATH) - - -if not is_android: - check_imports() - -# load local module as electrum -if is_bundle or is_local or is_android: - import imp - imp.load_module('electrum', *imp.find_module('lib')) - imp.load_module('electrum_gui', *imp.find_module('gui')) - - -from electrum import SimpleConfig, Network -from electrum.wallet import 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, check_www_dir -from electrum.commands import get_parser, known_commands, Commands, config_variables -from electrum import daemon -from electrum import keystore -from electrum.mnemonic import Mnemonic - -# 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_seed(text): - k = keystore.from_seed(text, passphrase) - elif keystore.is_any_key(text): - k = keystore.from_keys(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 = Mnemonic('en').make_seed() - k = keystore.from_seed(seed, passphrase) - 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) - 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_cmdline(config_options): - 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_password and storage.get('use_encryption'): - 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] - storage = WalletStorage(config.get_wallet_path()) - wallet = Wallet(storage) if cmd.requires_wallet else None - # check password - if cmd.requires_password and storage.get('use_encryption'): - password = config_options.get('password') - 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_stderr("Warning: running command offline") - # arguments passed to function - args = map(lambda x: config.get(x), cmd.params) - # decode json arguments - args = map(json_decode, args) - # options - args += map(lambda x: config.get(x), cmd.options) - cmd_runner = Commands(config, wallet, None, - password=config_options.get('password'), - new_password=config_options.get('new_password')) - func = getattr(cmd_runner, cmd.name) - result = func(*args) - # save wallet - if wallet: - wallet.storage.write() - return result - -def init_plugins(config, gui_name): - from electrum.plugins import Plugins - return Plugins(config, is_bundle or 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 = 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] = raw_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__ - for k, v in config_options.items(): - if v is None or (k in config_variables.get(args.cmd, {}).keys()): - config_options.pop(k) - if config_options.get('server'): - config_options['auto_connect'] = False - - config_options['cwd'] = os.getcwd() - - if config_options.get('portable'): - config_options['electrum_path'] = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'electrum_data') - - set_verbosity(config_options.get('verbose')) - - # 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 - - config = SimpleConfig(config_options) - cmdname = config.get('cmd') - - # 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) - d.start() - d.init_gui(config, plugins) - sys.exit(0) - else: - result = server.gui(config_options) - - elif cmdname == 'daemon': - subcommand = config.get('subcommand') - assert subcommand in ['start', 'stop', 'status'] - if subcommand == 'start': - fd, server = daemon.get_fd_or_server(config) - if fd is not None: - pid = os.fork() - if pid: - print_stderr("starting daemon (PID %d)" % pid) - sys.exit(0) - init_plugins(config, 'cmdline') - d = daemon.Daemon(config, fd) - d.start() - if config.get('websocket_server'): - from electrum import websockets - websockets.WebSocketServer(config, d.network).start() - if config.get('requests_dir'): - check_www_dir(config.get('requests_dir')) - 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 - init_cmdline(config_options) - server = daemon.get_server(config) - 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 type(result) in [str, unicode]: - 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) diff --git a/app/wallet/electrum-env b/app/wallet/electrum-env deleted file mode 100644 index a1af5a8ab..000000000 --- a/app/wallet/electrum-env +++ /dev/null @@ -1,24 +0,0 @@ -#!/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 - source ./env/bin/activate - python setup.py install -fi - -export PYTHONPATH="/usr/local/lib/python2.7/site-packages:$PYTHONPATH" - -./electrum "$@" - -deactivate diff --git a/app/wallet/electrum.conf.sample b/app/wallet/electrum.conf.sample deleted file mode 100644 index 60198a1e9..000000000 --- a/app/wallet/electrum.conf.sample +++ /dev/null @@ -1,16 +0,0 @@ -# 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] diff --git a/app/wallet/electrum.desktop b/app/wallet/electrum.desktop deleted file mode 100644 index 0ac2e3312..000000000 --- a/app/wallet/electrum.desktop +++ /dev/null @@ -1,17 +0,0 @@ -# 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 Client -Exec=electrum %u -GenericName[en_US]=Electrum -GenericName=Electrum -Icon=electrum -Name[en_US]=Electrum Bitcoin Wallet -Name=Electrum Bitcoin Wallet -Categories=Network; -StartupNotify=false -Terminal=false -Type=Application -MimeType=x-scheme-handler/bitcoin; - diff --git a/app/wallet/electrum.icns b/app/wallet/electrum.icns deleted file mode 100644 index 29853f150..000000000 Binary files a/app/wallet/electrum.icns and /dev/null differ diff --git a/app/wallet/gui/__init__.py b/app/wallet/gui/__init__.py deleted file mode 100644 index 9974520ac..000000000 --- a/app/wallet/gui/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# 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() diff --git a/app/wallet/gui/kivy/Makefile b/app/wallet/gui/kivy/Makefile deleted file mode 100644 index 7d4e82b18..000000000 --- a/app/wallet/gui/kivy/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -PYTHON = python - -# 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_new debug deploy run - @make clean -release: - @make prepare - @-cd ../..; buildozer android_new release - @make clean -clean: - # Cleaning up - # rename main.py to electrum - @-rm ../../main.py - # remove buildozer.spec - @-rm ../../buildozer.spec diff --git a/app/wallet/gui/kivy/Readme.txt b/app/wallet/gui/kivy/Readme.txt deleted file mode 100644 index 31d56e438..000000000 --- a/app/wallet/gui/kivy/Readme.txt +++ /dev/null @@ -1,14 +0,0 @@ -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 - diff --git a/app/wallet/gui/kivy/__init__.py b/app/wallet/gui/kivy/__init__.py deleted file mode 100644 index 264f7b2cd..000000000 --- a/app/wallet/gui/kivy/__init__.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/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 -from main_window import ElectrumWindow - - - - -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): - 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) diff --git a/app/wallet/gui/kivy/data/background.png b/app/wallet/gui/kivy/data/background.png deleted file mode 100644 index 77f42ccdd..000000000 Binary files a/app/wallet/gui/kivy/data/background.png and /dev/null differ diff --git a/app/wallet/gui/kivy/data/fonts/Roboto-Bold.ttf b/app/wallet/gui/kivy/data/fonts/Roboto-Bold.ttf deleted file mode 100644 index 87d3af3e1..000000000 Binary files a/app/wallet/gui/kivy/data/fonts/Roboto-Bold.ttf and /dev/null differ diff --git a/app/wallet/gui/kivy/data/fonts/Roboto-Condensed.ttf b/app/wallet/gui/kivy/data/fonts/Roboto-Condensed.ttf deleted file mode 100644 index c38f7c881..000000000 Binary files a/app/wallet/gui/kivy/data/fonts/Roboto-Condensed.ttf and /dev/null differ diff --git a/app/wallet/gui/kivy/data/fonts/Roboto-Medium.ttf b/app/wallet/gui/kivy/data/fonts/Roboto-Medium.ttf deleted file mode 100644 index 879834198..000000000 Binary files a/app/wallet/gui/kivy/data/fonts/Roboto-Medium.ttf and /dev/null differ diff --git a/app/wallet/gui/kivy/data/fonts/Roboto.ttf b/app/wallet/gui/kivy/data/fonts/Roboto.ttf deleted file mode 100644 index 153c60882..000000000 Binary files a/app/wallet/gui/kivy/data/fonts/Roboto.ttf and /dev/null differ diff --git a/app/wallet/gui/kivy/data/fonts/tron/License.txt b/app/wallet/gui/kivy/data/fonts/tron/License.txt deleted file mode 100644 index 471a58637..000000000 --- a/app/wallet/gui/kivy/data/fonts/tron/License.txt +++ /dev/null @@ -1,4 +0,0 @@ -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 \ No newline at end of file diff --git a/app/wallet/gui/kivy/data/fonts/tron/Readme.txt b/app/wallet/gui/kivy/data/fonts/tron/Readme.txt deleted file mode 100644 index 6379c543c..000000000 --- a/app/wallet/gui/kivy/data/fonts/tron/Readme.txt +++ /dev/null @@ -1,21 +0,0 @@ -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 \ No newline at end of file diff --git a/app/wallet/gui/kivy/data/fonts/tron/Tr2n.ttf b/app/wallet/gui/kivy/data/fonts/tron/Tr2n.ttf deleted file mode 100644 index 8e8c0dec6..000000000 Binary files a/app/wallet/gui/kivy/data/fonts/tron/Tr2n.ttf and /dev/null differ diff --git a/app/wallet/gui/kivy/data/glsl/default.fs b/app/wallet/gui/kivy/data/glsl/default.fs deleted file mode 100644 index 19145d653..000000000 --- a/app/wallet/gui/kivy/data/glsl/default.fs +++ /dev/null @@ -1,4 +0,0 @@ -$HEADER$ -void main (void){ - gl_FragColor = frag_color * texture2D(texture0, tex_coord0); -} diff --git a/app/wallet/gui/kivy/data/glsl/default.png b/app/wallet/gui/kivy/data/glsl/default.png deleted file mode 100644 index a14255e4d..000000000 Binary files a/app/wallet/gui/kivy/data/glsl/default.png and /dev/null differ diff --git a/app/wallet/gui/kivy/data/glsl/default.vs b/app/wallet/gui/kivy/data/glsl/default.vs deleted file mode 100644 index ac9ac4d6d..000000000 --- a/app/wallet/gui/kivy/data/glsl/default.vs +++ /dev/null @@ -1,6 +0,0 @@ -$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); -} diff --git a/app/wallet/gui/kivy/data/glsl/header.fs b/app/wallet/gui/kivy/data/glsl/header.fs deleted file mode 100644 index e9f887ba6..000000000 --- a/app/wallet/gui/kivy/data/glsl/header.fs +++ /dev/null @@ -1,10 +0,0 @@ -#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; diff --git a/app/wallet/gui/kivy/data/glsl/header.vs b/app/wallet/gui/kivy/data/glsl/header.vs deleted file mode 100644 index a2638bffc..000000000 --- a/app/wallet/gui/kivy/data/glsl/header.vs +++ /dev/null @@ -1,17 +0,0 @@ -#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; diff --git a/app/wallet/gui/kivy/data/images/defaulttheme-0.png b/app/wallet/gui/kivy/data/images/defaulttheme-0.png deleted file mode 100644 index 8cfc82455..000000000 Binary files a/app/wallet/gui/kivy/data/images/defaulttheme-0.png and /dev/null differ diff --git a/app/wallet/gui/kivy/data/images/defaulttheme.atlas b/app/wallet/gui/kivy/data/images/defaulttheme.atlas deleted file mode 100644 index 26ed5d0da..000000000 --- a/app/wallet/gui/kivy/data/images/defaulttheme.atlas +++ /dev/null @@ -1 +0,0 @@ -{"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]}} \ No newline at end of file diff --git a/app/wallet/gui/kivy/data/logo/kivy-icon-32.png b/app/wallet/gui/kivy/data/logo/kivy-icon-32.png deleted file mode 100644 index 455fa9763..000000000 Binary files a/app/wallet/gui/kivy/data/logo/kivy-icon-32.png and /dev/null differ diff --git a/app/wallet/gui/kivy/data/style.kv b/app/wallet/gui/kivy/data/style.kv deleted file mode 100644 index 927e5059b..000000000 --- a/app/wallet/gui/kivy/data/style.kv +++ /dev/null @@ -1,750 +0,0 @@ -#:kivy 1.0 - -