54 Commits

Author SHA1 Message Date
Oliver Gugger
37523b6cb7 Merge pull request #10100 from Abdulkbk/fix-chanid-flag
commands: fix how we parse chan ids args at CLI level
2025-07-31 06:49:46 -06:00
MPins
e6a420647c commands: add command to delete canceled invoice
Adds the deletecanceledinvoice by payment hash command.
2025-07-25 21:21:58 -03:00
Abdullahi Yunus
754c254a4b commands: add test for parseChanIDs
In this commit we add test for `parseChanIDs` to make sure it
parses the chan ids correctly and return errors when invalid value
is passed.

Signed-off-by: Abdullahi Yunus <abdoollahikbk@gmail.com>
2025-07-23 15:31:59 +01:00
Abdullahi Yunus
35c6cecd22 commands: use parseChanIDs method
In this commit we use the `parseChanIDs` method introduced in a
previous commit to process the `outgoing_chan_id` flag for
`queryroutes`.
2025-07-23 15:24:03 +01:00
Abdullahi Yunus
40fe9e9ce3 commands: use StringSlice flag for send payment
In this commit we replace the Int64Slice flag with StringSlice for
chan id flag, in sendpayment request.
2025-07-23 15:21:55 +01:00
Abdullahi Yunus
4751016839 commands: use StringSliceFlag for chan ids
In this commit we use stringSlice flag for incoming and outgoing
channel ids args, for forwarding history command. The Int64Slice
range does not cover all possible scids in the custom alias range.
2025-07-23 15:08:58 +01:00
Abdullahi Yunus
3c40233f83 commands: specify multiple outchan ids
In this commit we make it possible to specify outgoing_chan_id
multiple times in the same queryroutes command.
2025-07-15 18:42:43 +01:00
Gustavo Stingelin Cardoso Filho
0324902ea8 cmd/wtclient: add usage info for session and terminate commands 2025-06-30 23:06:51 -03:00
Boris Nagaev
7a70dcb36e lnrpc: add auth_proof to graph APIs
Added flag include_auth_proof to DescribeGraph, GetNodeInfo, GetChanInfo
and the corresponding lncli commands. With the flag, these APIs add AuthProof
(signatures from the channel announcement) to the returned ChannelEdge.

This is useful to extract this data from the DB.
2025-06-19 18:19:33 -03:00
Shivam Chawla
bfe1edf4ec lnrpc: add filters to forwardhistoryrequest
This commit adds incoming and outgoing channel ids filter to forwarding history request to filter events received/forwarded from/to a particular channel
2025-06-11 09:10:13 +05:30
Oliver Gugger
fc906f2a65 Merge pull request #9127 from MPins/issue-8993
Add the option on path creator to specify the incoming channel on blinded path
2025-06-05 08:47:05 +02:00
Alex Pilon
baf2e445f4 lncli: Add --route_hints flag support
Adds --route_hints flag to sendpayment.
Hints should be JSON encoded (see usage for example).

Adds --route_hints flag to queryroutes.
Errors if blinded paths are set.
2025-05-24 20:01:45 -04:00
MPins
a7da230ffa commands: add option to set the incoming channel on blinded path
Including the blinded path incoming channel list argument to the
addinvoice command, parsing and verifying that it has one or a
comma separeted list of channels id.
2025-05-13 17:02:44 -03:00
bitromortac
d33c92bd19 lncli: option to skip prompts for loadmc
This makes the command scriptable.
2025-05-06 11:13:30 +02:00
bitromortac
725a80a3b7 lncli: remove possibility to discard mission control from loadmc
This can already be done with resetmc and was only included here because
loadmc was used in a different context.
2025-05-06 10:59:41 +02:00
bitromortac
452022ee75 lncli: establish connection after mc parsing for loadmc
It can take some time to unmarshal large mission control data sets such
that the macaroon can expire during that phase. We postpone the
connection establishment to give the user more time to answer the
prompt.
2025-05-06 10:59:38 +02:00
bitromortac
56ccf60267 lncli: correct docs for loadmc 2025-05-06 10:53:37 +02:00
bitromortac
8351018f8b lncli: add loadmc command
This command lets one import data exported by `lncli querymc > mc.json`
via `lncli loadmc --mcdatapath mc.json`.
2025-05-05 15:02:55 +02:00
bitromortac
180f61b9eb lncli: change importmc category 2025-05-05 15:02:55 +02:00
yyforyongyu
d991f5659a commands: add new field MaturityHeight 2025-04-29 13:49:22 +08:00
ziggie
729c84bee3 lncli: return more clear error msg for deletepayments 2025-04-18 15:30:39 +02:00
Oliver Gugger
04533e924c cmd: fix incorrect error code
Fixes a bug introduced by #9605, fixes #9648.
We return a specific error in the RPC permission interceptor for the
case where the wallet is already unlocked or is still locked.
We need to catch those errors correctly to give the user a bit more
context on what to do.
2025-03-26 11:28:59 -05:00
Olaoluwa Osuntokun
67d2eac437 Merge pull request #9620 from guggero/testnet4
chain: add testnet4 support
2025-03-24 15:48:26 -07:00
Sam Korn
bb398456b5 cmd: more input parameters checks for listchaintxns cli command
add a parsing block height function and error when block heights would produce invalid results
2025-03-24 10:53:38 -06:00
Oliver Gugger
0aea482b51 multi: add testnet4 support 2025-03-24 11:53:23 -05:00
Olaoluwa Osuntokun
c292acfe74 Merge pull request #9605 from yyforyongyu/fix-unlock-wallet
cmd: fix error parsed from status
2025-03-18 11:37:35 -05:00
yyforyongyu
2d6148291f cmd: fix error parsed from status
The `codes.Unimplemented` is only returned when the RPCs are not built.
When the wallet is in an unexpected state, `codes.Unknown` is returned
instead, so we need to catch it properly to make sure we return the
right error msg.
2025-03-17 22:59:56 +08:00
Slyghtning
1681be6d65 lncli: ip range caveat for macaroons 2025-03-13 09:57:41 -05:00
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
ziggie
34c4d12c71 walletrpc: add new deadline-delta param to bumpfee rpc
Add new parameter deadline-delta to the bumpfee request and only
allow it to be used when the budget value is used as well.
2025-02-07 11:28:41 +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
Keagan McClelland
ed2989ae33 multi: update to fn v2 2024-12-04 13:19:00 -07:00
Oliver Gugger
0474b4ff20 Merge pull request #9314 from ellemouton/slog1
build+lnd+docs: start using slog and add commit_hash to log lines
2024-12-02 09:53:31 +01:00
Elle Mouton
ab7aae0708 multi: rename nolint:lll to nolint:ll
Find and replace all nolint instances refering to the `lll` linter and
replace with `ll` which is the name of our custom version of the `lll`
linter which can be used to ignore log lines during linting.

The next commit will do the configuration of the custom linter and
disable the default one.
2024-12-02 09:14:21 +02:00
Slyghtning
85d89a5b41 cmd: fix default timeout for estimateroutefee 2024-11-29 10:20:03 +01:00
Oliver Gugger
66940024ac Merge pull request #9290 from w3irdrobot/broadcast-misspelling
docs: fix broadcast misspelling
2024-11-25 12:25:51 +01:00
w3irdrobot
d3bff47167 docs: fix broadcast misspelling 2024-11-22 16:20:02 -05:00
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
4bf24695d7 cmd/commands: fix custom message commands
The sendcustom and subscribecustom sub commands weren't correctly
categorized and didn't have any usage text set.
2024-11-06 15:30:30 +01:00
Oliver Gugger
870e845a1e cmd/lncli: print new status responses to CLI 2024-11-06 15:30:27 +01:00
George Tsagkarelis
b51dde7af8 cmd: expose max_fee_ratio to fundpsbt command 2024-11-05 19:56:38 +01:00
Oliver Gugger
837ff3427c cmd/lncli: add new --sat_per_kw flag to lncli wallet fundpsbt 2024-11-04 14:12:26 +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
f0b1015bae Merge pull request #9187 from guggero/fix-custom-data
rpcserver+lncli: fix custom channel data encoding issue
2024-10-15 17:31:25 +02:00
Oliver Gugger
8c79940374 cmd/commands: don't error out on replacement failure 2024-10-15 16:40:35 +02:00
Oliver Gugger
882f25667e cmd/commands: add root_key flag to bakemacaroon command 2024-10-15 09:48:46 +02:00
Oliver Gugger
fd37c6f90a cmd/commands: add mac_root_key flag to unlock commands
This commit adds a new --mac_root_key flag to both the lncli create and
lncli createwatchonly commands that allows the user to specify the
macaroon root key that should be used when creating the macaroon
database on wallet initialization.
This allows for deterministic wallet initialization and baking of
macaroons before the wallet is initialized.
2024-10-15 09:48:18 +02:00