50 Napi::ThreadSafeFunction classCallback,
51 Napi::ThreadSafeFunction addContractsCallback,
52 Napi::ThreadSafeFunction bytecodeCommitmentCallback,
53 Napi::ThreadSafeFunction debugNameCallback,
54 Napi::ThreadSafeFunction createCheckpointCallback,
55 Napi::ThreadSafeFunction commitCheckpointCallback,
56 Napi::ThreadSafeFunction revertCheckpointCallback);
std::shared_ptr< Napi::ThreadSafeFunction > add_contracts
Implementation of ContractDBInterface that uses NAPI callbacks to TypeScript.
std::optional< bb::avm2::ContractClass > get_contract_class(const bb::avm2::ContractClassId &class_id) const override
Fetches a contract class by class ID.
void revert_checkpoint() override
Reverts the current checkpoint.
std::optional< std::string > get_debug_function_name(const bb::avm2::AztecAddress &address, const bb::avm2::FF &selector) const override
Fetches debug function name for a contract function.
void commit_checkpoint() override
Commits the current checkpoint.
std::optional< bb::avm2::ContractInstance > get_contract_instance(const bb::avm2::AztecAddress &address) const override
Fetches a contract instance by address.
Napi::ThreadSafeFunction create_checkpoint_callback_
Napi::ThreadSafeFunction bytecode_commitment_callback_
std::optional< bb::avm2::FF > get_bytecode_commitment(const bb::avm2::ContractClassId &class_id) const override
Fetches bytecode commitment for a contract class.
void release()
Releases the thread-safe function handles.
Napi::ThreadSafeFunction contract_class_callback_
Napi::ThreadSafeFunction revert_checkpoint_callback_
void create_checkpoint() override
Creates a new checkpoint.
Napi::ThreadSafeFunction debug_name_callback_
Napi::ThreadSafeFunction add_contracts_callback_
Napi::ThreadSafeFunction commit_checkpoint_callback_
Napi::ThreadSafeFunction contract_instance_callback_
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept