Skip to content

Commit

Permalink
WIP: proof: mint proof uses GroupKeyRevealV1
Browse files Browse the repository at this point in the history
  • Loading branch information
ffranr committed Jan 3, 2025
1 parent 4298743 commit 5a36181
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions proof/mint.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import (
"fmt"

"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/lightninglabs/taproot-assets/asset"
"github.com/lightninglabs/taproot-assets/commitment"
"github.com/lightninglabs/taproot-assets/fn"
)

// Blob either represents a serialized proof file, including the checksum or a
Expand Down Expand Up @@ -388,12 +390,19 @@ func committedProofs(baseProof *Proof, tapTreeRoot *commitment.TapCommitment,

err := groupAnchorVerifier(&newAsset.Genesis, groupKey)
if err == nil {
rawKey := asset.ToSerialized(
groupKey.RawKey.PubKey,
// TODO(ffranr): Handle custom tapscript
// subtree.
groupReveal, err := asset.NewGroupKeyRevealV1(
*groupKey.RawKey.PubKey,
newAsset.Genesis.ID(),
fn.None[chainhash.Hash](),
)
groupReveal := asset.NewGroupKeyRevealV0(
rawKey, groupKey.TapscriptRoot)
assetProof.GroupKeyReveal = groupReveal
if err != nil {
return nil, fmt.Errorf("unable to " +
"create group key reveal")
}

assetProof.GroupKeyReveal = &groupReveal
}
}

Expand Down

0 comments on commit 5a36181

Please sign in to comment.