Skip to content

Commit

Permalink
rpcserver: expand VerifyAssetOwnership
Browse files Browse the repository at this point in the history
This commit expands VerifyAssetownership by returning the outpoint
block hash and blockheight of the proof.
  • Loading branch information
sputn1ck committed Aug 12, 2024
1 parent 1e89462 commit e6fddea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -5921,7 +5921,7 @@ func (r *rpcServer) VerifyAssetOwnership(ctx context.Context,

headerVerifier := tapgarden.GenHeaderVerifier(ctx, r.cfg.ChainBridge)
groupVerifier := tapgarden.GenGroupVerifier(ctx, r.cfg.MintingStore)
_, err = p.Verify(
snapShot, err := p.Verify(
ctx, nil, headerVerifier, proof.DefaultMerkleVerifier,
groupVerifier, lookup,
)
Expand All @@ -5931,6 +5931,12 @@ func (r *rpcServer) VerifyAssetOwnership(ctx context.Context,

return &wrpc.VerifyAssetOwnershipResponse{
ValidProof: true,
Outpoint: &taprpc.OutPoint{
Txid: snapShot.OutPoint.Hash[:],
OutputIndex: snapShot.OutPoint.Index,
},
BlockHash: snapShot.AnchorBlockHash[:],
BlockHeight: snapShot.AnchorBlockHeight,
}, nil
}

Expand Down

0 comments on commit e6fddea

Please sign in to comment.