import json

INPUT_FILE = "qrng_pool.json"
OUTPUT_FILE = "entropy_pool.txt"

def main():
    with open(INPUT_FILE, "r") as f:
        data = json.load(f)

    pool = data["pool"]

    with open(OUTPUT_FILE, "w") as f:
        for value in pool:
            f.write(f"{int(value)}\n")

    print(f"Converted {len(pool)} entries to {OUTPUT_FILE}")

if __name__ == "__main__":
    main()
