First pass of LN payment callbacks

This commit is contained in:
kexkey
2019-01-08 16:01:49 -05:00
committed by kexkey
parent ef504bb27a
commit b719992a0c
10 changed files with 228 additions and 65 deletions

View File

@@ -0,0 +1,15 @@
PRAGMA foreign_keys = ON;
INSERT INTO cyphernode_props (property, value) VALUES ("pay_index", "0");
CREATE TABLE ln_invoice (
id INTEGER PRIMARY KEY AUTOINCREMENT,
bolt11 TEXT UNIQUE,
status TEXT,
callback_url TEXT,
calledback INTEGER DEFAULT FALSE,
callback_failed INTEGER DEFAULT FALSE,
inserted_ts INTEGER DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX idx_lninvoice_bolt11 ON ln_invoice (bolt11);
CREATE INDEX idx_lninvoice_status ON ln_invoice (status);