Skip to content

feat: add Nostr application#3

Open
ethicnology wants to merge 1 commit into
masterfrom
feat/nostr-bip85
Open

feat: add Nostr application#3
ethicnology wants to merge 1 commit into
masterfrom
feat/nostr-bip85

Conversation

@ethicnology
Copy link
Copy Markdown
Owner

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.
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.17%. Comparing base (20e016e) to head (141dfe2).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master       #3      +/-   ##
==========================================
+ Coverage   85.62%   89.17%   +3.54%     
==========================================
  Files           9       10       +1     
  Lines         167      194      +27     
==========================================
+ Hits          143      173      +30     
+ Misses         24       21       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants