InnerSpec contains all store-specific structure info to determine if two proofs from a given store are neighbors.

This enables:

isLeftMost(spec: InnerSpec, op: InnerOp) isRightMost(spec: InnerSpec, op: InnerOp) isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp)

interface InnerSpec {
    childOrder: number[];
    childSize: number;
    emptyChild: Uint8Array;
    hash: HashOp;
    maxPrefixLength: number;
    minPrefixLength: number;
}

Properties

childOrder: number[]

Child order is the ordering of the children node, must count from 0 iavl tree is [0, 1] (left then right) merk is [0, 2, 1] (left, right, here)

childSize: number
emptyChild: Uint8Array

empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0)

hash: HashOp

hash is the algorithm that must be used for each InnerOp

maxPrefixLength: number
minPrefixLength: number