Compare commits

...
1 Commits
Author SHA1 Message Date
Laan Tungir b2a50376df Ensure nutzap privkey is always included in kind 17375 republish
- Added ensureDirectNutzapP2pk() call in publishDirectProofs before building wallet payload
- This auto-generates a privkey if one wasn't hydrated from the old 17375 event
- Bumped WORKER_REVISION to nip60-privkey-ensure-1
2026-06-25 13:48:34 -04:00
3 changed files with 13 additions and 4 deletions
+1 -1
View File
@@ -184,7 +184,7 @@ export async function initNDKPage(options = {}) {
// All pages in www/ directory, so worker path is always the same.
// Include explicit worker revision token so updated SharedWorker code is guaranteed to restart.
const WORKER_REVISION = 'nip60-republish-1';
const WORKER_REVISION = 'nip60-privkey-ensure-1';
const workerPath = `./ndk-worker.js?v=${encodeURIComponent(VERSION)}&wr=${encodeURIComponent(WORKER_REVISION)}`;
// Initialize NDK SharedWorker (shared across all tabs/pages)
+3 -3
View File
@@ -1,5 +1,5 @@
{
"VERSION": "v0.7.21",
"VERSION_NUMBER": "0.7.21",
"BUILD_DATE": "2026-06-25T17:39:32.779Z"
"VERSION": "v0.7.22",
"VERSION_NUMBER": "0.7.22",
"BUILD_DATE": "2026-06-25T17:48:34.112Z"
}
+9
View File
@@ -2843,6 +2843,15 @@ async function publishDirectProofs(debugContext = null) {
}
log('delete old 7375 done');
// Ensure a nutzap privkey exists before building the wallet payload.
// If the user's old 17375 didn't have one (or hydration failed),
// this auto-generates one so it's always included in the republish.
try {
ensureDirectNutzapP2pk();
} catch (err) {
log('ensureDirectNutzapP2pk failed during publish', { error: err?.message || String(err) });
}
// NIP-60 standard: public "mint" tags are visible on the event;
// the privkey lives in the encrypted content as a "privkey" tag.
// The "pubkey" tag does NOT belong on kind 17375 (it belongs on