Each header should only include the other headers it needs to compile; `devtools/reduce-includes.sh */*.h` does this. The C files then need additional includes if they don't compile. And remove the entirely useless wire/onion_wire.h, which only serves to include wire/onion_wiregen.h. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
31 lines
1009 B
C
31 lines
1009 B
C
#ifndef LIGHTNING_COMMON_KEY_DERIVE_H
|
|
#define LIGHTNING_COMMON_KEY_DERIVE_H
|
|
#include "config.h"
|
|
#include <stdbool.h>
|
|
|
|
struct pubkey;
|
|
struct privkey;
|
|
struct secret;
|
|
|
|
/* For `localkey`, `remotekey`, `local-delayedkey` and `remote-delayedkey` */
|
|
bool derive_simple_key(const struct pubkey *basepoint,
|
|
const struct pubkey *per_commitment_point,
|
|
struct pubkey *key);
|
|
|
|
bool derive_simple_privkey(const struct secret *base_secret,
|
|
const struct pubkey *basepoint,
|
|
const struct pubkey *per_commitment_point,
|
|
struct privkey *key);
|
|
|
|
/* For `revocationkey` */
|
|
bool derive_revocation_key(const struct pubkey *basepoint,
|
|
const struct pubkey *per_commitment_point,
|
|
struct pubkey *key);
|
|
|
|
bool derive_revocation_privkey(const struct secret *base_secret,
|
|
const struct secret *per_commitment_secret,
|
|
const struct pubkey *basepoint,
|
|
const struct pubkey *per_commitment_point,
|
|
struct privkey *key);
|
|
#endif /* LIGHTNING_COMMON_KEY_DERIVE_H */
|