LeafOp represents the raw key-value data we wish to prove, and must be flexible to represent the internal transformation from the original key-value pairs into the basis hash, for many existing merkle trees.

key and value are passed in. So that the signature of this operation is: leafOp(key, value) -> output

To process this, first prehash the keys and values if needed (ANY means no hash in this case): hkey = prehashKey(key) hvalue = prehashValue(value)

Then combine the bytes, and hash it output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue)

from message ics23.LeafOp

Hierarchy

Constructors

Properties

hash: HashOp = HashOp.NO_HASH

from field: ics23.HashOp hash = 1;

length: LengthOp = LengthOp.NO_PREFIX

from field: ics23.LengthOp length = 4;

prefix: Uint8Array = ...

prefix is a fixed bytes that may optionally be included at the beginning to differentiate a leaf node from an inner node.

from field: bytes prefix = 5;

prehashKey: HashOp = HashOp.NO_HASH

from field: ics23.HashOp prehash_key = 2;

prehashValue: HashOp = HashOp.NO_HASH

from field: ics23.HashOp prehash_value = 3;

fields: FieldList = ...
runtime: ProtoRuntime = proto3
typeName: "ics23.LeafOp" = 'ics23.LeafOp'

Methods