Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashTreeRoot ¶
HashTreeRoot the given value.
The value is expected to be a pointer to a type matching the SSZ definition that is used. Example:
sszTyp := zssz.GetSSZ((*MyStruct)(nil)) value := MyStruct{A: 123, B: false, C: []byte{42,13,37}} root := HashTreeRoot(&value, sszTyp)
func InitZeroHashes ¶ added in v0.7.1
When the hash function changed, also re-initialize the precomputed zero-hashes with this hash-function. These precomputed hashes are used to complete merkle-trees efficiently to a power of 2, without unnecessary duplicate hashing of zeroes, or hashes of, or higher order, up to 32.
func SigningRoot ¶
SigningRoot the given value. If sszTyp is not a container, this function will just return the result of a regular HashTreeRoot.
The value is expected to be a pointer to a type matching the SSZ definition that is used. Example:
sszTyp := zssz.GetSSZ((*MyStruct)(nil)) value := MyStruct{A: 123, B: false, C: []byte{42,13,37}} root := SigningRoot(&value, sszTyp)
Types ¶
This section is empty.