mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
07c7214edb
This checks that the protobuf is the right form, also handles uncompressed keys (though you shouldn't be using those any more, should you?) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 lines
423 B
C
16 lines
423 B
C
#ifndef LIGHTNING_BITCOIN_ADDRESS_H
|
|
#define LIGHTNING_BITCOIN_ADDRESS_H
|
|
#include <openssl/ripemd.h>
|
|
#include <ccan/short_types/short_types.h>
|
|
|
|
struct pubkey;
|
|
|
|
/* An address is the RIPEMD160 of the SHA of the public key. */
|
|
struct bitcoin_address {
|
|
u8 addr[RIPEMD160_DIGEST_LENGTH]; /* 20 */
|
|
};
|
|
|
|
void bitcoin_address(const struct pubkey *key,
|
|
struct bitcoin_address *addr);
|
|
#endif /* LIGHTNING_BITCOIN_ADDRESS_H */
|