Skip to content

Commit 1eebf77

Browse files
committed
walletkit: add SubmitPackage client method
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.
1 parent f3260ef commit 1eebf77

4 files changed

Lines changed: 188 additions & 219 deletions

File tree

go.mod

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/btcsuite/btcwallet v0.16.18
1111
github.com/btcsuite/btcwallet/wtxmgr v1.5.6
1212
github.com/lightningnetwork/lnd v0.21.0-beta
13-
github.com/lightningnetwork/lnd/kvdb v1.4.16
13+
github.com/lightningnetwork/lnd/kvdb v1.5.1
1414
github.com/stretchr/testify v1.11.1
1515
google.golang.org/grpc v1.79.3
1616
gopkg.in/macaroon-bakery.v2 v2.0.1
@@ -53,7 +53,6 @@ require (
5353
github.com/go-logr/logr v1.4.3 // indirect
5454
github.com/go-logr/stdr v1.2.2 // indirect
5555
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
56-
github.com/gofrs/uuid v4.2.0+incompatible // indirect
5756
github.com/gogo/protobuf v1.3.2 // indirect
5857
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
5958
github.com/golang-migrate/migrate/v4 v4.17.0 // indirect
@@ -77,14 +76,12 @@ require (
7776
github.com/jackc/pgpassfile v1.0.0 // indirect
7877
github.com/jackc/pgproto3/v2 v2.3.3 // indirect
7978
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
80-
github.com/jackc/pgtype v1.14.4 // indirect
81-
github.com/jackc/pgx/v4 v4.18.3 // indirect
8279
github.com/jackc/pgx/v5 v5.9.2 // indirect
8380
github.com/jackc/puddle/v2 v2.2.2 // indirect
8481
github.com/jessevdk/go-flags v1.6.1 // indirect
8582
github.com/jonboulle/clockwork v0.2.2 // indirect
8683
github.com/jrick/logrotate v1.1.2 // indirect
87-
github.com/json-iterator/go v1.1.11 // indirect
84+
github.com/json-iterator/go v1.1.12 // indirect
8885
github.com/juju/clock v0.0.0-20220203021603-d9deb868a28a // indirect
8986
github.com/juju/collections v0.0.0-20220203020748-febd7cad8a7a // indirect
9087
github.com/juju/errors v0.0.0-20220331221717-b38fca44723b // indirect
@@ -94,7 +91,7 @@ require (
9491
github.com/juju/utils/v3 v3.0.0-20220203023959-c3fbc78a33b0 // indirect
9592
github.com/juju/version/v2 v2.0.0-20220204124744-fc9915e3d935 // indirect
9693
github.com/kkdai/bstream v1.0.0 // indirect
97-
github.com/klauspost/compress v1.17.9 // indirect
94+
github.com/klauspost/compress v1.18.0 // indirect
9895
github.com/lib/pq v1.10.9 // indirect
9996
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf // indirect
10097
github.com/lightninglabs/neutrino v0.17.1 // indirect
@@ -111,24 +108,24 @@ require (
111108
github.com/lightningnetwork/lnd/tor v1.1.6 // indirect
112109
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 // indirect
113110
github.com/mattn/go-isatty v0.0.20 // indirect
114-
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
115111
github.com/miekg/dns v1.1.43 // indirect
116112
github.com/moby/docker-image-spec v1.3.1 // indirect
117113
github.com/moby/sys/user v0.3.0 // indirect
118114
github.com/moby/term v0.5.0 // indirect
119115
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
120-
github.com/modern-go/reflect2 v1.0.1 // indirect
116+
github.com/modern-go/reflect2 v1.0.2 // indirect
117+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
121118
github.com/ncruces/go-strftime v0.1.9 // indirect
122119
github.com/opencontainers/go-digest v1.0.0 // indirect
123120
github.com/opencontainers/image-spec v1.0.2 // indirect
124121
github.com/opencontainers/runc v1.2.8 // indirect
125122
github.com/ory/dockertest/v3 v3.10.0 // indirect
126123
github.com/pkg/errors v0.9.1 // indirect
127124
github.com/pmezard/go-difflib v1.0.0 // indirect
128-
github.com/prometheus/client_golang v1.11.1 // indirect
129-
github.com/prometheus/client_model v0.2.0 // indirect
130-
github.com/prometheus/common v0.26.0 // indirect
131-
github.com/prometheus/procfs v0.6.0 // indirect
125+
github.com/prometheus/client_golang v1.23.2 // indirect
126+
github.com/prometheus/client_model v0.6.2 // indirect
127+
github.com/prometheus/common v0.66.1 // indirect
128+
github.com/prometheus/procfs v0.16.1 // indirect
132129
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
133130
github.com/rogpeppe/fastuuid v1.2.0 // indirect
134131
github.com/sirupsen/logrus v1.9.3 // indirect
@@ -162,6 +159,7 @@ require (
162159
go.uber.org/atomic v1.7.0 // indirect
163160
go.uber.org/multierr v1.6.0 // indirect
164161
go.uber.org/zap v1.17.0 // indirect
162+
go.yaml.in/yaml/v2 v2.4.2 // indirect
165163
golang.org/x/crypto v0.46.0 // indirect
166164
golang.org/x/exp v0.0.0-20250811191247-51f88131bc50 // indirect
167165
golang.org/x/mod v0.30.0 // indirect
@@ -175,7 +173,7 @@ require (
175173
google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect
176174
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect
177175
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect
178-
google.golang.org/protobuf v1.36.10 // indirect
176+
google.golang.org/protobuf v1.36.11 // indirect
179177
gopkg.in/errgo.v1 v1.0.1 // indirect
180178
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
181179
gopkg.in/yaml.v2 v2.4.0 // indirect
@@ -195,4 +193,13 @@ require (
195193
// allows us to specify that as an option.
196194
replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display
197195

198-
go 1.25.10
196+
go 1.25.11
197+
198+
// TODO(elle): drop these replaces and bump to tagged versions once the
199+
// SubmitPackage stack lands upstream — lnd#10900 (WalletKit.SubmitPackage),
200+
// btcwallet#1264 (chain.SubmitPackage), and btcd#2551 (rpcclient.SubmitPackage).
201+
replace github.com/lightningnetwork/lnd => github.com/ellemouton/lnd v0.8.0-beta-rc3.0.20260617160412-c985a33ffbcf
202+
203+
replace github.com/btcsuite/btcwallet => github.com/ellemouton/btcwallet v0.11.1-0.20260617155953-13ae41ff958b
204+
205+
replace github.com/btcsuite/btcd => github.com/ellemouton/btcd v0.22.0-beta.0.20260617155916-de3d460e7626

0 commit comments

Comments
 (0)