Need Help Verifying Compact Syntax for AI Inference Tutorial

Hi! Writing a contributor hub tutorial on private AI inference with ZKPs. Need to verify a few Compact syntax details:

  1. Is Opaque<"string"> correct for arbitrary-length strings?

compact

   witness get_private_document(): Opaque<"string">;
  1. How do I hash data in circuits? Is there a built-in sha256() for computing sha256(content + secret)?

  2. Can witness functions return Opaque<"string"> or are there size limits?

  3. Is self.context.field_name correct syntax for accessing a circuit’s own private state?

3 Likes