Giter Club home page Giter Club logo

electron-cash's Introduction

Electron Cash - Lightweight Bitcoin Cash client

Licence: MIT Licence
Author: Electron Cash Developers
Language: Python
Homepage: https://electroncash.org/
Help translate Electron Cash online GitHub Actions Tests GitHub Actions Build GitHub Actions Python Audit

Getting started

Note: If running from source, Python 3.8 or above is required to run Electron Cash. If your system lacks Python 3.8, you have other options, such as the AppImage / binary releases or running from source using pyenv (see section Running from source on old Linux below).

macOS: It is recommended that macOS users run the binary .dmg as that's simpler to use and has everything included. Otherwise, if you want to run from source, see section Running from source on macOS below.

Electron Cash is a pure python application forked from Electrum. If you want to use the Qt interface, install the Qt dependencies:

sudo apt-get install python3-pyqt5 python3-pyqt5.qtsvg

If you downloaded the official package (tar.gz), you can run Electron Cash from its root directory (called Electron Cash), without installing it on your system; all the python dependencies are included in the 'packages' directory. To run Electron Cash from its root directory, just do:

./electron-cash

You can also install Electron Cash on your system, by running this command:

sudo apt-get install python3-setuptools
python3 setup.py install

Compile the icons file for Qt (normally you can skip this step, run this command if icons are missing):

sudo apt-get install pyqt5-dev-tools
pyrrc5 icons.qrc -o electroncash_gui/qt/icons.py

This will download and install the Python dependencies used by Electron Cash, instead of using the 'packages' directory.

If you cloned the git repository, you need to compile extra files before you can run Electron Cash. Read the next section, "Development Version".

Hardware Wallet - Ledger Nano S

Electron Cash natively support Ledger Nano S hardware wallet. If you plan to use you need an additional dependency, namely btchip. To install it run this command:

sudo pip3 install btchip-python

If you still have problems connecting to your Nano S please have a look at this troubleshooting section on Ledger website.

Development version

Check your python version >= 3.8, and install pyqt5, as instructed above in the Getting started section above or Running from source on old Linux section below.

If you are on macOS, see the Running from source on macOS section below.

Check out the code from Github:

git clone https://github.com/Electron-Cash/Electron-Cash
cd Electron-Cash

Install the python dependencies:

pip3 install -r contrib/requirements/requirements.txt --user

Create translations (optional):

sudo apt-get install python-requests gettext
./contrib/make_locale

Compile libsecp256k1 (optional, yet highly recommended):

sudo apt-get install libtool automake
./contrib/make_secp

For plugin development, see the plugin documentation.

Running unit tests (very optional, advanced users only):

pip install tox
tox

Tox will take care of building a faux installation environment, and ensure that the mapped import paths work correctly.

Running from source on old Linux

If your Linux distribution has a different version of python 3 (such as python 3.5 in Debian 9), it is recommended to do a user dir install with pyenv. This allows Electron Cash to run completely independently of your system configuration.

  1. Install pyenv in your user account. Follow the printed instructions about updating your environment variables and .bashrc, and restart your shell to ensure that they are loaded.
  2. Run pyenv install 3.11.1. This will download and compile that version of python, storing it under .pyenv in your home directory.
  3. cd into the Electron Cash directory. Run pyenv local 3.11.1 which inserts a file .python-version into the current directory.
  4. While still in this directory, run pip install pyqt5.
  5. If you are installing from the source file (.tar.gz or .zip) then you are ready and you may run ./electron-cash. If you are using the git version, then continue by following the Development version instructions above.

Running from source on macOS

You need to install either MacPorts or HomeBrew. Follow the instructions on either site for installing (Xcode from Apple's developer site is required for either).

  1. After installing either HomeBrew or MacPorts, clone this repository and switch to the directory: git clone https://github.com/Electron-Cash/Electron-Cash && cd Electron-Cash
  2. Install python 3.8 or later. For brew: brew install python3 or if using MacPorts: sudo port install python311
  3. Install PyQt5: python3 -m pip install --user pyqt5
  4. Install Electron Cash requirements: python3 -m pip install --user -r contrib/requirements/requirements.txt
  5. Compile libsecp256k1 (optional, yet highly recommended): ./contrib/make_secp. This requires GNU tools and automake, install with brew: brew install coreutils automake or if using MacPorts: sudo port install coreutils automake
  6. At this point you should be able to just run the sources: ./electron-cash

Creating Binaries

Linux AppImage & Source Tarball

See contrib/build-linux/README.md.

Mac OS X / macOS

See contrib/osx/.

Windows

See contrib/build-wine/.

Android

See android/.

iOS

See ios/.

electron-cash's People

Contributors

akshayaurora avatar aldin-sxr avatar andrew-128 avatar bauerj avatar cculianu avatar chrisglass avatar dabura667 avatar danconnolly avatar darrindaigle avatar ecdsa avatar echterago avatar fluffypony avatar fyookball avatar genjix avatar imaginaryusername avatar jhoenicke avatar jimboman77 avatar jonas-lundqvist avatar m0mchil avatar marceloneil avatar markblundeberg avatar mhsmith avatar mrnaif2018 avatar neocogent avatar ovidiusoft avatar romanz avatar rt121212121 avatar sombernight avatar stefaang avatar wozz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

electron-cash's Issues

Android build 2.9.2 says Disconnected

I just built 2.9.2 APK for android but unfortunately showing "Disconnected" status up top, never going into "syncrhonizing" mode. Can't publish like this obviously.

Any ideas are appreciated.

Lost my BCC

major bcc glitch

As you can see we imported the private key to our Electron Cash Wallet. Now our Balance is zero it looks like there was a chain split perhaps its possible for us to switch to that chain to move the 1.81 BCC that are stuck on the wrong chain.

Ledger support

Ledger supports bitcoin cash in official client. It would great to support electron cash too.
@btchip Couldn't you submit patch? Must be trivial for you since you wrote original code for electrum.

KeyError: 'value' when trying to sign tx on offline (cold storage) ubuntu 14.04 machine

On an online ubuntu 14.04 machine, I run ./electrum-cash directly from folder, then I did the following:

  1. Create a watch-only wallet and import a pubkey
  2. Create unsigned tx from the watch-only wallet to a bitcoin-cash address and save tx on USB stick
  3. On another offline ubuntu 14.04 machine, run ./electrum-cash and create a new wallet and import the private key that belongs to the pubkey used in the tx
  4. Load the unsigned tx from USB and sign

Doing that with GUI gives short error message: Error 'value'
When I try directly from command line using something like this:
cat unsigned.txn | ./electron-cash signtransaction - > signed.txn

Then following error message:
Traceback (most recent call last):
File "./electron-cash", line 427, in
result = run_offline_command(config, config_options)
File "./electron-cash", line 286, in run_offline_command
result = func(*args)
File "/home/simon/bcash/Electron Cash-2.9.0/lib/commands.py", line 83, in func_wrapper
return func(*args, **kwargs)
File "/home/simon/bcash/Electron Cash-2.9.0/lib/commands.py", line 239, in signtransaction
self.wallet.sign_transaction(tx, password)
File "/home/simon/bcash/Electron Cash-2.9.0/lib/wallet.py", line 1103, in sign_transaction
k.sign_transaction(tx, password)
File "/home/simon/bcash/Electron Cash-2.9.0/lib/keystore.py", line 113, in sign_transaction
tx.sign(keypairs)
File "/home/simon/bcash/Electron Cash-2.9.0/lib/transaction.py", line 828, in sign
pre_hash = Hash(self.serialize_preimage(i).decode('hex'))
File "/home/simon/bcash/Electron Cash-2.9.0/lib/transaction.py", line 726, in serialize_preimage
amount = int_to_hex(txin['value'], 8)
KeyError: 'value'

workaround for 2fa

#6

"had to restore the wallet from seed and check disable 2fa at end of the restore, now I can send bcc"

Showing ghost transaction from the BTC Network

Error where the electron cash is aparently reading a transaction id I made with the BTC network hours after the fork
image
If I check the transaction ID the wallet showed me I used to send my funds I can see that it only exists in the BTC network
image

Can't get Electrum Cash to Import or Sweep Private key

Tried to do a fresh install of Electrum Cash post Fork and from this I want to import the Private Key of another Bitcoin Client. I tried to input the Private Key during setup and copy it into the correct box however the NEXT button remains greyed out so I cannot proceed.

Also tried from a basic install to do a Sweep of the other wallet Private Key but this again will not proceed with the NEXT button greyed out.

My previous client is Waves Lite and I can get access internally to both the SEED and Private keys but Electrum Cash wont accept either.

Cant open electron

Sorry guys i am undestand what this question is dumb, but i hope you can help me. I download zip from git unzip it. And via cmd use python setup.py install, is create few new folders but i still cant undestand how i can open the program. I dont see any exe files or smth like that

The transaction was rejected by networkrules (16 mandatory script.....

Help needed or a noob
I want to transfer my bcc rom the wallet. after i sign it (2fa) i get the following message (see below). I got no idea what it means and also not how to solve it.

ERROR: The transaction was rejected by networkrules (16 mandatory-script-verify-flag-failed (signature must use sighash_Forkid
I really hope someone can help me out.
Thanks already

HELP ALL MY BCC JUST DISAPPEARED FROM MY ELECTRON CASH WALLET!!!

ALL MY BCC JUST DISAPPEARED FROM MY ELECTRON CASH WALLET!!! hi every one, need some help or explanation, because I use electron cash to get my BCC, I follow the instructions of electrum.org I send my BTC from my electrum wallet to a new BTC electrum wallet I wait to the transaccion be completed, so I use my old seed now empty of bitcoins for export to the electron cash, and my BCC appears to my new BCC wallet, so I make two small transfers of my BCC wallet to bittrex and the transaction was ok, from here everything ok, when I do the transaction my electron cash BCC wallet start to syncronize and ALL THE REST OF MY BCC (ALMOST 90%) OF MY ELECTRON WALLET JUST DESAPPEARED, AND THE BCC WALLET SHOW ME THE LAST TRANSACTION OF BTC BUT NOTHING ABOUT BCC ALSO MY TWO SMALL TRANSACCIONS OF BCC DISAPPEARED FROM HISTORY ¡¡¡¡¡AND NOW MY BCC WALLET IS EMPTY!!!!!!! WHATS HAPPEN SOUNDS LIKE SOME INTERFERENCE OF THE TWO BLOCKCHAINS some one can helpme pls, thanks : (

Error creating send transaction

When I try to send coins I get this message:

error: Your client produced a transaction that is not accepted by the network any more.  Please upgrade to Electrum 2.5.1 or newer.

I'm on version 2.9.0

Do the updates referenced in #6 fix this? It seems like a different error. I'm currently on 375be10.

Dont disable 2fa when importing private keys from electrum to electron cash

Dont be greedy and compromise your bcc by disabling 2fa on your seed when you import them to electron cash.its really easy for hackers to gain access to your bcc when you dont have 2fa authenticator.fyookball in how many days we can expect the new release to be launched which enables 2fa seed holders to send their bcc out of their electron wallet?

Signing after loading tx from file is broken

Traceback (most recent call last):
File "/home/xubuntu/Desktop/Electron Cash-2.9.0/gui/qt/util.py", line 582, in run
result = task.task()
File "/home/xubuntu/Desktop/Electron Cash-2.9.0/lib/wallet.py", line 1103, in sign_transaction
k.sign_transaction(tx, password)
File "/home/xubuntu/Desktop/Electron Cash-2.9.0/lib/keystore.py", line 113, in sign_transaction
tx.sign(keypairs)
File "/home/xubuntu/Desktop/Electron Cash-2.9.0/lib/transaction.py", line 829, in sign
pre_hash = Hash(self.serialize_preimage(i).decode('hex'))
File "/home/xubuntu/Desktop/Electron Cash-2.9.0/lib/transaction.py", line 727, in serialize_preimage
amount = int_to_hex(txin['value'], 8)
KeyError: 'value'

Signing works after deleting https://github.com/fyookball/electrum/blob/cash/lib/transaction.py#L726 and removing "amount" from the line afterwards, but on broadcast you get the error described in #6

Funds not received in my wallet electrum cash

Hi, I just sent my BTC funds from my wallet in Airbitz to my Electron cash wallet following all the instructions (using the private key of my Airbitz portfolio from http://www.airbitz.co/recovery and indicating my wallet in Electron cash) expecting to receive the equivalent in BCH, it turns out that now my balance in my wallet Airbitz appears at zero and I do not see reflected any balance in my Electron Cash portfolio.
Please I require your collaboration, which I can do, thank you very much.

did not received my coins

i transfered coins to my wallet and they never show on wallet
Have all teh confirmations
18ZFmqBxbzyfJFNsYXeQFYRAtTGRhFjiBX

When is new version going to be available?

I just want to get my BCH but can't, and I'm sure there are hundreds more that can't either. Unfortunately I don't know how to run the updates through here. issue#6 is preventing me from sending coins.

error: The transaction was rejected by network rules.

This is on Android version 2.8.2

When I send some BCC to another address it says:
error: The transaction was rejected by network rules. (16: mandatory-script-verify-flag-failed (Non-canonical DER signature)) ... following by a signature.

My address has enough balance.

Keepkey hardware wallet support

I have 2 keepkey devices that have multisig setup using electrum. When i try to create a new wallet using the hardware device on electron cash, i get a message saying no hardware devices found. This works in electrum though.
When would electron cash come with hardware device support? Or is there any other way through which i can claim my BCH using keepkey and electrum?

Digitalbitbox

Hi.
On Electron cash wallet setup when i choose to restore from my digitalbitbox hardware wallet, Electro cash wallet is not detecting it.
screenshot 9

ImportError: No module named pyaes

./contrib/make_packages 
version 2.9.0
Traceback (most recent call last):
  File "./contrib/make_packages", line 33, in <module>
    f, pathname, descr = imp.find_module(module)
ImportError: No module named pyaes

pyaes (1.6.0) is on pip list

Any idea??

ImportError: No module named setuptools

I am trying to install on lubuntu 16.04. I downloaded the Linux source and extracted. If I run command

sudo python setup.py install

I get

Traceback (most recent call last):
  File "setup.py", line 5, in <module>
    from setuptools import setup
ImportError: No module named setuptools

multsig sending with trezor as cosigning device fails with UnexpectedDER: trailing junk after DER sig: 41

RECEIVED PART OF SERIALIZED TX (39 BYTES)
SIGNED IN 10.244 SECONDS, CALLED 5 MESSAGES, 303 BYTES
adding sig 0 0 02c41936c0affe3a0b1d828dcc68dd4377a32bd7494ea8722b694a92f29ad317f4 304402207cbfb086e450496ce16a850e38c76a8939434b62780ba10afa4a68294651a04f022004305c3416ed9d891ae752a4cbd0c25ceec382df1584fa70eead5cd7c396056e41
Traceback (most recent call last):
  File "/home/nick/bitcoin/electron-cash/gui/qt/util.py", line 582, in run
    result = task.task()
  File "/home/nick/bitcoin/electron-cash/lib/wallet.py", line 1103, in sign_transaction
    k.sign_transaction(tx, password)
  File "/home/nick/bitcoin/electron-cash/plugins/trezor/plugin.py", line 66, in sign_transaction
    self.plugin.sign_transaction(self, tx, prev_tx, xpub_path)
  File "/home/nick/bitcoin/electron-cash/plugins/trezor/plugin.py", line 245, in sign_transaction
    tx.update_signatures(raw)
  File "/home/nick/bitcoin/electron-cash/lib/transaction.py", line 562, in update_signatures
    r, s = ecdsa.util.sigdecode_der(sig.decode('hex')[:-1], order)
  File "/usr/lib/python2.7/site-packages/ecdsa/util.py", line 240, in sigdecode_der
    binascii.hexlify(empty))
UnexpectedDER: trailing junk after DER sig: 41

BCC transaction was not made by me

I rescued the backup of a Blockchain (BTC) wallet in an Electron Cash 2.9.0 (BCC) portfolio at first appeared all right. I closed the wallet and after a while I opened it again and a transaction appeared that was not made by me.
An exclamation point appears plus the Low fee information and the balance 0.
I was hacked ?
Transaction Id
B0d3920e0c51b515eae299c334d399f9d70b49edb74686dd2caac13c0a7dcb08

Wrong address after import

I have imported 2 private keys into the Electron Cash wallet. One is showing correctly but the other is showing a completely different address. It seems to be an unused address. Anyone know why this is happening?

Symbol not found: _getentropy on OS X 10.10.5

ElectronCash 2.9.2 crashes immediately when opening.

OS Version: Mac OS X 10.10.5 (14F2511)

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

Dyld Error Message:
Symbol not found: _getentropy
Referenced from: /Applications/Electron-Cash.app/Contents/Frameworks/Python.framework/Versions/2.7/Python (which was built for Mac OS X 10.12)
Expected in: /usr/lib/libSystem.B.dylib

Error running from cmd line

Used Git CMD to clone the repo, and used

python setup.py install
to successfully (i think) install dependencies. When I try to run the program using
python electron-cash
I'm returned:

`C:\Users\jacks\electrum>python electron-cash
Traceback (most recent call last):
File "electron-cash", line 71, in check_imports
import jsonrpclib
File "C:\Users\jacks\AppData\Local\Programs\Python\Python36\lib\site-packages\jsonrpclib-0.1.7-py3.6.egg\jsonrpclib_init_.py", line 5, in
File "C:\Users\jacks\AppData\Local\Programs\Python\Python36\lib\site-packages\jsonrpclib-0.1.7-py3.6.egg\jsonrpclib\jsonrpc.py", line 50, in
ModuleNotFoundError: No module named 'xmlrpclib'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "electron-cash", line 90, in
check_imports()
File "electron-cash", line 73, in check_imports
sys.exit("Error: %s. Try 'sudo pip install '"%e.message)
AttributeError: 'ModuleNotFoundError' object has no attribute 'message'`

What am I missing?

How to remove unconfirmed transaction?

I followed the instructions here for getting my BCH in Electron Cash, and now I want to transfer them to another wallet. But Electron Cash will not let me spend my BCH because my history looks like this:

Status Amount
confirmed +1.000
confirmed +2.000
confirmed -0.500
confirmed +2.000
unconfirmed -4.500

So my confirmed balance is 4.500, but my unconfirmed balance is 0.000. The unconfirmed transaction is the one I did after the fork to separate my BTC and BCH. How do I remove this transaction so Electron Cash will let me spend my BCH?

MacOS binary crashes on opening Trezor wallet

MacOS Sierra using Kyuupichan's signed binaries. (I know him personally)

Creating a new wallet or opening an existing Electrum wallet that utilizes Trezor causes the app to crash.

Problems with v2.9 installation (window closes)

I follow the steps to install the software... after I define the password to encrypt the wallet it start to charge and finally the window closes, and the process closes in the Windows Task Manager.
When I open the folder %appdata%/ElectronCash there are some files but no a .exe.

Previously I uninstall my electrum software to ensure a good installation of electron cash.
Also the checksum of the downloaded exe is ok.
This is on Windows 10.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.