Documentation
¶
Overview ¶
Package merkle provides an API to generate merkle trees and proofs from 32 byte leaves. It is a port of the OpenZeppelin JS merkle-tree library. See https://github.com/OpenZeppelin/merkle-tree/tree/master.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StdLeafHash ¶
StdLeafHash returns the standard leaf hash of the given data. The data is hashed twice with keccak256 to prevent pre-image attacks.
Types ¶
type MultiProof ¶
MultiProof is a merkle-multi-proof for multiple leaves.
func GetMultiProof ¶
func GetMultiProof(tree [][32]byte, indices ...int) (MultiProof, error)
GetMultiProof returns a merkle-multi-proof for the given leaf indices.
Click to show internal directories.
Click to hide internal directories.