Nutshell 0.14.0
brings many new features and improvements. These include a completely redesigned approach to use ecash spending conditions (programmable ecash) and the ability to transact offline (using offline signature validation). Protocol changes are according to the new specifications NUT-10, NUT-11, and NUT-12.
Protocol updates
Well-known spending conditions
Nutshell now supports NUT-10 spending conditions. This is a standardized way to create complex contracts between two Cashu users, if the mint supports a certain type of contract. One example is the P2PK implementation (see below).
Pay to Pubkey (P2PK)
P2PK allows you to lock a token to a specific pubkey. That way, only the intended receiver can redeem a token and nobody else. The recipient receives the token by providing a valid signature when redeeming it with the mint. The contract is enforced by the mint. To create a pubkey lock as a receiver, enter cashu lock
. To send to this lock, the sender enters cashu send <amount> --lock <p2pk_lock_of_receiver>
. This token can now be redeemed by the receiver. Read the specifications in NUT-11
DLEQ proofs
Discrete-log equality (DLEQ) proofs are now generated by the mint and handed over to wallets. Wallets can use these to verify the signature of the mint given their public key. Wallets can also send DLEQ proofs to other receiving wallets via cashu send --dleq <amount>
. Receiving wallets will validate the DLEQ proof before redeeming the token via the mint. Read more information in the DLEQ PR and the specification in NUT-12.
Other Improvements
- Wallet secret derivation fixed. Old tokens will not be restored with the new secret derivation. Use
cashu selfpay
to send yourself entire balance once. cashu info
now shows all mints- Wallet stores mint keysets for offline verification.
- Mint DB with Postgres support
- Include nostr submodule in project repo
- Improve Docker pipeline for wallet and mint
All changes
- FEAT: Add flake8 by @dni in #267
- Update makefile format check by @callebtc in #293
- [FEAT] add pre-commit by @dni in #294
- [FEAT] Improve tests by @dni in #296
- [DEV] add ruff and remove isort and flake by @dni in #300
- Show all mints in cashu info by @sihamon in #299
- quickfix ruff by @dni in #303
- [CHORE] updating dependencies, mainly fastapi by @dni in #302
- [Wallet] Refactor
restore_promises_from_to
by @callebtc in #307 - update requirements.txt by @callebtc in #308
- Mint/add_cors_to_error_response by @callebtc in #312
- load the proofs or we get a zero balance by @dyKiU in #310
- Refactor: P2PKSecret by @callebtc in #323
- [Wallet/Mint] DLEQ proofs by @callebtc in #175
- HTLCs by @callebtc in #325
- Tests: Test with
LIGHTNING=True
and refactor mint by @callebtc in #326 - Tests: mint operations by @callebtc in #328
- Bump to
0.14.0-rc1
by @callebtc in #329 - Ledger: add more type hints by @callebtc in #330
- Docker: Add wallet daemon and
docker-compose.yml
by @callebtc in #321 - Wallet: fix secret derivation & new CLI command
cashu selfpay
by @callebtc in #331 - update readme by @callebtc in #336
- readme: fix links by @callebtc in #337
- Coalesce all witness fields to
Proof.witness
by @callebtc in #342 - Remove P2SH by @callebtc in #341
- codecov nutshell by @callebtc in #343
- Update README.md by @callebtc in #344
- Wallet: Cache keysets by @callebtc in #333
- Join mint URL and endpoint in a safe way by @sihamon in #298
- [Wallet] Fix fee return for fee=0 by @callebtc in #345
- [Wallet] Add nostr dependency directly to repo by @callebtc in #346
- Format nostr submodule by @callebtc in #347
- Mint: Allow 0-valued amounts for blank outputs by @callebtc in #348
- Zero amount invoices: throw error before attempting a payment by @callebtc in #349
- Wallet: Lightning interface by @callebtc in #318
- Refactor secret conditions by @callebtc in #350
- use specific keyset for returned change by @callebtc in #351
- Fix LNbits backend to use proper BaseModels by @callebtc in #352
- Postgres migrations: remove balance view before children by @callebtc in #353
- fix proxy keys by @callebtc in #355
- Wallet: ensure that mint keys are loaded before calling appropriate api methods by @callebtc in #356
- Hide stacktrace for
DEBUG=FALSE
andProof.do_tict()
minor fixup by @callebtc in #357 - fakewallet: return preimage by @callebtc in #358
Full Changelog: 0.13.0...0.14.0