Commit graph

19 commits

Author SHA1 Message Date
cb7f38370b
Update copyright dates 2021-02-19 20:09:06 +03:00
d1d7132a7c
PubKey: add privkey attribute, perform pubkey_type matching checks 2020-06-09 14:17:46 +00:00
d2055c93da
test.py: allow color for some test groups; minor fixes, cleanups 2020-06-03 12:29:50 +00:00
c27c464a87
obj.py: InitErrors: allow selected exceptions to be passed through 2020-06-02 19:33:15 +00:00
bc439e0b3d
tw.py: get_tw_label() bugfix 2020-06-01 21:34:11 +00:00
0852321c21
obj.py: remove 'on_fail' keyword arg
- During initialization, data objects now invariably raise an exception on
  failure (ObjectInitError by default, configurable via the 'exc' attribute).

- For callers that need to handle the exception, the new get_obj() wrapper is
  provided.

Testing:

    $ test/objtest.py -S
    $ test/objtest.py -S --getobj
2020-06-01 09:59:04 +00:00
5e745f2a08
string formatting, whitespace, minor fixes throughout 2020-06-01 09:25:56 +00:00
c3f185e8b0
eliminate use of global vars g.proto, g.coin, g.rpc and others
This patch eliminates nearly all the global variables that changed during the
execution of scripts.  With a few minor exceptions, global vars are now used
only during initialization or reserved for cfg file / cmdline options and other
unchanging values.

The result is a code base that's much more maintainable and extensible and less
error-prone.  The autosigning code, which supports signing of transactions for
multiple protocols and networks, has been greatly simplified.

Doing away with globals required many changes throughout the code base, and
other related (and not so related) changes and cleanups were made along the
way, resulting in an enormous patch.

Additional code changes include:

    - tx.py: complete reorganization of TX classes and use of nesting

    - protocol.py: separation of Regtest and Testnet into distinct subclasses
      with separate address and transaction files and file extensions

    - new module help.py for the help notes, loaded on demand

    - addr.py: rewrite of the address file label parsing code

    - tx.py,tw.py: use of generators to create formatted text

User-visible changes include:

    - importing of addresses for tokens not yet in the user's tracking wallet
      is now performed with the `--token-addr` option instead of `--token`

Testing:

    Testing this patch requires a full run of the test suite as described on the
    Test-Suite wiki page.
2020-05-28 09:53:34 +00:00
144612c6fc
global rename: MMGenTXLabel -> MMGenTxLabel 2020-05-18 10:20:27 +00:00
3610b3ef29
OrderedDict -> dict throughout 2020-04-09 19:34:24 +00:00
673b97b3b8
update copyright dates 2020-02-18 14:07:27 +00:00
da13550cd1
obj.py: create Int type, make MMGenIdx & ETHNonce its subclasses 2019-11-14 17:12:47 +00: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
0ec3eb1a07
tw.py: new get_tw_label() function; raise exception on bad tw label 2019-07-03 20:40:43 +03:00
47fa896135
minor fixes and cleanups 2019-06-12 17:21:28 +03:00
b0105598da
seed splitting: 'split' -> 'share' for all identifiers, where applicable 2019-06-11 12:13:31 +03:00
2388662e72
SeedSplit: minor cleanups, new SeedSplitIdx,SeedSplitCount classes 2019-06-10 11:19:13 +03:00
d7bfc8307e
support 80-screen-width tracking wallet labels
Labels with double-wide CJK characters can already occupy 80 terminal cells.
Extend the same privilege to all labels.
2019-05-28 17:49:45 +03:00
037acf0791
modularize objtest.py 2019-05-27 11:34:23 +03:00