Snarky_backendless.RequestCustom requests.
These allow checked computations to use information that isn't passed as arguments -- and hence isn't compiled into the proof. These can be used to include 'secret' information in computations which should be hidden from verifiers.
To add a new kind of request, extend t:
type _ Request.t += Foo : request_type -> result_type Request.tWhen a checked computation comp makes a request (Snark_intf.Basic.request) using the new Foo constructor, you can attach a handler to respond to it with Snark_intf.Basic.handle:
let handled_comp = handle comp (fun (With {request; respond}) ->
match request with
| Foo data ->
let value = (* ... *) in
respond (Provide value)
| _ -> unhandled)The type of all requests. This is an open type: you can extend it with your own requests as needed.
type 'a req = 'a tThe type of responses. Use respond to create a response from a Response.t.
val unhandled : responseIndicates an unhandled response. Equivalent to calling respond on Response.Unhandled.
module Response : sig ... end