@forgesworn/moneyer 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.2] - 2026-08-22
4
+
5
+ - **A note with a melt in flight is no longer advertised as withdrawable.**
6
+ The mutating callback already refused a pending note; the informational
7
+ GET did not, so the check LUD-25 points a careful holder at was the one
8
+ that lied. That is the exact gap a sell-during-melt needs: start a melt,
9
+ show the buyer a healthy GET, take payment out of band, let the melt
10
+ settle. `fetchNoteInfo` on a pending note now fails the same way the
11
+ callback does, and lnurlcash-kit classifies it as `PendingNoteError`, so
12
+ a wallet parks the note rather than writing it off as unknown. Found by
13
+ re-reading LUD-25 against dni's lnurl-mint, which has had this guard.
14
+ - A flake in the melt suite: `leaves an unconfirmable outcome pending`
15
+ slept a fixed 100 ms, which was waiting for an in-flight melt to finish
16
+ exhausting its confirmations rather than for any state, and reconcile
17
+ deliberately skips a melt this process still has in flight. It now
18
+ retries reconcile until it can act.
19
+
3
20
  ## [0.3.1] - 2026-08-22
4
21
 
5
22
  - **Rounding the fee to a whole sat now really is the default.** 0.3.0
package/dist/server.js CHANGED
@@ -676,6 +676,16 @@ export const createMoneyer = async (config, deps = {}) => {
676
676
  return fail('Unknown note.');
677
677
  if (note.state === 'burned')
678
678
  return fail('Note already spent.');
679
+ // A note reserved by an in-flight melt is not withdrawable, and must
680
+ // not be advertised as though it were. LUD-25 makes this GET the way
681
+ // anyone checks what a note is worth, so answering "live, worth all
682
+ // of it" about a note halfway out of the door is the exact lie a
683
+ // sell-during-melt needs: the seller starts a melt, shows the buyer a
684
+ // healthy GET, takes payment out of band, and the melt settles. Same
685
+ // reason the mutating callback already gives, and the same one dni's
686
+ // lnurl-mint gives here.
687
+ if (note.state === 'pending')
688
+ return fail('pending');
679
689
  // maxWithdrawable states the note's value, as the reference does.
680
690
  // minWithdrawable is that value floored to a whole sat: most Lightning
681
691
  // wallets can only invoice whole sats, and a note of 94.9 sat that
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgesworn/moneyer",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "An LNURLcash (LUD-25) mint - strikes Lightning bearer notes. Independent implementation, cln/lnd funding sources, SQLite, zero HTTP framework.",
5
5
  "author": "TheCryptoDonkey",
6
6
  "license": "MIT",