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

Can we get promise support? #34

Open
lukepighetti opened this issue May 14, 2018 · 3 comments
Open

Can we get promise support? #34

lukepighetti opened this issue May 14, 2018 · 3 comments

Comments

@lukepighetti
Copy link

I am having to wrap everything I use in promises to work with es6 style code, it would be great if we could get bitcoind-rpc to return promises

@jsfour
Copy link
Contributor

jsfour commented Jul 25, 2018

FWIW you can roll this yourself with bluebird:

let config = {... }
let cli = new BitcoinRpc(config);
Bluebird.promisifyAll(cli);

cli.getinfoAsync().then(...)


@lukepighetti
Copy link
Author

That's pretty cool. Would be neat to have this wrapped at the package level.

@carlotamburin
Copy link

Is it possible? I am trying to do it but I get "Cannot read properties of undefined (reading 'batchedCalls')"
error. Also I tried with util.promisify, same thing.

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

No branches or pull requests

3 participants