def proof_hex2int_list(proof_hex: str) -> List[int]:
"""
Gets a hex string integer and returns it as a 256bits padded list of integer.
This conversion is what's needed in order to send a binary proof
(represented as a HexString) into an EVM deployed verifier.
"""
assert not proof_hex.startswith("0x"), "proof_hex must be without 0x prefix"
chunk_size = 64
padded_proof = proof_hex.ljust(len(proof_hex) + (-len(proof_hex)) % chunk_size, "0")
return [
int(chunk, 16)
for chunk in (
padded_proof[i : i + chunk_size] for i in range(0, len(padded_proof), chunk_size)
)
]
The following proof formats are converted in json to align with the contract interfaces.
Logic for merkle statements
Logic for FRI merkle statements
Logic for main proof conversion