@ -2,6 +2,7 @@
# define LIGHTNING_BITCOIN_BASE58_H
# define LIGHTNING_BITCOIN_BASE58_H
# include "config.h"
# include "config.h"
# include <bitcoin/chainparams.h>
# include <ccan/crypto/ripemd160/ripemd160.h>
# include <ccan/crypto/ripemd160/ripemd160.h>
# include <ccan/short_types/short_types.h>
# include <ccan/short_types/short_types.h>
# include <ccan/tal/tal.h>
# include <ccan/tal/tal.h>
@ -13,13 +14,13 @@ struct privkey;
struct bitcoin_address ;
struct bitcoin_address ;
/* Bitcoin address encoded in base58, with version and checksum */
/* Bitcoin address encoded in base58, with version and checksum */
char * bitcoin_to_base58 ( const tal_t * ctx , bool test_net ,
char * bitcoin_to_base58 ( const tal_t * ctx , const struct chainparams * chainparams ,
const struct bitcoin_address * addr ) ;
const struct bitcoin_address * addr ) ;
bool bitcoin_from_base58 ( u8 * version , struct bitcoin_address * addr ,
bool bitcoin_from_base58 ( u8 * version , struct bitcoin_address * addr ,
const char * base58 , size_t len ) ;
const char * base58 , size_t len ) ;
/* P2SH address encoded as base58, with version and checksum */
/* P2SH address encoded as base58, with version and checksum */
char * p2sh_to_base58 ( const tal_t * ctx , bool test_net ,
char * p2sh_to_base58 ( const tal_t * ctx , const struct chainparams * chainparams ,
const struct ripemd160 * p2sh ) ;
const struct ripemd160 * p2sh ) ;
bool p2sh_from_base58 ( u8 * version , struct ripemd160 * p2sh , const char * base58 ,
bool p2sh_from_base58 ( u8 * version , struct ripemd160 * p2sh , const char * base58 ,
size_t len ) ;
size_t len ) ;