mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
a9d0550cf4
We're going to need this for P2WSH scripts. pull it out into a common file plus adopt the sanity checks so that it will allow for either P2WSH or P2WPKH (previously only encoded P2WPKH scripts)
13 lines
429 B
C
13 lines
429 B
C
#ifndef LIGHTNING_COMMON_ADDR_H
|
|
#define LIGHTNING_COMMON_ADDR_H
|
|
#include "config.h"
|
|
#include <ccan/short_types/short_types.h>
|
|
#include <ccan/tal/tal.h>
|
|
|
|
/* Given a P2WSH or P2WPKH scriptPubkey, return a bech32 encoded address */
|
|
char *encode_scriptpubkey_to_addr(const tal_t *ctx,
|
|
const char *hrp,
|
|
const u8 *scriptPubkey);
|
|
|
|
#endif /* LIGHTNING_COMMON_ADDR_H */
|