@forgesworn/moneyer 0.13.1 → 0.13.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 +8 -0
- package/dist/store.js +9 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.13.2 - 2026-09-11
|
|
4
|
+
|
|
5
|
+
- An operator name that changes owner drops the branch the previous owner
|
|
6
|
+
set. `MONEYER_ZAP_NAMES` re-points a name at every startup, and until now
|
|
7
|
+
the old owner's `cx1` survived it, so the name went on paying the previous
|
|
8
|
+
owner's keys. The same owner keeps their branch and its index across a
|
|
9
|
+
restart, as before.
|
|
10
|
+
|
|
3
11
|
## 0.13.1 - 2026-09-11
|
|
4
12
|
|
|
5
13
|
- A name's owner can set or clear its `cx1` while self-service registration
|
package/dist/store.js
CHANGED
|
@@ -531,10 +531,18 @@ export class NoteStore {
|
|
|
531
531
|
// The operator's own names, re-applied at every startup. Idempotent, and
|
|
532
532
|
// the environment wins: it is the operator's mint, and a name they put
|
|
533
533
|
// in the environment is one they mean to have.
|
|
534
|
+
//
|
|
535
|
+
// A branch the owner set survives a restart, but not a change of owner:
|
|
536
|
+
// it is the previous owner's keys, and keeping it would go on paying the
|
|
537
|
+
// name to someone the operator just took it from.
|
|
534
538
|
putOperatorZapName(name, pubkey) {
|
|
535
539
|
this.db
|
|
536
540
|
.prepare(`INSERT INTO zap_names (name, pubkey, created_at, paid_msat, source) VALUES (?, ?, ?, 0, 'env')
|
|
537
|
-
ON CONFLICT(name) DO UPDATE SET
|
|
541
|
+
ON CONFLICT(name) DO UPDATE SET
|
|
542
|
+
cx1 = CASE WHEN zap_names.pubkey = excluded.pubkey THEN zap_names.cx1 ELSE NULL END,
|
|
543
|
+
next_index = CASE WHEN zap_names.pubkey = excluded.pubkey THEN zap_names.next_index ELSE 0 END,
|
|
544
|
+
pubkey = excluded.pubkey,
|
|
545
|
+
source = 'env'`)
|
|
538
546
|
.run(name.toLowerCase(), pubkey, Date.now());
|
|
539
547
|
}
|
|
540
548
|
// A self-service registration: burn the note that paid for the name and
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgesworn/moneyer",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.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",
|