Documentation ¶
Index ¶
Constants ¶
View Source
const ( DirLeft = 1 DirRight = 2 )
directions
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSMT ¶
type CSMT struct {
// contains filtered or unexported fields
}
CSMT is Compact Sparse Merkle Tree It implements interface SMT
func (*CSMT) GetRootHash ¶
GetRootHash implements interface SMT
type InnerNode ¶
type InnerNode struct {
// contains filtered or unexported fields
}
InnerNode is the non-leaf node
func NewInnerNode ¶
NewInnerNode constructs a new InnerNode
type LeafNode ¶
type LeafNode struct {
// contains filtered or unexported fields
}
LeafNode is the leaf node
func NewLeafNode ¶
NewLeafNode constructs a new LeafNode
type MembershipProof ¶
type MembershipProof struct {
// contains filtered or unexported fields
}
MembershipProof is a Proof for membership
func (MembershipProof) IsMembershipProof ¶
func (p MembershipProof) IsMembershipProof() bool
IsMembershipProof implements Proof
func (MembershipProof) VerifyHash ¶
func (p MembershipProof) VerifyHash(hash *Hash, rootHash *Hash, calculator NodeHashFunction) bool
VerifyHash verifies if a hash is valid
func (MembershipProof) VerifyHashInTree ¶
func (p MembershipProof) VerifyHashInTree(hash *Hash, tree *CSMT) bool
VerifyHashInTree verifies if a hash is valid in a CSMT
type MembershipProofEntry ¶
type MembershipProofEntry struct {
// contains filtered or unexported fields
}
MembershipProofEntry is the entry in a MembershipProof
type NodeHashFunction ¶
NodeHashFunction computes the hash for the children for a inner node
type NonMembershipProof ¶
type NonMembershipProof struct {
// contains filtered or unexported fields
}
NonMembershipProof is a Proof for non-membership
func (NonMembershipProof) IsMembershipProof ¶
func (p NonMembershipProof) IsMembershipProof() bool
IsMembershipProof implements Proof
Click to show internal directories.
Click to hide internal directories.