Bitcoin Forum
May 22, 2024, 02:32:16 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to use json client in QT wallet  (Read 629 times)
Mazakguy (OP)
Member
**
Offline Offline

Activity: 66
Merit: 10


View Profile
September 17, 2013, 04:35:26 PM
Last edit: September 17, 2013, 04:47:15 PM by Mazakguy
 #1

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


GoldenWings91
Full Member
***
Offline Offline

Activity: 141
Merit: 100


View Profile
September 17, 2013, 06:32:02 PM
Last edit: September 17, 2013, 06:43:01 PM by GoldenWings91
 #2

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":[]

Support The Bitcoin Network By Running A Full Node
Node Stats     GPG Key-ID: 0x445DF2D8     Monetary Freedom Is A Basic Human Right
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!