Skip to content

Commit 23c4d4d

Browse files
committed
asset: improve PrevID documentation
Also, remove TODO. When we refer to a previous output, we always need to reference it by asset ID directly. The group key would just be "nice to know" but not directly useful here.
1 parent 676932a commit 23c4d4d

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

asset/asset.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -548,19 +548,15 @@ func (t Type) String() string {
548548

549549
// PrevID serves as a reference to an asset's previous input.
550550
type PrevID struct {
551-
// OutPoint refers to the asset's previous output position within a
552-
// transaction.
551+
// OutPoint is the Bitcoin-level identifier (TXID + vout) of the UTXO
552+
// anchoring the asset state.
553553
OutPoint wire.OutPoint
554554

555-
// ID is the asset ID of the previous asset tree.
555+
// ID is the TAP-level asset identifier.
556556
ID ID
557557

558-
// TODO(roasbeef): need another ref type for assets w/ a key group?
559-
560-
// ScriptKey is the previously tweaked Taproot output key committing to
561-
// the possible spending conditions of the asset. PrevID is being used
562-
// as map keys, so we want to only use data types with fixed and
563-
// comparable content, which a btcec.PublicKey might not be.
558+
// ScriptKey is the TAP-level Taproot output key that committed to the
559+
// asset's spending conditions. Serialized to ensure comparability.
564560
ScriptKey SerializedKey
565561
}
566562

0 commit comments

Comments
 (0)