Commit graph

240 commits

Author SHA1 Message Date
Boris Nagaev
3abede2d8e
cmd/loop: fix openchannel help typo
Correct the duplicated article in the static openchannel
help text so the command summary reads cleanly. Refresh the
recorded help fixtures that surface that summary directly,
including the dedicated openchannel help output and the
parent static command listing.
2026-05-20 03:12:04 -05:00
Boris Nagaev
ca1ce698f0
cmd/loop: bless text-only session updates
Add an env-gated bless mode to recorded-session replay so
CLI-only text changes can refresh fixtures without a live
recording pass. The replay still uses the recorded gRPC
traffic, stdin, and environment, and it only rewrites
stdout, stderr, and run_error after the command preserves
the recorded success or failure shape.

Keep the updater strict by refusing to bless sessions when
replay leaves recorded gRPC events unconsumed, and add
focused tests for the rewrite rules. Document the bless
workflow next to the session fixtures, including the need
for -count=1 so the Go test cache does not skip updates.
2026-05-20 03:12:04 -05:00
Boris Nagaev
e6e3820a76
testdata: add sessions for newly added features 2026-05-20 03:12:04 -05:00
Boris Nagaev
7683da65ff
testdata: add static address and swaps sessions 2026-05-20 03:12:04 -05:00
Boris Nagaev
662f954e0f
testdata: add liquidity sessions 2026-05-20 03:12:03 -05:00
Boris Nagaev
541e0e00fc
testdata: add loop in/out and quote sessions 2026-05-20 03:12:03 -05:00
Boris Nagaev
074257e348
testdata: add instantout and l402 sessions 2026-05-20 03:12:03 -05:00
Boris Nagaev
5157dad741
testdata: add basic swap sessions 2026-05-20 03:12:03 -05:00
Boris Nagaev
9640e3bd4c
cmd/loop: add session recording guide 2026-05-20 03:12:03 -05:00
Boris Nagaev
c3009182b3
cmd/loop: add session replay tests 2026-05-20 03:12:03 -05:00
Boris Nagaev
137097915c
cmd/loop: add session recorder plumbing 2026-05-20 03:12:03 -05:00
Boris Nagaev
c3e102527a
cmd/loop: add session gRPC transport hook 2026-05-20 03:12:03 -05:00
Boris Nagaev
d0591e62b9
cmd/loop: add stdio hooks 2026-05-20 03:12:03 -05:00
Boris Nagaev
cdec0cacef
cmd/loop: add cli clock and hook 2026-05-20 03:12:03 -05:00
Boris Nagaev
3e9a99dd55
cmd/loop: factor newRootCommand 2026-05-20 03:12:03 -05:00
Boris Nagaev
74c7274b03
cmd/loop: add client conn cleanup 2026-05-20 03:12:03 -05:00
Boris Nagaev
3182be8bf1
cmd/loop: remove orphan flag access
abandonSwap used to access flag --id which does not exist.
2026-05-20 03:12:03 -05:00
Boris Nagaev
61945bd9f9
cmd/loop: print homedir in help messages as ~
Make the output homedir-independent to facilitate tests.
2026-05-20 03:12:03 -05:00
Olexandr88
6fd752f7e7
cmd/loop: fix panic on zero index in instantout reservation selection 2026-04-29 16:18:36 +02:00
Olexandr88
7b1c60dba2
fix: guard against short reservation id when printing shortid 2026-04-29 16:18:36 +02:00
Slyghtning
b5d26775a5
cmd/loop: drop misleading static loop-in fee warning 2026-04-23 19:21:49 +02:00
Boris Nagaev
659d812634
cmd/loop: add max swap fee flags for static in
Add --max_swap_fee_sat and --max_swap_fee_ppm flags to `loop static in`.
When set, the resolved cap is checked against the current quote before
confirmation and sent in MaxSwapFeeSatoshis instead of the quoted fee,
giving scripts a budget ceiling without the quote-then-retry workaround.
2026-04-06 23:06:55 -05:00
Boris Nagaev
6d18faafa9
cmd/loop: add static loop-in fee cap helper
Add resolveMaxSwapFee helper that computes an effective maximum swap fee
from --max_swap_fee_sat and --max_swap_fee_ppm CLI flags. When both are
set the tighter (lower) cap wins. The helper also rejects early if the
server-quoted fee already exceeds the resolved cap.
2026-04-06 23:06:55 -05:00
Slyghtning
a10c741a26
lint: fix linter issues 2026-03-09 14:39:45 +01:00
Slyghtning
79120cc4bc
cmd: open channel command 2026-02-26 21:16:49 +01:00
Slyghtning
f47b611557
looprpc: extend client.proto with lnrpc.OutPoint and lnrpc.OpenChannelRequest
In this commit we import the lnd's lightning.proto into client.proto to
then be able to use lnrpc.OutPoint and lnrpc.OpenChannelRequest instead
of the looprpc.OutPoint type.
This is safe because the lnrpc and looprpc versions of OutPoint are the
same type.
2026-02-26 09:37:26 +01:00
Boris Nagaev
579ea31979
cmd/loop: add command "loop out sweephtlc"
The command is hidden, it is not for everyday use.
2026-01-29 17:40:58 -05:00
Slyghtning
5ec5875dd7
cmd: replace grpc.DialContext with grpc.NewClient 2025-12-19 10:18:08 +01:00
Slyghtning
7fc07ae99b
cmd: add --includealleasypeers 2025-11-21 15:38:12 +01:00
Slyghtning
bb8ee54817
cmd: exclude peers for easy autoloop 2025-11-21 15:34:49 +01:00
Boris Nagaev
a4dc59099b
cli: add command "loop stop"
* add StopDaemon RPC with permissions + REST binding
* expose `loop stop` CLI (with optional --wait) and wait logic
* pass daemon shutdown callback + unit test and regenerate docs/protos
2025-11-19 23:42:48 -03:00
Slyghtning
8df357bbc9
loopout: don't print htlc address 2025-11-10 17:46:59 +01:00
Boris Nagaev
c32309ec5c
cmd/loop: remove custom cli-docs template override
Now that https://github.com/urfave/cli-docs/pull/15 removes empty environment
variable columns, we can rely on upstream and delete our embedded template copy.
2025-11-04 21:58:52 -03:00
sputn1ck
c8c78c6f7a
versioning fixups 2025-10-31 19:05:40 +01:00
sputn1ck
e4f64ec9cc
Revert "Merge pull request #1028 from starius/downgrade-deps"
This reverts commit b11c959bc8, reversing
changes made to 0a182ee308.
2025-10-31 18:48:26 +01:00
Boris Nagaev
7d58b65a84
go.mod: downgrade deps for litd release
lnd v0.19.3-beta
tapd v0.6.1
go 1.23.12 (except in tools/ where golangci-lint needs Go 1.24)

Remove docs generators as cli-docs depends on Go 1.24.
2025-10-31 10:23:52 -03:00
Boris Nagaev
ef8b7b7dc2
cli: rename --amount to --amt in static
loop static in --amt
loop static withdraw --amt

This is done to make it consistent with other commands and products.

Keep --amount flag as an alias.
2025-10-26 15:07:30 -03:00
Boris Nagaev
83cbc7e30f
cli: fix --amount flag in static in and withdraw
Also fix --sat_per_vbyte flag.

All these flags were accessed using wrong type (signed vs unsigned int).
Previous version always parsed them as 0 even when set.

Regenerate the manual.
2025-10-24 19:39:46 -03:00
Slyghtning
e70d347ae9
cmd: display correct Receive off-chain amount 2025-10-08 11:38:37 +02:00
Boris Nagaev
15f94234cd
cmd/loop: add commands "loop man", "loop markdown"
Produce the documentations in man .1 and markdown formats.

The template for markdown was patched to removed column "Environment variables"
Upstream PR: https://github.com/urfave/cli-docs/pull/15

Also the input has to be pre-processed to remove nested "help" subcommands from
each subcommand to improve readability.
Upstream PR: https://github.com/urfave/cli-docs/pull/16
2025-10-07 16:54:38 -03:00
Boris Nagaev
5e6e789496
cmd/loop: urfave/cli -> urfave/cli/v3 2025-10-07 14:41:02 -03:00
Boris Nagaev
0ff91716d9
cmd/loop: fix validation of "static in --label"
Previous version validated the value of non-existent flag "static-loop-in".
The value passed to loopd was correct though.
2025-10-07 14:05:13 -03:00
Boris Nagaev
dfad554d43
cmd/loop: parse string slice as string slice
Previously it was parsed as a single JSON string. Now each hint is parsed
individually.
2025-10-07 14:05:13 -03:00
Boris Nagaev
5fa5a4e1b8
cmd/loop: parse start_time_ns as int, not string
urfave/cli/v3 returns "" if an int flag is accessed using String getter.
2025-10-07 14:05:13 -03:00
Boris Nagaev
e8f5a54b22
cmd/loop: parseAmt fails in negative amounts 2025-10-07 14:05:13 -03:00
Boris Nagaev
ea9f902de2
cmd/loop: parse --amt as int, not as string
urfave/cli/v3 returns "" if an int flag is accessed using String getter.
2025-10-07 14:05:13 -03:00
Boris Nagaev
dfb16df6ad
cmd/loop: hide command forceautoloop
It is not intended for prod use. Those who need it can still use it.
2025-10-07 14:05:13 -03:00
Slyghtning
39b3752480
cmd: print quoted amount from InQuoteRequst 2025-10-07 11:13:44 +02:00
Slyghtning
f05b0e630c
cmd: positional amount flag for staticaddr loop-in 2025-10-07 09:14:17 +02:00
Slyghtning
25485226e4
cmd: staticaddr fast-flag support 2025-10-07 09:12:39 +02:00