Versions in this module Expand all Collapse all v2 v2.6.0 May 7, 2024 Changes in this version type MerkleTree + func (t *MerkleTree) GenerateMultiProofWithIndices(indices []uint64) (*MultiProof, error) + func (t *MerkleTree) GenerateProofWithIndex(index uint64, height int) (*Proof, error) v2.5.1 Jan 30, 2024 Changes in this version + func VerifyMultiProof(data [][]byte, salt bool, proof *MultiProof, root []byte) (bool, error) + func VerifyMultiProofUsing(data [][]byte, salt bool, proof *MultiProof, root []byte, hashType HashType) (bool, error) + func VerifyPollard(pollard [][]byte) bool + func VerifyPollardUsing(pollard [][]byte, hashType HashType) bool + func VerifyProof(data []byte, salt bool, proof *Proof, pollard [][]byte) (bool, error) + func VerifyProofUsing(data []byte, salt bool, proof *Proof, pollard [][]byte, hashType HashType) (bool, error) + type Formatter interface + Format func(data []byte) string + type HashFunc func(...[]byte) []byte + type HashType interface + Hash func(data ...[]byte) []byte + HashLength func() int + HashName func() string + type HexFormatter struct + func (f *HexFormatter) Format(data []byte) string + type MerkleTree struct + Data [][]byte + Hash HashType + Nodes [][]byte + Salt bool + Sorted bool + func New(data [][]byte) (*MerkleTree, error) + func NewTree(params ...Parameter) (*MerkleTree, error) + func NewUsing(data [][]byte, hash HashType, salt bool) (*MerkleTree, error) + func (t *MerkleTree) DOT(lf Formatter, bf Formatter) string + func (t *MerkleTree) DOTMultiProof(multiProof *MultiProof, lf Formatter, bf Formatter) string + func (t *MerkleTree) DOTProof(proof *Proof, lf Formatter, bf Formatter) string + func (t *MerkleTree) GenerateMultiProof(data [][]byte) (*MultiProof, error) + func (t *MerkleTree) GenerateProof(data []byte, height int) (*Proof, error) + func (t *MerkleTree) GetSalt() bool + func (t *MerkleTree) MarshalJSON() ([]byte, error) + func (t *MerkleTree) Pollard(height int) [][]byte + func (t *MerkleTree) Root() []byte + func (t *MerkleTree) String() string + func (t *MerkleTree) UnmarshalJSON(data []byte) error + type MultiProof struct + Hashes map[uint64][]byte + Indices []uint64 + Values uint64 + func NewMultiProof(params ...Parameter) (*MultiProof, error) + func (p *MultiProof) Verify(data [][]byte, root []byte) (bool, error) + type Parameter interface + func WithData(data [][]byte) Parameter + func WithHashType(hash HashType) Parameter + func WithHashes(hashes map[uint64][]byte) Parameter + func WithIndices(indices []uint64) Parameter + func WithSalt(salt bool) Parameter + func WithSorted(sorted bool) Parameter + func WithValues(values uint64) Parameter + type Proof struct + Hashes [][]byte + Index uint64 + type StringFormatter struct + func (f *StringFormatter) Format(data []byte) string + type TruncatedHexFormatter struct + func (f *TruncatedHexFormatter) Format(data []byte) string Other modules containing this package github.com/wealdtech/go-merkletree