MCPcopy Create free account
hub / github.com/ElementsProject/lightning / offer_description_from_b12

Function offer_description_from_b12

lightningd/offer.c:30–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30static 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
50static struct command_result *param_b12_offer(struct command *cmd,
51 const char *name,

Callers 3

json_listoffersFunction · 0.85
json_disableofferFunction · 0.85
json_enableofferFunction · 0.85

Calls 1

offer_decodeFunction · 0.85

Tested by

no test coverage detected