Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove useless bitcore-lib dependency [don't merge] #6

Merged
merged 1 commit into from
Jan 26, 2019

Conversation

dakk
Copy link
Contributor

@dakk dakk commented Jul 8, 2018

At the moment btcnodejs uses bitcore-lib only for HD path derivation while bitcoinjs-lib is used for many other things; I propose to remove bitcore-lib dependency, by using the bitcoinjs.HDNode class instead for HD path derivation purpose.

Todo:

@dakk dakk changed the title Remove useless bitcore-lib dep Remove useless bitcore-lib dependency Jul 8, 2018
@dakk dakk changed the title Remove useless bitcore-lib dependency Remove useless bitcore-lib dependency [don't merge] Jul 9, 2018
@dakk
Copy link
Contributor Author

dakk commented Jul 13, 2018

These are the fields set by _setParams, with their corresponding field (if present) of bitcoinjs.HD:

  • depth : Integer (present, same name)
  • fingerPrint : Integer (not present, but getFingerprint())
  • parentFingerPrint : Integer (present, but named parentFingerprint)
  • childIndex : Integer (present, but named index)
  • chainCode : String (present, same name)
  • checksum : Integer (not present)
  • xpubkey : String (not present, but toBase58())
  • xprivkey : String (not present, but toBase58())
  • pubkey : Publickey object (set by constructor using crypto)
  • privkey : Privatekey object (set by constructor using crypto)

I will implement _setParams maintaining the old field names. Can you please provide me a test case for verifying these values?

@d0ze
Copy link
Contributor

d0ze commented Jan 26, 2019

Sorry for taking so long for answering to that PR. I will implement the _setParams and merge the pull request all togheter. I will just fix the initialization of both HDPublicKey and HDPrivateKey object when no params are provided in the constructor to throw an error since a null internal key should not be allowed.
Thank you for the contribution!

@d0ze d0ze merged commit 2122e51 into chainside:master Jan 26, 2019
@dakk
Copy link
Contributor Author

dakk commented Jan 29, 2019

Thank you too for reviewing it, pleased to being helpful

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.

2 participants