Commit graph

222 commits

Author SHA1 Message Date
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
Slyghtning
a012430596
loopd: fractional static address swap amount 2025-09-25 11:13:35 +02:00
Slyghtning
e98f733ef8
linter: fix lint issues after linter v2 update 2025-08-19 21:57:00 +02:00
Slyghtning
06bbb90fb1
cmd: add listwithdrawals command 2025-06-10 17:07:32 +02:00
Slyghtning
48a5f460b9
Merge pull request #944 from hieblmi/fix-static-commands
cmd: fix command descriptions
2025-05-19 16:32:17 +02:00
Slyghtning
1687590ef9
cmd: fix command descriptions 2025-05-19 15:53:03 +02:00
Slyghtning
cf0651af38
staticaddr: add expiry to NewAddress response 2025-05-15 14:56:49 +02:00
Oliver Gugger
059186568f
mod: bump tapd, add replace directive to compile tapd
Because tapd now uses a fork of the SQL migration library, which can
only be used through a replace directive which isn't populated
transitively to other dependent projects, we now need to copy that
directive to every project.
2025-05-02 09:49:07 +02:00
sputn1ck
1ce9bdd0d3
multi: use reservation ids in instant out quote 2025-04-30 15:35:25 +02:00
Andras Banki-Horvath
693d3a4ca0
liquidity: default to slow swaps for autloop 2025-04-29 18:56:49 +02:00
Sam Korn
b55521cb41
looprpc: add simple pagination to the ListSwaps command
This commit adds the ability to set a max_swaps and an index_offset
flag to the ListSwaps command. These new fields are applied AFTER
the initial filtering step. The response also now passes additional
information about the index count and total swaps filtered.
2025-04-19 22:31:45 -06:00
Boris Nagaev
023ac009c0
cmd/loop: crash if unknown flags are provided
Verify the number of positional arguments if they were provided to crash in
such scenarios:
$ loop out 250000 --xxx
$ loop in 250000 1000
These commands used to work ignoring the last argument.
2025-04-04 17:45:12 -03:00
Andras Banki-Horvath
9a6266f9f7
loop: add the commit_hash to GetInfoResponse, change version semantics
With this commit we extend GetinfoResponse with the strict commit hash
(which also includes whether the build tree was clean or dirty).
2025-04-04 12:47:30 +02:00
András Bánki-Horváth
00063418bd
Merge pull request #901 from gcaracuel/cli_env_global_flags
loop: Global flags to accept ENV vars overrides.
2025-04-01 18:16:12 +02:00
sputn1ck
98e6bf08c7
cmd: add debug forceautoloop cmd 2025-03-25 15:27:53 +01:00
sputn1ck
1dc1192282
cmd: add easy autoloop asset flags 2025-03-25 15:27:53 +01:00
gcaracuel
8534d0a048
loop: Global flags to accept ENV vars overrides. 2025-03-19 15:34:07 +01:00
Oliver Gugger
65251e8821
multi: update linter, fix issues 2025-03-10 22:59:50 +01:00
Slyghtning
c7cc47bdc3
loopd: arbitrary withdrawal amount for static address deposits 2025-02-09 15:57:26 +01:00