Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bitcoinjs-lib dependency #48

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

coreyphillips
Copy link

@coreyphillips coreyphillips commented May 1, 2022

This PR:

  • Adds bitcoinjs-lib as a dependency.
  • Replaces the fetch request to https://runkit.io/overtorment/output-script-to-address/branches/master/ in the script2address method with the bitcoinjs-lib implementation.

@Overtorment
Copy link
Member

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

@coreyphillips
Copy link
Author

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
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants