@@ -996,17 +996,18 @@ func (g *GroupKeyRevealV0) GroupPubKey(assetID ID) (*btcec.PublicKey, error) {
996996 return nil , fmt .Errorf ("group reveal raw key invalid: %w" , err )
997997 }
998998
999- return GroupPubKey (rawKey , assetID [:], g .TapscriptRoot ())
999+ return GroupPubKeyV0 (rawKey , assetID [:], g .TapscriptRoot ())
10001000}
10011001
1002- // GroupPubKey derives a tweaked group key from a public key and two tweaks;
1003- // the single tweak is the asset ID of the group anchor asset, and the tapTweak
1004- // is the root of a tapscript tree that commits to script-based conditions for
1005- // reissuing assets as part of this asset group. The tweaked key is defined by:
1002+ // GroupPubKeyV0 derives a version 0 tweaked group key from a public key and two
1003+ // tweaks; the single tweak is the asset ID of the group anchor asset, and the
1004+ // tapTweak is the root of a tapscript tree that commits to script-based
1005+ // conditions for reissuing assets as part of this asset group. The tweaked key
1006+ // is defined by:
10061007//
10071008// internalKey = rawKey + singleTweak * G
10081009// tweakedGroupKey = TapTweak(internalKey, tapTweak)
1009- func GroupPubKey (rawKey * btcec.PublicKey , singleTweak , tapTweak []byte ) (
1010+ func GroupPubKeyV0 (rawKey * btcec.PublicKey , singleTweak , tapTweak []byte ) (
10101011 * btcec.PublicKey , error ) {
10111012
10121013 if len (singleTweak ) != sha256 .Size {
@@ -1417,7 +1418,7 @@ func (req *GroupKeyRequest) BuildGroupVirtualTx(genBuilder GenesisTxBuilder) (
14171418 // Compute the tweaked group key and set it in the asset before
14181419 // creating the virtual minting transaction.
14191420 genesisTweak := req .AnchorGen .ID ()
1420- tweakedGroupKey , err := GroupPubKey (
1421+ tweakedGroupKey , err := GroupPubKeyV0 (
14211422 req .RawKey .PubKey , genesisTweak [:], req .TapscriptRoot ,
14221423 )
14231424 if err != nil {
0 commit comments