forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
coin_mvts.h
40 lines (32 loc) · 1.21 KB
/
coin_mvts.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
40
#ifndef LIGHTNING_LIGHTNINGD_COIN_MVTS_H
#define LIGHTNING_LIGHTNINGD_COIN_MVTS_H
#include "config.h"
#include <common/coin_mvt.h>
struct lightningd;
struct account_balance {
const char *acct_id;
const char *bip173_name;
struct amount_msat balance;
};
struct balance_snapshot {
struct node_id *node_id;
u32 blockheight;
u32 timestamp;
struct account_balance **accts;
};
void notify_channel_mvt(struct lightningd *ld, const struct channel_coin_mvt *mvt);
void notify_chain_mvt(struct lightningd *ld, const struct chain_coin_mvt *mvt);
struct channel_coin_mvt *new_channel_mvt_invoice_hin(const tal_t *ctx,
struct htlc_in *hin,
struct channel *channel);
struct channel_coin_mvt *new_channel_mvt_routed_hin(const tal_t *ctx,
struct htlc_in *hin,
struct channel *channel);
struct channel_coin_mvt *new_channel_mvt_invoice_hout(const tal_t *ctx,
struct htlc_out *hout,
struct channel *channel);
struct channel_coin_mvt *new_channel_mvt_routed_hout(const tal_t *ctx,
struct htlc_out *hout,
struct channel *channel);
void send_account_balance_snapshot(struct lightningd *ld, u32 blockheight);
#endif /* LIGHTNING_LIGHTNINGD_COIN_MVTS_H */