ComputeTapleafHash

Compute the BIP341 tapleaf hash from leaf version & script.

Synopsis

Declared in <script/interpreter.h>

uint256
ComputeTapleafHash(
    uint8_t leaf_version,
    std::span<unsigned char const> script);

Return Value

The tapleaf hash.

Parameters

NameDescription
leaf_versionThe tapleaf version byte.
scriptThe leaf script.