Skip to content

fix(nostr): reject reserved indices and cross-app option misuse - #76

Merged
akarve merged 1 commit into
pr-70-nostrfrom
pr-70-nostr-cli-semantics
Sep 13, 2026
Merged

akarve merged 1 commit into
pr-70-nostrfrom
pr-70-nostr-cli-semantics

Conversation

@akarve

@akarve akarve commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Stacked on #70 (base branch pr-70-nostr is a copy of its head). Merge this into pr-70-nostr, then merge pr-70-nostr to main — GitHub will mark #70 merged automatically once its commits reach main.

  • Reserved identity 0' and index 0' now hard-error instead of warning (BIP-85 reserves both for future key management; usable keys start at 1'). The global --index default of 0 therefore also errors for nostr, so the reserved proof key can never be emitted by accident.
  • --identity with any non-nostr application now raises, matching the --to precedent.
  • --number with nostr now raises, matching wif|xprv.

All 362 tests pass; the three merged-spec vectors still verify.

Made with Cursor

- Error (not warn) on reserved identity 0' and index 0' per BIP-85 nostr,
  including the implicit --index default of 0
- Error when --identity is passed to a non-nostr application (matches --to)
- Error when --number is passed to nostr (matches wif|xprv)

Co-authored-by: Cursor <cursoragent@cursor.com>
@akarve
akarve merged commit cc5e69b into pr-70-nostr Sep 13, 2026
3 checks passed
@akarve akarve mentioned this pull request Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant