Add a `wallet submitpackage` command that takes one or more hex-encoded
raw transactions (topologically sorted, parents first and the child
last) and an optional --max_fee_rate, and submits them as a package via
the WalletKit.SubmitPackage RPC.
Migrate all btcd dependencies to the new per-package v2 modules (wire/v2,
txscript/v2, chaincfg/v2, chainhash/v2, btcutil/v2, psbt/v2, btcec/v2)
introduced by btcd v0.26.0, and pin the tagged ecosystem versions:
btcwallet v0.17.0, neutrino v0.18.0 and lightning-onion v1.4.0.
The bulk of the import rewrite was produced by the scripted diff from
https://github.com/btcsuite/btcd/pull/2547 (followed by 'make rpc'). The
address symbols that moved out of btcutil into the new address package
are imported as btcaddr where a local "address" variable would otherwise
shadow them. The go.mod/go.sum updates and the remaining manual
compilation fixes are folded into this single commit so it builds on its
own (the migration was previously split into a reproducible scripted-diff
plus follow-ups, intended to be squashed on merge).
In this commit, we shuffle the CLI and RPC names so the bare "taproot"
identifier refers to the production taproot channel type (final
scripts, feature bits 80/81), i.e. the variant new integrations should
actually be using. Before this commit, "taproot" on the CLI mapped to
the staging bits, and anyone who wanted a real production taproot
channel had to spell out "taproot-final" on `lncli openchannel` or
`SIMPLE_TAPROOT_FINAL` over RPC. The recommended choice was hidden
behind the longer name.
On the CLI (`lncli openchannel --channel_type=...`):
- "taproot" now selects the production variant (it used to mean
staging).
- "taproot-staging" is added for the legacy development bits, for
peers that haven't moved over yet.
- "taproot-final" stays as a deprecated alias for "taproot" so
existing scripts don't break.
On the RPC (`CommitmentType`):
- `TAPROOT = 7` is added as the canonical name for the production
type. `SIMPLE_TAPROOT_FINAL = 7` is kept as a deprecated alias via
`option allow_alias = true`, so existing clients keep compiling
against the same Go constant and the wire value doesn't change.
- `SIMPLE_TAPROOT = 5` (staging) is unchanged.
- `SIMPLE_TAPROOT_OVERLAY = 6` is unchanged. The taproot-assets
daemon hard-codes this distinct enum value, so it's unaffected.
Wire compat is preserved end-to-end: only the comments, enum entry
order, and the CLI string-to-enum mapping change. The numeric values
and the existing generated Go identifiers stay stable.
In this commit, we add the lncli deletefwdhistory command that wraps
the DeleteForwardingHistory RPC. The command accepts a time
specification in one of two forms:
--age=<duration> relative duration, e.g. "-90d", "-1M", "-720h"
--before=<unix> absolute Unix timestamp in seconds
An interactive confirmation prompt is shown before deletion proceeds,
which can be suppressed with --force/-f for unattended automation.
The --batch_size flag controls events deleted per database transaction
(default 10000, max 50000).
The response is printed as JSON, consistent with other lncli commands.
Add a new omit_hops field to ListPaymentsRequest that allows clients
to skip loading hop-level route data for HTLC attempts, reducing both
query cost and response size. When set, the route is returned with
only route-level fields (TotalTimeLock, TotalAmount, SourcePubKey)
and no individual hop data or hop-level custom records.
Add an --include_log boolean flag to the getdebuginfo and
encryptdebugpackage commands. When set, the log file content is included
in the response. The encryptdebugpackage command description is updated
to reflect the new default behavior.
Use the StateService stream to wait for LOCKED before sending the unlock
request, then wait for UNLOCKED/RPC_ACTIVE before reporting success.
If the state shows the wallet is already unlocked, skip sending the
unlock request and return an error immediately.
This avoids lost unlocks during slow startup.
Fix https://github.com/lightningnetwork/lnd/issues/7749
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>
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.
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.
This commit adds incoming and outgoing channel ids filter to forwarding history request to filter events received/forwarded from/to a particular channel
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.
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.
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.
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.
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.
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.
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.
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>