Michilis and Claude Fable 5.1
f040b67597
Verify webhook payments with LNbits before acting on them
...
The webhook listener accepted any POST as proof of payment and fired the
invoice callbacks (inline receive, group tickets, satdress payout, DALL-E
refund) for whatever payment hash the body named. It now:
- limits the body to 1 MB and only accepts a 64-hex payment hash,
- asks LNbits whether the named wallet really received a settled
incoming payment for that hash, and uses the amount LNbits reports,
- handles every payment hash once (bunt key "webhook:<hash>"),
- refuses to dispatch an invoice event registered for another wallet,
- runs the callback with a recover, so a panic can't take the bot down.
The pure checks live in internal/lnbits/webhook/verify, which does not
depend on the bot configuration and is unit tested.
Port of kravens/BitTipBot b7e56da and 27eb079 onto our simpler handler.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com >
2026-11-13 20:36:48 +00:00
callebtc
3069126971
werks
2022-08-30 19:35:05 +02:00
0631fd53eb
WIP: Satdress ( #331 )
...
* satdress rebase
* check config
* satdress rebase
* check config
* check for invoices
* return error
* Update inline photo v5 (#332 )
* update url
* round logo
* resize
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com >
* new logo (#333 )
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com >
* help (#334 )
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com >
* add file (#335 )
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com >
* markdown (#336 )
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com >
* satdress rebase
* check config
* satdress rebase
* check for invoices
* return error
* satdress works
* add lnbits
* timeout
* error checking
* small lnd
* errors
* button fix
Co-authored-by: LightningTipBot <88730856+LightningTipBot@users.noreply.github.com >
2022-04-29 14:28:12 +02:00
bf643f103d
🪄 update telebot v3 🤖 ( #325 )
...
* 🚧 minor changes to all handlers...
* 🚧 passing callback to tryEditStack
* 🚧 edit and delete callback messages
* 🚧 refactor again
* 🚧 uncomment this
* 🚧 using ctx.Message().Text
* 🚧 refactor
* 🚧 refactor
* 🚧 uncomment
* context not queruy
* 🚧 update forked lightningtipbot
* 🚧 reset ArticleResult
* fix inline receive
* readd shop
* remove chat from shopView
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com >
2022-03-27 22:19:38 +02:00
71d8aa202c
Group invite link management ( #310 )
...
* group invite link
* link
* works
* ticketinvoiceevent type
* Add invoice event interface
* add AssertEventType
* generalize AssertEventType invocation
* wip: payment button
* all new
* callback
* fix TicketEvent Key()
* invoiceEvent in ticketEvent
* fix errors
* add payment button
* commission
* minimum price
* remove redundant ticket event data
* commission
* fixes
* update balance
* notify user if ticket < 10
* commission rounding error
* refactor
* refactor
* /join
* add /join handler
* fix handler
* fix /join
* fix handler
* fix /join interceptor
* add startUserInterceptor
* delete qr
* no test blyad
* fix defer
* message
Co-authored-by: gohumble <lngohumble@gmail.com >
2022-03-17 00:21:28 +01:00
09d3af411e
Better longging 1337 ( #206 )
...
* speed up tx lock
* better logging and lnurl lightning: prefix
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com >
2021-12-24 15:34:17 +01:00
4b620186f1
Lnbits postgres compatible ( #172 )
...
* speed up tx lock
* webhook fix
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com >
2021-12-22 02:35:00 +01:00
a4f5b21f1d
Invoice events refactoring ( #168 )
...
* speed up tx lock
* clean up
* refactor lnurl comment notification
* fix function name
* transaction: do not check balance; refactor invoice notifications
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com >
2021-12-19 15:41:01 +01:00
9e4b612c26
Invoice events for inline receive ( #164 )
...
* speed up tx lock
* receive via invoice
* update telebot to save message InlineID
* remove debug ifs
* correct response
* comment
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com >
2021-12-17 20:41:13 +00:00
ba6bf0a317
telebot fork user ID int64 ( #151 )
...
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com >
2021-12-01 11:24:28 +01:00
LightningTipBot and GitHub
0abe56dfba
Revert "telebot fork user ID int64 ( #149 )" ( #150 )
...
This reverts commit 7c8ba7895d .
2021-12-01 08:59:51 +01:00
7c8ba7895d
telebot fork user ID int64 ( #149 )
...
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com >
2021-12-01 08:52:47 +01:00
1f25cc6ded
Add russian translation ( #136 )
...
* Add Russian translation
* turn on ru.toml
* load gently
Co-authored-by: Filiph Protsenko <filprocenko@gmail.com >
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com >
2021-11-15 16:41:34 +01:00
calle and GitHub
e1d858752f
emojis for logging ( #133 )
...
* emojis for logging
* emojis for logging
2021-11-15 10:18:57 +01:00
903cc3c2e2
Lnurlp comments ( #89 )
...
* lnurl comments for RECEIVING
* fix import cycle
* fix import
* rename WebhookServer to Server
* rename LNURLInvoice to Invoice
* add str package. MarkdownEscape lnurl.Invoice comment
* add str package
* check for comment length
* lnurl pay with comment
* lnurl pay with comment
* check for wallet existence
* repackage main to internal
Co-authored-by: lngohumble <lngohumble@gmail.com >
2021-10-07 00:21:21 +03:00