FIXME(vincenzopalazzo): move this to comm/bolt12.h */
| 410 | |
| 411 | /* FIXME(vincenzopalazzo): move this to comm/bolt12.h */ |
| 412 | static struct command_result *param_b12_invreq(struct command *cmd, |
| 413 | const char *name, |
| 414 | const char *buffer, |
| 415 | const jsmntok_t *tok, |
| 416 | struct tlv_invoice_request **invreq) |
| 417 | { |
| 418 | const char *fail; |
| 419 | |
| 420 | *invreq = invrequest_decode(cmd, buffer + tok->start, |
| 421 | tok->end - tok->start, |
| 422 | cmd->ld->our_features, chainparams, &fail); |
| 423 | if (!*invreq) |
| 424 | return command_fail_badparam(cmd, name, buffer, tok, fail); |
| 425 | |
| 426 | if (!(*invreq)->invreq_metadata) |
| 427 | return command_fail_badparam(cmd, name, buffer, tok, |
| 428 | "must have invreq_metadata"); |
| 429 | |
| 430 | if (!(*invreq)->invreq_payer_id) |
| 431 | return command_fail_badparam(cmd, name, buffer, tok, |
| 432 | "must have invreq_payer_id"); |
| 433 | return NULL; |
| 434 | } |
| 435 | |
| 436 | static bool payer_key(struct lightningd *ld, |
| 437 | const u8 *public_tweak, size_t public_tweak_len, |
nothing calls this directly
no test coverage detected