Releases: cashubtc/nutshell
0.18.2
This release introduces updated default mint fees and several bug fixes across both the mint and wallet.
Default Fees
New mints now use a default fee of 100 ppk. This value can be changed via the .env parameter:
MINT_INPUT_FEE_PPK=100
Recap: How Cashu fees work
Fees in Cashu are based on the number of inputs in a transaction (see NUT-02). Each proof counted as an input contributes linearly to total fees. A fee of 100 ppk means 100 parts per thousand inputs, rounded up. In other words, roughly 0.1 base units per input, rounded up to the nearest integer.
Example:
- For a
satkeyset, 5 inputs incur 0.5 sat fee, rounded up to 1 sat. - Any transaction with up to 10 inputs costs 1 sat, 11 to 20 inputs cost 2 sats, and so on.
- For
usdkeysets, this corresponds to 1 cent per 10 inputs.
Fees are designed to stay low to maintain a smooth user experience while still discouraging abuse. All mints are encouraged to enable fees for protection.
Fixes
- Mint now returns a clean error for pending blinded outputs (code
10002). A dedicated error code for pending outputs will be introduced soon to distinguish this case from already-signed outputs. - Strike backend now applies USDT fees correctly.
- Wallet updates keyset fee settings when they change.
- Mint now tracks fees accurately across multiple keysets.
What's Changed
- Fix blind message already signed error by @callebtc in #828
- Mint: StrikeBackend handle USDT fees by @callebtc in #829
- gRPC interface: description of settings by @callebtc in #823
- Wallet fix: update keyset fees on
load_mint()by @callebtc in #830 - Mint: turn on fees by default by @callebtc in #831
- fix: increment fees for correct keysets by @lollerfirst in #825
- bump to 0.18.2 by @callebtc in #832
- bump to 0.18.2 again by @callebtc in #834
- revert error message change from #828 by @callebtc in #835
Full Changelog: 0.18.1...0.18.2
0.18.1
Caution
This release includes a database migration for the mint. Ensure you back up your database before upgrading your Nutshell instance to avoid data loss.
Fixes
- Clean up large witnesses that might contaminate the database due to the lack of a size check on the HTLC preimage size.
- Remove timeout for Lightning backend HTTP connections.
What's Changed
- Mint: migration to clean up overly large witnesses by @callebtc in #817
- fix: remove 5 seconds timeout by @lollerfirst in #819
Full Changelog: 0.18.0...0.18.1
0.18.0
Caution
This release includes a database migration for the mint. Ensure you back up your database before upgrading your Nutshell instance to avoid data loss.
New Features
Mint management via gRPC
Mint management gRPC server for integration with management UI Orchard and a CLI tool that can send commands to the Mint while it's running.
Additional Protocol Updates
- NUT-04: Create invoices with a description.
Fixes and Improvements
SIG_ALLsignature flag- USD support for Strike backend
- Improve invoice stream to Lightning backend
- Prevent duplicate blank outputs while melting
- Fix double-execution of melt quotes for the same invoice
- Several other bug fixes
What's Changed
- Mint: adjust mint melt settings by @callebtc in #764
- Add verbose request logging feature to wallet by @olindost in #758
- Mint Management gRPC Server by @lollerfirst in #723
- [BUGFIX]
SIG_ALLcheck returns true for other sigflags by @lollerfirst in #767 - management RPC follow up by @lollerfirst in #770
- fix "Expected currency USD, got USDT" when generating mint quote by @gudnuf in #772
- Adjust mint melt settings 2 by @callebtc in #777
- feat: implement exponential backoff for
paid_invoices_streamby @lollerfirst in #778 - fix: subscription re-init bug by @lollerfirst in #781
- add description to NUT-04 method options by @callebtc in #783
- update .env.example by @asmogo in #794
- Fix duplicate blank outputs during melt by @callebtc in #795
- check for existing b by @callebtc in #802
- refactor: HTLC spending conditions by @lollerfirst in #803
- fix: unique
('PENDING', checking_ID)for melt quotes by @lollerfirst in #800 - bump to 0.18.0 by @callebtc in #812
New Contributors
Full Changelog: 0.17.1...0.18.0
0.17.1
0.17.0
Caution
This release includes a database migration for the mint. Ensure you back up your database before upgrading your Nutshell instance to avoid data loss.
New Features
Blind Authentication
- Limit mint access using Clear and Blind Authentication. Nutshell now supports NUT-21 and NUT-22, enabling the use of OAuth 2.0 identity providers like Keycloak (or any compatible provider). This allows you to create closed systems where only registered users of a service can access the mint.
- NUT-22 introduces Blind Authentication, which enhances user privacy by anonymizing authentication within the set of registered users.
Improved Multi-Nut Payments
- Multi-nut payments via LND are now more reliable. Nutshell queries multiple routes before failing, significantly improving payment success rates.
Removed Features
The wallet REST API has been removed from the project due to a low utility to maintenance cost ratio.
Additional Protocol Updates
SIG_ALLMultisig Flag: Users can now lock ecash to specific destinations (outputs). PR #735- Mint and Melt Quote Enhancements: The update to NUT-04/05 introduces new fields (
amount,unit,request) to mint and melt quotes. PR #719 - ToS URL: Mints now have the option to enter a Terms of Service (ToS) URL in the mint info settings.
Fixes and Improvements
- Wallet Un-reservation: Nutshell wallet now un-reserves ecash after a failed Lightning payment more reliably.
- Improved Keyset Rotation: Enhanced keyset rotation process for mints.
- Pending Melt Quotes: Mints now check pending melt quotes in the background every hour, ensuring more reliable processing of pending ecash.
- Balance Tracking for Keysets: Mints can now track balances for each keyset separately, offering better observability and reporting.
- Strike backend: now supports
msatkeysets
What's Changed
- Blind authentication by @callebtc in #675
- Update Error Codes by @lollerfirst in #702
- Set correct blink min fee by @callebtc in #701
- Balance Views Grouped By Keyset by @lollerfirst in #652
- Add CLI Decode Command by @lollerfirst in #709
- Update README.md - Add Redis info? by @findingsov in #714
- Update README.md-install nutshell into nutshell dir by @findingsov in #713
- [FIX] NUT-15 mpp amount in millisats by @lollerfirst in #703
- Add LightningPaymentFailedError exception by @callebtc in #706
- [NUT-15] LND: Try Multiple Routes by @lollerfirst in #692
- Wallet: determine valid amounts from mint's keys response by @NonsoAmadi10 in #684
- Upgrade
coincurveto version 21.0.0 by @ofek in #721 - NUT-04/05: add
amount,unit,requestto melt and mint quote responses by @callebtc in #719 - Fix mint migrations: Fill in missing keyset IDs in proofs and promises by @callebtc in #729
- Add terms of service URL to MintInformation class by @callebtc in #715
- Cjbeery24/mint copy: Invoice checker background tasks by @callebtc in #722
- Fix getting the invoice from LNbits API by @iWarpBTC in #732
SIG_ALLsignature flag for P2PK by @callebtc in #735- Mint Keyset Rotation by @lollerfirst in #734
- Wallet: add
Wallet.get_melt_proof(), recoverreservedstate in failedWallet.melt()by @callebtc in #730 - Chore: reorganize docker compose files for redis and keycloak by @callebtc in #736
- Wallet: Fix cli mpp off by @callebtc in #741
- Mint: add new init test to mint by @callebtc in #743
.env.exampleupdate for mint TOS by @callebtc in #746- Testing: check if pipeline gets stuck because of startup task by @callebtc in #745
- Bump version to 0.16.6 by @callebtc in #747
- [PATCH] LND
use_mission_control+ exclude failing channels by @lollerfirst in #738 - Tests: split wallet test from mint test pipeline by @callebtc in #748
- Mint: watchdog balance log and killswitch by @callebtc in #705
- Wallet: fix db migration 13 duplicate by @callebtc in #750
- Mint: add
msatsupport for Strike backend by @callebtc in #755
New Contributors
- @NonsoAmadi10 made their first contribution in #684
- @ofek made their first contribution in #721
- @iWarpBTC made their first contribution in #732
Full Changelog: 0.16.5...0.16.6-rc1
0.17.0-rc1
Important
This release candidate is not meant to be used in production.
Caution
This release includes a database migration for the mint. Ensure you back up your database before upgrading your Nutshell instance to avoid data loss.
New Features
Blind Authentication
- Limit mint access using Clear and Blind Authentication. Nutshell now supports NUT-21 and NUT-22, enabling the use of OAuth 2.0 identity providers like Keycloak (or any compatible provider). This allows you to create closed systems where only registered users of a service can access the mint.
- NUT-22 introduces Blind Authentication, which enhances user privacy by anonymizing authentication within the set of registered users.
Improved Multi-Nut Payments
- Multi-nut payments via LND are now more reliable. Nutshell queries multiple routes before failing, significantly improving payment success rates.
Removed Features
The wallet REST API has been removed from the project due to a low utility to maintenance cost ratio.
Additional Protocol Updates
SIG_ALLMultisig Flag: Users can now lock ecash to specific destinations (outputs). PR #735- Mint and Melt Quote Enhancements: The update to NUT-04/05 introduces new fields (
amount,unit,request) to mint and melt quotes. PR #719 - ToS URL: Mints now have the option to enter a Terms of Service (ToS) URL in the mint info settings.
Fixes and Improvements
- Wallet Un-reservation: Nutshell wallet now un-reserves ecash after a failed Lightning payment more reliably.
- Improved Keyset Rotation: Enhanced keyset rotation process for mints.
- Pending Melt Quotes: Mints now check pending melt quotes in the background every hour, ensuring more reliable processing of pending ecash.
- Balance Tracking for Keysets: Mints can now track balances for each keyset separately, offering better tracking and reporting.
- Strike backend: now supports
msatkeysets
What's Changed
- Blind authentication by @callebtc in #675
- Update Error Codes by @lollerfirst in #702
- Set correct blink min fee by @callebtc in #701
- Balance Views Grouped By Keyset by @lollerfirst in #652
- Add CLI Decode Command by @lollerfirst in #709
- Update README.md - Add Redis info? by @findingsov in #714
- Update README.md-install nutshell into nutshell dir by @findingsov in #713
- [FIX] NUT-15 mpp amount in millisats by @lollerfirst in #703
- Add LightningPaymentFailedError exception by @callebtc in #706
- [NUT-15] LND: Try Multiple Routes by @lollerfirst in #692
- Wallet: determine valid amounts from mint's keys response by @NonsoAmadi10 in #684
- Upgrade
coincurveto version 21.0.0 by @ofek in #721 - NUT-04/05: add
amount,unit,requestto melt and mint quote responses by @callebtc in #719 - Fix mint migrations: Fill in missing keyset IDs in proofs and promises by @callebtc in #729
- Add terms of service URL to MintInformation class by @callebtc in #715
- Cjbeery24/mint copy: Invoice checker background tasks by @callebtc in #722
- Fix getting the invoice from LNbits API by @iWarpBTC in #732
SIG_ALLsignature flag for P2PK by @callebtc in #735- Mint Keyset Rotation by @lollerfirst in #734
- Wallet: add
Wallet.get_melt_proof(), recoverreservedstate in failedWallet.melt()by @callebtc in #730 - Chore: reorganize docker compose files for redis and keycloak by @callebtc in #736
- Wallet: Fix cli mpp off by @callebtc in #741
- Mint: add new init test to mint by @callebtc in #743
.env.exampleupdate for mint TOS by @callebtc in #746- Testing: check if pipeline gets stuck because of startup task by @callebtc in #745
- Bump version to 0.16.6 by @callebtc in #747
- [PATCH] LND
use_mission_control+ exclude failing channels by @lollerfirst in #738 - Tests: split wallet test from mint test pipeline by @callebtc in #748
- Mint: watchdog balance log and killswitch by @callebtc in #705
- Wallet: fix db migration 13 duplicate by @callebtc in #750
New Contributors
- @NonsoAmadi10 made their first contribution in #684
- @ofek made their first contribution in #721
- @iWarpBTC made their first contribution in #732
Full Changelog: 0.16.5...0.16.6-rc1
0.16.5
This maintenance release contains various bug fixes for the mint and the wallet. Most notably, overpaid Lightning fees are now issued to the user at the next restart of the mint in cases where the mint has crashed or turned off while an outgoing Lightning payment was still pending.
What's Changed
- Add restart policy for Redis Docker container by @callebtc in #687
- update asyncpg 0.29.0 -> 0.30.0 to make Python 3.13 happy by @prusnak in #690
- chore: use poetry the latest 1.8.x poetry consistently by @prusnak in #691
- config cleanup regarding MPP by @prusnak in #689
- Issue NUT-08 overpaid Lightning fees for melt quote checks on startup by @callebtc in #688
- Fix Redis teardown logic based on usage by @callebtc in #696
- [FIX] Specs conformant error codes by @lollerfirst in #693
- wallet fix: load proofs before receiving by @callebtc in #698
- [FIX] Reject Internal MPP Melt Quote Requests by @lollerfirst in #697
- bump to 0.16.5 by @callebtc in #699
Full Changelog: 0.16.4...0.16.5
0.16.4
This release brings two new protocol spec updates to nutshell, NUT-19 and NUT-20 (thank you @lollerfirst). It also includes a new HTTP compression middleware (thank you @ok300) and several bug fixes.
Note
Don't forget to run poetry install if you update nutshell from the GitHub repository.
NUT-19: Cached Response
The nutshell mint now supports NUT-19 cached responses using Redis. The mint will replay successful mint, melt, and swap responses from its caching middleware. Enable these settings in your .env to cache responses in Redis:
MINT_REDIS_CACHE_ENABLED=TRUE
MINT_REDIS_CACHE_URL="redis://localhost:6379"A new file in /docker/docker-compose.yml can be used to start a redis server using docker compose up.
NUT-20: Signature on Mint Quote
NUT-20 allows users to create mint quotes that can only be minted if a valid signature is provided by the creator of the mint quote.
What's Changed
- Add MPP methods key to info endpoint by @callebtc in #672
- parse env example by @callebtc in #677
- recommend openssl for key generation by @callebtc in #678
- Mint: Catch websocket disconnect errors by @callebtc in #674
- fix: NUT-15 setting remove mpp boolean by @callebtc in #673
- Add HTTP compression middleware by @ok300 in #676
- NUT-19: Cached Requests and Responses by @lollerfirst in #624
- NUT-20 (signatures on quotes) for mint and wallet side by @lollerfirst in #670
- Add period at the end of the phrase by @whileunless in #681
- Bump version to 0.16.4 by @callebtc in #685
- Add NUT-19 example for caching responses by @callebtc in #686
New Contributors
- @ok300 made their first contribution in #676
- @whileunless made their first contribution in #681
Full Changelog: 0.16.3...0.16.4
0.16.3
This is a service update fixing a number of bugs and other minor issues.
Mint
- bolt11 invoices with different units on the same mint now settle externally via the Lightning network
- Turn on multipath payments (MPP) by default for LND and CLN
- NUT-06: Signal alternative URLs to reach the mint from using
.envvarMINT_INFO_URLS - Fix: Signal NUT-14 support (HTLCs) in info endpoint
- Fix: Return LN preimage in lookup of successful melt quote
Wallet
- Store Lightning invoices in new melt and mint quote tables
- Sort outputs by amount to mitigate transaction amount privacy leaks
- Minor bug fixes to support older mints
What's Changed
- Mint: settle mint-melt on same mint with different units externally by @gudnuf in #651
- add preimage and change fields to response from
GET /v1/melt/quote/bolt11/{quote_id}by @elnosh in #656 - sort split from split_wallet_state by @elnosh in #653
- Wallet: store quotes by @callebtc in #657
- Chore: update dev dependencies by @callebtc in #658
- Fix wallet backwards paid flag melt by @callebtc in #659
- Wallet: deprecated api: Catch JSON decoding errors in response handling by @callebtc in #660
- Ensure state check compatibility with versions < 0.16.0 by @callebtc in #661
- bump version to 0.16.2 by @callebtc in #664
- Mint: Turn off locking by default by @callebtc in #662
- Bump python version requirements in all files by @callebtc in #654
- Fix db lock tests by @callebtc in #665
- Wallet check payment hash by @lollerfirst in #649
- add nut-14 as supported in info endpoint by @elnosh in #647
- [FIX] Wallet sort outputs before swapping by @lollerfirst in #648
- Conditions: refactor pubkey extraction and assume
n_sigs=1for refund spend path by @callebtc in #644 - NUT-06: add urls field by @prusnak in #638
- Add FakeWallet invoice features tag for supported payment secret by @davidcaseria in #609
- Mint: turn on mpp by default by @callebtc in #667
- Fix: format by @callebtc in #668
- bump version to 0.16.3 by @callebtc in #669
New Contributors
- @gudnuf made their first contribution in #651
- @davidcaseria made their first contribution in #609
Full Changelog: 0.16.1...0.16.3
0.16.2
0.16.2
This hot fix disables a feature introduced in 0.16.1 that prevented proofs from getting stuck in case where the Lightning backend is detected to be malfunctioning. In that case, the mint would lock all Lightning payments and return the error "Melt is disabled. Please contact the operator.".
Tests have shown that this feature triggers in too many unrelated cases which is why it is disabled by default now. To manually turn on this feature, set the .env variable MINT_DISABLE_MELT_ON_ERROR=True.
Changes since 0.16.1: 0.16.1-branch...0.16.2-branch
0.16.1
This update brings several bug fixes and stability improvements to nutshell. It also adds support for LND via gRPC.
Mint
- Support for LND via gRPC for
LndRPCWallet - NUT-15 Multinut payments for
CLNRestWallet - Stability improvements
Wallet
- Several minor bug fixes
Protocol
- NUT-06: Announce local time
- NUT-06: Announce icon URL with the
.envflagMINT_INFO_ICON - NUT-04: Mint invoices with a description
- Fix: HTLC signature model
Updating
Notice: This release bumps the minimal Python version to 3.10. If you were using an older version, upgrade your Python version first before you upgrade nutshell.
Dn't forget to run poetry install if you update from the git repository.
What's Changed
- Remove base64 padding from serialized tokens by @callebtc in #600
- Mint: Talk to LND via gRPC by @lollerfirst in #595
- Wallet: Strip trailing slash from URL by @callebtc in #605
- CLN Multi-Nut payments test fix by @lollerfirst in #602
- implement nut-06 time by @prusnak in #611
- bump bip32 and coincurve dependencies by @prusnak in #612
- NUT-06: add icon URL by @callebtc in #604
- Sanitize mint URL before adding by @callebtc in #606
- NUT-04: add description by @callebtc in #613
- feat: announce description in MintMethodSetting by @prusnak in #617
- chore: run pyupgrade by @prusnak in #623
- Mints: New melt flow by @callebtc in #622
- Fix: Unset pending melt quote by quote id by @callebtc in #629
- Fix: wallet include fees in swap outputs for inputs of successive melt by @callebtc in #630
- Repo: disable codecov status by @callebtc in #631
- Testing: add tests for event client manager by @callebtc in #632
- bump version to 0.16.1 by @callebtc in #633
- chore: modernize f-string usage by @prusnak in #627
- Fix: ledger requires deprecated
paidflags in db + wallet disable base64 keysets by default by @callebtc in #634 - Bump SQLAlchemy to 2.0 by @lollerfirst in #626
- Halt melt on exception by @callebtc in #635
- Bump dependencies to latest versions by @callebtc in #636
- Add get quote API to wallet + check proof states in batches by @callebtc in #637
- Wallet: handle PostMeltResponse_deprecated from v1 api by @callebtc in #642
- wait for uvicorn server to bind before running tests by @conduition in #607
- Refactor conditions and fix HTLC multisig by @callebtc in #643
- Mint: LNbitsWallet add extra check for payment state by @callebtc in #601
New Contributors
- @prusnak made their first contribution in #611
- @conduition made their first contribution in #607
Full Changelog: 0.16.0...0.16.1