|
@ -108,6 +108,21 @@ struct command_result *param_pubkey(struct command *cmd, const char *name, |
|
|
json_tok_full(buffer, tok)); |
|
|
json_tok_full(buffer, tok)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
struct command_result *param_txid(struct command *cmd, |
|
|
|
|
|
const char *name, |
|
|
|
|
|
const char *buffer, |
|
|
|
|
|
const jsmntok_t *tok, |
|
|
|
|
|
struct bitcoin_txid **txid) |
|
|
|
|
|
{ |
|
|
|
|
|
*txid = tal(cmd, struct bitcoin_txid); |
|
|
|
|
|
if (json_to_txid(buffer, tok, *txid)) |
|
|
|
|
|
return NULL; |
|
|
|
|
|
return command_fail(cmd, JSONRPC2_INVALID_PARAMS, |
|
|
|
|
|
"'%s' should be txid, not '%.*s'", |
|
|
|
|
|
name, json_tok_full_len(tok), |
|
|
|
|
|
json_tok_full(buffer, tok)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
void json_add_short_channel_id(struct json_stream *response, |
|
|
void json_add_short_channel_id(struct json_stream *response, |
|
|
const char *fieldname, |
|
|
const char *fieldname, |
|
|
const struct short_channel_id *scid) |
|
|
const struct short_channel_id *scid) |
|
|