// NOTE: hash is nil if required fields are missing. func (h *Header) Hash() []byte { if len(h.StateHash) == 0 { return nil } return binary.BinaryRipemd160(h) }
func (v *Validator) Hash() []byte { return binary.BinaryRipemd160(v) }
// TODO: Or should this just be BinaryRipemd160(key)? (The difference is the TypeByte.) func (pubKey PubKeyEd25519) Address() []byte { return binary.BinaryRipemd160(pubKey) }
// This should match the leaf hashes of Block.Data.Hash()'s SimpleMerkleTree. func TxID(chainID string, tx Tx) []byte { signBytes := account.SignBytes(chainID, tx) return binary.BinaryRipemd160(signBytes) }