Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any plans to implement getBlockTemplate? #68

Open
jrgensol opened this issue Oct 22, 2018 · 2 comments
Open

Any plans to implement getBlockTemplate? #68

jrgensol opened this issue Oct 22, 2018 · 2 comments

Comments

@jrgensol
Copy link

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?

@Polve
Copy link
Owner

Polve commented Oct 23, 2018

No plan, but PR are welcome

@robin7245
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants