HomePhabricator

[Cashtab] [BCH Deprecation] [HD Node] Pt 2/3 - Localize downstream logic from…

Description

[Cashtab] [BCH Deprecation] [HD Node] Pt 2/3 - Localize downstream logic from new masterHDNode

Summary:
T2730

Depends on D12414

This is part 2 of the 3 part diff to deprecate the use of the BCH.HDNode object, using the newly created masterHDNode object from part 1 for the downstream parameters such as derivePath, toPublicKey, toCashAddress and toWIF.

Pt 1/3 - Implement separate masterHDNode creation logic
Pt 2/3 - Localize downstream logic from masterHDNode (add and compare local outputs for derivePath, toPublicKey, toCashaddress & toWIF)
Pt 3/3 - Deprecate BCH.HDNode (fromSeed, derivePath, toPublicKey, toCashAddress & toWIF)

Test Plan:
npm test

  • npm start
  • create a new wallet
  • note the following comparison logs (Path245, Path145 & Path1899 derivation paths)

Path245: derivePath() outputs match
Path245: getPublicKeyBuffer() output match
Path245: legacyToLegacyCash() output match
Path245: toWIF() output match

Path145: derivePath() outputs match
Path145: getPublicKeyBuffer() output match
Path145: legacyToLegacyCash() output match
Path145: toWIF() output match

Path1899: derivePath() outputs match
Path1899: getPublicKeyBuffer() output match
Path1899: legacyToLegacyCash() output match
Path1899: toWIF() output match

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

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

Details

Provenance
emackAuthored on Nov 9 2022, 14:30
emackPushed on Nov 14 2022, 11:32
Reviewer
Restricted Project
Differential Revision
D12447: [Cashtab] [BCH Deprecation] [HD Node] Pt 2/3 - Localize downstream logic from new masterHDNode
Parents
rABC3f7074f7f76c: [Cashtab] [BCH Deprecation] [HD Node] Pt 1/3 - Implement separate masterHDNode…
Branches
Unknown
Tags
Unknown