This was started already on the old repo (https://github.com/rust-bitcoin/rust-bitcoind-json-rpc/pull/23) but I went and move the repo before it got merged. Just need to port the PR to this repo for further review.