getLayerOffset

Offset of flat node idx within its own layer. From merkle_get_layer_offset.