Git Product home page Git Product logo

lnbits's Introduction

phase: beta license-badge docs-badge PRs: welcome Lightning network wallet

The world's most powerful suite of bitcoin tools.

Run for yourself, for others, or as part of a stack.

LNbits is beta, for responsible disclosure of any concerns please contact an admin in the community chat.

LNbits is a Python server that sits on top of any funding source. It can be used as:

  • Accounts system to mitigate the risk of exposing applications to your full balance via unique API keys for each wallet
  • Extendable platform for exploring Lightning network functionality via the LNbits extension framework
  • Part of a development stack via LNbits API
  • Fallback wallet for the LNURL scheme
  • Instant wallet for LN demonstrations

LNbits can run on top of almost all Lightning funding sources.

See LNbits manual for more detailed documentation about each funding source.

Checkout the LNbits YouTube video series.

LNbits is inspired by all the great work of opennode.com, and in particular lnpay.co. Both work as funding sources for LNbits.

Running LNbits

Test on our demo server demo.lnbits.com, or on lnbits.com software as a service, where you can spin up an LNbits instance for 21sats per hr.

See the install guide for details on installation and setup.

LNbits account system

LNbits is packaged with tools to help manage funds, such as a table of transactions, line chart of spending, export to csv. Each wallet also comes with its own API keys, to help partition the exposure of your funding source.

LNbits extension universe

Extend YOUR LNbits to meet YOUR needs.

All non-core features are installed as extensions, reducing your code base and making your LNbits unique to you. Extend your LNbits install in any direction, and even create and share your own extensions.

LNbits API

LNbits has a powerful API, many projects use LNbits to do the heavy lifting for their bitcoin/lightning services.

LNbits node manager

LNbits comes packaged with a light node management UI, to make running your node that much easier.

LNbits across all your devices

As well as working great in a browser, LNbits has native IoS and Android apps as well as a chrome extension. So you can enjoy the same UI across ALL your devices.

Tip us

If you like this project send some tip love!

lnbits's People

Contributors

arbadacarbayk avatar arcbtc avatar bitkarrot avatar blackcoffeexbt avatar callebtc avatar chill117 avatar chucknorrison avatar dannydeezy avatar darth-coin avatar dni avatar eillarra avatar fiatjaf avatar fittiboy avatar frennkie avatar fusion44 avatar grmkris avatar iwarpbtc avatar jackstar12 avatar joelklabo avatar leesalminen avatar louneskmt avatar matthewcroughan avatar motorina0 avatar mrbitcoiner avatar prusnak avatar supertestnet avatar talvasconcelos avatar tehelsper avatar trezorhannes avatar uthpalax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lnbits's Issues

LNURLw Extension Fails

I installed the LNURLw extension and created an LNURL Withdraw link:

https://lnbits.com/displaywithdraw?id=864c2d05045d44b4b462a13a7b484241

I tested the link with BLW and successfully pulled 25 sats from the lnbits wallet (the second one in my set). The "No. uses" was decremented and the balance of the wallet reduced.

Later attempts with BLW, Zeus & lntxbot all failed with perhaps lntxbot being the most helpful:

Error: Got status 400 on callback https://lnbits.com/v1/lnurlwithdraw/be178/

While I doubt it will fix the problem, units for the wait time would be helpful, and whether the wait time applies to all requests or only those from the same... node, wallet, or whatever.

Also the Wallet link goes to the primary wallet, though the LNURLw is against the secondary.

PS. I have succeeded again, after a 7 hour pause, with BLW, but now, again, no wallet works.

Admin area

To make management and funding of an LNbits install easier it would be nice to have an admin area.

I propose an extension, which only the first user or the user specified in a .env variable can access.
The Admin Extension DB can be used for the variables we are currently collecting form .env.
The user will then have the option of using .env or the extension to configure their install

The area could include:

  • Setting up a funding source
  • Some basic funding source info
  • Funding wallets via the DB, rather than a transaction.
  • Basic theming
  • User overview/wallet overview
    ...

All ideas will be gratefully received

Login system

We need to add a login system to LNbits, but it must be done in a way that maintains instawallet functionality, so a user can use LNbits with/without a login.

Once a user has opted to secure their account with a login, all wallet?usr={uuid} will be redirected to /u/{uuid}/ (login protected).

Let's figure out the best way to achieve this

Migrate from Flask to Quart

I think a precondition to #64 would be to migrate from Flask to an async framework that supports websockets or server-sent events out-of-the-box.

I think having a websocket API that only works on production environments with gunicorn or whatever isn't developer-friendly and against the LNbits ethos (yes, this word is used when you don't have anything else to say). It would require us to keep supporting the current polling methods plus the websocket, which would rapidly turn into a mess.

It seems there are some frameworks similar to Flask that we could migrate to: Sanic, Vibora and Quart.
Of these, Quart's selling point is having an API identical to Flask, so I guess that is an easy choice.

API endpoint for activating/deactivating extensions

Adding an API endpoint for activating/deactivating extensions, it would be useful for people using LNbits through its API for managing users/user wallets,
Authentication could be using user_id + any invoice_key the user owns

Questions related to Debian packaging

I'm working on packaging various Bitcoin stuff for Debian. You can see my project at https://github.com/Kixunil/cryptoanarchy-deb-repo-builder/

I find lnbits to be a very interesting candidate for packaging. I have some questions that I need answers to before deciding on the priority and the proper approach:

  • Does lnbits include some kind of master management interface for the server admin?
  • Can lnbits initialize lnd wallet? No longer relevant
  • Is it possible to configure prefix for web paths? e.g. /lnbits/... instead of /..., the intention is to avoid conflicts with other apps
  • Is it possible to use configuration file instead of environment variables?
  • Is it possible to use multiple LN nodes? I was thinking having one system-wide node and optionally other nodes for users (ideally more per user, so the users can have multiple Tor identities). Note: not a priority.
  • Does lnbits support some kind of SSO natively?
  • Are there any plans on making the UI less complicated? (e.g. hiding various hex strings behind "advanced" menu)

Disable LNURLw if the website is served via HTTP on clearnet, but show some explanation to the users

I'm running LNBits with the LNURLw extension on localhost for testing. When I try to create a withdrawal link I have received 500 INTERNAL SERVER ERROR and the journal contains a lnurl.exceptions.InvalidUrl.

.env:

...
LNBITS_FORCE_HTTPS=0
...

Log

Apr 25 09:59:50 host sh[32242]: Traceback (most recent call last):
Apr 25 09:59:50 host sh[32242]:   File "/home/bitcoin/.local/share/virtualenvs/lnbits-SsORkRR7/lib/python3.7/site-packages/lnurl/core.py", line 24, in encode
Apr 25 09:59:50 host sh[32242]:     return Lnurl(_url_encode(url))
Apr 25 09:59:50 host sh[32242]:   File "/home/bitcoin/.local/share/virtualenvs/lnbits-SsORkRR7/lib/python3.7/site-packages/lnurl/types.py", line 164, in __init__
Apr 25 09:59:50 host sh[32242]:     self.url = url if url else self.__get_url__(bech32)
Apr 25 09:59:50 host sh[32242]:   File "/home/bitcoin/.local/share/virtualenvs/lnbits-SsORkRR7/lib/python3.7/site-packages/lnurl/types.py", line 168, in __get_url__
Apr 25 09:59:50 host sh[32242]:     return parse_obj_as(Union[TorUrl, WebUrl], _lnurl_decode(bech32))
Apr 25 09:59:50 host sh[32242]:   File "/home/bitcoin/.local/share/virtualenvs/lnbits-SsORkRR7/lib/python3.7/site-packages/pydantic/tools.py", line 35, in parse_obj_as
Apr 25 09:59:50 host sh[32242]:     return model_type(__root__=obj).__root__
Apr 25 09:59:50 host sh[32242]:   File "/home/bitcoin/.local/share/virtualenvs/lnbits-SsORkRR7/lib/python3.7/site-packages/pydantic/main.py", line 338, in __init__
Apr 25 09:59:50 host sh[32242]:     raise validation_error
Apr 25 09:59:50 host sh[32242]: pydantic.error_wrappers.ValidationError: 2 validation errors for ParsingModel[Union[lnurl.types.TorUrl, lnurl.types.WebUrl]]
Apr 25 09:59:50 host sh[32242]: __root__
Apr 25 09:59:50 host sh[32242]:   URL host invalid, top level domain required (type=value_error.url.host)
Apr 25 09:59:50 host sh[32242]: __root__
Apr 25 09:59:50 host sh[32242]:   URL scheme not permitted (type=value_error.url.scheme; allowed_schemes={'https'})
Apr 25 09:59:50 host sh[32242]: During handling of the above exception, another exception occurred:
Apr 25 09:59:50 host sh[32242]: Traceback (most recent call last):
Apr 25 09:59:50 host sh[32242]:   File "/home/bitcoin/.local/share/virtualenvs/lnbits-SsORkRR7/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
Apr 25 09:59:50 host sh[32242]:     response = self.full_dispatch_request()
Apr 25 09:59:50 host sh[32242]:   File "/home/bitcoin/.local/share/virtualenvs/lnbits-SsORkRR7/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
Apr 25 09:59:50 host sh[32242]:     rv = self.handle_user_exception(e)
Apr 25 09:59:50 host sh[32242]:   File "/home/bitcoin/.local/share/virtualenvs/lnbits-SsORkRR7/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
Apr 25 09:59:50 host sh[32242]:     reraise(exc_type, exc_value, tb)
Apr 25 09:59:50 host sh[32242]:   File "/home/bitcoin/.local/share/virtualenvs/lnbits-SsORkRR7/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
Apr 25 09:59:50 host sh[32242]:     raise value
Apr 25 09:59:50 host sh[32242]:   File "/home/bitcoin/.local/share/virtualenvs/lnbits-SsORkRR7/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
Apr 25 09:59:50 host sh[32242]:     rv = self.dispatch_request()
Apr 25 09:59:50 host sh[32242]:   File "/home/bitcoin/.local/share/virtualenvs/lnbits-SsORkRR7/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
Apr 25 09:59:50 host sh[32242]:     return self.view_functions[rule.endpoint](**req.view_args)
Apr 25 09:59:50 host sh[32242]:   File "/home/bitcoin/lnbits/lnbits/decorators.py", line 23, in wrapped_view
Apr 25 09:59:50 host sh[32242]:     return view(**kwargs)
Apr 25 09:59:50 host sh[32242]:   File "/home/bitcoin/lnbits/lnbits/decorators.py", line 43, in wrapped_view
Apr 25 09:59:50 host sh[32242]:     return view(**kwargs)
Apr 25 09:59:50 host sh[32242]:   File "/home/bitcoin/lnbits/lnbits/extensions/withdraw/views_api.py", line 88, in api_link_create_or_update
Apr 25 09:59:50 host sh[32242]:     return jsonify({**link._asdict(), **{"lnurl": link.lnurl}}), Status.OK if link_id else Status.CREATED
Apr 25 09:59:50 host sh[32242]:   File "/home/bitcoin/lnbits/lnbits/extensions/withdraw/models.py", line 30, in lnurl
Apr 25 09:59:50 host sh[32242]:     return lnurl_encode(url)
Apr 25 09:59:50 host sh[32242]:   File "/home/bitcoin/.local/share/virtualenvs/lnbits-SsORkRR7/lib/python3.7/site-packages/lnurl/core.py", line 26, in encode
Apr 25 09:59:50 host sh[32242]:     raise InvalidUrl
Apr 25 09:59:50 host sh[32242]: lnurl.exceptions.InvalidUrl

Design choices

I question the decision to use Python-Flask as (one of the) core backend components...

Any chance in switching this to Django? If so I would be happy to support..! :-D

Additional options Pay and Create Invoice

Iam missing out some invoice options like allow self funding for pay invoice (adcf9f2)

I would like to have an additional option for create invoice to make an invoice for a wallet which can be used infinite times, not only once.

The best way found is the Point of Sales extension, which would need a display and several inputs of price. A Paywall could be set, needs a display to generate QR codes. I would like to place an QR code to our coffee mashine to pay that coffee straight with any lightning app or with lnbit created wallets

Maybe there is some documentation around hidden invoice parameters?

c-lightning listinvoices uses wrong argument

Alright, I think I found it this time.

https://github.com/lnbits/lnbits/blob/master/lnbits/wallets/clightning.py#L25

C-lightning uses label with listinvoices: https://lightning.readthedocs.io/lightning-listinvoices.7.html , and the current thing is trying to fetch the invoice by using checking_id which is payment_hash (I think), which returns nothing. I changed

return InvoiceResponse(ok, checking_id, payment_request, error_message)

to

return InvoiceResponse(ok, label, payment_request, error_message)

and things started to work correctly.

double spending funds on self payment

after allow self funding enabled, i can create a invoice and pay myself. At this stage a 500 Internal Server error occurs but the funds got added and not paid.

on lnbits.com this transaction is done at once, receive and pay so the wallet is unchanged after that transaction. in my case the funds gets added from nowhere

seems a bad security issue, cause someone can double his wallet as he want and send away everything he was able to archive, tested with success and send the funds to my eclair wallet :(

Steps to reproduce:

  • set "allow_self_payment" True on pay_invoice of your lndrest.py as mentioned in adcf9f2
  • create a new lnbit wallet
  • receive some funds from anywhere on regular way
  • request invoice
  • copy wallet url to a second device/browser
  • pay the invoice (i did it with camera in a short time period)

found a lot of this in error_lnbits.log:

2020/08/17 22:19:40 [error] 653#653: *13 connect() failed (111: Connection refused) while connecting

i wonder why those connections get refused

Missing Send Transaction

image

Balance from displayed transactions: 10,448.4 sats
The graph is displaying this amount.

Difference is 1337.4 which is an amount I sent from lnbits to lntxbot (plus fees of 0.4?):

⚡️ RECEIVED  on 4 Jan 2020 at 9:40AM 
From the lnbits

Hash: bea1ed0affbdc73075bdb77affeb570d57a266bac8149ab509d273cdfaf2ead9
Amount: 1337 sat (0.10 USD)

API endpoints needed for wallet creation/overview

API endpoints needed for wallet creation/overview so devs using LNBits as part of their stack can create wallets on behalf of their users. ie a games developer might want to use LNbits to manage the wallets of its users.

I propose two endpoints to be added to the wallet main page api info:

Create a wallet
Fetch transaction history

Along with the other endpoints this should be enough

Add `tag` field to payments to link them with extensions

What do you think of adding a "tag" field to payments -- incoming or outgoing -- for extensions to fill in themselves, so in the main payments table view we could should the extension icon along with each invoice/payment and improve the user experience?

Should we also have an extra field that would support extra metadata in each payment or something like that?

Implement opennode's api

I'm not talking about lnbits' compatibility with opennode as backend. I'm talking about copying opennode's api so we can use the libraries with very little changes, as well as the WordPress and Drupal (or was it shopify or something) plugins.

This could be done as an extension, I think, but there's so much of worth here that it should go into the core api, in my opinion.

Put lnbits and btcpayserver together, then there you could have the signup/login system nicely, as well. Basically makes (non+)custodial-wallet-as-a-service quite easy.

Macaroon LND gRPC Env only allows path (not hex macaroon)

Macaroon LND gRPC Env only allows path (not hex macaroon)

Content of .env:

...
LND_ADMIN_MACAROON=0201...4f4c
...

Error

nactiveRpcError of RPC that terminated with: status = StatusCode.UNAVAILABLE details = "Getting metadata from plugin failed with error: [Errno 36] File name too long: '0201...4f4c'" debug_error_string = "{"created":"@15878418

Wallet cannot be deleted

Attempt to delete wallet gives this notice.

Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Unable to send from wallet

send
Unable to send from wallet. I created an invoice for the complete balance, 1000 sats, and the wallet will not send.

Once I paste in the send invoice, and hit send, nothing happens.

Windows, Chrome Browser
Zap Desktop LN Invoice

+++++++++++++++++++

I tried a 100 sat send and it worked. I think there must be something in the code that prevents a user from deleting the entire wallet.

Then balance was 900, so I tried a 900 sat send, and it would not send.
I tried an 899 sat send and it wouldn't go through either, thinking I needed to keep 1 sat balance.

Finally I tried an 800 sat send and it worked, balance in wallet is 100 sat.

Paying invoice does not deposit funds

I've been using LNBits as a backend for invoicing and since yesterday paying invoices no longer works. I generate the invoice through the web app, pay it with Phoenix or WalletOfSatoshi which both indicate the funds have been sent, but they never arrive to the LNBits wallet thus resulting in lost funds.

It's a pretty critical issue so I think it'd be worth to look into this soon.

What about using lighter?

Proposal

lighter is a lightning node wrapper written in python that would allow you to quickly support 4 LN implementations at once: c-lightning, eclair, electrum and lnd; it exposes a gRPC interface with macaroon authentication, quite similar to the one exposed by lnd.

Disclaimer: I'm a contributor of lighter, feel free to reach out if I can help in your integration process.

Running Flask migrate gives "pending"

Not an expert with Flask and unsure whether this might be specific to LNbits:

$ /usr/bin/pipenv run flask migrate
Loading .env environment variables…
https://127.0.0.1:8080
pending

Is the pending to be expected?

Accept payment_requests starting lightning:ln...

Often invoices are generated with a kind of "scheme" prefix: lightning: and then the payment requests follows. Currently LNbits gives this error: Malformed request: checksum is incorrect. 400 BAD REQUEST.

"LN ticketing" pay-per-word ticketing

A pay-per-word simple ticketing system,

The user sets a title, description, and price per word, which generates a frontend shareable form, consisting of email and a textbox.

The customer fills out the form on the frontend and submits, which generates an invoice calculated on their queries word count. Once the customer pays the invoice the query is sent to the user's extension backend, and they reply via email.

Some example use cases are a professional translator sharing the link for PAYG translation services, an expert being asked questions, a fun tipping service.

Use payment `expiry` to clean payments table

When deleting payments, we remove the payments older than a day that are pending.

We could be more precise because invoices have a expiry value... if we force an expiry time for the invoices we create on any backend wallet (let's say, 30 minutes), then we can clean the database faster: it would improve the "Checking pending transactions..." step when you enter a wallet.

Paywall toggle cookie

For some use-cases of paywalls, it is better that the user's browser does not remember the payment, such as the tipping link at the bottom of this repos readme.

Can we have "remember payment" as a checkbox in the paywall generation?

Update to Python 3.8 requirement

Is there a reason why the Pipenv was changed to 3.8?

While not impossible this makes it a bit harder to support LNbits on many current distributions (e.g. Raspbian Buster).

LNURL "Uses Left" Not Syncing w/ Wallet Value

I'm using LNBits.com. In the LNURL "Time Between Withdrawals" field I put 384 hours and now the Withdraw Link "uses left" vs the sats in the wallet is off. I change the "Time Between Withdrawals" back to 1 second but the "uses left" is still off.

From the images below I should have 11 uses left after I hit the Update Withdrawal button but the "uses left" field only says 3. I would like to continue using this LNURL. Any clues as to why this may be happening?

Screen Shot 2020-09-02 at 6 09 38 PM

Screen Shot 2020-09-02 at 6 10 06 PM

LNBits won't pay this invoice http://bit.ly/35oqocs

I have made a successful transaction with LNBits to the same recipient. This invoice was accepted, however "send funds" had no response.

The invoice worked elsewhere...

PS. Would it be possible to have a LNBits favicon, keeping the tab open is fine, but finding it can be tricky without a distinctive tab image.

Buggy display in Firefox / Tor browser if self-hosted LNbits on RaspiBlitz

Running the latest version of the script on RaspiBlitz 1.5 RC1

Left is in Brave (same in Brave Tor window an Chromium)
Right is Tor Browser (same in Firefox) appears buggy.
image

How could this be fixed?

Tried lnbits.com does not have the issue.

Here is the Hidden Service address of this test node:
kyxohflrrkotuxnlkannazbzzaiihbn5l2gnnrvcj256fbenggssxvad.onion

Off by one bug with c-lightning

Hi,

Just ran into an issue with https://github.com/lnbits/lnbits/blob/master/lnbits/wallets/clightning.py#L34 this line and payments?check_pending GET request that the web UI makes. I currently have C-lightning nodes running inside Polar (works great).

So then, to test, I added a check before that, like,

if not r['invoices'] or len(r['invoices']) == 0:
  return PaymentStatus(True)

And things started working. I then removed that check, and it now works like there wasn't a problem to begin with, so it's a bit difficult to go checking back on what went wrong the first time.

I am/was running a fresh setup, perhaps that plays into it. Anyway, checking length fixed it for me, maybe that's a good fix, I dunno.

Potential depletion attack

When sending from lnbits accounts fees aren't taken into account. If an attacker connects to the instance as a routing node they can deposit money for a low fee/free while receiving fees on withdrawal. I tested it on lnbits.com and it seems to work (I also donated more than I "stole" that way to test my hypothesis, so please don't sue me 😅).

Since I couldn't find a disclosure policy I'm just opening this issue. The project is still in beta so I hope the fallout won't be too big if this turns out to be an actual issue. I hope I just overlooked something.

Transfers between wallets of the same user

If you are a user that has many wallets for different purposes, it could be useful to have a way to distribute your money across your wallets.

Maybe a screen that shows all your wallets with levers for controlling the balance of them all, and then it updates the state internally somehow using a magic trick.

Something like:

Total funds: 10000

WalletA |--------------------[]---------| 6000
WalletB |---[]--------------------------| 1000
WalletC |-----------[]------------------| 3000

Installation Fails on myNode

I've got a request and a bug.

First, can you tag releases separately? It looks like the raspiblitz tag was updated to a new version but kept the same name. That made myNode automatically pull it in during an upgrade without explicitly bumping the version.

Second, the new version seems to have an installation issue. A user reported it and I was able to reproduce the issue.

Here is the log:

Installing initially failed dependencies…
[InstallError]:   File "/usr/local/lib/python3.7/site-packages/pipenv/cli/command.py", line 252, in install
[InstallError]:       site_packages=state.site_packages
[InstallError]:   File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 2062, in do_install
[InstallError]:       keep_outdated=keep_outdated
[InstallError]:   File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 1314, in do_init
[InstallError]:       pypi_mirror=pypi_mirror,
[InstallError]:   File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 901, in do_install_dependencies
[InstallError]:       retry_list, procs, failed_deps_queue, requirements_dir, **install_kwargs
[InstallError]:   File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 796, in batch_install
[InstallError]:       _cleanup_procs(procs, failed_deps_queue, retry=retry)
[InstallError]:   File "/usr/local/lib/python3.7/site-packages/pipenv/core.py", line 703, in _cleanup_procs
[InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
[pipenv.exceptions.InstallError]: Collecting gevent==20.6.2
[pipenv.exceptions.InstallError]:   Using cached gevent-20.6.2.tar.gz (5.8 MB)
[pipenv.exceptions.InstallError]: ERROR: Disabling PEP 517 processing is invalid: project specifies a build backend of setuptools.build_meta:__legacy__ in pyproject.toml
ERROR: Couldn't install package: gevent
 Package installation failed...

"Own Node", add own funding source extension

An extension for a user to add their own LND invoice macaroon and endpoint so they can use their own node on a service like lnbits.com

This is an ambitious extension and will likely require an additional "own_node" bool field in the core user DB, which if set True, will fetch the invoice macaroon hex string and endpoint from the users "Own Node" extension, and use those for invoice generation.

Pays invoice but doesn't stop "checking pending transactions"

Hi,

This capture is taken after pressing the "Send Satoshis" button:
chrome_hKekWERBL2

"This problem with payments by myNode's LNbits instance continues. It pays, the payment has been received, but the page will stay in this state until the popup is cancelled and will continually poll the myNode LNbits server whenever the page is active.

What could be preventing the recognition/acknowledgement that the payment has succeeded?"

https://t.me/lnbits/4123

Attached is
lnbitsError.log
a log of lnbits activity on myNodeBTC ( @tehelsper) including an error message I hadn't found before:

Aug  1 08:34:47 myNode lnbits[4233]: [2020-08-01 08:34:47,210] ERROR in app: Exception on /api/v1/payments [GET]
Aug  1 08:34:47 myNode lnbits[4233]: Traceback (most recent call last):
Aug  1 08:34:47 myNode lnbits[4233]:   File "/home/bitcoin/.local/share/virtualenvs/lnbits-ib5ZU12v/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
Aug  1 08:34:47 myNode lnbits[4233]:     response = self.full_dispatch_request()
Aug  1 08:34:47 myNode lnbits[4233]:   File "/home/bitcoin/.local/share/virtualenvs/lnbits-ib5ZU12v/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
Aug  1 08:34:47 myNode lnbits[4233]:     rv = self.handle_user_exception(e)
Aug  1 08:34:47 myNode lnbits[4233]:   File "/home/bitcoin/.local/share/virtualenvs/lnbits-ib5ZU12v/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
Aug  1 08:34:47 myNode lnbits[4233]:     reraise(exc_type, exc_value, tb)
Aug  1 08:34:47 myNode lnbits[4233]:   File "/home/bitcoin/.local/share/virtualenvs/lnbits-ib5ZU12v/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
Aug  1 08:34:47 myNode lnbits[4233]:     raise value
Aug  1 08:34:47 myNode lnbits[4233]:   File "/home/bitcoin/.local/share/virtualenvs/lnbits-ib5ZU12v/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
Aug  1 08:34:47 myNode lnbits[4233]:     rv = self.dispatch_request()
Aug  1 08:34:47 myNode lnbits[4233]:   File "/home/bitcoin/.local/share/virtualenvs/lnbits-ib5ZU12v/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
Aug  1 08:34:47 myNode lnbits[4233]:     return self.view_functions[rule.endpoint](**req.view_args)
Aug  1 08:34:47 myNode lnbits[4233]:   File "/opt/mynode/lnbits/lnbits/decorators.py", line 24, in wrapped_view
Aug  1 08:34:47 myNode lnbits[4233]:     return view(**kwargs)
Aug  1 08:34:47 myNode lnbits[4233]:   File "/opt/mynode/lnbits/lnbits/core/views/api.py", line 19, in api_payments
Aug  1 08:34:47 myNode lnbits[4233]:     payment.set_pending(WALLET.get_payment_status(payment.checking_id).pending)
Aug  1 08:34:47 myNode lnbits[4233]:   File "/opt/mynode/lnbits/lnbits/wallets/lndrest.py", line 86, in get_payment_status
Aug  1 08:34:47 myNode lnbits[4233]:     return PaymentStatus(statuses[payment["status"]])
Aug  1 08:34:47 myNode lnbits[4233]: TypeError: 'NoneType' object is not subscriptable

LNURL compatibility for wallets

First I will move the scanner, to outside the receive send,
image
Then I will add support for lnurl-pay and lnurl-withdraw
Ideas welcome

Websocket / webhook for invoice payment detection

This seems like a cool project! I'm investigating adding support into BTCPay to use an LNBits based wallet for accepting lightning. We do however some form of push from the server to BTCPay to notify of an invoice being paid.

On an unrelated note, are you publishing any docker images?

IP2TOR Rasiblitz support

Christian Rootzoll gave a great talk at this weekend's Hacksprint on the IP2TOR update for the Raspiblitz, which means a blitz can run behind TOR and pay a small amount for a public-facing URL, a sort of built-in reverse SSH.

As it's behind TOR, will LNbits will need a variable added to .env that overrides the base URL with a chosen URL?
An Ngrok reverse SSH works for extensions without it.

image

Extension to create a multi usage QR code

It could be possible to create a common QR code and everytime this code gets scanned, a lnbits url gets opened with a freshly generated invoice to pay with an amount configured to the multi usage QR code

Internal Server error on Send Satoshi

lnbits is working on an raspiblitz 1.6.0 with LetsEncrypt and duckdns. I can create wallets and create invoices. But on send, result is 500 Internal Server error. Any Ideas?

sudo journalctl -u lnbits -b --no-pager -n20
-- Logs begin at Sun 2020-08-16 00:31:00 BST, end at Sun 2020-08-16 00:49:50 BST. --
Aug 16 00:47:27 raspberrypi sh[3126]: response = self.full_dispatch_request()
Aug 16 00:47:27 raspberrypi sh[3126]: File "/home/lnbits/.local/share/virtualenvs/lnbits-xqYMrTZ5/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
Aug 16 00:47:27 raspberrypi sh[3126]: rv = self.handle_user_exception(e)
Aug 16 00:47:27 raspberrypi sh[3126]: File "/home/lnbits/.local/share/virtualenvs/lnbits-xqYMrTZ5/lib/python3.7/site-packages/flask_cors/extension.py", line 161, in wrapped_function
Aug 16 00:47:27 raspberrypi sh[3126]: return cors_after_request(app.make_response(f(*args, **kwargs)))
Aug 16 00:47:27 raspberrypi sh[3126]: File "/home/lnbits/.local/share/virtualenvs/lnbits-xqYMrTZ5/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
Aug 16 00:47:27 raspberrypi sh[3126]: reraise(exc_type, exc_value, tb)
Aug 16 00:47:27 raspberrypi sh[3126]: File "/home/lnbits/.local/share/virtualenvs/lnbits-xqYMrTZ5/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
Aug 16 00:47:27 raspberrypi sh[3126]: raise value
Aug 16 00:47:27 raspberrypi sh[3126]: File "/home/lnbits/.local/share/virtualenvs/lnbits-xqYMrTZ5/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
Aug 16 00:47:27 raspberrypi sh[3126]: rv = self.dispatch_request()
Aug 16 00:47:27 raspberrypi sh[3126]: File "/home/lnbits/.local/share/virtualenvs/lnbits-xqYMrTZ5/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
Aug 16 00:47:27 raspberrypi sh[3126]: return self.view_functionsrule.endpoint
Aug 16 00:47:27 raspberrypi sh[3126]: File "/home/lnbits/lnbits/lnbits/decorators.py", line 24, in wrapped_view
Aug 16 00:47:27 raspberrypi sh[3126]: return view(**kwargs)
Aug 16 00:47:27 raspberrypi sh[3126]: File "/home/lnbits/lnbits/lnbits/core/views/api.py", line 21, in api_payments
Aug 16 00:47:27 raspberrypi sh[3126]: payment.set_pending(WALLET.get_invoice_status(payment.checking_id).pending)
Aug 16 00:47:27 raspberrypi sh[3126]: File "/home/lnbits/lnbits/lnbits/wallets/lndrest.py", line 67, in get_invoice_status
Aug 16 00:47:27 raspberrypi sh[3126]: print(r.json()["settled"])
Aug 16 00:47:27 raspberrypi sh[3126]: KeyError: 'settled

LNUrl withdrawal links generated with LNPay are invalid

I've cloned LNBits and run it locally with LNPay as a wallet. Whereas the invoices work properly (both generate and get status), the LNUrl withdrawal links generated are invalid, even though the link looks fine (ie: LNURL1DP68GU...). Not sure if this is an issue with LNBits or LNPay though. Have you guys had any luck getting LNPay to generate valid LNUrls?

click on LNURLw extension results in a blank page

After update to the current version (LNURLp was added), the LNURLw Extension might be broken.

I observed a reference error in my web-console:

ReferenceError: simplecloseFormDialog is not defined
VueJS 10
anonymous
_render
r
get
fn
mount
$mount
$mount
_init
wn
https://xxx.xxx.org/static/__bundle__/withdraw/index.js?81aae472:11
vue.js:12:11752

ReferenceError: simplecloseFormDialog is not defined
VueJS 15
getWithdrawLinks https://xxx.xxx.org/static/__bundle__/withdraw/index.js?81aae472:12
promise callback*getWithdrawLinks https://xxx.xxx.org/static/__bundle__/withdraw/index.js?81aae472:12
checker https://xxx.xxx.org/static/__bundle__/withdraw/index.js?81aae472:29
vue.js:12:11752
.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.