Skip to content

Fix embedded mnemonic share index capacity#59

Open
digzrow-coder wants to merge 2 commits into
bitaps-com:masterfrom
digzrow-coder:master
Open

Fix embedded mnemonic share index capacity#59
digzrow-coder wants to merge 2 commits into
bitaps-com:masterfrom
digzrow-coder:master

Conversation

@digzrow-coder
Copy link
Copy Markdown

Fixes #55.

This validates how many embedded share indexes can fit in a mnemonic checksum before generating shares, and uses the minimum bit width needed for share indexes 1..total.

For 12-word mnemonics this allows the valid boundary of 15 embedded shares and rejects 16 with a clear error instead of producing unrecoverable shares.

Verified locally:

  • npm test (85 passing)
  • npm run build

Refactor embedded index handling to include checksum bit length calculation and maximum shares validation.
Add test for splitMnemonic with embedded indexes and checksum capacity
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.

Bug: indexBits=8 default causes silent wallet loss for 12-word mnemonics

1 participant