bitcoin/base58: p2sh address support.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-01-22 06:41:46 +10:30
parent 2516a187bc
commit 04fd2c861f
2 changed files with 65 additions and 18 deletions

View File

@@ -31,6 +31,13 @@ bool bitcoin_from_base58(bool *test_net,
struct bitcoin_address *addr,
const char *base58, size_t len);
/* P2SH address encoded as base58, with version and checksum */
char *p2sh_to_base58(const tal_t *ctx, bool test_net,
const struct ripemd160 *p2sh);
bool p2sh_from_base58(bool *test_net,
struct ripemd160 *p2sh,
const char *base58, size_t len);
bool ripemd_from_base58(u8 *version, struct ripemd160 *ripemd160,
const char *base58);