Commit graph

11 commits

Author SHA1 Message Date
ziggie
59443faa36
multi: coop close with active HTLCs on the channel
For the lncli cmd we now always initiate the coop close even if
there are active HTLCs on the channel. In case HTLCs are on the
channel and the coop close is initiated LND handles the closing
flow in the background and the lncli cmd will block until the
transaction is broadcasted to the mempool. In the background LND
disallows any new HTLCs and waits until all HTLCs are resolved
before kicking of the negotiation process.
Moreover if active HTLCs are present and the no_wait param is not
set the error msg is now highlightning it so the user can react
accordingly.
2025-02-20 17:43:18 +01:00
ziggie
3562767b23
lncli: only add additional info to specific cmds.
We only append the chan_id and the human readable scid
for the commands `listchannels` and `closedchannels`. This
ensures that other commands like `buildroute` are not affected
by this change so their output can be piped into other cmds.

For some cmds it is not very practical to replace the json output
because we might pipe it into other commands. For example when
creating the route we want to pipe the result of buildroute into
sendtoRoute.
2025-02-12 23:29:56 +01:00
Nishant Bansal
103a194e5c
cmd/lncli: update listchannels output fields
Added scid_str as a string representation of chan_id,
replacing chan_id with scid, and including chan_id(BOLT02)
in lncli listchannels output.

Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2025-01-15 17:58:06 +05:30
Oliver Gugger
94f7ed46de
Merge pull request #8998 from Abdulkbk/trx-pagination
pagination: add pagination to wallet transactions
2024-11-22 09:30:11 +01:00
Abdullahi Yunus
762d01536b multi: return txns first and last indices
In this commit we introduce first and last indices for the
tranasctions returned which can be used to seek for further
transactions in a pagination style.

Signed-off-by: Abdullahi Yunus <abdoollahikbk@gmail.com>
2024-11-22 08:22:55 +01:00
Jesse de Wit
aa2ddf77d0
lncli: add create_missing_edge 2024-11-13 12:13:11 +01:00
Oliver Gugger
870e845a1e
cmd/lncli: print new status responses to CLI 2024-11-06 15:30:27 +01:00
sputn1ck
6be3e5b609
cmd/sendcoins: fix amt if select utxo
This commit fixes the display of the amount when
selecting utxos for the sendcoins command and
combining it with the `-sweepall` flag. Prior this
would show the full balance of the wallet. Now it
shows the total amount of the selected utxos.
2024-10-28 10:03:52 +01:00
Oliver Gugger
8c79940374
cmd/commands: don't error out on replacement failure 2024-10-15 16:40:35 +02:00
Boris Nagaev
a1aec88268
[lncli] exportchanbackup single channel in hex
It used to be base64, which is not compatible with verifychanbackup,
expecting hex.
2024-10-11 10:00:42 -03:00
Oliver Gugger
22a3988222
cmd/lncli: move commands and export
We want to export some of our CLI code to re-use in other projects. But
in Golang you cannot import code from a `main` package.
So we need to move the actual code into its own package and only have
the `func main()` in the `main` package.
2024-08-23 10:57:59 +02:00
Renamed from cmd/lncli/commands.go (Browse further)