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

Function check_signature

common/bolt12.c:94–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94static char *check_signature(const tal_t *ctx,
95 const struct tlv_field *fields,
96 const char *messagename,
97 const char *fieldname,
98 const struct pubkey *node_id,
99 const struct bip340sig *sig)
100{
101 if (!node_id)
102 return tal_fmt(ctx, "Missing node_id");
103 if (!sig)
104 return tal_fmt(ctx, "Missing signature");
105
106 if (!bolt12_check_signature(fields,
107 messagename, fieldname, node_id, sig))
108 return tal_fmt(ctx, "Invalid signature");
109 return NULL;
110}
111
112const u8 *b12_string_to_data(const tal_t *ctx,
113 const char *str,

Callers 1

invoice_decodeFunction · 0.85

Calls 1

bolt12_check_signatureFunction · 0.85

Tested by

no test coverage detected