Commit graph

2,768 commits

Author SHA1 Message Date
1810b50b09
unit_tests.py: new UnitTestHelpers class 2019-10-24 18:30:23 +00:00
f9778043c2
unit_tests.py: add test for base conversion routines
Run test:

    $ test/unit_tests.py -v baseconv
2019-10-24 16:31:54 +00:00
57682dce3f
test.py: cleanups and fixes throughout 2019-10-24 16:21:09 +00:00
15ac6c6947
new wallet format: PlainHexSeedFile (plain hexadecimal w/o checksum) 2019-10-23 12:25:24 +00:00
2a79e3647d
SeedFile -> MMGenSeedFile, HexSeedFile -> MMGenHexSeedFile 2019-10-23 12:14:41 +00:00
139484281f
new test: colortest.py - test terminal output + terminfo parsing 2019-10-23 10:44:17 +00:00
d57631695a
test suite: move path fixup code to test/tests_header.py 2019-10-23 10:01:11 +00:00
6cf4fcc7e4
Use subprocess.run() throughout, related cleanups 2019-10-23 09:31:21 +00:00
d8252c56ac
color.py: code cleanups, add terminfo entry parsing function
- handle hexadecimal values in 'colors' field (e.g. '0x100' for 256)
2019-10-23 09:30:12 +00:00
017abc3f8c
altcoin.py: use namedtuples for CoinInfo entries 2019-10-21 17:22:16 +00:00
c276f9d8fe
scrambletest.py: add vectors for 'mmgen-passgen' 2019-10-21 11:56:57 +03:00
e12eb13cea
scrambletest.py: code cleanups 2019-10-21 11:50:57 +03: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
174caeebd3
MMGenImmutableAttr: allow callable dtype arg, remove 'no_type_check' option 2019-10-19 20:27:24 +03:00
3224b9c7d2
new test: objattrtest.py: test objects' immutable attributes 2019-10-19 18:22:31 +03:00
514278d616
MMGenListItem: require all immutable attrs to be set in constructor 2019-10-19 17:44:44 +03:00
2df7878ea6
improve logic for loading mmgen.devtools module 2019-10-19 17:37:27 +03:00
c1347d1080
various fixes and cleanups 2019-10-19 17:34:49 +03:00
94eda8473e
test.py: use importlib, clean up module loading code 2019-10-19 13:15:31 +03:00
9b456b0820
altcoin_subclass(): use importlib 2019-10-19 13:10:31 +03:00
c1ba807502
MMGenPasswordType: initialize all unused fields with 'None' 2019-10-18 19:59:24 +03:00
28ff467eee
MMGenImmutableAttr: allow setting attrs to None with 'set_none_ok' 2019-10-18 19:53:58 +03:00
41d2d17b51
test.py: split ref3 cmd group into ref3, ref3_addr 2019-10-17 14:42:16 +03:00
a47e472078
AddrList: new make_label() method 2019-10-17 14:35:56 +03:00
508abfb350
MMGenAddrType.mmtypes: implement values as namedtuples 2019-10-17 14:30:31 +03:00
8705e57b8f
mmgen-passgen: support BIP39 passwords
Examples:

  Generate three 24-word BIP39 mnemonic seed phrases from your default wallet
  for your Trezor device:

  $ mmgen-passgen --passwd-fmt=bip39 mytrezor 1-3

  Same, but generate 12-word seed phrases:

  $ mmgen-passgen --passwd-fmt=bip39 --passwd-len=12 mytrezor 1-3

Relevant tests:

  $ test/test.py ref ref3
2019-10-16 20:12:58 +03:00
83ad241963
minor changes 2019-10-16 20:10:14 +03:00
fefea42b9c
passgen: passwd length sanity checks
- forbid attempts to generate passwords with bit length greater than seed
2019-10-16 19:39:44 +03:00
18ee26f851
test suite: minor changes 2019-10-16 19:39:07 +03:00
8a68f00ab7
AddrList, passgen: minor fixes; add altcoin ref file tests 2019-10-16 12:42:48 +03:00
21998ac6da
AddrList.parse_file(): improve error handling 2019-10-15 20:12:25 +03:00
bfcfc8676d
passgen: allow hex passwords of 32 and 48 characters 2019-10-15 16:58:07 +03:00
d7fe969d8c
passgen: code cleanups, new tests, new --passwd-fmt option 2019-10-15 15:51:43 +03:00
a5ba64a956
minor changes, whitespace 2019-10-14 23:23:15 +03:00
dc5a3f3435
test/unit_tests.py seedsplit: add last share collisions test 2019-10-14 17:45:03 +03:00
c7ca0c3d62
N-of-N (XOR) seed splitting: user-level support
This patch introduces the commands `mmgen-seedsplit` and `mmgen-seedjoin`.
The first creates shares one at a time, while the second joins them to
recover the original seed.  By default, the default wallet is operated upon.

Shares are ordinary MMGen wallets and as such may be saved in any MMGen wallet
format, with one minor limitation: only one share in a given split may be in
hidden incognito format, and it must be the master share in the case of a
master share split.

For usage information and examples, see:

    mmgen-seedsplit --help
    mmgen-seedjoin --help

Relevant tests:

    test/test.py -e seedsplit
    ls -lrt test/tmp23/* # list the created files

    test/objtest.py SeedSplitSpecifier

Related commits:

    7311f474 - seed splitting: seed-level infrastructure
    237567bc - master shares
2019-10-13 20:33:22 +03:00
4d07d53ff6
minor changes and cleanups 2019-10-13 20:30:56 +03:00
c90bc087e0
devtools: rename pretty-print functions and methods 2019-10-12 14:07:09 +03:00
3d004c3600 minor fixes and cleanups 2019-10-11 15:37:52 +03:00
e5ed814239
Bitcoin Core v0.19.0 compatibility fix 2019-10-10 22:54:42 +03:00
d49159a92b
various changes and fixes 2019-10-10 22:53:43 +03:00
a160c92079
fix bumping of TXs with one output 2019-07-26 17:26:12 +03:00
94d26212f6
minor fixes, changes 2019-07-10 16:01:54 +03:00
8519b68b89
Complete BIP39 mnemonic support
- provided as an alternative to MMGen's native mnemonic format

    # Run the BIP39 unit test:
    $ test/unit_tests.py -v bip39

    # Generate a random 128-bit BIP39 seed phrase:
    $ mmgen-tool mn_rand128 fmt=bip39

    # Export your default wallet to BIP39 format:
    $ mmgen-walletconv -o bip39
    ...
    BIP39 mnemonic data written to file '98831F3A[256].bip39'

    # Generate ten addresses from the exported wallet:
    $ mmgen-addrgen '98831F3A[256].bip39' 1-10
    ...
    Addresses written to file '98831F3A[1-10].addrs'

    # Generate ten addresses directly from your BIP39 seed phrase:
    $ mmgen-addrgen -q -i bip39 1-10
    ...
    Addresses written to file '98831F3A[1-10].addrs'

    # Export subwallet 10L of your default wallet to BIP39 format:
    $ mmgen-subwalletgen -o bip39 10L
    ...
    BIP39 mnemonic data written to file 'A17F8E90[256].bip39'
2019-07-09 15:44:17 +03:00
c82c9c5bd7
minor changes and fixes 2019-07-07 16:24:05 +03:00
94e02995de
issubclass -> isinstance and related cleanups 2019-07-05 21:21:00 +03:00
80675355c6
super(): use zero-arg form where possible 2019-07-05 17:25:56 +03:00
d0f8c44b20
TrackingWallet: balance caching, Parity light client optimizations
- activated for Ethereum only, but framework exists for all coins
- both session caching and persistent caching in the wallet are supported
- network-destined RPC calls are never repeated in a given invocation
- RPC balance lookups can be suppressed entirely with --cached-balances
2019-07-05 16:03:03 +03:00
69e09d3b54
tw.view_and_sort(): cleanups 2019-07-03 21:17:24 +03:00