Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
init_module.cpp
Go to the documentation of this file.
6#include "napi.h"
7
8Napi::Object Init(Napi::Env env, Napi::Object exports)
9{
10 exports.Set(Napi::String::New(env, "WorldState"), bb::nodejs::WorldStateWrapper::get_class(env));
11 exports.Set(Napi::String::New(env, "LMDBStore"), bb::nodejs::lmdb_store::LMDBStoreWrapper::get_class(env));
12 exports.Set(Napi::String::New(env, "MsgpackClient"),
14 exports.Set(Napi::String::New(env, "MsgpackClientAsync"),
16 exports.Set(Napi::String::New(env, "avmSimulate"), Napi::Function::New(env, bb::nodejs::AvmSimulateNapi::simulate));
17 exports.Set(Napi::String::New(env, "avmSimulateWithHintedDbs"),
19 return exports;
20}
21
22// NOLINTNEXTLINE
23NODE_API_MODULE(addon, Init)
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.
static Napi::Function get_class(Napi::Env)
Register the WorldStateAddon class with the JavaScript runtime.
static Napi::Function get_class(Napi::Env env)
static Napi::Function get_class(Napi::Env env)
Napi::Object Init(Napi::Env env, Napi::Object exports)