Commit Graph

53 Commits

Author SHA1 Message Date
tsk
7f17c02787 feat: fake wallet store amount paid (#1185)
* feat: fake wallet store amount paid
2025-10-12 21:09:01 +01:00
gudnuf
500d162f67 fix: handle fiat melt amount conversions (#1109)
* fix: handle fiat melt amount conversions

* feat: add check that processor returns quote unit

---------

Co-authored-by: thesimplekid <tsk@thesimplekid.com>
2025-09-25 18:57:54 +01:00
thesimplekid
049ce64462 feat(cdk): add amount_mintable method and improve mint quote validation (#1075)
* feat(cdk): add amount_mintable method and improve mint quote validation

- Add MintQuote::amount_mintable() method to calculate available mint amount
- Update mint issue logic to use centralized amount calculation
- Add validation for Bolt11 payment amounts matching quote amounts
- Improve error handling and logging for quote amount mismatches
2025-09-16 17:26:19 +01:00
thesimplekid
7a71a37eab refactor(payment): replace wait_any_incoming_payment with event-based system (#1019)
Rename wait_any_incoming_payment to wait_payment_event and change return type
from WaitPaymentResponse stream to Event stream. This introduces a new Event
enum that wraps payment responses, making the system more extensible for
future event types.

- Add Event enum with PaymentReceived variant
- Update MintPayment trait method signature
- Refactor all payment backend implementations (LND, CLN, LNBits, fake wallet)
- Update mint and payment processor to handle new event stream forma
2025-08-31 17:26:50 +01:00
thesimplekid
ecdc78135d refactor(cdk): defer BOLT12 invoice fetching to payment execution (#978)
* refactor(cdk): defer BOLT12 invoice fetching to payment execution

Move BOLT12 invoice generation from quote creation to payment time, make
request_lookup_id optional for offers, and simplify payment structures by
removing unnecessary boxing and intermediate storage of invoices.
2025-08-20 11:20:30 +01:00
thesimplekid
d3a3c30d99 feat(cdk): add Bolt12 mint quote subscription support (#976)
* feat(cdk): add Bolt12 mint quote subscription support

Extends subscription to handle Bolt12 payment method alongside existing Bolt11 support across wallet, mint, and CLI components.
2025-08-19 12:01:01 +01:00
thesimplekid
0a8a0a6ea5 Repay fake queue (#973)
* feat: implement secondary repayment queue for any-amount invoices

- Keep original immediate payment behavior for ALL invoices (fixed and any-amount)
- Add secondary repayment queue that randomly repays any-amount invoices again
- Secondary repayments occur at random intervals between 30 seconds and 3 minutes
- Only any-amount invoices (amount=0) are added to secondary repayment queue
- Each any-amount invoice gets paid twice: once immediately, once from secondary queue
- Queue has configurable max size with LRU eviction policy
- Add comprehensive tests and update documentation

* test: add test for multiple payment verification

- Add test to verify that secondary repayment system creates multiple payments
- Test checks that immediate payment is received first
- Demonstrates the dual payment system working correctly
2025-08-18 16:17:57 +01:00
thesimplekid
b885c8d78e feat: fake mint bolt12 2025-08-15 12:23:02 +01:00
thesimplekid
47c5bb7465 fix: fake mint multiple units 2025-08-13 13:59:32 +01:00
asmo
e639bd4021 fakewallet: convert sat to msat (#899) 2025-07-22 15:27:18 +02:00
thesimplekid
ae6c107809 feat: bolt12 2025-07-13 18:48:35 +01:00
thesimplekid
738202b957 fix: non sat amounts on melt (#839) 2025-06-25 14:08:00 +01:00
thesimplekid
9beb0b4256 chore: update readmes (#773) 2025-05-29 09:38:10 -04:00
thesimplekid
d224cc57b5 Melt to amountless invoice (#497)
* feat: melt token with amountless

* fix: docs

* fix: extra migration
2025-04-04 13:16:27 +01:00
thesimplekid
7fbe55ea02 Test fees (#698)
* feat: Add Docker container setup for Nutshell mint in test-nutshell recipe

* test: Add wait mechanism for Nutshell docker container startup

* test: Modify Nutshell wallet tests to run sequentially

* fix: mintd set input fee pkk

* feat: fee tests

* fix: melt returning fee in change

* fix: fee tests

* fix: fee tests
2025-04-03 00:30:50 +01:00
thesimplekid
7b4951041e Rust docs (#681) 2025-03-25 23:27:38 +00:00
thesimplekid
c63fc02a5a Prepare v0.8.0 (#672)
* chore: Bump cdk dependency to v0.8.0

* chore: add docker publish to ci

* chore: add doc test build to ci
2025-03-24 18:40:08 +00:00
ok300
13475be580 Simplify fee calculation 2025-03-24 09:36:12 +01:00
thesimplekid
162507c492 feat: payment processor 2025-03-10 14:44:57 +00:00
ok300
813794353a Add ensure_cdk macro 2025-03-05 17:39:08 +01:00
thesimplekid
e84d6ea7ab chore: Update rust-version (MSRV) to 1.75.0 (#623) 2025-03-05 10:32:41 +00:00
thesimplekid
7b7def17ee chore: release v0.7.1 2025-02-13 10:44:09 +00:00
thesimplekid
be5e5d2371 chore: prepare v0.7.0 2025-02-06 13:12:16 +00:00
thesimplekid
e31de19ba5 chore: add tests for swap with multiple units 2025-02-04 13:44:27 +00:00
ok300
fe223c4ce6 Remove dependency on rand 2025-01-24 16:46:59 +01:00
thesimplekid
6a8a5a7941 fix: mpp (#523) 2025-01-05 14:42:44 +00:00
thesimplekid
0e12314643 chore: Release 0.6.0 2024-12-17 08:18:32 -05:00
Timothée Delabrouille
7d87c4806c feat: use Uuid as mint and melt quote ids (#469) 2024-12-05 09:58:53 +00:00
thesimplekid
d1b03d39c5 chore: update to 0.5.0 2024-11-19 09:55:46 +00:00
thesimplekid
9d65b603bc feat: mintd use mint builder 2024-11-06 09:13:22 +00:00
thesimplekid
3db25640dc feat: support custom unit 2024-11-05 14:21:21 +00:00
thesimplekid
065b4e248f feat: fake wallet 2024-10-06 20:01:09 +02:00
thesimplekid
7865f3dc17 feat: add cancel to wait invoice 2024-10-06 18:56:24 +02:00
David Caseria
fc0cc6789c Refactor to_unit into amount module (#381)
* Refactor to_unit into amount module
2024-10-01 14:36:37 +02:00
thesimplekid
7ea568e615 feat: sql store signatures dleq 2024-09-30 12:20:43 +02:00
thesimplekid
5139c47dac feat: check outgoing payment status flow 2024-09-25 20:28:05 +02:00
Pavol Rusnak
11fa39a003 chore: remove unused deps 2024-09-20 08:43:13 +02:00
thesimplekid
6bbcabfd23 feat: copy on mint settings 2024-09-14 20:57:05 +01:00
thesimplekid
46fe96a6f7 chore: clippy 2024-09-14 20:57:05 +01:00
thesimplekid
fba609f28a feat: add unit to PayInvoiceResponse 2024-09-14 11:25:58 +01:00
lollerfirst
7e860c71f2 NUT-04 Mint Quote Description (#337) 2024-09-12 12:27:52 +01:00
Pavol Rusnak
1021ec5299 chore: bump bitcoin + lightning-invoice deps 2024-09-09 12:09:46 +01:00
thesimplekid
3bf1a3b28f chore: version cdk in other crates 2024-09-08 22:12:06 +01:00
thesimplekid
f7e4ea3a6c Release 0.4.0 2024-09-08 21:48:51 +01:00
thesimplekid
1eb14703a5 refactor: cdk MSRV 2024-09-03 12:35:35 +01:00
thesimplekid
cc5efd9887 feat: phoenixd ln backend 2024-08-29 11:16:45 +01:00
thesimplekid
03e2b86022 feat: use amount type in ln 2024-08-13 15:39:38 +01:00
thesimplekid
bbd214899f feat: use expiry from created invoice 2024-08-13 12:36:05 +01:00
thesimplekid
e4069c0243 chore: use workspace version 2024-08-08 10:11:31 -04:00
thesimplekid
c36eb3caa2 refactor: clean up workspace deps 2024-07-27 08:33:10 -04:00