InnerOp represents a merkle-proof step that is not a leaf. It represents concatenating two children and hashing them to provide the next result.

The result of the previous step is passed in, so the signature of this op is: innerOp(child) -> output

The result of applying InnerOp should be: output = op.hash(op.prefix || child || op.suffix)

where the || operator is concatenation of binary data, and child is the result of hashing all the tree below this step.

Any special data, like prepending child with the length, or prepending the entire operation with some value to differentiate from leaf nodes, should be included in prefix and suffix. If either of prefix or suffix is empty, we just treat it as an empty string

from message ics23.InnerOp

Hierarchy

Constructors

Properties

hash: HashOp = HashOp.NO_HASH

from field: ics23.HashOp hash = 1;

prefix: Uint8Array = ...

from field: bytes prefix = 2;

suffix: Uint8Array = ...

from field: bytes suffix = 3;

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

Methods