Commands for pNode


What are the commands for the pNode right now? At least the public/exposed ones?

I would like to query the balance of the pNode. I am a little tired of checking every hour :stuck_out_tongue:

Welcome to the community jackbauer…:sunglasses:

1 Like


Nevermind since there isn’t any. I messed around and looks like I found the API calls with the URL JSON response.

So far it’s:

  • update-key
  • update-wifi
  • init-node
  • reset
  • restart-node

Hi @jackbauer,

To get your mining status:
curl 'http://YOUR_NODE_IP:9334' --data-binary '{"jsonrpc":"1.0","method":"getmininginfo","params":"","id":1}'

To get your mining public key:
curl 'http://YOUR_NODE_IP:9334' --data-binary '{"jsonrpc":"1.0","method":"getpublickeymining","params":"","id":1}'

To get your miner rewards:
curl '' --data-binary '{"jsonrpc":"1.0","method":"getminerrewardfromminingkey","params":["YOUR_MINING_KEY"],"id":1}'


Converted to Windows PowerShell (for all three of you who use PoSH, lol)

To get your mining status:
(Invoke-RestMethod 'http://YOUR_NODE_IP:9334' -Method Post -Body '{"jsonrpc":"1.0","method":"getmininginfo","params":"","id":1}').Result

To get your mining public key:
(Invoke-RestMethod 'http://YOUR_NODE_IP:9334' -Method Post -Body '{"jsonrpc":"1.0","method":"getpublickeymining","params":"","id":1}').Result

To get your miner rewards:
(Invoke-RestMethod '' -Method Post -Body '{"jsonrpc":"1.0","method":"getminerrewardfromminingkey","params":["YOUR_MINING_KEY"],"id":1}').Result

*Remove the opening parenthesis, closing parenthesis and .Result from the command to see the full JSON response.


Thank you!

I tried those curl commands, but it reports 0 PRV. Does it have to settle or something?

@jackbauer because you have to be randomly chosen (approx. every 4h) to start earning coins

Here is a sample result on a node that just earned something:

	"Id": 1,
	"Result": {
		"PRV": 10919995793,
		"b832e5d3b1f01a4f0623f7fe91d6673461e1f5d37d91fe78c5c2e6183ff39696": 39
	"Error": null,
	"Params": [
	"Method": "getminerrewardfromminingkey",
	"Jsonrpc": "1.0"

The above PowerShell commands can be combined to retrieve your BLS mining key then immediately use the result to grab your PRV balance.

$miningkey = (Invoke-RestMethod "http://YOUR_NODE_IP:9334" -Method Post -Body '{"jsonrpc":"1.0","method":"getpublickeymining","params":"","id":1}').Result ; (Invoke-RestMethod '' -Method Post -Body "{`"jsonrpc`":`"1.0`",`"method`":`"getminerrewardfromminingkey`",`"params`":[`"$miningkey`"],`"id`":1}").Result

Mind the backticks before the quotes, these are escape characters in PoSH.

Nodes (fka pNodes) will not report a PRV balance (at least – I’ve never had a PRV balance reported this way). I believe this is due to the way worker and funder addresses are split for Nodes (fka pNodes).

1 Like

Can the devs create an api endpoint that allows you to query the blockchain to find results where prv != null?

This should be able to provide info about which nodes are earning?

curl '' --data-binary '{"jsonrpc":"1.0","method":"listrewardamount","params":[],"id":1}'

That’s the full list of not already withdrawn rewards.


How to find my pNode IP?

@taruneldho this would be helpful:

Hi @inccry,

Any other pnode commands that we can use aside from getmininginfo, getpublickeymining, and getminerrewardfromminigkey?

Hi @JG20, commands are available here

1 Like

Thanks! :pray:t2: