- do strict type checking in initializer, forbid double initialization
- add dynamic decimal precision based on protocol
- dunder method fixes, cleanups
- JSON-RPC library now returns floats (i.e. amounts) as strings instead of Decimal,
eliminating an extra conversion step
- this is a work in progress, only a few coins are currently supported
Testing:
$ test/unit_tests.py -v bip_hd
Examples:
$ PYTHONPATH=. examples/bip_hd.py
This patch completes the implementation of the API, making the entire MMGen
code base usable as a library for external projects. A usage example can be
found in the script `examples/coin-daemon-info.py`.
Testing:
$ test/test.py -e coin_daemon_info
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.