INNER CODE UNIT · Python

init_arrays

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

def init_arrays(key):
    s = textwrap.indent("{\n", 4 * " ")
    s += textwrap.indent(
        ",\n".join(["{ %s }" % hexstr_to_intarray(x) for x in data[key]]), 8 * " "
    )
    s += textwrap.indent("\n},\n", 4 * " ")
    return s


def init_indices(array):
    return " %d, { %s }" % (
        len(array),
        ", ".join(map(str, array) if len(array) > 0 else "0"),
    )


def init_is_xonly(case):
    if len(case["tweak_indices"]) > 0:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…