forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcommit_tx.h
39 lines (34 loc) · 1.04 KB
/
commit_tx.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef LIGHTNING_COMMIT_TX_H
#define LIGHTNING_COMMIT_TX_H
#include "config.h"
#include "htlc.h"
struct channel_state;
struct sha256;
struct pubkey;
struct peer;
u8 *wscript_for_htlc(const tal_t *ctx,
const struct peer *peer,
const struct htlc *h,
const struct sha256 *rhash,
enum side side);
/* Returns scriptpubkey: *wscript is NULL if it's a direct p2wpkh. */
u8 *commit_output_to_us(const tal_t *ctx,
const struct peer *peer,
const struct sha256 *rhash,
enum side side,
u8 **wscript);
/* Returns scriptpubkey: *wscript is NULL if it's a direct p2wpkh. */
u8 *commit_output_to_them(const tal_t *ctx,
const struct peer *peer,
const struct sha256 *rhash,
enum side side,
u8 **wscript);
/* Create commitment tx to spend the anchor tx output; doesn't fill in
* input scriptsig. */
struct bitcoin_tx *create_commit_tx(const tal_t *ctx,
struct peer *peer,
const struct sha256 *rhash,
const struct channel_state *cstate,
enum side side,
bool *otherside_only);
#endif