Commit graph

12 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
dni ⚡
ab96594f70
chore: update to 1.2.2
Some checks failed
/ release (push) Has been cancelled
/ pullrequest (push) Has been cancelled
2025-12-27 09:48:17 +01:00
dni ⚡
eb7f7fda47
chore: update to version 1.2.1 (#66)
Some checks failed
/ release (push) Has been cancelled
/ pullrequest (push) Has been cancelled
2025-10-06 18:47:56 +02:00
dni ⚡
717d9c88f8
feat: new lnurl lib and types on endpoints (#57)
Some checks failed
/ release (push) Has been cancelled
/ pullrequest (push) Has been cancelled
2025-07-21 16:11:10 +02:00
dni ⚡
2095f86618
feat: update to lnbits 1.0.0 2024-09-13 15:41:27 +02:00
dni ⚡
5b1fc0ffbe
chore: bump min version to 0.12.11 (#50)
Some checks failed
/ release (push) Has been cancelled
/ pullrequest (push) Has been cancelled
2024-09-03 09:57:37 +02:00
Arc
e034643c7f
Added extended description (#34)
* Adds extended description

* filename fixed

* added video

* Fixed tile link

* Added all contributors
2024-05-17 14:49:10 +01:00
Arc
ee3838ed9f
Adds extended description (#33)
* Adds extended description

* filename fixed

* added video

* Fixed tile link
2024-05-17 14:41:24 +01:00
Vlad Stan
ac87c2fd29 chore: bump min_lnbits_version 2024-05-14 11:04:41 +03:00
Tiago Vasconcelos
b8ffaefa2e
change extension name (#32) 2024-04-24 09:57:02 +02:00
Tiago Vasconcelos
e374df7756
allow custom path (#14)
Some checks failed
/ release (push) Has been cancelled
/ pullrequest (push) Has been cancelled
* allow custom path
---------

Co-authored-by: dni  <office@dnilabs.com>
2023-09-26 14:05:14 +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