5 // Spend accesses the value in a prior Output for transfer
6 // elsewhere. It satisfies the Entry interface.
8 // (Not to be confused with the deprecated type SpendInput.)
10 func (Spend) typ() string { return "spend1" }
11 func (s *Spend) writeForHash(w io.Writer) {
12 mustWriteForHash(w, s.SpentOutputId)
15 // SetDestination will link the spend to the output
16 func (s *Spend) SetDestination(id *Hash, val *AssetAmount, pos uint64) {
17 s.WitnessDestination = &ValueDestination{
24 // NewSpend creates a new Spend.
25 func NewSpend(spentOutputID *Hash, ordinal uint64) *Spend {
27 SpentOutputId: spentOutputID,