Skip to content

feat: nostr#4

Closed
ethicnology wants to merge 73 commits into
rikitau:masterfrom
ethicnology:feat/nostr-bip85
Closed

feat: nostr#4
ethicnology wants to merge 73 commits into
rikitau:masterfrom
ethicnology:feat/nostr-bip85

Conversation

@ethicnology
Copy link
Copy Markdown

@ethicnology ethicnology commented May 14, 2026

ethicnology and others added 29 commits November 21, 2024 14:34
* Add files via upload

* Update README.md

* Update README.md
…mnemonic` return type to Vec<String> because rust-bip39 does not use ideographic spaces for japanese mnemonics
Implements the Nostr application from BIP85 v2.1.0:
- `to_nostr` derives `m/83696968'/9000'/{identity}'/{account}'` and
  returns the 32-byte key as a NIP19 Bech32 `nsec` string
- `to_nostr_bytes` returns the raw 32-byte key for callers that need it

Bech32 (not Bech32m) per NIP19; the existing `bitcoin::bech32`
re-export is reused so no new dependency is required.

Cross-verified against the bipsea Python reference and the three BIP85
spec test vectors. Tests cover the spec vectors, bytes/nsec consistency,
nsec format (length 63, `nsec1` prefix), hardened-index rejection,
boundary index 0x7FFFFFFF, reserved zero-index derivation, and
distinct-master distinct-output sanity.
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.

3 participants