#pragma once #include "serde.hpp" #include "bincode.hpp" namespace Program { struct Witness { uint32_t value; friend bool operator==(const Witness&, const Witness&); std::vector bincodeSerialize() const; static Witness bincodeDeserialize(std::vector); }; struct FunctionInput { Program::Witness witness; uint32_t num_bits; friend bool operator==(const FunctionInput&, const FunctionInput&); std::vector bincodeSerialize() const; static FunctionInput bincodeDeserialize(std::vector); }; struct BlackBoxFuncCall { struct AES128Encrypt { std::vector inputs; std::array iv; std::array key; std::vector outputs; friend bool operator==(const AES128Encrypt&, const AES128Encrypt&); std::vector bincodeSerialize() const; static AES128Encrypt bincodeDeserialize(std::vector); }; struct AND { Program::FunctionInput lhs; Program::FunctionInput rhs; Program::Witness output; friend bool operator==(const AND&, const AND&); std::vector bincodeSerialize() const; static AND bincodeDeserialize(std::vector); }; struct XOR { Program::FunctionInput lhs; Program::FunctionInput rhs; Program::Witness output; friend bool operator==(const XOR&, const XOR&); std::vector bincodeSerialize() const; static XOR bincodeDeserialize(std::vector); }; struct RANGE { Program::FunctionInput input; friend bool operator==(const RANGE&, const RANGE&); std::vector bincodeSerialize() const; static RANGE bincodeDeserialize(std::vector); }; struct SHA256 { std::vector inputs; std::array outputs; friend bool operator==(const SHA256&, const SHA256&); std::vector bincodeSerialize() const; static SHA256 bincodeDeserialize(std::vector); }; struct Blake2s { std::vector inputs; std::array outputs; friend bool operator==(const Blake2s&, const Blake2s&); std::vector bincodeSerialize() const; static Blake2s bincodeDeserialize(std::vector); }; struct Blake3 { std::vector inputs; std::array outputs; friend bool operator==(const Blake3&, const Blake3&); std::vector bincodeSerialize() const; static Blake3 bincodeDeserialize(std::vector); }; struct SchnorrVerify { Program::FunctionInput public_key_x; Program::FunctionInput public_key_y; std::array signature; std::vector message; Program::Witness output; friend bool operator==(const SchnorrVerify&, const SchnorrVerify&); std::vector bincodeSerialize() const; static SchnorrVerify bincodeDeserialize(std::vector); }; struct PedersenCommitment { std::vector inputs; uint32_t domain_separator; std::array outputs; friend bool operator==(const PedersenCommitment&, const PedersenCommitment&); std::vector bincodeSerialize() const; static PedersenCommitment bincodeDeserialize(std::vector); }; struct PedersenHash { std::vector inputs; uint32_t domain_separator; Program::Witness output; friend bool operator==(const PedersenHash&, const PedersenHash&); std::vector bincodeSerialize() const; static PedersenHash bincodeDeserialize(std::vector); }; struct EcdsaSecp256k1 { std::array public_key_x; std::array public_key_y; std::array signature; std::array hashed_message; Program::Witness output; friend bool operator==(const EcdsaSecp256k1&, const EcdsaSecp256k1&); std::vector bincodeSerialize() const; static EcdsaSecp256k1 bincodeDeserialize(std::vector); }; struct EcdsaSecp256r1 { std::array public_key_x; std::array public_key_y; std::array signature; std::array hashed_message; Program::Witness output; friend bool operator==(const EcdsaSecp256r1&, const EcdsaSecp256r1&); std::vector bincodeSerialize() const; static EcdsaSecp256r1 bincodeDeserialize(std::vector); }; struct MultiScalarMul { std::vector points; std::vector scalars; std::array outputs; friend bool operator==(const MultiScalarMul&, const MultiScalarMul&); std::vector bincodeSerialize() const; static MultiScalarMul bincodeDeserialize(std::vector); }; struct EmbeddedCurveAdd { Program::FunctionInput input1_x; Program::FunctionInput input1_y; Program::FunctionInput input2_x; Program::FunctionInput input2_y; std::array outputs; friend bool operator==(const EmbeddedCurveAdd&, const EmbeddedCurveAdd&); std::vector bincodeSerialize() const; static EmbeddedCurveAdd bincodeDeserialize(std::vector); }; struct Keccak256 { std::vector inputs; Program::FunctionInput var_message_size; std::array outputs; friend bool operator==(const Keccak256&, const Keccak256&); std::vector bincodeSerialize() const; static Keccak256 bincodeDeserialize(std::vector); }; struct Keccakf1600 { std::array inputs; std::array outputs; friend bool operator==(const Keccakf1600&, const Keccakf1600&); std::vector bincodeSerialize() const; static Keccakf1600 bincodeDeserialize(std::vector); }; struct RecursiveAggregation { std::vector verification_key; std::vector proof; std::vector public_inputs; Program::FunctionInput key_hash; friend bool operator==(const RecursiveAggregation&, const RecursiveAggregation&); std::vector bincodeSerialize() const; static RecursiveAggregation bincodeDeserialize(std::vector); }; struct BigIntAdd { uint32_t lhs; uint32_t rhs; uint32_t output; friend bool operator==(const BigIntAdd&, const BigIntAdd&); std::vector bincodeSerialize() const; static BigIntAdd bincodeDeserialize(std::vector); }; struct BigIntSub { uint32_t lhs; uint32_t rhs; uint32_t output; friend bool operator==(const BigIntSub&, const BigIntSub&); std::vector bincodeSerialize() const; static BigIntSub bincodeDeserialize(std::vector); }; struct BigIntMul { uint32_t lhs; uint32_t rhs; uint32_t output; friend bool operator==(const BigIntMul&, const BigIntMul&); std::vector bincodeSerialize() const; static BigIntMul bincodeDeserialize(std::vector); }; struct BigIntDiv { uint32_t lhs; uint32_t rhs; uint32_t output; friend bool operator==(const BigIntDiv&, const BigIntDiv&); std::vector bincodeSerialize() const; static BigIntDiv bincodeDeserialize(std::vector); }; struct BigIntFromLeBytes { std::vector inputs; std::vector modulus; uint32_t output; friend bool operator==(const BigIntFromLeBytes&, const BigIntFromLeBytes&); std::vector bincodeSerialize() const; static BigIntFromLeBytes bincodeDeserialize(std::vector); }; struct BigIntToLeBytes { uint32_t input; std::vector outputs; friend bool operator==(const BigIntToLeBytes&, const BigIntToLeBytes&); std::vector bincodeSerialize() const; static BigIntToLeBytes bincodeDeserialize(std::vector); }; struct Poseidon2Permutation { std::vector inputs; std::vector outputs; uint32_t len; friend bool operator==(const Poseidon2Permutation&, const Poseidon2Permutation&); std::vector bincodeSerialize() const; static Poseidon2Permutation bincodeDeserialize(std::vector); }; struct Sha256Compression { std::array inputs; std::array hash_values; std::array outputs; friend bool operator==(const Sha256Compression&, const Sha256Compression&); std::vector bincodeSerialize() const; static Sha256Compression bincodeDeserialize(std::vector); }; std::variant value; friend bool operator==(const BlackBoxFuncCall&, const BlackBoxFuncCall&); std::vector bincodeSerialize() const; static BlackBoxFuncCall bincodeDeserialize(std::vector); }; struct BlockId { uint32_t value; friend bool operator==(const BlockId&, const BlockId&); std::vector bincodeSerialize() const; static BlockId bincodeDeserialize(std::vector); }; struct Expression { std::vector> mul_terms; std::vector> linear_combinations; std::string q_c; friend bool operator==(const Expression&, const Expression&); std::vector bincodeSerialize() const; static Expression bincodeDeserialize(std::vector); }; struct BrilligInputs { struct Single { Program::Expression value; friend bool operator==(const Single&, const Single&); std::vector bincodeSerialize() const; static Single bincodeDeserialize(std::vector); }; struct Array { std::vector value; friend bool operator==(const Array&, const Array&); std::vector bincodeSerialize() const; static Array bincodeDeserialize(std::vector); }; struct MemoryArray { Program::BlockId value; friend bool operator==(const MemoryArray&, const MemoryArray&); std::vector bincodeSerialize() const; static MemoryArray bincodeDeserialize(std::vector); }; std::variant value; friend bool operator==(const BrilligInputs&, const BrilligInputs&); std::vector bincodeSerialize() const; static BrilligInputs bincodeDeserialize(std::vector); }; struct BrilligOutputs { struct Simple { Program::Witness value; friend bool operator==(const Simple&, const Simple&); std::vector bincodeSerialize() const; static Simple bincodeDeserialize(std::vector); }; struct Array { std::vector value; friend bool operator==(const Array&, const Array&); std::vector bincodeSerialize() const; static Array bincodeDeserialize(std::vector); }; std::variant value; friend bool operator==(const BrilligOutputs&, const BrilligOutputs&); std::vector bincodeSerialize() const; static BrilligOutputs bincodeDeserialize(std::vector); }; struct Directive { struct ToLeRadix { Program::Expression a; std::vector b; uint32_t radix; friend bool operator==(const ToLeRadix&, const ToLeRadix&); std::vector bincodeSerialize() const; static ToLeRadix bincodeDeserialize(std::vector); }; std::variant value; friend bool operator==(const Directive&, const Directive&); std::vector bincodeSerialize() const; static Directive bincodeDeserialize(std::vector); }; struct MemOp { Program::Expression operation; Program::Expression index; Program::Expression value; friend bool operator==(const MemOp&, const MemOp&); std::vector bincodeSerialize() const; static MemOp bincodeDeserialize(std::vector); }; struct Opcode { struct AssertZero { Program::Expression value; friend bool operator==(const AssertZero&, const AssertZero&); std::vector bincodeSerialize() const; static AssertZero bincodeDeserialize(std::vector); }; struct BlackBoxFuncCall { Program::BlackBoxFuncCall value; friend bool operator==(const BlackBoxFuncCall&, const BlackBoxFuncCall&); std::vector bincodeSerialize() const; static BlackBoxFuncCall bincodeDeserialize(std::vector); }; struct Directive { Program::Directive value; friend bool operator==(const Directive&, const Directive&); std::vector bincodeSerialize() const; static Directive bincodeDeserialize(std::vector); }; struct MemoryOp { Program::BlockId block_id; Program::MemOp op; std::optional predicate; friend bool operator==(const MemoryOp&, const MemoryOp&); std::vector bincodeSerialize() const; static MemoryOp bincodeDeserialize(std::vector); }; struct MemoryInit { Program::BlockId block_id; std::vector init; friend bool operator==(const MemoryInit&, const MemoryInit&); std::vector bincodeSerialize() const; static MemoryInit bincodeDeserialize(std::vector); }; struct BrilligCall { uint32_t id; std::vector inputs; std::vector outputs; std::optional predicate; friend bool operator==(const BrilligCall&, const BrilligCall&); std::vector bincodeSerialize() const; static BrilligCall bincodeDeserialize(std::vector); }; struct Call { uint32_t id; std::vector inputs; std::vector outputs; std::optional predicate; friend bool operator==(const Call&, const Call&); std::vector bincodeSerialize() const; static Call bincodeDeserialize(std::vector); }; std::variant value; friend bool operator==(const Opcode&, const Opcode&); std::vector bincodeSerialize() const; static Opcode bincodeDeserialize(std::vector); }; struct BinaryFieldOp { struct Add { friend bool operator==(const Add&, const Add&); std::vector bincodeSerialize() const; static Add bincodeDeserialize(std::vector); }; struct Sub { friend bool operator==(const Sub&, const Sub&); std::vector bincodeSerialize() const; static Sub bincodeDeserialize(std::vector); }; struct Mul { friend bool operator==(const Mul&, const Mul&); std::vector bincodeSerialize() const; static Mul bincodeDeserialize(std::vector); }; struct Div { friend bool operator==(const Div&, const Div&); std::vector bincodeSerialize() const; static Div bincodeDeserialize(std::vector); }; struct IntegerDiv { friend bool operator==(const IntegerDiv&, const IntegerDiv&); std::vector bincodeSerialize() const; static IntegerDiv bincodeDeserialize(std::vector); }; struct Equals { friend bool operator==(const Equals&, const Equals&); std::vector bincodeSerialize() const; static Equals bincodeDeserialize(std::vector); }; struct LessThan { friend bool operator==(const LessThan&, const LessThan&); std::vector bincodeSerialize() const; static LessThan bincodeDeserialize(std::vector); }; struct LessThanEquals { friend bool operator==(const LessThanEquals&, const LessThanEquals&); std::vector bincodeSerialize() const; static LessThanEquals bincodeDeserialize(std::vector); }; std::variant value; friend bool operator==(const BinaryFieldOp&, const BinaryFieldOp&); std::vector bincodeSerialize() const; static BinaryFieldOp bincodeDeserialize(std::vector); }; struct BinaryIntOp { struct Add { friend bool operator==(const Add&, const Add&); std::vector bincodeSerialize() const; static Add bincodeDeserialize(std::vector); }; struct Sub { friend bool operator==(const Sub&, const Sub&); std::vector bincodeSerialize() const; static Sub bincodeDeserialize(std::vector); }; struct Mul { friend bool operator==(const Mul&, const Mul&); std::vector bincodeSerialize() const; static Mul bincodeDeserialize(std::vector); }; struct Div { friend bool operator==(const Div&, const Div&); std::vector bincodeSerialize() const; static Div bincodeDeserialize(std::vector); }; struct Equals { friend bool operator==(const Equals&, const Equals&); std::vector bincodeSerialize() const; static Equals bincodeDeserialize(std::vector); }; struct LessThan { friend bool operator==(const LessThan&, const LessThan&); std::vector bincodeSerialize() const; static LessThan bincodeDeserialize(std::vector); }; struct LessThanEquals { friend bool operator==(const LessThanEquals&, const LessThanEquals&); std::vector bincodeSerialize() const; static LessThanEquals bincodeDeserialize(std::vector); }; struct And { friend bool operator==(const And&, const And&); std::vector bincodeSerialize() const; static And bincodeDeserialize(std::vector); }; struct Or { friend bool operator==(const Or&, const Or&); std::vector bincodeSerialize() const; static Or bincodeDeserialize(std::vector); }; struct Xor { friend bool operator==(const Xor&, const Xor&); std::vector bincodeSerialize() const; static Xor bincodeDeserialize(std::vector); }; struct Shl { friend bool operator==(const Shl&, const Shl&); std::vector bincodeSerialize() const; static Shl bincodeDeserialize(std::vector); }; struct Shr { friend bool operator==(const Shr&, const Shr&); std::vector bincodeSerialize() const; static Shr bincodeDeserialize(std::vector); }; std::variant value; friend bool operator==(const BinaryIntOp&, const BinaryIntOp&); std::vector bincodeSerialize() const; static BinaryIntOp bincodeDeserialize(std::vector); }; struct MemoryAddress { uint64_t value; friend bool operator==(const MemoryAddress&, const MemoryAddress&); std::vector bincodeSerialize() const; static MemoryAddress bincodeDeserialize(std::vector); }; struct HeapArray { Program::MemoryAddress pointer; uint64_t size; friend bool operator==(const HeapArray&, const HeapArray&); std::vector bincodeSerialize() const; static HeapArray bincodeDeserialize(std::vector); }; struct HeapVector { Program::MemoryAddress pointer; Program::MemoryAddress size; friend bool operator==(const HeapVector&, const HeapVector&); std::vector bincodeSerialize() const; static HeapVector bincodeDeserialize(std::vector); }; struct BlackBoxOp { struct AES128Encrypt { Program::HeapVector inputs; Program::HeapArray iv; Program::HeapArray key; Program::HeapVector outputs; friend bool operator==(const AES128Encrypt&, const AES128Encrypt&); std::vector bincodeSerialize() const; static AES128Encrypt bincodeDeserialize(std::vector); }; struct Sha256 { Program::HeapVector message; Program::HeapArray output; friend bool operator==(const Sha256&, const Sha256&); std::vector bincodeSerialize() const; static Sha256 bincodeDeserialize(std::vector); }; struct Blake2s { Program::HeapVector message; Program::HeapArray output; friend bool operator==(const Blake2s&, const Blake2s&); std::vector bincodeSerialize() const; static Blake2s bincodeDeserialize(std::vector); }; struct Blake3 { Program::HeapVector message; Program::HeapArray output; friend bool operator==(const Blake3&, const Blake3&); std::vector bincodeSerialize() const; static Blake3 bincodeDeserialize(std::vector); }; struct Keccak256 { Program::HeapVector message; Program::HeapArray output; friend bool operator==(const Keccak256&, const Keccak256&); std::vector bincodeSerialize() const; static Keccak256 bincodeDeserialize(std::vector); }; struct Keccakf1600 { Program::HeapVector message; Program::HeapArray output; friend bool operator==(const Keccakf1600&, const Keccakf1600&); std::vector bincodeSerialize() const; static Keccakf1600 bincodeDeserialize(std::vector); }; struct EcdsaSecp256k1 { Program::HeapVector hashed_msg; Program::HeapArray public_key_x; Program::HeapArray public_key_y; Program::HeapArray signature; Program::MemoryAddress result; friend bool operator==(const EcdsaSecp256k1&, const EcdsaSecp256k1&); std::vector bincodeSerialize() const; static EcdsaSecp256k1 bincodeDeserialize(std::vector); }; struct EcdsaSecp256r1 { Program::HeapVector hashed_msg; Program::HeapArray public_key_x; Program::HeapArray public_key_y; Program::HeapArray signature; Program::MemoryAddress result; friend bool operator==(const EcdsaSecp256r1&, const EcdsaSecp256r1&); std::vector bincodeSerialize() const; static EcdsaSecp256r1 bincodeDeserialize(std::vector); }; struct SchnorrVerify { Program::MemoryAddress public_key_x; Program::MemoryAddress public_key_y; Program::HeapVector message; Program::HeapVector signature; Program::MemoryAddress result; friend bool operator==(const SchnorrVerify&, const SchnorrVerify&); std::vector bincodeSerialize() const; static SchnorrVerify bincodeDeserialize(std::vector); }; struct PedersenCommitment { Program::HeapVector inputs; Program::MemoryAddress domain_separator; Program::HeapArray output; friend bool operator==(const PedersenCommitment&, const PedersenCommitment&); std::vector bincodeSerialize() const; static PedersenCommitment bincodeDeserialize(std::vector); }; struct PedersenHash { Program::HeapVector inputs; Program::MemoryAddress domain_separator; Program::MemoryAddress output; friend bool operator==(const PedersenHash&, const PedersenHash&); std::vector bincodeSerialize() const; static PedersenHash bincodeDeserialize(std::vector); }; struct MultiScalarMul { Program::HeapVector points; Program::HeapVector scalars; Program::HeapArray outputs; friend bool operator==(const MultiScalarMul&, const MultiScalarMul&); std::vector bincodeSerialize() const; static MultiScalarMul bincodeDeserialize(std::vector); }; struct EmbeddedCurveAdd { Program::MemoryAddress input1_x; Program::MemoryAddress input1_y; Program::MemoryAddress input2_x; Program::MemoryAddress input2_y; Program::HeapArray result; friend bool operator==(const EmbeddedCurveAdd&, const EmbeddedCurveAdd&); std::vector bincodeSerialize() const; static EmbeddedCurveAdd bincodeDeserialize(std::vector); }; struct BigIntAdd { Program::MemoryAddress lhs; Program::MemoryAddress rhs; Program::MemoryAddress output; friend bool operator==(const BigIntAdd&, const BigIntAdd&); std::vector bincodeSerialize() const; static BigIntAdd bincodeDeserialize(std::vector); }; struct BigIntSub { Program::MemoryAddress lhs; Program::MemoryAddress rhs; Program::MemoryAddress output; friend bool operator==(const BigIntSub&, const BigIntSub&); std::vector bincodeSerialize() const; static BigIntSub bincodeDeserialize(std::vector); }; struct BigIntMul { Program::MemoryAddress lhs; Program::MemoryAddress rhs; Program::MemoryAddress output; friend bool operator==(const BigIntMul&, const BigIntMul&); std::vector bincodeSerialize() const; static BigIntMul bincodeDeserialize(std::vector); }; struct BigIntDiv { Program::MemoryAddress lhs; Program::MemoryAddress rhs; Program::MemoryAddress output; friend bool operator==(const BigIntDiv&, const BigIntDiv&); std::vector bincodeSerialize() const; static BigIntDiv bincodeDeserialize(std::vector); }; struct BigIntFromLeBytes { Program::HeapVector inputs; Program::HeapVector modulus; Program::MemoryAddress output; friend bool operator==(const BigIntFromLeBytes&, const BigIntFromLeBytes&); std::vector bincodeSerialize() const; static BigIntFromLeBytes bincodeDeserialize(std::vector); }; struct BigIntToLeBytes { Program::MemoryAddress input; Program::HeapVector output; friend bool operator==(const BigIntToLeBytes&, const BigIntToLeBytes&); std::vector bincodeSerialize() const; static BigIntToLeBytes bincodeDeserialize(std::vector); }; struct Poseidon2Permutation { Program::HeapVector message; Program::HeapArray output; Program::MemoryAddress len; friend bool operator==(const Poseidon2Permutation&, const Poseidon2Permutation&); std::vector bincodeSerialize() const; static Poseidon2Permutation bincodeDeserialize(std::vector); }; struct Sha256Compression { Program::HeapVector input; Program::HeapVector hash_values; Program::HeapArray output; friend bool operator==(const Sha256Compression&, const Sha256Compression&); std::vector bincodeSerialize() const; static Sha256Compression bincodeDeserialize(std::vector); }; std::variant value; friend bool operator==(const BlackBoxOp&, const BlackBoxOp&); std::vector bincodeSerialize() const; static BlackBoxOp bincodeDeserialize(std::vector); }; struct HeapValueType; struct HeapValueType { struct Simple { uint32_t value; friend bool operator==(const Simple&, const Simple&); std::vector bincodeSerialize() const; static Simple bincodeDeserialize(std::vector); }; struct Array { std::vector value_types; uint64_t size; friend bool operator==(const Array&, const Array&); std::vector bincodeSerialize() const; static Array bincodeDeserialize(std::vector); }; struct Vector { std::vector value_types; friend bool operator==(const Vector&, const Vector&); std::vector bincodeSerialize() const; static Vector bincodeDeserialize(std::vector); }; std::variant value; friend bool operator==(const HeapValueType&, const HeapValueType&); std::vector bincodeSerialize() const; static HeapValueType bincodeDeserialize(std::vector); }; struct ValueOrArray { struct MemoryAddress { Program::MemoryAddress value; friend bool operator==(const MemoryAddress&, const MemoryAddress&); std::vector bincodeSerialize() const; static MemoryAddress bincodeDeserialize(std::vector); }; struct HeapArray { Program::HeapArray value; friend bool operator==(const HeapArray&, const HeapArray&); std::vector bincodeSerialize() const; static HeapArray bincodeDeserialize(std::vector); }; struct HeapVector { Program::HeapVector value; friend bool operator==(const HeapVector&, const HeapVector&); std::vector bincodeSerialize() const; static HeapVector bincodeDeserialize(std::vector); }; std::variant value; friend bool operator==(const ValueOrArray&, const ValueOrArray&); std::vector bincodeSerialize() const; static ValueOrArray bincodeDeserialize(std::vector); }; struct BrilligOpcode { struct BinaryFieldOp { Program::MemoryAddress destination; Program::BinaryFieldOp op; Program::MemoryAddress lhs; Program::MemoryAddress rhs; friend bool operator==(const BinaryFieldOp&, const BinaryFieldOp&); std::vector bincodeSerialize() const; static BinaryFieldOp bincodeDeserialize(std::vector); }; struct BinaryIntOp { Program::MemoryAddress destination; Program::BinaryIntOp op; uint32_t bit_size; Program::MemoryAddress lhs; Program::MemoryAddress rhs; friend bool operator==(const BinaryIntOp&, const BinaryIntOp&); std::vector bincodeSerialize() const; static BinaryIntOp bincodeDeserialize(std::vector); }; struct Cast { Program::MemoryAddress destination; Program::MemoryAddress source; uint32_t bit_size; friend bool operator==(const Cast&, const Cast&); std::vector bincodeSerialize() const; static Cast bincodeDeserialize(std::vector); }; struct JumpIfNot { Program::MemoryAddress condition; uint64_t location; friend bool operator==(const JumpIfNot&, const JumpIfNot&); std::vector bincodeSerialize() const; static JumpIfNot bincodeDeserialize(std::vector); }; struct JumpIf { Program::MemoryAddress condition; uint64_t location; friend bool operator==(const JumpIf&, const JumpIf&); std::vector bincodeSerialize() const; static JumpIf bincodeDeserialize(std::vector); }; struct Jump { uint64_t location; friend bool operator==(const Jump&, const Jump&); std::vector bincodeSerialize() const; static Jump bincodeDeserialize(std::vector); }; struct CalldataCopy { Program::MemoryAddress destination_address; uint64_t size; uint64_t offset; friend bool operator==(const CalldataCopy&, const CalldataCopy&); std::vector bincodeSerialize() const; static CalldataCopy bincodeDeserialize(std::vector); }; struct Call { uint64_t location; friend bool operator==(const Call&, const Call&); std::vector bincodeSerialize() const; static Call bincodeDeserialize(std::vector); }; struct Const { Program::MemoryAddress destination; uint32_t bit_size; std::string value; friend bool operator==(const Const&, const Const&); std::vector bincodeSerialize() const; static Const bincodeDeserialize(std::vector); }; struct Return { friend bool operator==(const Return&, const Return&); std::vector bincodeSerialize() const; static Return bincodeDeserialize(std::vector); }; struct ForeignCall { std::string function; std::vector destinations; std::vector destination_value_types; std::vector inputs; std::vector input_value_types; friend bool operator==(const ForeignCall&, const ForeignCall&); std::vector bincodeSerialize() const; static ForeignCall bincodeDeserialize(std::vector); }; struct Mov { Program::MemoryAddress destination; Program::MemoryAddress source; friend bool operator==(const Mov&, const Mov&); std::vector bincodeSerialize() const; static Mov bincodeDeserialize(std::vector); }; struct ConditionalMov { Program::MemoryAddress destination; Program::MemoryAddress source_a; Program::MemoryAddress source_b; Program::MemoryAddress condition; friend bool operator==(const ConditionalMov&, const ConditionalMov&); std::vector bincodeSerialize() const; static ConditionalMov bincodeDeserialize(std::vector); }; struct Load { Program::MemoryAddress destination; Program::MemoryAddress source_pointer; friend bool operator==(const Load&, const Load&); std::vector bincodeSerialize() const; static Load bincodeDeserialize(std::vector); }; struct Store { Program::MemoryAddress destination_pointer; Program::MemoryAddress source; friend bool operator==(const Store&, const Store&); std::vector bincodeSerialize() const; static Store bincodeDeserialize(std::vector); }; struct BlackBox { Program::BlackBoxOp value; friend bool operator==(const BlackBox&, const BlackBox&); std::vector bincodeSerialize() const; static BlackBox bincodeDeserialize(std::vector); }; struct Trap { Program::HeapArray revert_data; friend bool operator==(const Trap&, const Trap&); std::vector bincodeSerialize() const; static Trap bincodeDeserialize(std::vector); }; struct Stop { uint64_t return_data_offset; uint64_t return_data_size; friend bool operator==(const Stop&, const Stop&); std::vector bincodeSerialize() const; static Stop bincodeDeserialize(std::vector); }; std::variant value; friend bool operator==(const BrilligOpcode&, const BrilligOpcode&); std::vector bincodeSerialize() const; static BrilligOpcode bincodeDeserialize(std::vector); }; struct ExpressionOrMemory { struct Expression { Program::Expression value; friend bool operator==(const Expression&, const Expression&); std::vector bincodeSerialize() const; static Expression bincodeDeserialize(std::vector); }; struct Memory { Program::BlockId value; friend bool operator==(const Memory&, const Memory&); std::vector bincodeSerialize() const; static Memory bincodeDeserialize(std::vector); }; std::variant value; friend bool operator==(const ExpressionOrMemory&, const ExpressionOrMemory&); std::vector bincodeSerialize() const; static ExpressionOrMemory bincodeDeserialize(std::vector); }; struct AssertionPayload { struct StaticString { std::string value; friend bool operator==(const StaticString&, const StaticString&); std::vector bincodeSerialize() const; static StaticString bincodeDeserialize(std::vector); }; struct Dynamic { std::tuple> value; friend bool operator==(const Dynamic&, const Dynamic&); std::vector bincodeSerialize() const; static Dynamic bincodeDeserialize(std::vector); }; std::variant value; friend bool operator==(const AssertionPayload&, const AssertionPayload&); std::vector bincodeSerialize() const; static AssertionPayload bincodeDeserialize(std::vector); }; struct ExpressionWidth { struct Unbounded { friend bool operator==(const Unbounded&, const Unbounded&); std::vector bincodeSerialize() const; static Unbounded bincodeDeserialize(std::vector); }; struct Bounded { uint64_t width; friend bool operator==(const Bounded&, const Bounded&); std::vector bincodeSerialize() const; static Bounded bincodeDeserialize(std::vector); }; std::variant value; friend bool operator==(const ExpressionWidth&, const ExpressionWidth&); std::vector bincodeSerialize() const; static ExpressionWidth bincodeDeserialize(std::vector); }; struct OpcodeLocation { struct Acir { uint64_t value; friend bool operator==(const Acir&, const Acir&); std::vector bincodeSerialize() const; static Acir bincodeDeserialize(std::vector); }; struct Brillig { uint64_t acir_index; uint64_t brillig_index; friend bool operator==(const Brillig&, const Brillig&); std::vector bincodeSerialize() const; static Brillig bincodeDeserialize(std::vector); }; std::variant value; friend bool operator==(const OpcodeLocation&, const OpcodeLocation&); std::vector bincodeSerialize() const; static OpcodeLocation bincodeDeserialize(std::vector); }; struct PublicInputs { std::vector value; friend bool operator==(const PublicInputs&, const PublicInputs&); std::vector bincodeSerialize() const; static PublicInputs bincodeDeserialize(std::vector); }; struct Circuit { uint32_t current_witness_index; std::vector opcodes; Program::ExpressionWidth expression_width; std::vector private_parameters; Program::PublicInputs public_parameters; Program::PublicInputs return_values; std::vector> assert_messages; bool recursive; friend bool operator==(const Circuit&, const Circuit&); std::vector bincodeSerialize() const; static Circuit bincodeDeserialize(std::vector); }; struct BrilligBytecode { std::vector bytecode; friend bool operator==(const BrilligBytecode&, const BrilligBytecode&); std::vector bincodeSerialize() const; static BrilligBytecode bincodeDeserialize(std::vector); }; struct Program { std::vector functions; std::vector unconstrained_functions; friend bool operator==(const Program&, const Program&); std::vector bincodeSerialize() const; static Program bincodeDeserialize(std::vector); }; } // end of namespace Program namespace Program { inline bool operator==(const AssertionPayload &lhs, const AssertionPayload &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector AssertionPayload::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline AssertionPayload AssertionPayload::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::AssertionPayload &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::AssertionPayload serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::AssertionPayload obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const AssertionPayload::StaticString &lhs, const AssertionPayload::StaticString &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector AssertionPayload::StaticString::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline AssertionPayload::StaticString AssertionPayload::StaticString::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::AssertionPayload::StaticString &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value, serializer); } template <> template Program::AssertionPayload::StaticString serde::Deserializable::deserialize(Deserializer &deserializer) { Program::AssertionPayload::StaticString obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const AssertionPayload::Dynamic &lhs, const AssertionPayload::Dynamic &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector AssertionPayload::Dynamic::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline AssertionPayload::Dynamic AssertionPayload::Dynamic::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::AssertionPayload::Dynamic &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value, serializer); } template <> template Program::AssertionPayload::Dynamic serde::Deserializable::deserialize(Deserializer &deserializer) { Program::AssertionPayload::Dynamic obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BinaryFieldOp &lhs, const BinaryFieldOp &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector BinaryFieldOp::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryFieldOp BinaryFieldOp::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryFieldOp &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::BinaryFieldOp serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::BinaryFieldOp obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const BinaryFieldOp::Add &lhs, const BinaryFieldOp::Add &rhs) { return true; } inline std::vector BinaryFieldOp::Add::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryFieldOp::Add BinaryFieldOp::Add::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryFieldOp::Add &obj, Serializer &serializer) { } template <> template Program::BinaryFieldOp::Add serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryFieldOp::Add obj; return obj; } namespace Program { inline bool operator==(const BinaryFieldOp::Sub &lhs, const BinaryFieldOp::Sub &rhs) { return true; } inline std::vector BinaryFieldOp::Sub::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryFieldOp::Sub BinaryFieldOp::Sub::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryFieldOp::Sub &obj, Serializer &serializer) { } template <> template Program::BinaryFieldOp::Sub serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryFieldOp::Sub obj; return obj; } namespace Program { inline bool operator==(const BinaryFieldOp::Mul &lhs, const BinaryFieldOp::Mul &rhs) { return true; } inline std::vector BinaryFieldOp::Mul::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryFieldOp::Mul BinaryFieldOp::Mul::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryFieldOp::Mul &obj, Serializer &serializer) { } template <> template Program::BinaryFieldOp::Mul serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryFieldOp::Mul obj; return obj; } namespace Program { inline bool operator==(const BinaryFieldOp::Div &lhs, const BinaryFieldOp::Div &rhs) { return true; } inline std::vector BinaryFieldOp::Div::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryFieldOp::Div BinaryFieldOp::Div::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryFieldOp::Div &obj, Serializer &serializer) { } template <> template Program::BinaryFieldOp::Div serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryFieldOp::Div obj; return obj; } namespace Program { inline bool operator==(const BinaryFieldOp::IntegerDiv &lhs, const BinaryFieldOp::IntegerDiv &rhs) { return true; } inline std::vector BinaryFieldOp::IntegerDiv::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryFieldOp::IntegerDiv BinaryFieldOp::IntegerDiv::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryFieldOp::IntegerDiv &obj, Serializer &serializer) { } template <> template Program::BinaryFieldOp::IntegerDiv serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryFieldOp::IntegerDiv obj; return obj; } namespace Program { inline bool operator==(const BinaryFieldOp::Equals &lhs, const BinaryFieldOp::Equals &rhs) { return true; } inline std::vector BinaryFieldOp::Equals::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryFieldOp::Equals BinaryFieldOp::Equals::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryFieldOp::Equals &obj, Serializer &serializer) { } template <> template Program::BinaryFieldOp::Equals serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryFieldOp::Equals obj; return obj; } namespace Program { inline bool operator==(const BinaryFieldOp::LessThan &lhs, const BinaryFieldOp::LessThan &rhs) { return true; } inline std::vector BinaryFieldOp::LessThan::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryFieldOp::LessThan BinaryFieldOp::LessThan::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryFieldOp::LessThan &obj, Serializer &serializer) { } template <> template Program::BinaryFieldOp::LessThan serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryFieldOp::LessThan obj; return obj; } namespace Program { inline bool operator==(const BinaryFieldOp::LessThanEquals &lhs, const BinaryFieldOp::LessThanEquals &rhs) { return true; } inline std::vector BinaryFieldOp::LessThanEquals::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryFieldOp::LessThanEquals BinaryFieldOp::LessThanEquals::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryFieldOp::LessThanEquals &obj, Serializer &serializer) { } template <> template Program::BinaryFieldOp::LessThanEquals serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryFieldOp::LessThanEquals obj; return obj; } namespace Program { inline bool operator==(const BinaryIntOp &lhs, const BinaryIntOp &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector BinaryIntOp::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryIntOp BinaryIntOp::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryIntOp &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::BinaryIntOp serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::BinaryIntOp obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const BinaryIntOp::Add &lhs, const BinaryIntOp::Add &rhs) { return true; } inline std::vector BinaryIntOp::Add::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryIntOp::Add BinaryIntOp::Add::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryIntOp::Add &obj, Serializer &serializer) { } template <> template Program::BinaryIntOp::Add serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryIntOp::Add obj; return obj; } namespace Program { inline bool operator==(const BinaryIntOp::Sub &lhs, const BinaryIntOp::Sub &rhs) { return true; } inline std::vector BinaryIntOp::Sub::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryIntOp::Sub BinaryIntOp::Sub::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryIntOp::Sub &obj, Serializer &serializer) { } template <> template Program::BinaryIntOp::Sub serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryIntOp::Sub obj; return obj; } namespace Program { inline bool operator==(const BinaryIntOp::Mul &lhs, const BinaryIntOp::Mul &rhs) { return true; } inline std::vector BinaryIntOp::Mul::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryIntOp::Mul BinaryIntOp::Mul::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryIntOp::Mul &obj, Serializer &serializer) { } template <> template Program::BinaryIntOp::Mul serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryIntOp::Mul obj; return obj; } namespace Program { inline bool operator==(const BinaryIntOp::Div &lhs, const BinaryIntOp::Div &rhs) { return true; } inline std::vector BinaryIntOp::Div::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryIntOp::Div BinaryIntOp::Div::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryIntOp::Div &obj, Serializer &serializer) { } template <> template Program::BinaryIntOp::Div serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryIntOp::Div obj; return obj; } namespace Program { inline bool operator==(const BinaryIntOp::Equals &lhs, const BinaryIntOp::Equals &rhs) { return true; } inline std::vector BinaryIntOp::Equals::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryIntOp::Equals BinaryIntOp::Equals::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryIntOp::Equals &obj, Serializer &serializer) { } template <> template Program::BinaryIntOp::Equals serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryIntOp::Equals obj; return obj; } namespace Program { inline bool operator==(const BinaryIntOp::LessThan &lhs, const BinaryIntOp::LessThan &rhs) { return true; } inline std::vector BinaryIntOp::LessThan::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryIntOp::LessThan BinaryIntOp::LessThan::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryIntOp::LessThan &obj, Serializer &serializer) { } template <> template Program::BinaryIntOp::LessThan serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryIntOp::LessThan obj; return obj; } namespace Program { inline bool operator==(const BinaryIntOp::LessThanEquals &lhs, const BinaryIntOp::LessThanEquals &rhs) { return true; } inline std::vector BinaryIntOp::LessThanEquals::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryIntOp::LessThanEquals BinaryIntOp::LessThanEquals::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryIntOp::LessThanEquals &obj, Serializer &serializer) { } template <> template Program::BinaryIntOp::LessThanEquals serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryIntOp::LessThanEquals obj; return obj; } namespace Program { inline bool operator==(const BinaryIntOp::And &lhs, const BinaryIntOp::And &rhs) { return true; } inline std::vector BinaryIntOp::And::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryIntOp::And BinaryIntOp::And::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryIntOp::And &obj, Serializer &serializer) { } template <> template Program::BinaryIntOp::And serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryIntOp::And obj; return obj; } namespace Program { inline bool operator==(const BinaryIntOp::Or &lhs, const BinaryIntOp::Or &rhs) { return true; } inline std::vector BinaryIntOp::Or::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryIntOp::Or BinaryIntOp::Or::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryIntOp::Or &obj, Serializer &serializer) { } template <> template Program::BinaryIntOp::Or serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryIntOp::Or obj; return obj; } namespace Program { inline bool operator==(const BinaryIntOp::Xor &lhs, const BinaryIntOp::Xor &rhs) { return true; } inline std::vector BinaryIntOp::Xor::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryIntOp::Xor BinaryIntOp::Xor::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryIntOp::Xor &obj, Serializer &serializer) { } template <> template Program::BinaryIntOp::Xor serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryIntOp::Xor obj; return obj; } namespace Program { inline bool operator==(const BinaryIntOp::Shl &lhs, const BinaryIntOp::Shl &rhs) { return true; } inline std::vector BinaryIntOp::Shl::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryIntOp::Shl BinaryIntOp::Shl::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryIntOp::Shl &obj, Serializer &serializer) { } template <> template Program::BinaryIntOp::Shl serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryIntOp::Shl obj; return obj; } namespace Program { inline bool operator==(const BinaryIntOp::Shr &lhs, const BinaryIntOp::Shr &rhs) { return true; } inline std::vector BinaryIntOp::Shr::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BinaryIntOp::Shr BinaryIntOp::Shr::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BinaryIntOp::Shr &obj, Serializer &serializer) { } template <> template Program::BinaryIntOp::Shr serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BinaryIntOp::Shr obj; return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall &lhs, const BlackBoxFuncCall &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector BlackBoxFuncCall::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall BlackBoxFuncCall::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::BlackBoxFuncCall serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::BlackBoxFuncCall obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::AES128Encrypt &lhs, const BlackBoxFuncCall::AES128Encrypt &rhs) { if (!(lhs.inputs == rhs.inputs)) { return false; } if (!(lhs.iv == rhs.iv)) { return false; } if (!(lhs.key == rhs.key)) { return false; } if (!(lhs.outputs == rhs.outputs)) { return false; } return true; } inline std::vector BlackBoxFuncCall::AES128Encrypt::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::AES128Encrypt BlackBoxFuncCall::AES128Encrypt::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::AES128Encrypt &obj, Serializer &serializer) { serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.iv, serializer); serde::Serializable::serialize(obj.key, serializer); serde::Serializable::serialize(obj.outputs, serializer); } template <> template Program::BlackBoxFuncCall::AES128Encrypt serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::AES128Encrypt obj; obj.inputs = serde::Deserializable::deserialize(deserializer); obj.iv = serde::Deserializable::deserialize(deserializer); obj.key = serde::Deserializable::deserialize(deserializer); obj.outputs = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::AND &lhs, const BlackBoxFuncCall::AND &rhs) { if (!(lhs.lhs == rhs.lhs)) { return false; } if (!(lhs.rhs == rhs.rhs)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxFuncCall::AND::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::AND BlackBoxFuncCall::AND::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::AND &obj, Serializer &serializer) { serde::Serializable::serialize(obj.lhs, serializer); serde::Serializable::serialize(obj.rhs, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxFuncCall::AND serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::AND obj; obj.lhs = serde::Deserializable::deserialize(deserializer); obj.rhs = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::XOR &lhs, const BlackBoxFuncCall::XOR &rhs) { if (!(lhs.lhs == rhs.lhs)) { return false; } if (!(lhs.rhs == rhs.rhs)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxFuncCall::XOR::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::XOR BlackBoxFuncCall::XOR::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::XOR &obj, Serializer &serializer) { serde::Serializable::serialize(obj.lhs, serializer); serde::Serializable::serialize(obj.rhs, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxFuncCall::XOR serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::XOR obj; obj.lhs = serde::Deserializable::deserialize(deserializer); obj.rhs = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::RANGE &lhs, const BlackBoxFuncCall::RANGE &rhs) { if (!(lhs.input == rhs.input)) { return false; } return true; } inline std::vector BlackBoxFuncCall::RANGE::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::RANGE BlackBoxFuncCall::RANGE::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::RANGE &obj, Serializer &serializer) { serde::Serializable::serialize(obj.input, serializer); } template <> template Program::BlackBoxFuncCall::RANGE serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::RANGE obj; obj.input = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::SHA256 &lhs, const BlackBoxFuncCall::SHA256 &rhs) { if (!(lhs.inputs == rhs.inputs)) { return false; } if (!(lhs.outputs == rhs.outputs)) { return false; } return true; } inline std::vector BlackBoxFuncCall::SHA256::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::SHA256 BlackBoxFuncCall::SHA256::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::SHA256 &obj, Serializer &serializer) { serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.outputs, serializer); } template <> template Program::BlackBoxFuncCall::SHA256 serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::SHA256 obj; obj.inputs = serde::Deserializable::deserialize(deserializer); obj.outputs = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::Blake2s &lhs, const BlackBoxFuncCall::Blake2s &rhs) { if (!(lhs.inputs == rhs.inputs)) { return false; } if (!(lhs.outputs == rhs.outputs)) { return false; } return true; } inline std::vector BlackBoxFuncCall::Blake2s::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::Blake2s BlackBoxFuncCall::Blake2s::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::Blake2s &obj, Serializer &serializer) { serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.outputs, serializer); } template <> template Program::BlackBoxFuncCall::Blake2s serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::Blake2s obj; obj.inputs = serde::Deserializable::deserialize(deserializer); obj.outputs = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::Blake3 &lhs, const BlackBoxFuncCall::Blake3 &rhs) { if (!(lhs.inputs == rhs.inputs)) { return false; } if (!(lhs.outputs == rhs.outputs)) { return false; } return true; } inline std::vector BlackBoxFuncCall::Blake3::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::Blake3 BlackBoxFuncCall::Blake3::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::Blake3 &obj, Serializer &serializer) { serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.outputs, serializer); } template <> template Program::BlackBoxFuncCall::Blake3 serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::Blake3 obj; obj.inputs = serde::Deserializable::deserialize(deserializer); obj.outputs = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::SchnorrVerify &lhs, const BlackBoxFuncCall::SchnorrVerify &rhs) { if (!(lhs.public_key_x == rhs.public_key_x)) { return false; } if (!(lhs.public_key_y == rhs.public_key_y)) { return false; } if (!(lhs.signature == rhs.signature)) { return false; } if (!(lhs.message == rhs.message)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxFuncCall::SchnorrVerify::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::SchnorrVerify BlackBoxFuncCall::SchnorrVerify::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::SchnorrVerify &obj, Serializer &serializer) { serde::Serializable::serialize(obj.public_key_x, serializer); serde::Serializable::serialize(obj.public_key_y, serializer); serde::Serializable::serialize(obj.signature, serializer); serde::Serializable::serialize(obj.message, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxFuncCall::SchnorrVerify serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::SchnorrVerify obj; obj.public_key_x = serde::Deserializable::deserialize(deserializer); obj.public_key_y = serde::Deserializable::deserialize(deserializer); obj.signature = serde::Deserializable::deserialize(deserializer); obj.message = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::PedersenCommitment &lhs, const BlackBoxFuncCall::PedersenCommitment &rhs) { if (!(lhs.inputs == rhs.inputs)) { return false; } if (!(lhs.domain_separator == rhs.domain_separator)) { return false; } if (!(lhs.outputs == rhs.outputs)) { return false; } return true; } inline std::vector BlackBoxFuncCall::PedersenCommitment::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::PedersenCommitment BlackBoxFuncCall::PedersenCommitment::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::PedersenCommitment &obj, Serializer &serializer) { serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.domain_separator, serializer); serde::Serializable::serialize(obj.outputs, serializer); } template <> template Program::BlackBoxFuncCall::PedersenCommitment serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::PedersenCommitment obj; obj.inputs = serde::Deserializable::deserialize(deserializer); obj.domain_separator = serde::Deserializable::deserialize(deserializer); obj.outputs = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::PedersenHash &lhs, const BlackBoxFuncCall::PedersenHash &rhs) { if (!(lhs.inputs == rhs.inputs)) { return false; } if (!(lhs.domain_separator == rhs.domain_separator)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxFuncCall::PedersenHash::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::PedersenHash BlackBoxFuncCall::PedersenHash::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::PedersenHash &obj, Serializer &serializer) { serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.domain_separator, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxFuncCall::PedersenHash serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::PedersenHash obj; obj.inputs = serde::Deserializable::deserialize(deserializer); obj.domain_separator = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::EcdsaSecp256k1 &lhs, const BlackBoxFuncCall::EcdsaSecp256k1 &rhs) { if (!(lhs.public_key_x == rhs.public_key_x)) { return false; } if (!(lhs.public_key_y == rhs.public_key_y)) { return false; } if (!(lhs.signature == rhs.signature)) { return false; } if (!(lhs.hashed_message == rhs.hashed_message)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxFuncCall::EcdsaSecp256k1::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::EcdsaSecp256k1 BlackBoxFuncCall::EcdsaSecp256k1::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::EcdsaSecp256k1 &obj, Serializer &serializer) { serde::Serializable::serialize(obj.public_key_x, serializer); serde::Serializable::serialize(obj.public_key_y, serializer); serde::Serializable::serialize(obj.signature, serializer); serde::Serializable::serialize(obj.hashed_message, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxFuncCall::EcdsaSecp256k1 serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::EcdsaSecp256k1 obj; obj.public_key_x = serde::Deserializable::deserialize(deserializer); obj.public_key_y = serde::Deserializable::deserialize(deserializer); obj.signature = serde::Deserializable::deserialize(deserializer); obj.hashed_message = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::EcdsaSecp256r1 &lhs, const BlackBoxFuncCall::EcdsaSecp256r1 &rhs) { if (!(lhs.public_key_x == rhs.public_key_x)) { return false; } if (!(lhs.public_key_y == rhs.public_key_y)) { return false; } if (!(lhs.signature == rhs.signature)) { return false; } if (!(lhs.hashed_message == rhs.hashed_message)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxFuncCall::EcdsaSecp256r1::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::EcdsaSecp256r1 BlackBoxFuncCall::EcdsaSecp256r1::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::EcdsaSecp256r1 &obj, Serializer &serializer) { serde::Serializable::serialize(obj.public_key_x, serializer); serde::Serializable::serialize(obj.public_key_y, serializer); serde::Serializable::serialize(obj.signature, serializer); serde::Serializable::serialize(obj.hashed_message, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxFuncCall::EcdsaSecp256r1 serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::EcdsaSecp256r1 obj; obj.public_key_x = serde::Deserializable::deserialize(deserializer); obj.public_key_y = serde::Deserializable::deserialize(deserializer); obj.signature = serde::Deserializable::deserialize(deserializer); obj.hashed_message = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::MultiScalarMul &lhs, const BlackBoxFuncCall::MultiScalarMul &rhs) { if (!(lhs.points == rhs.points)) { return false; } if (!(lhs.scalars == rhs.scalars)) { return false; } if (!(lhs.outputs == rhs.outputs)) { return false; } return true; } inline std::vector BlackBoxFuncCall::MultiScalarMul::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::MultiScalarMul BlackBoxFuncCall::MultiScalarMul::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::MultiScalarMul &obj, Serializer &serializer) { serde::Serializable::serialize(obj.points, serializer); serde::Serializable::serialize(obj.scalars, serializer); serde::Serializable::serialize(obj.outputs, serializer); } template <> template Program::BlackBoxFuncCall::MultiScalarMul serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::MultiScalarMul obj; obj.points = serde::Deserializable::deserialize(deserializer); obj.scalars = serde::Deserializable::deserialize(deserializer); obj.outputs = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::EmbeddedCurveAdd &lhs, const BlackBoxFuncCall::EmbeddedCurveAdd &rhs) { if (!(lhs.input1_x == rhs.input1_x)) { return false; } if (!(lhs.input1_y == rhs.input1_y)) { return false; } if (!(lhs.input2_x == rhs.input2_x)) { return false; } if (!(lhs.input2_y == rhs.input2_y)) { return false; } if (!(lhs.outputs == rhs.outputs)) { return false; } return true; } inline std::vector BlackBoxFuncCall::EmbeddedCurveAdd::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::EmbeddedCurveAdd BlackBoxFuncCall::EmbeddedCurveAdd::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::EmbeddedCurveAdd &obj, Serializer &serializer) { serde::Serializable::serialize(obj.input1_x, serializer); serde::Serializable::serialize(obj.input1_y, serializer); serde::Serializable::serialize(obj.input2_x, serializer); serde::Serializable::serialize(obj.input2_y, serializer); serde::Serializable::serialize(obj.outputs, serializer); } template <> template Program::BlackBoxFuncCall::EmbeddedCurveAdd serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::EmbeddedCurveAdd obj; obj.input1_x = serde::Deserializable::deserialize(deserializer); obj.input1_y = serde::Deserializable::deserialize(deserializer); obj.input2_x = serde::Deserializable::deserialize(deserializer); obj.input2_y = serde::Deserializable::deserialize(deserializer); obj.outputs = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::Keccak256 &lhs, const BlackBoxFuncCall::Keccak256 &rhs) { if (!(lhs.inputs == rhs.inputs)) { return false; } if (!(lhs.var_message_size == rhs.var_message_size)) { return false; } if (!(lhs.outputs == rhs.outputs)) { return false; } return true; } inline std::vector BlackBoxFuncCall::Keccak256::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::Keccak256 BlackBoxFuncCall::Keccak256::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::Keccak256 &obj, Serializer &serializer) { serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.var_message_size, serializer); serde::Serializable::serialize(obj.outputs, serializer); } template <> template Program::BlackBoxFuncCall::Keccak256 serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::Keccak256 obj; obj.inputs = serde::Deserializable::deserialize(deserializer); obj.var_message_size = serde::Deserializable::deserialize(deserializer); obj.outputs = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::Keccakf1600 &lhs, const BlackBoxFuncCall::Keccakf1600 &rhs) { if (!(lhs.inputs == rhs.inputs)) { return false; } if (!(lhs.outputs == rhs.outputs)) { return false; } return true; } inline std::vector BlackBoxFuncCall::Keccakf1600::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::Keccakf1600 BlackBoxFuncCall::Keccakf1600::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::Keccakf1600 &obj, Serializer &serializer) { serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.outputs, serializer); } template <> template Program::BlackBoxFuncCall::Keccakf1600 serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::Keccakf1600 obj; obj.inputs = serde::Deserializable::deserialize(deserializer); obj.outputs = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::RecursiveAggregation &lhs, const BlackBoxFuncCall::RecursiveAggregation &rhs) { if (!(lhs.verification_key == rhs.verification_key)) { return false; } if (!(lhs.proof == rhs.proof)) { return false; } if (!(lhs.public_inputs == rhs.public_inputs)) { return false; } if (!(lhs.key_hash == rhs.key_hash)) { return false; } return true; } inline std::vector BlackBoxFuncCall::RecursiveAggregation::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::RecursiveAggregation BlackBoxFuncCall::RecursiveAggregation::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::RecursiveAggregation &obj, Serializer &serializer) { serde::Serializable::serialize(obj.verification_key, serializer); serde::Serializable::serialize(obj.proof, serializer); serde::Serializable::serialize(obj.public_inputs, serializer); serde::Serializable::serialize(obj.key_hash, serializer); } template <> template Program::BlackBoxFuncCall::RecursiveAggregation serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::RecursiveAggregation obj; obj.verification_key = serde::Deserializable::deserialize(deserializer); obj.proof = serde::Deserializable::deserialize(deserializer); obj.public_inputs = serde::Deserializable::deserialize(deserializer); obj.key_hash = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::BigIntAdd &lhs, const BlackBoxFuncCall::BigIntAdd &rhs) { if (!(lhs.lhs == rhs.lhs)) { return false; } if (!(lhs.rhs == rhs.rhs)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxFuncCall::BigIntAdd::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::BigIntAdd BlackBoxFuncCall::BigIntAdd::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::BigIntAdd &obj, Serializer &serializer) { serde::Serializable::serialize(obj.lhs, serializer); serde::Serializable::serialize(obj.rhs, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxFuncCall::BigIntAdd serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::BigIntAdd obj; obj.lhs = serde::Deserializable::deserialize(deserializer); obj.rhs = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::BigIntSub &lhs, const BlackBoxFuncCall::BigIntSub &rhs) { if (!(lhs.lhs == rhs.lhs)) { return false; } if (!(lhs.rhs == rhs.rhs)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxFuncCall::BigIntSub::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::BigIntSub BlackBoxFuncCall::BigIntSub::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::BigIntSub &obj, Serializer &serializer) { serde::Serializable::serialize(obj.lhs, serializer); serde::Serializable::serialize(obj.rhs, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxFuncCall::BigIntSub serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::BigIntSub obj; obj.lhs = serde::Deserializable::deserialize(deserializer); obj.rhs = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::BigIntMul &lhs, const BlackBoxFuncCall::BigIntMul &rhs) { if (!(lhs.lhs == rhs.lhs)) { return false; } if (!(lhs.rhs == rhs.rhs)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxFuncCall::BigIntMul::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::BigIntMul BlackBoxFuncCall::BigIntMul::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::BigIntMul &obj, Serializer &serializer) { serde::Serializable::serialize(obj.lhs, serializer); serde::Serializable::serialize(obj.rhs, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxFuncCall::BigIntMul serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::BigIntMul obj; obj.lhs = serde::Deserializable::deserialize(deserializer); obj.rhs = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::BigIntDiv &lhs, const BlackBoxFuncCall::BigIntDiv &rhs) { if (!(lhs.lhs == rhs.lhs)) { return false; } if (!(lhs.rhs == rhs.rhs)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxFuncCall::BigIntDiv::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::BigIntDiv BlackBoxFuncCall::BigIntDiv::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::BigIntDiv &obj, Serializer &serializer) { serde::Serializable::serialize(obj.lhs, serializer); serde::Serializable::serialize(obj.rhs, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxFuncCall::BigIntDiv serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::BigIntDiv obj; obj.lhs = serde::Deserializable::deserialize(deserializer); obj.rhs = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::BigIntFromLeBytes &lhs, const BlackBoxFuncCall::BigIntFromLeBytes &rhs) { if (!(lhs.inputs == rhs.inputs)) { return false; } if (!(lhs.modulus == rhs.modulus)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxFuncCall::BigIntFromLeBytes::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::BigIntFromLeBytes BlackBoxFuncCall::BigIntFromLeBytes::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::BigIntFromLeBytes &obj, Serializer &serializer) { serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.modulus, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxFuncCall::BigIntFromLeBytes serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::BigIntFromLeBytes obj; obj.inputs = serde::Deserializable::deserialize(deserializer); obj.modulus = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::BigIntToLeBytes &lhs, const BlackBoxFuncCall::BigIntToLeBytes &rhs) { if (!(lhs.input == rhs.input)) { return false; } if (!(lhs.outputs == rhs.outputs)) { return false; } return true; } inline std::vector BlackBoxFuncCall::BigIntToLeBytes::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::BigIntToLeBytes BlackBoxFuncCall::BigIntToLeBytes::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::BigIntToLeBytes &obj, Serializer &serializer) { serde::Serializable::serialize(obj.input, serializer); serde::Serializable::serialize(obj.outputs, serializer); } template <> template Program::BlackBoxFuncCall::BigIntToLeBytes serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::BigIntToLeBytes obj; obj.input = serde::Deserializable::deserialize(deserializer); obj.outputs = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::Poseidon2Permutation &lhs, const BlackBoxFuncCall::Poseidon2Permutation &rhs) { if (!(lhs.inputs == rhs.inputs)) { return false; } if (!(lhs.outputs == rhs.outputs)) { return false; } if (!(lhs.len == rhs.len)) { return false; } return true; } inline std::vector BlackBoxFuncCall::Poseidon2Permutation::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::Poseidon2Permutation BlackBoxFuncCall::Poseidon2Permutation::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::Poseidon2Permutation &obj, Serializer &serializer) { serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.outputs, serializer); serde::Serializable::serialize(obj.len, serializer); } template <> template Program::BlackBoxFuncCall::Poseidon2Permutation serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::Poseidon2Permutation obj; obj.inputs = serde::Deserializable::deserialize(deserializer); obj.outputs = serde::Deserializable::deserialize(deserializer); obj.len = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxFuncCall::Sha256Compression &lhs, const BlackBoxFuncCall::Sha256Compression &rhs) { if (!(lhs.inputs == rhs.inputs)) { return false; } if (!(lhs.hash_values == rhs.hash_values)) { return false; } if (!(lhs.outputs == rhs.outputs)) { return false; } return true; } inline std::vector BlackBoxFuncCall::Sha256Compression::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxFuncCall::Sha256Compression BlackBoxFuncCall::Sha256Compression::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxFuncCall::Sha256Compression &obj, Serializer &serializer) { serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.hash_values, serializer); serde::Serializable::serialize(obj.outputs, serializer); } template <> template Program::BlackBoxFuncCall::Sha256Compression serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxFuncCall::Sha256Compression obj; obj.inputs = serde::Deserializable::deserialize(deserializer); obj.hash_values = serde::Deserializable::deserialize(deserializer); obj.outputs = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp &lhs, const BlackBoxOp &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector BlackBoxOp::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp BlackBoxOp::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::BlackBoxOp serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::BlackBoxOp obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::AES128Encrypt &lhs, const BlackBoxOp::AES128Encrypt &rhs) { if (!(lhs.inputs == rhs.inputs)) { return false; } if (!(lhs.iv == rhs.iv)) { return false; } if (!(lhs.key == rhs.key)) { return false; } if (!(lhs.outputs == rhs.outputs)) { return false; } return true; } inline std::vector BlackBoxOp::AES128Encrypt::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::AES128Encrypt BlackBoxOp::AES128Encrypt::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::AES128Encrypt &obj, Serializer &serializer) { serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.iv, serializer); serde::Serializable::serialize(obj.key, serializer); serde::Serializable::serialize(obj.outputs, serializer); } template <> template Program::BlackBoxOp::AES128Encrypt serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::AES128Encrypt obj; obj.inputs = serde::Deserializable::deserialize(deserializer); obj.iv = serde::Deserializable::deserialize(deserializer); obj.key = serde::Deserializable::deserialize(deserializer); obj.outputs = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::Sha256 &lhs, const BlackBoxOp::Sha256 &rhs) { if (!(lhs.message == rhs.message)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxOp::Sha256::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::Sha256 BlackBoxOp::Sha256::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::Sha256 &obj, Serializer &serializer) { serde::Serializable::serialize(obj.message, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxOp::Sha256 serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::Sha256 obj; obj.message = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::Blake2s &lhs, const BlackBoxOp::Blake2s &rhs) { if (!(lhs.message == rhs.message)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxOp::Blake2s::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::Blake2s BlackBoxOp::Blake2s::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::Blake2s &obj, Serializer &serializer) { serde::Serializable::serialize(obj.message, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxOp::Blake2s serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::Blake2s obj; obj.message = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::Blake3 &lhs, const BlackBoxOp::Blake3 &rhs) { if (!(lhs.message == rhs.message)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxOp::Blake3::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::Blake3 BlackBoxOp::Blake3::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::Blake3 &obj, Serializer &serializer) { serde::Serializable::serialize(obj.message, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxOp::Blake3 serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::Blake3 obj; obj.message = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::Keccak256 &lhs, const BlackBoxOp::Keccak256 &rhs) { if (!(lhs.message == rhs.message)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxOp::Keccak256::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::Keccak256 BlackBoxOp::Keccak256::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::Keccak256 &obj, Serializer &serializer) { serde::Serializable::serialize(obj.message, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxOp::Keccak256 serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::Keccak256 obj; obj.message = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::Keccakf1600 &lhs, const BlackBoxOp::Keccakf1600 &rhs) { if (!(lhs.message == rhs.message)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxOp::Keccakf1600::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::Keccakf1600 BlackBoxOp::Keccakf1600::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::Keccakf1600 &obj, Serializer &serializer) { serde::Serializable::serialize(obj.message, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxOp::Keccakf1600 serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::Keccakf1600 obj; obj.message = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::EcdsaSecp256k1 &lhs, const BlackBoxOp::EcdsaSecp256k1 &rhs) { if (!(lhs.hashed_msg == rhs.hashed_msg)) { return false; } if (!(lhs.public_key_x == rhs.public_key_x)) { return false; } if (!(lhs.public_key_y == rhs.public_key_y)) { return false; } if (!(lhs.signature == rhs.signature)) { return false; } if (!(lhs.result == rhs.result)) { return false; } return true; } inline std::vector BlackBoxOp::EcdsaSecp256k1::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::EcdsaSecp256k1 BlackBoxOp::EcdsaSecp256k1::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::EcdsaSecp256k1 &obj, Serializer &serializer) { serde::Serializable::serialize(obj.hashed_msg, serializer); serde::Serializable::serialize(obj.public_key_x, serializer); serde::Serializable::serialize(obj.public_key_y, serializer); serde::Serializable::serialize(obj.signature, serializer); serde::Serializable::serialize(obj.result, serializer); } template <> template Program::BlackBoxOp::EcdsaSecp256k1 serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::EcdsaSecp256k1 obj; obj.hashed_msg = serde::Deserializable::deserialize(deserializer); obj.public_key_x = serde::Deserializable::deserialize(deserializer); obj.public_key_y = serde::Deserializable::deserialize(deserializer); obj.signature = serde::Deserializable::deserialize(deserializer); obj.result = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::EcdsaSecp256r1 &lhs, const BlackBoxOp::EcdsaSecp256r1 &rhs) { if (!(lhs.hashed_msg == rhs.hashed_msg)) { return false; } if (!(lhs.public_key_x == rhs.public_key_x)) { return false; } if (!(lhs.public_key_y == rhs.public_key_y)) { return false; } if (!(lhs.signature == rhs.signature)) { return false; } if (!(lhs.result == rhs.result)) { return false; } return true; } inline std::vector BlackBoxOp::EcdsaSecp256r1::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::EcdsaSecp256r1 BlackBoxOp::EcdsaSecp256r1::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::EcdsaSecp256r1 &obj, Serializer &serializer) { serde::Serializable::serialize(obj.hashed_msg, serializer); serde::Serializable::serialize(obj.public_key_x, serializer); serde::Serializable::serialize(obj.public_key_y, serializer); serde::Serializable::serialize(obj.signature, serializer); serde::Serializable::serialize(obj.result, serializer); } template <> template Program::BlackBoxOp::EcdsaSecp256r1 serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::EcdsaSecp256r1 obj; obj.hashed_msg = serde::Deserializable::deserialize(deserializer); obj.public_key_x = serde::Deserializable::deserialize(deserializer); obj.public_key_y = serde::Deserializable::deserialize(deserializer); obj.signature = serde::Deserializable::deserialize(deserializer); obj.result = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::SchnorrVerify &lhs, const BlackBoxOp::SchnorrVerify &rhs) { if (!(lhs.public_key_x == rhs.public_key_x)) { return false; } if (!(lhs.public_key_y == rhs.public_key_y)) { return false; } if (!(lhs.message == rhs.message)) { return false; } if (!(lhs.signature == rhs.signature)) { return false; } if (!(lhs.result == rhs.result)) { return false; } return true; } inline std::vector BlackBoxOp::SchnorrVerify::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::SchnorrVerify BlackBoxOp::SchnorrVerify::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::SchnorrVerify &obj, Serializer &serializer) { serde::Serializable::serialize(obj.public_key_x, serializer); serde::Serializable::serialize(obj.public_key_y, serializer); serde::Serializable::serialize(obj.message, serializer); serde::Serializable::serialize(obj.signature, serializer); serde::Serializable::serialize(obj.result, serializer); } template <> template Program::BlackBoxOp::SchnorrVerify serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::SchnorrVerify obj; obj.public_key_x = serde::Deserializable::deserialize(deserializer); obj.public_key_y = serde::Deserializable::deserialize(deserializer); obj.message = serde::Deserializable::deserialize(deserializer); obj.signature = serde::Deserializable::deserialize(deserializer); obj.result = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::PedersenCommitment &lhs, const BlackBoxOp::PedersenCommitment &rhs) { if (!(lhs.inputs == rhs.inputs)) { return false; } if (!(lhs.domain_separator == rhs.domain_separator)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxOp::PedersenCommitment::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::PedersenCommitment BlackBoxOp::PedersenCommitment::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::PedersenCommitment &obj, Serializer &serializer) { serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.domain_separator, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxOp::PedersenCommitment serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::PedersenCommitment obj; obj.inputs = serde::Deserializable::deserialize(deserializer); obj.domain_separator = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::PedersenHash &lhs, const BlackBoxOp::PedersenHash &rhs) { if (!(lhs.inputs == rhs.inputs)) { return false; } if (!(lhs.domain_separator == rhs.domain_separator)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxOp::PedersenHash::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::PedersenHash BlackBoxOp::PedersenHash::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::PedersenHash &obj, Serializer &serializer) { serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.domain_separator, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxOp::PedersenHash serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::PedersenHash obj; obj.inputs = serde::Deserializable::deserialize(deserializer); obj.domain_separator = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::MultiScalarMul &lhs, const BlackBoxOp::MultiScalarMul &rhs) { if (!(lhs.points == rhs.points)) { return false; } if (!(lhs.scalars == rhs.scalars)) { return false; } if (!(lhs.outputs == rhs.outputs)) { return false; } return true; } inline std::vector BlackBoxOp::MultiScalarMul::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::MultiScalarMul BlackBoxOp::MultiScalarMul::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::MultiScalarMul &obj, Serializer &serializer) { serde::Serializable::serialize(obj.points, serializer); serde::Serializable::serialize(obj.scalars, serializer); serde::Serializable::serialize(obj.outputs, serializer); } template <> template Program::BlackBoxOp::MultiScalarMul serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::MultiScalarMul obj; obj.points = serde::Deserializable::deserialize(deserializer); obj.scalars = serde::Deserializable::deserialize(deserializer); obj.outputs = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::EmbeddedCurveAdd &lhs, const BlackBoxOp::EmbeddedCurveAdd &rhs) { if (!(lhs.input1_x == rhs.input1_x)) { return false; } if (!(lhs.input1_y == rhs.input1_y)) { return false; } if (!(lhs.input2_x == rhs.input2_x)) { return false; } if (!(lhs.input2_y == rhs.input2_y)) { return false; } if (!(lhs.result == rhs.result)) { return false; } return true; } inline std::vector BlackBoxOp::EmbeddedCurveAdd::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::EmbeddedCurveAdd BlackBoxOp::EmbeddedCurveAdd::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::EmbeddedCurveAdd &obj, Serializer &serializer) { serde::Serializable::serialize(obj.input1_x, serializer); serde::Serializable::serialize(obj.input1_y, serializer); serde::Serializable::serialize(obj.input2_x, serializer); serde::Serializable::serialize(obj.input2_y, serializer); serde::Serializable::serialize(obj.result, serializer); } template <> template Program::BlackBoxOp::EmbeddedCurveAdd serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::EmbeddedCurveAdd obj; obj.input1_x = serde::Deserializable::deserialize(deserializer); obj.input1_y = serde::Deserializable::deserialize(deserializer); obj.input2_x = serde::Deserializable::deserialize(deserializer); obj.input2_y = serde::Deserializable::deserialize(deserializer); obj.result = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::BigIntAdd &lhs, const BlackBoxOp::BigIntAdd &rhs) { if (!(lhs.lhs == rhs.lhs)) { return false; } if (!(lhs.rhs == rhs.rhs)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxOp::BigIntAdd::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::BigIntAdd BlackBoxOp::BigIntAdd::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::BigIntAdd &obj, Serializer &serializer) { serde::Serializable::serialize(obj.lhs, serializer); serde::Serializable::serialize(obj.rhs, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxOp::BigIntAdd serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::BigIntAdd obj; obj.lhs = serde::Deserializable::deserialize(deserializer); obj.rhs = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::BigIntSub &lhs, const BlackBoxOp::BigIntSub &rhs) { if (!(lhs.lhs == rhs.lhs)) { return false; } if (!(lhs.rhs == rhs.rhs)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxOp::BigIntSub::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::BigIntSub BlackBoxOp::BigIntSub::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::BigIntSub &obj, Serializer &serializer) { serde::Serializable::serialize(obj.lhs, serializer); serde::Serializable::serialize(obj.rhs, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxOp::BigIntSub serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::BigIntSub obj; obj.lhs = serde::Deserializable::deserialize(deserializer); obj.rhs = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::BigIntMul &lhs, const BlackBoxOp::BigIntMul &rhs) { if (!(lhs.lhs == rhs.lhs)) { return false; } if (!(lhs.rhs == rhs.rhs)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxOp::BigIntMul::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::BigIntMul BlackBoxOp::BigIntMul::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::BigIntMul &obj, Serializer &serializer) { serde::Serializable::serialize(obj.lhs, serializer); serde::Serializable::serialize(obj.rhs, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxOp::BigIntMul serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::BigIntMul obj; obj.lhs = serde::Deserializable::deserialize(deserializer); obj.rhs = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::BigIntDiv &lhs, const BlackBoxOp::BigIntDiv &rhs) { if (!(lhs.lhs == rhs.lhs)) { return false; } if (!(lhs.rhs == rhs.rhs)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxOp::BigIntDiv::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::BigIntDiv BlackBoxOp::BigIntDiv::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::BigIntDiv &obj, Serializer &serializer) { serde::Serializable::serialize(obj.lhs, serializer); serde::Serializable::serialize(obj.rhs, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxOp::BigIntDiv serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::BigIntDiv obj; obj.lhs = serde::Deserializable::deserialize(deserializer); obj.rhs = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::BigIntFromLeBytes &lhs, const BlackBoxOp::BigIntFromLeBytes &rhs) { if (!(lhs.inputs == rhs.inputs)) { return false; } if (!(lhs.modulus == rhs.modulus)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxOp::BigIntFromLeBytes::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::BigIntFromLeBytes BlackBoxOp::BigIntFromLeBytes::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::BigIntFromLeBytes &obj, Serializer &serializer) { serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.modulus, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxOp::BigIntFromLeBytes serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::BigIntFromLeBytes obj; obj.inputs = serde::Deserializable::deserialize(deserializer); obj.modulus = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::BigIntToLeBytes &lhs, const BlackBoxOp::BigIntToLeBytes &rhs) { if (!(lhs.input == rhs.input)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxOp::BigIntToLeBytes::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::BigIntToLeBytes BlackBoxOp::BigIntToLeBytes::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::BigIntToLeBytes &obj, Serializer &serializer) { serde::Serializable::serialize(obj.input, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxOp::BigIntToLeBytes serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::BigIntToLeBytes obj; obj.input = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::Poseidon2Permutation &lhs, const BlackBoxOp::Poseidon2Permutation &rhs) { if (!(lhs.message == rhs.message)) { return false; } if (!(lhs.output == rhs.output)) { return false; } if (!(lhs.len == rhs.len)) { return false; } return true; } inline std::vector BlackBoxOp::Poseidon2Permutation::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::Poseidon2Permutation BlackBoxOp::Poseidon2Permutation::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::Poseidon2Permutation &obj, Serializer &serializer) { serde::Serializable::serialize(obj.message, serializer); serde::Serializable::serialize(obj.output, serializer); serde::Serializable::serialize(obj.len, serializer); } template <> template Program::BlackBoxOp::Poseidon2Permutation serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::Poseidon2Permutation obj; obj.message = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); obj.len = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlackBoxOp::Sha256Compression &lhs, const BlackBoxOp::Sha256Compression &rhs) { if (!(lhs.input == rhs.input)) { return false; } if (!(lhs.hash_values == rhs.hash_values)) { return false; } if (!(lhs.output == rhs.output)) { return false; } return true; } inline std::vector BlackBoxOp::Sha256Compression::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlackBoxOp::Sha256Compression BlackBoxOp::Sha256Compression::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlackBoxOp::Sha256Compression &obj, Serializer &serializer) { serde::Serializable::serialize(obj.input, serializer); serde::Serializable::serialize(obj.hash_values, serializer); serde::Serializable::serialize(obj.output, serializer); } template <> template Program::BlackBoxOp::Sha256Compression serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BlackBoxOp::Sha256Compression obj; obj.input = serde::Deserializable::deserialize(deserializer); obj.hash_values = serde::Deserializable::deserialize(deserializer); obj.output = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BlockId &lhs, const BlockId &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector BlockId::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BlockId BlockId::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BlockId &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::BlockId serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::BlockId obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const BrilligBytecode &lhs, const BrilligBytecode &rhs) { if (!(lhs.bytecode == rhs.bytecode)) { return false; } return true; } inline std::vector BrilligBytecode::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligBytecode BrilligBytecode::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligBytecode &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.bytecode, serializer); serializer.decrease_container_depth(); } template <> template Program::BrilligBytecode serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::BrilligBytecode obj; obj.bytecode = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const BrilligInputs &lhs, const BrilligInputs &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector BrilligInputs::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligInputs BrilligInputs::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligInputs &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::BrilligInputs serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::BrilligInputs obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const BrilligInputs::Single &lhs, const BrilligInputs::Single &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector BrilligInputs::Single::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligInputs::Single BrilligInputs::Single::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligInputs::Single &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value, serializer); } template <> template Program::BrilligInputs::Single serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligInputs::Single obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligInputs::Array &lhs, const BrilligInputs::Array &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector BrilligInputs::Array::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligInputs::Array BrilligInputs::Array::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligInputs::Array &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value, serializer); } template <> template Program::BrilligInputs::Array serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligInputs::Array obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligInputs::MemoryArray &lhs, const BrilligInputs::MemoryArray &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector BrilligInputs::MemoryArray::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligInputs::MemoryArray BrilligInputs::MemoryArray::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligInputs::MemoryArray &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value, serializer); } template <> template Program::BrilligInputs::MemoryArray serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligInputs::MemoryArray obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOpcode &lhs, const BrilligOpcode &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector BrilligOpcode::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode BrilligOpcode::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::BrilligOpcode serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::BrilligOpcode obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const BrilligOpcode::BinaryFieldOp &lhs, const BrilligOpcode::BinaryFieldOp &rhs) { if (!(lhs.destination == rhs.destination)) { return false; } if (!(lhs.op == rhs.op)) { return false; } if (!(lhs.lhs == rhs.lhs)) { return false; } if (!(lhs.rhs == rhs.rhs)) { return false; } return true; } inline std::vector BrilligOpcode::BinaryFieldOp::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode::BinaryFieldOp BrilligOpcode::BinaryFieldOp::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode::BinaryFieldOp &obj, Serializer &serializer) { serde::Serializable::serialize(obj.destination, serializer); serde::Serializable::serialize(obj.op, serializer); serde::Serializable::serialize(obj.lhs, serializer); serde::Serializable::serialize(obj.rhs, serializer); } template <> template Program::BrilligOpcode::BinaryFieldOp serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOpcode::BinaryFieldOp obj; obj.destination = serde::Deserializable::deserialize(deserializer); obj.op = serde::Deserializable::deserialize(deserializer); obj.lhs = serde::Deserializable::deserialize(deserializer); obj.rhs = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOpcode::BinaryIntOp &lhs, const BrilligOpcode::BinaryIntOp &rhs) { if (!(lhs.destination == rhs.destination)) { return false; } if (!(lhs.op == rhs.op)) { return false; } if (!(lhs.bit_size == rhs.bit_size)) { return false; } if (!(lhs.lhs == rhs.lhs)) { return false; } if (!(lhs.rhs == rhs.rhs)) { return false; } return true; } inline std::vector BrilligOpcode::BinaryIntOp::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode::BinaryIntOp BrilligOpcode::BinaryIntOp::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode::BinaryIntOp &obj, Serializer &serializer) { serde::Serializable::serialize(obj.destination, serializer); serde::Serializable::serialize(obj.op, serializer); serde::Serializable::serialize(obj.bit_size, serializer); serde::Serializable::serialize(obj.lhs, serializer); serde::Serializable::serialize(obj.rhs, serializer); } template <> template Program::BrilligOpcode::BinaryIntOp serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOpcode::BinaryIntOp obj; obj.destination = serde::Deserializable::deserialize(deserializer); obj.op = serde::Deserializable::deserialize(deserializer); obj.bit_size = serde::Deserializable::deserialize(deserializer); obj.lhs = serde::Deserializable::deserialize(deserializer); obj.rhs = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOpcode::Cast &lhs, const BrilligOpcode::Cast &rhs) { if (!(lhs.destination == rhs.destination)) { return false; } if (!(lhs.source == rhs.source)) { return false; } if (!(lhs.bit_size == rhs.bit_size)) { return false; } return true; } inline std::vector BrilligOpcode::Cast::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode::Cast BrilligOpcode::Cast::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode::Cast &obj, Serializer &serializer) { serde::Serializable::serialize(obj.destination, serializer); serde::Serializable::serialize(obj.source, serializer); serde::Serializable::serialize(obj.bit_size, serializer); } template <> template Program::BrilligOpcode::Cast serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOpcode::Cast obj; obj.destination = serde::Deserializable::deserialize(deserializer); obj.source = serde::Deserializable::deserialize(deserializer); obj.bit_size = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOpcode::JumpIfNot &lhs, const BrilligOpcode::JumpIfNot &rhs) { if (!(lhs.condition == rhs.condition)) { return false; } if (!(lhs.location == rhs.location)) { return false; } return true; } inline std::vector BrilligOpcode::JumpIfNot::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode::JumpIfNot BrilligOpcode::JumpIfNot::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode::JumpIfNot &obj, Serializer &serializer) { serde::Serializable::serialize(obj.condition, serializer); serde::Serializable::serialize(obj.location, serializer); } template <> template Program::BrilligOpcode::JumpIfNot serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOpcode::JumpIfNot obj; obj.condition = serde::Deserializable::deserialize(deserializer); obj.location = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOpcode::JumpIf &lhs, const BrilligOpcode::JumpIf &rhs) { if (!(lhs.condition == rhs.condition)) { return false; } if (!(lhs.location == rhs.location)) { return false; } return true; } inline std::vector BrilligOpcode::JumpIf::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode::JumpIf BrilligOpcode::JumpIf::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode::JumpIf &obj, Serializer &serializer) { serde::Serializable::serialize(obj.condition, serializer); serde::Serializable::serialize(obj.location, serializer); } template <> template Program::BrilligOpcode::JumpIf serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOpcode::JumpIf obj; obj.condition = serde::Deserializable::deserialize(deserializer); obj.location = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOpcode::Jump &lhs, const BrilligOpcode::Jump &rhs) { if (!(lhs.location == rhs.location)) { return false; } return true; } inline std::vector BrilligOpcode::Jump::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode::Jump BrilligOpcode::Jump::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode::Jump &obj, Serializer &serializer) { serde::Serializable::serialize(obj.location, serializer); } template <> template Program::BrilligOpcode::Jump serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOpcode::Jump obj; obj.location = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOpcode::CalldataCopy &lhs, const BrilligOpcode::CalldataCopy &rhs) { if (!(lhs.destination_address == rhs.destination_address)) { return false; } if (!(lhs.size == rhs.size)) { return false; } if (!(lhs.offset == rhs.offset)) { return false; } return true; } inline std::vector BrilligOpcode::CalldataCopy::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode::CalldataCopy BrilligOpcode::CalldataCopy::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode::CalldataCopy &obj, Serializer &serializer) { serde::Serializable::serialize(obj.destination_address, serializer); serde::Serializable::serialize(obj.size, serializer); serde::Serializable::serialize(obj.offset, serializer); } template <> template Program::BrilligOpcode::CalldataCopy serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOpcode::CalldataCopy obj; obj.destination_address = serde::Deserializable::deserialize(deserializer); obj.size = serde::Deserializable::deserialize(deserializer); obj.offset = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOpcode::Call &lhs, const BrilligOpcode::Call &rhs) { if (!(lhs.location == rhs.location)) { return false; } return true; } inline std::vector BrilligOpcode::Call::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode::Call BrilligOpcode::Call::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode::Call &obj, Serializer &serializer) { serde::Serializable::serialize(obj.location, serializer); } template <> template Program::BrilligOpcode::Call serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOpcode::Call obj; obj.location = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOpcode::Const &lhs, const BrilligOpcode::Const &rhs) { if (!(lhs.destination == rhs.destination)) { return false; } if (!(lhs.bit_size == rhs.bit_size)) { return false; } if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector BrilligOpcode::Const::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode::Const BrilligOpcode::Const::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode::Const &obj, Serializer &serializer) { serde::Serializable::serialize(obj.destination, serializer); serde::Serializable::serialize(obj.bit_size, serializer); serde::Serializable::serialize(obj.value, serializer); } template <> template Program::BrilligOpcode::Const serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOpcode::Const obj; obj.destination = serde::Deserializable::deserialize(deserializer); obj.bit_size = serde::Deserializable::deserialize(deserializer); obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOpcode::Return &lhs, const BrilligOpcode::Return &rhs) { return true; } inline std::vector BrilligOpcode::Return::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode::Return BrilligOpcode::Return::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode::Return &obj, Serializer &serializer) { } template <> template Program::BrilligOpcode::Return serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOpcode::Return obj; return obj; } namespace Program { inline bool operator==(const BrilligOpcode::ForeignCall &lhs, const BrilligOpcode::ForeignCall &rhs) { if (!(lhs.function == rhs.function)) { return false; } if (!(lhs.destinations == rhs.destinations)) { return false; } if (!(lhs.destination_value_types == rhs.destination_value_types)) { return false; } if (!(lhs.inputs == rhs.inputs)) { return false; } if (!(lhs.input_value_types == rhs.input_value_types)) { return false; } return true; } inline std::vector BrilligOpcode::ForeignCall::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode::ForeignCall BrilligOpcode::ForeignCall::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode::ForeignCall &obj, Serializer &serializer) { serde::Serializable::serialize(obj.function, serializer); serde::Serializable::serialize(obj.destinations, serializer); serde::Serializable::serialize(obj.destination_value_types, serializer); serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.input_value_types, serializer); } template <> template Program::BrilligOpcode::ForeignCall serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOpcode::ForeignCall obj; obj.function = serde::Deserializable::deserialize(deserializer); obj.destinations = serde::Deserializable::deserialize(deserializer); obj.destination_value_types = serde::Deserializable::deserialize(deserializer); obj.inputs = serde::Deserializable::deserialize(deserializer); obj.input_value_types = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOpcode::Mov &lhs, const BrilligOpcode::Mov &rhs) { if (!(lhs.destination == rhs.destination)) { return false; } if (!(lhs.source == rhs.source)) { return false; } return true; } inline std::vector BrilligOpcode::Mov::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode::Mov BrilligOpcode::Mov::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode::Mov &obj, Serializer &serializer) { serde::Serializable::serialize(obj.destination, serializer); serde::Serializable::serialize(obj.source, serializer); } template <> template Program::BrilligOpcode::Mov serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOpcode::Mov obj; obj.destination = serde::Deserializable::deserialize(deserializer); obj.source = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOpcode::ConditionalMov &lhs, const BrilligOpcode::ConditionalMov &rhs) { if (!(lhs.destination == rhs.destination)) { return false; } if (!(lhs.source_a == rhs.source_a)) { return false; } if (!(lhs.source_b == rhs.source_b)) { return false; } if (!(lhs.condition == rhs.condition)) { return false; } return true; } inline std::vector BrilligOpcode::ConditionalMov::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode::ConditionalMov BrilligOpcode::ConditionalMov::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode::ConditionalMov &obj, Serializer &serializer) { serde::Serializable::serialize(obj.destination, serializer); serde::Serializable::serialize(obj.source_a, serializer); serde::Serializable::serialize(obj.source_b, serializer); serde::Serializable::serialize(obj.condition, serializer); } template <> template Program::BrilligOpcode::ConditionalMov serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOpcode::ConditionalMov obj; obj.destination = serde::Deserializable::deserialize(deserializer); obj.source_a = serde::Deserializable::deserialize(deserializer); obj.source_b = serde::Deserializable::deserialize(deserializer); obj.condition = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOpcode::Load &lhs, const BrilligOpcode::Load &rhs) { if (!(lhs.destination == rhs.destination)) { return false; } if (!(lhs.source_pointer == rhs.source_pointer)) { return false; } return true; } inline std::vector BrilligOpcode::Load::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode::Load BrilligOpcode::Load::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode::Load &obj, Serializer &serializer) { serde::Serializable::serialize(obj.destination, serializer); serde::Serializable::serialize(obj.source_pointer, serializer); } template <> template Program::BrilligOpcode::Load serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOpcode::Load obj; obj.destination = serde::Deserializable::deserialize(deserializer); obj.source_pointer = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOpcode::Store &lhs, const BrilligOpcode::Store &rhs) { if (!(lhs.destination_pointer == rhs.destination_pointer)) { return false; } if (!(lhs.source == rhs.source)) { return false; } return true; } inline std::vector BrilligOpcode::Store::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode::Store BrilligOpcode::Store::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode::Store &obj, Serializer &serializer) { serde::Serializable::serialize(obj.destination_pointer, serializer); serde::Serializable::serialize(obj.source, serializer); } template <> template Program::BrilligOpcode::Store serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOpcode::Store obj; obj.destination_pointer = serde::Deserializable::deserialize(deserializer); obj.source = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOpcode::BlackBox &lhs, const BrilligOpcode::BlackBox &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector BrilligOpcode::BlackBox::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode::BlackBox BrilligOpcode::BlackBox::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode::BlackBox &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value, serializer); } template <> template Program::BrilligOpcode::BlackBox serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOpcode::BlackBox obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOpcode::Trap &lhs, const BrilligOpcode::Trap &rhs) { if (!(lhs.revert_data == rhs.revert_data)) { return false; } return true; } inline std::vector BrilligOpcode::Trap::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode::Trap BrilligOpcode::Trap::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode::Trap &obj, Serializer &serializer) { serde::Serializable::serialize(obj.revert_data, serializer); } template <> template Program::BrilligOpcode::Trap serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOpcode::Trap obj; obj.revert_data = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOpcode::Stop &lhs, const BrilligOpcode::Stop &rhs) { if (!(lhs.return_data_offset == rhs.return_data_offset)) { return false; } if (!(lhs.return_data_size == rhs.return_data_size)) { return false; } return true; } inline std::vector BrilligOpcode::Stop::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOpcode::Stop BrilligOpcode::Stop::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOpcode::Stop &obj, Serializer &serializer) { serde::Serializable::serialize(obj.return_data_offset, serializer); serde::Serializable::serialize(obj.return_data_size, serializer); } template <> template Program::BrilligOpcode::Stop serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOpcode::Stop obj; obj.return_data_offset = serde::Deserializable::deserialize(deserializer); obj.return_data_size = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOutputs &lhs, const BrilligOutputs &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector BrilligOutputs::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOutputs BrilligOutputs::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOutputs &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::BrilligOutputs serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::BrilligOutputs obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const BrilligOutputs::Simple &lhs, const BrilligOutputs::Simple &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector BrilligOutputs::Simple::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOutputs::Simple BrilligOutputs::Simple::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOutputs::Simple &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value, serializer); } template <> template Program::BrilligOutputs::Simple serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOutputs::Simple obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const BrilligOutputs::Array &lhs, const BrilligOutputs::Array &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector BrilligOutputs::Array::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline BrilligOutputs::Array BrilligOutputs::Array::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::BrilligOutputs::Array &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value, serializer); } template <> template Program::BrilligOutputs::Array serde::Deserializable::deserialize(Deserializer &deserializer) { Program::BrilligOutputs::Array obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const Circuit &lhs, const Circuit &rhs) { if (!(lhs.current_witness_index == rhs.current_witness_index)) { return false; } if (!(lhs.opcodes == rhs.opcodes)) { return false; } if (!(lhs.expression_width == rhs.expression_width)) { return false; } if (!(lhs.private_parameters == rhs.private_parameters)) { return false; } if (!(lhs.public_parameters == rhs.public_parameters)) { return false; } if (!(lhs.return_values == rhs.return_values)) { return false; } if (!(lhs.assert_messages == rhs.assert_messages)) { return false; } if (!(lhs.recursive == rhs.recursive)) { return false; } return true; } inline std::vector Circuit::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline Circuit Circuit::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::Circuit &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.current_witness_index, serializer); serde::Serializable::serialize(obj.opcodes, serializer); serde::Serializable::serialize(obj.expression_width, serializer); serde::Serializable::serialize(obj.private_parameters, serializer); serde::Serializable::serialize(obj.public_parameters, serializer); serde::Serializable::serialize(obj.return_values, serializer); serde::Serializable::serialize(obj.assert_messages, serializer); serde::Serializable::serialize(obj.recursive, serializer); serializer.decrease_container_depth(); } template <> template Program::Circuit serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::Circuit obj; obj.current_witness_index = serde::Deserializable::deserialize(deserializer); obj.opcodes = serde::Deserializable::deserialize(deserializer); obj.expression_width = serde::Deserializable::deserialize(deserializer); obj.private_parameters = serde::Deserializable::deserialize(deserializer); obj.public_parameters = serde::Deserializable::deserialize(deserializer); obj.return_values = serde::Deserializable::deserialize(deserializer); obj.assert_messages = serde::Deserializable::deserialize(deserializer); obj.recursive = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const Directive &lhs, const Directive &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector Directive::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline Directive Directive::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::Directive &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::Directive serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::Directive obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const Directive::ToLeRadix &lhs, const Directive::ToLeRadix &rhs) { if (!(lhs.a == rhs.a)) { return false; } if (!(lhs.b == rhs.b)) { return false; } if (!(lhs.radix == rhs.radix)) { return false; } return true; } inline std::vector Directive::ToLeRadix::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline Directive::ToLeRadix Directive::ToLeRadix::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::Directive::ToLeRadix &obj, Serializer &serializer) { serde::Serializable::serialize(obj.a, serializer); serde::Serializable::serialize(obj.b, serializer); serde::Serializable::serialize(obj.radix, serializer); } template <> template Program::Directive::ToLeRadix serde::Deserializable::deserialize(Deserializer &deserializer) { Program::Directive::ToLeRadix obj; obj.a = serde::Deserializable::deserialize(deserializer); obj.b = serde::Deserializable::deserialize(deserializer); obj.radix = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const Expression &lhs, const Expression &rhs) { if (!(lhs.mul_terms == rhs.mul_terms)) { return false; } if (!(lhs.linear_combinations == rhs.linear_combinations)) { return false; } if (!(lhs.q_c == rhs.q_c)) { return false; } return true; } inline std::vector Expression::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline Expression Expression::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::Expression &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.mul_terms, serializer); serde::Serializable::serialize(obj.linear_combinations, serializer); serde::Serializable::serialize(obj.q_c, serializer); serializer.decrease_container_depth(); } template <> template Program::Expression serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::Expression obj; obj.mul_terms = serde::Deserializable::deserialize(deserializer); obj.linear_combinations = serde::Deserializable::deserialize(deserializer); obj.q_c = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const ExpressionOrMemory &lhs, const ExpressionOrMemory &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector ExpressionOrMemory::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline ExpressionOrMemory ExpressionOrMemory::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::ExpressionOrMemory &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::ExpressionOrMemory serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::ExpressionOrMemory obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const ExpressionOrMemory::Expression &lhs, const ExpressionOrMemory::Expression &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector ExpressionOrMemory::Expression::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline ExpressionOrMemory::Expression ExpressionOrMemory::Expression::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::ExpressionOrMemory::Expression &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value, serializer); } template <> template Program::ExpressionOrMemory::Expression serde::Deserializable::deserialize(Deserializer &deserializer) { Program::ExpressionOrMemory::Expression obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const ExpressionOrMemory::Memory &lhs, const ExpressionOrMemory::Memory &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector ExpressionOrMemory::Memory::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline ExpressionOrMemory::Memory ExpressionOrMemory::Memory::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::ExpressionOrMemory::Memory &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value, serializer); } template <> template Program::ExpressionOrMemory::Memory serde::Deserializable::deserialize(Deserializer &deserializer) { Program::ExpressionOrMemory::Memory obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const ExpressionWidth &lhs, const ExpressionWidth &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector ExpressionWidth::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline ExpressionWidth ExpressionWidth::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::ExpressionWidth &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::ExpressionWidth serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::ExpressionWidth obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const ExpressionWidth::Unbounded &lhs, const ExpressionWidth::Unbounded &rhs) { return true; } inline std::vector ExpressionWidth::Unbounded::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline ExpressionWidth::Unbounded ExpressionWidth::Unbounded::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::ExpressionWidth::Unbounded &obj, Serializer &serializer) { } template <> template Program::ExpressionWidth::Unbounded serde::Deserializable::deserialize(Deserializer &deserializer) { Program::ExpressionWidth::Unbounded obj; return obj; } namespace Program { inline bool operator==(const ExpressionWidth::Bounded &lhs, const ExpressionWidth::Bounded &rhs) { if (!(lhs.width == rhs.width)) { return false; } return true; } inline std::vector ExpressionWidth::Bounded::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline ExpressionWidth::Bounded ExpressionWidth::Bounded::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::ExpressionWidth::Bounded &obj, Serializer &serializer) { serde::Serializable::serialize(obj.width, serializer); } template <> template Program::ExpressionWidth::Bounded serde::Deserializable::deserialize(Deserializer &deserializer) { Program::ExpressionWidth::Bounded obj; obj.width = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const FunctionInput &lhs, const FunctionInput &rhs) { if (!(lhs.witness == rhs.witness)) { return false; } if (!(lhs.num_bits == rhs.num_bits)) { return false; } return true; } inline std::vector FunctionInput::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline FunctionInput FunctionInput::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::FunctionInput &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.witness, serializer); serde::Serializable::serialize(obj.num_bits, serializer); serializer.decrease_container_depth(); } template <> template Program::FunctionInput serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::FunctionInput obj; obj.witness = serde::Deserializable::deserialize(deserializer); obj.num_bits = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const HeapArray &lhs, const HeapArray &rhs) { if (!(lhs.pointer == rhs.pointer)) { return false; } if (!(lhs.size == rhs.size)) { return false; } return true; } inline std::vector HeapArray::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline HeapArray HeapArray::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::HeapArray &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.pointer, serializer); serde::Serializable::serialize(obj.size, serializer); serializer.decrease_container_depth(); } template <> template Program::HeapArray serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::HeapArray obj; obj.pointer = serde::Deserializable::deserialize(deserializer); obj.size = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const HeapValueType &lhs, const HeapValueType &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector HeapValueType::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline HeapValueType HeapValueType::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::HeapValueType &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::HeapValueType serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::HeapValueType obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const HeapValueType::Simple &lhs, const HeapValueType::Simple &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector HeapValueType::Simple::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline HeapValueType::Simple HeapValueType::Simple::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::HeapValueType::Simple &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value, serializer); } template <> template Program::HeapValueType::Simple serde::Deserializable::deserialize(Deserializer &deserializer) { Program::HeapValueType::Simple obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const HeapValueType::Array &lhs, const HeapValueType::Array &rhs) { if (!(lhs.value_types == rhs.value_types)) { return false; } if (!(lhs.size == rhs.size)) { return false; } return true; } inline std::vector HeapValueType::Array::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline HeapValueType::Array HeapValueType::Array::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::HeapValueType::Array &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value_types, serializer); serde::Serializable::serialize(obj.size, serializer); } template <> template Program::HeapValueType::Array serde::Deserializable::deserialize(Deserializer &deserializer) { Program::HeapValueType::Array obj; obj.value_types = serde::Deserializable::deserialize(deserializer); obj.size = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const HeapValueType::Vector &lhs, const HeapValueType::Vector &rhs) { if (!(lhs.value_types == rhs.value_types)) { return false; } return true; } inline std::vector HeapValueType::Vector::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline HeapValueType::Vector HeapValueType::Vector::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::HeapValueType::Vector &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value_types, serializer); } template <> template Program::HeapValueType::Vector serde::Deserializable::deserialize(Deserializer &deserializer) { Program::HeapValueType::Vector obj; obj.value_types = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const HeapVector &lhs, const HeapVector &rhs) { if (!(lhs.pointer == rhs.pointer)) { return false; } if (!(lhs.size == rhs.size)) { return false; } return true; } inline std::vector HeapVector::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline HeapVector HeapVector::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::HeapVector &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.pointer, serializer); serde::Serializable::serialize(obj.size, serializer); serializer.decrease_container_depth(); } template <> template Program::HeapVector serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::HeapVector obj; obj.pointer = serde::Deserializable::deserialize(deserializer); obj.size = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const MemOp &lhs, const MemOp &rhs) { if (!(lhs.operation == rhs.operation)) { return false; } if (!(lhs.index == rhs.index)) { return false; } if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector MemOp::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline MemOp MemOp::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::MemOp &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.operation, serializer); serde::Serializable::serialize(obj.index, serializer); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::MemOp serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::MemOp obj; obj.operation = serde::Deserializable::deserialize(deserializer); obj.index = serde::Deserializable::deserialize(deserializer); obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const MemoryAddress &lhs, const MemoryAddress &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector MemoryAddress::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline MemoryAddress MemoryAddress::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::MemoryAddress &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::MemoryAddress serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::MemoryAddress obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const Opcode &lhs, const Opcode &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector Opcode::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline Opcode Opcode::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::Opcode &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::Opcode serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::Opcode obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const Opcode::AssertZero &lhs, const Opcode::AssertZero &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector Opcode::AssertZero::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline Opcode::AssertZero Opcode::AssertZero::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::Opcode::AssertZero &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value, serializer); } template <> template Program::Opcode::AssertZero serde::Deserializable::deserialize(Deserializer &deserializer) { Program::Opcode::AssertZero obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const Opcode::BlackBoxFuncCall &lhs, const Opcode::BlackBoxFuncCall &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector Opcode::BlackBoxFuncCall::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline Opcode::BlackBoxFuncCall Opcode::BlackBoxFuncCall::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::Opcode::BlackBoxFuncCall &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value, serializer); } template <> template Program::Opcode::BlackBoxFuncCall serde::Deserializable::deserialize(Deserializer &deserializer) { Program::Opcode::BlackBoxFuncCall obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const Opcode::Directive &lhs, const Opcode::Directive &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector Opcode::Directive::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline Opcode::Directive Opcode::Directive::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::Opcode::Directive &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value, serializer); } template <> template Program::Opcode::Directive serde::Deserializable::deserialize(Deserializer &deserializer) { Program::Opcode::Directive obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const Opcode::MemoryOp &lhs, const Opcode::MemoryOp &rhs) { if (!(lhs.block_id == rhs.block_id)) { return false; } if (!(lhs.op == rhs.op)) { return false; } if (!(lhs.predicate == rhs.predicate)) { return false; } return true; } inline std::vector Opcode::MemoryOp::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline Opcode::MemoryOp Opcode::MemoryOp::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::Opcode::MemoryOp &obj, Serializer &serializer) { serde::Serializable::serialize(obj.block_id, serializer); serde::Serializable::serialize(obj.op, serializer); serde::Serializable::serialize(obj.predicate, serializer); } template <> template Program::Opcode::MemoryOp serde::Deserializable::deserialize(Deserializer &deserializer) { Program::Opcode::MemoryOp obj; obj.block_id = serde::Deserializable::deserialize(deserializer); obj.op = serde::Deserializable::deserialize(deserializer); obj.predicate = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const Opcode::MemoryInit &lhs, const Opcode::MemoryInit &rhs) { if (!(lhs.block_id == rhs.block_id)) { return false; } if (!(lhs.init == rhs.init)) { return false; } return true; } inline std::vector Opcode::MemoryInit::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline Opcode::MemoryInit Opcode::MemoryInit::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::Opcode::MemoryInit &obj, Serializer &serializer) { serde::Serializable::serialize(obj.block_id, serializer); serde::Serializable::serialize(obj.init, serializer); } template <> template Program::Opcode::MemoryInit serde::Deserializable::deserialize(Deserializer &deserializer) { Program::Opcode::MemoryInit obj; obj.block_id = serde::Deserializable::deserialize(deserializer); obj.init = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const Opcode::BrilligCall &lhs, const Opcode::BrilligCall &rhs) { if (!(lhs.id == rhs.id)) { return false; } if (!(lhs.inputs == rhs.inputs)) { return false; } if (!(lhs.outputs == rhs.outputs)) { return false; } if (!(lhs.predicate == rhs.predicate)) { return false; } return true; } inline std::vector Opcode::BrilligCall::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline Opcode::BrilligCall Opcode::BrilligCall::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::Opcode::BrilligCall &obj, Serializer &serializer) { serde::Serializable::serialize(obj.id, serializer); serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.outputs, serializer); serde::Serializable::serialize(obj.predicate, serializer); } template <> template Program::Opcode::BrilligCall serde::Deserializable::deserialize(Deserializer &deserializer) { Program::Opcode::BrilligCall obj; obj.id = serde::Deserializable::deserialize(deserializer); obj.inputs = serde::Deserializable::deserialize(deserializer); obj.outputs = serde::Deserializable::deserialize(deserializer); obj.predicate = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const Opcode::Call &lhs, const Opcode::Call &rhs) { if (!(lhs.id == rhs.id)) { return false; } if (!(lhs.inputs == rhs.inputs)) { return false; } if (!(lhs.outputs == rhs.outputs)) { return false; } if (!(lhs.predicate == rhs.predicate)) { return false; } return true; } inline std::vector Opcode::Call::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline Opcode::Call Opcode::Call::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::Opcode::Call &obj, Serializer &serializer) { serde::Serializable::serialize(obj.id, serializer); serde::Serializable::serialize(obj.inputs, serializer); serde::Serializable::serialize(obj.outputs, serializer); serde::Serializable::serialize(obj.predicate, serializer); } template <> template Program::Opcode::Call serde::Deserializable::deserialize(Deserializer &deserializer) { Program::Opcode::Call obj; obj.id = serde::Deserializable::deserialize(deserializer); obj.inputs = serde::Deserializable::deserialize(deserializer); obj.outputs = serde::Deserializable::deserialize(deserializer); obj.predicate = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const OpcodeLocation &lhs, const OpcodeLocation &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector OpcodeLocation::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline OpcodeLocation OpcodeLocation::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::OpcodeLocation &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::OpcodeLocation serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::OpcodeLocation obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const OpcodeLocation::Acir &lhs, const OpcodeLocation::Acir &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector OpcodeLocation::Acir::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline OpcodeLocation::Acir OpcodeLocation::Acir::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::OpcodeLocation::Acir &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value, serializer); } template <> template Program::OpcodeLocation::Acir serde::Deserializable::deserialize(Deserializer &deserializer) { Program::OpcodeLocation::Acir obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const OpcodeLocation::Brillig &lhs, const OpcodeLocation::Brillig &rhs) { if (!(lhs.acir_index == rhs.acir_index)) { return false; } if (!(lhs.brillig_index == rhs.brillig_index)) { return false; } return true; } inline std::vector OpcodeLocation::Brillig::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline OpcodeLocation::Brillig OpcodeLocation::Brillig::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::OpcodeLocation::Brillig &obj, Serializer &serializer) { serde::Serializable::serialize(obj.acir_index, serializer); serde::Serializable::serialize(obj.brillig_index, serializer); } template <> template Program::OpcodeLocation::Brillig serde::Deserializable::deserialize(Deserializer &deserializer) { Program::OpcodeLocation::Brillig obj; obj.acir_index = serde::Deserializable::deserialize(deserializer); obj.brillig_index = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const Program &lhs, const Program &rhs) { if (!(lhs.functions == rhs.functions)) { return false; } if (!(lhs.unconstrained_functions == rhs.unconstrained_functions)) { return false; } return true; } inline std::vector Program::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline Program Program::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::Program &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.functions, serializer); serde::Serializable::serialize(obj.unconstrained_functions, serializer); serializer.decrease_container_depth(); } template <> template Program::Program serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::Program obj; obj.functions = serde::Deserializable::deserialize(deserializer); obj.unconstrained_functions = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const PublicInputs &lhs, const PublicInputs &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector PublicInputs::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline PublicInputs PublicInputs::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::PublicInputs &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::PublicInputs serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::PublicInputs obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const ValueOrArray &lhs, const ValueOrArray &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector ValueOrArray::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline ValueOrArray ValueOrArray::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::ValueOrArray &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::ValueOrArray serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::ValueOrArray obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; } namespace Program { inline bool operator==(const ValueOrArray::MemoryAddress &lhs, const ValueOrArray::MemoryAddress &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector ValueOrArray::MemoryAddress::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline ValueOrArray::MemoryAddress ValueOrArray::MemoryAddress::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::ValueOrArray::MemoryAddress &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value, serializer); } template <> template Program::ValueOrArray::MemoryAddress serde::Deserializable::deserialize(Deserializer &deserializer) { Program::ValueOrArray::MemoryAddress obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const ValueOrArray::HeapArray &lhs, const ValueOrArray::HeapArray &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector ValueOrArray::HeapArray::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline ValueOrArray::HeapArray ValueOrArray::HeapArray::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::ValueOrArray::HeapArray &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value, serializer); } template <> template Program::ValueOrArray::HeapArray serde::Deserializable::deserialize(Deserializer &deserializer) { Program::ValueOrArray::HeapArray obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const ValueOrArray::HeapVector &lhs, const ValueOrArray::HeapVector &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector ValueOrArray::HeapVector::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline ValueOrArray::HeapVector ValueOrArray::HeapVector::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::ValueOrArray::HeapVector &obj, Serializer &serializer) { serde::Serializable::serialize(obj.value, serializer); } template <> template Program::ValueOrArray::HeapVector serde::Deserializable::deserialize(Deserializer &deserializer) { Program::ValueOrArray::HeapVector obj; obj.value = serde::Deserializable::deserialize(deserializer); return obj; } namespace Program { inline bool operator==(const Witness &lhs, const Witness &rhs) { if (!(lhs.value == rhs.value)) { return false; } return true; } inline std::vector Witness::bincodeSerialize() const { auto serializer = serde::BincodeSerializer(); serde::Serializable::serialize(*this, serializer); return std::move(serializer).bytes(); } inline Witness Witness::bincodeDeserialize(std::vector input) { auto deserializer = serde::BincodeDeserializer(input); auto value = serde::Deserializable::deserialize(deserializer); if (deserializer.get_buffer_offset() < input.size()) { throw serde::deserialization_error("Some input bytes were not read"); } return value; } } // end of namespace Program template <> template void serde::Serializable::serialize(const Program::Witness &obj, Serializer &serializer) { serializer.increase_container_depth(); serde::Serializable::serialize(obj.value, serializer); serializer.decrease_container_depth(); } template <> template Program::Witness serde::Deserializable::deserialize(Deserializer &deserializer) { deserializer.increase_container_depth(); Program::Witness obj; obj.value = serde::Deserializable::deserialize(deserializer); deserializer.decrease_container_depth(); return obj; }