Commit graph

61 commits

Author SHA1 Message Date
ab41b78863
new platform global constant 2026-05-17 18:03:32 +00:00
f840069ecb
update copyright dates 2026-02-11 13:02:12 +00:00
e54f039690
update copyright dates 2025-02-16 14:42:27 +00:00
74bc49f973
whitespace: tests, top level 2024-10-18 10:32:12 +00:00
5150ca586b
update file header 2024-10-18 10:32:06 +00:00
66521a07f2
update --longhelp text 2024-10-08 12:55:58 +00:00
8edc7da5a2
BCH cashaddr: full support
- BCH addresses are now displayed in cashaddr format by default.  This may be
  overridden on the command line with --cashaddr=0, or in the config file by
  setting `bch_cashaddr` to false
- In tracking wallet views, the ‘h’ key toggles between legacy and cashaddr
  address display
- Transaction views display BCH addresses in both formats simultaneously
- The --usecashaddr=0 daemon option is no longer required and should be omitted

Testing:

    $ test/unit_tests.py -v cashaddr bip_hd.multicoin
    $ test/gentest.py --coin=bch -v --type=C 1 test/ref/bitcoin_cash/bchwallet.dump
    $ test/cmdtest.py -e bch_txview_cashaddr1 bch_txview_cashaddr2
    $ test/cmdtest.py --coin=bch -e txsend regtest.view autosign_automount
    $ test/cmdtest.py --coin=bch -n ref3_addr
2024-09-29 11:59:57 +00:00
9a70a04b01
scrambletest.py: cleanups 2024-09-29 11:59:55 +00:00
044c2a0b91
whitespace throughout 2024-09-29 11:59:55 +00:00
a0eb2871f9
minor fixes and cleanups throughout 2024-07-27 09:56:20 +00:00
8e46932475
update copyright dates 2024-01-19 11:05:10 +00:00
4c49a6e59c
launch test and helper scripts with main.launch() 2023-12-12 10:19:51 +00:00
32b3558581
BTC-only testing fixes 2023-11-21 15:48:10 +00:00
a7e816f98e
test suite: make test scripts importable as modules 2023-10-13 09:51:14 +00:00
6a21044127
test suite: improve initialization of sys.path and repo_root 2023-10-13 09:51:14 +00:00
0a1e3c3c98
pylint integration: gc.platform -> sys.platform 2023-10-13 09:51:12 +00:00
7b32c412d5
pylint (test suite) - imports 2023-10-11 12:58:51 +00:00
f626fc2e05
missing import fixes throughout 2023-10-03 14:27:57 +00:00
31a6e62a24
test suite: sys.path, overlay, PYTHONPATH cleanups 2023-09-26 10:23:40 +00:00
845470302d
test suite: remove --system option, minor cleanups 2023-09-26 10:23:40 +00:00
e92f241f7a
test suite: improve handling of environment vars 2023-05-23 12:12:33 +00:00
9e1935ad19
opts.init() -> Config() 2023-04-04 16:04:10 +00:00
93bcc92534
globalvars.py -> cfg.py 2023-04-04 16:04:10 +00:00
c7adb56e38
Config API, Part I
This patch eliminates the global configuration variables `opt` and `g`, making
all functions and class instances locally configurable.  Configuration data is
passed to functions and constructors via the `cfg` parameter and made available
to methods in `self.cfg`.

Local configuration free from dependence on the command line will enable the
creation of multiple, independently configured instances of MMGen’s data
objects within a single process.

Potential applications include testing (tracking wallets configured to interact
with spawned processes, for example) and the use of MMGen as a library for
other projects.

This patch completes most of the work required to enable the API.  The full
implementation will appear in a forthcoming commit.
2023-03-28 18:14:37 +00:00
c3ce1ab8e3
globalvars.py: new GlobalConstants (gc), GlobalVars (gv) classes
- The attributes of GlobalConstants are non-configurable.  They’re constant
  for a given machine, user, executable and MMGen release.

- The attributes of GlobalVars, `stderr` and `stdout`, are used by the test
  suite to redirect msg() and friends to /dev/null.

- All the aforementioned attributes formerly belonged to GlobalConfig.
2023-03-28 18:14:36 +00:00
1aeefd64ae
update copyright dates 2023-01-03 10:36:07 +00:00
20f4b12832
module docstring cleanups [134 files] 2022-11-14 09:54:07 +00:00
23457774e2
BTC-only testing fixes 2022-05-03 21:01:05 +00:00
41376eb515
new MMGenSystemExit exception; remove rdie(), ydie() 2022-02-05 13:32:56 +00:00
1a896d9af9
update copyright dates 2022-01-04 19:51:22 +00:00
ffa6d44834
test suite: add end_msg() 2021-10-02 17:54:11 +00:00
6692a43d59
f-strings, whitespace (test files) [44 files patched] 2021-09-29 21:17:57 +00:00
cb7f38370b
Update copyright dates 2021-02-19 20:09:06 +03:00
de7fba0c19
test suite: relocate some modules, use relative imports 2020-03-16 10:45:00 +00:00
673b97b3b8
update copyright dates 2020-02-18 14:07:27 +00:00
cfa16418b3
limited Monero mnemonic seed phrase ('xmrseed') support
- only 256-bit (25-word) new-style mnemonics are supported

Testing:

  $ test/unit_tests.py baseconv
  $ test/tooltest2.py hex2mn mn2hex
  $ test/scrambletest.py pw
  $ test/test.py ref_xmrseed_25_passwdgen_3
  $ test/test.py ref_passwdfile_chk_xmrseed_25

The following operations are supported:

  Generate a random Monero mnemonic:

  $ mmgen-tool mn_rand256 fmt=xmrseed

  Generate a Monero mnemonic from hexadecimal data:

  $ mmgen-tool hex2mn deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef fmt=xmrseed

  Convert the resulting mnemonic back to hexadecimal data:

  $ mmgen-tool mn2hex 'viewpoint donuts ardent template unveil agile meant unafraid urgent athlete rustled mime azure jaded hawk baby jagged haystack baby jagged haystack ramped oncoming point template' fmt=xmrseed

  Note that the result of the reversal does not match the original input.  This
  is because input data is reduced to a spendkey before conversion so that a
  canonical seed phrase is produced.  This is required because Monero seeds,
  unlike ordinary wallet seeds, are tied to a concrete key/address pair.  The
  spendkey can be generated directly using the `hex2wif` command:

  $ mmgen-tool --coin=xmr hex2wif deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef

  Generate a list of passwords in Monero mnemonic format with ID 'mymonero':

  $ mmgen-passgen -f xmrseed 'mymonero' 1-10
2020-02-12 10:38:11 +00:00
70675956b8
various fixes and cleanups throughout 2020-02-12 10:36:15 +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
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
83ad241963
minor changes 2019-10-16 20:10:14 +03:00
18ee26f851
test suite: minor changes 2019-10-16 19:39:07 +03:00
c82c9c5bd7
minor changes and fixes 2019-07-07 16:24:05 +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
91410dd96c
test.py: refactor, modularize, cleanup code, make fully OO
- test groups are now separate classes in separate modules
- test data and code is loaded on an as-needed basis
- new TestSuiteRunner and CmdGroupMgr classes
- simplified invocation: if arguments are omitted, all default tests relevant
  for given network and option are run.  The following set of invocations
  provides nearly complete coverage of MMGen's core functionality:

    test/test.py
    test/test.py --segwit-random
    test/test.py --bech32

    test/test.py --coin=ltc
    test/test.py --coin=ltc --segwit-random
    test/test.py --coin=ltc --bech32

    test/test.py --coin=bch
    test/test.py --coin=eth
    test/test.py --coin=etc
2019-03-02 21:27:53 +03:00
514c1100ee Update copyright dates 2019-02-12 21:35:12 +03:00
81548b9a35
py3port: exec, subprocess: 'python' -> 'python3' 2018-10-31 19:37:34 +03:00
04329b6757
py3port: use encode() and decode() where applicable 2018-10-31 17:16:00 +03:00
46f44b645b
py3port: use floor division where applicable 2018-10-31 16:38:21 +03:00