Versions in this module Expand all Collapse all v0 v0.1.0 Feb 11, 2024 Changes in this version + const MAX_NONCE + var BC = NewBlockchain() + type Block struct + Difficulty *big.Int + Hash string + Index uint + MerkleRoot string + Nonce uint64 + PreviousHash string + Timestamp uint + Txs []Tx + func GenesisBlock() *Block + func (b *Block) CalculateHash() string + func (b *Block) CalculateMerkleRoot() string + func (b *Block) IsValid() error + func (b *Block) MineBlock() error + func (b *Block) Print() + type Blockchain struct + Chain []Block + Difficulty *big.Int + MiningReward uint + PendingBlock Block + func NewBlockchain() *Blockchain + func (bc *Blockchain) GetLatestBlock() Block + func (bc *Blockchain) Print() + type Tx struct + Amount uint + From string + Hash string + Signature string + Timestamp uint + To string + func NewTx(from string, to string, amount uint, signature string) *Tx + func (tx *Tx) CalculateHash() string + func (tx *Tx) IsValid() error + func (tx *Tx) Print() + func (tx *Tx) VerifySignature() error