core-lightning/bitcoin/address.c
Rusty Russell 612d713470 Move bitcoin stuff into bitcoin subdir.
It's not very interesting if you're looking for LN code.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-12 12:35:42 +09:30

12 lines
264 B
C

#include "address.h"
#include "pubkey.h"
#include <ccan/crypto/sha256/sha256.h>
void bitcoin_address(const struct pubkey *key, struct bitcoin_address *addr)
{
struct sha256 h;
sha256(&h, key->key, pubkey_len(key));
RIPEMD160(h.u.u8, sizeof(h), addr->addr);
}