mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 15:04:19 +01:00
@@ -2,12 +2,18 @@
|
||||
#define LIGHTNING_BITCOIN_SCRIPT_H
|
||||
#include <ccan/short_types/short_types.h>
|
||||
#include <ccan/tal/tal.h>
|
||||
#include "signature.h"
|
||||
|
||||
struct bitcoin_address;
|
||||
struct pubkey;
|
||||
struct signature;
|
||||
struct sha256;
|
||||
|
||||
/* A bitcoin signature includes one byte for the type. */
|
||||
struct bitcoin_signature {
|
||||
struct 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,
|
||||
@@ -36,12 +42,12 @@ u8 *scriptpubkey_pay_to_pubkeyhash(const tal_t *ctx,
|
||||
/* Create an input script to accept pay to pubkey */
|
||||
u8 *scriptsig_pay_to_pubkeyhash(const tal_t *ctx,
|
||||
const struct pubkey *key,
|
||||
const struct signature *sig);
|
||||
const struct bitcoin_signature *sig);
|
||||
|
||||
/* Create an input script to accept pay to pubkey */
|
||||
u8 *scriptsig_p2sh_2of2(const tal_t *ctx,
|
||||
const struct signature *sig1,
|
||||
const struct signature *sig2,
|
||||
const struct bitcoin_signature *sig1,
|
||||
const struct bitcoin_signature *sig2,
|
||||
const struct pubkey *key1,
|
||||
const struct pubkey *key2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user