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

Function check_signature

common/bolt12.c:90–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

offer_decodeFunction · 0.85
invoice_decodeFunction · 0.85

Calls 1

bolt12_check_signatureFunction · 0.85

Tested by

no test coverage detected