@forgesworn/moneyer 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 +7 -0
- package/README.md +3 -0
- package/dist/names.js +4 -2
- package/dist/server.js +4 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.13.1 - 2026-09-11
|
|
4
|
+
|
|
5
|
+
- A name's owner can set or clear its `cx1` while self-service registration
|
|
6
|
+
is closed. Closing registration stops new names; it no longer stops the
|
|
7
|
+
owner of an existing one, an operator name included, from choosing where
|
|
8
|
+
it pays. A request for a new name still gets the same 404.
|
|
9
|
+
|
|
3
10
|
## 0.13.0 - 2026-09-11
|
|
4
11
|
|
|
5
12
|
- **Names that pay to the holder's own keys.** `POST /names` takes a `cx1`,
|
package/README.md
CHANGED
|
@@ -561,6 +561,9 @@ and spends with its own `ck1`. A wallet that only knows note URLs sees no
|
|
|
561
561
|
branch.
|
|
562
562
|
|
|
563
563
|
`"cx1": null` clears the branch and puts the name back on the custodial path.
|
|
564
|
+
This works while registration is closed too: closing it stops new names, not
|
|
565
|
+
the owner of one choosing where it pays, including a name the operator set up
|
|
566
|
+
in `MONEYER_ZAP_NAMES`.
|
|
564
567
|
Sending a new branch starts it at index 0; sending the same one again keeps
|
|
565
568
|
its place. Zap receipts are unchanged.
|
|
566
569
|
|
package/dist/names.js
CHANGED
|
@@ -94,8 +94,6 @@ export const isRefusal = (result) => 'reason' in result;
|
|
|
94
94
|
// the same name at once.
|
|
95
95
|
export const registerName = (args) => {
|
|
96
96
|
const { store, pubkey, priceMsat } = args;
|
|
97
|
-
if (priceMsat === undefined)
|
|
98
|
-
return refuse('This mint is not registering names.', 404);
|
|
99
97
|
const raw = typeof args.body.name === 'string' ? args.body.name.trim().toLowerCase() : '';
|
|
100
98
|
if (!NAME_RULE.test(raw)) {
|
|
101
99
|
return refuse('A name is 3 to 32 characters of a-z, 0-9, dot, dash or underscore, starting with a letter or digit.', 400);
|
|
@@ -124,6 +122,10 @@ export const registerName = (args) => {
|
|
|
124
122
|
}
|
|
125
123
|
return refuse('That name is taken.', 409);
|
|
126
124
|
}
|
|
125
|
+
// Checked after the owner's update above: closing registration stops new
|
|
126
|
+
// names, not a holder choosing where their own name pays.
|
|
127
|
+
if (priceMsat === undefined)
|
|
128
|
+
return refuse('This mint is not registering names.', 404);
|
|
127
129
|
let paidMsat = 0;
|
|
128
130
|
let noteId;
|
|
129
131
|
if (priceMsat === 0) {
|
package/dist/server.js
CHANGED
|
@@ -449,7 +449,10 @@ export const createMoneyer = async (config, deps = {}) => {
|
|
|
449
449
|
// a POST because it creates something, and it is authenticated by
|
|
450
450
|
// NIP-98 rather than by anything this mint has to store.
|
|
451
451
|
if (requestUrl.pathname === '/names' && req.method === 'POST') {
|
|
452
|
-
|
|
452
|
+
// Closed registration still lets a name's owner set where it pays;
|
|
453
|
+
// registerName refuses a new name there. Without zaps there are no
|
|
454
|
+
// names at all.
|
|
455
|
+
if (!zap)
|
|
453
456
|
return fail('This mint is not registering names.', 404);
|
|
454
457
|
const body = await readBody(req);
|
|
455
458
|
if (body === null)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgesworn/moneyer",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
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",
|