INNER CODE UNIT · Python

init_is_xonly

BlockstreamResearch/secp256k1-zkp · tools/test_vectors_musig2_generate.py:50

def init_is_xonly(case):
    if len(case["tweak_indices"]) > 0:
        return ", ".join(map(lambda x: "1" if x else "0", case["is_xonly"]))
    return "0"


def init_optional_expected(case):
    return hexstr_to_intarray(case["expected"]) if "expected" in case else 0


def init_cases(cases, f):
    s = textwrap.indent("{\n", 4 * " ")
    for (i, case) in enumerate(cases):
        s += textwrap.indent("%s\n" % f(case), 8 * " ")
    s += textwrap.indent("},\n", 4 * " ")
    return s

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…