• Stars
    star
    480
  • Rank 91,172 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 10 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A bitcoin wallet and blockchain explorer for your terminal.

termcoin

Termcoin is no longer maintained

Note that termcoin is no longer maintained. It is not recommended for use.


termcoin bitcoin wallet and blockchain explorer for your terminal, written for node.js

termcoin's UI is rendered by blessed which is a full ncurses replacement and high-level widget library. Expect mouse support, eye-candy hover effects, and so-on.

termcoin's bitcoin implementation is now based on BCoin which fully implements BIP-37's description of bloom filters. This basically means you don't have to download the entire blockchain to use your wallet. You ask for and store only the transactions relevant to you (broadcasted in your bloom filter), while at the same time being able to verify the merkleroot of blocks.

The blockchain explorer currently uses the blockchain.info json api as a backend. In the future, termcoin will leave an option for the user to download the entire blockchain in the background (using bcoin - out of sheer obsession, I implemented the original satoshi protocol in bcoin), which means you will be able to explore the blockchain on your local disk instead of waiting for api calls to return.

For data management, termcoin uses tiny as the database necessary to store the (small) blockchain data and transactions relevant to your account.

BCoin was conceived brilliantly, and Fedor Indunty also went to the trouble of writing an ecdsa and bignumber library in pure javascript to supplement BCoin.

With all this being said, it's worth pointing out that termcoin is written entirely in pure javascript.

All of this means:

  • No compiling a database binding
  • No compiling a binding to an ecdsa library
  • No linking to ncurses
  • No running a bitcoin rpc server in the background
  • No downloading a 20gb blockchain
  • Just use your wallet and enjoy!

Termcoin uses a basic JSON wallet format with private keys that are compatible with bitcoind's importprivkey/dumpprivkey (128-prefixed+checksumed+base58) keys. (It also supports AES-CBC encryption for your private keys, just like the official bitcoin client).

NOTE: Termcoin used to use bitcoind/litecoind/etc as a backend. This backend is still supported for other currencies. It's just not as featureful due to limitations in the [coin]d rpc server.

Screenshots

Install

# If Debian:
$ sudo apt-get install nodejs
# If Arch:
$ sudo pacman -S nodejs
$ sudo npm install termcoin -g
$ termcoin

Usage

$ termcoin

Import your bitcoind wallet

$ bitcoind dumpwallet ~/wallet.dump
$ termcoin --import-wallet ~/wallet.dump
# Open our much nicer format:
$ less ~/.termcoin/wallet.json

Example Wallet

{
  "version": 1,
  "ts": 1402363259,
  "encrypted": false,
  "compressed": true,
  "balance": "0.10981134",
  "accounts": [
    {
      "address": "1Lzcrow4haAm6j4vyKhMeFQdHcaE1VbjTc",
      "label": "main",
      "priv": "L2bka1uvakQDLabdoPuYEwtTd8a416fjhHyEq99nmaDYeuotsfeG",
      "pub": "nFB3c1yquakfoEE1A98q1HX9hjCp3kAx3a5UHeNvfwMj",
      "balance": "0.00993134",
      "tx": 32
    },
    {
      "address": "1Q3tMMNWdu3pqqhc3Hdt3L5gS26P7FdtyD",
      "label": "secondary",
      "priv": "L2ACa1uvakQDLabdoPuaEwtTd8a416fjhHyEq99nmaDYeuotsfHf",
      "pub": "hY29VUa4xfrs4vDUd4aF3cjkMoH5xegU6VzGNBqjTtCm",
      "balance": "0.09488",
      "tx": 10
    },
    {
      "address": "1BKrkLFuyM8BsS5DuwrhPXKc8uFYmsCAAn",
      "label": "test",
      "priv": "L2KEa1uvakQDLabdoPuuEwtTd8a416fjhHyEq99nmaDYeuotsEya",
      "pub": "26srZooFArAzwtQiiQx9LZWTaCupwoVS6QTdQ7CX3QyGa",
      "balance": "0.005",
      "tx": 5
    }
  ],
  "recipients": {
    "195cjSkBUZtpw7ue7mTB6MheP8c3wLkaJe": "noodles",
    "1RVx9Ezsa3zSMc1QteHnaiTXJ64foyAGe": "maxie"
  }
}

Dump your wallet to the standard format

$ termcoin --dump-wallet
$ bitcoin importwallet ~/wallet.dump

Other cryptocurrencies

termcoin by default tries to connect to the rpc server in ~/.{coin}/{coin}.conf, but it can also be specified directly:

$ termcoin http://coinrpc:foobar@localhost:8332/

To explicitly use for other cryptocurrencies (this will sadly use litecoind, rather than a native litecoin implementation):

$ termcoin -c litecoin

Advantages

  • Runs in a terminal. Possible to use over ssh. Easier than using bitcoind directly.
  • No compilation required.
  • No 20gb blockchain download required.
  • Easy wallet management (does it get easier than a json file?)
  • Can optionally use bitcoind as a backend, which means it is also possible to use with litecoin/namecoin/dogecoin/etc.

Optional External Dependencies

These aren't necessary, but they might make things nicer for you.

  • qrencode - for QR codes rendered in your terminal.
  • xsel/xclip - clipboard support for X11.
  • pbcopy - clipboard support for OSX.

Donations

  • BTC: 14UwZi7hY2gQKUvA1Poz7vyxK9SzwAJ6CR
  • LTC: Lg2FyTZn1YRGMUAbL5xYhmjiCZvWM6f2Z1
  • DOGE: DAwtjssd9y3HQp5vTXqZhsdshxkDzDXoRT
  • COYE: 5Vqi6WYbK6fixQ4A1ypiJZXJtJkMBnAfpu

Dislaimer and Note

It is your own responsibility to backup and keep your wallet/privkeys safe. The termcoin developer(s) will not be responsible if your coins are lost, deleted, or stolen.

Termcoin automatically makes a backup of your wallet every time you write to it. Keep this in mind when encrypting it.

Contribution and License Agreement

If you contribute code to this project, you are implicitly allowing your code to be distributed under the MIT license. You are also implicitly verifying that all code is your original work. </legalese>

License

Copyright (c) 2014, Christopher Jeffrey. (MIT License)

See LICENSE for more info.

More Repositories

1

blessed

A high-level terminal interface library for node.js.
JavaScript
11,260
star
2

tty.js

A terminal for your browser, using node/express/socket.io
JavaScript
4,184
star
3

ttystudio

A terminal-to-gif recorder minus the headaches.
JavaScript
3,237
star
4

compton

A compositor for X11.
C
2,245
star
5

term.js

A terminal written in javascript.
JavaScript
1,547
star
6

pty.js

Bindings to forkpty(3) for node.js.
C++
855
star
7

mako

Bitcoin node written in C
C
572
star
8

liburkel

Authenticated key-value store (i.e. an urkel tree)
C
303
star
9

zest

An absurdly fast CSS selector engine.
JavaScript
238
star
10

slock

Fork of suckless screen locker for the extremely paranoid.
C
152
star
11

tiny

A small database for node.js.
JavaScript
111
star
12

lcdb

LevelDB implemented in C (unofficial -- not affiliated with Google in any way)
C
94
star
13

bns

Recursive DNS server and resolver for node.js
JavaScript
66
star
14

parted

Streaming body parser for node.js.
JavaScript
63
star
15

bthreads

worker threads for javascript
JavaScript
48
star
16

bpkg

Bundler and release tool for node.js
JavaScript
44
star
17

tng

A full-featured PNG renderer for the terminal.
JavaScript
41
star
18

coined

A high-level wrapper around BCoin
JavaScript
25
star
19

node-uo

A UO server for node.js
JavaScript
25
star
20

n64

Int64 object for javascript
JavaScript
24
star
21

liquor

A templating engine minus the code.
JavaScript
19
star
22

daemonic

A dead-simple module to daemonize a node. No compilation required.
JavaScript
19
star
23

node-telnet2

Telnet implementation for node.js, based on node-telnet
JavaScript
18
star
24

gitj

gitk in your terminal.
JavaScript
15
star
25

node-pingback

pingbacks for node.js
JavaScript
15
star
26

dilated

A blog for node.js.
JavaScript
14
star
27

csslike

A CSS preprocessor for node.js, designed to conform to the most recent www-style proposals.
CSS
12
star
28

cmake-node

node.js toolchain for cmake
C
11
star
29

rondo

DOM library and app framework.
JavaScript
11
star
30

st

A fork of st implementing scrollback, keyboard selection, and tabs.
C
11
star
31

highlighter.js

a quick and dirty JS highlighter
JavaScript
10
star
32

charged

High-level Chargify API binding for node.js
JavaScript
10
star
33

supersha

Fast SHA256 for node.js
C
10
star
34

dwm

My dwm fork and configuration.
C
10
star
35

tmux

A fork of tmux implementing xterm behavior.
C
8
star
36

vanilla

A framework for node.js.
JavaScript
8
star
37

Live-Stylesheets

small google chrome extension for editing a page's raw css
JavaScript
8
star
38

shim.htc

An HTML5 Shim in an HTML Component
JavaScript
8
star
39

epsilon-not

Weblog
PHP
5
star
40

unbound

Bindings to libunbound for node.js
C
5
star
41

evilpart

A Node multipart parser that is positively evil
JavaScript
5
star
42

N

pretty control for js
JavaScript
5
star
43

nmterm

A wicd-curses-like interface for NetworkManager
JavaScript
5
star
44

pulsemixer.js

An alsamixer-like interface for PulseAudio
JavaScript
4
star
45

rocksdown

RocksDB backend for LevelUP
C++
4
star
46

bsert

Minimal assertions for javascript
JavaScript
4
star
47

bitcoind.js

bitcoind.js has moved to https://github.com/bitpay/bitcoind.js
C++
4
star
48

wazm

WASM abstraction and EMCC preamble
JavaScript
3
star
49

babylonia

zero-dependency babel
JavaScript
3
star
50

bslint

eslint with less (or more) bullshit
JavaScript
3
star
51

bdoc

zero-dependency jsdoc
JavaScript
3
star
52

pkg-verify

Dependency verifier for node.js
JavaScript
3
star
53

buffer-map

Buffer-keyed map for javascript
JavaScript
2
star
54

loady

dynamic loader for node.js
JavaScript
2
star
55

qrsuite

jsqrcode and qr.js rolled into one package
JavaScript
1
star