| 176 | } |
| 177 | |
| 178 | struct 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 | |
| 199 | struct checker { |
| 200 | const struct tlv_payer_proof *pptlv; |
nothing calls this directly
no test coverage detected