core-lightning/common/addr.h
lisa neigut 963a1da958 addr: handle P2SH/P2PKH in scriptpubkey encoding
Previously, returned null if a scriptpubkey was not Segwit; now
handles encoding to Base58 for other types.
2019-11-13 03:31:20 +00:00

14 lines
434 B
C

#ifndef LIGHTNING_COMMON_ADDR_H
#define LIGHTNING_COMMON_ADDR_H
#include "config.h"
#include <bitcoin/chainparams.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
/* Given a scriptPubkey, return an encoded address */
char *encode_scriptpubkey_to_addr(const tal_t *ctx,
const struct chainparams *chainparams,
const u8 *scriptPubkey);
#endif /* LIGHTNING_COMMON_ADDR_H */