Documentation ¶
Index ¶
- type Block
- type Transaction
- func (tx *Transaction) CalcHash() []byte
- func (tx *Transaction) CalculateFee(feePerByte float64) float64
- func (tx Transaction) IsCoinBase() bool
- func (tx Transaction) Serialize() []byte
- func (tx *Transaction) Sign(privateKey []byte, prevTXs map[string]Transaction) Transaction
- func (tx *Transaction) TrimmedCopy() Transaction
- func (tx *Transaction) Verify(prevTXs map[string]Transaction) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { Timestamp int64 Transactions []Transaction PrevBlockHash []byte Hash []byte Nonce int Height int }
func (Block) HashTransactions ¶
type Transaction ¶
type Transaction struct { Hash []byte VIn []tx_io.TXInput VOut []tx_io.TXOutput Timestamp int64 Fee float64 }
func (*Transaction) CalcHash ¶
func (tx *Transaction) CalcHash() []byte
func (*Transaction) CalculateFee ¶
func (tx *Transaction) CalculateFee(feePerByte float64) float64
func (Transaction) IsCoinBase ¶
func (tx Transaction) IsCoinBase() bool
func (Transaction) Serialize ¶
func (tx Transaction) Serialize() []byte
func (*Transaction) Sign ¶
func (tx *Transaction) Sign(privateKey []byte, prevTXs map[string]Transaction) Transaction
func (*Transaction) TrimmedCopy ¶
func (tx *Transaction) TrimmedCopy() Transaction
func (*Transaction) Verify ¶
func (tx *Transaction) Verify(prevTXs map[string]Transaction) bool
Click to show internal directories.
Click to hide internal directories.