diff --git a/dev.Dockerfile b/dev.Dockerfile index a67686c86..2ab4253fa 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -30,13 +30,35 @@ COPY --from=nodejsbuilder /go/src/github.com/lightninglabs/lightning-terminal /g # queries required to connect to linked containers succeed. ENV GODEBUG netdns=cgo -# Allow forcing a specific lnd, taproot-assets, and taprpc version through a -# build argument. +# Allow forcing a specific lnd, taproot-assets, taprpc, and/or loop repo so that +# commits referenced by LND_VERSION, TAPROOT_ASSETS_VERSION, TAPRPC_VERSION, and +# LOOP_VERSION don't have to exist in the default repository. If any of these +# build arguments are not defined, the build continues using the default +# repository for that module. NOTE: If these arguments ARE defined then the +# corresponding `_VERSION` argument MUST also be defined, otherwise the build +# continues using the default repository defined for that module. +ARG LND_REPO +ARG TAPROOT_ASSETS_REPO +ARG TAPRPC_REPO +ARG LOOP_REPO + +# Allow forcing a specific lnd, taproot-assets, taprpc, and/or loop version +# through a build argument. # Please see https://go.dev/ref/mod#version-queries for the types of # queries that can be used to define a version. +# If any of these build arguments are not defined then build uses the version +# already defined in go.mod and go.sum for that module. +# Note: If the corresponding `_REPO` argument is not defined, `go get` will +# be used along with `go mod tidy`, which sometimes may change the version you +# are trying to use because some other module requires the same requirement +# but of a different version. A trick to overcome this is to also use the +# `_REPO` argument and just put in the default repository for that module and +# that will cause a `go mod edit -replace=` to be used instead which won't have +# this issue. ARG LND_VERSION ARG TAPROOT_ASSETS_VERSION ARG TAPRPC_VERSION +ARG LOOP_VERSION # Need to restate this since running in a new container from above. ARG NO_UI @@ -46,17 +68,42 @@ RUN apk add --no-cache --update alpine-sdk make \ && cd /go/src/github.com/lightninglabs/lightning-terminal \ # If a custom lnd version is supplied, force it now. && if [ -n "$LND_VERSION" ]; then \ - go get -v github.com/lightningnetwork/lnd@$LND_VERSION \ + # If a custom lnd repo is supplied, force it now. + if [ -n "$LND_REPO" ]; then \ + go mod edit -replace=github.com/lightningnetwork/lnd=$LND_REPO@$LND_VERSION; \ + else \ + go get -v github.com/lightningnetwork/lnd@$LND_VERSION; \ + fi \ && go mod tidy; \ fi \ # If a custom taproot-assets version is supplied, force it now. && if [ -n "$TAPROOT_ASSETS_VERSION" ]; then \ - go get -v github.com/lightninglabs/taproot-assets@$TAPROOT_ASSETS_VERSION \ + # If a custom taproot-assets repo is supplied, force it now. + if [ -n "$TAPROOT_ASSETS_REPO" ]; then \ + go mod edit -replace=github.com/lightninglabs/taproot-assets=$TAPROOT_ASSETS_REPO@$TAPROOT_ASSETS_VERSION; \ + else \ + go get -v github.com/lightninglabs/taproot-assets@$TAPROOT_ASSETS_VERSION; \ + fi \ && go mod tidy; \ fi \ # If a custom taprpc version is supplied, force it now. && if [ -n "$TAPRPC_VERSION" ]; then \ - go get -v github.com/lightninglabs/taproot-assets/taprpc@$TAPRPC_VERSION \ + # If a custom taprpc repo is supplied, force it now. + if [ -n "$TAPRPC_REPO" ]; then \ + go mod edit -replace=github.com/lightninglabs/taproot-assets/taprpc=$TAPRPC_REPO@$TAPRPC_VERSION; \ + else \ + go get -v github.com/lightninglabs/taproot-assets/taprpc@$TAPRPC_VERSION; \ + fi \ + && go mod tidy; \ + fi \ + # If a custom loop version is supplied, force it now. + && if [ -n "$LOOP_VERSION" ]; then \ + # If a custom loop repo is supplied, force it now. + if [ -n "$LOOP_REPO" ]; then \ + go mod edit -replace=github.com/lightninglabs/loop=$LOOP_REPO@$LOOP_VERSION; \ + else \ + go get -v github.com/lightninglabs/loop@$LOOP_VERSION; \ + fi \ && go mod tidy; \ fi \ && if [ "$NO_UI" -eq "1" ]; then \ diff --git a/go.mod b/go.mod index 65f98cb62..3eef0938a 100644 --- a/go.mod +++ b/go.mod @@ -32,9 +32,9 @@ require ( github.com/lightninglabs/pool v0.6.6-beta github.com/lightninglabs/pool/auctioneerrpc v1.1.3 github.com/lightninglabs/pool/poolrpc v1.0.1 - github.com/lightninglabs/taproot-assets v0.6.1 - github.com/lightninglabs/taproot-assets/taprpc v1.0.8-0.20250716163904-2ef55ba74036 - github.com/lightningnetwork/lnd v0.19.2-beta + github.com/lightninglabs/taproot-assets v0.6.1-0.20250717083859-c4bb5bc1cea5 + github.com/lightninglabs/taproot-assets/taprpc v1.0.9 + github.com/lightningnetwork/lnd v0.19.2-beta.rc2 github.com/lightningnetwork/lnd/cert v1.2.2 github.com/lightningnetwork/lnd/clock v1.1.1 github.com/lightningnetwork/lnd/fn v1.2.3 diff --git a/go.sum b/go.sum index 4e5da46b6..ab771c07c 100644 --- a/go.sum +++ b/go.sum @@ -1172,14 +1172,14 @@ github.com/lightninglabs/pool/poolrpc v1.0.1 h1:XbNx28TYwEj/PVsnnF9TnveVCMCYfS1v github.com/lightninglabs/pool/poolrpc v1.0.1/go.mod h1:836icifg/SBnZbiae0v3jeRRzCrT6LWo32SqCS/JiGk= github.com/lightninglabs/protobuf-go-hex-display v1.34.2-hex-display h1:w7FM5LH9Z6CpKxl13mS48idsu6F+cEZf0lkyiV+Dq9g= github.com/lightninglabs/protobuf-go-hex-display v1.34.2-hex-display/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= -github.com/lightninglabs/taproot-assets v0.6.1 h1:98XCk7nvAridyE67uct0NDVpyY1evpIdvPQpeNElskM= -github.com/lightninglabs/taproot-assets v0.6.1/go.mod h1:rF+GwuUVuDVUejAHsUCml4Nru9xnl7A4YZQfR4qLMzY= -github.com/lightninglabs/taproot-assets/taprpc v1.0.8-0.20250716163904-2ef55ba74036 h1:ZUQrEmdZa72RieBKI/NiUQJGAnh6R6Pq6FoXh+VCOJQ= -github.com/lightninglabs/taproot-assets/taprpc v1.0.8-0.20250716163904-2ef55ba74036/go.mod h1:vOM2Ap2wYhEZjiJU7bNNg+e5tDxkvRAuyXwf/KQ4tgo= +github.com/lightninglabs/taproot-assets v0.6.1-0.20250717083859-c4bb5bc1cea5 h1:6YzU56mAnpeJODG3R7WusLJr4rN9cfZC0AjsVJlgcto= +github.com/lightninglabs/taproot-assets v0.6.1-0.20250717083859-c4bb5bc1cea5/go.mod h1:MPaa1TBnjxU+pB3QaiL+5bhpjP9LM9m1sK8DhIttKV4= +github.com/lightninglabs/taproot-assets/taprpc v1.0.9 h1:Rr/B/6QURBwflA6LNFWuQCBOP5Xh3WbHQf/dNf8tA98= +github.com/lightninglabs/taproot-assets/taprpc v1.0.9/go.mod h1:c8gTEcKEUoUPVChgZNwqTL1hss7UWa5FDeObr8WBzQk= github.com/lightningnetwork/lightning-onion v1.2.1-0.20240712235311-98bd56499dfb h1:yfM05S8DXKhuCBp5qSMZdtSwvJ+GFzl94KbXMNB1JDY= github.com/lightningnetwork/lightning-onion v1.2.1-0.20240712235311-98bd56499dfb/go.mod h1:c0kvRShutpj3l6B9WtTsNTBUtjSmjZXbJd9ZBRQOSKI= -github.com/lightningnetwork/lnd v0.19.2-beta h1:3SKVrKYFY4IJLlrMf7cDzZcBeT+MxjI9Xy6YpY+EEX4= -github.com/lightningnetwork/lnd v0.19.2-beta/go.mod h1:+yKUfIGKKYRHGewgzQ6xi0S26DIfBiMv1zCdB3m6YxA= +github.com/lightningnetwork/lnd v0.19.2-beta.rc2 h1:vPIMjQr8SWZJHn/j3QSFct4AbCVa0WA7k0j0lHqFDAA= +github.com/lightningnetwork/lnd v0.19.2-beta.rc2/go.mod h1:+yKUfIGKKYRHGewgzQ6xi0S26DIfBiMv1zCdB3m6YxA= github.com/lightningnetwork/lnd/cert v1.2.2 h1:71YK6hogeJtxSxw2teq3eGeuy4rHGKcFf0d0Uy4qBjI= github.com/lightningnetwork/lnd/cert v1.2.2/go.mod h1:jQmFn/Ez4zhDgq2hnYSw8r35bqGVxViXhX6Cd7HXM6U= github.com/lightningnetwork/lnd/clock v1.1.1 h1:OfR3/zcJd2RhH0RU+zX/77c0ZiOnIMsDIBjgjWdZgA0= diff --git a/itest/assets_test.go b/itest/assets_test.go index 1fb456dac..ccf2d94da 100644 --- a/itest/assets_test.go +++ b/itest/assets_test.go @@ -27,6 +27,7 @@ import ( "github.com/lightninglabs/taproot-assets/tapfreighter" "github.com/lightninglabs/taproot-assets/taprpc" "github.com/lightninglabs/taproot-assets/taprpc/assetwalletrpc" + "github.com/lightninglabs/taproot-assets/taprpc/authmailboxrpc" "github.com/lightninglabs/taproot-assets/taprpc/mintrpc" "github.com/lightninglabs/taproot-assets/taprpc/rfqrpc" tchrpc "github.com/lightninglabs/taproot-assets/taprpc/tapchannelrpc" @@ -2548,6 +2549,7 @@ type tapClient struct { rfqrpc.RfqClient tchrpc.TaprootAssetChannelsClient universerpc.UniverseClient + authmailboxrpc.MailboxClient } func newTapClient(t *testing.T, node *HarnessNode) *tapClient { @@ -2578,6 +2580,7 @@ func newTapClient(t *testing.T, node *HarnessNode) *tapClient { rfqClient := rfqrpc.NewRfqClient(rawConn) tchClient := tchrpc.NewTaprootAssetChannelsClient(rawConn) universeClient := universerpc.NewUniverseClient(rawConn) + mboxClient := authmailboxrpc.NewMailboxClient(rawConn) return &tapClient{ node: node, @@ -2588,6 +2591,7 @@ func newTapClient(t *testing.T, node *HarnessNode) *tapClient { RfqClient: rfqClient, TaprootAssetChannelsClient: tchClient, UniverseClient: universeClient, + MailboxClient: mboxClient, } } diff --git a/subservers/taproot-assets.go b/subservers/taproot-assets.go index 26f0a8c3a..63b42c9ff 100644 --- a/subservers/taproot-assets.go +++ b/subservers/taproot-assets.go @@ -13,6 +13,7 @@ import ( "github.com/lightninglabs/taproot-assets/tapcfg" "github.com/lightninglabs/taproot-assets/taprpc" "github.com/lightninglabs/taproot-assets/taprpc/assetwalletrpc" + "github.com/lightninglabs/taproot-assets/taprpc/authmailboxrpc" "github.com/lightninglabs/taproot-assets/taprpc/mintrpc" "github.com/lightninglabs/taproot-assets/taprpc/rfqrpc" tchrpc "github.com/lightninglabs/taproot-assets/taprpc/tapchannelrpc" @@ -132,6 +133,7 @@ func (t *taprootAssetsSubServer) RegisterGrpcService( rfqrpc.RegisterRfqServer(registrar, t) tchrpc.RegisterTaprootAssetChannelsServer(registrar, t) universerpc.RegisterUniverseServer(registrar, t) + authmailboxrpc.RegisterMailboxServer(registrar, t) } // RegisterRestService registers the sub-server's REST handlers with the given @@ -198,6 +200,13 @@ func (t *taprootAssetsSubServer) RegisterRestService(ctx context.Context, return err } + err = authmailboxrpc.RegisterMailboxHandlerFromEndpoint( + ctx, mux, endpoint, dialOpts, + ) + if err != nil { + return err + } + return nil }