Documentation ¶
Index ¶
- func BuildMerkleTree(hashType string, hashes [][]byte) ([][]byte, error)
- func Get(hashType crypto.HashType, data []byte) ([]byte, error)
- func GetByStrType(hashType string, data []byte) ([]byte, error)
- func GetHashAlgorithm(hashType crypto.HashType) (hash.Hash, error)
- func GetMerklePath(index int32, merkleTree [][]byte) [][]byte
- func GetMerkleRoot(hashType string, hashes [][]byte) ([]byte, error)
- func Prove(paths [][]byte, merkleRoot, txHash []byte, index uint32, hashType string) bool
- type Hash
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildMerkleTree ¶
BuildMerkleTree take leaf node hash array and build merkle tree
func Get ¶
Get return the hash of data by hashType
func GetByStrType ¶
GetByStrType return hash of data by hashType
func GetHashAlgorithm ¶
GetHashAlgorithm return the corresponding hash interface by hashType
func GetMerkleRoot ¶
GetMerkleRoot used to calculate merkleroot of hashes by hashType
Types ¶
Click to show internal directories.
Click to hide internal directories.