1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
const createLnrpc = require("./lib/createLnrpc");
const config = require("./config");
module.exports = async (app, auth, addresses, bc, db, emit, seen, payments) => {
const lna = await createLnrpc(config.lna);
const lnb = await createLnrpc(config.lnb);
require("./bitcoinPayments")(app, bc, db, addresses, payments, emit);
require("./lightningPayments")(app, db, lna, lnb, emit, payments);
app.post(
"/sendPayment",
auth,
require("./sendPayment")(app, db, emit, seen, lna, lnb)
);
app.post("/payUser", auth, require("./payUser")(app, db, lnb));
app.post("/sendCoins", auth, require("./sendCoins")(app, bc, db, emit));
app.post("/addInvoice", auth, require("./addInvoice")(app, db, lnb));
};
|