₿ ⚡
hieblmi / go-host-lnaddr Goto Github PK
View Code? Open in Web Editor NEWHost your own Lightning Address (see https://lightningaddress.com)
License: MIT License
Host your own Lightning Address (see https://lightningaddress.com)
License: MIT License
₿ ⚡
Currently the invoice macaroon is generated via:
"InvoiceMacaroon": Generate the hex encoded invoice macaroon : xxd -ps -u -c 1000 $HOME/.lnd/data/chain/bitcoin/mainnet/invoice.macaroon
This should be done in code.
The following RPC error occurs when trying to create an invoice:
2023-12-31 00:13:54.242 [INF] LNADDR: Handling invoice creation: {GET /invoice/?amount=10000&nonce=179879833238 HTTP/1.1 1 1 map[Accept:[/] User-Agent:[curl/7.88.1]] {} 0 [] false 127.0.0.1:8081 map[] map[] map[] 127.0.0.1:43232 /invoice/?amount=10000&nonce=179879833238 0xc0002733c0}
2023-12-31 00:13:54.242 [INF] LNADDR: Cannot create invoice: rpc error: code = Unavailable desc = connection error: desc = "error reading server preface: http2: frame too large"
This issue is present since commit 01b5d1a
Tested with lnd v0.16.0-beta
It's currently hard to find if you've been paid. The only way is listing all paid invoices and look for those you don't remember creating yourself. A simple abstract notification interface with few implementations would be great to have (I might implement it myself if I find time). For example, it could be e-mail notification and http hook. I like how lightningtip does it. Shouldn't be hard to do.
Would be nice to have it. It's not straightforward, just setting a flag in the resulting JSON isn't enough. The program needs to also be able to sign and push nostr events.
Since it's not directly related to lnaddr it can be hidden behind a conditional compilation tag but I don't have any strong opinions about it.
See also: https://github.com/nostr-protocol/nips/blob/master/57.md
Hi @rkfg,
I recently ran into an issue that seems to be preventing the invoice subscription via the invoice r_hash you added.
This prevents the notification code from being triggered. This issue seemingly appeared without code changes from my end.
When /v2/invoices/subscribe
is run the invoice subscription response indicates &{Status:404 Not Found StatusCode:404......
If you got a minute could you confirm if notifications are working for you? I could send you test payments to your lightningaddress.
Without a license using this code is technically not legal. I suggest adding a MIT license since that's what used in Bitcoin Core and lnd.
Right now the server just exits without notification when an instance of go-host-lnaddr is already active.
In case of an already active instance print an error log.
Right now nothing prevents someone from calling the callback https://site.com/invoice?amount=1000
unreasonably often and spam the system. @rkfg Do you think it would make sense to add a spam protection here like a Timeout/IPFilter etc.?
It would be nice to have tiered payment confirmation messages (0-10, 10-100, 100-1000, 1000-10000 sats etc.) instead of the generic "thank you" as well as notification templates using Go's text/template.
The LNURL pay response should support images as mentioned in the spec , namely image/png;base64
entry or one image/jpeg;base64
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.