Skip to content

feat: derive persona uses the reserved nostr:persona: namespace#12

Merged
TheCryptoDonkey merged 1 commit into
mainfrom
fix/persona-purpose-namespace
Jun 22, 2026
Merged

feat: derive persona uses the reserved nostr:persona: namespace#12
TheCryptoDonkey merged 1 commit into
mainfrom
fix/persona-purpose-namespace

Conversation

@TheCryptoDonkey

Copy link
Copy Markdown
Member

What

derive persona <name> now derives purpose nostr:persona:<name> (PROTOCOL v1.1 §3.1, forgesworn/nsec-tree#23) instead of silently aliasing a raw path. Adds:

  • a --persona flag honoured by export and prove
  • persona-aware "Try next" hints (they no longer drop --persona)
  • help/docs for the persona-vs-path distinction
  • a one-time stderr migration note

derive path (and derive account) stay raw — existing raw-purpose identities reproduce exactly (export npub pallasite is unchanged).

⚠️ Breaking

derive persona <name> changes output (it was a silent raw alias). Anyone who minted a persona under the old behaviour reproduces it with derive path <name>. Marked BREAKING CHANGE: for semantic-release.

Why

So a persona derived in the CLI matches signet, the library, and the hardware signer byte-for-byte. Companion PRs: forgesworn/nsec-tree#23 (spec) and heartwood-esp32.

Tests

npm test — 111 pass, incl. persona = nostr:persona: vector (npub1qdztfxg9…), export --persona parity, raw-path divergence, migration note, and /-rejection.

🤖 Generated with Claude Code

`derive persona <name>` previously aliased a raw path (purpose "<name>"). It now
derives purpose `nostr:persona:<name>` per PROTOCOL v1.1 §3.1, so a persona
reproduces byte-for-byte across signet, the library, and the hardware signer.

Adds a `--persona` flag honoured by export and prove, persona-aware "Try next"
hints, help documentation, and a one-time stderr migration note. Raw
`derive path` (and `derive account`) are unchanged, so existing raw-purpose
identities still reproduce exactly.

BREAKING CHANGE: `derive persona <name>` now resolves to purpose
nostr:persona:<name> instead of the raw purpose <name>. Any persona minted
under the old behaviour is reproduced with `derive path <name>`.
@TheCryptoDonkey TheCryptoDonkey merged commit 4bcf3ce into main Jun 22, 2026
2 checks passed
@TheCryptoDonkey TheCryptoDonkey deleted the fix/persona-purpose-namespace branch June 22, 2026 21:41
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