#Why are requests and handlers not exposed in SnarkyJS?
7 messages · Page 1 of 1 (latest)
I think we answered this in office hours?
@quaint yoke The question that I'd have is -- should they be exposed? (Or recreated on the JS side) I think they offer a fairly clean/robust, but somewhat cumbersome way to get values from outside anywhere into the circuit. They same can be done in a variety of other ways, which feel more brittle or "ad hoc". We actually have created some of these ad hoc solutions for snarkyjs internal use.
Spinning this further, maybe an API that would fit in with how smart contract methods are written, and feels JS-native, is to pass a callback into the method for every handler? We could support that with a new custom "Callback" Struct