Author

Topic: TermWallet - Lightweight Command-Line Wallet (Read 2270 times)

newbie
Activity: 7
Merit: 0
January 18, 2015, 12:54:39 PM
#19
No new features, but just made headway in refactoring the termWallet codebase.  It is now a lot quicker to develop.  See the source code on the github page (https://github.com/grayleonard/termwallet).  My next planned update is adding address labels.

Thanks! I was looking for this feature so long! Is this option also available when restoring address(es)?

   ~~MZ~~

Yes, but it will be a bit more complicated to add.  However, it is an important feature, and something I've planned on adding. I will let you know how it's progressing.
hero member
Activity: 560
Merit: 509
I prefer Zakir over Muhammed when mentioning me!
Code:
Usage: restore [options]
        Options:
          -t, --time
             Replay blockchain starting from this time (UNIX epoch time)
             Default: 1421548754

The blockchain is replayed from the time parameter, which defaults to the current time.  It is in the format of UNIX Epoch time (converter here: http://www.epochconverter.com/).  If addresses in the wallet have past transactions, set the time to the first transaction (or, to be safe, a little bit before).

Thanks! I was looking for this feature so long! Is this option also available when restoring address(es)?

   ~~MZ~~
legendary
Activity: 1064
Merit: 1000
Pushed a new update today. You can now restore a HD wallet with its BIP-39 mnemonic code, here is how to use it:

Code:
restore      Create a wallet based on a BIP-39 mnemonic seed
      Usage: restore [options]
        Options:
          -t, --time
             Replay blockchain starting from this time (UNIX epoch time)
             Default: 1421548754

Example:
$ termwallet restore -t 1409478661
Seed: yard impulse luxury drive today throw farm pepper survey wreck glass federal

Once run, it will prompt you for the 12-word mnemonic code and automatically restore the wallet.  The blockchain is replayed from the time parameter, which defaults to the current time.  It is in the format of UNIX Epoch time (converter here: http://www.epochconverter.com/).  If addresses in the wallet have past transactions, set the time to the first transaction (or, to be safe, a little bit before).

THIS IS AWESOME!!!  I love the ability to do this straight CLI. I deleted the wallet.dat and restored from seed quickly.
newbie
Activity: 7
Merit: 0
Pushed a new update today. You can now restore a HD wallet with its BIP-39 mnemonic code, here is how to use it:

Code:
restore      Create a wallet based on a BIP-39 mnemonic seed
      Usage: restore [options]
        Options:
          -t, --time
             Replay blockchain starting from this time (UNIX epoch time)
             Default: 1421548754

Example:
$ termwallet restore -t 1409478661
Seed: yard impulse luxury drive today throw farm pepper survey wreck glass federal

Once run, it will prompt you for the 12-word mnemonic code and automatically restore the wallet.  The blockchain is replayed from the time parameter, which defaults to the current time.  It is in the format of UNIX Epoch time (converter here: http://www.epochconverter.com/).  If addresses in the wallet have past transactions, set the time to the first transaction (or, to be safe, a little bit before).
newbie
Activity: 7
Merit: 0
Yes, there is, thanks for reminding me.  I'm looking into it, hopefully I'll add basic multisig functionality soon.

Wonderful. This is such a nice lightweight implementation. I daresay this would run on smaller platforms.


Look really nice and light. It's only for OSX or Linux?! How can I make it run on Windows?

The only reason why there is no installation script currently for it is because I don't have a Windows machine. 

However, it already has the capability to run right away with the caveat that there will be no short alias for it. If you unzip 'termwallet.zip' (which you can get on the github page, link at OP), you will see 'termwallet.bat' in the folder 'termwallet-repo/bin/'.  If you run this in the windows command prompt it should run (untested by me, of course).  Let me know the results!
hero member
Activity: 560
Merit: 509
I prefer Zakir over Muhammed when mentioning me!
Look really nice and light. It's only for OSX or Linux?! How can I make it run on Windows?

AFAIK You will have to install dependencies for BitcoinJ and look the guide[1] for running install.sh in windows.

[1] http://stackoverflow.com/questions/16772202/how-to-run-script-sh-in-windows-git-shell

   ~~MZ~~
full member
Activity: 190
Merit: 100
Yes, there is, thanks for reminding me.  I'm looking into it, hopefully I'll add basic multisig functionality soon.

Wonderful. This is such a nice lightweight implementation. I daresay this would run on smaller platforms.


Look really nice and light. It's only for OSX or Linux?! How can I make it run on Windows?
legendary
Activity: 1064
Merit: 1000
Yes, there is, thanks for reminding me.  I'm looking into it, hopefully I'll add basic multisig functionality soon.

Wonderful. This is such a nice lightweight implementation. I daresay this would run on smaller platforms.
newbie
Activity: 7
Merit: 0
Just pushed an update, here's whats changed:
  • Wallet deletion in the 'panic' command is more secure; the wallet files are overwritten with random bytes before deletion.
  • Wallet decryption for transactions is handled better:  transactions now take the decryption key directly, so now the whole wallet is not decrypted and then encrypted again when a transaction is made.
  • Small usability change, if you enter a password incorrectly TermWallet doesn't exit anymore, and you can try again.

Update TermWallet by running the same command used to install, which is located in the original post.

I don't know a lot about bitcoinj but is there chance for multisig support in the future?

Yes, there is, thanks for reminding me.  I'm looking into it, hopefully I'll add basic multisig functionality soon.
legendary
Activity: 1064
Merit: 1000

This is amazing. Geek heaven Grin

Any plans for expansion?

Smiley Thanks. In the short term, I plan on cleaning up the code and adding the ability to give labels to addresses.   I am also weighing the merits of adding a command-line GUI - I don't want to get bogged down with GUI code but it looks like it's wanted.

I love command-line wallets and things of that nature for bitcoin. I can't wait to check it out.  Smiley


EDIT: Installation was smooth, it is really nice. I love that "panic" feature.

Good to hear installation worked. And yes, I was surprised pretty much all other wallets don't have a panic feature - hopefully more implement them.  I'm planning to focus on security and privacy in TermWallet, and any suggestions to make it better are welcome Smiley 

A little tip: I use the panic feature to clean up my wallet - you can send your BTCs to an address in your own wallet (just make sure you don't also delete it!)

I don't know a lot about bitcoinj but is there chance for multisig support in the future?
newbie
Activity: 7
Merit: 0

This is amazing. Geek heaven Grin

Any plans for expansion?

Smiley Thanks. In the short term, I plan on cleaning up the code and adding the ability to give labels to addresses.   I am also weighing the merits of adding a command-line GUI - I don't want to get bogged down with GUI code but it looks like it's wanted.

I love command-line wallets and things of that nature for bitcoin. I can't wait to check it out.  Smiley


EDIT: Installation was smooth, it is really nice. I love that "panic" feature.

Good to hear installation worked. And yes, I was surprised pretty much all other wallets don't have a panic feature - hopefully more implement them.  I'm planning to focus on security and privacy in TermWallet, and any suggestions to make it better are welcome Smiley 

A little tip: I use the panic feature to clean up my wallet - you can send your BTCs to an address in your own wallet (just make sure you don't also delete it!)
legendary
Activity: 1064
Merit: 1000
I love command-line wallets and things of that nature for bitcoin. I can't wait to check it out.  Smiley


EDIT: Installation was smooth, it is really nice. I love that "panic" feature.
legendary
Activity: 1051
Merit: 1000
https://r.honeygain.me/XEDDM2B07C
This is amazing. Geek heaven Grin

Any plans for expansion?
newbie
Activity: 7
Merit: 0
Thanks all, I appreciate the support Kiss

Cool! Tip sent Smiley

You might want to look at this project:

https://code.google.com/p/lanterna/

It could be used to create a pseudo-graphical updating list of transactions, like if you want to have your wallet running inside a screen rather than pure command line based.

If you made an installation procedure that didn't involve catting random shell scripts to a root shell, perhaps you could get it listed on bitcoin.org Smiley



Hi Mike, thanks for the tip.

I've experimented with a curses-like GUI for TermWallet before, but couldn't find an easy-to-use library for it.  Lanterna looks good though, I'll play around with it.  I've also been looking at Charva, seems interesting: http://www.pitman.co.za/projects/charva/index.html

And yes, the current installation procedure isn't the most trustworthy; currently planning to refactor some code, perhaps add a GUI, and then find a more stable release platform.  Updates to follow.
sr. member
Activity: 420
Merit: 250
Nice! Wink

I'll try and use it on a free VPS for absolutely no reason. Cheesy
hero member
Activity: 560
Merit: 509
I prefer Zakir over Muhammed when mentioning me!
Nice project! Would be good if you add GUI to it! Smiley

   ~~MZ~~
legendary
Activity: 1526
Merit: 1134
Cool! Tip sent Smiley

You might want to look at this project:

https://code.google.com/p/lanterna/

It could be used to create a pseudo-graphical updating list of transactions, like if you want to have your wallet running inside a screen rather than pure command line based.

If you made an installation procedure that didn't involve catting random shell scripts to a root shell, perhaps you could get it listed on bitcoin.org Smiley

legendary
Activity: 1708
Merit: 1066
Very nice !

:-)
newbie
Activity: 7
Merit: 0
I'm excited to release a project I've been working on the past few months, which has reached a point of usability and stability I'm finally satisfied with.  It uses the latest bitcoinj version, currently 0.12.2.

TermWallet

TermWallet is a bitcoinj-based wallet tailor-made for the command line.  It does not download the whole blockchain, and as a result the blockchain data only take up about a megabyte of space.  Small servers with limited HDD space are thus the ideal use-case for TermWallet.  Generated addresses are deterministic (HD) by default, using the BIP32 specification, but external private keys can also be imported into the wallet.

TermWallet can make transactions using only one address's outputs by including a novel adaption of bitcoinj's CoinSelector method, IndividualCoinSelector.  Previously, bitcoinj (and subsequently bitcoinj-based wallets such as Multibit) has not been able to select outputs from only one address.  IndividualCoinSelector provides this capability. Use the "-f (--from)" option while using the "send" command to designate the address to send from.

An encryption function is included, currently only encrypting private keys. Further, TermWallet provides a 'panic' command that can send all the BTC's in the wallet to an external address and, optionally, delete the wallet (including all files). This should be used if the computer is compromised or at risk.  No private keys will be easily recoverable.

An experimental function is provided to connect to the blockchain through Tor.  Use "-t" or "--tor" to use it.

To view the full usage menu, use "termwallet --help"

Install Instructions

Full Source Code: https://github.com/grayleonard/termwallet

Requirements:
OSX or Linux
Java 1.6 (bitcoinj requirement)

Quick Install:
Code:
wget -O - https://raw.githubusercontent.com/grayleonard/termwallet/master/install.sh | sh
You may need to run
Code:
wget -O - https://raw.githubusercontent.com/grayleonard/termwallet/master/install.sh | sudo sh
if permission is denied (note the 'sudo')

If you want to build from source:
Code:
git clone https://github.com/grayleonard/termwallet.git
cd termWallet
./build.sh
(Maven2 is required to build the project)

Get started by running 'termwallet new'. It creates a new address. Examples below.

Contributions and bug reports are welcomed, just make a pull request or open an issue.

"Screenshots"
Code:
[term@wallet]$ termwallet status
Connecting to and downloading blockchain...
Finished downloading blockchain...

Your addresses and their balances:
Deterministic Keys:
157tPz2zUc7Q843bRXhbN2PgNRJwFP3tBi      Balance: BTC 0.00
1QECpf8AjyZMCEV54uhKccRd6ueYiUHhik      Balance: BTC 0.00
18PcKRUNkq26JN3sXx9VGmch5Guj2JX9q8      Balance: BTC 0.00
1pXcUE8PJy8VdP4dPfttr3FyUCBwmStfH       Balance: BTC 0.00

Confirmed: BTC 0.00
Unconfirmed: BTC 0.00

Code:
[term@wallet]$ termwallet import
Connecting to and downloading blockchain...
Finished downloading blockchain...

Private key: correct horse battery staple
Creating ECKey ECKey{pub=047e225fa4260a6b6ce741170396462629115f52fe5305830df1c2acce10250f11a16e5a2a0816c677c4506db3a4b8f73f3ea97d538488674f84e20d40956751fc, isEncrypted=false}...
Added new ECKey, address 1EnngHuGmcjz781rYV5KXw4FAcwXi5o4ei to wallet...

Code:
[term@wallet]$ termwallet new
Connecting to and downloading blockchain...
Finished downloading blockchain...

New Address 1L54YBPbPQAhMnxCmQedNeSuXp63RHCKdG with purpose RECEIVE_FUNDS

Donation address: 1L54YBPbPQAhMnxCmQedNeSuXp63RHCKdG  Wink
Jump to: