You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
751 B
33 lines
751 B
#ifndef LIGHTNING_DAEMON_INVOICE_H
|
|
#define LIGHTNING_DAEMON_INVOICE_H
|
|
#include "config.h"
|
|
#include <bitcoin/preimage.h>
|
|
|
|
struct invoices;
|
|
struct lightningd_state;
|
|
|
|
struct invoice {
|
|
struct list_node list;
|
|
const char *label;
|
|
u64 msatoshi;
|
|
struct preimage r;
|
|
struct sha256 rhash;
|
|
u64 paid_num;
|
|
};
|
|
|
|
#define INVOICE_MAX_LABEL_LEN 128
|
|
|
|
/* From database */
|
|
void invoice_add(struct invoices *i,
|
|
const struct preimage *r,
|
|
u64 msatoshi,
|
|
const char *label,
|
|
u64 complete);
|
|
|
|
void resolve_invoice(struct lightningd_state *dstate, struct invoice *invoice);
|
|
|
|
struct invoice *find_unpaid(struct invoices *i,
|
|
const struct sha256 *rhash);
|
|
|
|
struct invoices *invoices_init(struct lightningd_state *dstate);
|
|
#endif /* LIGHTNING_DAEMON_INVOICE_H */
|
|
|