ConsensusJ / consensusj

Bitcoin components for JVM & Android (JSON client & server support, services, DSL, CLI)
Apache License 2.0
83 stars 35 forks source link

Not all Bitcoin rpc client methods are implemented #22

Open magg opened 7 years ago

magg commented 7 years ago

many methods are missing, any eta on the implementation?

I was interested in addnode for example

thanks

msgilligan commented 7 years ago

Note that you can call arbitrary RPC methods as follows:

client.send("addnode", "209.90.224.4:8333", "add");
client.send("getaddednodeinfo", true);

If the parameters are types that are already supported and you don't need the result converted to a statically typed POJO, this method works fine.

As this is an open-source, mostly volunteer effort, there is no schedule for adding additional methods, but I'm happy to accept pull requests and will try to add specific methods that are requested by the community.

msgilligan commented 7 years ago

@magg I made a quick commit to master 8967393f19a8226c29b40b30d3817c79d1ab17cd (and a second one that fixes an omission in my part 537ebc3658168760cbedaaba32890c79d84effe8)

I didn't add any tests, but I'm pretty sure these methods should work. If you're feeling ambitious check out master and give them a try.

Edit: Note that we'll want to replace com.fasterxml.jackson.databind.JsonNode with a POJO implementation of the getaddednodeinfo JSON response, so any code that uses JsonNode will need to be updated when the POJO is added.

magg commented 7 years ago

@msgilligan thank you I just tested the master branch, it works great

msgilligan commented 7 years ago

Great. Thanks for testing!