|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
NAPI wrapper for the C++ AVM simulation. More...
#include <avm_simulate_napi.hpp>
Static Public Member Functions | |
| static Napi::Value | simulate (const Napi::CallbackInfo &info) |
| NAPI function to simulate AVM execution. | |
| static Napi::Value | simulateWithHintedDbs (const Napi::CallbackInfo &info) |
| NAPI function to simulate AVM execution with pre-collected hints. | |
NAPI wrapper for the C++ AVM simulation.
This class provides the bridge between TypeScript and the C++ avm_simulate*() functions. It handles deserialization of inputs, execution on a worker thread, and serialization of results.
The simulate variation uses real world state and uses callbacks to TS for contract DB.
The simulateWithHintedDbs variation uses pre-collected hints for world state and contracts DB. There are no callbacks to TS or direct calls to world state.
Definition at line 18 of file avm_simulate_napi.hpp.
|
static |
NAPI function to simulate AVM execution.
Expected arguments:
Returns: Promise<Buffer> containing serialized simulation results
| info | NAPI callback info containing arguments |
Definition at line 115 of file avm_simulate_napi.cpp.
|
static |
NAPI function to simulate AVM execution with pre-collected hints.
Expected arguments:
| info | NAPI callback info containing arguments |
Definition at line 235 of file avm_simulate_napi.cpp.