func NewTXOutput(value float64, address string) *TXOutput {
	txo := &TXOutput{value, nil}
	txo.Lock([]byte(address))
	return txo
}
NewTXOutput create a new TXOutput
package structures
import (
	"bytes"
	"encoding/binary"
	"encoding/gob"
	"fmt"
	"log"
	"strings"
	"github.com/gelembjuk/democoin/lib/utils"
)
type TXOutput struct {
	Value      float64
	PubKeyHash []byte
}
type TXOutputIndependent struct {
	Value          float64
	DestPubKeyHash []byte
	SendPubKeyHash []byte
	TXID           []byte
	OIndex         int
	IsBase         bool
	BlockHash      []byte
}
type TXOutputIndependentList []TXOutputIndependent
func (out *TXOutput) Lock(address []byte) {
	pubKeyHash := utils.Base58Decode(address)
	pubKeyHash = pubKeyHash[1 : len(pubKeyHash)-4]
	out.PubKeyHash = pubKeyHash
}
func (out *TXOutput) IsLockedWithKey(pubKeyHash []byte) bool {
	return bytes.Compare(out.PubKeyHash, pubKeyHash) == 0
}
func (out *TXOutputIndependent) IsLockedWithKey(pubKeyHash []byte) bool {
	return bytes.Compare(out.DestPubKeyHash, pubKeyHash) == 0
}
func (out *TXOutputIndependent) LoadFromSimple(sout TXOutput, txid []byte, ind int, sender []byte, iscoinbase bool, blockHash []byte) {
	out.OIndex = ind
	out.DestPubKeyHash = sout.PubKeyHash
	out.SendPubKeyHash = sender
	out.Value = sout.Value
	out.TXID = txid
	out.IsBase = iscoinbase
	out.BlockHash = blockHash
}