function getTaprootScripPubkey(tapInternalKey, tapTree) {
  const scriptTree = tapTree && tapTreeFromList(tapTree.leaves);
  const { output } = p2tr({
    internalPubkey: tapInternalKey,
    scriptTree,
  });
  return output;
}
Returns the Taproot script public key.

@param tapInternalKey - The Taproot internal key.
@param tapTree - The Taproot tree (optional).
@returns The Taproot script public key.