This is a huge major release with tons of new features, bug fixes, performance improvements, and protocol updates. We have a new binary token format that is smaller, the wallet got a lot smarter with coin selection, the nutshell mint and wallet now support ecash fees, WebSocket updates, Multinut payments, and so much more.
This release includes a database migration for the mint. Make sure to back up your mint database before upgrading.
New features
New binary token format
The Cashu protocol introduced a new binary Cashu TokenV4 format (with prefix cashuB
) that saves around 40% space compared to the previous token format (with prefix cashuA
). The Nutshell wallet will produce TokenV4 tokens by default now. To produce tokens with the old format, you can use the command cashu send --legacy <amount>
(or -l
for short). If you created a new token already but you'd like to see the legacy version of it, enter cashu pending -l
.
Offline wallet and improved coin selection
The Nutshell wallet is now equipped with a vastly improved coin selection algorithm that allows the user to make as many transactions offline as possible while also saving on future fees by avoiding swaps with the mint as much as possible. This improves the utility, speed, and privacy of the Nutshell wallet, as it requires less communication with the mint.
Ecash fees
Nutshell now supports fees for Ecash transactions according to changes in NUT-02. Fees are determined by the number of Ecash inputs to a transaction. Fees are given in parts per thousand (ppk). As an example, if the fee is set to 250 ppk
(in Satoshis), a transaction spending 4 inputs will require 1 sat in fees. Mints can enable fees by setting MINT_INPUT_FEE_PPK
to an integer value in parts per thousand. Fees will only affect newly generated keysets, not old ones.
Warning: Wallet support for fees is still in active development. Enabling fees will break compatibility with most wallets in their current state. Mint operators should enable fees later in the future when there is widespread support for fees.
WebSocket subscriptions
The Cashu protocol recently introduced WebSocket subscriptions in NUT-17 which allows wallets to get notifications for state changes of mint quotes, melt quotes, and ecash spent states and the witness used for unlocking a locked token. The Nutshell mint can now receive subscription requests and send out updates to its clients. For the Nutshell wallet, this improves the responsiveness when minting new tokens as it does not require constant polling anymore. This feature will also improve the execution of smart contracts that require a timely retrieval of the witness used to unlock a token (for example when making atomic swaps against Lightning payments).
Multinut payments
The Nutshell mint now supports Multinut payments with the LND backend (see NUT-15). This feature is still experimental. To enable it, set the env variable MINT_LND_ENABLE_MPP=TRUE
. To initiate a partial payment with the Nutshell wallet, use cashu pay <invoice> <amount>
where <amount>
is the partial amount you want the mint to send. You can initiate partial payments from different mints by repeating this command with different mints that support this feature.
Getting ready for the cloud
A lot of work has been made to extract all state of the mint from the system's memory into the database. These are preparations for making Nutshell ready for parallel deployments in a Kubernetes cluster so that multiple instances of the mint can run on top of the same database. This will allow scaling Nutshell to process many more transactions than what was previously possible.
Support for EUR
We added initial support for Euro Ecash using the StrikeWallet
backend for Strike users who have access to Euro balances. FakeWallet
now also supports the Euro.
Support for CLN Rest
A new CLNRestWallet
backend was added that now supports CLN through the clnrest.py
plugin. Previously, CLN was only supported through the c-lightning-rest
third party interface for which we will phase out support through the CoreLightningRestWallet
.
Protocol updates
NUT-04 and NUT-5 state
fields
Mint and melt quotes now have a new state
enum field that represents the state of the quote (PR) to reflect changes in the corresponding NUT-04 and NUT-05 specifications.
What's Changed
- [CI] prevent pypi upload on pre-releases by @callebtc in #520
- README: add testnut by @callebtc in #522
- Mint: refactor melt quote by @callebtc in #530
- Multinut LND by @callebtc in #492
- startup: do not print postgres connection string, closes #523 by @callebtc in #540
- Add fees by @callebtc in #503
- Use integer division for fee calculation by @callebtc in #549
- Fix false mpp payment handling of unsupported backends by @callebtc in #547
- Mint: add websockets for quote updates by @callebtc in #413
- NUT-04 and NUT-05: Add
state
field to quotes by @callebtc in #560 - [Mint] Add support for BTC and EUR in
StrikeWallet
backend, add EUR toFakeWallet
by @callebtc in #561 - add MINT_LND_REST_CERT_VERIFY env bool that when set to False allow to skip certificate validation for LND api call by @elliedev80 in #535
- LndRestWallet: edit warning messages by @callebtc in #562
- Fix: default witness is None, closes #559 by @callebtc in #563
- Fix: Nut 05 mint response model by @callebtc in #564
- TokenV4 CBOR serialization by @callebtc in #502
- Mint: Add
clnrest.py
Lightning backend by @lollerfirst in #551 - update poetry.lock by @callebtc in #567
- Mint: table locks by @callebtc in #566
- fix: cashu send --lock by @callebtc in #570
- Refactor database transactions by @callebtc in #571
- bump version to 0.16.0 by @callebtc in #573
- Update requirements and docker build by @callebtc in #572
- Fix Tokenv4 handling of base64 keysets by @callebtc in #575
- Fix
receive -a
to receive all pending tokens by @callebtc in #578 - Fix loading b64 keysets and add option to set b64 inactive in WalletSettings by @callebtc in #579
- Wallet: add CLI flag
--force-swap
flag and force swapping all inactive keysets by @callebtc in #580 CONTRIBUTING.md
: Update contributing guidelines and environment setup by @callebtc in #581StrikeWallet
: support USDT by @callebtc in #583- codecov: ignore cashu/nostr by @callebtc in #378
CONTRIBUTING.md
: Add instructions for .env file by @callebtc in #582- Wallet: default to
SIG_INPUTS
in P2PK lock by @elnosh in #584 - NUT-06: Mint contact info by @callebtc in #585
New Contributors
- @elliedev80 made their first contribution in #535
- @lollerfirst made their first contribution in #551
- @elnosh made their first contribution in #584
Full Changelog: 0.15.3...0.16.0-rc1
What's Changed
- Fix NUT-17 settings entry for NUT-06 by @callebtc in #587
- Fix parsing of old format contact field in wallet by @callebtc in #589
- Fix race condition by @lollerfirst in #586
- Edit README.md by @callebtc in #590
Full Changelog: 0.16.0-rc1...0.16.0-rc2
What's Changed
- Add docker compose instructions by @callebtc in #591
- Mint: enable
LNbitsWallet
invoice stream by @callebtc in #594 - Remove unused coinselection code by @callebtc in #597
Full Changelog: 0.16.0-rc2...0.16.0