You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you pass in a program it will compile it; if you pass in a program and a witness it will also typecheck the witness and then output an encoding of that. The impression the user gets is that we're "compiling" the witness somehow but actually we're just checking and re-encoding it.
The witness is output in a base64 encoding. It should be hex, so that it's visually distinct from the program (and also witness data is reasonably likely to be byte-aligned, unlike programs, so hex is a nice encoding).
The output is on stdout but it's not machine-readable unless you pass the --json flag.
I propose:
We default to JSON output; an object with three fields compiled_program, missing_witnesses, witness.
We output a map of missing witnesses and their types (so users know what's needed and this will also help make .wit files, especially while Witness files should not require explicit type annotations #177 is unfixed). Otherwise the missing_witnesses field is omitted.
If all witnesses are provided we output the complete witness in hex. Otherwise we output the field as null.
There are a few problems with
simcright now:--jsonflag.I propose:
compiled_program,missing_witnesses,witness.missing_witnessesfield is omitted.null.