Skip to content

Seed Tool: QR scanning, Nostr keys, descriptors, passphrase lists, reference vectors - #82

Merged
BitcoinQnA merged 2 commits into
mainfrom
feat/next-batch
Sep 11, 2026
Merged

BitcoinQnA merged 2 commits into
mainfrom
feat/next-batch

Conversation

@BitcoinQnA

Copy link
Copy Markdown
Owner

Summary

The next batch for the upcoming release. Nothing here is released yet.

New

  • QR scanning. One scanner, using the camera or an image you pick, is shared by two tools:
    • Enter words reads a SeedQR, Compact SeedQR or seed-words QR into the word boxes so you can check them. Nothing loads until you press Load Seed. That matters because a Compact SeedQR has no checksum: any bytes decode to a seed that looks valid.
    • PSBT Inspector reads a plain PSBT QR, or an animated UR code (ur:psbt or ur:crypto-psbt) with a progress bar, and then inspects it. It only reads; there's no signing.
    • Decoding runs in the page with jsQR and bc-ur, bundled by a new build_qrscan.js. Nothing is sent anywhere, and it works under the page's Content Security Policy.
  • Standard SeedQR now appears next to Compact SeedQR. This adds numeric mode to the QR library, so the codes are 25×25 for 12 words and 29×29 for 24, the sizes SeedSigner uses.
  • Nostr Keys is a new tool covering NIP-06 (m/44'/1237'/n'/0/0) and the BIP-85 Nostr application (m/83696968'/128002'/identity'/account'). It shows npub and nsec, hex keys, and a QR for the npub.
  • Output descriptors in Derived Addresses for BIP-44, 49, 84 and 86 accounts:
    • the combined <0;1> form, plus separate receive and change descriptors
    • key origin and BIP-380 checksum included
    • a QR code for the combined descriptor
  • The passphrase tester takes a list. You set how many addresses to check per passphrase, and it shows progress, a Stop button, and "Use this passphrase" on a match. Taproot (m/86') paths now give Taproot addresses; before, they fell back to legacy.

Improved

  • The seed input tabs have text labels: Generate, Enter words and From entropy.
  • Word boxes:
    • They're checked as you type and when you leave them, with the nearest word suggested.
    • Load Seed marks the bad box and explains a checksum failure.
    • Each box has a label, and spellcheck and autocorrect are off, since some browsers send typed text to an online spellchecker.
  • Clear seed also wipes the new fields.

Reference vectors. test/keys.test.js pins the bundled libraries before the planned library upgrade. It covers:

  • all 24 English BIP-39 vectors
  • BIP-32 vector 1
  • BIP-85, both raw derivations and every application through the tool's own code
  • NIP-06 and BIP-85 Nostr
  • BIP-380
  • BIP-84 and BIP-86 addresses derived from the descriptors
  • SeedQR

Test plan

  • npm test: all 7 suites pass. There are 20 new tests: keys (10), qrscan (4) and ui (6).
  • The built page, run in a browser under its CSP:
    • the tab labels appear, and a wrong word is flagged as you type
    • a SeedQR image fills the word boxes and loads only on Load Seed
    • the standard SeedQR card decodes back to the right digits
    • the BIP-84 and BIP-86 descriptors match
    • the passphrase list finds the right passphrase at the right index
    • Nostr keys match, and identity 0 is refused
    • the PSBT scanner rebuilt the demo PSBT from 10 animated frames and inspected it
    • Clear seed wipes the new fields
    • 0 CSP violations, and no overflow at 375px
  • Not tested: a live camera, because the test browser has none. Worth trying on a phone once this is released. Also try it in the downloaded file in Safari, which may refuse camera access for local files; the image option covers that case.
  • dist/index.html is 11.15 MB, 0.41 MB more than before. Most of that is the scanning bundle.

🤖 Generated with Claude Code

BitcoinQnA and others added 2 commits September 11, 2026 06:43
…ctors

New
- QR scanner (camera, or pick an image), decoded in the page with jsQR
  and bc-ur via build_qrscan.js. Enter words reads a SeedQR, Compact
  SeedQR or seed-words QR into the word boxes for checking; nothing loads
  until Load Seed. The PSBT Inspector reads a PSBT QR or an animated UR
  code (ur:psbt, ur:crypto-psbt) with a progress bar. Read only.
- Standard SeedQR next to Compact SeedQR, using a new numeric mode in the
  QR library (25x25 for 12 words, 29x29 for 24).
- Nostr Keys tool: NIP-06 and the BIP-85 Nostr application.
- Output descriptors in Derived Addresses for BIP-44/49/84/86 accounts:
  combined <0;1>, receive and change, with key origin and checksum.
- Passphrase tester takes a list of passphrases, with progress, Stop and
  "Use this passphrase". Taproot paths now give Taproot addresses.

Improved
- Seed input tabs have text labels.
- Word boxes are checked as typed and on leaving, with the nearest word
  suggested; Load Seed marks the bad box and explains a checksum failure.
  Seed word boxes have labels, and spellcheck and autocorrect are off.
- Clear seed also wipes the new fields.

Tests
- test/keys.test.js pins the bundled libraries against published
  vectors: BIP-39 (24 English), BIP-32, BIP-85 (every application through
  the tool's own code), NIP-06, BIP-85 Nostr, BIP-380, BIP-84/86
  addresses from descriptors, SeedQR.
- test/qrscan.test.js and test/ui.test.js cover scanning and the new UI.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The new tests load jsqr, @ngraveio/bc-ur and @bitcoinerlab/descriptors, so
the workflow now runs npm ci --ignore-scripts before npm test.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@BitcoinQnA
BitcoinQnA merged commit 5c2e37c into main Sep 11, 2026
1 check passed
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