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

Function payer_proof_signature_

common/bolt12_proof.c:178–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178struct bip340sig *payer_proof_signature_(const tal_t *ctx,
179 const struct tlv_payer_proof *unsignedproof,
180 bool (*sign)(const char *messagename,
181 const char *fieldname,
182 const struct sha256 *msg,
183 struct bip340sig *sig,
184 void *arg),
185 void *arg)
186{
187 struct sha256 merkle;
188 struct bip340sig *sig;
189
190 bolt12_payer_proof_merkle(unsignedproof, &merkle);
191
192 sig = tal(ctx, struct bip340sig);
193 if (!sign("payer_proof", "proof_signature", &merkle, sig, arg))
194 sig = tal_free(sig);
195
196 return sig;
197}
198
199struct checker {
200 const struct tlv_payer_proof *pptlv;

Callers

nothing calls this directly

Calls 3

signFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected