invoice: replace bech32 and bs58check packages
In the packages/invoice project, replace the bech32 and bs58check external packages with the internal @node-lightning/bitcoin package. The bitcoin package contains Bech32 and Base58Check classes that contain the same functionality.
Should also remove the bech32-util.ts helper. All of these functions are now included in the Bech32 class of the bitcoin package.
@bmancini55 I want to work on this issue, @node-lightning/bitcoin does not contain Bech32 class
seems like changes are not published yet, can you publish them?
@hack3r-0m sounds good. I'm working on it today. Need to get the secp256k1 lib published, which was the delay.
Should be in v0.27.0 now. Tip: you can add the npm package reference from the project root with lerna add <package_to_add> <target>. It will make sure everything is bootstrapped correctly.
I want to take a try at this. It looks like decoder.ts & encoder.ts are no longer required, right? as these functionality is now implemented in the Bech32 class inside the bitcoin package. Shall I remove these two files and their respective tests?
I want to take a try at this. It looks like
decoder.ts&encoder.tsare no longer required, right? as these functionality is now implemented in theBech32class inside the bitcoin package. Shall I remove these two files and their respective tests?
Great!
Those two files are still necessary since they perform the encoding and decoding of invoices. Those two files need to replace the bech32 package with the @node-lighting/bitcoin package's Bech32 implementation.
Additionally, invoice.ts has both bech32 and bs58 references. It will need to be modified to replace both with the versions in @node-lightning/bitcoin.
Ok it seems like I forgot to run prettier and some code style changes in the decoder.test.ts file are required, can I add a new commit to the same PR or shall I just create a new PR?
You can push a new commit to the same PR. Thanks!
Done!