| 28 | } |
| 29 | |
| 30 | static const char *offer_description_from_b12(const tal_t *ctx, |
| 31 | struct lightningd *ld, |
| 32 | const char *b12) |
| 33 | { |
| 34 | struct tlv_offer *offer; |
| 35 | const char *fail; |
| 36 | |
| 37 | offer = offer_decode(ctx, b12, strlen(b12), |
| 38 | NULL, NULL, &fail); |
| 39 | if (!offer) { |
| 40 | log_debug(ld->log, "Failed to decode BOLT12: %s", fail); |
| 41 | return NULL; |
| 42 | } |
| 43 | |
| 44 | if (!offer->offer_description) |
| 45 | return NULL; |
| 46 | |
| 47 | return offer->offer_description; |
| 48 | } |
| 49 | |
| 50 | static struct command_result *param_b12_offer(struct command *cmd, |
| 51 | const char *name, |
no test coverage detected