bitcoin_script: wean entirely off protobuf types.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2015-06-02 13:38:38 +09:30
parent f911b2b6df
commit 316f29cb69
4 changed files with 17 additions and 17 deletions

View File

@@ -2,11 +2,11 @@
#define LIGHTNING_BITCOIN_SCRIPT_H
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
#include "lightning.pb-c.h"
struct bitcoin_address;
struct pubkey;
struct signature;
struct sha256;
/* tal_count() gives the length of the script. */
u8 *bitcoin_redeem_2of2(const tal_t *ctx,
@@ -24,7 +24,7 @@ u8 *bitcoin_redeem_revocable(const tal_t *ctx,
const struct pubkey *mykey,
u32 locktime,
const struct pubkey *theirkey,
const Sha256Hash *revocation_hash);
const struct sha256 *revocation_hash);
/* Create an output script using p2sh for this redeem script. */
u8 *scriptpubkey_p2sh(const tal_t *ctx, const u8 *redeemscript);
@@ -39,6 +39,6 @@ u8 *scriptsig_pay_to_pubkeyhash(const tal_t *ctx,
const struct signature *sig);
/* Is this a normal pay to pubkey hash? */
bool is_pay_to_pubkey_hash(const ProtobufCBinaryData *script);
bool is_pay_to_pubkey_hash(const u8 *script, size_t script_len);
#endif /* LIGHTNING_BITCOIN_SCRIPT_H */