ThomasV
65b88dca86
return fees in history, show them in kivy GUI
2019-09-11 17:49:40 +02:00
ThomasV
cefa4762ba
do not create multiple instances of SimpleConfig ( fix #5629 ). Add config field to wallet
2019-09-10 08:57:40 +02:00
SomberNight
ef5a5151e3
daemon: make 'wallets' dict private
...
especially as keys (paths) need to be standardized, this should not be exposed
2019-09-09 22:15:11 +02:00
ThomasV
103a37b0ca
add wallet_path to kwargs in run_cmdline
2019-09-09 09:58:16 +02:00
ThomasV
46ffab0b55
remove --wallet option for daemon. fixes #3752
2019-09-09 06:28:54 +02:00
ThomasV
5e92f637a6
fix CLI exception handling
2019-09-06 12:38:13 +02:00
ThomasV
35b0b3a43c
Fix CLI. Some commands require wallet_path. Return error on exception.
2019-09-06 11:06:08 +02:00
SomberNight
712c3f1248
commands: try to fix tests
2019-09-05 23:22:11 +02:00
SomberNight
58681e4d07
follow-up prev (commands)
2019-09-05 18:30:04 +02:00
ThomasV
9ec9e1760a
CLI: always use the daemon's cmd_runner, and pass the 'wallet'
...
parameter explicitly to each command that requires it.
Previous code was relying on side effects to set the wallet.
This should fix #5614
2019-09-05 17:57:51 +02:00
ThomasV
128285a050
http server: add ssl and bip70 signed requests
2019-09-05 10:57:50 +02:00
SomberNight
9d65120e59
commands: fix "close_wallet"
2019-09-04 20:16:47 +02:00
SomberNight
1bd9b3a66a
commands: fix "restore" cmd
...
Previously commands did not run on the asyncio thread but now they do.
"restore" was polling like "while 1: time.sleep()", blocking the event loop.
Now "restore" does not sync the wallet; which is actually cleaner
as previously this wallet would never get unloaded from the daemon (syncing forever).
This is also symmetric with the "create" cmd which also does not try to sync with the network.
However now it became difficult to write a script that restores a wallet and wants to wait
until it gets synced. Workaround for now is to poll with "list_wallets" whether it's synced.
We could create a new command that blocks until the loaded wallet gets synced.
2019-09-04 20:15:54 +02:00
ThomasV
747ab7a0a2
Integrate http_server (previously in electrum-merchant)
...
Use submodule to fetch HTML and CSS files
2019-09-04 12:20:05 +02:00
ThomasV
7f870f5e09
replace daemon 'start' subdommand with -d
2019-09-02 19:04:08 +02:00
SomberNight
eb5033dfc6
commands: add feerate param to payto/paytomany
2019-09-01 17:52:02 +02:00
ThomasV
e79253b5e0
Syntax change: Require --offline to run commands without a daemon.
...
That makes the syntax less ambiguous. It also makes it possible to
implement a CLI that does not import all the electrum modules.
2019-08-31 09:24:00 +02:00
ThomasV
8010123c08
Display and refresh the status of incoming payment requests:
...
- All requests have an expiration date
- Paid requests are automatically removed from the list
- Unpaid, unconfirmed and expired requests are displayed
- Fix a bug in get_payment_status, conf was off by one
2019-08-22 06:00:45 +02:00
ThomasV
246cda2928
fix Flake8 tests
2019-08-20 09:03:12 +02:00
ThomasV
9cfeadea70
Turn daemon subcommands into RPCs
2019-08-20 09:03:12 +02:00
ThomasV
54257cbcca
Rewrite JsonRPC requests using asyncio.
...
- commands are async
- the asyncio loop is started and stopped from the main script
- the daemon's main loop runs in the main thread
- use jsonrpcserver and jsonrpcclient instead of jsonrpclib
2019-08-20 09:03:12 +02:00
SomberNight
6b1810f8dc
commands.py: fix type of "timeout" arg
...
was str by default
2019-08-20 09:03:12 +02:00
ThomasV
e5286f7598
minor fix: always initialize Commands.lnworker
2019-08-20 09:03:12 +02:00
ThomasV
28b1569f28
(trivial) fix getbalance
2019-08-20 09:03:12 +02:00
ThomasV
9f8e2c689e
test funding_txn_minimum_depth, show it in GUI
2019-08-20 09:03:12 +02:00
SomberNight
4ccfa39fdd
cli: fix add_peer cmd
2019-08-20 09:03:12 +02:00
ThomasV
af7d7e883c
Rework wallet history methods:
...
- wallet.get_full_history returns onchain and lightning
- capital gains are returned by get_detailed_history
- display lightning history in kivy
- command line: separate lightning and onchain history
2019-08-20 09:03:12 +02:00
ThomasV
0913194a53
qt: add clear button to receive tab, show invoice right after it is added
2019-08-20 09:03:11 +02:00
ThomasV
b8d908d63e
lnworker improvements:
...
- enable option data_loss_protect
- separate add_peer from open_channel
- display exceptions raised in open_channel
2019-08-20 09:03:11 +02:00
ThomasV
dbe8b75659
move lnpay attempts logic to lnworker.pay
2019-08-20 09:03:11 +02:00
ThomasV
7be4cdaf18
redeem htlcs:
...
- fix bug in lnsweep: lnwatcher transactions were indexed by prev_txid
- add test for breach remedy with unsettled htlcs
- add timeout option to lnpay, and replace DO_NOT_SETTLE with SETTLE_DELAY
so that we can read intermediate commitment tx in regtest
2019-08-20 09:03:11 +02:00
ThomasV
6d9ef29690
redo LNWorker pay:
...
- wait until htlc has been fulfilled
- raise if htlc is not fulfilled
- return boolean success
- try multiple paths in GUI
2019-08-20 09:03:11 +02:00
ThomasV
b1f8c42424
post-rebase fix
2019-08-20 09:03:11 +02:00
ThomasV
842fff832f
enable lightning through command line option
2019-08-20 09:03:11 +02:00
ThomasV
e7218d798d
add get_channel_ctx to CLI, for testing breaches
2019-08-20 09:03:11 +02:00
ThomasV
3dce65dc73
Rename lnchan, lnchannel_verifier, lnbase
...
Auto-completions are a pain if files share a long prefix
2019-08-20 09:03:11 +02:00
ThomasV
d383573bc3
CLI: use funding_point in channel_open and channel_close. add host:port to nodeid
2019-08-20 09:03:11 +02:00
ThomasV
f04e10f61a
save channel timestamps, and show lightning payments in history tab
2019-08-20 09:03:11 +02:00
ThomasV
b7d93e2e11
gui: display lightning balance in status bar
2019-08-20 09:03:11 +02:00
ThomasV
2af178a586
Store boolean is_received in lightning invoices. Sort lightning history with timestamp. Minor fixes
2019-08-20 09:03:11 +02:00
ThomasV
281d51c002
follow-up prev commit
2019-08-20 09:03:11 +02:00
ThomasV
0e8dba897e
lightning:
...
* store invoices for both directions
* do not store lightning_payments_inflight, lightning_payments_completed in lnworker
* payment history is returned by get_payments method of LNChannel
* command line: lightning history, lightning_invoices
* re-enable push_msat
2019-08-20 09:03:11 +02:00
ThomasV
b0d6000771
turn lightning_payments_completed into dict. Show status of lightning payments in GUI. Make 'listchannels' available offline
2019-08-20 09:03:11 +02:00
Janus
6b6097a453
ln: add closechannel cli command
2019-08-20 09:03:11 +02:00
Janus
1425628604
add command for listing invoices and their progress, fix list_channels
2019-08-20 09:03:11 +02:00
ThomasV
626d09b358
add 'recḱless' option to allow using lightning on mainnet
2019-08-20 09:03:10 +02:00
ThomasV
9a88b5605a
add more fields to list_channels
2019-08-20 09:03:10 +02:00
ThomasV
6f3c2b30ed
lnbase: propagate error messages received in on_error to their relevant coroutines
2019-08-20 09:03:10 +02:00
SomberNight
17457327ef
make key derivation reasonable
...
no more hardcoded secrets, no more key-reuse
2019-08-20 09:03:10 +02:00
Janus
0405f0d9ad
accept channel opening requests initiated by remote
2019-08-20 09:03:10 +02:00