Some useful ppcoind commands for Peercoin developers

You’ll find below a list of commands for ppcoind you may find useful for exploring the Peercoin’s blockchain and retrieve network stats:

MASTER BRANCH:

[code]* Retrieve network GH/s:
ppcoind getnetworkghps

  • Retrieve last block index:
    INDEX = ppcoind getblockcount

  • Retrieve last block hash:
    BLOCKHASH = ppcoind getblockhash INDEX

  • Retrieve transaction detail included in block:
    ppcoind getblock BLOCKHASH true

  • Directly retrieve last block info (hash, time, txid, target, etc.):
    ppcoind getblocktemplate

  • Get latest checkpoint hash:
    ppcoind getcheckpoint

  • Get number of active connections:
    ppcoind getconnectioncount

  • Get difficulty for both PoW and PoS:
    ppcoind getdifficulty

  • List peer info:
    ppcoind getpeerinfo

  • Validate a Peercoin address
    ppcoind validateaddress ADDRESS[/code]

DEVELOP BRANCH:

[code]* Get transactions in mempool:
ppcoind getrawmempool

  • Get transaction details:
    ppcoind getrawtransaction TXID 1[/code]

Commands in the DEVELOP BRANCH section are those you can only find when compiling ppcoin from the “develop” branch: https://github.com/ppcoin/ppcoin/tree/develop

I think this is pretty much all we need to create a blockchain explorer. :slight_smile: