Skip to content

Commit 5225722

Browse files
authored
Merge pull request #1487 from lightninglabs/taprpc-submodule
taprpc: extract as standalone Go submodule for WASM clients
2 parents 8fb78e2 + 8418383 commit 5225722

26 files changed

+1233
-229
lines changed

cmd/commands/addrs.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"time"
88

99
"github.com/lightninglabs/taproot-assets/asset"
10+
"github.com/lightninglabs/taproot-assets/rpcutils"
1011
"github.com/lightninglabs/taproot-assets/taprpc"
1112
"github.com/urfave/cli"
1213
)
@@ -82,7 +83,7 @@ func newAddr(ctx *cli.Context) error {
8283
client, cleanUp := getClient(ctx)
8384
defer cleanUp()
8485

85-
assetVersion, err := taprpc.MarshalAssetVersion(
86+
assetVersion, err := rpcutils.MarshalAssetVersion(
8687
asset.Version(ctx.Uint64(assetVersionName)),
8788
)
8889
if err != nil {

docs/examples/basic-price-oracle/go.mod

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,12 @@ module basic-price-oracle
22

33
go 1.23.6
44

5-
replace (
6-
github.com/lightninglabs/taproot-assets => ../../../
7-
8-
// We want to format raw bytes as hex instead of base64. The forked version
9-
// allows us to specify that as an option.
10-
google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display
11-
)
5+
// We want to format raw bytes as hex instead of base64. The forked version
6+
// allows us to specify that as an option.
7+
replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display
128

139
require (
14-
github.com/lightninglabs/taproot-assets v0.5.0-rc1
10+
github.com/lightninglabs/taproot-assets v0.5.2-0.20250424095231-89a3e175feb0
1511
github.com/sirupsen/logrus v1.9.3
1612
google.golang.org/grpc v1.64.1
1713
)

docs/examples/basic-price-oracle/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,8 @@ github.com/lightninglabs/neutrino/cache v1.1.2 h1:C9DY/DAPaPxbFC+xNNEI/z1SJY9GS3
435435
github.com/lightninglabs/neutrino/cache v1.1.2/go.mod h1:XJNcgdOw1LQnanGjw8Vj44CvguYA25IMKjWFZczwZuo=
436436
github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display h1:Y2WiPkBS/00EiEg0qp0FhehxnQfk3vv8U6Xt3nN+rTY=
437437
github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
438+
github.com/lightninglabs/taproot-assets v0.5.2-0.20250424095231-89a3e175feb0 h1:6r4n5DDXQMuMV3/+y5v1vdBTJejpNUK54d58OarDoPw=
439+
github.com/lightninglabs/taproot-assets v0.5.2-0.20250424095231-89a3e175feb0/go.mod h1:6kQm7VC4yWAwczJaxfOWlCOQ4TuzfCLUkGKBwVONN7k=
438440
github.com/lightningnetwork/lightning-onion v1.2.1-0.20240712235311-98bd56499dfb h1:yfM05S8DXKhuCBp5qSMZdtSwvJ+GFzl94KbXMNB1JDY=
439441
github.com/lightningnetwork/lightning-onion v1.2.1-0.20240712235311-98bd56499dfb/go.mod h1:c0kvRShutpj3l6B9WtTsNTBUtjSmjZXbJd9ZBRQOSKI=
440442
github.com/lightningnetwork/lnd v0.19.0-beta.rc2.0.20250423092132-a35ace7371af h1:+t8N7kmI7YVu7Hzv8pPiMVCTjnSRi/qOxbAkXa5rn+0=

go.mod

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ require (
2929
github.com/lightninglabs/lightning-node-connect/hashmailrpc v1.0.2
3030
github.com/lightninglabs/lndclient v0.19.0-4
3131
github.com/lightninglabs/neutrino/cache v1.1.2
32+
github.com/lightninglabs/taproot-assets/taprpc v1.0.0
3233
github.com/lightningnetwork/lnd v0.19.0-beta.rc2.0.20250423092132-a35ace7371af
3334
github.com/lightningnetwork/lnd/cert v1.2.2
3435
github.com/lightningnetwork/lnd/clock v1.1.1
@@ -116,7 +117,7 @@ require (
116117
github.com/jonboulle/clockwork v0.2.2 // indirect
117118
github.com/jrick/logrotate v1.1.2 // indirect
118119
github.com/json-iterator/go v1.1.12 // indirect
119-
github.com/juju/loggo v0.0.0-20210728185423-eebad3a902c4 // indirect
120+
github.com/juju/loggo v1.0.0 // indirect
120121
github.com/kkdai/bstream v1.0.0 // indirect
121122
github.com/klauspost/compress v1.17.9 // indirect
122123
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
@@ -212,3 +213,6 @@ replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-d
212213
// We are using a fork of the migration library with custom functionality that
213214
// did not yet make it into the upstream repository.
214215
replace github.com/golang-migrate/migrate/v4 => github.com/lightninglabs/migrate/v4 v4.18.2-9023d66a-fork-pr-2
216+
217+
// Note this is a temproary replace and will be removed when taprpc is tagged.
218+
replace github.com/lightninglabs/taproot-assets/taprpc => ./taprpc

go.sum

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -419,24 +419,16 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm
419419
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
420420
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
421421
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a/go.mod h1:UJSiEoRfvx3hP73CvoARgeLjaIOjybY9vj8PUPPFGeU=
422-
github.com/juju/clock v0.0.0-20220203021603-d9deb868a28a h1:Az/6CM/P5guGHNy7r6TkOCctv3lDmN3W1uhku7QMupk=
423-
github.com/juju/clock v0.0.0-20220203021603-d9deb868a28a/go.mod h1:GZ/FY8Cqw3KHG6DwRVPUKbSPTAwyrU28xFi5cqZnLsc=
424-
github.com/juju/collections v0.0.0-20220203020748-febd7cad8a7a h1:d7eZO8OS/ZXxdP0uq3E8CdoA1qNFaecAv90UxrxaY2k=
425-
github.com/juju/collections v0.0.0-20220203020748-febd7cad8a7a/go.mod h1:JWeZdyttIEbkR51z2S13+J+aCuHVe0F6meRy+P0YGDo=
426-
github.com/juju/errors v0.0.0-20220331221717-b38fca44723b h1:AxFeSQJfcm2O3ov1wqAkTKYFsnMw2g1B4PkYujfAdkY=
427-
github.com/juju/errors v0.0.0-20220331221717-b38fca44723b/go.mod h1:jMGj9DWF/qbo91ODcfJq6z/RYc3FX3taCBZMCcpI4Ls=
428-
github.com/juju/loggo v0.0.0-20210728185423-eebad3a902c4 h1:NO5tuyw++EGLnz56Q8KMyDZRwJwWO8jQnj285J3FOmY=
429-
github.com/juju/loggo v0.0.0-20210728185423-eebad3a902c4/go.mod h1:NIXFioti1SmKAlKNuUwbMenNdef59IF52+ZzuOmHYkg=
430-
github.com/juju/mgo/v2 v2.0.0-20220111072304-f200228f1090 h1:zX5GoH3Jp8k1EjUFkApu/YZAYEn0PYQfg/U6IDyNyYs=
431-
github.com/juju/mgo/v2 v2.0.0-20220111072304-f200228f1090/go.mod h1:N614SE0a4e+ih2rg96Vi2PeC3cTpUOWgCTv3Cgk974c=
432-
github.com/juju/retry v0.0.0-20220204093819-62423bf33287 h1:U+7oMWEglXfiikIppNexButZRwKPlzLBGKYSNCXzXf8=
433-
github.com/juju/retry v0.0.0-20220204093819-62423bf33287/go.mod h1:SssN1eYeK3A2qjnFGTiVMbdzGJ2BfluaJblJXvuvgqA=
434-
github.com/juju/testing v0.0.0-20220203020004-a0ff61f03494 h1:XEDzpuZb8Ma7vLja3+5hzUqVTvAqm5Y+ygvnDs5iTMM=
435-
github.com/juju/testing v0.0.0-20220203020004-a0ff61f03494/go.mod h1:rUquetT0ALL48LHZhyRGvjjBH8xZaZ8dFClulKK5wK4=
436-
github.com/juju/utils/v3 v3.0.0-20220203023959-c3fbc78a33b0 h1:bn+2Adl1yWqYjm3KSFlFqsvfLg2eq+XNL7GGMYApdVw=
437-
github.com/juju/utils/v3 v3.0.0-20220203023959-c3fbc78a33b0/go.mod h1:8csUcj1VRkfjNIRzBFWzLFCMLwLqsRWvkmhfVAUwbC4=
438-
github.com/juju/version/v2 v2.0.0-20220204124744-fc9915e3d935 h1:6YoyzXVW1XkqN86y2s/rz365Jm7EiAy39v2G5ikzvHU=
439-
github.com/juju/version/v2 v2.0.0-20220204124744-fc9915e3d935/go.mod h1:ZeFjNy+UFEWJDDPdzW7Cm9NeU6dsViGaFYhXzycLQrw=
422+
github.com/juju/clock v1.1.1 h1:NvgHG9DQmOpBevgt6gzkyimdWBooLXDy1cQn89qJzBI=
423+
github.com/juju/clock v1.1.1/go.mod h1:HIBvJ8kiV/n7UHwKuCkdYL4l/MDECztHR2sAvWDxxf0=
424+
github.com/juju/errors v1.0.0 h1:yiq7kjCLll1BiaRuNY53MGI0+EQ3rF6GB+wvboZDefM=
425+
github.com/juju/errors v1.0.0/go.mod h1:B5x9thDqx0wIMH3+aLIMP9HjItInYWObRovoCFM5Qe8=
426+
github.com/juju/loggo v1.0.0 h1:Y6ZMQOGR9Aj3BGkiWx7HBbIx6zNwNkxhVNOHU2i1bl0=
427+
github.com/juju/loggo v1.0.0/go.mod h1:NIXFioti1SmKAlKNuUwbMenNdef59IF52+ZzuOmHYkg=
428+
github.com/juju/testing v1.0.2 h1:OR90RqCd9CJONxXamZAjLknpZdtqDyxqW8IwCbgw3i4=
429+
github.com/juju/testing v1.0.2/go.mod h1:h3Vd2rzB57KrdsBEy6R7bmSKPzP76BnNavt7i8PerwQ=
430+
github.com/juju/utils/v3 v3.2.0 h1:RkEgTHbrPoOqTuOSaob52B1gLkpeMLd5fZj/4kFzb1k=
431+
github.com/juju/utils/v3 v3.2.0/go.mod h1:nAj3sHtdYfAkvnkqttTy3Xzm2HzkD9Hfgnc+upOW2Z8=
440432
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
441433
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
442434
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
@@ -666,8 +658,6 @@ github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs
666658
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
667659
github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk=
668660
github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA=
669-
github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8=
670-
github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM=
671661
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
672662
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
673663
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=

itest/assertions.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/lightninglabs/taproot-assets/commitment"
2222
"github.com/lightninglabs/taproot-assets/fn"
2323
"github.com/lightninglabs/taproot-assets/proof"
24+
"github.com/lightninglabs/taproot-assets/rpcutils"
2425
"github.com/lightninglabs/taproot-assets/tapfreighter"
2526
"github.com/lightninglabs/taproot-assets/tappsbt"
2627
"github.com/lightninglabs/taproot-assets/taprpc"
@@ -2188,7 +2189,7 @@ func AssertBalances(t *testing.T, client taprpc.TaprootAssetsClient,
21882189
case config.scriptKeyType != nil:
21892190
rpcTypeQuery = &taprpc.ScriptKeyTypeQuery{
21902191
Type: &taprpc.ScriptKeyTypeQuery_ExplicitType{
2191-
ExplicitType: taprpc.MarshalScriptKeyType(
2192+
ExplicitType: rpcutils.MarshalScriptKeyType(
21922193
*config.scriptKeyType,
21932194
),
21942195
},

itest/mint_fund_seal_test.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"github.com/lightninglabs/taproot-assets/fn"
2121
"github.com/lightninglabs/taproot-assets/internal/test"
2222
"github.com/lightninglabs/taproot-assets/proof"
23+
"github.com/lightninglabs/taproot-assets/rpcutils"
2324
"github.com/lightninglabs/taproot-assets/tappsbt"
2425
"github.com/lightninglabs/taproot-assets/taprpc"
2526
wrpc "github.com/lightninglabs/taproot-assets/taprpc/assetwalletrpc"
@@ -109,23 +110,23 @@ func testMintFundSealAssets(t *harnessTest) {
109110
// Asset 0 will have no asset group, and an external script key with a
110111
// tapscript root.
111112
assetReqWithScriptKey := CopyRequest(simpleAssets[0])
112-
assetReqWithScriptKey.Asset.ScriptKey = taprpc.MarshalScriptKey(
113+
assetReqWithScriptKey.Asset.ScriptKey = rpcutils.MarshalScriptKey(
113114
tweakedScript,
114115
)
115116

116117
// Asset 1 will have a specific internal group key with a tapscript
117118
// root. This asset will be a group anchor.
118119
assetReqGroupedInternalTweaked := CopyRequest(simpleAssets[1])
119120
assetReqGroupedInternalTweaked.Asset.NewGroupedAsset = true
120-
assetReqGroupedInternalTweaked.Asset.GroupInternalKey = taprpc.
121-
MarshalKeyDescriptor(managedGroupInternal)
121+
assetReqGroupedInternalTweaked.Asset.GroupInternalKey =
122+
rpcutils.MarshalKeyDescriptor(managedGroupInternal)
122123
assetReqGroupedInternalTweaked.Asset.
123124
GroupTapscriptRoot = groupInternalTweak
124125

125126
// Asset 2 will have an external group key with a tapscript root.
126127
assetReqGroupedExternal := CopyRequest(issuableAssets[0])
127-
assetReqGroupedExternal.Asset.GroupInternalKey = taprpc.
128-
MarshalKeyDescriptor(groupExternalDesc)
128+
assetReqGroupedExternal.Asset.GroupInternalKey =
129+
rpcutils.MarshalKeyDescriptor(groupExternalDesc)
129130
assetReqGroupedExternal.Asset.GroupTapscriptRoot = groupExternalTweak[:]
130131

131132
// Asset 3 will be a member of the asset group created by Asset 1.
@@ -701,7 +702,7 @@ func unmarshalPendingAssetGroup(t *testing.T,
701702
asset.GroupVirtualTx) {
702703

703704
require.NotNil(t, a.GroupVirtualTx)
704-
virtualTx, err := taprpc.UnmarshalGroupVirtualTx(a.GroupVirtualTx)
705+
virtualTx, err := rpcutils.UnmarshalGroupVirtualTx(a.GroupVirtualTx)
705706
require.NoError(t, err)
706707

707708
// Ensure that the group virtual tx is the same as the grouped virtual
@@ -721,7 +722,7 @@ func unmarshalPendingAssetGroup(t *testing.T,
721722

722723
// Unmarshal group key request.
723724
require.NotNil(t, a.GroupKeyRequest)
724-
keyReq, err := taprpc.UnmarshalGroupKeyRequest(a.GroupKeyRequest)
725+
keyReq, err := rpcutils.UnmarshalGroupKeyRequest(a.GroupKeyRequest)
725726
require.NoError(t, err)
726727

727728
return *keyReq, *virtualTx

itest/multisig.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/lightninglabs/taproot-assets/cmd/commands"
2222
"github.com/lightninglabs/taproot-assets/commitment"
2323
"github.com/lightninglabs/taproot-assets/fn"
24+
"github.com/lightninglabs/taproot-assets/rpcutils"
2425
"github.com/lightninglabs/taproot-assets/tappsbt"
2526
"github.com/lightninglabs/taproot-assets/taprpc"
2627
wrpc "github.com/lightninglabs/taproot-assets/taprpc/assetwalletrpc"
@@ -171,7 +172,7 @@ func MultiSigTest(t *testing.T, ctx context.Context, aliceTapd,
171172
muSig2Addr, err := bobTapd.NewAddr(ctxt, &taprpc.NewAddrRequest{
172173
AssetId: firstBatchGenesis.AssetId,
173174
Amt: assetsToSend,
174-
ScriptKey: taprpc.MarshalScriptKey(tapScriptKey),
175+
ScriptKey: rpcutils.MarshalScriptKey(tapScriptKey),
175176
InternalKey: &taprpc.KeyDescriptor{
176177
RawKeyBytes: pubKeyBytes(btcInternalKey),
177178
},
@@ -372,7 +373,7 @@ func DeriveKeys(t *testing.T, tapd commands.RpcClientsBundle) (asset.ScriptKey,
372373
},
373374
)
374375
require.NoError(t, err)
375-
scriptKey, err := taprpc.UnmarshalScriptKey(scriptKeyDesc.ScriptKey)
376+
scriptKey, err := rpcutils.UnmarshalScriptKey(scriptKeyDesc.ScriptKey)
376377
require.NoError(t, err)
377378

378379
internalKeyDesc, err := tapd.NextInternalKey(
@@ -381,7 +382,7 @@ func DeriveKeys(t *testing.T, tapd commands.RpcClientsBundle) (asset.ScriptKey,
381382
},
382383
)
383384
require.NoError(t, err)
384-
internalKeyLnd, err := taprpc.UnmarshalKeyDescriptor(
385+
internalKeyLnd, err := rpcutils.UnmarshalKeyDescriptor(
385386
internalKeyDesc.InternalKey,
386387
)
387388
require.NoError(t, err)

itest/oracle_harness.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"github.com/lightninglabs/taproot-assets/asset"
1414
"github.com/lightninglabs/taproot-assets/rfqmath"
1515
"github.com/lightninglabs/taproot-assets/rfqmsg"
16+
"github.com/lightninglabs/taproot-assets/rpcutils"
1617
oraclerpc "github.com/lightninglabs/taproot-assets/taprpc/priceoraclerpc"
1718
"github.com/lightningnetwork/lnd/cert"
1819
"github.com/stretchr/testify/require"
@@ -128,15 +129,15 @@ func (o *oracleHarness) getAssetRates(specifier asset.Specifier,
128129
}
129130

130131
// Marshal subject asset rate to RPC format.
131-
rpcSubjectAssetToBtcRate, err := oraclerpc.MarshalBigIntFixedPoint(
132+
rpcSubjectAssetToBtcRate, err := rpcutils.MarshalBigIntFixedPoint(
132133
subjectAssetRate,
133134
)
134135
if err != nil {
135136
return oraclerpc.AssetRates{}, err
136137
}
137138

138139
// Marshal payment asset rate to RPC format.
139-
rpcPaymentAssetToBtcRate, err := oraclerpc.MarshalBigIntFixedPoint(
140+
rpcPaymentAssetToBtcRate, err := rpcutils.MarshalBigIntFixedPoint(
140141
rfqmsg.MilliSatPerBtc,
141142
)
142143
if err != nil {
@@ -182,7 +183,7 @@ func (o *oracleHarness) QueryAssetRates(_ context.Context,
182183

183184
// Ensure that the payment asset is BTC. We only support BTC as the
184185
// payment asset in this example.
185-
if !oraclerpc.IsAssetBtc(req.PaymentAsset) {
186+
if !rpcutils.IsAssetBtc(req.PaymentAsset) {
186187
log.Infof("Payment asset is not BTC: %v", req.PaymentAsset)
187188

188189
return &oraclerpc.QueryAssetRatesResponse{

itest/psbt_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/lightninglabs/taproot-assets/fn"
2222
"github.com/lightninglabs/taproot-assets/internal/test"
2323
"github.com/lightninglabs/taproot-assets/proof"
24+
"github.com/lightninglabs/taproot-assets/rpcutils"
2425
"github.com/lightninglabs/taproot-assets/tapfreighter"
2526
"github.com/lightninglabs/taproot-assets/tappsbt"
2627
"github.com/lightninglabs/taproot-assets/taprpc"
@@ -2708,7 +2709,7 @@ func testPsbtLockTimeSend(t *harnessTest) {
27082709
// We need to let the wallet of Bob know that we're going to use a
27092710
// script key with a custom root.
27102711
_, err = bob.DeclareScriptKey(ctxt, &wrpc.DeclareScriptKeyRequest{
2711-
ScriptKey: taprpc.MarshalScriptKey(bobAssetScriptKey),
2712+
ScriptKey: rpcutils.MarshalScriptKey(bobAssetScriptKey),
27122713
})
27132714
require.NoError(t.t, err)
27142715

@@ -2923,7 +2924,7 @@ func testPsbtRelativeLockTimeSend(t *harnessTest) {
29232924
// We need to let the wallet of Bob know that we're going to use a
29242925
// script key with a custom root.
29252926
_, err = bob.DeclareScriptKey(ctxt, &wrpc.DeclareScriptKeyRequest{
2926-
ScriptKey: taprpc.MarshalScriptKey(bobAssetScriptKey),
2927+
ScriptKey: rpcutils.MarshalScriptKey(bobAssetScriptKey),
29272928
})
29282929
require.NoError(t.t, err)
29292930

@@ -3139,7 +3140,7 @@ func testPsbtRelativeLockTimeSendProofFail(t *harnessTest) {
31393140
// We need to let the wallet of Bob know that we're going to use a
31403141
// script key with a custom root.
31413142
_, err = bob.DeclareScriptKey(ctxt, &wrpc.DeclareScriptKeyRequest{
3142-
ScriptKey: taprpc.MarshalScriptKey(bobAssetScriptKey),
3143+
ScriptKey: rpcutils.MarshalScriptKey(bobAssetScriptKey),
31433144
})
31443145
require.NoError(t.t, err)
31453146

@@ -3333,12 +3334,12 @@ func sendToTapscriptAddr(ctx context.Context, t *harnessTest, alice,
33333334
AssetVersion: mintedAsset.Version,
33343335
ScriptKey: &taprpc.ScriptKey{
33353336
PubKey: schnorr.SerializePubKey(bobAssetScriptKey),
3336-
KeyDesc: taprpc.MarshalKeyDescriptor(
3337+
KeyDesc: rpcutils.MarshalKeyDescriptor(
33373338
bobScriptKey.RawKey,
33383339
),
33393340
TapTweak: rootHash,
33403341
},
3341-
InternalKey: taprpc.MarshalKeyDescriptor(bobInternalKey),
3342+
InternalKey: rpcutils.MarshalKeyDescriptor(bobInternalKey),
33423343
})
33433344

33443345
require.NoError(t.t, err)

0 commit comments

Comments
 (0)