Commit Graph

1286 Commits

Author SHA1 Message Date
thesimplekid
727602affe Merge pull request #815 from thesimplekid/fix_wallet_sig
fix: signatory is not required for wallet
2025-06-15 08:21:53 +01:00
thesimplekid
00791a1125 fix: signatory is not required for wallet 2025-06-15 07:34:03 +01:00
C
5a6b28816a Migrate from sqlx to rusqlite (#783)
* Migrate from `sqlx` to rusqlite

1. Add rusqlite with rusqlite with a working thread
2. Add wallet without a thread (synchronous)
3. Add custom migration

Co-authored-by: thesimplekid <tsk@thesimplekid.com>
2025-06-14 12:49:50 +01:00
thesimplekid
a335b269b7 Update ln-bits to support v1 api (#802)
* feat: v1 websockets

* chore: update lnbits dep
2025-06-12 08:40:49 +01:00
thesimplekid
edae2abaf2 Merge pull request #807 from crodas/feature/rwlock-instead-of-mutex
Use `RwLock` instead of `Mutex`.
2025-06-12 08:40:10 +01:00
Cesar Rodas
2e2ce0f621 Use RwLock instead of Mutex.
A mutex is too aggressive when the shared object can be accessed read-only most
of the time instead of requiring exclusive access.
2025-06-11 20:17:04 -03:00
thesimplekid
319133a088 Merge pull request #805 from thesimplekid/docker_publish
fix: prevent docker publish from overwritting other arc
2025-06-10 15:30:16 +01:00
thesimplekid
3b87fff218 chore: changelog and remove flake box 2025-06-10 13:19:59 +01:00
thesimplekid
14efe4a8b8 fix: prevent docker publish from overwritting other arc 2025-06-10 12:53:27 +01:00
thesimplekid
7e8913a1cf Merge pull request #804 from coderwander/main
chore: add the missing right bracket
2025-06-10 10:56:02 +01:00
coderwander
8f6210dba4 chore: add the missing right bracket
Signed-off-by: coderwander <770732124@qq.com>
2025-06-10 17:49:51 +08:00
thesimplekid
26efb79e65 Merge pull request #803 from thesimplekid/mint_info_version
fix: set mint version
2025-06-09 23:27:33 +01:00
thesimplekid
86b03dca6d fix: set mint version 2025-06-09 22:05:50 +01:00
thesimplekid
5ae5d10948 chore: bump v0.10.0 (#797)
* chore: bump v0.10.0

* chore: cdk-signatory metadata
2025-06-07 20:30:09 +01:00
thesimplekid
f7846f65c2 chore: cdk-signatory metadata 2025-06-07 20:16:33 +01:00
thesimplekid
9e8f5a1e7d chore: bump v0.10.0 2025-06-07 20:09:15 +01:00
thesimplekid
21a5ac9406 feat(cli): enhance check-pending to reclaim proofs (#795)
* feat(cli): enhance check-pending to reclaim proofs

The check-pending command now directly attempts to reclaim proofs that
are no longer pending, replacing the previous check-only behavior.

Changes:
- Replace check_all_pending_proofs with reclaim_unspent functionality
- Add more detailed feedback about pending proof status
- Update command description to reflect new reclaim behavior
- Improve error handling and status reporting

This change makes the command more useful by actively reclaiming
proofs rather than just checking their status.

* refactor: remove CheckSpendable command and check_spent module

The CheckSpendable command and its associated check_spent.rs module have been
removed as their functionality is redundant with the CheckPending command.
2025-06-07 17:23:00 +01:00
thesimplekid
0b2b3c6d53 chore: update changelog v0.9.3 (#796) 2025-06-07 16:22:16 +01:00
thesimplekid
4e7d45bb98 chore: update changelog v0.9.3 2025-06-07 16:16:37 +01:00
C
83a919ccd6 Merge pull request #793 from crodas/feature/wallet-swap-before-melt
Perform a swap before melting by default.
2025-06-07 15:21:19 +01:00
thesimplekid
9a62777883 Merge pull request #794 from thesimplekid/mint_info_seq
fix: handle old nut15 spec
2025-06-07 10:42:01 +01:00
thesimplekid
9c3a64b029 fix: handle old nut15 spec 2025-06-06 23:36:45 +01:00
thesimplekid
3c39bd0aec refactor: remove unused fn (#790) 2025-06-06 14:46:26 +01:00
thesimplekid
3c9ceed5e0 refactor: remove unused fn 2025-06-06 13:53:36 +01:00
asmo
d9652d7f53 refactor: fixing pre commit hooks checks (#789) 2025-06-06 11:40:36 +01:00
thesimplekid
9f4d5ba424 chore: publish docker image to cashubtc (#788) 2025-06-05 13:58:47 +01:00
asmo
548bbf1b40 Secret remove pub properties (#782)
* refactor: add getters to Secret and SecretData

* refactor: use new getters for Secret and SecretData in wallet receive

* refactor: using SecretData constructor

---------

Co-authored-by: thesimplekid <tsk@thesimplekid.com>
2025-06-05 12:25:56 +01:00
thesimplekid
d665e2fc38 Merge pull request #786 from thesimplekid/cdk_sqlite_msrv
chore: fix msrv shell
2025-06-04 23:04:11 +01:00
thesimplekid
54b061340f chore: fix msrv shell 2025-06-04 22:53:57 +01:00
thesimplekid
35137424c3 Merge pull request #784 from stefanbitcr/restore_redundant
Remove redundant filter during restoration
2025-06-04 09:19:34 -04:00
thesimplekid
7251121d8e chore: update readme got bolt11 2025-06-04 12:42:18 +01:00
thesimplekid
58d36adc45 Merge pull request #785 from thesimplekid/increase_ci_time
chore: update ci timeout
2025-06-04 07:33:49 -04:00
thesimplekid
c37b218618 chore: update ci timeout 2025-06-04 12:33:08 +01:00
stefanbitcr
97abdd97e7 Remove redundant filter during restoration 2025-06-04 11:11:35 +02:00
thesimplekid
1f2654d974 Merge pull request #779 from asmogo/fix_config_example
chore: disabled mint_management_rpc. update ln_backend
2025-06-01 11:01:34 -04:00
thesimplekid
0d0c1ff17c Merge pull request #780 from gandlafbtc/patch-3
fix typo in main.rs
2025-06-01 11:01:02 -04:00
thesimplekid
c8741123c6 Merge pull request #781 from gandlafbtc/patch-4
Update example.config.toml
2025-06-01 11:00:31 -04:00
gandlafbtc
4c1e3a5941 Update example.config.toml
add example domain to lnd address in example config
2025-06-01 23:41:42 +09:00
gandlafbtc
af72d56558 fix typo in main.rs
doubble D
2025-06-01 10:42:43 +09:00
David Caseria
fe118d180f Signatory Loader (#777)
* Allow Signatory to be run with custom incoming stream

* Allow multiple signatories to be loaded on a server

* Fix merge conflict in server.rs

* Export SignatoryLoader

* Use unit error

* Use Arc instead of reference
2025-05-31 16:41:25 -04:00
dd dd
1e4d118950 chore: disabled mint_management_rpc. update ln_backend 2025-05-31 22:08:57 +02:00
David Caseria
0a832ff161 Allow Signatory to be run with custom incoming stream (#776) 2025-05-29 15:46:31 -04:00
David Caseria
98440b436c Make sqlite dependency optional for signatory (#775) 2025-05-29 12:12:27 -04:00
David Caseria
30d6b20c99 Reclaim unspent proofs by reverting transaction (#774)
* Reclaim unspent proofs by reverting transaction

* Change fn signatore to return unit
2025-05-29 12:12:10 -04:00
thesimplekid
9beb0b4256 chore: update readmes (#773) 2025-05-29 09:38:10 -04:00
thesimplekid
8c8d321a15 Merge pull request #772 from thesimplekid/update_ch
chore: update change log
2025-05-28 14:16:16 -04:00
thesimplekid
15b02fd2ee chore: update change log 2025-05-28 14:15:39 -04:00
asmo
19da3ac268 adding docker build workflow for arm64 images (#770)
* build: added arm64 docker build

* build: undo typo

* build: remove whitespace

* build: test workflow

* build: test workflow

* build: build arm first

* build: build arm first

* build: using nix arm64 base image

* build: set up qemu

* build: seccomp set to unconfined

* build: create nix config

* build: split arm workflow

* build: reset on release

* build: testing --extra-platforms flag

* build: testing --extra-platforms flag

* build: testing --extra-platforms flag

* build: reset on release
2025-05-28 13:36:25 -04:00
C
ade48cd8a9 Introduce a SignatoryManager service. (#509)
* WIP: Introduce a SignatoryManager service.

The SignatoryManager manager provides an API to interact with keysets, private
keys, and all key-related operations, offering segregation between the mint and
the most sensible part of the mind: the private keys.

Although the default signatory runs in memory, it is completely isolated from
the rest of the system and can only be communicated through the interface
offered by the signatory manager. Only messages can be sent from the mintd to
the Signatory trait through the Signatory Manager.

This pull request sets the foundation for eventually being able to run the
Signatory and all the key-related operations in a separate service, possibly in
a foreign service, to offload risks, as described in #476.

The Signatory manager is concurrent and deferred any mechanism needed to handle
concurrency to the Signatory trait.

* Fixed missing default feature for signatory

* Do not read keys from the DB

* Removed KeysDatabase Trait from MintDatabase

All Keys operations should be done through the signatory

* Make sure signatory has all the keys in memory

Drop also foreign constraints on sqlite

* Fix race condition

* Adding debug info to failing test

* Add `sleep` in test

* Fixed issue with active auth keyset

* Fixed dependency

* Move all keys and keysets to an ArcSwap.

Since the keys and keysets exist in RAM, most wrapping functions are infallible
and synchronous, improving performance and adding breaking API changes.

The signatory will provide this information on the boot and update when the
`rotate_keyset` is executed.

Todo: Implement a subscription key to reload the keys when the GRPC server
changes the keys. For the embedded mode, that makes no sense since there is a
single way to rotate keys, and that bit is already covered.

* Implementing https://github.com/cashubtc/nuts/pull/250

* Add CLI for cdk-signatory to spawn an external signatory

Add to the pipeline the external signatory

* Update tests

* Apply suggestions from code review

Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>
Co-authored-by: thesimplekid <tsk@thesimplekid.com>

* Minor change

* Update proto buf to use the newest format

* Rename binary

* Add instrumentations

* Add more comments

* Use a single database for the signatory

Store all keys, even auth keys, in a single database. Leave the MintAuthDatabse
trait implementation for the CDK but not the signagtory

This commit also moves the cli mod to its own file

* Update dep

* Add `test_mint_keyset_gen` test

---------

Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>
Co-authored-by: thesimplekid <tsk@thesimplekid.com>
2025-05-28 11:43:30 -04:00
thesimplekid
d1e5b378cd chore: update flake 25.05 remove nix cache (#769) 2025-05-28 10:09:45 -04:00