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} walletUnlocker
|
||||
* @prop {any} router
|
||||
* @prop {any} invoices
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
@ -93,11 +94,15 @@ module.exports = async ({
|
|||
const walletUnlocker = new walletunlockerrpc.WalletUnlocker(lndHost, credentials);
|
||||
// @ts-ignore
|
||||
const router = new routerrpc.Router(lndHost, credentials);
|
||||
// @ts-expect-error
|
||||
const invoices = new lnrpc.Invoices(lndHost, credentials)
|
||||
|
||||
|
||||
return {
|
||||
lightning,
|
||||
walletUnlocker,
|
||||
router
|
||||
router,
|
||||
invoices
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -127,10 +127,11 @@ class LightningServices {
|
|||
if (!lnServices) {
|
||||
throw new Error(`Could not init lnServices`)
|
||||
}
|
||||
const { lightning, walletUnlocker, router } = lnServices
|
||||
const { lightning, walletUnlocker, router, invoices } = lnServices
|
||||
this.lightning = lightning
|
||||
this.walletUnlocker = walletUnlocker
|
||||
this.router = router
|
||||
this.invoices = invoices
|
||||
this.lnServicesData = {
|
||||
lndProto: this.defaults.lndProto,
|
||||
lndHost,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue