diff --git a/transaction_output.go b/transaction_output.go index 34dabad..2ae68de 100644 --- a/transaction_output.go +++ b/transaction_output.go @@ -49,3 +49,16 @@ func (outs TXOutputs) Serialize() []byte { return buff.Bytes() } + +// DeserializeOutputs deserializes TXOutputs +func DeserializeOutputs(data []byte) TXOutputs { + var outputs TXOutputs + + dec := gob.NewDecoder(bytes.NewReader(data)) + err := dec.Decode(&outputs) + if err != nil { + log.Panic(err) + } + + return outputs +}