Author

Topic: how to rpc call a qt using a command line. (Read 452 times)

newbie
Activity: 67
Merit: 0
August 01, 2018, 10:06:39 PM
#6
@bumbacoin, did you ever find a solution to this?
newbie
Activity: 1
Merit: 0
Hello Bomba,

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

Thanks in advance,
Greetings
legendary
Activity: 1638
Merit: 1036
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]
legendary
Activity: 1638
Merit: 1036
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.
staff
Activity: 3458
Merit: 6793
Just writing some code
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.
legendary
Activity: 1638
Merit: 1036
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
Jump to: