mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 17:14:22 +01:00
bitcoin/script.h: remove struct bitcoin_signature
Technically this incudes the sighash flags, but we only handle SIGHASH_ALL anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -13,12 +13,6 @@ struct sha256;
|
||||
struct rel_locktime;
|
||||
struct abs_locktime;
|
||||
|
||||
/* A bitcoin signature includes one byte for the type. */
|
||||
struct bitcoin_signature {
|
||||
secp256k1_ecdsa_signature sig;
|
||||
enum sighash_type stype;
|
||||
};
|
||||
|
||||
/* tal_count() gives the length of the script. */
|
||||
u8 *bitcoin_redeem_2of2(const tal_t *ctx,
|
||||
const struct pubkey *key1,
|
||||
@@ -46,7 +40,7 @@ u8 *bitcoin_redeem_p2wpkh(const tal_t *ctx,
|
||||
/* Create a witness which spends the 2of2. */
|
||||
void bitcoin_witness_p2sh_p2wpkh(const tal_t *ctx,
|
||||
struct bitcoin_tx_input *input,
|
||||
const struct bitcoin_signature *sig,
|
||||
const secp256k1_ecdsa_signature *sig,
|
||||
const struct pubkey *key);
|
||||
|
||||
/* Create scriptcode (fake witness, basically) for P2WPKH */
|
||||
@@ -78,21 +72,21 @@ u8 *scriptpubkey_p2wpkh(const tal_t *ctx, const struct pubkey *key);
|
||||
|
||||
/* Create a witness which spends the 2of2. */
|
||||
u8 **bitcoin_witness_2of2(const tal_t *ctx,
|
||||
const struct bitcoin_signature *sig1,
|
||||
const struct bitcoin_signature *sig2,
|
||||
const secp256k1_ecdsa_signature *sig1,
|
||||
const secp256k1_ecdsa_signature *sig2,
|
||||
const struct pubkey *key1,
|
||||
const struct pubkey *key2);
|
||||
|
||||
/* Create a witness which spends a "secret_or_delay" scriptpubkey */
|
||||
u8 **bitcoin_witness_secret(const tal_t *ctx,
|
||||
const void *secret, size_t secret_len,
|
||||
const struct bitcoin_signature *sig,
|
||||
const secp256k1_ecdsa_signature *sig,
|
||||
const u8 *witnessscript);
|
||||
|
||||
/* Create a witness which spends bitcoin_redeeem_htlc_recv/send */
|
||||
u8 **bitcoin_witness_htlc(const tal_t *ctx,
|
||||
const void *htlc_or_revocation_preimage,
|
||||
const struct bitcoin_signature *sig,
|
||||
const secp256k1_ecdsa_signature *sig,
|
||||
const u8 *witnessscript);
|
||||
|
||||
/* Is this a pay to pubkeu hash? */
|
||||
|
||||
Reference in New Issue
Block a user