Open jointhepartypooper opened 5 years ago
This is much better solution, much more maintainable. Not sure why it was not done like this from day one.
I'm getting this error when running locally:
TypeError: Buffer.alloc is not a function
Buffer
is not available in browsers. Only in Node. Did you added any polyfill?
Also, the reason why I manually added peercoin lib instead of using other solutions is to make sure the project would stay small. Most libs are made with back-end as target, which means there is no effort to make them light. Most have way too much "bloatware" and helper functions we wouldn't need in order to generate a wallet.
But I'm open to testing the size difference from your implementation, if it's not too much, we can adopt it.
your node version is ancient: https://stackoverflow.com/questions/36499840/typeerror-buffer-alloc-is-not-a-function probably your node should be upgraded to 10 I actually made https://jointhepartypooper.github.io/Pay-to-TagHash--P2TH--calculator/ before adjusting this project and it works just fine
Nah, my node is ok.
The error happened in the browser, not while building. Buffer
as API exists only in Node, not in browsers. Can you please run npm start
and check if everything is working as expected locally?
thx I can see it now in chrome browser. I was using Brave...
I ll rewrite this with http://cryptocoinjs.com/modules/currency/coininfo/ then this weekend as it supports ppc I see...
You know what: this project needs webpack. Without it, options are very limited as the usage of Buffer is everywhere. I can try to reduce the code in Peercoin lib as much as possible.
Updating the bundler is a must, indeed. You should give your 2 cents on #15 later.
usage of bitcore-lib as seen in peerscript-labs. I think it is better to use bitcore-lib as is seen in peerscript-labs project, so I replaced it. please review and merge