I'm currently looking into creating some compact Merkle tree branches to prove that a given hash was included in a given Merkle root. My initial thought was to list the leaf, the Merkle root and all of the hashes that the given leaf was combined with to make the Merkle root.
So in this example:
I would state
Leaf: 12c5
Root: 2f9c
Nodes: [d187, a8b5, 1328, d063]
However, since the order of nodes matter for creating the Merkle root, I would also need to list whether the node was on the left or right side.
I'm wondering if is there a canonical way of listing this information to create the Merkle branches?