Browse Source
Previously, returned null if a scriptpubkey was not Segwit; now handles encoding to Base58 for other types.travis-debug
lisa neigut
5 years ago
committed by
Rusty Russell
8 changed files with 31 additions and 14 deletions
@ -1,12 +1,13 @@ |
|||
#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 P2WSH or P2WPKH scriptPubkey, return a bech32 encoded address */ |
|||
/* Given a scriptPubkey, return an encoded address */ |
|||
char *encode_scriptpubkey_to_addr(const tal_t *ctx, |
|||
const char *hrp, |
|||
const struct chainparams *chainparams, |
|||
const u8 *scriptPubkey); |
|||
|
|||
#endif /* LIGHTNING_COMMON_ADDR_H */ |
|||
|
Loading…
Reference in new issue