HomePhabricator

[Cashtab] [BCH Deprecation] [Mnemonic] Pt 2/7 - Implement BCH.Mnemonic.generate…

Description

[Cashtab] [BCH Deprecation] [Mnemonic] Pt 2/7 - Implement BCH.Mnemonic.generate locally

Summary:
T2730

Depends on D12450

Stacked diff to localize existing uses of BCH.Mnemonic throughout the app and deprecate the BCH.Mnemonic object.

Relies on the randombytes library.

Pt 1/7 - Implement BCH.Mnemonic.toSeed locally
Pt 2/7 - Implement BCH.Mnemonic.generate locally
Pt 3/7 - Implement BCH.Mnemonic.wordLists locally
Pt 4/7 - Implement BCH.Mnemonic.validate locally
Pt 5/7 - Deprecate BCH.Mnemonic throughout the app
Pt 6/7 - Optimize bip39 bundle via webpack IgnorePlugin
Pt 7/7 - Unwrap validateMnemonicWordList

Test Plan:
npm test
npm start
create a new wallet and observe the generated mnemonic in the console log
test receiving and sending XEC from this new wallet
note: by virtue of randombytes being used by BCH-JS the generated mnemonics will never match

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D12451

Details

Provenance
emackAuthored on Nov 10 2022, 07:07
emackPushed on Nov 22 2022, 21:49
Reviewer
Restricted Project
Differential Revision
D12451: [Cashtab] [BCH Deprecation] [Mnemonic] Pt 2/7 - Implement BCH.Mnemonic.generate locally
Parents
rABC56fe40261d9c: [Cashtab] [BCH Deprecation] [Mnemonic] Pt 1/7 - Implement BCH.Mnemonic.toSeed…
Branches
Unknown
Tags
Unknown