Function build_tapbranch

Source
pub fn build_tapbranch(a: u256, b: u256) -> u256
Expand description

Return the SHA256 hash of the following:

  • The hash of the ASCII string TapBranch/elements (32 bytes).
  • The lexicographically smaller of the two inputs (32 bytes).
  • The hash of the ASCII string TapBranch/elements again (32 bytes).
  • The lexicographically larger of the two inputs (32 bytes).

This builds a taproot from two branches.

ยงCost

2563 mWU (milli weight units)