|
| std::string | bb::nodejs::extract_error_from_napi_value (const Napi::CallbackInfo &cb_info) |
| | Extracts error message from a Napi value (string or Error object)
|
| |
| Napi::Function | bb::nodejs::create_buffer_resolve_handler (Napi::Env env, std::shared_ptr< CallbackResults > cb_results) |
| | Creates a resolve handler for promises that return Buffer | undefined.
|
| |
| Napi::Function | bb::nodejs::create_string_resolve_handler (Napi::Env env, std::shared_ptr< CallbackResults > cb_results) |
| | Creates a resolve handler for promises that return string | undefined.
|
| |
| Napi::Function | bb::nodejs::create_void_resolve_handler (Napi::Env env, std::shared_ptr< CallbackResults > cb_results) |
| | Creates a resolve handler for promises that return void.
|
| |
| Napi::Function | bb::nodejs::create_reject_handler (Napi::Env env, std::shared_ptr< CallbackResults > cb_results) |
| | Creates a reject handler for promises.
|
| |
| void | bb::nodejs::attach_promise_handlers (Napi::Promise promise, Napi::Function resolve_handler, Napi::Function reject_handler) |
| | Attaches resolve and reject handlers to a promise.
|
| |
| template<typename T > |
| std::vector< uint8_t > | bb::nodejs::serialize_to_msgpack (const T &data) |
| | Serializes data to msgpack format.
|
| |
| template<typename T > |
| T | bb::nodejs::deserialize_from_msgpack (const std::vector< uint8_t > &data, const std::string &type_name) |
| | Deserializes msgpack data to a specific type.
|
| |
| std::optional< std::vector< uint8_t > > | bb::nodejs::invoke_ts_callback_with_promise (const Napi::ThreadSafeFunction &callback, const std::string &operation_name, std::function< void(Napi::Env, Napi::Function, std::shared_ptr< CallbackResults >)> call_js_function, std::chrono::seconds timeout=std::chrono::seconds(30)) |
| | Generic callback invoker that handles the full BlockingCall pattern.
|
| |
| std::optional< std::vector< uint8_t > > | bb::nodejs::invoke_single_string_callback (const Napi::ThreadSafeFunction &callback, const std::string &input_str, const std::string &operation_name) |
| | Helper for callbacks that take a single string argument and return Buffer | undefined.
|
| |
| std::optional< std::vector< uint8_t > > | bb::nodejs::invoke_double_string_callback (const Napi::ThreadSafeFunction &callback, const std::string &input_str1, const std::string &input_str2, const std::string &operation_name) |
| | Helper for callbacks that take two string arguments and return string | undefined.
|
| |
| void | bb::nodejs::invoke_buffer_void_callback (const Napi::ThreadSafeFunction &callback, std::vector< uint8_t > buffer_data, const std::string &operation_name) |
| | Helper for callbacks that take a buffer and return void.
|
| |
| std::string | bb::nodejs::ff_to_string (const bb::avm2::FF &value) |
| | Converts an FF (field element) to a hex string.
|
| |