23 Napi::Value
call(
const Napi::CallbackInfo&);
28 static Napi::Function
get_class(Napi::Env);
31 std::unique_ptr<bb::world_state::WorldState>
_ws;
53 bool commit(msgpack::object& obj, msgpack::sbuffer&
buffer);
61 bool close(msgpack::object& obj, msgpack::sbuffer&
buffer);
64 bool unwind(msgpack::object& obj, msgpack::sbuffer&
buffer)
const;
Manages the interaction between the JavaScript runtime and the WorldState class.
bool get_tree_info(msgpack::object &obj, msgpack::sbuffer &buffer) const
bool get_initial_state_reference(msgpack::object &obj, msgpack::sbuffer &buffer) const
std::unique_ptr< bb::world_state::WorldState > _ws
bool find_low_leaf(msgpack::object &obj, msgpack::sbuffer &buffer) const
bool get_leaf_value(msgpack::object &obj, msgpack::sbuffer &buffer) const
bool update_archive(msgpack::object &obj, msgpack::sbuffer &buffer)
bool rollback(msgpack::object &obj, msgpack::sbuffer &buffer)
bool set_finalized(msgpack::object &obj, msgpack::sbuffer &buffer) const
bool get_state_reference(msgpack::object &obj, msgpack::sbuffer &buffer) const
bb::messaging::MessageDispatcher _dispatcher
bool remove_historical(msgpack::object &obj, msgpack::sbuffer &buffer) const
bool get_leaf_preimage(msgpack::object &obj, msgpack::sbuffer &buffer) const
bool sequential_insert(msgpack::object &obj, msgpack::sbuffer &buffer)
bool get_block_numbers_for_leaf_indices(msgpack::object &obj, msgpack::sbuffer &buffer) const
bool delete_fork(msgpack::object &obj, msgpack::sbuffer &buffer)
bool revert_checkpoint(msgpack::object &obj, msgpack::sbuffer &buffer)
bool find_sibling_paths(msgpack::object &obj, msgpack::sbuffer &buffer) const
bool sync_block(msgpack::object &obj, msgpack::sbuffer &buffer)
bool close(msgpack::object &obj, msgpack::sbuffer &buffer)
bool create_fork(msgpack::object &obj, msgpack::sbuffer &buffer)
static Napi::Function get_class(Napi::Env)
Register the WorldStateAddon class with the JavaScript runtime.
bool append_leaves(msgpack::object &obj, msgpack::sbuffer &buffer)
bool commit_all_checkpoints(msgpack::object &obj, msgpack::sbuffer &buffer)
bool copy_stores(msgpack::object &obj, msgpack::sbuffer &buffer)
bool revert_all_checkpoints(msgpack::object &obj, msgpack::sbuffer &buffer)
bool find_leaf_indices(msgpack::object &obj, msgpack::sbuffer &buffer) const
bool get_status(msgpack::object &obj, msgpack::sbuffer &buffer) const
bool unwind(msgpack::object &obj, msgpack::sbuffer &buffer) const
bool commit_checkpoint(msgpack::object &obj, msgpack::sbuffer &buffer)
bool checkpoint(msgpack::object &obj, msgpack::sbuffer &buffer)
bool batch_insert(msgpack::object &obj, msgpack::sbuffer &buffer)
bool get_sibling_path(msgpack::object &obj, msgpack::sbuffer &buffer) const
Napi::Value call(const Napi::CallbackInfo &)
The only instance method exposed to JavaScript. Takes a msgpack Message and returns a Promise.
bool commit(msgpack::object &obj, msgpack::sbuffer &buffer)
uint8_t buffer[RANDOM_BUFFER_SIZE]