We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] LNDhub extension return unusable `getinfo` response
**Describe the bug**
The [getinfo call](https://github.com/lnbits/lnbits/blob/main/lnbits/extensions/lndhub/views_api.py#L22) simply returns `bad auth` everytime, which breaks integrations like for us in BTCPay Server (see btcpayserver/btcpayserver#4414).

**Expected behavior**
Return [valid information](https://github.com/BlueWallet/LndHub/blob/master/doc/Send-requirements.md#get-getinfo), which we can use to connect. For us that would mean having a list of `uris` and a `block_height` being set.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `lnbits/extensions/lndhub/views_api.py`
Content:
```
1 import asyncio
2 import time
3 from base64 import urlsafe_b64encode
4 from http import HTTPStatus
5 
6 from fastapi.param_functions import Query
7 from fastapi.params import Depends
8 from pydantic import BaseModel
9 from starlette.exceptions import HTTPException
10 
11 from lnbits import bolt11
12 from lnbits.core.crud import delete_expired_invoices, get_payments
13 from lnbits.core.services import create_invoice, pay_invoice
14 from lnbits.decorators import WalletTypeInfo
15 from lnbits.settings import LNBITS_SITE_TITLE, WALLET
16 
17 from . import lndhub_ext
18 from .decorators import check_wallet, require_admin_key
19 from .utils import decoded_as_lndhub, to_buffer
20 
21 
22 @lndhub_ext.get("/ext/getinfo")
23 async def lndhub_getinfo():
24     raise HTTPException(status_code=HTTPStatus.UNAUTHORIZED, detail="bad auth")
25 
26 
27 class AuthData(BaseModel):
28     login: str = Query(None)
29     password: str = Query(None)
30     refresh_token: str = Query(None)
31 
32 
33 @lndhub_ext.post("/ext/auth")
34 async def lndhub_auth(data: AuthData):
35     token = (
36         data.refresh_token
37         if data.refresh_token
38         else urlsafe_b64encode(
39             (data.login + ":" + data.password).encode("utf-8")
40         ).decode("ascii")
41     )
42     return {"refresh_token": token, "access_token": token}
43 
44 
45 class AddInvoice(BaseModel):
46     amt: str = Query(...)
47     memo: str = Query(...)
48     preimage: str = Query(None)
49 
50 
51 @lndhub_ext.post("/ext/addinvoice")
52 async def lndhub_addinvoice(
53     data: AddInvoice, wallet: WalletTypeInfo = Depends(check_wallet)
54 ):
55     try:
56         _, pr = await create_invoice(
57             wallet_id=wallet.wallet.id,
58             amount=int(data.amt),
59             memo=data.memo or LNBITS_SITE_TITLE,
60             extra={"tag": "lndhub"},
61         )
62     except:
63         raise HTTPException(
64             status_code=HTTPStatus.NOT_FOUND, detail="Failed to create invoice"
65         )
66     invoice = bolt11.decode(pr)
67     return {
68         "pay_req": pr,
69         "payment_request": pr,
70         "add_index": "500",
71         "r_hash": to_buffer(invoice.payment_hash),
72         "hash": invoice.payment_hash,
73     }
74 
75 
76 class Invoice(BaseModel):
77     invoice: str = Query(...)
78 
79 
80 @lndhub_ext.post("/ext/payinvoice")
81 async def lndhub_payinvoice(
82     r_invoice: Invoice, wallet: WalletTypeInfo = Depends(require_admin_key)
83 ):
84     try:
85         await pay_invoice(
86             wallet_id=wallet.wallet.id,
87             payment_request=r_invoice.invoice,
88             extra={"tag": "lndhub"},
89         )
90     except:
91         raise HTTPException(status_code=HTTPStatus.NOT_FOUND, detail="Payment failed")
92 
93     invoice: bolt11.Invoice = bolt11.decode(r_invoice.invoice)
94 
95     return {
96         "payment_error": "",
97         "payment_preimage": "0" * 64,
98         "route": {},
99         "payment_hash": invoice.payment_hash,
100         "decoded": decoded_as_lndhub(invoice),
101         "fee_msat": 0,
102         "type": "paid_invoice",
103         "fee": 0,
104         "value": invoice.amount_msat / 1000,
105         "timestamp": int(time.time()),
106         "memo": invoice.description,
107     }
108 
109 
110 @lndhub_ext.get("/ext/balance")
111 async def lndhub_balance(
112     wallet: WalletTypeInfo = Depends(check_wallet),
113 ):
114     return {"BTC": {"AvailableBalance": wallet.wallet.balance}}
115 
116 
117 @lndhub_ext.get("/ext/gettxs")
118 async def lndhub_gettxs(
119     wallet: WalletTypeInfo = Depends(check_wallet),
120     limit: int = Query(20, ge=1, le=20),
121     offset: int = Query(0, ge=0),
122 ):
123     for payment in await get_payments(
124         wallet_id=wallet.wallet.id,
125         complete=False,
126         pending=True,
127         outgoing=True,
128         incoming=False,
129         limit=limit,
130         offset=offset,
131         exclude_uncheckable=True,
132     ):
133         await payment.check_status()
134 
135     return [
136         {
137             "payment_preimage": payment.preimage,
138             "payment_hash": payment.payment_hash,
139             "fee_msat": payment.fee * 1000,
140             "type": "paid_invoice",
141             "fee": payment.fee,
142             "value": int(payment.amount / 1000),
143             "timestamp": payment.time,
144             "memo": payment.memo if not payment.pending else "Payment in transition",
145         }
146         for payment in reversed(
147             (
148                 await get_payments(
149                     wallet_id=wallet.wallet.id,
150                     pending=True,
151                     complete=True,
152                     outgoing=True,
153                     incoming=False,
154                     limit=limit,
155                     offset=offset,
156                 )
157             )
158         )
159     ]
160 
161 
162 @lndhub_ext.get("/ext/getuserinvoices")
163 async def lndhub_getuserinvoices(
164     wallet: WalletTypeInfo = Depends(check_wallet),
165     limit: int = Query(20, ge=1, le=20),
166     offset: int = Query(0, ge=0),
167 ):
168     for invoice in await get_payments(
169         wallet_id=wallet.wallet.id,
170         complete=False,
171         pending=True,
172         outgoing=False,
173         incoming=True,
174         limit=limit,
175         offset=offset,
176         exclude_uncheckable=True,
177     ):
178         await invoice.set_pending(
179             (await WALLET.get_invoice_status(invoice.checking_id)).pending
180         )
181 
182     return [
183         {
184             "r_hash": to_buffer(invoice.payment_hash),
185             "payment_request": invoice.bolt11,
186             "add_index": "500",
187             "description": invoice.memo,
188             "payment_hash": invoice.payment_hash,
189             "ispaid": not invoice.pending,
190             "amt": int(invoice.amount / 1000),
191             "expire_time": int(time.time() + 1800),
192             "timestamp": invoice.time,
193             "type": "user_invoice",
194         }
195         for invoice in reversed(
196             (
197                 await get_payments(
198                     wallet_id=wallet.wallet.id,
199                     pending=True,
200                     complete=True,
201                     incoming=True,
202                     outgoing=False,
203                     limit=limit,
204                     offset=offset,
205                 )
206             )
207         )
208     ]
209 
210 
211 @lndhub_ext.get("/ext/getbtc")
212 async def lndhub_getbtc(wallet: WalletTypeInfo = Depends(check_wallet)):
213     "load an address for incoming onchain btc"
214     return []
215 
216 
217 @lndhub_ext.get("/ext/getpending")
218 async def lndhub_getpending(wallet: WalletTypeInfo = Depends(check_wallet)):
219     "pending onchain transactions"
220     return []
221 
222 
223 @lndhub_ext.get("/ext/decodeinvoice")
224 async def lndhub_decodeinvoice(invoice: str = Query(None)):
225     inv = bolt11.decode(invoice)
226     return decoded_as_lndhub(inv)
227 
228 
229 @lndhub_ext.get("/ext/checkrouteinvoice")
230 async def lndhub_checkrouteinvoice():
231     "not implemented on canonical lndhub"
232     pass
233
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/lnbits/extensions/lndhub/views_api.py b/lnbits/extensions/lndhub/views_api.py
--- a/lnbits/extensions/lndhub/views_api.py
+++ b/lnbits/extensions/lndhub/views_api.py
@@ -21,7 +21,7 @@
 
 @lndhub_ext.get("/ext/getinfo")
 async def lndhub_getinfo():
-    raise HTTPException(status_code=HTTPStatus.UNAUTHORIZED, detail="bad auth")
+    return {"alias": LNBITS_SITE_TITLE}
 
 
 class AuthData(BaseModel):

{"golden_diff": "diff --git a/lnbits/extensions/lndhub/views_api.py b/lnbits/extensions/lndhub/views_api.py\n--- a/lnbits/extensions/lndhub/views_api.py\n+++ b/lnbits/extensions/lndhub/views_api.py\n@@ -21,7 +21,7 @@\n \n @lndhub_ext.get(\"/ext/getinfo\")\n async def lndhub_getinfo():\n-    raise HTTPException(status_code=HTTPStatus.UNAUTHORIZED, detail=\"bad auth\")\n+    return {\"alias\": LNBITS_SITE_TITLE}\n \n \n class AuthData(BaseModel):\n", "issue": "[BUG] LNDhub extension return unusable `getinfo` response\n**Describe the bug**\r\nThe [getinfo call](https://github.com/lnbits/lnbits/blob/main/lnbits/extensions/lndhub/views_api.py#L22) simply returns `bad auth` everytime, which breaks integrations like for us in BTCPay Server (see btcpayserver/btcpayserver#4414).\r\n\r\n**Expected behavior**\r\nReturn [valid information](https://github.com/BlueWallet/LndHub/blob/master/doc/Send-requirements.md#get-getinfo), which we can use to connect. For us that would mean having a list of `uris` and a `block_height` being set.\r\n\n", "before_files": [{"content": "import asyncio\nimport time\nfrom base64 import urlsafe_b64encode\nfrom http import HTTPStatus\n\nfrom fastapi.param_functions import Query\nfrom fastapi.params import Depends\nfrom pydantic import BaseModel\nfrom starlette.exceptions import HTTPException\n\nfrom lnbits import bolt11\nfrom lnbits.core.crud import delete_expired_invoices, get_payments\nfrom lnbits.core.services import create_invoice, pay_invoice\nfrom lnbits.decorators import WalletTypeInfo\nfrom lnbits.settings import LNBITS_SITE_TITLE, WALLET\n\nfrom . import lndhub_ext\nfrom .decorators import check_wallet, require_admin_key\nfrom .utils import decoded_as_lndhub, to_buffer\n\n\n@lndhub_ext.get(\"/ext/getinfo\")\nasync def lndhub_getinfo():\n    raise HTTPException(status_code=HTTPStatus.UNAUTHORIZED, detail=\"bad auth\")\n\n\nclass AuthData(BaseModel):\n    login: str = Query(None)\n    password: str = Query(None)\n    refresh_token: str = Query(None)\n\n\n@lndhub_ext.post(\"/ext/auth\")\nasync def lndhub_auth(data: AuthData):\n    token = (\n        data.refresh_token\n        if data.refresh_token\n        else urlsafe_b64encode(\n            (data.login + \":\" + data.password).encode(\"utf-8\")\n        ).decode(\"ascii\")\n    )\n    return {\"refresh_token\": token, \"access_token\": token}\n\n\nclass AddInvoice(BaseModel):\n    amt: str = Query(...)\n    memo: str = Query(...)\n    preimage: str = Query(None)\n\n\n@lndhub_ext.post(\"/ext/addinvoice\")\nasync def lndhub_addinvoice(\n    data: AddInvoice, wallet: WalletTypeInfo = Depends(check_wallet)\n):\n    try:\n        _, pr = await create_invoice(\n            wallet_id=wallet.wallet.id,\n            amount=int(data.amt),\n            memo=data.memo or LNBITS_SITE_TITLE,\n            extra={\"tag\": \"lndhub\"},\n        )\n    except:\n        raise HTTPException(\n            status_code=HTTPStatus.NOT_FOUND, detail=\"Failed to create invoice\"\n        )\n    invoice = bolt11.decode(pr)\n    return {\n        \"pay_req\": pr,\n        \"payment_request\": pr,\n        \"add_index\": \"500\",\n        \"r_hash\": to_buffer(invoice.payment_hash),\n        \"hash\": invoice.payment_hash,\n    }\n\n\nclass Invoice(BaseModel):\n    invoice: str = Query(...)\n\n\n@lndhub_ext.post(\"/ext/payinvoice\")\nasync def lndhub_payinvoice(\n    r_invoice: Invoice, wallet: WalletTypeInfo = Depends(require_admin_key)\n):\n    try:\n        await pay_invoice(\n            wallet_id=wallet.wallet.id,\n            payment_request=r_invoice.invoice,\n            extra={\"tag\": \"lndhub\"},\n        )\n    except:\n        raise HTTPException(status_code=HTTPStatus.NOT_FOUND, detail=\"Payment failed\")\n\n    invoice: bolt11.Invoice = bolt11.decode(r_invoice.invoice)\n\n    return {\n        \"payment_error\": \"\",\n        \"payment_preimage\": \"0\" * 64,\n        \"route\": {},\n        \"payment_hash\": invoice.payment_hash,\n        \"decoded\": decoded_as_lndhub(invoice),\n        \"fee_msat\": 0,\n        \"type\": \"paid_invoice\",\n        \"fee\": 0,\n        \"value\": invoice.amount_msat / 1000,\n        \"timestamp\": int(time.time()),\n        \"memo\": invoice.description,\n    }\n\n\n@lndhub_ext.get(\"/ext/balance\")\nasync def lndhub_balance(\n    wallet: WalletTypeInfo = Depends(check_wallet),\n):\n    return {\"BTC\": {\"AvailableBalance\": wallet.wallet.balance}}\n\n\n@lndhub_ext.get(\"/ext/gettxs\")\nasync def lndhub_gettxs(\n    wallet: WalletTypeInfo = Depends(check_wallet),\n    limit: int = Query(20, ge=1, le=20),\n    offset: int = Query(0, ge=0),\n):\n    for payment in await get_payments(\n        wallet_id=wallet.wallet.id,\n        complete=False,\n        pending=True,\n        outgoing=True,\n        incoming=False,\n        limit=limit,\n        offset=offset,\n        exclude_uncheckable=True,\n    ):\n        await payment.check_status()\n\n    return [\n        {\n            \"payment_preimage\": payment.preimage,\n            \"payment_hash\": payment.payment_hash,\n            \"fee_msat\": payment.fee * 1000,\n            \"type\": \"paid_invoice\",\n            \"fee\": payment.fee,\n            \"value\": int(payment.amount / 1000),\n            \"timestamp\": payment.time,\n            \"memo\": payment.memo if not payment.pending else \"Payment in transition\",\n        }\n        for payment in reversed(\n            (\n                await get_payments(\n                    wallet_id=wallet.wallet.id,\n                    pending=True,\n                    complete=True,\n                    outgoing=True,\n                    incoming=False,\n                    limit=limit,\n                    offset=offset,\n                )\n            )\n        )\n    ]\n\n\n@lndhub_ext.get(\"/ext/getuserinvoices\")\nasync def lndhub_getuserinvoices(\n    wallet: WalletTypeInfo = Depends(check_wallet),\n    limit: int = Query(20, ge=1, le=20),\n    offset: int = Query(0, ge=0),\n):\n    for invoice in await get_payments(\n        wallet_id=wallet.wallet.id,\n        complete=False,\n        pending=True,\n        outgoing=False,\n        incoming=True,\n        limit=limit,\n        offset=offset,\n        exclude_uncheckable=True,\n    ):\n        await invoice.set_pending(\n            (await WALLET.get_invoice_status(invoice.checking_id)).pending\n        )\n\n    return [\n        {\n            \"r_hash\": to_buffer(invoice.payment_hash),\n            \"payment_request\": invoice.bolt11,\n            \"add_index\": \"500\",\n            \"description\": invoice.memo,\n            \"payment_hash\": invoice.payment_hash,\n            \"ispaid\": not invoice.pending,\n            \"amt\": int(invoice.amount / 1000),\n            \"expire_time\": int(time.time() + 1800),\n            \"timestamp\": invoice.time,\n            \"type\": \"user_invoice\",\n        }\n        for invoice in reversed(\n            (\n                await get_payments(\n                    wallet_id=wallet.wallet.id,\n                    pending=True,\n                    complete=True,\n                    incoming=True,\n                    outgoing=False,\n                    limit=limit,\n                    offset=offset,\n                )\n            )\n        )\n    ]\n\n\n@lndhub_ext.get(\"/ext/getbtc\")\nasync def lndhub_getbtc(wallet: WalletTypeInfo = Depends(check_wallet)):\n    \"load an address for incoming onchain btc\"\n    return []\n\n\n@lndhub_ext.get(\"/ext/getpending\")\nasync def lndhub_getpending(wallet: WalletTypeInfo = Depends(check_wallet)):\n    \"pending onchain transactions\"\n    return []\n\n\n@lndhub_ext.get(\"/ext/decodeinvoice\")\nasync def lndhub_decodeinvoice(invoice: str = Query(None)):\n    inv = bolt11.decode(invoice)\n    return decoded_as_lndhub(inv)\n\n\n@lndhub_ext.get(\"/ext/checkrouteinvoice\")\nasync def lndhub_checkrouteinvoice():\n    \"not implemented on canonical lndhub\"\n    pass\n", "path": "lnbits/extensions/lndhub/views_api.py"}], "after_files": [{"content": "import asyncio\nimport time\nfrom base64 import urlsafe_b64encode\nfrom http import HTTPStatus\n\nfrom fastapi.param_functions import Query\nfrom fastapi.params import Depends\nfrom pydantic import BaseModel\nfrom starlette.exceptions import HTTPException\n\nfrom lnbits import bolt11\nfrom lnbits.core.crud import delete_expired_invoices, get_payments\nfrom lnbits.core.services import create_invoice, pay_invoice\nfrom lnbits.decorators import WalletTypeInfo\nfrom lnbits.settings import LNBITS_SITE_TITLE, WALLET\n\nfrom . import lndhub_ext\nfrom .decorators import check_wallet, require_admin_key\nfrom .utils import decoded_as_lndhub, to_buffer\n\n\n@lndhub_ext.get(\"/ext/getinfo\")\nasync def lndhub_getinfo():\n    return {\"alias\": LNBITS_SITE_TITLE}\n\n\nclass AuthData(BaseModel):\n    login: str = Query(None)\n    password: str = Query(None)\n    refresh_token: str = Query(None)\n\n\n@lndhub_ext.post(\"/ext/auth\")\nasync def lndhub_auth(data: AuthData):\n    token = (\n        data.refresh_token\n        if data.refresh_token\n        else urlsafe_b64encode(\n            (data.login + \":\" + data.password).encode(\"utf-8\")\n        ).decode(\"ascii\")\n    )\n    return {\"refresh_token\": token, \"access_token\": token}\n\n\nclass AddInvoice(BaseModel):\n    amt: str = Query(...)\n    memo: str = Query(...)\n    preimage: str = Query(None)\n\n\n@lndhub_ext.post(\"/ext/addinvoice\")\nasync def lndhub_addinvoice(\n    data: AddInvoice, wallet: WalletTypeInfo = Depends(check_wallet)\n):\n    try:\n        _, pr = await create_invoice(\n            wallet_id=wallet.wallet.id,\n            amount=int(data.amt),\n            memo=data.memo or LNBITS_SITE_TITLE,\n            extra={\"tag\": \"lndhub\"},\n        )\n    except:\n        raise HTTPException(\n            status_code=HTTPStatus.NOT_FOUND, detail=\"Failed to create invoice\"\n        )\n    invoice = bolt11.decode(pr)\n    return {\n        \"pay_req\": pr,\n        \"payment_request\": pr,\n        \"add_index\": \"500\",\n        \"r_hash\": to_buffer(invoice.payment_hash),\n        \"hash\": invoice.payment_hash,\n    }\n\n\nclass Invoice(BaseModel):\n    invoice: str = Query(...)\n\n\n@lndhub_ext.post(\"/ext/payinvoice\")\nasync def lndhub_payinvoice(\n    r_invoice: Invoice, wallet: WalletTypeInfo = Depends(require_admin_key)\n):\n    try:\n        await pay_invoice(\n            wallet_id=wallet.wallet.id,\n            payment_request=r_invoice.invoice,\n            extra={\"tag\": \"lndhub\"},\n        )\n    except:\n        raise HTTPException(status_code=HTTPStatus.NOT_FOUND, detail=\"Payment failed\")\n\n    invoice: bolt11.Invoice = bolt11.decode(r_invoice.invoice)\n\n    return {\n        \"payment_error\": \"\",\n        \"payment_preimage\": \"0\" * 64,\n        \"route\": {},\n        \"payment_hash\": invoice.payment_hash,\n        \"decoded\": decoded_as_lndhub(invoice),\n        \"fee_msat\": 0,\n        \"type\": \"paid_invoice\",\n        \"fee\": 0,\n        \"value\": invoice.amount_msat / 1000,\n        \"timestamp\": int(time.time()),\n        \"memo\": invoice.description,\n    }\n\n\n@lndhub_ext.get(\"/ext/balance\")\nasync def lndhub_balance(\n    wallet: WalletTypeInfo = Depends(check_wallet),\n):\n    return {\"BTC\": {\"AvailableBalance\": wallet.wallet.balance}}\n\n\n@lndhub_ext.get(\"/ext/gettxs\")\nasync def lndhub_gettxs(\n    wallet: WalletTypeInfo = Depends(check_wallet),\n    limit: int = Query(20, ge=1, le=20),\n    offset: int = Query(0, ge=0),\n):\n    for payment in await get_payments(\n        wallet_id=wallet.wallet.id,\n        complete=False,\n        pending=True,\n        outgoing=True,\n        incoming=False,\n        limit=limit,\n        offset=offset,\n        exclude_uncheckable=True,\n    ):\n        await payment.check_status()\n\n    return [\n        {\n            \"payment_preimage\": payment.preimage,\n            \"payment_hash\": payment.payment_hash,\n            \"fee_msat\": payment.fee * 1000,\n            \"type\": \"paid_invoice\",\n            \"fee\": payment.fee,\n            \"value\": int(payment.amount / 1000),\n            \"timestamp\": payment.time,\n            \"memo\": payment.memo if not payment.pending else \"Payment in transition\",\n        }\n        for payment in reversed(\n            (\n                await get_payments(\n                    wallet_id=wallet.wallet.id,\n                    pending=True,\n                    complete=True,\n                    outgoing=True,\n                    incoming=False,\n                    limit=limit,\n                    offset=offset,\n                )\n            )\n        )\n    ]\n\n\n@lndhub_ext.get(\"/ext/getuserinvoices\")\nasync def lndhub_getuserinvoices(\n    wallet: WalletTypeInfo = Depends(check_wallet),\n    limit: int = Query(20, ge=1, le=20),\n    offset: int = Query(0, ge=0),\n):\n    for invoice in await get_payments(\n        wallet_id=wallet.wallet.id,\n        complete=False,\n        pending=True,\n        outgoing=False,\n        incoming=True,\n        limit=limit,\n        offset=offset,\n        exclude_uncheckable=True,\n    ):\n        await invoice.set_pending(\n            (await WALLET.get_invoice_status(invoice.checking_id)).pending\n        )\n\n    return [\n        {\n            \"r_hash\": to_buffer(invoice.payment_hash),\n            \"payment_request\": invoice.bolt11,\n            \"add_index\": \"500\",\n            \"description\": invoice.memo,\n            \"payment_hash\": invoice.payment_hash,\n            \"ispaid\": not invoice.pending,\n            \"amt\": int(invoice.amount / 1000),\n            \"expire_time\": int(time.time() + 1800),\n            \"timestamp\": invoice.time,\n            \"type\": \"user_invoice\",\n        }\n        for invoice in reversed(\n            (\n                await get_payments(\n                    wallet_id=wallet.wallet.id,\n                    pending=True,\n                    complete=True,\n                    incoming=True,\n                    outgoing=False,\n                    limit=limit,\n                    offset=offset,\n                )\n            )\n        )\n    ]\n\n\n@lndhub_ext.get(\"/ext/getbtc\")\nasync def lndhub_getbtc(wallet: WalletTypeInfo = Depends(check_wallet)):\n    \"load an address for incoming onchain btc\"\n    return []\n\n\n@lndhub_ext.get(\"/ext/getpending\")\nasync def lndhub_getpending(wallet: WalletTypeInfo = Depends(check_wallet)):\n    \"pending onchain transactions\"\n    return []\n\n\n@lndhub_ext.get(\"/ext/decodeinvoice\")\nasync def lndhub_decodeinvoice(invoice: str = Query(None)):\n    inv = bolt11.decode(invoice)\n    return decoded_as_lndhub(inv)\n\n\n@lndhub_ext.get(\"/ext/checkrouteinvoice\")\nasync def lndhub_checkrouteinvoice():\n    \"not implemented on canonical lndhub\"\n    pass\n", "path": "lnbits/extensions/lndhub/views_api.py"}]}