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

I want to use jsonrpc to connect bitcoind. What should I do? #53

Closed
vae520283995 opened this issue Apr 28, 2019 · 2 comments
Closed

I want to use jsonrpc to connect bitcoind. What should I do? #53

vae520283995 opened this issue Apr 28, 2019 · 2 comments
Labels

Comments

@vae520283995
Copy link

I want to use jsonrpc to connect bitcoind. What should I do?
Can you give me an example?

@msgilligan
Copy link
Member

Create an instance of BitcoinClient and then start calling the methods you want to use. You'll need to provide URL, port, username, password to connect, of course.

Something like this:

    URI server = new URI("http://server.domain.tld:8332");  
    BitcoinClient client = new BitcoinClient(MainNetParams.get(), server, "username", "password");
    Integer count = client.getBlockCount();

@msgilligan
Copy link
Member

Long term the answer to this question should be provided by #21 and #54 .

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

No branches or pull requests

2 participants