What changed, and why it matters
This commit adds a new command-line tool called `lncli wallet submitpackage` that lets users hand one or more raw Bitcoin transactions to LND's wallet service so they can be submitted to the network as a group (a "package"). The change only wires up an existing backend RPC to the command-line interface; it does not change how transactions are validated or accepted by the node. There is no indication in the commit that this fixes a security bug.
No security action required. Review as a normal feature addition; ensure the existing `WalletKit.SubmitPackage` RPC has appropriate access controls and input validation on the server side, since the CLI merely forwards user input.
Security signals we found
No security-relevant signals present in the diff or commit message.
New CLI command is a thin wrapper around an existing RPC.
No changes to validation, authentication, authorization, or network handling.
Evidence from the diff
The patch registers a new submitpackage CLI command in cmd/commands/walletrpc_active.go. It decodes hex-encoded raw transactions from positional arguments, optionally reads a --sat_per_vbyte max-fee-rate flag, and forwards them via walletrpc.SubmitPackage to the WalletKit RPC server. The command is a thin client wrapper around the already-existing SubmitPackage RPC and does not introduce new server-side logic, parsing of untrusted network data, or privilege changes.
Changed components
cmd/commands/walletrpc_active.golncli wallet command groupInspect captured patch +72 / −0
diff --git a/cmd/commands/walletrpc_active.go b/cmd/commands/walletrpc_active.go
index 4d6c281..126a134 100644
--- a/cmd/commands/walletrpc_active.go
+++ b/cmd/commands/walletrpc_active.go
@@ -87,6 +87,7 @@ func walletCommands() []cli.Command {
listSweepsCommand,
labelTxCommand,
publishTxCommand,
+ submitPackageCommand,
getTxCommand,
removeTxCommand,
releaseOutputCommand,
@@ -715,6 +716,77 @@ func publishTransaction(ctx *cli.Context) error {
return nil
}
+var submitPackageCommand = cli.Command{
+ Name: "submitpackage",
+ Usage: "Submit a package of related transactions for atomic " +
+ "validation and acceptance.",
+ ArgsUsage: "parent_tx_hex... child_tx_hex",
+ Description: `
+ Submit a package of related, topologically-sorted raw transactions
+ (unconfirmed parents first and the child last) to the chain backend
+ for atomic validation and acceptance via the submitpackage RPC.
+
+ This allows a zero-fee v3/TRUC parent to be accepted via its
+ fee-paying CPFP child, which a standalone broadcast would reject.
+ Each argument is a hex-encoded raw transaction.
+ `,
+ Flags: []cli.Flag{
+ cli.Uint64Flag{
+ Name: "sat_per_vbyte",
+ Usage: "(optional) the maximum fee rate in sat/vByte " +
+ "allowed for any transaction in the package; " +
+ "omit to use the node default, set 0 to " +
+ "disable the limit",
+ },
+ },
+ Action: actionDecorator(submitPackage),
+}
+
+func submitPackage(ctx *cli.Context) error {
+ ctxc := getContext()
+
+ // Display the command's help message if we do not have at least one
+ // transaction.
+ if ctx.NArg() == 0 {
+ return cli.ShowCommandHelp(ctx, "submitpackage")
+ }
+
+ walletClient, cleanUp := getWalletClient(ctx)
+ defer cleanUp()
+
+ rawTxs := make([][]byte, 0, ctx.NArg())
+ for _, arg := range ctx.Args() {
+ tx, err := hex.DecodeString(arg)
+ if err != nil {
+ return err
+ }
+
+ rawTxs = append(rawTxs, tx)
+ }
+
+ // Only set the max fee rate when explicitly provided; otherwise leave
+ // it unset so the node applies its default.
+ var satPerVByte *uint64
+ if ctx.IsSet("sat_per_vbyte") {
+ rate := ctx.Uint64("sat_per_vbyte")
+ satPerVByte = &rate
+ }
+
+ resp, err := walletClient.SubmitPackage(
+ ctxc, &walletrpc.SubmitPackageRequest{
+ RawTxs: rawTxs,
+ SatPerVbyte: satPerVByte,
+ },
+ )
+ if err != nil {
+ return err
+ }
+
+ printRespJSON(resp)
+
+ return nil
+}
+
var getTxCommand = cli.Command{
Name: "gettx",
Usage: "Returns details of a transaction.",
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.