rn-ldk
rn-ldk copied to clipboard
Add bitcoinjs-lib dependency
This PR:
- Adds
bitcoinjs-lib
as a dependency. - Replaces the fetch request to
https://runkit.io/overtorment/output-script-to-address/branches/master/
in thescript2address
method with thebitcoinjs-lib
implementation.
this dependency was omitted on purpose so the necessary functions would be injected by outer code, see this.injectedScript2address
in your case
If you would prefer to stick to a bring-your-own-method approach, I would suggest removing the fetch request completely and simply require the injectedScript2address
method upon instantiation.
The same can be said for the decodeInvoice method here. I would be happy to open a PR making the changes if you would prefer that approach.
eventually, yes, but not now.
consider, theres an example app in this repo, and i dont really want to mess with it to wire the socket to it so it can get data from electrum, crypto for bitcoinjs, rn-nodeify, all that.