Commit Graph

1087 Commits

Author SHA1 Message Date
thesimplekid
3b2f31e844 Merge pull request #645 from thesimplekid/remove_nostr_from_db
refactor: Remove nostr last checked methods from database trait
2025-03-09 23:29:39 +00:00
thesimplekid (aider)
cb87fefacd refactor: Remove nostr last checked methods from database trait and implementations 2025-03-09 23:11:02 +00:00
thesimplekid
214b75ac31 Merge pull request #640 from benthecarman/sqlcipher
feat: Add support for sqlcipher
2025-03-09 21:42:57 +00:00
benthecarman
40c53e83df feat: Add support for sqlcipher 2025-03-09 15:08:43 -05:00
thesimplekid
b787951dbc feat: Add feature gates for CLN, LND, fakewallet and LNbits backends (#638)
* feat: Add feature gates for CLN, LND, fakewallet and LNbits backends
2025-03-09 14:18:19 +00:00
thesimplekid
a3993c3e4c Merge pull request #642 from thesimplekid/remove_unused_supported
refactor: remove unused ln_backends in cdk-mintd
2025-03-09 10:02:53 +00:00
thesimplekid
93f7979a70 refactor: remove unused ln_backends in cdk-mintd 2025-03-09 09:46:37 +00:00
thesimplekid
467cc0a027 feat: Add migration for keyset_id as foreign key in SQLite database (#634) 2025-03-08 22:46:12 +00:00
thesimplekid
39a7b15221 Check tls certs exist for grpc management serve (#637)
* feat: Add TLS directory existence check before starting RPC server

* feat: Add file existence checks with detailed error logging for TLS files

* chore: fmt
2025-03-08 22:44:46 +00:00
thesimplekid
22beade553 Amount and unit nut04/05 (#635)
* feat: return amount and unit in mint response


Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2025-03-08 22:41:21 +00:00
thesimplekid
b7380dc858 feat: Add tos_url to mintd config (#636)
* feat: Add tos_url to mintd config

* docs: tos in change log
2025-03-07 21:06:22 +00:00
NodlAndHodl
fcf2e9d603 feat: adding tos to mint (#604)
* feat: adding tos(terms of service) to mint and update cdk-sqlite migration
2025-03-07 20:29:10 +00:00
ok300
5a7362c09f Simplify process_swap_request (#631)
* Simplify process_swap_request

* Fix occasional test_swap_to_send wallet errors
2025-03-06 15:08:59 +00:00
thesimplekid
393c95e115 Merge pull request #630 from thesimplekid/db_check_on_delete_proofs
Db check on delete proofs
2025-03-06 09:41:40 +00:00
thesimplekid
a394145fba Merge pull request #629 from ok300/ok300-ensure-cdk
Add `ensure_cdk` macro for validation checks
2025-03-06 09:40:31 +00:00
thesimplekid (aider)
d41d3a7c94 refactor: Add state check before deleting proofs to prevent removing spent proofs 2025-03-06 09:23:40 +00:00
ok300
813794353a Add ensure_cdk macro 2025-03-05 17:39:08 +01:00
thesimplekid
c6200331cf Merge pull request #626 from thesimplekid/remove_phd
Remove phd
2025-03-05 11:20:38 +00:00
thesimplekid
f5be0ceeb6 chore: remove phd 2025-03-05 11:04:05 +00:00
thesimplekid
ca1fca2825 chore: update CHANGELOG 2025-03-05 10:37:46 +00:00
thesimplekid
e84d6ea7ab chore: Update rust-version (MSRV) to 1.75.0 (#623) 2025-03-05 10:32:41 +00:00
thesimplekid
0cd1d6a194 style: Clean up CHANGELOG.md formatting and consistency (#625) 2025-03-04 19:45:43 +00:00
C
f7d9a1b5db Drop the in-memory database (#613)
* Drop the in-memory database

Fixes #607

This PR drops the implementation of in-memory database traits.

They are useful for testing purposes since the tests should test our codebase
and assume the database works as expected (although a follow-up PR should write
a sanity test suite for all database trait implementors).

As complexity is worth with database requirements to simplify complexity and
add more robustness, for instance, with the following plans to add support for
transactions or buffered writes, it would become more complex and
time-consuming to support a correct database trait. This PR drops the
implementation and replaces it with a SQLite memory instance

* Remove OnceCell<Mint>

Without this change, a single Mint is shared for all tests, and the first tests
to run and shutdown makes the other databases (not-reachable, as dropping the
tokio engine would also drop the database instance).

There is no real reason, other than perhaps performance. The mint should
perhaps run in their own tokio engine and share channels as API interfaces, or
a new instance should be created in each tests

* Fixed bug with foreign keys

[1] https://gist.github.com/crodas/bad00997c63bd5ac58db3c5bd90747ed

* Show more debug on failure

* Remove old code

* Remove old references to WalletMemoryDatabase
2025-03-04 19:44:34 +00:00
thesimplekid (aider)
49ca9ff5d1 style: Clean up CHANGELOG.md formatting and consistency 2025-03-04 13:24:32 +00:00
thesimplekid
d6336b2da8 Merge pull request #624 from thesimplekid/improve_loggind
chore: improve logging in verification
2025-03-04 13:01:07 +00:00
thesimplekid
d615897ef0 chore: improve logging in verification 2025-03-04 12:02:05 +00:00
thesimplekid
a82e3eb314 fix: attempt to swap after a failed transaction (#622)
* fix: attempt to swap after a failed transaction

* fix: revert test change in https://github.com/cashubtc/cdk/pull/585
2025-03-03 14:10:47 +00:00
C
63393056a0 Do not use INSERT OR REPLACE in SQLite. (#620)
Instead, use `INSERT` and `ON CONFLICT`.  The reason is that in case of
conflicts, the `REPLACE` will trigger a DELETE and then perform an INSERT, as
outlined in the documentation[1], and that may cause a cascade of deletion due
to our FOREIGN KEYs.

Here is the official documentation:

```
When a UNIQUE or PRIMARY KEY constraint violation occurs, the REPLACE algorithm
deletes pre-existing rows that are causing the constraint violation prior to
inserting or updating the current row and the command continues executing
normally. If a NOT NULL constraint violation occurs, the REPLACE conflict
resolution replaces the NULL value with the default value for that column, or
if the column has no default value, then the ABORT algorithm is used. If
a CHECK constraint or foreign key constraint violation occurs, the REPLACE
conflict resolution algorithm works like ABORT.  When the REPLACE conflict
resolution strategy deletes rows in order to satisfy a constraint, delete
triggers fire if and only if recursive triggers are enabled.  The update
hook is not invoked for rows that are deleted by the REPLACE conflict
resolution strategy. Nor does REPLACE increment the change counter. The
exceptional behaviors defined in this paragraph might change in a future
release.
```

[1] https://www.sqlite.org/lang_conflict.html
2025-02-28 11:35:29 +00:00
thesimplekid
062d7be58f chore: pin base64ct as newer version is unsuported on stable 2025-02-26 10:57:15 +00:00
thesimplekid
827e4aebde Refactor mintd used in itest (#616) 2025-02-25 11:47:17 +00:00
lollerfirst
692e13ff16 Refactor Keyset Initialization (#615)
* reorg keyset startup initialization
2025-02-24 15:16:50 +00:00
C
d5df413d6b Drop AmountStr (#612)
* Drop AmountStr

Fixes #609

Instead write a customer serializer for Keys to serialize amounts as strings

* Add a custom error for invalid amounts
2025-02-22 17:46:02 +00:00
thesimplekid
6e86235970 Merge pull request #610 from BitcreditProtocol/peanut/swagger_type
fix openApi attributes to keyset id to present it as a string
2025-02-21 10:42:07 +00:00
codingpeanut157
606385f44a fix openApi attributes to keyset id to present it as a string
The attribute `schema(as = String)` does not result in the expected
behaviour.
It does not convert Id to being represented as a simple string, but
rather simply rename the type `Id` to `String`.

This commit removes the attribute that implements utoipa::ToSchema trait
for type `Id` and adds attribute to all the types that have a keyset id
    as inner type to represent it as string.
2025-02-20 16:27:43 +01:00
thesimplekid
e1458b07a8 chore: cdk-mintd v0.7.2 2025-02-13 11:50:07 +00:00
thesimplekid
a880e15d4c Merge pull request #603 from ok300/ok300-fix-mint-startup-clean-db-no-rpc
Fix minting and melting error on fresh `mintd` with RPC disabled
2025-02-13 11:47:23 +00:00
ok300
96003f3979 Fix minting and melting on mintd with RPC disabled 2025-02-13 12:34:50 +01:00
thesimplekid
1534a0620f chore: changelog 2025-02-13 11:27:18 +00:00
thesimplekid
517b6e8921 chore: change log 2025-02-13 11:04:46 +00:00
thesimplekid
7b7def17ee chore: release v0.7.1 2025-02-13 10:44:09 +00:00
thesimplekid
2beb3f971c Merge pull request #601 from thesimplekid/reconnect_cln
fix: cln return error on stream
2025-02-13 10:40:53 +00:00
thesimplekid
d6566f573b fix: cln return error on stream 2025-02-13 10:17:00 +00:00
thesimplekid
c8167cf8b7 Merge pull request #600 from thesimplekid/check_addition
feat: use checked addition for u64
2025-02-12 13:43:44 +00:00
thesimplekid
85ea5fff74 feat: use checked addition for u64 2025-02-12 12:27:05 +00:00
thesimplekid
fef64ee469 Update README.md 2025-02-12 10:27:48 +00:00
thesimplekid
664061fa49 Merge pull request #599 from thesimplekid/custom_der_paths_to_builder
feat: custome der paths to builder
2025-02-12 10:19:19 +00:00
thesimplekid
f1c52f3d63 Merge pull request #598 from daywalker90/cln-call-typed
cdk-cln: refactor to use .call_typed
2025-02-12 00:37:24 +00:00
thesimplekid
e70c03e489 feat: custome der paths to builder 2025-02-11 23:36:48 +00:00
daywalker90
38cd88bdf9 cdk-cln: refactor to use .call_typed 2025-02-11 17:03:09 +01:00
thesimplekid
0f1203b2e1 Merge pull request #595 from pycanis/patch-1
Fix link in DEVELOPMENT.md
2025-02-10 23:03:21 +00:00