bitcoin-rpc-client icon indicating copy to clipboard operation
bitcoin-rpc-client copied to clipboard

Any plans to implement getBlockTemplate?

Open jrgensol opened this issue 7 years ago • 2 comments

I'm having problems finding a java library that is easy to use to connect to the bitcoin core api. Finally found this, but I need the getBlockTemplate function. Are there any plans to implement it, or do I have to keep looking?

jrgensol avatar Oct 22 '18 18:10 jrgensol

No plan, but PR are welcome

Polve avatar Oct 23 '18 09:10 Polve

your help would be appreciated. this is my code private static final BitcoinJSONRPCClient bitcoin = new BitcoinJSONRPCClient(); String temp = bitcoin.getBlockTemplate("{"capabilities": ["coinbasetxn", "workid", "coinbase/append"]}"); and BitcoinJSONRPCClient .java has this: //getBlockTemplate public String getBlockTemplate (String param) { return (String) query("getblocktemplate", param); } but i get this error RPC Query Failed (method: getblocktemplate, params: [{"capabilities": ["coinbasetxn", "workid", "coinbase/append"]}], response code: 500 responseMessage Internal Server Error, response: {"result":null,"error":{"code":-1,"message":"JSON value is not an object as expected"},"id":"1"}

how to fix the query? Thanks

robin7245 avatar Sep 07 '19 22:09 robin7245