NilFoundation / zkLLVM

Zero-Knowledge Proof Systems Circuit Compiler
https://docs.nil.foundation/zkllvm
286 stars 48 forks source link

[Feature request]: pass hex strings for array initialization #483

Open HristoStaykov opened 9 months ago

HristoStaykov commented 9 months ago

It will be useful for the .json input of a circuit to be able to pass a hex string to be used to initialize a byte array (std::array<unsigned char, N>.

There is currently support for passing a hex string to initialize a "typename pallas::base_field_type::value_type". It will be useful to support it for arrays of bytes as well.

Additional context For reference we can see the input in the examples where we have hex strings to initialize circuit arguments of type "typename pallas::base_field_type::value_type" -> ed25519_field_add.inp