Bitcoin Forum
June 16, 2024, 01:04:22 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: how to rpc call a qt using a command line.  (Read 443 times)
bumbacoin (OP)
Legendary
*
Offline Offline

Activity: 1638
Merit: 1036



View Profile
June 20, 2017, 04:16:09 AM
Last edit: June 20, 2017, 11:34:39 AM by bumbacoin
 #1

when running a qt under Windows,

how to actually communicate with it using command line ??

edit,
to further clarify this is particularly regarding non cli available clients, ie not bitcoin.


so lacking any obvious command line interface how does one interact with a qt in a similar manner to a daemon ?

eg.
coind.exe getinfo

💦☔️🐳💚💖💛
go to
cryptobetfair.com
ask for a voucher

████████████████
██████████████
█████████████
██████████████
██████████████
███████████
█████████
███████████
████████████
████████████
███████████
█████████████
██████████████
███████████████
████████████████
████████████████
🐠👻🍗🌳🐵
achow101
Staff
Legendary
*
Offline Offline

Activity: 3430
Merit: 6705


Just writing some code


View Profile WWW
June 20, 2017, 05:51:43 AM
 #2

You communicate with it like on any other system or like any other JSON-RPC interface. You use HTTP POST to send JSON encoded commands to the rpcport and you will get JSON encoded replies.

If you just want to interact with the RPC server from the command line, you can use the provided bitcoin-cli.exe binary.

In order to enable the RPC server with bitcoin-qt, you need to start Bitcoin Core with the -server option or add server=1 to your bitcoin.conf file.

bumbacoin (OP)
Legendary
*
Offline Offline

Activity: 1638
Merit: 1036



View Profile
June 20, 2017, 11:28:53 AM
 #3

You communicate with it like on any other system or like any other JSON-RPC interface. You use HTTP POST to send JSON encoded commands to the rpcport and you will get JSON encoded replies.

If you just want to interact with the RPC server from the command line, you can use the provided bitcoin-cli.exe binary.

In order to enable the RPC server with bitcoin-qt, you need to start Bitcoin Core with the -server option or add server=1 to your bitcoin.conf file.

yes command line, i'd forgotten about the cli :p i dont bitcoin very often. lol

thanks

actually,
this thread is probably useful to move as it's more about other coin wallets lacking cli (ie not bitcoin).

i will rephrase the question with more info. thanks again.

💦☔️🐳💚💖💛
go to
cryptobetfair.com
ask for a voucher

████████████████
██████████████
█████████████
██████████████
██████████████
███████████
█████████
███████████
████████████
████████████
███████████
█████████████
██████████████
███████████████
████████████████
████████████████
🐠👻🍗🌳🐵
bumbacoin (OP)
Legendary
*
Offline Offline

Activity: 1638
Merit: 1036



View Profile
July 11, 2017, 07:15:50 AM
Last edit: December 10, 2017, 04:42:49 AM by bumbacoin
 #4

re-discovered this page
https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)

which lists varying methods to engage with client via rpc.


which makes me curious if there is a pre-built app, browser page, or anything else etc for ease of communications.

ie gives you a command line style interface which behaves in a similar manner to teh debug console.




.
also using curl
  curl --user user --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", "params": [] }'
    -H 'content-type: text/plain;' http://127.0.0.1:8332/

the qt will not respond to anything except single word queries,
Code:
getinfo
is fine but
Code:
masternode list-conf
gives an error

Code:
curl --user user --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "masternode list-conf", "params": [] }' 
    -H 'content-type: text/plain;' http://127.0.0.1:8332/

{"result":null,"error":{"code":-32601,"message":"Method not found"},"id":"curltest"}[/quote]

💦☔️🐳💚💖💛
go to
cryptobetfair.com
ask for a voucher

████████████████
██████████████
█████████████
██████████████
██████████████
███████████
█████████
███████████
████████████
████████████
███████████
█████████████
██████████████
███████████████
████████████████
████████████████
🐠👻🍗🌳🐵
henktielen
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
March 26, 2018, 09:20:19 AM
 #5

Hello Bomba,

You found the solution onn this?
Having the same issue.

Thanks in advance,
Greetings
simplesignal
Newbie
*
Offline Offline

Activity: 67
Merit: 0


View Profile
August 02, 2018, 03:06:39 AM
 #6

@bumbacoin, did you ever find a solution to this?
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!