2017-08-28 18:06:01 +02:00
|
|
|
#ifndef LIGHTNING_COMMON_CLOSE_TX_H
|
|
|
|
#define LIGHTNING_COMMON_CLOSE_TX_H
|
2016-01-21 21:08:08 +01:00
|
|
|
#include "config.h"
|
2019-07-30 16:14:43 +02:00
|
|
|
#include <bitcoin/chainparams.h>
|
|
|
|
#include <bitcoin/tx.h>
|
2017-07-04 02:49:43 +02:00
|
|
|
#include <ccan/short_types/short_types.h>
|
2016-01-21 21:08:08 +01:00
|
|
|
#include <ccan/tal/tal.h>
|
2019-02-21 04:45:55 +01:00
|
|
|
#include <common/amount.h>
|
2015-06-08 07:14:47 +02:00
|
|
|
|
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-12-02 08:42:58 +01:00
|
|
|
struct bitcoin_tx *create_close_tx(const tal_t *ctx,
|
2019-07-30 16:14:43 +02:00
|
|
|
const struct chainparams *chainparams,
|
2016-04-24 12:31:52 +02:00
|
|
|
const u8 *our_script,
|
|
|
|
const u8 *their_script,
|
2020-05-21 21:46:19 +02:00
|
|
|
const u8 *funding_wscript,
|
2017-12-18 07:41:52 +01:00
|
|
|
const struct bitcoin_txid *anchor_txid,
|
2016-01-21 21:11:47 +01:00
|
|
|
unsigned int anchor_index,
|
2019-02-21 04:45:55 +01:00
|
|
|
struct amount_sat funding,
|
|
|
|
struct amount_sat to_us,
|
|
|
|
struct amount_sat to_them,
|
|
|
|
struct amount_sat dust_limit);
|
2018-03-22 11:36:25 +01:00
|
|
|
#endif /* LIGHTNING_COMMON_CLOSE_TX_H */
|