bitcoind-rpc icon indicating copy to clipboard operation
bitcoind-rpc copied to clipboard

Can we get promise support?

Open lukepighetti opened this issue 6 years ago • 3 comments

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

lukepighetti avatar May 14 '18 13:05 lukepighetti

FWIW you can roll this yourself with bluebird:

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

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


jsfour avatar Jul 25 '18 05:07 jsfour

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

lukepighetti avatar Jul 25 '18 14:07 lukepighetti

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.

carlotamburin avatar Dec 13 '21 19:12 carlotamburin