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

Identifying BIP32 key network and key type #19

Open
ariejan opened this issue Jul 24, 2017 · 2 comments
Open

Identifying BIP32 key network and key type #19

ariejan opened this issue Jul 24, 2017 · 2 comments

Comments

@ariejan
Copy link

ariejan commented Jul 24, 2017

Given a BIP32 key, I'd like to figure out if it's a public or private key and on which network it's used. The information is in the key and the version info is already available in MoneyTrey::Network.

https://github.com/GemHQ/money-tree/blob/master/lib/money-tree/node.rb#L19 simply strips the version info from the key. I'd like to change that:

node = MoneyTree::Node.from_bip32("tpub...")
node.version
# => :bitcoin_testnet_pubkey

or

node = MoneyTree::Node.from_bip32("tpub...")
node.network
# => :bitcoin_testnet
node.key_type
# => :pubkey

Two questions:

  1. Would a pull request implementing the above be considered?
  2. What are your thoughts on one or two methods and methods names?

I'd be happy to test and implement these changes.

@btalbot
Copy link

btalbot commented Nov 1, 2017

Sadly, it seems that this project is no longer being maintained. Does anyone know of a suitable replacement?

@thedoctor
Copy link

thedoctor commented May 24, 2018

@ariejan Sure we'd merge those changes.

@q9f q9f added the enhancement label Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants