2021-12-04 21:53:56 +10:30
|
|
|
#include "config.h"
|
2020-05-15 20:01:24 +09:30
|
|
|
#include <bitcoin/preimage.h>
|
2024-03-20 11:10:16 +10:30
|
|
|
#include <common/utils.h>
|
2020-05-15 20:01:24 +09:30
|
|
|
#include <wire/wire.h>
|
|
|
|
|
|
|
|
void fromwire_preimage(const u8 **cursor, size_t *max, struct preimage *preimage)
|
|
|
|
{
|
|
|
|
fromwire(cursor, max, preimage, sizeof(*preimage));
|
|
|
|
}
|
|
|
|
|
|
|
|
void towire_preimage(u8 **pptr, const struct preimage *preimage)
|
|
|
|
{
|
|
|
|
towire(pptr, preimage, sizeof(*preimage));
|
|
|
|
}
|
|
|
|
|
2024-03-20 11:10:16 +10:30
|
|
|
char *fmt_preimage(const tal_t *ctx, const struct preimage *preimage)
|
|
|
|
{
|
|
|
|
return tal_hexstr(ctx, preimage, sizeof(*preimage));
|
|
|
|
}
|