feat: derive persona uses the reserved nostr:persona: namespace#12
Merged
Conversation
`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>`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
derive persona <name>now derives purposenostr:persona:<name>(PROTOCOL v1.1 §3.1, forgesworn/nsec-tree#23) instead of silently aliasing a raw path. Adds:--personaflag honoured byexportandprove--persona)derive path(andderive account) stay raw — existing raw-purpose identities reproduce exactly (export npub pallasiteis unchanged).derive persona <name>changes output (it was a silent raw alias). Anyone who minted a persona under the old behaviour reproduces it withderive path <name>. MarkedBREAKING 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 --personaparity, raw-path divergence, migration note, and/-rejection.🤖 Generated with Claude Code