@forgesworn/moneyer 0.15.0 → 0.16.0

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,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.16.0 - 2026-09-16
4
+
5
+ - Bump `@lnurlcash/kit` from 0.14.2 to 0.18.1: the previous pin predated the
6
+ entire Schnorr `ck1` migration, so any note produced by a current wallet
7
+ was already unverifiable here. Brings the `ck1`/address-proof sha256
8
+ digest fix (signing `sha256(message)` instead of the raw string, matching
9
+ most conforming Schnorr signers) and a legacy-read fallback for notes
10
+ minted under the intermediate raw-message scheme.
11
+ - `spentRef` follows `recoverNoteOwnershipPubkey`'s new signature: it now
12
+ takes the `ck1` string directly and returns `{pubkeyXOnly, legacy}` rather
13
+ than raw recovered bytes.
14
+ - `claimMintedNote` now classifies a melt-in-flight note by catching the
15
+ kit's own `PendingNoteError`, replacing a `ServiceError{reason:'pending'}`
16
+ check the kit stopped throwing. The bump had silently broken this: an
17
+ unhandled `PendingNoteError` would have surfaced to a bound-mint quote's
18
+ poller as an unreachable-mint error rather than "pending" - untested
19
+ before this bump, now covered.
20
+
3
21
  ## 0.15.0 - 2026-09-15
4
22
 
5
23
  - Use `@lnurlcash/kit` 0.14 as the protocol implementation. Removed kit
package/README.md CHANGED
@@ -717,7 +717,7 @@ decoding and preimage verification on the melt path). The companion wallet
717
717
  is [`@forgesworn/notecase`](https://github.com/forgesworn/notecase).
718
718
 
719
719
  Other mints, wallets and libraries speaking the same protocol are indexed
720
- in [awesome-lnurlcash](https://github.com/TheCryptoDonkey/awesome-lnurlcash).
720
+ in [awesome-lnurlcash](https://github.com/lnurlcash/awesome-lnurlcash).
721
721
 
722
722
  ## Licence
723
723
 
package/dist/claim.js CHANGED
@@ -1,4 +1,4 @@
1
- import { NoteSpentError, NoteUnknownError, ServiceError, buildNoteUrl, fetchNoteInfo, isPreimage } from '@lnurlcash/kit';
1
+ import { NoteSpentError, NoteUnknownError, PendingNoteError, buildNoteUrl, fetchNoteInfo, isPreimage } from '@lnurlcash/kit';
2
2
  /**
3
3
  * Inspect the note a wallet named before requesting its invoice.
4
4
  *
@@ -21,9 +21,8 @@ export const claimMintedNote = async (withdrawLink, k1) => {
21
21
  };
22
22
  }
23
23
  catch (error) {
24
- if (error instanceof ServiceError && error.reason.trim().toLowerCase() === 'pending') {
24
+ if (error instanceof PendingNoteError)
25
25
  return { ...blank, state: 'pending' };
26
- }
27
26
  if (error instanceof NoteSpentError)
28
27
  return { ...blank, state: 'spent' };
29
28
  if (error instanceof NoteUnknownError)
package/dist/landing.js CHANGED
@@ -101,7 +101,7 @@ ${config.tosUrl ? `<div class="kv"><span>terms</span><a href="${escapeHtml(confi
101
101
  <h2>${escapeHtml(MINT_KNOWS_HEADING)}</h2>
102
102
  ${MINT_KNOWS.map(paragraph => `<p>${escapeHtml(paragraph)}</p>`).join('\n')}
103
103
  </section>
104
- <p class="small">Works with any LUD-25 wallet - <a href="https://github.com/forgesworn/notecase">notecase</a> among them. Verify a note offline against the signing key above.<br/>Independent implementation of the <a href="https://github.com/lnurl/luds/pull/301">LNURLcash draft</a> - graded by <a href="https://github.com/TheCryptoDonkey/lnurlcash-conformance">lnurlcash-conformance</a>.</p>
104
+ <p class="small">Works with any LUD-25 wallet - <a href="https://github.com/forgesworn/notecase">notecase</a> among them. Verify a note offline against the signing key above.<br/>Independent implementation of the <a href="https://github.com/lnurl/luds/pull/301">LNURLcash draft</a> - graded by <a href="https://github.com/lnurlcash/lnurlcash-conformance">lnurlcash-conformance</a>.</p>
105
105
  </main>
106
106
  </body>
107
107
  </html>`;
package/dist/server.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { createServer } from 'node:http';
2
2
  import { bytesToHex, hexToBytes, randomBytes } from '@noble/hashes/utils.js';
3
3
  import { finalizeEvent } from 'nostr-tools/pure';
4
- import { applyMintFee, decodeCk1, decodeCp1, encodeCs1WithAmount, grossUpForMintFee, hashK1, recoverNoteOwnershipPubkey } from '@lnurlcash/kit';
4
+ import { applyMintFee, decodeCp1, encodeCs1WithAmount, grossUpForMintFee, hashK1, recoverNoteOwnershipPubkey } from '@lnurlcash/kit';
5
5
  import { tryDecodeBolt11 } from 'farrier-kit/bolt11';
6
6
  import { NotePendingError, NoteStore, NoteUnavailableError, OutputCollisionError, swapFingerprint } from "./store.js";
7
7
  import { createNoteSigner } from "./signing.js";
@@ -32,9 +32,8 @@ const namedRef = (value) => {
32
32
  const spentRef = (k1) => {
33
33
  if (HEX32.test(k1))
34
34
  return { id: hashK1(k1), cp1: false };
35
- const signature = decodeCk1(k1);
36
- const pubkey = signature ? recoverNoteOwnershipPubkey(signature) : null;
37
- return pubkey ? { id: bytesToHex(pubkey), cp1: true } : null;
35
+ const owner = recoverNoteOwnershipPubkey(k1);
36
+ return owner ? { id: bytesToHex(owner.pubkeyXOnly), cp1: true } : null;
38
37
  };
39
38
  // LUD-25 renamed `h` to `p` on the lookup and `h`/`h2` to `p1`/`p2` on the
40
39
  // callback. The old names stay accepted; sending both spellings must agree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgesworn/moneyer",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
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",
@@ -56,7 +56,7 @@
56
56
  "live:bound-mint": "npm run build && node scripts/live-bound-mint-check.mjs"
57
57
  },
58
58
  "dependencies": {
59
- "@lnurlcash/kit": "0.14.2",
59
+ "@lnurlcash/kit": "0.18.1",
60
60
  "@noble/curves": "^2.3.0",
61
61
  "@noble/hashes": "^2.3.0",
62
62
  "@scure/base": "^1.2.4",
@@ -70,7 +70,7 @@
70
70
  "@types/node": "^24.0.0",
71
71
  "animejs": "^4.0.0",
72
72
  "happy-dom": "^20.0.0",
73
- "lnurlcash-conformance": "0.11.0",
73
+ "lnurlcash-conformance": "0.11.1",
74
74
  "playwright": "^1.62.1",
75
75
  "typescript": "^5.7.0",
76
76
  "uqr": "^0.1.2",