libplugin: add command_finish_rawstr() for when we're simply repeating an entore response.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2026-02-16 17:24:33 +10:30
parent edbad6cdca
commit 9bcac63414
2 changed files with 31 additions and 4 deletions

View File

@@ -363,6 +363,13 @@ WARN_UNUSED_RESULT
struct command_result *command_still_pending(struct command *cmd)
NON_NULL_ARGS(1);
/* Forward this raw JSON string as the command response */
WARN_UNUSED_RESULT
struct command_result *command_finish_rawstr(struct command *cmd,
const char *json,
size_t json_len)
NO_NULL_ARGS;
/* Helper to create a zero or single-value JSON object; if @str is NULL,
* object is empty. */
struct json_out *json_out_obj(const tal_t *ctx,