mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
74ef03d361
It's an internal difference, so doesn't actually break compatibility (it would if we tried to prove we owned an old invoicerequest, but we don't have infrastructure for that anyway). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
25 lines
827 B
C
25 lines
827 B
C
#ifndef LIGHTNING_COMMON_BOLT12_MERKLE_H
|
|
#define LIGHTNING_COMMON_BOLT12_MERKLE_H
|
|
#include "config.h"
|
|
#include <common/bolt12.h>
|
|
|
|
/**
|
|
* merkle_tlv - bolt12-style merkle hash of this tlv minus signature fields
|
|
* @fields: tal_arr of fields from tlv.
|
|
* @merkle: returned merkle hash.
|
|
*/
|
|
void merkle_tlv(const struct tlv_field *fields, struct sha256 *merkle);
|
|
|
|
/**
|
|
* sighash_from_merkle - bolt12-style signature hash using this merkle root.
|
|
* @messagename: message name, such as "offer".
|
|
* @fieldname: field name, such as "recurrence_signature".
|
|
* @merkle: the merkle root as calculated by merkle_tlv.
|
|
* @sighash: the returned hash.
|
|
*/
|
|
void sighash_from_merkle(const char *messagename,
|
|
const char *fieldname,
|
|
const struct sha256 *merkle,
|
|
struct sha256 *sighash);
|
|
#endif /* LIGHTNING_COMMON_BOLT12_MERKLE_H */
|