Skip to content

refactor: replace bip39 with @scure/bip39#3986

Open
myxmaster wants to merge 1 commit into
ZeusLN:masterfrom
myxmaster:refactor/migrate-bip39-to-scure
Open

refactor: replace bip39 with @scure/bip39#3986
myxmaster wants to merge 1 commit into
ZeusLN:masterfrom
myxmaster:refactor/migrate-bip39-to-scure

Conversation

@myxmaster
Copy link
Copy Markdown
Collaborator

Description

This removes the bip39 dependency. @scure/bip39 is now the sole BIP39 implementation.

Tested:

  • triggered swap restore flow with the same rescue key —> xpub identical before and after this change
  • verified mnemonicToSeedSync output with a known mnemonic using the Ian Coleman BIP39 tool

This pull request is categorized as a:

  • New feature
  • Bug fix
  • Code refactor
  • Configuration change
  • Locales update
  • Quality assurance
  • Other

Checklist

  • I’ve run yarn run tsc and made sure my code compiles correctly
  • I’ve run yarn run lint and made sure my code didn’t contain any problematic patterns
  • I’ve run yarn run prettier and made sure my code is formatted correctly
  • I’ve run yarn run test and made sure all of the tests pass

Testing

If you modified or added a utility file, did you add new unit tests?

  • No, I’m a fool :)
  • Yes
  • N/A

I have tested this PR on the following platforms (please specify OS version and phone model/VM):

  • Android
  • iOS

I have tested this PR with the following types of nodes (please specify node version and API version where appropriate):

On-device

  • LDK Node
  • Embedded LND

Remote

  • LND (REST)
  • LND (Lightning Node Connect)
  • Core Lightning (CLNRest)
  • Nostr Wallet Connect
  • LndHub

Locales

  • I’ve added new locale text that requires translations
  • I’m aware that new translations should be made on the ZEUS Transfix page and not directly to this repo

Third Party Dependencies and Packages

  • Contributors will need to run yarn after this PR is merged in
  • 3rd party dependencies have been modified:
    • verify that package.json and yarn.lock have been properly updated
    • verify that dependencies are installed for both iOS and Android platforms

Other:

  • Changes were made that require an update to the README
  • Changes were made that require an update to onboarding

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates the project from bip39 to @scure/bip39 across several files, including LightningAddressStore.ts, SwapStore.ts, and VssAuthUtils.ts. A critical issue was identified in SwapStore.ts where the BIP39_WORD_LIST constant is used but not imported, which will result in a runtime ReferenceError.

Comment thread stores/SwapStore.ts
@kaloudis kaloudis added Dependencies Pull requests that update a dependency file Refactor Code that needs to be refactored labels Apr 16, 2026
@kaloudis kaloudis added this to the v13.1.0 milestone Apr 16, 2026
@kaloudis
Copy link
Copy Markdown
Contributor

Have you tested the changes with a Zaplocker Lightning address?

@myxmaster
Copy link
Copy Markdown
Collaborator Author

Have you tested the changes with a Zaplocker Lightning address?

No

@kaloudis kaloudis requested a review from shubhamkmr04 May 28, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dependencies Pull requests that update a dependency file Refactor Code that needs to be refactored

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants