pub fn proof(&self, mut index: usize) -> Option<Vec<[u8; 32]>> {
		if self.data.is_empty() {
			// empty tree
			return None;
		}
		if index >= self.data[0].len() {
			// off the end of the leaf row
			return None;
		}

		let mut proof = vec![];
		for i in 0..(self.data.len() - 1) {
			let sibling = if index % 2 == 0 {
				assert!(
					index + 1 < self.data[i].len(),
					"BUG: {} + 1 >= data[{}].len() ({})",
					index,
					i,
					self.data[i].len()
				);
				self.data[i][index + 1]
			} else {
				assert!(index > 0, "BUG: index == 0");
				self.data[i][index - 1]
			};
			proof.push(sibling);
			index >>= 1;
		}

		Some(proof)
	}
Calculate a merkle proof for a transaction, given its index.
This algorithm uses the following insight: the ith bit in the index
tells us which sibling to use (left or right) at the ith level of the
Merkle tree.
* if ith bit of `index` is 0, then use the _right_ sibling at height i
* if ith bit of `index` is 1, then use the _left_ sibling at height i
romeo/src/proof_data.rs