@forgesworn/moneyer 0.3.2 → 0.3.3

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,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.3] - 2026-08-22
4
+
5
+ - **Refusals are logged, so an operator can see why a wallet is failing.**
6
+ A holder reported "notes already spent" on every melt and the journal for
7
+ that whole day carried startup banners and one invoice sweep - nothing to
8
+ compare the report against. Refusals now log the method, the path and the
9
+ reason. Never the query string, because a note URL carries the k1 and log
10
+ files travel; and never the informational GET, which a single restore
11
+ walks twenty-odd unknown indexes of by design.
12
+
3
13
  ## [0.3.2] - 2026-08-22
4
14
 
5
15
  - **A note with a melt in flight is no longer advertised as withdrawable.**
package/dist/server.js CHANGED
@@ -312,7 +312,20 @@ export const createMoneyer = async (config, deps = {}) => {
312
312
  });
313
313
  res.end(JSON.stringify(body));
314
314
  };
315
- const fail = (reason, status = 200) => send({ status: 'ERROR', reason }, status);
315
+ // Refusals go to the operator's log, because a mint that refuses in
316
+ // silence cannot be debugged from the outside: a wallet shows its user
317
+ // "already spent" and the operator has nothing at all to compare it to.
318
+ //
319
+ // The PATHNAME only, never the query string: a note URL carries the k1,
320
+ // and a k1 is the money. And never the informational GET, which a
321
+ // single restore walks twenty-odd unknown indexes of by design - that
322
+ // is not news, and burying the rare refusals under it defeats the point.
323
+ const fail = (reason, status = 200) => {
324
+ if (requestUrl.pathname !== '/w') {
325
+ log(`refused ${req.method ?? 'GET'} ${requestUrl.pathname}: ${reason}`);
326
+ }
327
+ send({ status: 'ERROR', reason }, status);
328
+ };
316
329
  const knownUser = (user) => user === config.username || user === '_';
317
330
  // ---- the mint's face ----
318
331
  if (requestUrl.pathname === '/' && (req.method === 'GET' || req.method === 'HEAD')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgesworn/moneyer",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
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",