Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Mazakguy on September 17, 2013, 04:35:26 PM



Title: How to use json client in QT wallet
Post by: Mazakguy on September 17, 2013, 04:35:26 PM
Hi,

How do you use the json client in the QT wallet.

I have daemon and server set to 1 in the config file.
I have rpc port and ipallow set, also user name and password.

I can mine fine off this wallet with cgminer.

I am trying to write a program in QT and I need to be able to send commands to the wallet.

I have tryed using tcpsocket and I get socket closed after I send the command and try to read the response.

I have also tryed using the networkmanger but that just hangs and never gives a reply.


I am sending the command string: {"method":"getdifficulty","params":"[]","id":"getdifficulty"}:

What do I need to send before this? Do I use socket or netman.

I never get a reply from the wallet.

Thanks,

Mazakguy




Title: Re: How to use json client in QT wallet
Post by: GoldenWings91 on September 17, 2013, 06:32:02 PM
I believe Bitcoin reference client only allows http/s requests.

EDIT: Also, any method that does not require a parameter, such as getinfo, your json request is not required to have "params":[]