Commit Graph
316 Commits
Author SHA1 Message Date
MichilisandClaude Sonnet 5.5 48f8a6c7c9 Send note mutations to the mint's callback and polish LNURLcash UX
- Splits and melts went to the withdraw link, but mints such as
  mint.600.wtf take mutations at the callback named in the note's own
  withdraw info (/w/cb). The mint answered 200 without a status, which
  read as an unknown outcome and left minting stuck in recovery. The
  fake mint now behaves the same way.
- Count the LNbits routing reserve (max 1 sat, 1%) in the balance check.
- Allow several comma separated mints in one url entry.
- Format the LNURLcash help like the other help menus.
- Fix int64 passed to %s in the claimed, reclaimed, redeem and view
  messages.
- Reword the in-progress and insufficient-balance messages in every
  language.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 23:48:14 +00:00
MichilisandClaude Sonnet 5.5 b6178e335d Do not fail a funding payment that LNbits may still settle
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 18:25:01 +00:00
MichilisandClaude Sonnet 5.5 7f49e422f4 Fix the low-severity audit findings
- price map: guard with a RWMutex (fatal concurrent map access)
- InvoiceStream: stop on client disconnect, unsubscribe once, cap streams per wallet
- join tickets: key the ticket event per joiner; enforce tickets that
  expired while the bot was down

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 18:22:52 +00:00
MichilisandClaude Sonnet 5.5 15b95d962b Refuse a banned user's invoice key and keep nsec and k1 out of logs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 18:19:43 +00:00
MichilisandClaude Sonnet 5.5 8b8b0fa369 Fix the three medium audit findings
- /group ticket del: only the chat creator may remove a group registration
- /node: always dial user-supplied node hosts through the netguard client;
  drop the https://127.0.0.1 prefix exemption
- /app/@{username}: accept only username characters, render the greeting as
  text, add basic security headers

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 18:18:41 +00:00
MichilisandClaude Fable 5.1 7f89896a6c Translate the LNURLcash messages into every bot language
All 78 note keys now exist in cs, de, es, fi, fr, id, it, pl, pt-br, ru
and tr as well as en and nl, with indexed verbs where a language orders
the arguments differently. The mint fee line goes through a key instead
of the library's English text. A test localizes every key in every
language and formats it with the English argument list.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 22:50:58 +00:00
MichilisandClaude Fable 5.1 e36d522764 Add /lnurlhelp and list the note commands in the advanced help
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 22:39:49 +00:00
MichilisandClaude Fable 5.1 3c2ccf8d83 Add the LNURLcash Telegram commands
/note, /notes (list and batch), /redeem and /lnurlmints with confirm
dialogs, group posting with private receipts, claim notifications,
batch export as PDF/JSON/CSV, and LNURLcash notes detected inside the
existing /lnurl, paste and QR-photo flows. Plain withdraw links behave
as before. Two /lnurl log lines no longer print k1.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 22:12:27 +00:00
MichilisandClaude Fable 5.1 1fc9a81cd2 Add the lnurlcash store, models and mint registry
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 21:47:52 +00:00
MichilisandClaude Fable 5.1 5a3b4dad7c Make go test ./... run and fix the stale tooltip test
internal/config.go panicked in init without a config.yaml and the i18n
loader only found translations/ from the repository root, so no test in
a package importing them could run. Config checks are skipped in a test
binary, the translation directory is located by walking up, GetAmount
no longer dereferences a nil price watcher, and the tooltip test expects
the text the code actually produces. Adds tests for amount validation.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:58:30 +00:00
MichilisandClaude Fable 5.1 81af610980 Never pass dynamic strings as format strings
Sixteen log and error calls used a message, an LNURL string or callback
data as the format string. Go vet (printf check, Go 1.24+) fails the
test build on these.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:51:57 +00:00
MichilisandClaude Fable 5.1 7268fe6d31 Fix LNURL onion detection and go vet findings
A five-character domain was treated as an onion address (strings.Index
returned -1 == len-6) and the lnurlp:// scheme check tested an empty
string. Also: wrong format verb in the AnonID migration log, an error
that was built but never logged, an unreachable return, and the message
log line was passed as a format string.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:50:26 +00:00
MichilisandClaude Fable 5.1 86b7a8f7bc Fix crashes and the dropped certificate in satdress
Transaction.Send dereferenced a nil error when logging a failed DB save
after a successful transfer. satdress.SetupHttpClient type-asserted a
nil Transport for local nodes. The /node command shadowed the cert
variable, so a supplied certificate was never used and TLS verification
was always disabled for LND nodes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:41:39 +00:00
MichilisandClaude Fable 5.1 afd1050e57 Keep invoices, LNURLs, ecash tokens and node credentials out of the log
The message interceptor logged every private text at Info, which put
bolt11 invoices, LNURLs, Cashu tokens and '/node add lnd <host>
<macaroon>' into journald. The API middleware logged the submitted key
of banned users. Both are redacted now.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:41:39 +00:00
MichilisandClaude Fable 5.1 bb1037bcb7 Validate amounts in every GetAmount branch; cap faucet slots
The k and fiat branches returned the float conversion unchecked, so
non-positive, NaN or Inf inputs reached callers that have no guard of
their own (faucet total, ticket price, shop price, satdress amount).
Every branch now rejects non-positive and non-finite amounts and anything
above 10,000,000 sat. A faucet can have at most 1000 slots.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:41:39 +00:00
MichilisandClaude Fable 5.1 0bcb821b82 Per-payer group ticket ids; deactivate paid objects
The group ticket event was stored under ticket:<groupID>, so a later
/join by another user overwrote the payer and the invite link went to
whoever joined last. The id now includes the payer.

The pay, LNURL-withdraw and group-ticket confirm handlers left their
object Active after success, so a second press repeated the request.
They now deactivate it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:41:39 +00:00
MichilisandClaude Fable 5.1 1a3815902a Keep the ban state when an old copy of a user is saved
UpdateUserRecord wrote every column of the user it was given, so saving
a copy taken before a ban (cached user, stored inline object, invoice
event) lifted the ban. The banned flag and the admin key now always come
from the database row and are left out of the save; only the new
UpdateUserBan changes them, and the admin API uses it.

Manual port of kravens/BitTipBot 05c0a4e and dfc8d13.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:34:56 +00:00
MichilisandClaude Fable 5.1 39bddc2cb5 Only publish zap receipts to public wss relays
Relay URLs come from the zap request. Keep at most 10 of them, only
wss://, and make the websocket dialer refuse non-public addresses.

Manual port of kravens/BitTipBot efe2fa2 (the only conflict was the
hard-coded default relay list, which is kept as is).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:34:56 +00:00
Kevin RavensbergandMichilis 2c3c9fb3ce Only let the requesting user confirm an LNURL-auth login
The confirm handler signed the stored challenge with the key of whoever pressed the button. Check the owner like the cancel handler does.

(cherry picked from commit 547568cadcfd28d5ae94a1eb30f25dd0cfa03f91)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:33:45 +00:00
Kevin RavensbergandMichilis d1d51bbb16 Refuse transfers to placeholder users
Check the recipient where the money moves, so reaction tips, /send and inline sends to an existing placeholder wallet are covered too. The reply check in loadReplyToInterceptor is no longer needed and blocked /send with an explicit recipient.

(cherry picked from commit c8ea81d58aed2f288d0aee9fe63c3da08a97867c)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:33:45 +00:00
Kevin RavensbergandMichilis 8989483891 Ignore updates sent as a channel or anonymous admin
Telegram uses one shared fake user for all anonymous group admins and for messages sent as a channel. Such a sender must not own a wallet: reject its updates, do not tip it and do not create a wallet for it.

(cherry picked from commit 1b7478fc505b9ed388474192541185bc40569184)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:33:45 +00:00
callebtcandGitHub 7c55e40966 Add setting file (#497)
* add user currency for incoming payments

* also add currency to incoming LNURL payments

* add setting file
2023-12-05 16:02:42 +01:00
callebtcandGitHub 5adf090969 Display fiat currency (#496)
* add user currency for incoming payments

* also add currency to incoming LNURL payments
2023-12-05 15:54:53 +01:00
callebtcandGitHub 8b2fb73fe8 allow lnurlp comments only for 21 sats or more (#491) 2023-11-15 21:36:37 -03:00
callebtcandGitHub 7ba59512de lnurlp: filter links for small payments (#490) 2023-11-15 21:31:56 -03:00
callebtcandGitHub 432da6da71 disable preview in lnurl comments (#488) 2023-11-14 11:02:31 -03:00
callebtcandGitHub 532dbfe23b show error on wrong send message (#487) 2023-10-31 21:15:44 -03:00
callebtcandGitHub 991954493b add amountsMap (#483) 2023-08-13 15:12:56 +02:00
307780200a add logs (#479)
* added docker dockerfile and compose including lnd + bitcoind + c-lightning + lnbits

* Revert "added docker dockerfile and compose including lnd + bitcoind + c-lightning + lnbits"

This reverts commit 69e66450a3e6b5d3296280675c51ac54ded09d01.

* update CommentAllowed

* update donate

* fix amount

* Update database.go

---------

Co-authored-by: gohumble <humble@gmail.com>
2023-06-29 14:44:56 +02:00
gohumbleandGitHub 6a9c5f4a8a fix amount (#478)
* added docker dockerfile and compose including lnd + bitcoind + c-lightning + lnbits

* Revert "added docker dockerfile and compose including lnd + bitcoind + c-lightning + lnbits"

This reverts commit 69e66450a3e6b5d3296280675c51ac54ded09d01.

* update CommentAllowed

* update donate

* fix amount
2023-06-29 13:40:45 +02:00
gohumbleandGitHub 8e9c03d0e5 update CommentAllowed and donate
* update CommentAllowed

* update donate
2023-06-29 13:28:41 +02:00
calleandGitHub 84951d525c max relays (#476) 2023-03-25 02:55:47 +01:00
calleandGitHub 6e6fb5d183 feedback (#474) 2023-02-28 14:11:50 +01:00
calleandGitHub a65bf8d6f7 nostr: respond on empty command for new users (#473) 2023-02-28 13:55:26 +01:00
calleandGitHub 722c9c3c83 add /zap command for /tip (#468) 2023-02-23 23:06:34 +01:00
calleandGitHub 4fb4f54b5d Nostr/brrrr (#463)
* readd brr

* readd brrrrr
2023-02-18 16:36:05 +01:00
calleandGitHub ba256a1452 nostr logging and new relays (#462) 2023-02-18 15:59:36 +01:00
callebtc ed17953a82 nostr: add bot pubkey to LNURLFirst not users 2023-02-17 14:51:08 +01:00
calleandGitHub e7d1f9e7c3 add nip05 (#458) 2023-02-16 20:51:22 +01:00
callebtc bdaf46c78b clean url and wait for connect 2023-02-16 19:00:29 +01:00
callebtc a712f52a15 moar relays 2023-02-16 16:07:14 +01:00
callebtc 1a2776ab24 log nostr event id 2023-02-16 13:13:08 +01:00
callebtc 7ab3d4627a add files 2023-02-16 12:33:19 +01:00
callebtc 4318b48c3c nip57 zaps 2023-02-16 12:29:17 +01:00
callebtc b3bbe614ff fix strings 2023-01-22 10:26:24 +01:00
gohumble 3ea9ef0684 fix text 2023-01-20 21:10:10 +01:00
gohumble 0225a5998a added tryLoadUserInterceptor 2023-01-20 20:41:46 +01:00
callebtc 56318b3d0b fixes 2023-01-20 17:24:24 +01:00
gohumble ab5da78e39 commission 2023-01-19 16:27:11 +01:00
gohumble 9271668e94 cleanup 2023-01-19 15:55:53 +01:00