|
6 | 6 | #include "barretenberg/bbapi/bbapi_ecc.hpp" |
7 | 7 | #include "barretenberg/bbapi/bbapi_ecdsa.hpp" |
8 | 8 | #include "barretenberg/bbapi/bbapi_schnorr.hpp" |
| 9 | +#include "barretenberg/bbapi/bbapi_schema.hpp" |
9 | 10 | #include "barretenberg/bbapi/bbapi_shared.hpp" |
10 | 11 | #include "barretenberg/bbapi/bbapi_srs.hpp" |
11 | 12 | #include "barretenberg/bbapi/bbapi_ultra_honk.hpp" |
@@ -148,26 +149,6 @@ using CommandResponse = NamedUnion<ErrorResponse, |
148 | 149 | * @param request The circuit registry (acting as the request context). |
149 | 150 | * @return A variant of all possible command responses. |
150 | 151 | */ |
151 | | -inline CommandResponse execute(BBApiRequest& request, Command&& command) |
152 | | -{ |
153 | | - // Reset error state before execution |
154 | | - request.error_message.clear(); |
155 | | - |
156 | | - CommandResponse response = std::move(command).visit([&request](auto&& cmd) -> CommandResponse { |
157 | | - using CmdType = std::decay_t<decltype(cmd)>; |
158 | | - return std::forward<CmdType>(cmd).execute(request); |
159 | | - }); |
160 | | - |
161 | | - // Check if an error occurred during execution |
162 | | - if (!request.error_message.empty()) { |
163 | | - return ErrorResponse{ .message = std::move(request.error_message) }; |
164 | | - } |
165 | | - |
166 | | - return response; |
167 | | -} |
168 | | - |
169 | | -// The msgpack scheme is an ad-hoc format that allows for cbind/compiler.ts to |
170 | | -// generate TypeScript bindings for the API. |
171 | | -std::string get_msgpack_schema_as_json(); |
| 152 | +CommandResponse execute(BBApiRequest& request, Command&& command); |
172 | 153 |
|
173 | 154 | } // namespace bb::bbapi |
0 commit comments