BlueWallet / rn-ldk

Lightweight lightning node for React Native
MIT License
136 stars 25 forks source link

Add bitcoinjs-lib dependency #48

Open coreyphillips opened 2 years ago

coreyphillips commented 2 years ago

This PR:

Overtorment commented 2 years ago

this dependency was omitted on purpose so the necessary functions would be injected by outer code, see this.injectedScript2address in your case

coreyphillips commented 2 years ago

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.

Overtorment commented 2 years ago

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.