Skip to content

walletkit: add SubmitPackage client method#280

Draft
ellemouton wants to merge 1 commit into
lightninglabs:masterfrom
ellemouton:walletkit-submitpackage
Draft

walletkit: add SubmitPackage client method#280
ellemouton wants to merge 1 commit into
lightninglabs:masterfrom
ellemouton:walletkit-submitpackage

Conversation

@ellemouton

Copy link
Copy Markdown
Member

Draft, pending lightningnetwork/lnd#10900. This depends on the WalletKit.SubmitPackage RPC added there. Until that lands in a released lnd, go.mod temporarily replaces lnd (and btcwallet, transitively) with fork commits that include it; the replaces will be dropped for released versions before this is taken out of draft.

Summary

Adds WalletKitClient.SubmitPackage, wrapping lnd's new WalletKit.SubmitPackage
RPC. It serializes the topologically-sorted transactions, forwards an optional
per-transaction max fee rate (nil uses the node default), and maps the proto
response back to the btcjson.SubmitPackageResult callers expect.

This lets a zero-fee v3/TRUC parent be relayed via its fee-paying CPFP child
(bitcoind's submitpackage) without the caller needing a separate connection
to the chain backend.

TODO before un-drafting

@ellemouton ellemouton force-pushed the walletkit-submitpackage branch from c6ad7ac to 60fdb7e Compare June 11, 2026 21:31
@bhandras bhandras mentioned this pull request Jun 16, 2026
3 tasks
Comment thread walletkit_client.go Outdated

func (m *walletKitClient) SubmitPackage(ctx context.Context,
txns []*wire.MsgTx,
maxFeeRate *float64) (*btcjson.SubmitPackageResult, error) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should leak btcjson here (notice how it was just imported with this diff). Instead we should make a higher level wrapper type like we do elsewhere for related APIs.

@ellemouton ellemouton force-pushed the walletkit-submitpackage branch from 60fdb7e to 1eebf77 Compare June 17, 2026 16:58
Add WalletKit.SubmitPackage, wrapping lnd's new WalletKit.SubmitPackage
RPC. It serializes the topologically-sorted transactions, forwards the
optional per-tx max fee rate (nil uses the node default), and maps the
proto response back to the btcjson.SubmitPackageResult callers expect.
@ellemouton ellemouton force-pushed the walletkit-submitpackage branch from 1eebf77 to 66d2a3f Compare June 17, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants