Documentation
¶
Index ¶
- type BagHasher
- func (c *BagHasher) Create(entries merkle.BagEntries) (hash []byte, leaves []*Node)
- func (c *BagHasher) GetLatestProofs(keys ...[]byte) (proofs []merkle.Proof)
- func (c *BagHasher) GetProofs(version int64, keys ...[]byte) (proofs []merkle.Proof)
- func (c *BagHasher) Height() (height int)
- func (c *BagHasher) NodeToProof(node *Node) merkle.Proof
- func (c *BagHasher) Patch(entries merkle.BagEntries, proofKeys ...[]byte) (hash []byte, proofs []merkle.Proof)
- func (c *BagHasher) SaveVersion() (nextVersion int64)
- func (c *BagHasher) Size() (size int)
- func (c *BagHasher) Version() (version int64)
- type Node
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BagHasher ¶
type BagHasher struct {
Root *Node
}
BagHasher represents an instance of Chainpoint merkle tree based hasher
func NewBagHasher ¶
func NewBagHasher() *BagHasher
NewBagHasher returns a new Chainpoint merkle tree based hasher
func (*BagHasher) Create ¶
func (c *BagHasher) Create(entries merkle.BagEntries) ( hash []byte, leaves []*Node)
Create creates a Chainpoint merkle tree
func (*BagHasher) GetLatestProofs ¶
GetLatestProofs is not implemented
func (*BagHasher) NodeToProof ¶
NodeToProof converts a merkle tree leaf node into a merkle proof
func (*BagHasher) Patch ¶
func (c *BagHasher) Patch(entries merkle.BagEntries, proofKeys ...[]byte) (hash []byte, proofs []merkle.Proof)
Patch initializes or reconstructs a Chainpoint merkle tree
func (*BagHasher) SaveVersion ¶
SaveVersion is not implemented
Click to show internal directories.
Click to hide internal directories.