Commit graph

2,768 commits

Author SHA1 Message Date
b26657fb68
Curses-like scrolling UI for tracking wallet views
A stationary header and footer with scrollable area in the middle creates
a much improved user experience compared to the old “dumb terminal” interface,
especially for large tracking wallets.

Scroll with either the Vi keys or up/down/arrow keys.

All tracking wallet views supported: unspent outputs, address list, tx history.

Activate with --scroll on the command line, or by setting the `scroll` option
in the config file.

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

Sample invocation:

    $ mmgen-txcreate -qi --scroll

Interactive testing:

    # run the required regtest test dependencies:
    $ test/test.py -d regtest.view

    # test the scrolling UI interface interactively:
    $ PYTHONPATH=. MMGEN_TEST_SUITE=1 cmds/mmgen-tool --bob --scroll listaddresses interactive=1

    # when finished, stop the regtest daemon:
    $ test/stop-coin-daemons.py btc_rt
2022-12-07 10:40:59 +00:00
5b08b3d5e5
MSWin: get_char_raw(): support function keys; minor fixes 2022-12-07 10:40:59 +00:00
0097e99850
test/misc/term.py: support individual commands 2022-12-07 10:40:58 +00:00
d27f4a9c10
tw.view.format(): refactor nested funcs 2022-12-07 10:40:58 +00:00
0c860427cd
tw.view: various cleanups 2022-12-07 10:40:58 +00:00
bd411b1be4
tw.view: cleanup prompts 2022-12-07 10:40:57 +00:00
60d0a29c36
tw.view: ensure min screen width >= prompt width 2022-12-07 10:40:57 +00:00
65c0652ff5
tw.view: improve gen_subheader(), col_hdr implementation 2022-12-07 10:40:57 +00:00
08d78d46ad
tw.view: minor fixes and cleanups 2022-12-07 10:40:57 +00:00
1e00e05139
tw.view: oneshot_msg: whitespace 2022-12-07 10:40:56 +00:00
9f230795a6
tw.view: new attrs: use_cached, display_hdr, display_body 2022-12-07 10:40:56 +00:00
7733de546b
devtools: new pmsg_r() function 2022-12-07 10:40:56 +00:00
ff578e3a0e
tw.view: get_term_columns() -> get_term_dimensions() 2022-12-07 10:40:55 +00:00
9ebde72033
tw.view: minor cleanups 2022-12-07 10:40:55 +00:00
3831319c45
tw.view: remove interactive attr 2022-12-07 10:40:55 +00:00
c73409ac27
term: new set(), register_cleanup() methods 2022-12-07 10:40:54 +00:00
2a41029816
term: minor cleanups 2022-12-07 10:40:54 +00:00
06f914e2a8
test.include.pexpect: add timeout param 2022-12-07 10:40:53 +00:00
f58b1e27a2
twexport prune: handle overlong filenames 2022-12-03 17:40:45 +00:00
2e395edae2
minor testing fixes 2022-12-03 17:40:45 +00:00
217cd7ad39
Hilite: new hl2(), fmt2() methods; optimize fmt(), fmtc() 2022-12-03 17:40:44 +00:00
749dff6dd1
Hilite and subclasses: minor cleanups; truncate_str(): cleanup 2022-12-03 17:40:44 +00:00
8b6bdc72ca
new class: ETCAmt; ETHAmt -> proto.coin_amt 2022-12-03 17:40:43 +00:00
f62322b177
mmgen-tool twexport: address pruning
Bitcoin Core and code forks thereof provide no mechanism for deleting addresses
from a tracking wallet.  Enter tracking wallet exporting with address pruning:
calling ‘mmgen-tool twexport’ with the ‘prune=1’ option launches an interactive
prune menu, allowing the user to delete unwanted addresses from the JSON wallet
dump.  A new tracking wallet can then be easily created from the pruned dump
using ‘mmgen-tool twimport’.

Testing/demo:

    # run the dependencies for the regtest ‘twprune’ test:
    $ test/test.py -d regtest.twprune

    # run the test, displaying output:
    $ test/test.py -SA --demo regtest.twprune
2022-12-01 12:32:33 +00:00
2f5eeb066a
TwJSON.Import: add blockchain rescan warning 2022-12-01 12:32:33 +00:00
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