lnurlcash-conformance 0.13.0 → 0.13.1

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
@@ -4,6 +4,15 @@ Semantic versioning. While the LUD-25 draft is unmerged, `0.x` minor bumps
4
4
  may add or tighten checks that a previously-passing mint now fails; pin an
5
5
  exact version if you gate CI on the grade.
6
6
 
7
+ ## 0.13.1 - 2026-09-16
8
+
9
+ - The grader's own `ck1` (the one the Part 2 certification check spends
10
+ with) now signs `sha256("LNURLcash")`, like the vectors. It still signed
11
+ the raw 9-byte message, so a mint that dropped that older form would have
12
+ failed the check, and a mint that only read the older form would have
13
+ passed it. `ownershipProof` is exported, and the selfcheck holds it to the
14
+ digest.
15
+
7
16
  ## 0.13.0 - 2026-09-16
8
17
 
9
18
  **`ck1` and the LN-address register/unregister proof now sign a sha256
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lnurlcash-conformance",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "description": "Language-neutral conformance vectors, an adversarial mock mint, and a grader for LNURLcash (LUD-25) implementations",
5
5
  "author": "TheCryptoDonkey",
6
6
  "license": "MIT",
package/runner/index.d.ts CHANGED
@@ -43,6 +43,8 @@ export interface Report {
43
43
  export declare const createReport: () => Report
44
44
 
45
45
  /** an `lnurlw://` or `lnurlp://` URL as its https equivalent, per LUD-17 */
46
+ /** A Part 2 note's ck1: x-only key || BIP-340 signature over sha256("LNURLcash"). */
47
+ export declare const ownershipProof: (secretKey: Uint8Array) => string
46
48
  export declare const fromLud17: (value: string) => string
47
49
 
48
50
  /** a lightning address or LNURL as the payRequest URL to fetch */
package/runner/index.mjs CHANGED
@@ -91,10 +91,12 @@ const decodeCertificate = value => {
91
91
  }
92
92
 
93
93
  // The bearer secret of a cp1 note: its x-only key followed by a BIP-340
94
- // Schnorr signature over the raw UTF-8 bytes of "LNURLcash".
95
- const ownershipProof = secretKey => {
94
+ // Schnorr signature over sha256("LNURLcash"), the 32-byte digest part2.json
95
+ // signs (luds#6de59b2). A mint may still read the raw-message form, but a
96
+ // grader that only ever sends that form cannot tell whether it reads this one.
97
+ export const ownershipProof = secretKey => {
96
98
  const pubkey = schnorr.getPublicKey(secretKey)
97
- const signature = schnorr.sign(utf8ToBytes('LNURLcash'), secretKey)
99
+ const signature = schnorr.sign(sha256(utf8ToBytes('LNURLcash')), secretKey)
98
100
  return encodeCash('ck', new Uint8Array([...pubkey, ...signature]))
99
101
  }
100
102