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

Supporting Coins that don't use SHA256D for Addresses #191

Closed
HashEngineering opened this issue Mar 31, 2018 · 3 comments
Closed

Supporting Coins that don't use SHA256D for Addresses #191

HashEngineering opened this issue Mar 31, 2018 · 3 comments

Comments

@HashEngineering
Copy link
Contributor

We would like to add support for GRS to your repo.

GRS (Groestlcoin) is unique because it does not use SHA256D for the checksum on extended keys and addresses, but instead it uses double groestl (sha3 candidate).

We are wondering what the best way is to make code changes to submit as a pull request.

In the past, I had modified bitcoinjs to use the correct hash function based on added parameters added to some of the functions. This solution makes it hard to upgrade bitcoinjs after changes are made.

Another option may be to include a groestlcoinjs library. My concern with this is that there may be name conflicts with bitcoinjs, as they use the same names for functions. Perhaps JavaScript has a way around this, but not sure.

Would there be a better way to handle adding coins, such as Groestlcoin, that use different hash functions?

@iancoleman
Copy link
Owner

We are wondering what the best way is to make code changes to submit as a pull request.
...
Would there be a better way to handle adding coins, such as Groestlcoin, that use different hash functions?

The main place this is affected is the table of addresses / keys. Have a look at how ethereum and ripple do it.

There is just a conditional that calculates the correct address / pubkey / privkey depending on the specific coin, and a library included for those operations, eg ethereumjs-util.js and ripple-util.js

Modifications to bitcoinjs-lib will not be accepted as a pull request.

Also see #94 - Multibyte pubKeyHash - zcash.

@iancoleman
Copy link
Owner

I will leave this issue to the groestlcoin community to submit a pull request containing the feature.

@gruve-p
Copy link

gruve-p commented Nov 29, 2018

Reference https://github.com/Coinomi/bip39/pull/6

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

No branches or pull requests

3 participants