Skip to content

taprpc: extract as standalone Go submodule for WASM clients #1487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmd/commands/addrs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"time"

"github.com/lightninglabs/taproot-assets/asset"
"github.com/lightninglabs/taproot-assets/rpcutils"
"github.com/lightninglabs/taproot-assets/taprpc"
"github.com/urfave/cli"
)
Expand Down Expand Up @@ -82,7 +83,7 @@ func newAddr(ctx *cli.Context) error {
client, cleanUp := getClient(ctx)
defer cleanUp()

assetVersion, err := taprpc.MarshalAssetVersion(
assetVersion, err := rpcutils.MarshalAssetVersion(
asset.Version(ctx.Uint64(assetVersionName)),
)
if err != nil {
Expand Down
12 changes: 4 additions & 8 deletions docs/examples/basic-price-oracle/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@ module basic-price-oracle

go 1.23.6

replace (
github.com/lightninglabs/taproot-assets => ../../../

// We want to format raw bytes as hex instead of base64. The forked version
// allows us to specify that as an option.
google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display
)
// We want to format raw bytes as hex instead of base64. The forked version
// allows us to specify that as an option.
replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display

require (
github.com/lightninglabs/taproot-assets v0.5.0-rc1
github.com/lightninglabs/taproot-assets v0.5.2-0.20250424095231-89a3e175feb0
github.com/sirupsen/logrus v1.9.3
google.golang.org/grpc v1.64.1
)
Expand Down
2 changes: 2 additions & 0 deletions docs/examples/basic-price-oracle/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,8 @@ github.com/lightninglabs/neutrino/cache v1.1.2 h1:C9DY/DAPaPxbFC+xNNEI/z1SJY9GS3
github.com/lightninglabs/neutrino/cache v1.1.2/go.mod h1:XJNcgdOw1LQnanGjw8Vj44CvguYA25IMKjWFZczwZuo=
github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display h1:Y2WiPkBS/00EiEg0qp0FhehxnQfk3vv8U6Xt3nN+rTY=
github.com/lightninglabs/protobuf-go-hex-display v1.33.0-hex-display/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
github.com/lightninglabs/taproot-assets v0.5.2-0.20250424095231-89a3e175feb0 h1:6r4n5DDXQMuMV3/+y5v1vdBTJejpNUK54d58OarDoPw=
github.com/lightninglabs/taproot-assets v0.5.2-0.20250424095231-89a3e175feb0/go.mod h1:6kQm7VC4yWAwczJaxfOWlCOQ4TuzfCLUkGKBwVONN7k=
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.0-beta.rc2.0.20250423092132-a35ace7371af h1:+t8N7kmI7YVu7Hzv8pPiMVCTjnSRi/qOxbAkXa5rn+0=
Expand Down
6 changes: 5 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ require (
github.com/lightninglabs/lightning-node-connect/hashmailrpc v1.0.2
github.com/lightninglabs/lndclient v0.19.0-4
github.com/lightninglabs/neutrino/cache v1.1.2
github.com/lightninglabs/taproot-assets/taprpc v1.0.0
github.com/lightningnetwork/lnd v0.19.0-beta.rc2.0.20250423092132-a35ace7371af
github.com/lightningnetwork/lnd/cert v1.2.2
github.com/lightningnetwork/lnd/clock v1.1.1
Expand Down Expand Up @@ -116,7 +117,7 @@ require (
github.com/jonboulle/clockwork v0.2.2 // indirect
github.com/jrick/logrotate v1.1.2 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/juju/loggo v0.0.0-20210728185423-eebad3a902c4 // indirect
github.com/juju/loggo v1.0.0 // indirect
github.com/kkdai/bstream v1.0.0 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
Expand Down Expand Up @@ -212,3 +213,6 @@ replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-d
// We are using a fork of the migration library with custom functionality that
// did not yet make it into the upstream repository.
replace github.com/golang-migrate/migrate/v4 => github.com/lightninglabs/migrate/v4 v4.18.2-9023d66a-fork-pr-2

// Note this is a temproary replace and will be removed when taprpc is tagged.
replace github.com/lightninglabs/taproot-assets/taprpc => ./taprpc
30 changes: 10 additions & 20 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -419,24 +419,16 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a/go.mod h1:UJSiEoRfvx3hP73CvoARgeLjaIOjybY9vj8PUPPFGeU=
github.com/juju/clock v0.0.0-20220203021603-d9deb868a28a h1:Az/6CM/P5guGHNy7r6TkOCctv3lDmN3W1uhku7QMupk=
github.com/juju/clock v0.0.0-20220203021603-d9deb868a28a/go.mod h1:GZ/FY8Cqw3KHG6DwRVPUKbSPTAwyrU28xFi5cqZnLsc=
github.com/juju/collections v0.0.0-20220203020748-febd7cad8a7a h1:d7eZO8OS/ZXxdP0uq3E8CdoA1qNFaecAv90UxrxaY2k=
github.com/juju/collections v0.0.0-20220203020748-febd7cad8a7a/go.mod h1:JWeZdyttIEbkR51z2S13+J+aCuHVe0F6meRy+P0YGDo=
github.com/juju/errors v0.0.0-20220331221717-b38fca44723b h1:AxFeSQJfcm2O3ov1wqAkTKYFsnMw2g1B4PkYujfAdkY=
github.com/juju/errors v0.0.0-20220331221717-b38fca44723b/go.mod h1:jMGj9DWF/qbo91ODcfJq6z/RYc3FX3taCBZMCcpI4Ls=
github.com/juju/loggo v0.0.0-20210728185423-eebad3a902c4 h1:NO5tuyw++EGLnz56Q8KMyDZRwJwWO8jQnj285J3FOmY=
github.com/juju/loggo v0.0.0-20210728185423-eebad3a902c4/go.mod h1:NIXFioti1SmKAlKNuUwbMenNdef59IF52+ZzuOmHYkg=
github.com/juju/mgo/v2 v2.0.0-20220111072304-f200228f1090 h1:zX5GoH3Jp8k1EjUFkApu/YZAYEn0PYQfg/U6IDyNyYs=
github.com/juju/mgo/v2 v2.0.0-20220111072304-f200228f1090/go.mod h1:N614SE0a4e+ih2rg96Vi2PeC3cTpUOWgCTv3Cgk974c=
github.com/juju/retry v0.0.0-20220204093819-62423bf33287 h1:U+7oMWEglXfiikIppNexButZRwKPlzLBGKYSNCXzXf8=
github.com/juju/retry v0.0.0-20220204093819-62423bf33287/go.mod h1:SssN1eYeK3A2qjnFGTiVMbdzGJ2BfluaJblJXvuvgqA=
github.com/juju/testing v0.0.0-20220203020004-a0ff61f03494 h1:XEDzpuZb8Ma7vLja3+5hzUqVTvAqm5Y+ygvnDs5iTMM=
github.com/juju/testing v0.0.0-20220203020004-a0ff61f03494/go.mod h1:rUquetT0ALL48LHZhyRGvjjBH8xZaZ8dFClulKK5wK4=
github.com/juju/utils/v3 v3.0.0-20220203023959-c3fbc78a33b0 h1:bn+2Adl1yWqYjm3KSFlFqsvfLg2eq+XNL7GGMYApdVw=
github.com/juju/utils/v3 v3.0.0-20220203023959-c3fbc78a33b0/go.mod h1:8csUcj1VRkfjNIRzBFWzLFCMLwLqsRWvkmhfVAUwbC4=
github.com/juju/version/v2 v2.0.0-20220204124744-fc9915e3d935 h1:6YoyzXVW1XkqN86y2s/rz365Jm7EiAy39v2G5ikzvHU=
github.com/juju/version/v2 v2.0.0-20220204124744-fc9915e3d935/go.mod h1:ZeFjNy+UFEWJDDPdzW7Cm9NeU6dsViGaFYhXzycLQrw=
github.com/juju/clock v1.1.1 h1:NvgHG9DQmOpBevgt6gzkyimdWBooLXDy1cQn89qJzBI=
github.com/juju/clock v1.1.1/go.mod h1:HIBvJ8kiV/n7UHwKuCkdYL4l/MDECztHR2sAvWDxxf0=
github.com/juju/errors v1.0.0 h1:yiq7kjCLll1BiaRuNY53MGI0+EQ3rF6GB+wvboZDefM=
github.com/juju/errors v1.0.0/go.mod h1:B5x9thDqx0wIMH3+aLIMP9HjItInYWObRovoCFM5Qe8=
github.com/juju/loggo v1.0.0 h1:Y6ZMQOGR9Aj3BGkiWx7HBbIx6zNwNkxhVNOHU2i1bl0=
github.com/juju/loggo v1.0.0/go.mod h1:NIXFioti1SmKAlKNuUwbMenNdef59IF52+ZzuOmHYkg=
github.com/juju/testing v1.0.2 h1:OR90RqCd9CJONxXamZAjLknpZdtqDyxqW8IwCbgw3i4=
github.com/juju/testing v1.0.2/go.mod h1:h3Vd2rzB57KrdsBEy6R7bmSKPzP76BnNavt7i8PerwQ=
github.com/juju/utils/v3 v3.2.0 h1:RkEgTHbrPoOqTuOSaob52B1gLkpeMLd5fZj/4kFzb1k=
github.com/juju/utils/v3 v3.2.0/go.mod h1:nAj3sHtdYfAkvnkqttTy3Xzm2HzkD9Hfgnc+upOW2Z8=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
Expand Down Expand Up @@ -666,8 +658,6 @@ github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk=
github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA=
github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8=
github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
Expand Down
3 changes: 2 additions & 1 deletion itest/assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"github.com/lightninglabs/taproot-assets/commitment"
"github.com/lightninglabs/taproot-assets/fn"
"github.com/lightninglabs/taproot-assets/proof"
"github.com/lightninglabs/taproot-assets/rpcutils"
"github.com/lightninglabs/taproot-assets/tapfreighter"
"github.com/lightninglabs/taproot-assets/tappsbt"
"github.com/lightninglabs/taproot-assets/taprpc"
Expand Down Expand Up @@ -2188,7 +2189,7 @@ func AssertBalances(t *testing.T, client taprpc.TaprootAssetsClient,
case config.scriptKeyType != nil:
rpcTypeQuery = &taprpc.ScriptKeyTypeQuery{
Type: &taprpc.ScriptKeyTypeQuery_ExplicitType{
ExplicitType: taprpc.MarshalScriptKeyType(
ExplicitType: rpcutils.MarshalScriptKeyType(
*config.scriptKeyType,
),
},
Expand Down
15 changes: 8 additions & 7 deletions itest/mint_fund_seal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/lightninglabs/taproot-assets/fn"
"github.com/lightninglabs/taproot-assets/internal/test"
"github.com/lightninglabs/taproot-assets/proof"
"github.com/lightninglabs/taproot-assets/rpcutils"
"github.com/lightninglabs/taproot-assets/tappsbt"
"github.com/lightninglabs/taproot-assets/taprpc"
wrpc "github.com/lightninglabs/taproot-assets/taprpc/assetwalletrpc"
Expand Down Expand Up @@ -109,23 +110,23 @@ func testMintFundSealAssets(t *harnessTest) {
// Asset 0 will have no asset group, and an external script key with a
// tapscript root.
assetReqWithScriptKey := CopyRequest(simpleAssets[0])
assetReqWithScriptKey.Asset.ScriptKey = taprpc.MarshalScriptKey(
assetReqWithScriptKey.Asset.ScriptKey = rpcutils.MarshalScriptKey(
tweakedScript,
)

// Asset 1 will have a specific internal group key with a tapscript
// root. This asset will be a group anchor.
assetReqGroupedInternalTweaked := CopyRequest(simpleAssets[1])
assetReqGroupedInternalTweaked.Asset.NewGroupedAsset = true
assetReqGroupedInternalTweaked.Asset.GroupInternalKey = taprpc.
MarshalKeyDescriptor(managedGroupInternal)
assetReqGroupedInternalTweaked.Asset.GroupInternalKey =
rpcutils.MarshalKeyDescriptor(managedGroupInternal)
assetReqGroupedInternalTweaked.Asset.
GroupTapscriptRoot = groupInternalTweak

// Asset 2 will have an external group key with a tapscript root.
assetReqGroupedExternal := CopyRequest(issuableAssets[0])
assetReqGroupedExternal.Asset.GroupInternalKey = taprpc.
MarshalKeyDescriptor(groupExternalDesc)
assetReqGroupedExternal.Asset.GroupInternalKey =
rpcutils.MarshalKeyDescriptor(groupExternalDesc)
assetReqGroupedExternal.Asset.GroupTapscriptRoot = groupExternalTweak[:]

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

require.NotNil(t, a.GroupVirtualTx)
virtualTx, err := taprpc.UnmarshalGroupVirtualTx(a.GroupVirtualTx)
virtualTx, err := rpcutils.UnmarshalGroupVirtualTx(a.GroupVirtualTx)
require.NoError(t, err)

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

// Unmarshal group key request.
require.NotNil(t, a.GroupKeyRequest)
keyReq, err := taprpc.UnmarshalGroupKeyRequest(a.GroupKeyRequest)
keyReq, err := rpcutils.UnmarshalGroupKeyRequest(a.GroupKeyRequest)
require.NoError(t, err)

return *keyReq, *virtualTx
Expand Down
7 changes: 4 additions & 3 deletions itest/multisig.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"github.com/lightninglabs/taproot-assets/cmd/commands"
"github.com/lightninglabs/taproot-assets/commitment"
"github.com/lightninglabs/taproot-assets/fn"
"github.com/lightninglabs/taproot-assets/rpcutils"
"github.com/lightninglabs/taproot-assets/tappsbt"
"github.com/lightninglabs/taproot-assets/taprpc"
wrpc "github.com/lightninglabs/taproot-assets/taprpc/assetwalletrpc"
Expand Down Expand Up @@ -171,7 +172,7 @@ func MultiSigTest(t *testing.T, ctx context.Context, aliceTapd,
muSig2Addr, err := bobTapd.NewAddr(ctxt, &taprpc.NewAddrRequest{
AssetId: firstBatchGenesis.AssetId,
Amt: assetsToSend,
ScriptKey: taprpc.MarshalScriptKey(tapScriptKey),
ScriptKey: rpcutils.MarshalScriptKey(tapScriptKey),
InternalKey: &taprpc.KeyDescriptor{
RawKeyBytes: pubKeyBytes(btcInternalKey),
},
Expand Down Expand Up @@ -372,7 +373,7 @@ func DeriveKeys(t *testing.T, tapd commands.RpcClientsBundle) (asset.ScriptKey,
},
)
require.NoError(t, err)
scriptKey, err := taprpc.UnmarshalScriptKey(scriptKeyDesc.ScriptKey)
scriptKey, err := rpcutils.UnmarshalScriptKey(scriptKeyDesc.ScriptKey)
require.NoError(t, err)

internalKeyDesc, err := tapd.NextInternalKey(
Expand All @@ -381,7 +382,7 @@ func DeriveKeys(t *testing.T, tapd commands.RpcClientsBundle) (asset.ScriptKey,
},
)
require.NoError(t, err)
internalKeyLnd, err := taprpc.UnmarshalKeyDescriptor(
internalKeyLnd, err := rpcutils.UnmarshalKeyDescriptor(
internalKeyDesc.InternalKey,
)
require.NoError(t, err)
Expand Down
7 changes: 4 additions & 3 deletions itest/oracle_harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/lightninglabs/taproot-assets/asset"
"github.com/lightninglabs/taproot-assets/rfqmath"
"github.com/lightninglabs/taproot-assets/rfqmsg"
"github.com/lightninglabs/taproot-assets/rpcutils"
oraclerpc "github.com/lightninglabs/taproot-assets/taprpc/priceoraclerpc"
"github.com/lightningnetwork/lnd/cert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -128,15 +129,15 @@ func (o *oracleHarness) getAssetRates(specifier asset.Specifier,
}

// Marshal subject asset rate to RPC format.
rpcSubjectAssetToBtcRate, err := oraclerpc.MarshalBigIntFixedPoint(
rpcSubjectAssetToBtcRate, err := rpcutils.MarshalBigIntFixedPoint(
subjectAssetRate,
)
if err != nil {
return oraclerpc.AssetRates{}, err
}

// Marshal payment asset rate to RPC format.
rpcPaymentAssetToBtcRate, err := oraclerpc.MarshalBigIntFixedPoint(
rpcPaymentAssetToBtcRate, err := rpcutils.MarshalBigIntFixedPoint(
rfqmsg.MilliSatPerBtc,
)
if err != nil {
Expand Down Expand Up @@ -182,7 +183,7 @@ func (o *oracleHarness) QueryAssetRates(_ context.Context,

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

return &oraclerpc.QueryAssetRatesResponse{
Expand Down
11 changes: 6 additions & 5 deletions itest/psbt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"github.com/lightninglabs/taproot-assets/fn"
"github.com/lightninglabs/taproot-assets/internal/test"
"github.com/lightninglabs/taproot-assets/proof"
"github.com/lightninglabs/taproot-assets/rpcutils"
"github.com/lightninglabs/taproot-assets/tapfreighter"
"github.com/lightninglabs/taproot-assets/tappsbt"
"github.com/lightninglabs/taproot-assets/taprpc"
Expand Down Expand Up @@ -2708,7 +2709,7 @@ func testPsbtLockTimeSend(t *harnessTest) {
// We need to let the wallet of Bob know that we're going to use a
// script key with a custom root.
_, err = bob.DeclareScriptKey(ctxt, &wrpc.DeclareScriptKeyRequest{
ScriptKey: taprpc.MarshalScriptKey(bobAssetScriptKey),
ScriptKey: rpcutils.MarshalScriptKey(bobAssetScriptKey),
})
require.NoError(t.t, err)

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

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

Expand Down Expand Up @@ -3333,12 +3334,12 @@ func sendToTapscriptAddr(ctx context.Context, t *harnessTest, alice,
AssetVersion: mintedAsset.Version,
ScriptKey: &taprpc.ScriptKey{
PubKey: schnorr.SerializePubKey(bobAssetScriptKey),
KeyDesc: taprpc.MarshalKeyDescriptor(
KeyDesc: rpcutils.MarshalKeyDescriptor(
bobScriptKey.RawKey,
),
TapTweak: rootHash,
},
InternalKey: taprpc.MarshalKeyDescriptor(bobInternalKey),
InternalKey: rpcutils.MarshalKeyDescriptor(bobInternalKey),
})

require.NoError(t.t, err)
Expand Down
13 changes: 7 additions & 6 deletions itest/send_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/lightninglabs/taproot-assets/fn"
"github.com/lightninglabs/taproot-assets/internal/test"
"github.com/lightninglabs/taproot-assets/proof"
"github.com/lightninglabs/taproot-assets/rpcutils"
"github.com/lightninglabs/taproot-assets/tapfreighter"
"github.com/lightninglabs/taproot-assets/taprpc"
wrpc "github.com/lightninglabs/taproot-assets/taprpc/assetwalletrpc"
Expand Down Expand Up @@ -1150,7 +1151,7 @@ func testSpendChangeOutputWhenProofTransferFail(t *harnessTest) {
// for this output.
firstOutput := firstTransfer.Outputs[0]
require.Equal(
t.t, taprpc.ProofDeliveryStatusNotApplicable,
t.t, rpcutils.ProofDeliveryStatusNotApplicable,
firstOutput.ProofDeliveryStatus,
)

Expand All @@ -1159,7 +1160,7 @@ func testSpendChangeOutputWhenProofTransferFail(t *harnessTest) {
// completed successfully.
secondOutput := firstTransfer.Outputs[1]
require.Equal(
t.t, taprpc.ProofDeliveryStatusPending,
t.t, rpcutils.ProofDeliveryStatusPending,
secondOutput.ProofDeliveryStatus,
)

Expand Down Expand Up @@ -1228,7 +1229,7 @@ func testSpendChangeOutputWhenProofTransferFail(t *harnessTest) {
// for this output.
firstOutput := firstTransfer.Outputs[0]
require.Equal(
t.t, taprpc.ProofDeliveryStatusNotApplicable,
t.t, rpcutils.ProofDeliveryStatusNotApplicable,
firstOutput.ProofDeliveryStatus,
)

Expand All @@ -1237,7 +1238,7 @@ func testSpendChangeOutputWhenProofTransferFail(t *harnessTest) {
// completed successfully.
secondOutput := firstTransfer.Outputs[1]
require.Equal(
t.t, taprpc.ProofDeliveryStatusPending,
t.t, rpcutils.ProofDeliveryStatusPending,
secondOutput.ProofDeliveryStatus,
)

Expand All @@ -1254,7 +1255,7 @@ func testSpendChangeOutputWhenProofTransferFail(t *harnessTest) {
// for this output.
firstOutput = secondTransfer.Outputs[0]
require.Equal(
t.t, taprpc.ProofDeliveryStatusNotApplicable,
t.t, rpcutils.ProofDeliveryStatusNotApplicable,
firstOutput.ProofDeliveryStatus,
)

Expand All @@ -1263,7 +1264,7 @@ func testSpendChangeOutputWhenProofTransferFail(t *harnessTest) {
// completed successfully.
secondOutput = secondTransfer.Outputs[1]
require.Equal(
t.t, taprpc.ProofDeliveryStatusPending,
t.t, rpcutils.ProofDeliveryStatusPending,
secondOutput.ProofDeliveryStatus,
)

Expand Down
5 changes: 3 additions & 2 deletions itest/universe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/lightninglabs/taproot-assets/fn"
"github.com/lightninglabs/taproot-assets/internal/test"
"github.com/lightninglabs/taproot-assets/mssmt"
"github.com/lightninglabs/taproot-assets/rpcutils"
"github.com/lightninglabs/taproot-assets/taprpc"
"github.com/lightninglabs/taproot-assets/taprpc/mintrpc"
unirpc "github.com/lightninglabs/taproot-assets/taprpc/universerpc"
Expand Down Expand Up @@ -760,7 +761,7 @@ func testFederationSyncConfig(t *harnessTest) {
AssetID: assetID1,
ProofType: universe.ProofTypeIssuance,
}
uniIdRpc1 := unirpc.MarshalUniverseID(assetIDBytes1, nil)
uniIdRpc1 := rpcutils.MarshalUniverseID(assetIDBytes1, nil)
uniIdRpc1.ProofType = unirpc.ProofType_PROOF_TYPE_ISSUANCE

// Generate universe ID #2.
Expand All @@ -771,7 +772,7 @@ func testFederationSyncConfig(t *harnessTest) {
GroupKey: groupKey2,
ProofType: universe.ProofTypeTransfer,
}
uniIdRpc2 := unirpc.MarshalUniverseID(nil, groupKeyBytes2)
uniIdRpc2 := rpcutils.MarshalUniverseID(nil, groupKeyBytes2)
uniIdRpc2.ProofType = unirpc.ProofType_PROOF_TYPE_TRANSFER

// Set both the global and a universe specific federation sync configs.
Expand Down
Loading
Loading