invoices lnd service
This commit is contained in:
parent
c6fb886138
commit
48f5edf34e
2 changed files with 8 additions and 2 deletions
|
|
@ -21,6 +21,7 @@ const errorConstants = require("../../constants/errors");
|
||||||
* @prop {any} lightning
|
* @prop {any} lightning
|
||||||
* @prop {any} walletUnlocker
|
* @prop {any} walletUnlocker
|
||||||
* @prop {any} router
|
* @prop {any} router
|
||||||
|
* @prop {any} invoices
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -93,11 +94,15 @@ module.exports = async ({
|
||||||
const walletUnlocker = new walletunlockerrpc.WalletUnlocker(lndHost, credentials);
|
const walletUnlocker = new walletunlockerrpc.WalletUnlocker(lndHost, credentials);
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const router = new routerrpc.Router(lndHost, credentials);
|
const router = new routerrpc.Router(lndHost, credentials);
|
||||||
|
// @ts-expect-error
|
||||||
|
const invoices = new lnrpc.Invoices(lndHost, credentials)
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
lightning,
|
lightning,
|
||||||
walletUnlocker,
|
walletUnlocker,
|
||||||
router
|
router,
|
||||||
|
invoices
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -127,10 +127,11 @@ class LightningServices {
|
||||||
if (!lnServices) {
|
if (!lnServices) {
|
||||||
throw new Error(`Could not init lnServices`)
|
throw new Error(`Could not init lnServices`)
|
||||||
}
|
}
|
||||||
const { lightning, walletUnlocker, router } = lnServices
|
const { lightning, walletUnlocker, router, invoices } = lnServices
|
||||||
this.lightning = lightning
|
this.lightning = lightning
|
||||||
this.walletUnlocker = walletUnlocker
|
this.walletUnlocker = walletUnlocker
|
||||||
this.router = router
|
this.router = router
|
||||||
|
this.invoices = invoices
|
||||||
this.lnServicesData = {
|
this.lnServicesData = {
|
||||||
lndProto: this.defaults.lndProto,
|
lndProto: this.defaults.lndProto,
|
||||||
lndHost,
|
lndHost,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue