Commit graph

22 commits

Author SHA1 Message Date
9c0e58a87c feat: merge a link's extra into the payout payment (v1.2.2-aio.2)
Some checks failed
lint.yml / feat: merge a link's `extra` into the payout payment (v1.2.2-aio.2) (pull_request) Failing after 0s
lint.yml / feat: merge a link's `extra` into the payout payment (v1.2.2-aio.2) (push) Failing after 0s
Adds an optional `extra` (JSON) field to a withdraw link. When the link
is claimed, that `extra` is merged onto the payout payment's `extra`, so
a caller can tag the resulting payment with metadata an external listener
keys on — the link is the only place to attach it (the customer-facing
LNURL-withdraw payout otherwise carries just `{tag, withdrawal_link_id}`).

Motivating use: bitSpire cash-in settlements. The operator's spirekeeper
listener fires a `cash_in` settlement (fee split to the platform) only on
an outbound payment stamped `source=bitspire`; before this there was no
way to stamp an LNURL-withdraw payout, so cash-ins never settled. bitSpire
now creates the cash-in link for the NET amount with
`extra={source, type:cash_in, principal_sats, fee_sats, ...}` and the
settlement fires on claim.

- models: `extra: dict | None` on CreateWithdrawData + WithdrawLink.
  LNbits' db layer (de)serializes dict columns to/from JSON natively
  (same as Payment.extra) — no per-field validator needed.
- migrations_fork.py: `withdraw_link.extra TEXT` under `withdraw_fork`,
  keeping the upstream-tracked migrations.py byte-identical for clean
  rebases (aiolabs/lnbits#8 pattern).
- views_lnurl: `extra={**(link.extra or {}), "tag": ..., "withdrawal_link_id": ...}`
  — the withdraw extension's own keys are written last so a caller cannot
  clobber them.

Verified end-to-end on the dev stack: a stamped link's payout carries the
merged extra and drives a spirekeeper cash_in settlement + super-fee payout.
2026-06-21 17:26:14 +02:00
Arc
d0689b7859
fix: timing logic for time between withdraws (#63) 2025-09-15 10:00:40 +02:00
dni ⚡
10a4caff7e
feat: add lud17 support (#60) 2025-08-25 12:25:20 +02:00
dni ⚡
1bce3bde2d
feat: update to uv (#59) 2025-08-24 23:10:31 +02:00
Vlad Stan
6b11dec0cc
[fix] hash check (#54)
Some checks failed
/ release (push) Has been cancelled
/ pullrequest (push) Has been cancelled
2024-12-11 14:48:15 +02:00
Judy
f05169f994
fix: update select query in get_withdraw_links (#52) 2024-11-29 18:46:47 +02:00
dni ⚡
120e744993
fixup! 2024-10-25 12:07:50 +02:00
dni ⚡
cab62b5c00
rc5 3 2024-10-18 09:52:23 +02:00
dni ⚡
9a1cc1b2cd
rc4-1 2024-10-16 11:06:43 +02:00
dni ⚡
d8eafa3e13
fix qrcodes and type ignores 2024-10-07 08:10:58 +02:00
Vlad Stan
7ea4146d7f fix: v1 changes 2024-10-04 13:12:50 +03:00
dni ⚡
134016312f
fixup! 2024-09-26 10:41:57 +02:00
dni ⚡
73e3bab6b3
fix: use timestamp placeholder for postgres compat (#51)
Some checks failed
/ release (push) Has been cancelled
/ pullrequest (push) Has been cancelled
* fix: use timestamp placeholder for postgres compat
---------

Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
2024-09-03 22:13:51 +02:00
dni ⚡
e2f97f05dd
feat: add created_at time to links (#46)
closes #16
2024-08-30 06:17:26 +02:00
Julian
00064f65d0
Added paginated fetching to withdraw link table (#41)
Some checks failed
/ release (push) Has been cancelled
/ pullrequest (push) Has been cancelled
2024-07-19 07:22:46 +02:00
dni ⚡
a44820f61f
feat: add linters and ci (#28)
* feat: introduce linting and ci
* add locks
* prettier
* black and sorting
* f405 missing imports
* E902
* mypy
* renderer
* circular imports
* check comment
* add exports
* add lnurlerrorhandler only on lnurl routes
* add test case
2024-07-11 10:30:28 +02:00
benarc
8128154492 removed unincrement
Some checks failed
/ release (push) Has been cancelled
/ pullrequest (push) Has been cancelled
2024-03-21 13:44:30 +00:00
benarc
ab82ee65f0 added hash check to stop race 2024-03-21 12:37:09 +00:00
benarc
04551571db restored original fix
Some checks failed
/ release (push) Has been cancelled
/ pullrequest (push) Has been cancelled
2024-03-20 20:03:12 +00:00
Leonhard Weese
41971f1e08
Update crud.py (#9)
The short url is available for each lnurlw, and with six digits probably far from "safe". I propose to revert to the previous 22 digits.
2024-02-02 21:16:44 +01:00
supiiik
8cd549042d
Order withdraw links by open_time. New first (#8) 2023-09-24 20:15:27 +02:00
dni ⚡
fcb973b540
init commit
Some checks failed
release github version / build (push) Has been cancelled
2023-02-17 11:57:27 +01:00