brainwallet / brainwallet.github.io

Brainwallet site
https://brainwallet.org
291 stars 409 forks source link

Any thoughts on upgrading to bitcoinjs-lib 1.0? #57

Closed glorat closed 10 years ago

glorat commented 10 years ago

bitcoinjs-lib has moved on since 0.13. As a model project, it would be great to keep up with the latest. I do realise the APIs have changed significantly since but the end result should actually be less code in brainwallet itself.

Shic1983 commented 10 years ago

That will take some work as bitcoinjs-lib 1.0 is almost a total rewrite vs 0.1.3.. but if you want to do it and submit a pull request. Go for it :)

glorat commented 10 years ago

Haha... I thought you might say that. I'm only looking to get a subset of Brainwallet functionality working for myself with bitcoinjs-lib 1.0 for future integration with some other toy project of mine. I'll gladly send over snippets that may help progress this if people are interested.

Shic1983 commented 10 years ago

If you want to do something with bitcoinlib-js and are struggling, stick it on the bitcoinlib-js github issues and I or one of the main devs might chine in.... best thing imo is reduce what your trying to do to its most simplistic form and then stick it up on a fiddle.

glorat commented 10 years ago

I just needed basic key signing/verification with bitcoin formatted structures so your direction is right. Indeed, bitcoinjs 1.0 seems to have wrapped up a lot of the functionality that Brainwallet previously had to code up itself against 0.1.3. So it all depends how much motivation you really have in terms of keeping up with the latest dependencies.

For my part, I got my pieces working, give or take a bug in bitcoinjs-lib (https://github.com/bitcoinjs/bitcoinjs-lib/issues/255).

As part of reproduction, I've ported your bitcoinsig.js to bitcoinjs-lib. Feel free to use if you ever want to https://gist.github.com/glorat/2179505f380b9984cb4f

brainwallet commented 10 years ago

Thanks for the code. Version that uses bitcoinjs-lib 1.x is still in progress.