Commit Graph

1093 Commits

Author SHA1 Message Date
thesimplekid
e07a9c8e1e feat(cdk): add WebSocket authentication support (#1116)
* feat(cdk): add WebSocket authentication support with comprehensive configuration

- Add WebSocket auth token injection for client connections
- Implement server-side WebSocket authentication verification
- Add configuration options for per-endpoint WebSocket auth types
- Include comprehensive documentation and example configuration
- Support clear, blind, and no-auth modes for WebSocket endpoin
2025-09-25 08:31:57 +01:00
asmo
f41ce0a3fb optional client identity in grpc payment processor (#1084)
* fix: update TLS configuration to handle missing client certificates gracefully
2025-09-24 14:56:51 +01:00
C
0f0b78c0b0 Include supported amounts instead of assuming the power of 2 (#1055)
* Include supported amounts instead of assuming the power of 2

The mint's signatory defines the amounts and the wallet, and the mint, when
paying, should use them instead of assuming the supported amounts are
2^(0..32), which is not part of the spec.

* Introduce FeeAndAmount struct
2025-09-24 13:02:24 +01:00
thesimplekid
6ad2c3a67e chore: ffi to release 2025-09-23 14:59:29 +01:00
thesimplekid
35a4be1429 feat(docker): add LDK Node mint service with dedicated Docker setup (#1108)
* feat(docker): add LDK Node mint service with dedicated Docker setup

- Add Dockerfile.ldk-node and Dockerfile.ldk-node.arm for LDK Node builds
- Add GitHub Actions workflows for publishing LDK Node Docker images
- Add docker-compose.ldk-node.yaml for standalone LDK Node deployment
- Integrate LDK Node service into main docker-compose.yaml with profile
- Update cdk-mintd README with LDK Node Docker configuration

* feat: use docker tags
2025-09-23 14:23:06 +01:00
asmo
1e6102f494 add FFI types for NUT-04 and NUT-05 (#1101)
* feat: add FFI types and conversion logic for NUT-04 and NUT-05 settings in `cdk-ffi`

* feat: remove auth feature and deafult to having auth

---------

Co-authored-by: thesimplekid <tsk@thesimplekid.com>
2025-09-23 11:44:11 +01:00
juejinyuxitu
fdd99e1afc chore: fix typo in comment (#1107)
Signed-off-by: juejinyuxitu <juejinyuxitu@outlook.com>
2025-09-23 10:54:09 +01:00
thesimplekid
6b80b74cb1 feat: remove features from auth (#1103) 2025-09-23 09:27:07 +01:00
thesimplekid
c1e35f964b Remove cashu ffi (#1102)
* feat: remove cdk-common and cashu from cdk-ffi
2025-09-22 16:50:51 +01:00
thesimplekid
3ad860c908 fix(cdk): improve error handling when adding mint to MultiMintWallet (#1099)
Add proper error handling and logging for add_mint operation instead of
propagating errors, preventing wallet operations from failing completely
when a mint cannot be added.
2025-09-22 13:53:32 +01:00
thesimplekid
be7c83689d feat: remove redis cache (#1096)
* feat: remove redis cache

* feat: remove redis cache
2025-09-21 20:04:27 +01:00
thesimplekid
df2f9d1c2a Psgl auth db (#1095)
* feat(cdk-mintd): add dedicated auth database configuration support
2025-09-21 16:56:12 +01:00
C
075e25682e Remove generated files (#1097)
After #1088, generated migrations files should not be versioned
2025-09-21 16:55:48 +01:00
vnprc
853f13fc85 fix(build): use OUT_DIR for migration files (#1088)
- write generated migration files to OUT_DIR instead of source directory
- copy migration SQL files to OUT_DIR for inclusion in build artifacts
- use absolute paths from OUT_DIR in include_str! macros
- update consumer modules to include from OUT_DIR using concat! macro

these changes enable cdk to support nix sandbox builds
2025-09-20 16:50:54 +01:00
thesimplekid
2becc4be21 chore: doc fmt (#1094) 2025-09-20 16:49:53 +01:00
thesimplekid
aeafab9a10 fix: config overwrite on start up (#1081)
* fix: config overwrite on start up
2025-09-20 16:49:37 +01:00
David Caseria
12164a0764 Fix Async FFI Constructors (#1085)
* Fix unused async in FFI

* Fix FFI async constructor

* Fix FFI MultiMintWallet async constructor
2025-09-18 20:42:00 +01:00
thesimplekid
944cf2ae0b fix: error respose detail (#1090) 2025-09-18 20:40:26 +01:00
David Caseria
23cba67c3b MultiMintWallet Refactor (#1001) 2025-09-17 17:27:54 +01:00
thesimplekid
62fcb1730e chore: remove mintd quick start 2025-09-17 09:33:54 +01:00
thesimplekid
c64797ac6f chore: some docs (#1083) 2025-09-17 09:32:22 +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
9d25d963ee refactor: check mint request (#1079) 2025-09-16 17:25:43 +01:00
thesimplekid
5ee405de89 Store last pay index (#1077) 2025-09-16 14:08:43 +01:00
thesimplekid
2dbb418db7 feat: store melt_request (#1045) 2025-09-16 10:55:36 +01:00
gudnuf
5650050f32 fix: make http wallet subscriptions wasm compatible (#1062) 2025-09-16 09:02:31 +01:00
C
c3c8e87164 Add resolve_dns_txt to HttpTransport and MintConnector (#1068)
* Add `resolve_dns_txt` to HttpTransport and MintConnector

Fixes #1036

* Use `hickory_resolver` to resolve DNS entries

* Remote default implementation of methods

* Fix build for wasm
2025-09-16 09:01:34 +01:00
C
1cc4783198 Fixed bug with postgres reconnection in the connection pool (#1078) 2025-09-15 23:19:48 +01:00
lollerfirst
4f65441c0d chore: move pay_request logic into cdk lib (#1028)
* pay request into cdk lib
2025-09-15 19:50:08 +01:00
Erik
7d78240da5 Improve web interface with dynamic status, navigation, and mobile support (#1073)
* Improve transaction confirmation UI: reorder elements, move buttons to details card, shorten button text
* feat: real node status

---------

Co-authored-by: thesimplekid <tsk@thesimplekid.com>
2025-09-15 14:51:23 +01:00
gudnuf
2c9333449a fix: replace std::time with instant for wasm (#1060) 2025-09-13 11:12:41 +01:00
thesimplekid
aab85d2083 feat: update redb (#1071) 2025-09-13 11:12:00 +01:00
thesimplekid
835c66dd55 fix: keyset max order checked (#1070) 2025-09-13 09:17:12 +01:00
C
0bf5325927 Fixed error with wrong placeholder (#1069)
* Fixed error with wrong placeholder

Add concept of schema, so each test is isolated
2025-09-12 17:17:40 +01:00
David Caseria
f2f5425395 Add more Amount::split_with_fee tests (#1058) 2025-09-10 14:54:44 +01:00
C
053a3a7e43 Do not fallback to HTTP on first error (#1061)
Instead use the same failure counter.

Fixes #496
2025-09-10 06:57:58 -03:00
David Caseria
21b4080810 FFI bindings for Wallet (#932)
* feat: Add initial CDK FFI bindings using UniFFI proc macros

* feat: Add complete Wallet methods to CDK FFI bindings
2025-09-10 09:56:55 +01:00
thesimplekid
64a4fe5bca feat: remove unused ln_routers (#1059)
* feat: remove unused ln_routers

* feat: allow other routers to be nested
2025-09-10 09:54:00 +01:00
thesimplekid
ce599a9e57 chore: code style (#1056) 2025-09-09 15:00:44 +01:00
asmo
75a3e6d2c7 Prometheus crate (#883)
* feat: introduce `cdk-prometheus` crate with Prometheus server and CDK-specific metrics support
2025-09-09 13:26:03 +01:00
thesimplekid
c94979a357 fix: used check math (#1051) 2025-09-09 11:26:24 +01:00
lollerfirst
b1026fb9bb fix: None host_matcher applies the proxy to all hosts (#1054)
* fix: None `host_matcher` applies the proxy to all hosts
2025-09-09 10:40:38 +01:00
C
62de0c9925 Close websocket connections sooner (#1050)
* Close websocket connections sooner

* Handle Ping,  Binary and Close
2025-09-08 21:21:13 +01:00
thesimplekid
166b902833 feat: bolt12 ws (#1052) 2025-09-08 21:20:52 +01:00
C
841e35d70f Reorganize tests, add mint quote/payment coverage, and prevent over-issuing (#1048)
* Add consistent ordering of sql migrations

Also sort the prefix and not only the filenames

* Reorganize tests, add mint quote/payment coverage, and prevent over-issuing

Reorganizes the mint test suite into clear modules, adds comprehensive mint
quote & payment scenarios, enhances the shared test macro, and hardens SQL
logic to forbid issuing more than what’s been paid.

These tests were added:

* Add quote once; reject duplicates.
* Register multiple payments and verify aggregated amount_paid.
* Read parity between DB and in-TX views.
* Reject duplicate payment_id in same and different transactions.
* Reject over-issuing (same TX, different TX, with/without prior payments).

---------

Co-authored-by: thesimplekid <tsk@thesimplekid.com>
2025-09-08 14:55:41 +01:00
C
b5b8ee557c Fix race conditions in minting tests (#1043)
There was a race conditions between the database storing the mint quote and the
fake wallet paying the invoice of a yet not existing mint quote

Add a delay of seconds before paying all invoices

To recreate the slow conditions that would make our database slower than the
external Fakewallet in Linux

```
sudo tc qdisc add dev lo root netem delay 200ms 50ms
ionice -c3  nix develop -i -L .#stable --command just itest-payment-processor FAKEWALLET
```

To reset

```
sudo tc qdisc del dev lo root

```
2025-09-08 13:02:45 +01:00
C
4363d14281 Add consistent ordering of sql migrations (#1047)
Also sort the prefix and not only the filenames
2025-09-08 10:17:00 +01:00
thesimplekid
caa0b4a9f5 fix: remove unused structs (#1042) 2025-09-07 08:17:48 +01:00
thesimplekid
5518ad2654 feat(cdk): add quote_id field to transactions for quote tracking (#1041)
- Add quote_id field to Transaction struct in cdk-common
- Add database migrations for quote_id column in SQLite and PostgreSQL
- Update wallet operations to populate quote_id for mint/melt transactions
- Set quote_id to None for send/receive operations without associated quotes
2025-09-06 19:57:23 +01:00
thesimplekid
9b35158a8a fix: sig error code (#1038) 2025-09-06 16:04:29 +01:00