github cashubtc/nutshell 0.20.1

5 hours ago

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.

Notable Changes

Features

NUT-29 Batched Minting

The mint now supports NUT-29 batched minting, allowing multiple mint quotes to be processed in a single batch operation. New endpoints POST /v1/mint/quote/bolt11/check and POST /v1/mint/bolt11/batch have been added with strict validation for payment methods, units, states, and amount balances.

NUT-26 Bech32m-Encoded Payment Requests

Wallet now supports NUT-26 Bech32m+TLV encoding for payment requests as an alternative to the CBOR+base64 format (NUT-18). The pay and decode commands accept both creqA (NUT-18) and creqb1 (NUT-26) prefixes with automatic detection.

Async-Melt

Added prefer_async field to melt requests, enabling asynchronous Lightning payment processing. The wallet's melt method and CLI pay command support async payment initiation for improved UX on slower payment paths.

Redis Cluster Support

Added MINT_REDIS_CACHE_CLUSTER setting to enable connecting to Redis Cluster deployments for high-availability caching.

Mint

  • Added issued_time to mint_quotes table for precise timestamping of minting events
  • Fixed change promises ordering in paid melt quotes to prevent incorrect signature mapping
  • Batched subscription initialization to prevent database connection exhaustion with multiple websocket filters
  • Enforced unique x-coordinates in P2PK pubkey deduplication (security hardening)
  • Fixed UpdateQuoteTtl RPC to correctly write to quote TTL settings instead of Redis cache TTL
  • Handle websocket disconnect frames cleanly without ASGI errors

Other

  • Refactored models.py into modular package structure for better code organization
  • Docker Compose now includes Redis caching server by default
  • Fixed Docker build by replacing deprecated --no-dev with --without dev for Poetry 2.x
  • Added manual Docker build trigger via workflow_dispatch

What's Changed

  • fix(mint): enforce unique x-coordinates in p2pk pubkey deduplication by @a1denvalu3 in #969
  • fix(docker): replace deprecated --no-dev with --without dev for Poetry 2.x by @Forte11Cuba in #972
  • ci: allow manual docker build trigger by @callebtc in #973
  • feat(mint): add issued_time to mint_quotes table by @a1denvalu3 in #985
  • fix(models): correctly apply Pydantic max_length to list string fields by @a1denvalu3 in #987
  • feat: add support for Redis Cluster by @a1denvalu3 in #992
  • fix(mint): batch subscription initialization to prevent db connection exhaustion by @a1denvalu3 in #1000
  • fix: correct 'occured' to 'occurred' in docstring by @Luciferstrai in #1001
  • fix(mint): preserve change promises order in paid melt quotes by @a1denvalu3 in #991
  • chore: use os.urandom(30) for random_hash by @a1denvalu3 in #1005
  • chore: refactor models.py into modular package structure by @KvngMikey in #960
  • fix: UpdateQuoteTtl writes to quote TTL settings, not Redis cache TTL by @KvngMikey in #983
  • fix(core): use cls instead of self in PostMeltResponse.from_melt_quote by @KvngMikey in #1007
  • feat: implement async-melt functionality by @a1denvalu3 in #1002
  • fix(lightning): handle PENDING payment execution status in Blink backend by @a1denvalu3 in #994
  • feat: support NUT-26 Bech32m-Encoded Payment Requests by @KvngMikey in #904
  • chore(docker): add redis caching server to docker-compose by @a1denvalu3 in #990
  • fix: update .env.example to reflect rate limiting enabled by default by @Codepocketdev in #996
  • chore: remove stale TODO, HTLC pubkey signing already wired up by @KvngMikey in #979
  • feat(mint): implement NUT-29 batched minting by @a1denvalu3 in #958
  • fix(lnbits): tolerate missing preimage in payment status response by @gorrdy in #1017
  • fix(mint): handle websocket disconnect frames cleanly by @b-l-u-e in #1014
  • fix: correct fee amount calculation for clnrest/corelightningrest by @a1denvalu3 in #1027
  • bump to 0.20.1 by @callebtc in #1030

New Contributors

Full Changelog: 0.20.0...0.20.1

Don't miss a new nutshell release

NewReleases is sending notifications on new releases.