bitcoin-rpc-client
bitcoin-rpc-client copied to clipboard
Any plans to implement getBlockTemplate?
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?
No plan, but PR are welcome
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