2015-06-08 07:14:47 +02:00
|
|
|
#ifndef LIGHTNING_CLOSE_TX_H
|
|
|
|
#define LIGHTNING_CLOSE_TX_H
|
2016-01-21 21:08:08 +01:00
|
|
|
#include "config.h"
|
2015-06-08 07:14:47 +02:00
|
|
|
#include "lightning.pb-c.h"
|
2016-01-21 21:11:47 +01:00
|
|
|
#include "secp256k1.h"
|
2016-01-21 21:08:08 +01:00
|
|
|
#include <ccan/tal/tal.h>
|
2015-06-08 07:14:47 +02:00
|
|
|
|
|
|
|
struct sha256_double;
|
2016-01-21 21:15:27 +01:00
|
|
|
struct pubkey;
|
2015-06-08 07:14:47 +02:00
|
|
|
|
|
|
|
/* Create close tx to spend the anchor tx output; doesn't fill in
|
|
|
|
* input scriptsig. */
|
2016-01-21 21:11:47 +01:00
|
|
|
struct bitcoin_tx *create_close_tx(secp256k1_context *secpctx,
|
|
|
|
const tal_t *ctx,
|
2016-01-21 21:11:47 +01:00
|
|
|
const struct pubkey *our_final,
|
|
|
|
const struct pubkey *their_final,
|
|
|
|
const struct sha256_double *anchor_txid,
|
|
|
|
unsigned int anchor_index,
|
|
|
|
u64 anchor_satoshis,
|
2015-07-29 08:44:28 +02:00
|
|
|
uint64_t to_us, uint64_t to_them);
|
2015-06-08 07:14:47 +02:00
|
|
|
#endif
|