Commit graph

51 commits

Author SHA1 Message Date
622b63a19b
test suite: minor fixes and cleanups 2019-11-01 12:24:09 +00:00
6cf4fcc7e4
Use subprocess.run() throughout, related cleanups 2019-10-23 09:31:21 +00:00
f327ce2bf9
gentest.py: minor code cleanups 2019-10-20 17:20:35 +03:00
e5abf419c0
gentest.py: use ethkey for Ethereum tests 2019-10-20 17:09:09 +03:00
d49159a92b
various changes and fixes 2019-10-10 22:53:43 +03:00
e879b7e548
minor fixes 2019-05-20 18:43:02 +03:00
017ecef3bc
[opts]: separate code from text in opts_data
- When parsing opts, opts.init() now looks only at string values from
  opts_data.  Global variables are evaluated only when printing help text,
  after the variables are initialized
2019-03-26 15:59:37 +03:00
a7126ede03
Remove dependencies on pysha3 and ethereum modules
- pysha3: Monero and Ethereum use the old pre-SHA3 version of the keccak
  hash function, which is not supported by hashlib.sha3.

  The pysha3 package supports the function but is not portable.

  Therefore, use the pure-Python implementation mmgen.keccak as a fallback,
  making the pysha3 package optional.

  Use of mmgen.keccak may be forced with --use-internal-keccak-module

  mmgen.keccak was ported from the Python 2 implementation at
  https://github.com/ctz/keccak

- ethereum (pyethereum): Installation of this package presents numerous
  problems due to poor maintenance and many superfluous dependencies.

  Therefore, use stripped-down and modified local versions of
  ethereum.transactions and ethereum.utils as fallbacks, making the ethereum
  package optional.

  The local pyethereum.utils uses mmgen.keccak as a fallback for pysha3's
  keccak implementation.
2019-03-23 17:21:34 +03:00
281e1f3ffb
minor fixes 2019-03-22 14:32:22 +03:00
b5f1ebc640
py3port: make hexadecimal values be strings instead of bytes type
- binascii.hexlify(b'foo') -> b'foo'.hex()
- binascii.unhexlify('aabb') -> bytes.fromhex('aabb')
- replace HexBytes class with HexStr

This change has led to a ≈10% speedup in the full test-release.sh run
2019-03-17 13:33:55 +03:00
39e63bd75f Minor changes 2019-02-14 17:33:58 +03:00
514c1100ee Update copyright dates 2019-02-12 21:35:12 +03:00
d91328c2b1 py3port: a few encoding fixes 2019-02-10 22:19:55 +03:00
0eff2811e1
py3port: update tests 2018-10-31 21:20:59 +03:00
25c31e8c32
py3port: Exception as e: e.message -> e.args[0] 2018-10-31 18:44:10 +03:00
f6d5c5b465
py3port: replace s.encode('hex'), s.decode('hex') with hexlify(), unhexlify() 2018-10-31 18:30:11 +03:00
04329b6757
py3port: use encode() and decode() where applicable 2018-10-31 17:16:00 +03:00
949e42ebf4
py3port: 2to3 on all files
The result of running 2to3-2.7 on all Python files in the repository.
2018-10-30 19:31:14 +03:00
f0fea335eb
py3port: update hashbangs
This is the first commit of the MMGen Python 3 port.  Branch 'py3port', against
master branch commit ab06ca4

Commits are groupings of similar or related changes: automatic changes first,
followed by repetitive and global changes, followed by specific ones

All commits until the final one will leave the branch in a broken state
2018-10-30 19:23:12 +03:00
7ebe50dc0b
Use Exception attributes: e.message, e.code 2018-10-16 18:39:33 +03:00
b74b0fb57e
gentest.py: support pycoin v0.90a 2018-05-09 17:28:00 +03:00
33fc67e241
zcash: update address, viewkey prefixes 2018-05-09 17:23:33 +03:00
351f5f9118
Use new-style string formatting 2018-03-07 12:59:35 +03:00
6f572cddde
Bech32: additional tests 2018-03-06 10:28:41 +03:00
MMGen
83e9899b38
Version 0.9.6 2018-01-14 17:24:36 +03:00
MMGen
279e8872ef
Improve coin selection logic, allow coin disabling 2017-12-25 09:48:59 +03:00
MMGen
91ac2effb3
Key/address generation support for 144 altcoins
Support for these coins is EXPERIMENTAL, use at your own risk

    EXAMPLE: generate 10 Dogecoin key/address pairs with your default wallet:

        `mmgen-keygen --coin=doge 1-10`

    Keys for different coins are distinct, so users needn't worry about key reuse.

    Supported alts: 2give,42,611,ac,acoin,alf,anc,apex,arco,arg,aur,b2x,bcf,bch,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,etc,eth,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,zec,zet,zlq,zoom,zrc

	Test the new functionality with `scripts/test-release.sh -Pn master alts`

B2X support disabled pending further testing
2017-12-24 15:26:23 +03:00
MMGen
4876ee47ed
View key support for Zcash z-addresses
- view keys are included in key-address lists
- tests updated to test the new functionality

- mmgen-tool: `compressed` and `segwit` args replaced by --type option
2017-12-18 20:19:01 +03:00
MMGen
1cc64e1eb9
Zcash z-address generation with custom sha256 implementation
- Tests have been updated, test with `scripts/test-release.sh -Pn master alts`
2017-12-16 12:48:47 +03:00
MMGen
bafea57134
Key/address generation for Ethereum, Eth Classic, DASH, and Zcash
- supported commands:
  - mmgen-addrgen
  - mmgen-keygen (decrypt encrypted key-addr files with `mmgen-tool decrypt`)
  - mmgen-tool addrfile_chksum, keyaddrfile_chksum

- ETH and ETC keys are distinct, so users needn't worry about key reuse
- Only Zcash-t addresses supported for now (but z-addresses coming soon)

- Test the new functionality with `scripts/test-release.sh -Pn master alts`
2017-12-16 09:31:00 +03:00
philemon
35d1091159
Basic altcoin framework, full Litecoin support
- LTC: tested on mainnet, full test suite support
- simultaneous autosigning for all supported coins (BTC,BCH,LTC)
2017-10-28 00:11:00 +03:00
philemon
b23b497d77
obj.py rewrite+test suite, Bob and Alice regtest mode, compressed addresses
- basic data types in obj.py rewritten
- new test suite 'test/objtest.py' for testing basic data types
- new compressed address type with the 'C' identifier

- Bob and Alice regtest mode for testing MMGen in a mock two-user environment
  * All MMGen commands are available in this mode.
  * Set up with 'mmgen-regtest setup'. Bob and Alice's wallets are funded with
    500 BTC each.  Use the --mixed switch to import mixed address types in
    Bob and Alice's tracking wallets.
  * Transact as Bob by adding --bob switch to MMGen commands
  * Transact as Alice by adding --alice switch to MMGen commands
  * After sending a transaction, mine a block to confirm it with
    'mmgen-regtest generate'
    The bitcoin daemon is stopped and restarted automatically when switching
    between users.
2017-08-14 13:04:25 +03:00
philemon
52fdf29b67
new classes: KeyGenerator,AddrGenerator,PrivKey; read-only attrs rewrite
- OO rewrite of key/addr generation interface (KeyGenerator,AddrGenerator)
- New data objects: PrivKey,PubKey,WifKey
- rewrite of read-only attr implementation for addr/tx/tw list entries
  (MMGenImmutableAttr,MMGenListItemAttr descriptors)
- txsign: build key list of addrlist objects rather than addr,key tuples
2017-08-07 22:02:24 +03:00
philemon
004536af63
Defer printing of help screens until global vars are initialized 2017-08-05 18:15:41 +03:00
philemon
b753ddee5a
Version 0.9.2rc1
- update Getting Started guide for Segwit and regtest
2017-07-29 15:53:04 +03:00
philemon
3b0257358b
Support for Segwit (P2SH-P2WPKH) addresses:
- Generate Segwit addresses by invoking 'mmgen-addrgen' with the
  '--type segwit' option
- Import Segwit addresses into the tracking wallet as usual
- Segwit and legacy MMGen addresses are distinguished by 'S' and 'L'
  identifiers in the tracking wallet and command line

Transaction example:

  mmgen-txcreate F00BAA12:L:21,1.23 F00BAA12:S:1

(spend 1.23 BTC to legacy address 21 of your default wallet (with Seed ID
F00BAA12) and send the change to Segwit address 1)

Segwit and legacy addresses for a given seed are generated from different
sub-seeds so are cryptographically unrelated to each other.

Since MMGen's legacy P2PKH addresses are uncompressed, use of the new Segwit
addresses significantly reduces transaction size.

Until Segwit activation on mainnet, users can try out the new functionality on
testnet or in regtest mode.
2017-07-27 22:55:52 +03:00
philemon
85cf5b3cbb
The original implementation of mmgen-passgen, using sha256x10(seed+id_str)
Superseded by the current implementation using sha256x10(hmac(seed,id_str,hashlib.sha256))
2017-07-07 16:09:28 +03:00
philemon
0ab39e4a22
Update copyright dates 2017-05-31 18:16:08 +03:00
philemon
229845c8b6
Version 0.8.9rc1 2016-12-08 18:02:28 +03:00
philemon
48845020c3
[mswin]: full test suite support with pexpect (PopenSpawn)
[mswin]: secure wallet deletion with sdelete
[mswin]: keyaddrfile binary mode write bugfix (main_addrgen.py)
2016-12-05 21:53:16 +03:00
philemon
17060351fb
Version 0.8.8rc1
Windows configuration and test suite fixes
2016-11-23 17:17:08 +03:00
philemon
978565f5bf
Data directory, config file and default wallet support:
* Under Linux, data directory is '~/.mmgen'; config file is 'mmgen.cfg'.
 * If default wallet is enabled, specifying the wallet on the command line is
   no longer necessary.  If not, all MMGen commands behave as previously.
 * The datadir structure mirrors that of Bitcoin Core: mainnet and testnet
   share a common config file, but testnet puts its other files including its
   default wallet in a separate subdirectory 'testnet3'.

New routines have been added to the test suite to test these features.
Tested only under Linux.
2016-11-21 19:59:03 +03:00
philemon
3897ec3297
Version 0.8.7a
--testnet option added to all relevant scripts
  utility scripts under scripts/ updated
2016-11-14 14:45:08 +03:00
philemon
73ca40ea8d
Assorted fixes/improvements:
- Importing addresses with --rescan working again
- Tracking and spending non-MMGen addresses now fully functional
- mmgen-txcreate: improvements in unspent outputs display
- mmgen-txsign: use bitcoind wallet dump as keylist fixed

- Testnet support:
  - Practice sending transactions without risking funds
  	(free testnet coins: https://tpfaucet.appspot.com/)
  - Test suite fully supported
  - To enable, set MMGEN_TESTNET environment variable
2016-11-11 16:05:27 +03:00
philemon
0be6059674 Version 0.8.6
New features/improvements:

	* Address generation using secp256k1 library (Linux only)

Instructions for installing the secp256k1 library on your system:

	doc/wiki/install-linux/Install-MMGen-on-Debian-or-Ubuntu-Linux.md

If secp256k1 is not installed on the system, MMGen remains usable. It just falls
back to 'keyconv', or failing that, python-ecdsa for generating addresses.
2016-08-24 17:20:48 +03:00
philemon
5676d7a3f9
addr generation with secp256k1mod 2016-08-22 14:20:46 +03:00
philemon
956eeab186 MMGen version 0.8.3
New features/improvements:

	* New native Bitcoin RPC library.
	* Support for cookie-based RPC authentication (new in Bitcoin Core v0.12.0).
	* Batch mode available when listing and importing addresses.
	* mmgen-tool listaddresses: 'addrs' argument allows you to specify an
	  address or range of addresses.

NOTE: if MMGen is already installed on your system, you must remove your
existing installation by hand before installing this new version.  On Linux,
this means deleting everything under the directory
'/usr/local/lib/python2.7/dist-packages/mmgen/'.  Also, if you did a 'git pull'
instead of a fresh clone, you must delete the 'build' directory in the
repository root before installing.

The 'mmgen-pywallet' utility has been removed.  It's no longer needed, as the
'bitcoin-cli dumpwallet' command (available since Core v0.9.0) provides
equivalent functionality.

The Windows port isn't being actively maintained at the moment.  Use at your own
risk, and report any problems on the Bitcointalk forum.
2016-02-28 16:41:43 +03:00
philemon
243b0e5c50 Windows file mode and color fixes for test.py, tooltest.py, gentest.py 2015-05-02 14:51:04 +03:00
philemon
85d94eaec1 Version 0.8.1 2015-05-01 22:04:07 +03:00
philemon
03b1b4b00e New 'mmgen-walletconv' utility converts to and from all available MMGen wallet
formats, thus obsoleting much of the functionality in '-walletgen' and
'-walletchk'.  This is the first script to utilize the new OO wallet code in
'seed.py'.

New tests in the 'test.py' suite.

	new file:   mmgen-walletconv
	new file:   mmgen/main_walletconv.py
	modified:   mmgen/seed.py
	modified:   test/test.py
2015-04-25 19:39:25 +03:00