Commit graph

3,143 commits

Author SHA1 Message Date
66c0ca0576
mmgen-tool twimport: use aiohttp backend by default 2022-12-01 12:32:32 +00:00
96a5806506
CoinAmt: minor cleanup 2022-12-01 12:32:32 +00:00
9800e67dea
tw.view: new squeezed_format_line, detail_format_line methods 2022-12-01 12:32:32 +00:00
2632786800
tw.view: new squeezed_col_hdr, detail_col_hdr methods 2022-12-01 12:32:31 +00:00
d9a2e0cfd1
AddrIdxList: cleanups, new id_str property 2022-12-01 12:32:31 +00:00
77e7105a59
test.py: add --deps-only option 2022-12-01 12:32:31 +00:00
8a7873177a
test.py regtest: new auto_chg tests with MMGen-only wallet 2022-12-01 12:32:31 +00:00
5e08f8c964
tx.new, tw.addresses: cleanups, minor fix 2022-12-01 12:32:30 +00:00
2981cfbb8f
proto.btc.tw.json: support export of non-MMGen addresses 2022-12-01 12:32:30 +00:00
6622b8674b
test.py: command subgroups: include group deps only once 2022-12-01 12:32:30 +00:00
d29602c460
test.py regtest: cleanups 2022-12-01 12:32:29 +00:00
045fdefd73
mmgen-txcreate: automatic change address selection by address type
This patch introduces an improvement to commit cbe749813 (automatic change
address selection)

Instead of supplying a Seed ID + address type, users may now specify the
address type alone.  If the tracking wallet contains more than one unused
address matching the user’s criteria, the user is prompted to choose a specific
change address.

As with plain auto change address selection, this feature is entirely opt-in.

Sample invocations:

    # old invocation:
    $ mmgen-txcreate -q 35N9FntsNwy98TmjFHyCpsBVDVUs5wDPfB,0.123 01ABCDEF:B

    # new invocation:
    $ mmgen-txcreate -q 35N9FntsNwy98TmjFHyCpsBVDVUs5wDPfB,0.123 B

    # or, alternatively:
    $ mmgen-txcreate -q 35N9FntsNwy98TmjFHyCpsBVDVUs5wDPfB,0.123 bech32

Testing/demo:

    # run the regtest test partially, leaving the coin daemon running:
    $ test/test.py -D regtest.auto_chg

    # run the auto chg addrtype test, displaying script output:
    $ test/test.py -SAe regtest:bob_auto_chg_addrtype1

    # view the addresses in Bob’s tracking wallet, verifying that the first
    # unused ones in each grouping were chosen as change outputs:
    $ PYTHONPATH=. MMGEN_TEST_SUITE=1 cmds/mmgen-tool --bob listaddresses interactive=1

    # When finished, gracefully shut down the daemon:
    $ test/stop-coin-daemons.py btc_rt
2022-11-26 18:55:57 +00:00
ba291d4799
tx.new.process_cmd_arg(): cleanups 2022-11-26 18:55:56 +00:00
4da94df0da
tx.info: display amounts with columnar alignment 2022-11-26 18:55:56 +00:00
addd94c702
tw.view: new line_processing class 2022-11-26 18:55:56 +00:00
eacf3ae802
minor fix and cleanup 2022-11-26 18:55:55 +00:00
0448f76b70
option rename: --tx-gas -> --gas
This change breaks compatibility.  Scripts may need to be adjusted.
2022-11-26 18:55:55 +00:00
41ba603b13
tx.new,tx.bump: variable rename: tx_fee -> fee 2022-11-26 18:55:55 +00:00
ad1286ab97
option rename: --tx-fee -> --fee
This change breaks compatibility.  Scripts may need to be adjusted.
2022-11-26 18:55:54 +00:00
3f79be6dac
option rename: --tx-fee-adj -> --fee-adjust
This change breaks compatibility.  Scripts may need to be adjusted.
2022-11-26 18:55:54 +00:00
c15c97a95e
option rename: --tx-confs -> --fee-estimate-confs
This change breaks compatibility.  Scripts may need to be adjusted.
2022-11-26 18:55:54 +00:00
1e983497c7
update documentation from wiki 2022-11-26 18:55:48 +00:00
cbe7498131
mmgen-txcreate: automatic change address selection
Instead of selecting a specific change address, i.e. '01ABCDEF:B:7', users can
now omit the address index, specifying '01ABCDEF:B' instead, and the script
will automatically choose the first unused address in the tracking wallet
matching the requested seed ID and address type.

This feature is entirely opt-in.  Existing behavior continues to be supported
without alteration.

Sample invocations:

    # old invocation:
    $ mmgen-txcreate -q 35N9FntsNwy98TmjFHyCpsBVDVUs5wDPfB,0.123 01ABCDEF:S:7

    # new invocation:
    $ mmgen-txcreate -q 35N9FntsNwy98TmjFHyCpsBVDVUs5wDPfB,0.123 01ABCDEF:S

Testing/demo:

    # run the regtest test partially, leaving the coin daemon running:
    $ test/test.py -Dn regtest.view

    # run the 'auto_chg' test group, displaying script output:
    $ test/test.py -DSAe regtest.auto_chg

    # view the addresses in Bob’s tracking wallet, verifying that the first
    # unused ones in each grouping were chosen as change outputs:
    $ PYTHONPATH=. MMGEN_TEST_SUITE=1 cmds/mmgen-tool --bob listaddresses interactive=1

    # When finished, gracefully shut down the daemon:
    $ test/stop-coin-daemons.py btc_rt
2022-11-16 18:22:29 +00:00
f3fb91e2a7
mmgen-{txcreate,txdo}: help screen fixes, add EXAMPLES section 2022-11-16 18:22:29 +00:00
015afee89f
opts.py: print help screen only after full initialization of opts 2022-11-16 18:22:28 +00:00
7311b2d1cf
AddrListID: support initialization from string + proto 2022-11-16 17:56:05 +00:00
f45c140350
tx.get_chg_output_idx() -> tx.chg_idx 2022-11-16 17:56:05 +00:00
20d35ea637
minor fixes 2022-11-16 17:56:05 +00:00
68caeb3130
mmgen-txcreate: warn user if change address is a used address 2022-11-16 17:56:04 +00:00
4b07f8fac8
tx.process_cmd_arg(), tx.add_comment(): cleanups 2022-11-16 17:56:04 +00:00
321c85bf8f
AddrListID: call cleanups; proto.btc.daemon: missing import fix 2022-11-16 17:56:04 +00:00
e7a60184ed
tw.view: skip rstrip() for screen formatting 2022-11-16 17:56:03 +00:00
0c4728b3fe
Python 3.7 compatibility fix 2022-11-14 09:54:08 +00:00
00a52b687d
TwCtl: variable, attribute and key renames
- tw -> twctl
- wallet -> twctl
2022-11-14 09:54:08 +00:00
a6307b59bb
tool.rpc: delete tracking wallet instance in twops() 2022-11-14 09:54:07 +00:00
20f4b12832
module docstring cleanups [134 files] 2022-11-14 09:54:07 +00:00
21b8084b37
class rename: TrackingWallet -> TwCtl 2022-11-14 09:54:02 +00:00
9c07442191
CoinAmt: improve columnar formatting 2022-11-13 15:36:35 +00:00
357f7806b8
mmgen-tool getbalance: reimplement 2022-11-13 15:36:35 +00:00
fbd71fba77
tracking wallet classes: whitespace, cleanup; test.py: minor fix 2022-11-13 15:36:34 +00:00
6da4063544
tracking wallet views: move module loading to tw.view 2022-11-12 13:35:50 +00:00
20b250ef98
proto.base_proto_subclass(): simplify call signature 2022-11-12 13:34:42 +00:00
e237cf0e39
tw.view.TwView: add __init__() method 2022-11-12 13:34:41 +00:00
d513035aad
tracking wallet classes: reorder methods, cleanups 2022-11-12 13:34:41 +00:00
69b15a4ff9
new class: tw.rpc.TwRPC 2022-11-12 13:34:41 +00:00
e7d75ff60d
minor cleanups 2022-11-12 13:34:40 +00:00
79bcc049a5
proto.{btc,eth}.tw: module moves, class renames
- proto.btc.tw.common -> proto.btc.tw.rpc
    - proto.eth.tw.common -> proto.eth.tw.rpc, proto.eth.tw.view

    - BitcoinTwCommon -> BitcoinTwRPC
    - EthereumTwCommon -> EthereumTwRPC, EthereumTwView
2022-11-12 13:34:40 +00:00
a7b11f1d3b
move TwMMGenID, TwLabel, get_tw_label() to tw.shared 2022-11-12 13:34:40 +00:00
5948bd4106
module rename: tw.common -> tw.view 2022-11-12 13:34:40 +00:00
14fb60bc67
tracking wallet: TwCommon -> TwView 2022-11-12 13:34:34 +00:00