Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Block ¶
type Block struct { TimeStamp int64 Transactions []*Transaction PrevBlockHash []byte Hash []byte Nonce int }
Block is a block in a blockchain.
func DeserializeBlock ¶
DeserializeBlock deserializes the given bytes into a block.
func NewBlock ¶
func NewBlock(transactions []*Transaction, prevBlockHash []byte) *Block
NewBlock creates a new block.
type TXInput ¶
TXInput is the input of a transaction.
func (*TXInput) CanUnlockOutputWith ¶
CanUnlockOutputWith checks whether the input can unlock the output.
type TXOutput ¶
TXOutput is the output of a transaction.
func (*TXOutput) CanBeUnlockedWith ¶
CanBeUnlockedWith checks whether the output can be unlocked.
type Transaction ¶
Transaction is a transaction in the chain.
Click to show internal directories.
Click to hide internal directories.