Author Topic: Electrum-LTC - Lightweight Litecoin Wallet  (Read 117324 times)

Offline ELM4ever

  • Newbie
  • *
  • Posts: 17
Re: Electrum-LTC - Lightweight Litecoin Wallet
« Reply #345 on: April 05, 2015, 09:05:16 PM »
Received a response from Ledger, regarding their plugin not working in Electrum-LTC:

Quote
The problem is related to a limitation of the previous firmware (before LW 1.0) - the coin address version was set during setup and could not be changed - which means here that the output is rejected because it starts with an L, instead of a 1. To use the wallet with Litecoin, you'd need to set up the seed again with a different version (which would as a consequence make it not suitable for other coins, with that firmware).

This has changed in the latest firmware - you can now set the coin versions dynamically using SET ALTERNATE COIN VERSIONS ( https://ledgerhq.github.io/btchip-doc/bitcoin-technical-beta.html#_set_alternate_coin_versions ) following setup.  If you send this APDU after entering the PIN, choosing the Litecoin versions, it should work (although untested).

Let me know if you need more help modifying the client.

@pooler:  does this help?

At the moment, with Electrum-LTC, the Ledger can receive Litecoins, but can't send them. 

EDIT:  The btchipwallet.py plugin calls functions of the library btchip-python (ledgerhq Github repo) - most of them are in btchip.py.   I have not been able to locate the SET ALTERNATE COIN VERSIONS function. But regardless, the ADPU to send is e014000002, plus the two coin versions for Litecoin - 0x05 and 0x30 ?). When I tried, I got a 6d00 return code (I was expecting a 9000 code) - I couldn't find documentation on that code meaning.   FYI: when you set the variable BTCHIP_DEBUG = True in the plugin, you can see all the ADPU codes between Electrum-Ltc and the HW wallet in the console.

You may have to modify the plugin directly to call the APDU, and you should talk with Nicolas Bacca (CTO of Ledger) directly to get some help. I am giving up - I have reached my level of incompetency.  :-[
« Last Edit: April 06, 2015, 12:53:00 AM by ELM4ever »

Offline pooler

  • Litecoin Dev Team
  • Jr. Member
  • **
  • Posts: 165
Re: Electrum-LTC - Lightweight Litecoin Wallet
« Reply #346 on: April 06, 2015, 01:47:15 PM »
Received a response from Ledger, regarding their plugin not working in Electrum-LTC:

Quote
The problem is related to a limitation of the previous firmware (before LW 1.0) - the coin address version was set during setup and could not be changed - which means here that the output is rejected because it starts with an L, instead of a 1. To use the wallet with Litecoin, you'd need to set up the seed again with a different version (which would as a consequence make it not suitable for other coins, with that firmware).

This has changed in the latest firmware - you can now set the coin versions dynamically using SET ALTERNATE COIN VERSIONS ( https://ledgerhq.github.io/btchip-doc/bitcoin-technical-beta.html#_set_alternate_coin_versions ) following setup.  If you send this APDU after entering the PIN, choosing the Litecoin versions, it should work (although untested).

Let me know if you need more help modifying the client.

@pooler:  does this help?

At the moment, with Electrum-LTC, the Ledger can receive Litecoins, but can't send them. 

EDIT:  The btchipwallet.py plugin calls functions of the library btchip-python (ledgerhq Github repo) - most of them are in btchip.py.   I have not been able to locate the SET ALTERNATE COIN VERSIONS function. But regardless, the ADPU to send is e014000002, plus the two coin versions for Litecoin - 0x05 and 0x30 ?). When I tried, I got a 6d00 return code (I was expecting a 9000 code) - I couldn't find documentation on that code meaning.   FYI: when you set the variable BTCHIP_DEBUG = True in the plugin, you can see all the ADPU codes between Electrum-Ltc and the HW wallet in the console.

You may have to modify the plugin directly to call the APDU, and you should talk with Nicolas Bacca (CTO of Ledger) directly to get some help. I am giving up - I have reached my level of incompetency.  :-[

I actually think you did a pretty good job!

Yes, apparently their Python library still doesn't has built-in support for the "set alternate coin versions" call, but it should be easy to add it. By the way, have you made sure that you're running "the latest firmware", as mentioned in the message from Ledger?
I think the APDU should be e0, 14, 00, 00, 02, 30, 05 (regular address version before P2SH version).
I don't currently have a Ledger Wallet to perform testing, but if you are willing to bear with me we can try a few things.  Could you please pm me the exact code you've used for testing, along with the debug output? That might give me some idea as to what to try next.

Offline pooler

  • Litecoin Dev Team
  • Jr. Member
  • **
  • Posts: 165
Re: Electrum-LTC - Lightweight Litecoin Wallet
« Reply #347 on: April 12, 2015, 07:40:04 PM »
Excellent news for BTChip users!
I have pushed two commits that make signing Litecoin transactions possible.  (Please note that you should use the latest firmware, otherwise the destination address will show up incorrectly in 2FA messages.)

There are still a couple of issues:
  • The currency code displayed in 2FA messages is always "BTC", even when dealing with litecoins.
  • The firmware does not currently allow signing messages with Litecoin addresses (an issue shared with Trezor).
I have contacted Ledger's CTO regarding these two issues, and he assured me that he will definitely fix these limitations in the next firmware version.

Offline pooler

  • Litecoin Dev Team
  • Jr. Member
  • **
  • Posts: 165
Re: Electrum-LTC - Lightweight Litecoin Wallet
« Reply #348 on: April 17, 2015, 11:58:08 AM »
Here is the new BETA version, 2.0.5.1.
Trezor support should be fully working on all platforms (except for the infamous message signing bug).  BTChip hardware wallets, on the other hand, are currently only supported on Linux.
As always, please make sure you have backed up your wallets, just in case.

https://electrum-ltc.org/download/Electrum-LTC-2.0.5.1.tar.gz (sig)
https://electrum-ltc.org/download/Electrum-LTC-2.0.5.1.zip (sig)
https://electrum-ltc.org/download/electrum-ltc-2.0.5.1.exe (sig)
https://electrum-ltc.org/download/electrum-ltc-portable-2.0.5.1.exe (sig)

Offline marmig0404

  • Newbie
  • *
  • Posts: 2
Re: Electrum-LTC - Lightweight Litecoin Wallet
« Reply #349 on: April 19, 2015, 07:15:59 PM »
Im having troubles installing Electrum-LTC on Linux Ubuntu 14.04 LTS.
I follow the installation instructions and when i try to install phyton-pip i get a media change error (below)

Code: [Select]
########@########:~$ sudo apt-get install python-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  build-essential dpkg-dev fakeroot g++ g++-4.8 libalgorithm-diff-perl
  libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl libfakeroot
  libstdc++-4.8-dev python-colorama python-distlib python-html5lib
  python-setuptools python-wheel
Suggested packages:
  debian-keyring g++-multilib g++-4.8-multilib gcc-4.8-doc libstdc++6-4.8-dbg
  libstdc++-4.8-doc python-genshi
Recommended packages:
  python-dev-all
The following NEW packages will be installed:
  build-essential dpkg-dev fakeroot g++ g++-4.8 libalgorithm-diff-perl
  libalgorithm-diff-xs-perl libalgorithm-merge-perl libfakeroot
  libstdc++-4.8-dev python-colorama python-distlib python-html5lib python-pip
  python-setuptools python-wheel
The following packages will be upgraded:
  libdpkg-perl
1 upgraded, 16 newly installed, 0 to remove and 80 not upgraded.
Need to get 9,645 kB/9,744 kB of archives.
After this operation, 34.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Media change: please insert the disc labeled
 'Ubuntu 14.04.2 LTS _Trusty Tahr_ - Release amd64 (20150218.1)'
in the drive '/media/cdrom/' and press enter

I press enter and it repeats itself. Any advice on how to fix this problem?

Offline pooler

  • Litecoin Dev Team
  • Jr. Member
  • **
  • Posts: 165
Re: Electrum-LTC - Lightweight Litecoin Wallet
« Reply #350 on: April 19, 2015, 10:13:39 PM »
Im having troubles installing Electrum-LTC on Linux Ubuntu 14.04 LTS.
I follow the installation instructions and when i try to install phyton-pip i get a media change error (below)

Code: [Select]
Media change: please insert the disc labeled
 'Ubuntu 14.04.2 LTS _Trusty Tahr_ - Release amd64 (20150218.1)'
in the drive '/media/cdrom/' and press enter

Fairly simple issue, try any of the following:
http://askubuntu.com/questions/459237/when-i-try-to-install-my-kernel-headers-i-get-please-insert-the-disc-labeled-u
http://askubuntu.com/questions/178437/how-can-i-avoid-please-insert-cd-dvd-error-when-updating-ubuntu
http://askubuntu.com/questions/236288/apt-get-asks-me-to-insert-cd-why

Offline jamesltc

  • Newbie
  • *
  • Posts: 7
Re: Electrum-LTC - Lightweight Litecoin Wallet
« Reply #351 on: May 02, 2015, 07:52:05 AM »
Hi Pooler,

How to fix this problem?

File "/usr/lib/python2.7/tarfile.py", line 1729, in gzopen
   raise ReadError("not a gzip file")
ReadError: not a gzip file


I am running Fedora. I had met this problem on another machine, the same system Fedora.

Thank you




Offline pooler

  • Litecoin Dev Team
  • Jr. Member
  • **
  • Posts: 165
Re: Electrum-LTC - Lightweight Litecoin Wallet
« Reply #352 on: May 02, 2015, 08:41:38 AM »
How to fix this problem?

File "/usr/lib/python2.7/tarfile.py", line 1729, in gzopen
   raise ReadError("not a gzip file")
ReadError: not a gzip file

Do you get that when trying to install Electrum-LTC, or when running it? What commands did you issue, exactly?

Offline jamesltc

  • Newbie
  • *
  • Posts: 7
Re: Electrum-LTC - Lightweight Litecoin Wallet
« Reply #353 on: May 03, 2015, 06:27:09 AM »
Thanks for your quick reply.

I met this problem while installing the wallet. While doing this command:
" sudo pip install https://electrum-ltc.org/download/Electrum-LTC-1.9.8.6.tar.gz
electrum-ltc "

Thank you

Offline pooler

  • Litecoin Dev Team
  • Jr. Member
  • **
  • Posts: 165
Re: Electrum-LTC - Lightweight Litecoin Wallet
« Reply #354 on: May 03, 2015, 08:03:31 AM »
I met this problem while installing the wallet. While doing this command:
" sudo pip install https://electrum-ltc.org/download/Electrum-LTC-1.9.8.6.tar.gz
electrum-ltc "

Those two lines should be two separate commands.  Could you please report the full output of the following?

Code: [Select]
sudo pip install https://electrum-ltc.org/download/Electrum-LTC-1.9.8.6.tar.gz#md5=302329e0296c8ceb1f4644c2d410a45d

Offline CryptoCat

  • Full Member
  • ***
  • Posts: 254
  • Stay Calm ... in the face of Non Payment
Re: Electrum-LTC - Lightweight Litecoin Wallet
« Reply #355 on: May 03, 2015, 12:51:14 PM »
Hi,

Having the same problem as above. Below is the command line output

Code: [Select]
sudo pip install https://electrum-ltc.org/download/Electrum-LTC-1.9.8.6.tar.gz#md5=302329e0296c8ceb1f4644c2d410a45d
[sudo] password for ----:
Downloading/unpacking https://electrum-ltc.org/download/Electrum-LTC-1.9.8.6.tar.gz
  Downloading Electrum-LTC-1.9.8.6.tar.gz (845kB): 845kB downloaded
  Running setup.py (path:/tmp/pip-SGfuoK-build/setup.py) egg_info for package from https://electrum-ltc.org/download/Electrum-LTC-1.9.8.6.tar.gz
    Including all files
   
  Requirement already satisfied (use --upgrade to upgrade): Electrum-LTC==1.9.8.6 from https://electrum-ltc.org/download/Electrum-LTC-1.9.8.6.tar.gz in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): slowaes in /usr/lib/python2.7/dist-packages (from Electrum-LTC==1.9.8.6)
Requirement already satisfied (use --upgrade to upgrade): ecdsa>=0.9 in /usr/local/lib/python2.7/dist-packages (from Electrum-LTC==1.9.8.6)
Requirement already satisfied (use --upgrade to upgrade): ltc-scrypt in /usr/local/lib/python2.7/dist-packages (from Electrum-LTC==1.9.8.6)
Cleaning up...

----Daintree06:~$ electrum-ltc
Exception in thread Thread-5:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/electrum_ltc/interface.py", line 587, in run
    self.start_interface()
  File "/usr/local/lib/python2.7/dist-packages/electrum_ltc/interface.py", line 499, in start_interface
    self.start_tcp()
  File "/usr/local/lib/python2.7/dist-packages/electrum_ltc/interface.py", line 335, in start_tcp
    s = ssl.wrap_socket(s, ssl_version=ssl.PROTOCOL_SSLv3, cert_reqs=ssl.CERT_NONE, ca_certs=None)
  File "/usr/lib/python2.7/ssl.py", line 886, in wrap_socket
    ciphers=ciphers)
  File "/usr/lib/python2.7/ssl.py", line 560, in __init__
    self.do_handshake()
  File "/usr/lib/python2.7/ssl.py", line 783, in do_handshake
    self._sslobj.do_handshake()
error: [Errno 104] Connection reset by peer

Had the create wallet dialogue box with default choices and clicked next, and had same dialogue two more time till it looked like it fail and dropped out.

Not sure If I should hangout for v2.1 .

Cheers.

Offline pooler

  • Litecoin Dev Team
  • Jr. Member
  • **
  • Posts: 165
Re: Electrum-LTC - Lightweight Litecoin Wallet
« Reply #356 on: May 03, 2015, 01:02:14 PM »
Having the same problem as above. Below is the command line output

Code: [Select]
sudo pip install https://electrum-ltc.org/download/Electrum-LTC-1.9.8.6.tar.gz#md5=302329e0296c8ceb1f4644c2d410a45d
[sudo] password for ----:
Downloading/unpacking https://electrum-ltc.org/download/Electrum-LTC-1.9.8.6.tar.gz
  Downloading Electrum-LTC-1.9.8.6.tar.gz (845kB): 845kB downloaded
  Running setup.py (path:/tmp/pip-SGfuoK-build/setup.py) egg_info for package from https://electrum-ltc.org/download/Electrum-LTC-1.9.8.6.tar.gz
    Including all files
   
  Requirement already satisfied (use --upgrade to upgrade): Electrum-LTC==1.9.8.6 from https://electrum-ltc.org/download/Electrum-LTC-1.9.8.6.tar.gz in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): slowaes in /usr/lib/python2.7/dist-packages (from Electrum-LTC==1.9.8.6)
Requirement already satisfied (use --upgrade to upgrade): ecdsa>=0.9 in /usr/local/lib/python2.7/dist-packages (from Electrum-LTC==1.9.8.6)
Requirement already satisfied (use --upgrade to upgrade): ltc-scrypt in /usr/local/lib/python2.7/dist-packages (from Electrum-LTC==1.9.8.6)
Cleaning up...

----Daintree06:~$ electrum-ltc
Exception in thread Thread-5:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/electrum_ltc/interface.py", line 587, in run
    self.start_interface()
  File "/usr/local/lib/python2.7/dist-packages/electrum_ltc/interface.py", line 499, in start_interface
    self.start_tcp()
  File "/usr/local/lib/python2.7/dist-packages/electrum_ltc/interface.py", line 335, in start_tcp
    s = ssl.wrap_socket(s, ssl_version=ssl.PROTOCOL_SSLv3, cert_reqs=ssl.CERT_NONE, ca_certs=None)
  File "/usr/lib/python2.7/ssl.py", line 886, in wrap_socket
    ciphers=ciphers)
  File "/usr/lib/python2.7/ssl.py", line 560, in __init__
    self.do_handshake()
  File "/usr/lib/python2.7/ssl.py", line 783, in do_handshake
    self._sslobj.do_handshake()
error: [Errno 104] Connection reset by peer

Sorry but I can't see the connection between what you posted and what jamesltc posted.

Anyway, please try installing 2.0.5.1 instead of 1.9.8.6.

Offline jamesltc

  • Newbie
  • *
  • Posts: 7
Re: Electrum-LTC - Lightweight Litecoin Wallet
« Reply #357 on: May 04, 2015, 03:35:24 AM »
Thank you. Anyway, it is still working on my another PC. Yes, I would check for 2.0.5.1 later.

Offline pooler

  • Litecoin Dev Team
  • Jr. Member
  • **
  • Posts: 165
Re: Electrum-LTC - Lightweight Litecoin Wallet
« Reply #358 on: May 04, 2015, 07:24:15 AM »
Thank you. Anyway, it is still working on my another PC. Yes, I would check for 2.0.5.1 later.

My comments above were directed to CryptoCat, but feel free to try 2.0.5.1.

I would still like to see the output of what I posted here on the computer that was giving you trouble, though.

Offline jamesltc

  • Newbie
  • *
  • Posts: 7
Re: Electrum-LTC - Lightweight Litecoin Wallet
« Reply #359 on: May 04, 2015, 08:21:59 AM »
"Those two lines should be two separate commands.  Could you please report the full output of the following?"

Yes, I guess I did that separately. I did try again but this time ran well, it is successfully installed. I guess it maybe because I did
a update on my Fedora Lxde.