Versions in this module Expand all Collapse all v0 v0.0.2 Sep 1, 2018 v0.0.1 Aug 29, 2018 Changes in this version + var ErrDirtyMerkleTree = errors.New("merkle tree has not been finalized") + var ErrEmptyMerkleTree = errors.New("merkle tree has no data blocks") + var ErrNilBlock = errors.New("block cannot be nil") + var ErrNotDirtyMerkleTree = errors.New("merkle tree has been finalized") + type Block []byte + func (b Block) Bytes() []byte + type MerkleTree struct + func NewMerkleTree(blocks ...Block) *MerkleTree + func (mt *MerkleTree) Finalize() error + func (mt *MerkleTree) Insert(b Block) error + func (mt *MerkleTree) RootHash() ([]byte, error) + func (mt *MerkleTree) String() (s string) + func (mt MerkleTree) Proof(block Block) ([]Node, error) + func (mt MerkleTree) Verify(block Block, proof []Node) error + type Node []byte + func (h Node) Bytes() []byte