Version 0.9.6
This commit is contained in:
parent
d3e96744fe
commit
83e9899b38
69 changed files with 544 additions and 390 deletions
|
|
@ -109,7 +109,7 @@ future use in an address file, which addresses may safely be made public.
|
|||
|
||||
> #### [Recovering your keys without the MMGen software][r]
|
||||
|
||||
> #### [Forkcoin and Altcoin support (BCH,LTC,ETH,ETC,DASH,ZEC)][x]
|
||||
> #### [Forkcoin and Altcoin support (BCH,LTC,ETH,ETC,ZEC,XMR and 144 Bitcoin-derived alts)][x]
|
||||
|
||||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
|
|
|
|||
|
|
@ -73,15 +73,16 @@ binaries are available for Bitcoin Core, Bitcoin ABC and Litecoin. See the
|
|||
$ cd src
|
||||
$ sudo install -sv litecoind litecoin-cli /usr/local/bin
|
||||
|
||||
> To simplify the starting and stopping of several daemons on the same machine,
|
||||
> download and use the node start and stop scripts from the MMGenLive project:
|
||||
Refer to [Run][02] on the binary installation page for instructions on running
|
||||
your coin daemon(s).
|
||||
|
||||
Alternatively, you may download and use the node start and stop scripts from the
|
||||
MMGenLive project, which simplify starting and stopping multiple daemons on the
|
||||
same machine:
|
||||
|
||||
$ curl -O 'https://raw.githubusercontent.com/mmgen/MMGenLive/master/home.mmgen/bin/mmlive-node-{start,stop}'
|
||||
$ sudo install -v mmlive-node-{start,stop} /usr/local/bin
|
||||
|
||||
Refer to [Run][02] on the binary installation page for instructions on running
|
||||
your coin daemon(s).
|
||||
|
||||
[01]: Install-Bitcoind
|
||||
[02]: Install-Bitcoind#a_r
|
||||
[bu]: https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
> Install required Debian/Ubuntu packages:
|
||||
|
||||
$ sudo apt-get install python-pip python-dev python-pexpect python-ecdsa python-scrypt libssl-dev git autoconf libtool wipe python-setuptools libgmp-dev
|
||||
$ sudo apt-get install python-dev python-pexpect python-ecdsa python-scrypt libssl-dev git autoconf libtool wipe python-setuptools libgmp-dev python-crypto python-nacl python-pysha3 python-pip
|
||||
|
||||
> Install the Python Cryptography Toolkit:
|
||||
> Install fast ed25519 Python package (optional, but recommended for Monero addresses):
|
||||
|
||||
$ sudo -H pip install pycrypto
|
||||
$ sudo pip install ed25519ll
|
||||
|
||||
> Install the secp256k1 library:
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,36 @@ Grab the latest python-ecdsa [tarball][03], unpack and build:
|
|||
$ cd ecdsa-0.13
|
||||
$ python setup.py install
|
||||
|
||||
### 6. Install the colorama Python module:
|
||||
### 6. Install the ed25519ll Python module (required for Monero address generation):
|
||||
|
||||
Grab the latest ed25519ll [tarball][43], unpack and build:
|
||||
|
||||
$ cd /build
|
||||
$ tar -xzf <path to ed25519ll archive>/ed25519ll-0.6.tar.gz
|
||||
$ cd ed25519ll-0.6
|
||||
|
||||
Open the file `setup.py` in your text editor. Change the line reading
|
||||
|
||||
plat_name = get_platform().replace('-', '_')
|
||||
|
||||
to read
|
||||
|
||||
plat_name = 'win64'
|
||||
|
||||
Exit the editor and run:
|
||||
|
||||
$ python setup.py install
|
||||
|
||||
### 7. Install the pysha3 Python module (required for Monero and Ethereum address generation):
|
||||
|
||||
Grab the latest pysha3 [tarball][44], unpack and build:
|
||||
|
||||
$ cd /build
|
||||
$ tar -xzf <path to pysha3 archive>/pysha3-1.0.2.tar.gz
|
||||
$ cd pysha3-1.0.2
|
||||
$ python setup.py install
|
||||
|
||||
### 8. Install the colorama Python module:
|
||||
|
||||
Grab the latest colorama [tarball][14], unpack and build:
|
||||
|
||||
|
|
@ -108,7 +137,7 @@ Grab the latest colorama [tarball][14], unpack and build:
|
|||
$ cd colorama-0.3.7
|
||||
$ python setup.py install
|
||||
|
||||
### 7. Install the pexpect Python module (needed for test suite):
|
||||
### 9. Install the pexpect Python module (needed for test suite):
|
||||
|
||||
Grab the latest pexpect [tarball][15], unpack and build:
|
||||
|
||||
|
|
@ -117,12 +146,12 @@ Grab the latest pexpect [tarball][15], unpack and build:
|
|||
$ cd pexpect-4.2.1
|
||||
$ python setup.py install
|
||||
|
||||
### 8. Install sdelete utility (needed for secure wallet deletion):
|
||||
### 10. Install sdelete utility (needed for secure wallet deletion):
|
||||
|
||||
Grab the latest SDelete [zip archive][16], unzip and copy `sdelete.exe` to
|
||||
your execution path (`c:\windows`, for example).
|
||||
|
||||
### 9. Build libsecp256k1:
|
||||
### 11. Build libsecp256k1:
|
||||
|
||||
Libsecp256k1 requires GNU autotools to build, and they're not included in the
|
||||
MinGW-64 distribution for some reason, so you'll have to retrieve and unpack
|
||||
|
|
@ -155,7 +184,7 @@ install:
|
|||
$ make
|
||||
$ make install
|
||||
|
||||
### 10. Install MMGen:
|
||||
### 12. Install MMGen:
|
||||
|
||||
Get the [zip archive][10] of the latest stable version from GitHub, unpack and install:
|
||||
|
||||
|
|
@ -185,3 +214,5 @@ the MMGen test suite to make sure your installation's working:
|
|||
[32]: https://sourceforge.net/projects/mingw/files/MinGW/Extension/automake/automake1.11/automake1.11-1.11.1-1/automake1.11-1.11.1-1-mingw32-bin.tar.lzma
|
||||
[33]: https://sourceforge.net/projects/mingw/files/MinGW/Extension/libtool/libtool-2.4-1/libtool-2.4-1-mingw32-bin.tar.lzma
|
||||
[77]: Install-Bitcoind
|
||||
[43]: https://pypi.python.org/packages/8a/34/b27ee501205893cf7cc537b4e6553a557eaaca14c4755aa1eaa500afac57/ed25519ll-0.6.tar.gz#md5=35b3190ffefb631e7c5a45d96d768f80
|
||||
[44]: https://pypi.python.org/packages/73/bf/978d424ac6c9076d73b8fdc8ab8ad46f98af0c34669d736b1d83c758afee/pysha3-1.0.2.tar.gz#md5=59cd2db7a9988c1f3f6aee40145e0c96
|
||||
|
|
|
|||
|
|
@ -27,7 +27,10 @@
|
|||
* <a href='#a_rbf_onl'>With an online (hot) wallet</a>
|
||||
* <a href='#a_rbf_onf'>With an offline (cold storage) wallet</a>
|
||||
|
||||
#### <a href='#a_alt'>Forkcoin and Altcoin support (BCH,LTC)</a>
|
||||
#### <a href='#a_alt'>Forkcoin and Altcoin support</a>
|
||||
* <a href='#a_bch'>Full support for Bcash (BCH) and Litecoin</a>
|
||||
* <a href='#a_es'>Enhanced key/address generation support for Zcash (ZEC) and Monero (XMR)</a>
|
||||
* <a href='#a_kg'>Key/address generation support for ETH, ETC and 144 Bitcoin-derived altcoins</a>
|
||||
|
||||
### <a name='a_i'>Preliminaries</a>
|
||||
|
||||
|
|
@ -146,7 +149,9 @@ printed out on paper.
|
|||
Another highly recommended way to back up your wallet is to generate a mnemonic
|
||||
or seed file <a href='#a_ms'>as described below </a> and memorize it. If you
|
||||
have an average or better memory, you'll find memorizing your mnemonic to be
|
||||
surprisingly easy.
|
||||
surprisingly easy. And the peace of mind that comes with knowing that your coins
|
||||
are recoverable **even if you lose all your physical backups** can't be
|
||||
overestimated.
|
||||
|
||||
#### <a name='a_ga'>Generate addresses (offline computer)</a>
|
||||
|
||||
|
|
@ -848,11 +853,15 @@ them in turn until you get a confirmation:
|
|||
$ mmgen-txsend 124FFF[0.1,150].sigtx # ...if this doesn't confirm, then
|
||||
$ mmgen-txsend 73DABB[0.1,200].sigtx
|
||||
|
||||
### <a name='a_alt'>Forkcoin and Altcoin support (BCH,LTC)</a>
|
||||
### <a name='a_alt'>Forkcoin and Altcoin support</a>
|
||||
|
||||
To use MMGen with Bitcoin Cash (BCH) or Litecoin (LTC), first make sure the
|
||||
Bitcoin ABC or Litecoin daemon is properly installed
|
||||
([source][si])([binaries][bi]), [running][p8] and synced.
|
||||
#### <a name='a_bch'>Full support for Bcash (BCH) and Litecoin</a>
|
||||
|
||||
Bcash and Litecoin are fully supported by MMGen, on the same level as Bitcoin.
|
||||
|
||||
To use MMGen with Bcash or Litecoin, first make sure the respective Bitcoin ABC
|
||||
and Litecoin daemons are properly installed ([source][si])([binaries][bi]),
|
||||
[running][p8] and synced.
|
||||
|
||||
MMGen requires that the bitcoin-abc daemon be listening on non-standard
|
||||
[RPC port 8442][p8].
|
||||
|
|
@ -860,6 +869,84 @@ MMGen requires that the bitcoin-abc daemon be listening on non-standard
|
|||
Then just add the `--coin=bch` or `--coin=ltc` option to all your MMGen
|
||||
commands. It's that simple!
|
||||
|
||||
#### <a name='a_es'>Enhanced key/address generation support for Zcash (ZEC) and Monero (XMR)</a>
|
||||
|
||||
MMGen's enhanced key/address generation support for Zcash and Monero includes
|
||||
**Zcash z-addresses** and automated Monero wallet creation.
|
||||
|
||||
Generate ten Zcash z-address key/address pairs from your default wallet:
|
||||
|
||||
$ mmgen-keygen --coin=zec --type=zcash_z 1-10
|
||||
|
||||
The addresses' view keys are included in the file as well.
|
||||
|
||||
NOTE: Since your key/address file will probably be used on an online computer,
|
||||
you should encrypt it with a good password when prompted to do so. The file can
|
||||
decrypted as required using the `mmgen-tool decrypt` command. If you choose a
|
||||
non-standard Scrypt hash preset, take care to remember it.
|
||||
|
||||
To generate Zcash t-addresses, just omit the `--type` argument:
|
||||
|
||||
$ mmgen-keygen --coin=zec 1-10
|
||||
|
||||
Generate ten Monero address pairs from your default wallet:
|
||||
|
||||
$ mmgen-keygen --coin=xmr 1-10
|
||||
|
||||
In addition to spend and view keys, Monero key/address files also include a
|
||||
wallet password for each address (the password is the double Sha256 of the spend
|
||||
key, truncated to 16 bytes). This allows you to easily generate wallets for
|
||||
each address by running the following command
|
||||
|
||||
$ monero-wallet-cli --generate-from-spend-key MyMoneroWallet
|
||||
|
||||
and pasting in the key and password data when prompted. Monerod must be
|
||||
running and `monero-wallet-cli` be located in your executable path.
|
||||
|
||||
This process is completely automated by the `mmgen-tool` utility:
|
||||
|
||||
$ mmgen-tool keyaddrlist2monerowallet *XMR*.akeys.mmenc
|
||||
|
||||
This will generate Monero wallets for each key/address pair in the key/address
|
||||
file and encrypt them with their respective passwords. No user interaction is
|
||||
required. By default, wallets are synced to the current block height, as
|
||||
they're assumed to be empty. This behavior can be overridden:
|
||||
|
||||
$ mmgen-tool keyaddrlist2monerowallet *XMR*.akeys.mmenc blockheight=123456
|
||||
|
||||
#### <a name='a_kg'>Key/address generation support for ETH, ETC and 144 Bitcoin-derived altcoins</a>
|
||||
|
||||
To generate key/address pairs for these coins, just specify the coin's symbol
|
||||
with the `--coin` argument:
|
||||
|
||||
# For DASH:
|
||||
$ mmgen-keygen --coin=dash 1-10
|
||||
# For Emercoin:
|
||||
$ mmgen-keygen --coin=emc 1-10
|
||||
|
||||
If it's just the addresses you want, then use `mmgen-addrgen` instead:
|
||||
|
||||
$ mmgen-addrgen --coin=dash 1-10
|
||||
|
||||
Regarding encryption of key/address files, see the note for Zcash above.
|
||||
|
||||
Here's a complete list of supported altcoins as of this writing:
|
||||
|
||||
2give,42,611,ac,acoin,alf,anc,apex,arco,arg,aur,bcf,blk,bmc,bqc,bsty,btcd,
|
||||
btq,bucks,cann,cash,cat,cbx,ccn,cdn,chc,clam,con,cpc,crps,csh,dash,dcr,dfc,
|
||||
dgb,dgc,doge,doged,dope,dvc,efl,emc,emd,enrg,esp,fai,fc2,fibre,fjc,flo,flt,
|
||||
fst,ftc,gcr,good,grc,gun,ham,html5,hyp,icash,infx,inpay,ipc,jbs,judge,lana,
|
||||
lat,ldoge,lmc,ltc,mars,mcar,mec,mint,mobi,mona,moon,mrs,mue,mxt,myr,myriad,
|
||||
mzc,neos,neva,nka,nlg,nmc,nto,nvc,ok,omc,omni,onion,onx,part,pink,pivx,pkb,
|
||||
pnd,pot,ppc,ptc,pxc,qrk,rain,rbt,rby,rdd,ric,sdc,sib,smly,song,spr,start,
|
||||
sys,taj,tit,tpc,trc,ttc,tx,uno,via,vpn,vtc,wash,wdc,wisc,wkc,wsx,xcn,xgb,
|
||||
xmg,xpm,xpoke,xred,xst,xvc,zet,zlq,zoom,zrc,bch,etc,eth,ltc,xmr,zec
|
||||
|
||||
Note that support for these coins is EXPERIMENTAL. Many of them have received
|
||||
only minimal testing, or no testing at all. At startup you'll be informed of
|
||||
the level of your selected coin's support reliability as deemed by the MMGen
|
||||
Project.
|
||||
|
||||
[01]: https://github.com/mmgen/mmgen/wiki/Tracking-and-spending-ordinary-Bitcoin-addresses
|
||||
[02]: https://tpfaucet.appspot.com
|
||||
[03]: Recovering-Your-Keys-Without-the-MMGen-Software
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -92,6 +92,8 @@ class AddrGeneratorZcashZ(AddrGenerator):
|
|||
def to_addr(self,pubhex): # pubhex is really privhex
|
||||
key = pubhex.decode('hex')
|
||||
assert len(key) == 32,'{}: incorrect privkey length'.format(len(key))
|
||||
if g.platform == 'win':
|
||||
ydie(1,'Zcash z-addresses not supported on Windows platform')
|
||||
from nacl.bindings import crypto_scalarmult_base
|
||||
p2 = crypto_scalarmult_base(self.zhash256(key,1))
|
||||
from mmgen.protocol import _b58chk_encode
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -38,16 +38,16 @@ class g(object):
|
|||
|
||||
# Constants:
|
||||
|
||||
version = '0.9.599'
|
||||
release_date = 'December 2017'
|
||||
version = '0.9.6'
|
||||
release_date = 'January 2018'
|
||||
|
||||
proj_name = 'MMGen'
|
||||
proj_url = 'https://github.com/mmgen/mmgen'
|
||||
prog_name = os.path.basename(sys.argv[0])
|
||||
author = 'The MMGen Project'
|
||||
email = '<mmgen@tuta.io>'
|
||||
Cdates = '2013-2017'
|
||||
keywords = 'Bitcoin, BTC, cryptocurrency, wallet, cold storage, offline, online, spending, open-source, command-line, Python, Linux, Bitcoin Core, bitcoind, hd, deterministic, hierarchical, secure, anonymous, Electrum, seed, mnemonic, brainwallet, Scrypt, utility, script, scriptable, blockchain, raw, transaction, permissionless, console, terminal, curses, ansi, color, tmux, remote, client, daemon, RPC, json, entropy, xterm, rxvt, PowerShell, MSYS, MinGW, mswin, Armbian, Raspbian, Raspberry Pi, Orange Pi, BCash, BCH, Litecoin, LTC, altcoin, ZEC, Zcash, DASH, ETH, Ethereum, Classic, SHA256Compress'
|
||||
Cdates = '2013-2018'
|
||||
keywords = 'Bitcoin, BTC, cryptocurrency, wallet, cold storage, offline, online, spending, open-source, command-line, Python, Linux, Bitcoin Core, bitcoind, hd, deterministic, hierarchical, secure, anonymous, Electrum, seed, mnemonic, brainwallet, Scrypt, utility, script, scriptable, blockchain, raw, transaction, permissionless, console, terminal, curses, ansi, color, tmux, remote, client, daemon, RPC, json, entropy, xterm, rxvt, PowerShell, MSYS, MinGW, mswin, Armbian, Raspbian, Raspberry Pi, Orange Pi, BCash, BCH, Litecoin, LTC, altcoin, ZEC, Zcash, DASH, Dashpay, ETH, Ethereum, Classic, SHA256Compress, XMR, Monero, EMC, Emercoin'
|
||||
max_int = 0xffffffff
|
||||
stdin_tty = bool(sys.stdin.isatty() or os.getenv('MMGEN_TEST_SUITE'))
|
||||
http_timeout = 60
|
||||
|
|
@ -170,8 +170,7 @@ class g(object):
|
|||
|
||||
hash_presets = {
|
||||
# Scrypt params:
|
||||
# ID N p r
|
||||
# N is a power of two
|
||||
# ID N p r (N is an exponent of two)
|
||||
'1': [12, 8, 1],
|
||||
'2': [13, 8, 4],
|
||||
'3': [14, 8, 8],
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -364,7 +364,7 @@ class CoinAddr(str,Hilite,InitErrors,MMGenObject):
|
|||
cls.arg_chk(cls,on_fail)
|
||||
from mmgen.globalvars import g
|
||||
try:
|
||||
assert set(s) <= set(ascii_letters+digits),'contains non-ascii characters'
|
||||
assert set(s) <= set(ascii_letters+digits),'contains non-alphanumeric characters'
|
||||
me = str.__new__(cls,s)
|
||||
va = g.proto.verify_addr(s,hex_width=cls.hex_width,return_dict=True)
|
||||
assert va,'failed verification'
|
||||
|
|
@ -479,7 +479,7 @@ class TwMMGenID(str,Hilite,InitErrors,MMGenObject):
|
|||
from mmgen.globalvars import g
|
||||
assert s.split(':',1)[0] == g.proto.base_coin.lower(),(
|
||||
"not a string beginning with the prefix '{}:'".format(g.proto.base_coin.lower()))
|
||||
assert set(s[4:]) <= set(ascii_letters+digits),'contains non-ascii characters'
|
||||
assert set(s[4:]) <= set(ascii_letters+digits),'contains non-alphanumeric characters'
|
||||
assert len(s) > 4,'not more that four characters long'
|
||||
ret,sort_key,idtype = str(s),'z_'+s,'non-mmgen'
|
||||
except Exception as f:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# MMGen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -382,7 +382,7 @@ class CoinProtocol(MMGenObject):
|
|||
'eth': (EthereumProtocol,EthereumTestnetProtocol,2),
|
||||
'etc': (EthereumClassicProtocol,EthereumClassicTestnetProtocol,2),
|
||||
'zec': (ZcashProtocol,ZcashTestnetProtocol,2),
|
||||
'xmr': (MoneroProtocol,MoneroTestnetProtocol,2)
|
||||
'xmr': (MoneroProtocol,MoneroTestnetProtocol,None)
|
||||
}
|
||||
def __new__(cls,coin,testnet):
|
||||
coin = coin.lower()
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -34,21 +34,23 @@ rpc_password = 'hodltothemoon'
|
|||
tr_wallet = lambda user: os.path.join(daemon_dir,'wallet.dat.'+user)
|
||||
|
||||
common_args = lambda: (
|
||||
'-rpcuser={}'.format(rpc_user),
|
||||
'-rpcpassword={}'.format(rpc_password),
|
||||
'-rpcport={}'.format(rpc_port),
|
||||
'-regtest',
|
||||
'-datadir={}'.format(data_dir))
|
||||
'--rpcuser={}'.format(rpc_user),
|
||||
'--rpcpassword={}'.format(rpc_password),
|
||||
'--rpcport={}'.format(rpc_port),
|
||||
'--regtest',
|
||||
'--datadir={}'.format(data_dir))
|
||||
|
||||
def start_daemon(user,quiet=False,daemon=True,reindex=False):
|
||||
# requires Bitcoin ABC version >= 0.16.2
|
||||
add_args = ((),('--usecashaddr=0',))[g.proto.daemon_name=='bitcoind-abc']
|
||||
cmd = (
|
||||
g.proto.daemon_name,
|
||||
'-listen=0',
|
||||
'-keypool=1',
|
||||
'-wallet={}'.format(os.path.basename(tr_wallet(user)))
|
||||
) + common_args()
|
||||
if daemon: cmd += ('-daemon',)
|
||||
if reindex: cmd += ('-reindex',)
|
||||
'--listen=0',
|
||||
'--keypool=1',
|
||||
'--wallet={}'.format(os.path.basename(tr_wallet(user)))
|
||||
) + add_args + common_args()
|
||||
if daemon: cmd += ('--daemon',)
|
||||
if reindex: cmd += ('--reindex',)
|
||||
if not g.debug or quiet: vmsg('{}'.format(' '.join(cmd)))
|
||||
p = subprocess.Popen(cmd,stdout=PIPE,stderr=PIPE)
|
||||
err = process_output(p,silent=False)[1]
|
||||
|
|
@ -239,7 +241,7 @@ def get_current_user_win(quiet=False):
|
|||
return None
|
||||
|
||||
def get_current_user_unix(quiet=False):
|
||||
p = start_cmd('pgrep','-af','{}.*-rpcport={}.*'.format(g.proto.daemon_name,rpc_port))
|
||||
p = start_cmd('pgrep','-af','{}.*--rpcport={}.*'.format(g.proto.daemon_name,rpc_port))
|
||||
cmdline = p.stdout.read()
|
||||
if not cmdline: return None
|
||||
for k in ('miner','bob','alice'):
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# -*- coding: UTF-8 -*-
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ s_alts='The following tests will test generation operations for all supported al
|
|||
ROUNDS=100
|
||||
ROUNDS_LOW=20
|
||||
ROUNDS_SPEC=500
|
||||
if [ "$MINGW" ]; then
|
||||
t_alts=(
|
||||
'test/scrambletest.py'
|
||||
'test/test.py -n altcoin_ref'
|
||||
|
|
@ -118,8 +119,21 @@ t_alts=(
|
|||
"test/gentest.py --coin=ltc --type=segwit 2 $ROUNDS"
|
||||
"test/gentest.py --coin=zec 2 $ROUNDS"
|
||||
"test/gentest.py --coin=etc 2 $ROUNDS"
|
||||
"test/gentest.py --coin=eth 2 $ROUNDS"
|
||||
"test/gentest.py --coin=eth 2 $ROUNDS")
|
||||
else
|
||||
t_alts=(
|
||||
'test/scrambletest.py'
|
||||
'test/test.py -n altcoin_ref'
|
||||
"test/gentest.py --coin=btc 2 $ROUNDS"
|
||||
"test/gentest.py --coin=btc --type=compressed 2 $ROUNDS"
|
||||
"test/gentest.py --coin=btc --type=segwit 2 $ROUNDS"
|
||||
"test/gentest.py --coin=ltc 2 $ROUNDS"
|
||||
"test/gentest.py --coin=ltc --type=compressed 2 $ROUNDS"
|
||||
"test/gentest.py --coin=ltc --type=segwit 2 $ROUNDS"
|
||||
"test/gentest.py --coin=zec 2 $ROUNDS"
|
||||
"test/gentest.py --coin=zec --type=zcash_z 2 $ROUNDS_SPEC"
|
||||
"test/gentest.py --coin=etc 2 $ROUNDS"
|
||||
"test/gentest.py --coin=eth 2 $ROUNDS"
|
||||
|
||||
"test/gentest.py --coin=btc 2:ext $ROUNDS"
|
||||
"test/gentest.py --coin=btc --type=compressed 2:ext $ROUNDS"
|
||||
|
|
@ -136,7 +150,7 @@ t_alts=(
|
|||
"test/gentest.py --all 2:pyethereum $ROUNDS_LOW"
|
||||
"test/gentest.py --all 2:keyconv $ROUNDS_LOW"
|
||||
"test/gentest.py --all 2:zcash_mini $ROUNDS_LOW")
|
||||
|
||||
fi
|
||||
f_alts='Gen-only altcoin tests completed'
|
||||
|
||||
i_monero='Monero'
|
||||
|
|
@ -144,8 +158,9 @@ s_monero='Testing generation and wallet creation operations for Monero'
|
|||
s_monero='The monerod (mainnet) daemon must be running for the following tests'
|
||||
ROUNDS=1000
|
||||
t_monero=(
|
||||
'cmds/mmgen-keygen --accept-defaults --outdir $TMPDIR --coin=xmr test/ref/98831F3A.mmwords 3,99,2,22-29,101-109'
|
||||
'cmds/mmgen-tool -q --accept-defaults --outdir $TMPDIR keyaddrlist2monerowallet $TMPDIR/988*XMR*akeys')
|
||||
'python cmds/mmgen-keygen --accept-defaults --outdir $TMPDIR --coin=xmr test/ref/98831F3A.mmwords 3,99,2,22-29,101-109'
|
||||
'python cmds/mmgen-tool -q --accept-defaults --outdir $TMPDIR keyaddrlist2monerowallet $TMPDIR/988*XMR*akeys')
|
||||
[ "$MINGW" ] && t_monero=("$t_monero")
|
||||
f_monero='Monero tests completed'
|
||||
|
||||
i_misc_ni='Miscellaneous operations (non-interactive)'
|
||||
|
|
@ -243,8 +258,12 @@ t_tool=(
|
|||
'test/tooltest.py --coin=dash cryptocoin'
|
||||
'test/tooltest.py --coin=doge cryptocoin'
|
||||
'test/tooltest.py --coin=emc cryptocoin'
|
||||
'test/tooltest.py --coin=zec cryptocoin'
|
||||
'test/tooltest.py --coin=zec --type=zcash_z cryptocoin')
|
||||
'test/tooltest.py --coin=zec cryptocoin')
|
||||
|
||||
[ "$MINGW" ] || {
|
||||
t_tool_len=${#t_tool[*]}
|
||||
t_tool[$t_tool_len]='test/tooltest.py --coin=zec --type=zcash_z cryptocoin'
|
||||
}
|
||||
f_tool='tooltest tests completed'
|
||||
|
||||
i_gen='Gentest'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: UTF-8 -*-
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# -*- coding: UTF-8 -*-
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -74,12 +74,15 @@ test_data = OrderedDict([
|
|||
|
||||
def run_tests():
|
||||
for test in test_data:
|
||||
if test == 'zec_zcash_z' and g.platform == 'win':
|
||||
msg("Skipping 'zec_zcash_z' test for Windows platform")
|
||||
continue
|
||||
try: coin,mmtype = test.split('_',1)
|
||||
except: coin,mmtype = test,None
|
||||
cmd_name = 'cmds/mmgen-addrgen'
|
||||
wf = 'test/ref/98831F3A.mmwords'
|
||||
type_arg = ['--type='+mmtype] if mmtype else []
|
||||
cmd = [cmd_name,'-qS','--coin='+coin] + type_arg + [wf,'1']
|
||||
cmd = ['python',cmd_name,'-qS','--coin='+coin] + type_arg + [wf,'1']
|
||||
vmsg(green('Executing: {}'.format(' '.join(cmd))))
|
||||
msg_r('Testing: --coin {:4} {:22}'.format(coin.upper(),type_arg[0] if type_arg else ''))
|
||||
p = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
|
|
|
|||
16
test/test.py
16
test/test.py
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: UTF-8 -*-
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -1251,6 +1251,15 @@ def clean(usr_dirs=[]):
|
|||
die(1,'%s: invalid directory number' % d)
|
||||
cleandir(os.path.join('test','data_dir'))
|
||||
|
||||
def skip_for_win():
|
||||
if g.platform == 'win':
|
||||
import traceback
|
||||
f = traceback.extract_stack()[-2][-2]
|
||||
msg("Skipping test '{}': not supported on Windows platform".format(f))
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
class MMGenTestSuite(object):
|
||||
|
||||
def __init__(self):
|
||||
|
|
@ -1897,8 +1906,7 @@ class MMGenTestSuite(object):
|
|||
|
||||
# Miscellaneous tests
|
||||
def autosign(self,name): # tests everything except device detection, mount/unmount
|
||||
if g.platform == 'win':
|
||||
msg('Skipping {} (not supported)'.format(name)); return
|
||||
if skip_for_win(): return
|
||||
fdata = (('btc',''),('bch',''),('ltc','litecoin'))
|
||||
tfns = [cfgs['8']['ref_tx_file'][c].format('') for c,d in fdata]
|
||||
tfs = [os.path.join(ref_dir,d[1],fn) for d,fn in zip(fdata,tfns)]
|
||||
|
|
@ -2070,6 +2078,7 @@ class MMGenTestSuite(object):
|
|||
self.ref_addrfile_chk(name,ftype='addr',coin='ZEC',subdir='zcash',pfx='-ZEC-C')
|
||||
|
||||
def ref_addrfile_chk_zec_z(self,name):
|
||||
if skip_for_win(): return
|
||||
self.ref_addrfile_chk(name,ftype='addr',coin='ZEC',subdir='zcash',pfx='-ZEC-Z',
|
||||
mmtype='z',add_args=['mmtype=zcash_z'])
|
||||
|
||||
|
|
@ -2089,6 +2098,7 @@ class MMGenTestSuite(object):
|
|||
self.ref_addrfile_chk(name,ftype='keyaddr',coin='ZEC',subdir='zcash',pfx='-ZEC-C')
|
||||
|
||||
def ref_keyaddrfile_chk_zec_z(self,name):
|
||||
if skip_for_win(): return
|
||||
self.ref_addrfile_chk(name,ftype='keyaddr',coin='ZEC',subdir='zcash',pfx='-ZEC-Z',
|
||||
mmtype='z',add_args=['mmtype=zcash_z'])
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution
|
||||
# Copyright (C)2013-2017 Philemon <mmgen-py@yandex.com>
|
||||
# Copyright (C)2013-2018 The MMGen Project <mmgen@tuta.io>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue