mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 02:27:51 +01:00
ccff3ac437
This is a bit tricky: for our signing code, we don't want scriptsigs, but to calculate the txid, we need them. For most transactions in lightning, they're pure segwit so it doesn't matter, but funding transactions can have P2SH-wrapped P2WPKH inputs. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
33 lines
1.1 KiB
C
33 lines
1.1 KiB
C
#ifndef LIGHTNING_LIGHTNINGD_KEY_DERIVE_H
|
|
#define LIGHTNING_LIGHTNINGD_KEY_DERIVE_H
|
|
#include "config.h"
|
|
|
|
struct pubkey;
|
|
|
|
/* 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 privkey *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 privkey *base_secret,
|
|
const struct privkey *per_commitment_secret,
|
|
const struct pubkey *basepoint,
|
|
const struct pubkey *per_commitment_point,
|
|
struct privkey *key);
|
|
|
|
|
|
struct ext_key;
|
|
bool bip32_pubkey(const struct ext_key *bip32_base,
|
|
struct pubkey *pubkey, u32 index);
|
|
#endif /* LIGHTNING_LIGHTNINGD_KEY_DERIVE_H */
|