• Computes a tagged hash using the specified prefix and data.

    Parameters

    • prefix:
          | "BIP0340/challenge"
          | "BIP0340/aux"
          | "BIP0340/nonce"
          | "TapLeaf"
          | "TapBranch"
          | "TapSighash"
          | "TapTweak"
          | "KeyAgg list"
          | "KeyAgg coefficient"

      The prefix to use for the tagged hash. This should be one of the values from the TaggedHashPrefix enum.

    • data: Uint8Array

      The data to hash, provided as a Uint8Array.

    Returns Uint8Array

    The resulting tagged hash as a Uint8Array.