These docs are for v0.17.0. Click to read the latest docs for v19.0.0-redirect.

Blockchain RPCs

GetBestBlockHash

The getbestblockhash RPC returns the header hash of the most recent block on the best block chain.

Parameters: none

Result---hash of the tip from the best block chain

NameTypePresenceDescription
resultstring (hex)Required
(exactly 1)
The hash of the block header from the most recent block on the best block chain, encoded as hex in RPC byte order

Example from Dash Core 0.12.2

dash-cli -testnet getbestblockhash

Result:

00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c

See also

  • GetBlock: gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.
  • GetBlockHash: returns the header hash of a block at the given height in the local best block chain.

GetBestChainLock

The getbestchainlock RPC returns the information about the best ChainLock.

Throws an error if there is no known ChainLock yet.

Parameters: none

Result

NameTypePresenceDescription
resultobject/nullRequired
(exactly 1)
An object containing the requested block, or JSON null if an error occurred
ā†’
blockhash
string (hex)Required
(exactly 1)
The hash of the block encoded as hex in RPC byte order
ā†’
height
number (int)Required
(exactly 1)
The height of this block on its block chain
ā†’
signature
string (hex)Required
(exactly 1)
Added in Dash Core 0.17.0

The BLS signature of the ChainLock
ā†’
known_block
booleanRequired
(exactly 1)
True if the block is known by this node

Example from Dash Core 0.17.0

dash-cli -testnet getbestchainlock

Result:

{
  "blockhash": "00000c0e7a866e67444813858b976886d839aff28f56dc178c92ed1390c97f4e",
  "height": 405044,
  "signature": "960ead08adcc3fcf5e576f9e6ad290251325db900d19d961f5ece398b5389390b8a44e8986199c201ac348a89bc8534a0f7153c61c54157a241c521131025e5054b7c4298065069e478abdaea4d6c861848061e32c0d903ddeb5ee6036e8ddcf",
  "known_block": true
}

See also: none

GetBlock

The getblock RPC gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.

Parameter #1---block hash

NameTypePresenceDescription
Block Hashstring (hex)Required
(exactly 1)
The hash of the header of the block to get, encoded as hex in RPC byte order

Parameter #2---whether to get JSON or hex output

NameTypePresenceDescription
Verbositynumber (int)Optional
(0 or 1)
Set to one of the following verbosity levels:
ā€¢ 0 - Get the block in serialized block format;
ā€¢ 1 - Get the decoded block as a JSON object (default)
ā€¢ 2 - Get the decoded block as a JSON object with transaction details

Result (if verbosity was 0)---a serialized block

NameTypePresenceDescription
resultstring (hex)/nullRequired
(exactly 1)
The requested block as a serialized block, encoded as hex, or JSON null if an error occurred

Result (if verbosity was 1 or omitted)---a JSON block with transaction hashes

NameTypePresenceDescription
resultobject/nullRequired
(exactly 1)
An object containing the requested block, or JSON null if an error occurred
ā†’
hash
string (hex)Required
(exactly 1)
The hash of this block's block header encoded as hex in RPC byte order. This is the same as the hash provided in parameter #1
ā†’
confirmations
number (int)Required
(exactly 1)
The number of confirmations the transactions in this block have, starting at 1 when this block is at the tip of the best block chain. This score will be -1 if the the block is not part of the best block chain
ā†’
size
number (int)Required
(exactly 1)
The size of this block in serialized block format, counted in bytes
ā†’
height
number (int)Required
(exactly 1)
The height of this block on its block chain
ā†’
version
number (int)Required
(exactly 1)
This block's version number. See block version numbers
ā†’
versionHex
string (hex)Required
(exactly 1)
Added in Bitcoin Core 0.13.0

The block version formatted in hexadecimal
ā†’
merkleroot
string (hex)Required
(exactly 1)
The merkle root for this block, encoded as hex in RPC byte order
ā†’
tx
arrayRequired
(exactly 1)
An array containing the TXIDs of all transactions in this block. The transactions appear in the array in the same order they appear in the serialized block
ā†’ ā†’
TXID
string (hex)Required
(1 or more)
The TXID of a transaction in this block, encoded as hex in RPC byte order
ā†’
cbTx
objectRequired
(exactly 1)
Coinbase special transaction details
ā†’ ā†’
version
number (int)Required
(exactly 1)
The version of the Coinbase special transaction (CbTx)
ā†’ ā†’
height
number (int)Required
(exactly 1)
The height of this block on its block chain
ā†’ ā†’
merkleRootMNList
string (hex)Required
(exactly 1)
The merkle root for the masternode list
ā†’ ā†’
merkleRootQuorums
string (hex)Required
(exactly 1)
The merkle root for the quorum list
ā†’
time
number (int)Required
(exactly 1)
The value of the time field in the block header, indicating approximately when the block was created
ā†’
mediantime
number (int)Required
(exactly 1)
Added in Bitcoin Core 0.12.0

The median block time in Unix epoch time
ā†’
nonce
number (int)Required
(exactly 1)
The nonce which was successful at turning this particular block into one that could be added to the best block chain
ā†’
bits
string (hex)Required
(exactly 1)
The value of the nBits field in the block header, indicating the target threshold this block's header had to pass
ā†’
difficulty
number (real)Required
(exactly 1)
The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0
ā†’
chainwork
string (hex)Required
(exactly 1)
The estimated number of block header hashes miners had to check from the genesis block to this block, encoded as big-endian hex
ā†’
nTx
number (int)Required
(exactly 1)
Added in Dash Core 0.16.0

The number of transactions in the block
ā†’
previousblockhash
string (hex)Optional
(0 or 1)
The hash of the header of the previous block, encoded as hex in RPC byte order. Not returned for genesis block
ā†’
nextblockhash
string (hex)Optional
(0 or 1)
The hash of the next block on the best block chain, if known, encoded as hex in RPC byte order
ā†’
chainlock
boolRequired
(exactly 1)
Added in Dash Core 0.14.0

Always false if lite mode is enabled

If set to true, this transaction is in a block that is locked (not susceptible to a chain re-org)

Result (if verbosity was 2---a JSON block with full transaction details

NameTypePresenceDescription
resultobject/nullRequired
(exactly 1)
An object containing the requested block, or JSON null if an error occurred
ā†’
hash
string (hex)Required
(exactly 1)
The hash of this block's block header encoded as hex in RPC byte order. This is the same as the hash provided in parameter #1
ā†’
confirmations
number (int)Required
(exactly 1)
The number of confirmations the transactions in this block have, starting at 1 when this block is at the tip of the best block chain. This score will be -1 if the the block is not part of the best block chain
ā†’
size
number (int)Required
(exactly 1)
The size of this block in serialized block format, counted in bytes
ā†’
height
number (int)Required
(exactly 1)
The height of this block on its block chain
ā†’
version
number (int)Required
(exactly 1)
This block's version number. See block version numbers
ā†’
versionHex
string (hex)Required
(exactly 1)
Added in Bitcoin Core 0.13.0

The block version formatted in hexadecimal
ā†’
merkleroot
string (hex)Required
(exactly 1)
The merkle root for this block, encoded as hex in RPC byte order
ā†’
tx
arrayRequired
(exactly 1)
An array containing the TXIDs of all transactions in this block. The transactions appear in the array in the same order they appear in the serialized block
ā†’ ā†’
txid
string (hex)Required
(exactly 1)
The transaction's TXID encoded as hex in RPC byte order
ā†’ ā†’
size
number (int)Required
(exactly 1)
Added in Bitcoin Core 0.12.0

The serialized transaction size
ā†’ ā†’
version
number (int)Required
(exactly 1)
The transaction format version number
ā†’ ā†’
type
number (int)Required
(exactly 1)
Added in Dash Core 0.13.0.0

The transaction format type
ā†’ ā†’
locktime
number (int)Required
(exactly 1)
The transaction's locktime: either a Unix epoch date or block height; see the locktime parsing rules
ā†’ ā†’
vin
arrayRequired
(exactly 1)
An array of objects with each object being an input vector (vin) for this transaction. Input objects will have the same order within the array as they have in the transaction, so the first input listed will be input 0
ā†’ ā†’ ā†’
Input
objectRequired
(1 or more)
An object describing one of this transaction's inputs. May be a regular input or a coinbase
ā†’ ā†’ ā†’ ā†’
txid
stringOptional
(0 or 1)
The TXID of the outpoint being spent, encoded as hex in RPC byte order. Not present if this is a coinbase transaction
ā†’ ā†’ ā†’ ā†’
vout
number (int)Optional
(0 or 1)
The output index number (vout) of the outpoint being spent. The first output in a transaction has an index of 0. Not present if this is a coinbase transaction
ā†’ ā†’ ā†’ ā†’
scriptSig
objectOptional
(0 or 1)
An object describing the signature script of this input. Not present if this is a coinbase transaction
ā†’ ā†’ ā†’ ā†’ ā†’
asm
stringRequired
(exactly 1)
The signature script in decoded form with non-data-pushing opcodes listed
ā†’ ā†’ ā†’ ā†’ ā†’
hex
string (hex)Required
(exactly 1)
The signature script encoded as hex
ā†’ ā†’ ā†’ ā†’
coinbase
string (hex)Optional
(0 or 1)
The coinbase (similar to the hex field of a scriptSig) encoded as hex. Only present if this is a coinbase transaction
ā†’ ā†’ ā†’ ā†’
value
number (Dash)Optional
(exactly 1)
The number of Dash paid to this output. May be 0.

Only present if spentindex enabled
ā†’ ā†’ ā†’ ā†’
valueSat
number (duffs)Optional
(exactly 1)
The number of duffs paid to this output. May be 0.

Only present if spentindex enabled
ā†’ ā†’ ā†’ ā†’ ā†’
addresses
string : arrayOptional
(0 or 1)
The P2PKH or P2SH addresses used in this transaction, or the computed P2PKH address of any pubkeys in this transaction. This array will not be returned for nulldata or nonstandard script types.

Only present if spentindex enabled
ā†’ ā†’ ā†’ ā†’ ā†’ ā†’
Address
stringRequired
(1 or more)
A P2PKH or P2SH address
ā†’ ā†’ ā†’ ā†’
sequence
number (int)Required
(exactly 1)
The input sequence number
ā†’ ā†’
vout
arrayRequired
(exactly 1)
An array of objects each describing an output vector (vout) for this transaction. Output objects will have the same order within the array as they have in the transaction, so the first output listed will be output 0
ā†’ ā†’ ā†’
Output
objectRequired
(1 or more)
An object describing one of this transaction's outputs
ā†’ ā†’ ā†’ ā†’
value
number (Dash)Required
(exactly 1)
The number of Dash paid to this output. May be 0
ā†’ ā†’ ā†’ ā†’
valueSat
number (duffs)Required
(exactly 1)
The number of duffs paid to this output. May be 0
ā†’ ā†’ ā†’ ā†’
n
number (int)Required
(exactly 1)
The output index number of this output within this transaction
ā†’ ā†’ ā†’ ā†’
scriptPubKey
objectRequired
(exactly 1)
An object describing the pubkey script
ā†’ ā†’ ā†’ ā†’ ā†’
asm
stringRequired
(exactly 1)
The pubkey script in decoded form with non-data-pushing opcodes listed
ā†’ ā†’ ā†’ ā†’ ā†’
hex
string (hex)Required
(exactly 1)
The pubkey script encoded as hex
ā†’ ā†’ ā†’ ā†’ ā†’
reqSigs
number (int)Optional
(0 or 1)
The number of signatures required; this is always 1 for P2PK, P2PKH, and P2SH (including P2SH multisig because the redeem script is not available in the pubkey script). It may be greater than 1 for bare multisig. This value will not be returned for nulldata or nonstandard script types (see the type key below)
ā†’ ā†’ ā†’ ā†’ ā†’
type
stringOptional
(0 or 1)
The type of script. This will be one of the following:
ā€¢ pubkey for a P2PK script
ā€¢ pubkeyhash for a P2PKH script
ā€¢ scripthash for a P2SH script
ā€¢ multisig for a bare multisig script
ā€¢ nulldata for nulldata scripts
ā€¢ nonstandard for unknown scripts
ā†’ ā†’ ā†’ ā†’ ā†’
addresses
string : arrayOptional
(0 or 1)
The P2PKH or P2SH addresses used in this transaction, or the computed P2PKH address of any pubkeys in this transaction. This array will not be returned for nulldata or nonstandard script types
ā†’ ā†’ ā†’ ā†’ ā†’ ā†’
Address
stringRequired
(1 or more)
A P2PKH or P2SH address
ā†’ ā†’
extraPayloadSize
number (int)Optional
(0 or 1)
Added in Dash Core 0.13.0.0

Size of the DIP2 extra payload. Only present if it's a DIP2 special transaction
ā†’ ā†’
extraPayload
string (hex)Optional
(0 or 1)
Added in Dash Core 0.13.0.0

Hex encoded DIP2 extra payload data. Only present if it's a DIP2 special transaction
ā†’ ā†’
instantlock
boolRequired
(exactly 1)
Always false if lite mode is enabled

If set to true, this transaction is locked (by InstantSend or a ChainLock)
ā†’ ā†’
instantlock_internal
boolRequired
(exactly 1)
Always false if lite mode is enabled

If set to true, this transaction has an InstantSend lock
ā†’
cbTx
objectRequired
(exactly 1)
Coinbase special transaction details
ā†’ ā†’
version
number (int)Required
(exactly 1)
The version of the Coinbase special transaction (CbTx)
ā†’ ā†’
height
number (int)Required
(exactly 1)
The height of this block on its block chain
ā†’ ā†’
merkleRootMNList
string (hex)Required
(exactly 1)
The merkle root for the masternode list
ā†’ ā†’
merkleRootQuorums
string (hex)Required
(exactly 1)
The merkle root for the quorum list
ā†’
time
number (int)Required
(exactly 1)
The value of the time field in the block header, indicating approximately when the block was created
ā†’
mediantime
number (int)Required
(exactly 1)
Added in Bitcoin Core 0.12.0

The median block time in Unix epoch time
ā†’
nonce
number (int)Required
(exactly 1)
The nonce which was successful at turning this particular block into one that could be added to the best block chain
ā†’
bits
string (hex)Required
(exactly 1)
The value of the nBits field in the block header, indicating the target threshold this block's header had to pass
ā†’
difficulty
number (real)Required
(exactly 1)
The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0
ā†’
chainwork
string (hex)Required
(exactly 1)
The estimated number of block header hashes miners had to check from the genesis block to this block, encoded as big-endian hex
ā†’
nTx
number (int)Required
(exactly 1)
Added in Dash Core 0.16.0

The number of transactions in the block
ā†’
previousblockhash
string (hex)Optional
(0 or 1)
The hash of the header of the previous block, encoded as hex in RPC byte order. Not returned for genesis block
ā†’
nextblockhash
string (hex)Optional
(0 or 1)
The hash of the next block on the best block chain, if known, encoded as hex in RPC byte order
ā†’
chainlock
boolRequired
(exactly 1)
Added in Dash Core 0.14.0

Always false if lite mode is enabled

If set to true, this transaction is in a block that is locked (not susceptible to a chain re-org)

Example from Dash Core 0.16.0

Get a block in raw hex:

dash-cli -testnet getblock \
            00000000007b0fb99e36713cf08012482478ee496e6dcb4007ad2e806306e62b \
            0

Result (wrapped):

00000020272e374a06c87a0ce0e6ee1a0754c98b9ec2493e7c0ac7ba41a07300\
00000000568b3c4156090db4d8db5447762e95dd1d4c921c96801a9086720ded\
85266325916cc05caa94001c5caf359501030005000100000000000000000000\
00000000000000000000000000000000000000000000ffffffff2703ae50011a\
4d696e656420627920416e74506f6f6c2021000b01201da9196f000000000700\
0000ffffffff02809e4730000000001976a914cbd7bfcc50351180132b2c0698\
cb90ad74c473c788ac809e4730000000001976a91488a060bc2dfe05780ae4dc\
b6c98b12436c35a93988ac00000000460200ae50010078e5c08b39960887bf95\
185c381bdb719e60b6925fa12af78a8824fade927387c757acb6bac63da84f92\
45e20cfd5d830382ac634d434725ca6349ab5db920a3

Get the same block in JSON:

dash-cli -testnet getblock \
            00000000007b0fb99e36713cf08012482478ee496e6dcb4007ad2e806306e62b

Result:

{
  "hash": "00000000007b0fb99e36713cf08012482478ee496e6dcb4007ad2e806306e62b",
  "confirmations": 212898,
  "size": 310,
  "height": 86190,
  "version": 536870912,
  "versionHex": "20000000",
  "merkleroot": "25632685ed0d7286901a80961c924c1ddd952e764754dbd8b40d0956413c8b56",
  "tx": [
    "25632685ed0d7286901a80961c924c1ddd952e764754dbd8b40d0956413c8b56"
  ],
  "cbTx": {
    "version": 2,
    "height": 86190,
    "merkleRootMNList": "877392defa24888af72aa15f92b6609e71db1b385c1895bf870896398bc0e578",
    "merkleRootQuorums": "a320b95dab4963ca2547434d63ac8203835dfd0ce245924fa83dc6bab6ac57c7"
  },
  "time": 1556114577,
  "mediantime": 1556113720,
  "nonce": 2503323484,
  "bits": "1c0094aa",
  "difficulty": 440.8261075201009,
  "chainwork": "0000000000000000000000000000000000000000000000000045ab6f9403a8e7",
  "nTx": 1,
  "previousblockhash": "000000000073a041bac70a7c3e49c29e8bc954071aeee6e00c7ac8064a372e27",
  "nextblockhash": "00000000001c6c962639a1aad4cd069f315560a824d489418dc1f26b50a58aed",
  "chainlock": true
}

Get the same block in JSON with transaction details:

dash-cli -testnet getblock \
            00000000007b0fb99e36713cf08012482478ee496e6dcb4007ad2e806306e62b 2

Result:

{
  "hash": "00000000007b0fb99e36713cf08012482478ee496e6dcb4007ad2e806306e62b",
  "confirmations": 212899,
  "size": 310,
  "height": 86190,
  "version": 536870912,
  "versionHex": "20000000",
  "merkleroot": "25632685ed0d7286901a80961c924c1ddd952e764754dbd8b40d0956413c8b56",
  "tx": [
    {
      "txid": "25632685ed0d7286901a80961c924c1ddd952e764754dbd8b40d0956413c8b56",
      "version": 3,
      "type": 5,
      "size": 229,
      "locktime": 0,
      "vin": [
        {
          "coinbase": "03ae50011a4d696e656420627920416e74506f6f6c2021000b01201da9196f0000000007000000",
          "sequence": 4294967295
        }
      ],
      "vout": [
        {
          "value": 8.10000000,
          "valueSat": 810000000,
          "n": 0,
          "scriptPubKey": {
            "asm": "OP_DUP OP_HASH160 cbd7bfcc50351180132b2c0698cb90ad74c473c7 OP_EQUALVERIFY OP_CHECKSIG",
            "hex": "76a914cbd7bfcc50351180132b2c0698cb90ad74c473c788ac",
            "reqSigs": 1,
            "type": "pubkeyhash",
            "addresses": [
              "yeuGUfPMrbEqAS2Pw1wonYgEPbM4LAA9LK"
            ]
          }
        },
        {
          "value": 8.10000000,
          "valueSat": 810000000,
          "n": 1,
          "scriptPubKey": {
            "asm": "OP_DUP OP_HASH160 88a060bc2dfe05780ae4dcb6c98b12436c35a939 OP_EQUALVERIFY OP_CHECKSIG",
            "hex": "76a91488a060bc2dfe05780ae4dcb6c98b12436c35a93988ac",
            "reqSigs": 1,
            "type": "pubkeyhash",
            "addresses": [
              "yYmrsYP3XYMZr1cGtha3QzmuNB1C7CfyhV"
            ]
          }
        }
      ],
      "extraPayloadSize": 70,
      "extraPayload": "0200ae50010078e5c08b39960887bf95185c381bdb719e60b6925fa12af78a8824fade927387c757acb6bac63da84f9245e20cfd5d830382ac634d434725ca6349ab5db920a3",
      "cbTx": {
        "version": 2,
        "height": 86190,
        "merkleRootMNList": "877392defa24888af72aa15f92b6609e71db1b385c1895bf870896398bc0e578",
        "merkleRootQuorums": "a320b95dab4963ca2547434d63ac8203835dfd0ce245924fa83dc6bab6ac57c7"
      },
      "hex": "03000500010000000000000000000000000000000000000000000000000000000000000000ffffffff2703ae50011a4d696e656420627920416e74506f6f6c2021000b01201da9196f0000000007000000ffffffff02809e4730000000001976a914cbd7bfcc50351180132b2c0698cb90ad74c473c788ac809e4730000000001976a91488a060bc2dfe05780ae4dcb6c98b12436c35a93988ac00000000460200ae50010078e5c08b39960887bf95185c381bdb719e60b6925fa12af78a8824fade927387c757acb6bac63da84f9245e20cfd5d830382ac634d434725ca6349ab5db920a3",
      "instantlock": true,
      "instantlock_internal": false
    }
  ],
  "cbTx": {
    "version": 2,
    "height": 86190,
    "merkleRootMNList": "877392defa24888af72aa15f92b6609e71db1b385c1895bf870896398bc0e578",
    "merkleRootQuorums": "a320b95dab4963ca2547434d63ac8203835dfd0ce245924fa83dc6bab6ac57c7"
  },
  "time": 1556114577,
  "mediantime": 1556113720,
  "nonce": 2503323484,
  "bits": "1c0094aa",
  "difficulty": 440.8261075201009,
  "chainwork": "0000000000000000000000000000000000000000000000000045ab6f9403a8e7",
  "nTx": 1,
  "previousblockhash": "000000000073a041bac70a7c3e49c29e8bc954071aeee6e00c7ac8064a372e27",
  "nextblockhash": "00000000001c6c962639a1aad4cd069f315560a824d489418dc1f26b50a58aed",
  "chainlock": true
}

See also

  • GetBlockHash: returns the header hash of a block at the given height in the local best block chain.
  • GetBestBlockHash: returns the header hash of the most recent block on the best block chain.

GetBlockChainInfo

The getblockchaininfo RPC provides information about the current state of the block chain.

Parameters: none

Result---A JSON object providing information about the block chain

NameTypePresenceDescription
resultobjectRequired
(exactly 1)
Information about the current state of the local block chain
ā†’
chain
stringRequired
(exactly 1)
The name of the block chain. Either main for mainnet, test for testnet, regtest for regtest, or devnet-<name> for devnets
ā†’
blocks
number (int)Required
(exactly 1)
The number of validated blocks in the local best block chain. For a new node with just the hardcoded genesis block, this will be 0
ā†’
headers
number (int)Required
(exactly 1)
The number of validated headers in the local best headers chain. For a new node with just the hardcoded genesis block, this will be zero. This number may be higher than the number of blocks
ā†’
bestblockhash
string (hex)Required
(exactly 1)
The hash of the header of the highest validated block in the best block chain, encoded as hex in RPC byte order. This is identical to the string returned by the getbestblockhash RPC
ā†’
difficulty
number (real)Required
(exactly 1)
The difficulty of the highest-height block in the best block chain
ā†’
mediantime
number (int)Required
(exactly 1)
Added in Bitcoin Core 0.12.0

The median time of the 11 blocks before the most recent block on the blockchain. Used for validating transaction locktime under BIP113
ā†’
verificationprogress
number (real)Required
(exactly 1)
Estimate of what percentage of the block chain transactions have been verified so far, starting at 0.0 and increasing to 1.0 for fully verified. May slightly exceed 1.0 when fully synced to account for transactions in the memory pool which have been verified before being included in a block
ā†’
initialblockdownload
booleanRequired
(exactly 1)
Added in Dash Core 0.16.0

An estimate of whether this node is in Initial Block Download mode (debug information)
ā†’
chainwork
string (hex)Required
(exactly 1)
The estimated number of block header hashes checked from the genesis block to this block, encoded as big-endian hex
ā†’
size_on_disk
number (int)Required
(exactly 1)
Added in Dash Core 0.16.0

The estimated size of the block and undo files on disk
ā†’
pruned
boolRequired
(exactly 1)
Added in Bitcoin Core 0.11.0

Indicates if the blocks are subject to pruning
ā†’
pruneheight
number (int)Optional
(0 or 1)
Added in Bitcoin Core 0.11.0

The lowest-height complete block stored if pruning is activated
ā†’
automatic_pruning
boolRequired
(exactly 1)
Added in Dash Core 0.16.0

Whether automatic pruning is enabled (only present if pruning is enabled)
ā†’
prune_target_size
number (int)Optional
(0 or 1)
Added in Dash Core 0.16.0

The target size used by pruning (only present if automatic pruning is enabled)
ā†’
softforks
arrayRequired
(exactly 1)
Added in Bitcoin Core 0.12.0

An array of objects each describing a current or previous soft fork
ā†’ ā†’
Softfork
objectRequired
(0 or more)
A specific softfork
ā†’ ā†’ ā†’
id
stringRequired
(exactly 1)
The name of the softfork
ā†’ ā†’ ā†’
version
numeric
(int)
Required
(exactly 1)
The block version used for the softfork
ā†’ ā†’ ā†’
enforce
string : objectOptional
(0 or 1)
The progress toward enforcing the softfork rules for new-version blocks
ā†’ ā†’ ā†’ ā†’
status
boolRequired
(exactly 1)
Indicates if the threshold was reached
ā†’ ā†’ ā†’ ā†’
found
numeric
(int)
Optional
(0 or 1)
Number of blocks that support the softfork
ā†’ ā†’ ā†’ ā†’
required
numeric
(int)
Optional
(0 or 1)
Number of blocks that are required to reach the threshold
ā†’ ā†’ ā†’ ā†’
window
numeric
(int)
Optional
(0 or 1)
The maximum size of examined window of recent blocks
ā†’ ā†’ ā†’
reject
objectOptional
(0 or 1)
The progress toward enforcing the softfork rules for new-version blocks
ā†’ ā†’ ā†’ ā†’
status
boolOptional
(0 or 1)
Indicates if the threshold was reached
ā†’ ā†’ ā†’ ā†’
found
numeric
(int)
Optional
(0 or 1)
Number of blocks that support the softfork
ā†’ ā†’ ā†’ ā†’
required
numeric
(int)
Optional
(0 or 1)
Number of blocks that are required to reach the threshold
ā†’ ā†’ ā†’ ā†’
window
numeric
(int)
Optional
(0 or 1)
The maximum size of examined window of recent blocks
ā†’
bip9_softforks
objectRequired
(exactly 1)
Added in Bitcoin Core 0.12.1

The status of BIP9 softforks in progress
ā†’ ā†’
Name
string : objectRequired
(0 or more)
A specific BIP9 softfork
ā†’ ā†’ ā†’
status
stringRequired
(exactly 1)
Set to one of the following reasons:
ā€¢ defined if voting hasn't started yet
ā€¢ started if the voting has started
ā€¢ locked_in if the voting was successful but the softfork hasn't been activated yet
ā€¢ active if the softfork was activated
ā€¢ failed if the softfork has not receieved enough votes
ā†’ ā†’ ā†’
bit
numeric
(int)
Optional
(0 or 1)
The bit (0-28) in the block version field used to signal this softfork. Field is only shown when status is started
ā†’ ā†’ ā†’
startTime
numeric
(int)
Required
(exactly 1)
The Unix epoch time when the softfork voting begins
ā†’ ā†’ ā†’
timeout
numeric
(int)
Required
(exactly 1)
The Unix epoch time at which the deployment is considered failed if not yet locked in
ā†’ ā†’ ā†’
since
numeric
(int)
Required
(exactly 1)
Added in Bitcoin Core 0.14.0

The height of the first block to which the status applies
ā†’ ā†’ ā†’
statistics
string : objectRequired
(exactly 1)
Added in Dash Core 0.15.0

Numeric statistics about BIP9 signaling for a softfork (only for \started" status)"
ā†’ ā†’ ā†’ ā†’
period
numeric
(int)
Optional
(0 or 1)
Added in Dash Core 0.15.0

The length in blocks of the BIP9 signaling period. Field is only shown when status is started
ā†’ ā†’ ā†’ ā†’
threshold
numeric
(int)
Optional
(0 or 1)
Added in Dash Core 0.15.0

The number of blocks with the version bit set required to activate the feature. Field is only shown when status is started
ā†’ ā†’ ā†’ ā†’
elapsed
numeric
(int)
Optional
(0 or 1)
Added in Dash Core 0.15.0

The number of blocks elapsed since the beginning of the current period. Field is only shown when status is started
ā†’ ā†’ ā†’ ā†’
count
numeric
(int)
Optional
(0 or 1)
Added in Dash Core 0.15.0

The number of blocks with the version bit set in the current period. Field is only shown when status is started
ā†’ ā†’ ā†’
possible
boolOptional
(0 or 1)
Added in Bitcoin Core 0.11.0

Returns false if there are not enough blocks left in this period to pass activation threshold. Field is only shown when status is started
ā†’
warnings
boolOptional
(0 or 1)
Added in Dash Core 0.16.0

Returns any network and blockchain warnings

Example from Dash Core 0.16.0

dash-cli -testnet getblockchaininfo

Result:

{
  "chain": "test",
  "blocks": 292973,
  "headers": 292973,
  "bestblockhash": "0000020029bcac549a6e7b7e488d9ca8af518d4c0aae8073cd364c70ca29be6e",
  "difficulty": 0.0002441371325370145,
  "mediantime": 1586975225,
  "verificationprogress": 0.9999983278651547,
  "initialblockdownload": false,
  "chainwork": "00000000000000000000000000000000000000000000000001e6f68a064798f8",
  "size_on_disk": 1186147401,
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": true
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "active",
      "startTime": 1544655600,
      "timeout": 1576191600,
      "since": 8064
    },
    "dip0001": {
      "status": "active",
      "startTime": 1544655600,
      "timeout": 1576191600,
      "since": 4400
    },
    "bip147": {
      "status": "active",
      "startTime": 1544655600,
      "timeout": 1576191600,
      "since": 4300
    },
    "dip0003": {
      "status": "active",
      "startTime": 1544655600,
      "timeout": 1576191600,
      "since": 7000
    },
    "dip0008": {
      "status": "active",
      "startTime": 1553126400,
      "timeout": 1584748800,
      "since": 78800
    }
  },
  "warnings": "Warning: unknown new rules activated (versionbit 3)"
}

See also

GetBlockCount

The getblockcount RPC returns the number of blocks in the local best block chain.

Parameters: none

Result---the number of blocks in the local best block chain

NameTypePresenceDescription
resultnumber (int)Required
(exactly 1)
The number of blocks in the local best block chain. For a new node with only the hardcoded genesis block, this number will be 0

Example from Dash Core 0.12.2

dash-cli -testnet getblockcount

Result:

4627

See also

  • GetBlockHash: returns the header hash of a block at the given height in the local best block chain.
  • GetBlock: gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.

GetBlockHash

The getblockhash RPC returns the header hash of a block at the given height in the local best block chain.

Parameter---a block height

NameTypePresenceDescription
Block Heightnumber (int)Required
(exactly 1)
The height of the block whose header hash should be returned. The height of the hardcoded genesis block is 0

Result---the block header hash

NameTypePresenceDescription
resultstring (hex)/nullRequired
(exactly 1)
The hash of the block at the requested height, encoded as hex in RPC byte order, or JSON null if an error occurred

Example from Dash Core 0.12.2

dash-cli -testnet getblockhash 4000

Result:

00000ce22113f3eb8636e225d6a1691e132fdd587aed993e1bc9b07a0235eea4

See also

  • GetBlock: gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.
  • GetBestBlockHash: returns the header hash of the most recent block on the best block chain.

GetBlockHashes

šŸ“˜

Requires timestampindex Dash Core command-line/configuration-file parameter to be enabled.

Added in Dash Core 0.12.1

The getblockhashes RPC returns array of hashes of blocks within the timestamp range provided (requires timestampindex to be enabled).

Parameter #1---high block timestamp

NameTypePresenceDescription
Block Timestampnumber (int)Required
(exactly 1)
The block timestamp for the newest block hash that should be returned.

Parameter #2---low block timestamp

NameTypePresenceDescription
Block Timestampnumber (int)Required
(exactly 1)
The block timestamp for the oldest block hash that should be returned.

Result---the block header hashes in the give time range

NameTypePresenceDescription
resultarrayRequired
(exactly 1)
The hashes of the blocks in the requested time range
ā†’
hash
string (hex)Required
(1 or more)
The hash of a block in the chain, encoded as hex in RPC byte order

Example from Dash Core 0.12.2

dash-cli -testnet getblockhashes 1507555793 1507554793

Result:

[
  "0000000010a16c6fbc6bd5cdc238c2beabcda334e97fde1500d59be4e6fc4b89",
  "000000009910885e811230c403e55aac6547d6df04ee671b2e8348524f73cab8",
  "000000004bbb3828db1c4d4491760336cec215087819ab656336f30d4095e3d2",
  "00000000ad2df2149aca2261a9a87c41e139dfe8f73d91db7ec0c1837fee21a0",
  "0000000074068a9e3a271d165da3deb28bc3f8c751dde97f460d8078d92a9d06"
]

See also

  • GetBlock: gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.
  • GetBlockHash: returns the header hash of a block at the given height in the local best block chain.
  • GetBestBlockHash: returns the header hash of the most recent block on the best block chain.

GetBlockHeader

Added in Bitcoin Core 0.12.0

The getblockheader RPC gets a block header with a particular header hash from the local block database either as a JSON object or as a serialized block header.

Parameter #1---header hash

NameTypePresenceDescription
Header Hashstring (hex)Required
(exactly 1)
The hash of the block header to get, encoded as hex in RPC byte order

Parameter #2---JSON or hex output

NameTypePresenceDescription
FormatboolOptional
(0 or 1)
Set to false to get the block header in serialized block format; set to true (the default) to get the decoded block header as a JSON object

Result (if format was false)---a serialized block header

NameTypePresenceDescription
resultstring (hex)/nullRequired
(exactly 1)
The requested block header as a serialized block, encoded as hex, or JSON null if an error occurred

Result (if format was true or omitted)---a JSON block header

NameTypePresenceDescription
resultobject/nullRequired
(exactly 1)
An object containing the requested block, or JSON null if an error occurred
ā†’
hash
string (hex)Required
(exactly 1)
The hash of this block's block header encoded as hex in RPC byte order. This is the same as the hash provided in parameter #1
ā†’
confirmations
number (int)Required
(exactly 1)
The number of confirmations the transactions in this block have, starting at 1 when this block is at the tip of the best block chain. This score will be -1 if the the block is not part of the best block chain
ā†’
height
number (int)Required
(exactly 1)
The height of this block on its block chain
ā†’
version
number (int)Required
(exactly 1)
This block's version number. See block version numbers
ā†’
merkleroot
string (hex)Required
(exactly 1)
The merkle root for this block, encoded as hex in RPC byte order
ā†’
time
number (int)Required
(exactly 1)
The time of the block
ā†’
mediantime
number (int)Required
(exactly 1)
The computed median time of the previous 11 blocks. Used for validating transaction locktime under BIP113
ā†’
nonce
number (int)Required
(exactly 1)
The nonce which was successful at turning this particular block into one that could be added to the best block chain
ā†’
bits
string (hex)Required
(exactly 1)
The value of the nBits field in the block header, indicating the target threshold this block's header had to pass
ā†’
difficulty
number (real)Required
(exactly 1)
The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0
ā†’
chainwork
string (hex)Required
(exactly 1)
The estimated number of block header hashes miners had to check from the genesis block to this block, encoded as big-endian hex
ā†’
nTx
number (int)Required
(exactly 1)
Added in Dash Core 0.16.0

The number of transactions in the block
ā†’
previousblockhash
string (hex)Optional
(0 or 1)
The hash of the header of the previous block, encoded as hex in RPC byte order. Not returned for genesis block
ā†’
nextblockhash
string (hex)Optional
(0 or 1)
The hash of the next block on the best block chain, if known, encoded as hex in RPC byte order

Changes from Bitcoin - Following items not present in Dash result

NameTypePresenceDescription
ā†’
versionHex
number (hex)Required
(exactly 1)
This block's hex version number. See block version numbers

Example from Dash Core 0.16.0

Get a block header in raw hex:

dash-cli -testnet getblockheader \
            00000000007b0fb99e36713cf08012482478ee496e6dcb4007ad2e806306e62b \
            false

Result (wrapped):

00000020272e374a06c87a0ce0e6ee1a0754c98b9ec2493e7c0ac7ba41a0\
730000000000568b3c4156090db4d8db5447762e95dd1d4c921c96801a9\
086720ded85266325916cc05caa94001c5caf3595

Get the same block in JSON:

dash-cli -testnet getblockheader \
            00000000007b0fb99e36713cf08012482478ee496e6dcb4007ad2e806306e62b

Result:

{
  "hash": "00000000007b0fb99e36713cf08012482478ee496e6dcb4007ad2e806306e62b",
  "confirmations": 212900,
  "height": 86190,
  "version": 536870912,
  "versionHex": "20000000",
  "merkleroot": "25632685ed0d7286901a80961c924c1ddd952e764754dbd8b40d0956413c8b56",
  "time": 1556114577,
  "mediantime": 1556113720,
  "nonce": 2503323484,
  "bits": "1c0094aa",
  "difficulty": 440.8261075201009,
  "chainwork": "0000000000000000000000000000000000000000000000000045ab6f9403a8e7",
  "nTx": 1,
  "previousblockhash": "000000000073a041bac70a7c3e49c29e8bc954071aeee6e00c7ac8064a372e27",
  "nextblockhash": "00000000001c6c962639a1aad4cd069f315560a824d489418dc1f26b50a58aed",
  "chainlock": true
}

See also

  • GetBlock: gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.
  • GetBlockHash: returns the header hash of a block at the given height in the local best block chain.
  • GetBlockHashes: returns array of hashes of blocks within the timestamp range provided (requires timestampindex to be enabled).
  • GetBlockHeaders: returns an array of items with information about the requested number of blockheaders starting from the requested hash.
  • GetBestBlockHash: returns the header hash of the most recent block on the best block chain.

GetBlockHeaders

Added in Dash Core 0.12.1

The getblockheaders RPC returns an array of items with information about the requested number of blockheaders starting from the requested hash.

Parameter #1---header hash

NameTypePresenceDescription
Header Hashstring (hex)Required
(exactly 1)
The hash of the block header to get, encoded as hex in RPC byte order

Parameter #2---number of headers to return

NameTypePresenceDescription
CountnumberOptional
(exactly 1)
The number of block headers to get

Parameter #3---JSON or hex output

NameTypePresenceDescription
VerboseboolOptional
(0 or 1)
Set to false to get the block headers in serialized block format; set to true (the default) to get the decoded block headers as a JSON object

Result (if format was false)---a serialized block header

NameTypePresenceDescription
resultarrayRequired
(exactly 1)
The requested block header(s) as a serialized block
ā†’
header
string (hex)Required
(1 or more)
The block header encoded as hex in RPC byte order

Result (if format was true or omitted)---a JSON block header

NameTypePresenceDescription
resultarrayRequired
(exactly 1)
An array of objects each containing a block header, or JSON null if an error occurred
ā†’
Block Header
object/nullRequired
(exactly 1)
An object containing a block header
ā†’ ā†’
hash
string (hex)Required
(exactly 1)
The hash of this block's block header encoded as hex in RPC byte order. This is the same as the hash provided in parameter #1
ā†’ ā†’
confirmations
number (int)Required
(exactly 1)
The number of confirmations the transactions in this block have, starting at 1 when this block is at the tip of the best block chain. This score will be -1 if the the block is not part of the best block chain
ā†’ ā†’
height
number (int)Required
(exactly 1)
The height of this block on its block chain
ā†’ ā†’
version
number (int)Required
(exactly 1)
This block's version number. See block version numbers
ā†’ ā†’
merkleroot
string (hex)Required
(exactly 1)
The merkle root for this block, encoded as hex in RPC byte order
ā†’ ā†’
time
number (int)Required
(exactly 1)
The time of the block
ā†’ ā†’
mediantime
number (int)Required
(exactly 1)
The computed median time of the previous 11 blocks. Used for validating transaction locktime under BIP113
ā†’ ā†’
nonce
number (int)Required
(exactly 1)
The nonce which was successful at turning this particular block into one that could be added to the best block chain
ā†’ ā†’
bits
string (hex)Required
(exactly 1)
The value of the nBits field in the block header, indicating the target threshold this block's header had to pass
ā†’ ā†’
difficulty
number (real)Required
(exactly 1)
The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0
ā†’
chainwork
string (hex)Required
(exactly 1)
The estimated number of block header hashes miners had to check from the genesis block to this block, encoded as big-endian hex
ā†’
nTx
number (int)Required
(exactly 1)
Added in Dash Core 0.16.0

The number of transactions in the block
ā†’ ā†’
previousblockhash
string (hex)Optional
(0 or 1)
The hash of the header of the previous block, encoded as hex in RPC byte order. Not returned for genesis block
ā†’ ā†’
nextblockhash
string (hex)Optional
(0 or 1)
The hash of the next block on the best block chain, if known, encoded as hex in RPC byte order

Example from Dash Core 0.16.0

Get two block headers in raw hex:

dash-cli -testnet getblockheaders \
            00000000007b0fb99e36713cf08012482478ee496e6dcb4007ad2e806306e62b \
            2 false

Result (wrapped):

[
  "00000020272e374a06c87a0ce0e6ee1a0754c98b9ec2493e7c0ac7ba41a0730000000\
   000568b3c4156090db4d8db5447762e95dd1d4c921c96801a9086720ded8526632591\
   6cc05caa94001c5caf3595",
  "000000202be60663802ead0740cb6d6e49ee7824481280f03c71369eb90f7b00000000\
   006abd277facc8cf02886d88662dbcc2adb6d8de7a491915e74bed4d835656a4f1f26d\
   c05ced93001ccf81cabc"
]

Get the same two block headers in JSON:

dash-cli -testnet getblockheader \
            00000000eb0af5aec7b673975a22593dc0cc763f71ba8de26292410273437078 \
            2 true

Result:

[
  {
    "hash": "00000000007b0fb99e36713cf08012482478ee496e6dcb4007ad2e806306e62b",
    "confirmations": 212910,
    "height": 86190,
    "version": 536870912,
    "versionHex": "20000000",
    "merkleroot": "25632685ed0d7286901a80961c924c1ddd952e764754dbd8b40d0956413c8b56",
    "time": 1556114577,
    "mediantime": 1556113720,
    "nonce": 2503323484,
    "bits": "1c0094aa",
    "difficulty": 440.8261075201009,
    "chainwork": "0000000000000000000000000000000000000000000000000045ab6f9403a8e7",
    "nTx": 1,
    "previousblockhash": "000000000073a041bac70a7c3e49c29e8bc954071aeee6e00c7ac8064a372e27",
    "nextblockhash": "00000000001c6c962639a1aad4cd069f315560a824d489418dc1f26b50a58aed",
    "chainlock": true
  },
  {
    "hash": "00000000001c6c962639a1aad4cd069f315560a824d489418dc1f26b50a58aed",
    "confirmations": 212909,
    "height": 86191,
    "version": 536870912,
    "versionHex": "20000000",
    "merkleroot": "f1a45656834ded4be71519497aded8b6adc2bc2d66886d8802cfc8ac7f27bd6a",
    "time": 1556114930,
    "mediantime": 1556113903,
    "nonce": 3167388111,
    "bits": "1c0093ed",
    "difficulty": 443.0262219757585,
    "chainwork": "0000000000000000000000000000000000000000000000000045ad2a9c752d18",
    "nTx": 1,
    "previousblockhash": "00000000007b0fb99e36713cf08012482478ee496e6dcb4007ad2e806306e62b",
    "nextblockhash": "000000000076a17beb1bb56e6ec53579f8a604d2363c9a4f8ca3f63e6aca3423",
    "chainlock": true
  }
]

See also

  • GetBlock: gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.
  • GetBlockHash: returns the header hash of a block at the given height in the local best block chain.
  • GetBlockHashes: returns array of hashes of blocks within the timestamp range provided (requires timestampindex to be enabled).
  • GetBlockHeader: gets a block header with a particular header hash from the local block database either as a JSON object or as a serialized block header.
  • GetBestBlockHash: returns the header hash of the most recent block on the best block chain.

GetBlockStats

The getblockstats RPC computes per block statistics for a given window.

All amounts are in duffs.

It won't work for some heights with pruning. It won't work without -txindex for
utxo_size_inc, *fee or *feerate stats.

Parameter #1---hash_or_height

NameTypePresenceDescription
hash_or_heightstring or numericRequired
(exactly 1)
The block hash or height of the target block

Parameter #2---stats

NameTypePresenceDescription
statsarrayoptionalValues to plot, by default all values (see result below)

Result---a JSON object containing the requested statistics

NameTypePresenceDescription
resultobject/nullRequired
(exactly 1)
An object containing stats for the requested block, or JSON null if an error occurred
ā†’
avgfee
numericRequired
(exactly 1)
Average fee in the block
ā†’
avgfeerate
numericRequired
(exactly 1)
Average feerate (in duffs per byte)
ā†’
avgtxsize
numericRequired
(exactly 1)
Average transaction size
ā†’
blockhash
string (hex)Required
(exactly 1)
The block hash (to check for potential reorgs)
ā†’
height
numericRequired
(exactly 1)
The height of the block
ā†’
ins
numericRequired
(exactly 1)
The number of inputs (excluding coinbase)
ā†’
maxfee
numericRequired
(exactly 1)
Maximum fee in the block
ā†’
maxfeerate
numericRequired
(exactly 1)
Maximum feerate (in duffs per byte)
ā†’
maxtxsize
numericRequired
(exactly 1)
Maximum transaction size
ā†’
medianfee
numericRequired
(exactly 1)
Truncated median fee in the block
ā†’
medianfeerate
numericRequired
(exactly 1)
Truncated median feerate (in duffs per byte)
ā†’
mediantime
numericRequired
(exactly 1)
The block median time past
ā†’
mediantxsize
numericRequired
(exactly 1)
Truncated median transaction size
ā†’
minfee
numericRequired
(exactly 1)
Minimum fee in the block
ā†’
minfeerate
numericRequired
(exactly 1)
Minimum feerate (in duffs per byte)
ā†’
mintxsize
numericRequired
(exactly 1)
Minimum transaction size
ā†’
outs
numericRequired
(exactly 1)
The number of outputs
ā†’
subsidy
numericRequired
(exactly 1)
The block subsidy
ā†’
time
number (real)Required
(exactly 1)
The block time
ā†’
total_out
numericRequired
(exactly 1)
Total amount in all outputs (excluding coinbase and thus reward [i.e. subsidy + totalfee])
ā†’
total_size
numericRequired
(exactly 1)
Total size of all non-coinbase transactions
ā†’
totalfee
numericRequired
(exactly 1)
The fee total
ā†’
txs
numericRequired
(exactly 1)
The number of transactions (including coinbase)
ā†’
utxo_increase
numericRequired
(exactly 1)
The increase/decrease in the number of unspent outputs
ā†’
utxo_size_inc
numericRequired
(exactly 1)
The increase/decrease in size for the utxo index (not discounting op_return and similar)

Example from Dash Core 0.15.0

dash-cli getblockstats 1000 '["blockhash","subsidy", "txs"]'

Result:

{
  "blockhash": "000004e906762c8c70583418d46915b4271fa83c29d5b88544d05e09e3f3621d",
  "subsidy": 50000000000,
  "txs": 1
}

See also: none

GetChainTips

The getchaintips RPC returns information about the highest-height block (tip) of each local block chain.

Parameters: none

Result---an array of block chain tips

NameTypePresenceDescription
resultarrayRequired
(exactly 1)
An array of JSON objects, with each object describing a chain tip. At least one tip---the local best block chain---will always be present
ā†’
Tip
objectRequired
(1 or more)
An object describing a particular chain tip. The first object will always describe the active chain (the local best block chain)
ā†’ ā†’
height
number (int)Required
(exactly 1)
The height of the highest block in the chain. A new node with only the genesis block will have a single tip with height of 0
ā†’ ā†’
hash
string (hex)Required
(exactly 1)
The hash of the highest block in the chain, encoded as hex in RPC byte order
ā†’
difficulty
number (real)Required
(exactly 1)
The difficulty of the highest-height block in the best block chain (Added in Dash Core 0.12.1)
ā†’
chainwork
string (hex)Required
(exactly 1)
The estimated number of block header hashes checked from the genesis block to this block, encoded as big-endian hex (Added in Dash Core 0.12.1)
ā†’ ā†’
branchlen
number (int)Required
(exactly 1)
The number of blocks that are on this chain but not on the main chain. For the local best block chain, this will be 0; for all other chains, it will be at least 1
ā†’ ā†’
forkpoint
string (hex)Required
(exactly 1)
Added in Dash Core 0.12.3

Block hash of the last common block between this tip and the main chain
ā†’ ā†’
status
stringRequired
(exactly 1)
The status of this chain. Valid values are:
ā€¢ active for the local best block chain
ā€¢ invalid for a chain that contains one or more invalid blocks
ā€¢ headers-only for a chain with valid headers whose corresponding blocks both haven't been validated and aren't stored locally
ā€¢ valid-headers for a chain with valid headers whose corresponding blocks are stored locally, but which haven't been fully validated
ā€¢ valid-fork for a chain which is fully validated but which isn't part of the local best block chain (it was probably the local best block chain at some point)
ā€¢ unknown for a chain whose reason for not being the active chain is unknown

Example from Dash Core 0.12.3

dash-cli -testnet getchaintips
[
  {
    "height": 110192,
    "hash": "000000000c6007f40c3b68a77b0e1319a89c0504ae1b391d071cf49fa7591dee",
    "difficulty": 18.38631407059958,
    "chainwork": "000000000000000000000000000000000000000000000000002cbd2546718747",
    "branchlen": 0,
    "forkpoint": "000000000c6007f40c3b68a77b0e1319a89c0504ae1b391d071cf49fa7591dee",
    "status": "active"
  }
]

See also

  • GetBestBlockHash: returns the header hash of the most recent block on the best block chain.
  • GetBlock: gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.
  • GetBlockChainInfo: provides information about the current state of the block chain.

GetChainTxStats

The getchaintxstats RPC compute statistics about the total number and rate of transactions in the chain.

Parameter #1---nblocks

NameTypePresenceDescription
nblocksnumber (int)OptionalSize of the window in number of blocks (default: one month).

Parameter #2---blockhash

NameTypePresenceDescription
blockhashstringOptionalThe hash of the block that ends the window.

Result--statistics about transactions

NameTypePresenceDescription
resultobjectRequired
(exactly 1)
Object containing transaction statistics
ā†’
time
number (int)Required
(exactly 1)
The timestamp for the statistics in UNIX format
ā†’
txcount
number (int)Required
(exactly 1)
The total number of transactions in the chain up to that point
ā†’
window_final_block_hash
string (hex)Required
(exactly 1)
Added in Dash Core 0.17.0

The hash of the final block in the window
ā†’
window_block_count
number (int)Required
(exactly 1)
Added in Dash Core 0.16.0

Size of the window in number of blocks
ā†’
window_tx_count
number (int)Optional
(0 or 1)
Added in Dash Core 0.16.0

The number of transactions in the window. Only returned if window_block_count is > 0
ā†’
window_interval
number (int)Optional
(0 or 1)
Added in Dash Core 0.16.0

The elapsed time in the window in seconds. Only returned if window_block_count is > 0
ā†’
txrate
number (int)Optional
(0 or 1)
The average rate of transactions per second in the window. Only returned if window_interval is > 0

Example from Dash Core 0.17.0

dash-cli -testnet getchaintxstats

Result:

{
  "time": 1607535744,
  "txcount": 3490507,
  "window_final_block_hash": "000003cfecf1f8e6d62a21c1f7c98be3442cdb8955beecbecb7f32d2c62082f5",
  "window_block_count": 17280,
  "window_tx_count": 161907,
  "window_interval": 6406989,
  "txrate": 0.02527037271329793
}

See also: none

GetDifficulty

The getdifficulty RPC returns the proof-of-work difficulty as a multiple of the minimum difficulty.

Parameters: none

Result---the current difficulty

NameTypePresenceDescription
resultnumber (real)Required
(exactly 1)
The difficulty of creating a block with the same target threshold (nBits) as the highest-height block in the local best block chain. The number is a a multiple of the minimum difficulty

Example from Dash Core 0.12.2

dash-cli -testnet getdifficulty

Result:

1.069156225528583

See also

  • GetNetworkHashPS: returns the estimated network hashes per second based on the last n blocks.
  • GetMiningInfo: returns various mining-related information.

GetMemPoolAncestors

Added in Dash Core 0.12.3

The getmempoolancestors RPC returns all in-mempool ancestors for a transaction in the mempool.

Parameter #1---a transaction identifier (TXID)

NameTypePresenceDescription
TXIDstring (hex)Required
(exactly 1)
The TXID of a transaction in the memory pool, encoded as hex in RPC byte order

Parameter #2---desired output format

NameTypePresenceDescription
FormatboolOptional
(0 or 1)
Set to true to get json objects describing each transaction in the memory pool; set to false (the default) to only get an array of TXIDs

Result---list of ancestor transactions

NameTypePresenceDescription
resultarrayRequired
(exactly 1)
An array of TXIDs belonging to transactions in the memory pool. The array may be empty if there are no transactions in the memory pool
ā†’
TXID
stringOptional
(0 or more)
The TXID of a transaction in the memory pool, encoded as hex in RPC byte order

Result (format: true)---a JSON object describing each transaction

NameTypePresenceDescription
resultobjectRequired
(exactly 1)
A object containing transactions currently in the memory pool. May be empty
ā†’
TXID
string : objectOptional
(0 or more)
The TXID of a transaction in the memory pool, encoded as hex in RPC byte order
ā†’ ā†’
size
number (int)Required
(exactly 1)
The size of the serialized transaction in bytes
ā†’ ā†’
fee
number (bitcoins)Required
(exactly 1)
Deprecated in Dash Core 0.17.0

The transaction fee paid by the transaction in decimal bitcoins
ā†’ ā†’
modifiedfee
number (bitcoins)Required
(exactly 1)
Deprecated in Dash Core 0.17.0

The transaction fee with fee deltas used for mining priority in decimal bitcoins
ā†’ ā†’
time
number (int)Required
(exactly 1)
The time the transaction entered the memory pool, Unix epoch time format
ā†’ ā†’
height
number (int)Required
(exactly 1)
The block height when the transaction entered the memory pool
ā†’ ā†’
descendantcount
number (int)Required
(exactly 1)
The number of in-mempool descendant transactions (including this one)
ā†’ ā†’
descendantsize
number (int)Required
(exactly 1)
The size of in-mempool descendants (including this one)
ā†’ ā†’
descendantfees
number (int)Required
(exactly 1)
Deprecated in Dash Core 0.17.0

The modified fees (see modifiedfee above) of in-mempool descendants (including this one)
ā†’ ā†’
ancestorcount
number (int)Required
(exactly 1)
The number of in-mempool ancestor transactions (including this one)
ā†’ ā†’
ancestorsize
number (int)Required
(exactly 1)
The size of in-mempool ancestors (including this one)
ā†’ ā†’
ancestorfees
number (int)Required
(exactly 1)
Deprecated in Dash Core 0.17.0

The modified fees (see modifiedfee above) of in-mempool ancestors (including this one)
ā†’ ā†’
fees
objectOptional
(0 or 1)
Added in Dash Core 0.17.0
Object containing fee information
ā†’ā†’ā†’
base
numberOptional
(0 or 1)
Added in Dash Core 0.17.0
Transaction fee in DASH
ā†’ā†’ā†’
modified
numberOptional
(0 or 1)
Added in Dash Core 0.17.0
Transaction fee with fee deltas used for mining priority in DASH
ā†’ā†’ā†’
ancestor
numberOptional
(0 or 1)
Added in Dash Core 0.17.0
Modified fees (see above) of in-mempool ancestors (including this one) in DASH
ā†’ā†’ā†’
descendent
numberOptional
(0 or 1)
Added in Dash Core 0.17.0
Modified fees (see above) of in-mempool descendants (including this one) in DASH
ā†’ ā†’
depends
arrayRequired
(exactly 1)
An array holding TXIDs of unconfirmed transactions this transaction depends upon (parent transactions). Those transactions must be part of a block before this transaction can be added to a block, although all transactions may be included in the same block. The array may be empty
ā†’ ā†’ ā†’
Depends TXID
stringOptional (0 or more)The TXIDs of any unconfirmed transactions this transaction depends upon, encoded as hex in RPC byte order

Examples from Dash Core 0.17.0

The default (false):

dash-cli getmempoolancestors dc63e7f6929658feade06fec1eeaf43b\
3160095d66a9b59f57e77e56c20241fc 

Result:

[
  "d64eb30e5435e7a4564df9d06525a8ab48858fdaf111661d1e7874a72cebc132"
]

Verbose output (true):

dash-cli getmempoolancestors dc63e7f6929658feade06fec1eeaf43b\
3160095d66a9b59f57e77e56c20241fc true

Result:

{
  "d64eb30e5435e7a4564df9d06525a8ab48858fdaf111661d1e7874a72cebc132": {
    "fees": {
      "base": 0.00000374,
      "modified": 0.00000374,
      "ancestor": 0.00000374,
      "descendant": 0.00000600
    },
    "size": 373,
    "fee": 0.00000374,
    "modifiedfee": 0.00000374,
    "time": 1610552403,
    "height": 425538,
    "descendantcount": 2,
    "descendantsize": 599,
    "descendantfees": 600,
    "ancestorcount": 1,
    "ancestorsize": 373,
    "ancestorfees": 374,
    "depends": [
    ],
    "spentby": [
      "dc63e7f6929658feade06fec1eeaf43b3160095d66a9b59f57e77e56c20241fc"
    ],
    "instantlock": true
  }
}

See also

  • GetMemPoolDescendants: returns all in-mempool descendants for a transaction in the mempool.
  • GetRawMemPool: returns all transaction identifiers (TXIDs) in the memory pool as a JSON array, or detailed information about each transaction in the memory pool as a JSON object.

GetMemPoolDescendants

Added in Dash Core 0.12.3

The getmempooldescendants RPC returns all in-mempool descendants for a transaction in the mempool.

Parameter #1---a transaction identifier (TXID)

NameTypePresenceDescription
TXIDstring (hex)Required
(exactly 1)
The TXID of a transaction in the memory pool, encoded as hex in RPC byte order

Parameter #2---desired output format

NameTypePresenceDescription
FormatboolOptional
(0 or 1)
Set to true to get json objects describing each transaction in the memory pool; set to false (the default) to only get an array of TXIDs

Result---list of descendant transactions

NameTypePresenceDescription
resultarrayRequired
(exactly 1)
An array of TXIDs belonging to transactions in the memory pool. The array may be empty if there are no transactions in the memory pool
ā†’
TXID
stringOptional
(0 or more)
The TXID of a transaction in the memory pool, encoded as hex in RPC byte order

Result (format: true)---a JSON object describing each transaction

NameTypePresenceDescription
resultobjectRequired
(exactly 1)
A object containing transactions currently in the memory pool. May be empty
ā†’
TXID
string : objectOptional
(0 or more)
The TXID of a transaction in the memory pool, encoded as hex in RPC byte order
ā†’ ā†’
size
number (int)Required
(exactly 1)
The size of the serialized transaction in bytes
ā†’ ā†’
fee
number (bitcoins)Required
(exactly 1)
Deprecated in Dash Core 0.17.0

The transaction fee paid by the transaction in decimal bitcoins
ā†’ ā†’
modifiedfee
number (bitcoins)Required
(exactly 1)
Deprecated in Dash Core 0.17.0

The transaction fee with fee deltas used for mining priority in decimal bitcoins
ā†’ ā†’
time
number (int)Required
(exactly 1)
The time the transaction entered the memory pool, Unix epoch time format
ā†’ ā†’
height
number (int)Required
(exactly 1)
The block height when the transaction entered the memory pool
ā†’ ā†’
descendantcount
number (int)Required
(exactly 1)
The number of in-mempool descendant transactions (including this one)
ā†’ ā†’
descendantsize
number (int)Required
(exactly 1)
The size of in-mempool descendants (including this one)
ā†’ ā†’
descendantfees
number (int)Required
(exactly 1)
Deprecated in Dash Core 0.17.0

The modified fees (see modifiedfee above) of in-mempool descendants (including this one)
ā†’ ā†’
ancestorcount
number (int)Required
(exactly 1)
The number of in-mempool ancestor transactions (including this one)
ā†’ ā†’
ancestorsize
number (int)Required
(exactly 1)
The size of in-mempool ancestors (including this one)
ā†’ ā†’
ancestorfees
number (int)Required
(exactly 1)
Deprecated in Dash Core 0.17.0

The modified fees (see modifiedfee above) of in-mempool ancestors (including this one)
ā†’ ā†’
fees
objectOptional
(0 or 1)
Added in Dash Core 0.17.0
Object containing fee information
ā†’ā†’ā†’
base
numberOptional
(0 or 1)
Added in Dash Core 0.17.0
Transaction fee in DASH
ā†’ā†’ā†’
modified
numberOptional
(0 or 1)
Added in Dash Core 0.17.0
Transaction fee with fee deltas used for mining priority in DASH
ā†’ā†’ā†’
ancestor
numberOptional
(0 or 1)
Added in Dash Core 0.17.0
Modified fees (see above) of in-mempool ancestors (including this one) in DASH
ā†’ā†’ā†’
descendent
numberOptional
(0 or 1)
Added in Dash Core 0.17.0
Modified fees (see above) of in-mempool descendants (including this one) in DASH
ā†’ ā†’
depends
arrayRequired
(exactly 1)
An array holding TXIDs of unconfirmed transactions this transaction depends upon (parent transactions). Those transactions must be part of a block before this transaction can be added to a block, although all transactions may be included in the same block. The array may be empty
ā†’ ā†’ ā†’
Depends TXID
stringOptional (0 or more)The TXIDs of any unconfirmed transactions this transaction depends upon, encoded as hex in RPC byte order

Examples from Dash Core 0.17.0

The default (false):

dash-cli getmempooldescendants d64eb30e5435e7a4564df9d06525a8ab\
48858fdaf111661d1e7874a72cebc132

Result:

[
  "dc63e7f6929658feade06fec1eeaf43b3160095d66a9b59f57e77e56c20241fc"
]

Verbose output (true):

dash-cli getmempooldescendants d64eb30e5435e7a4564df9d06525a8ab\
48858fdaf111661d1e7874a72cebc132 true

Result:

{
  "dc63e7f6929658feade06fec1eeaf43b3160095d66a9b59f57e77e56c20241fc": {
    "fees": {
      "base": 0.00000226,
      "modified": 0.00000226,
      "ancestor": 0.00000600,
      "descendant": 0.00000226
    },
    "size": 226,
    "fee": 0.00000226,
    "modifiedfee": 0.00000226,
    "time": 1610552427,
    "height": 425538,
    "descendantcount": 1,
    "descendantsize": 226,
    "descendantfees": 226,
    "ancestorcount": 2,
    "ancestorsize": 599,
    "ancestorfees": 600,
    "depends": [
      "d64eb30e5435e7a4564df9d06525a8ab48858fdaf111661d1e7874a72cebc132"
    ],
    "spentby": [
    ],
    "instantlock": true
  }
}

See also

  • GetMemPoolAncestors: returns all in-mempool ancestors for a transaction in the mempool.
  • GetRawMemPool: returns all transaction identifiers (TXIDs) in the memory pool as a JSON array, or detailed information about each transaction in the memory pool as a JSON object.

GetMemPoolEntry

Added in Dash Core 0.14.0

The getmempoolentry RPC returns mempool data for given transaction (must be in mempool).

Parameter #1---a transaction identifier (TXID)

NameTypePresenceDescription
TXIDstring (hex)Required
(exactly 1)
The TXID of a transaction in the memory pool, encoded as hex in RPC byte order

Result ---a JSON object describing the transaction

NameTypePresenceDescription
resultobjectRequired
(exactly 1)
A object containing transactions currently in the memory pool. May be empty
ā†’
size
number (int)Required
(exactly 1)
The size of the serialized transaction in bytes
ā†’
fee
number (bitcoins)Required
(exactly 1)
Deprecated in Dash Core 0.17.0

The transaction fee paid by the transaction in decimal bitcoins
ā†’
modifiedfee
number (bitcoins)Required
(exactly 1)
Deprecated in Dash Core 0.17.0

The transaction fee with fee deltas used for mining priority in decimal bitcoins
ā†’
time
number (int)Required
(exactly 1)
The time the transaction entered the memory pool, Unix epoch time format
ā†’
height
number (int)Required
(exactly 1)
The block height when the transaction entered the memory pool
ā†’
descendantcount
number (int)Required
(exactly 1)
The number of in-mempool descendant transactions (including this one)
ā†’
descendantsize
number (int)Required
(exactly 1)
The size of in-mempool descendants (including this one)
ā†’
descendantfees
number (int)Required
(exactly 1)
Deprecated in Dash Core 0.17.0

The modified fees (see modifiedfee above) of in-mempool descendants (including this one)
ā†’
ancestorcount
number (int)Required
(exactly 1)
The number of in-mempool ancestor transactions (including this one)
ā†’
ancestorsize
number (int)Required
(exactly 1)
The size of in-mempool ancestors (including this one)
ā†’
ancestorfees
number (int)Required
(exactly 1)
Deprecated in Dash Core 0.17.0

The modified fees (see modifiedfee above) of in-mempool ancestors (including this one)
ā†’ ā†’
fees
objectOptional
(0 or 1)
Added in Dash Core 0.17.0
Object containing fee information
ā†’ā†’ā†’
base
numberOptional
(0 or 1)
Added in Dash Core 0.17.0
Transaction fee in DASH
ā†’ā†’ā†’
modified
numberOptional
(0 or 1)
Added in Dash Core 0.17.0
Transaction fee with fee deltas used for mining priority in DASH
ā†’ā†’ā†’
ancestor
numberOptional
(0 or 1)
Added in Dash Core 0.17.0
Modified fees (see above) of in-mempool ancestors (including this one) in DASH
ā†’ā†’ā†’
descendent
numberOptional
(0 or 1)
Added in Dash Core 0.17.0
Modified fees (see above) of in-mempool descendants (including this one) in DASH
ā†’
depends
arrayRequired
(exactly 1)
An array holding TXIDs of unconfirmed transactions this transaction depends upon (parent transactions). Those transactions must be part of a block before this transaction can be added to a block, although all transactions may be included in the same block. The array may be empty
ā†’ ā†’
Depends TXID
stringOptional (0 or more)The TXIDs of any unconfirmed transactions this transaction depends upon, encoded as hex in RPC byte order
ā†’
instantlock
boolRequired
(exactly 1)
Always false if lite mode is enabled

True if this transaction was locked via InstantSend

Example from Dash Core 0.17.0

dash-cli getmempoolentry  d64eb30e5435e7a4564df9d06525a8ab\
48858fdaf111661d1e7874a72cebc132

Result:

{
  "fees": {
    "base": 0.00000374,
    "modified": 0.00000374,
    "ancestor": 0.00000374,
    "descendant": 0.00000600
  },
  "size": 373,
  "fee": 0.00000374,
  "modifiedfee": 0.00000374,
  "time": 1610552403,
  "height": 425538,
  "descendantcount": 2,
  "descendantsize": 599,
  "descendantfees": 600,
  "ancestorcount": 1,
  "ancestorsize": 373,
  "ancestorfees": 374,
  "depends": [
  ],
  "spentby": [
    "dc63e7f6929658feade06fec1eeaf43b3160095d66a9b59f57e77e56c20241fc"
  ],
  "instantlock": true
}

See also

  • GetMemPoolAncestors: returns all in-mempool ancestors for a transaction in the mempool.
  • GetMemPoolDescendants: returns all in-mempool descendants for a transaction in the mempool.
  • GetRawMemPool: returns all transaction identifiers (TXIDs) in the memory pool as a JSON array, or detailed information about each transaction in the memory pool as a JSON object.

GetMemPoolInfo

The getmempoolinfo RPC returns information about the node's current transaction memory pool.

Parameters: none

Result---information about the transaction memory pool

NameTypePresenceDescription
resultobjectRequired
(exactly 1)
A object containing information about the memory pool
ā†’
size
number (int)Required
(exactly 1)
The number of transactions currently in the memory pool
ā†’
bytes
number (int)Required
(exactly 1)
The total number of bytes in the transactions in the memory pool
ā†’
usage
number (int)Required
(exactly 1)
Added in Bitcoin Core 0.11.0

Total memory usage for the mempool in bytes
ā†’
maxmempool
number (int)Required
(exactly 1)
Added in Bitcoin Core 0.12.0

Maximum memory usage for the mempool in bytes
ā†’
mempoolminfee
numberRequired
(exactly 1)
Added in Bitcoin Core 0.12.0

The lowest fee per kilobyte paid by any transaction in the memory pool
ā†’
mempoolminfee
numberRequired
(exactly 1)
Added in Dash Core 0.16.0

The current minimum relay fee for transactions
ā†’
instantsendlocks
number (int)Required
(exactly 1)
Added in Dash Core 0.15.0

Number of unconfirmed InstantSend locks

Example from Dash Core 0.16.0

dash-cli -testnet getmempoolinfo

Result:

{
  "size": 3,
  "bytes": 1857,
  "usage": 5536,
  "maxmempool": 300000000,
  "mempoolminfee": 0.00001000,
  "minrelaytxfee": 0.00001000,
  "instantsendlocks": 2
}

See also

  • GetBlockChainInfo: provides information about the current state of the block chain.
  • GetRawMemPool: returns all transaction identifiers (TXIDs) in the memory pool as a JSON array, or detailed information about each transaction in the memory pool as a JSON object.
  • GetTxOutSetInfo: returns statistics about the confirmed unspent transaction output (UTXO) set. Note that this call may take some time and that it only counts outputs from confirmed transactions---it does not count outputs from the memory pool.

GetRawMemPool

The getrawmempool RPC returns all transaction identifiers (TXIDs) in the memory pool as a JSON array, or detailed information about each transaction in the memory pool as a JSON object.

Parameter---desired output format

NameTypePresenceDescription
FormatboolOptional
(0 or 1)
Set to true to get verbose output describing each transaction in the memory pool; set to false (the default) to only get an array of TXIDs for transactions in the memory pool

Result (format false)---an array of TXIDs

NameTypePresenceDescription
resultarrayRequired
(exactly 1)
An array of TXIDs belonging to transactions in the memory pool. The array may be empty if there are no transactions in the memory pool
ā†’
TXID
stringOptional
(0 or more)
The TXID of a transaction in the memory pool, encoded as hex in RPC byte order

Result (format: true)---a JSON object describing each transaction

NameTypePresenceDescription
resultobjectRequired
(exactly 1)
A object containing transactions currently in the memory pool. May be empty
ā†’
TXID
string : objectOptional
(0 or more)
The TXID of a transaction in the memory pool, encoded as hex in RPC byte order
ā†’ ā†’
size
number (int)Required
(exactly 1)
The size of the serialized transaction in bytes
ā†’ ā†’
fee
amount (Dash)Required
(exactly 1)
Deprecated in Dash Core 0.17.0

The transaction fee paid by the transaction in decimal Dash
ā†’ ā†’
modifiedfee
amount (Dash)Required
(exactly 1)
Deprecated in Dash Core 0.17.0

The transaction fee with fee deltas used for mining priority in decimal Dash
ā†’ ā†’
time
number (int)Required
(exactly 1)
The time the transaction entered the memory pool, Unix epoch time format
ā†’ ā†’
height
number (int)Required
(exactly 1)
The block height when the transaction entered the memory pool
ā†’ ā†’
descendantcount
number (int)Required
(exactly 1)
Added in Bitcoin Core 0.12.0

The number of in-mempool descendant transactions (including this one)
ā†’ ā†’
descendantsize
number (int)Required
(exactly 1)
Added in Bitcoin Core 0.12.0

The size of in-mempool descendants (including this one)
ā†’ ā†’
descendantfees
number (int)Required
(exactly 1)
Deprecated in Dash Core 0.17.0

The modified fees (see modifiedfee above) of in-mempool descendants (including this one)
ā†’ ā†’
ancestorcount
number (int)Required
(exactly 1)
Added in Dash Core 0.12.3 / Bitcoin Core 0.13.0

The number of in-mempool ancestor transactions (including this one)
ā†’ ā†’
ancestorsize
number (int)Required
(exactly 1)
Added in Dash Core 0.12.3 / Bitcoin Core 0.13.0

The size of in-mempool ancestors (including this one)
ā†’ ā†’
ancestorfees
number (int)Required
(exactly 1)
Deprecated in Dash Core 0.17.0

The modified fees (see modifiedfee above) of in-mempool ancestors (including this one)
ā†’ ā†’
fees
objectOptional
(0 or 1)
Added in Dash Core 0.17.0
Object containing fee information
ā†’ā†’ā†’
base
numberOptional
(0 or 1)
Added in Dash Core 0.17.0
Transaction fee in DASH
ā†’ā†’ā†’
modified
numberOptional
(0 or 1)
Added in Dash Core 0.17.0
Transaction fee with fee deltas used for mining priority in DASH
ā†’ā†’ā†’
ancestor
numberOptional
(0 or 1)
Added in Dash Core 0.17.0
Modified fees (see above) of in-mempool ancestors (including this one) in DASH
ā†’ā†’ā†’
descendent
numberOptional
(0 or 1)
Added in Dash Core 0.17.0
Modified fees (see above) of in-mempool descendants (including this one) in DASH
ā†’ ā†’
depends
arrayRequired
(exactly 1)
An array holding TXIDs of unconfirmed transactions this transaction depends upon (parent transactions). Those transactions must be part of a block before this transaction can be added to a block, although all transactions may be included in the same block. The array may be empty
ā†’ ā†’ ā†’
Depends TXID
stringOptional (0 or more)The TXIDs of any unconfirmed transactions this transaction depends upon, encoded as hex in RPC byte order
ā†’ ā†’
spentby
arrayRequired
(exactly 1)
Added in Dash Core 0.17.0
An array of unconfirmed transactions spending outputs from this transaction
ā†’ ā†’ ā†’
TXID
stringOptional (0 or more)The TXIDs of any unconfirmed transactions spending from this transaction
ā†’ ā†’
instantlock
boolRequired
(exactly 1)
Added in Dash Core 0.12.3

Always false if lite mode is enabled

Set to true for locked InstantSend transactions (masternode quorum has locked the transaction inputs via islock message). Set to false if the masternodes have not approved the InstantSend transaction

Examples from Dash Core 0.17.0

The default (false):

dash-cli getrawmempool

Result:

[
  "9bf373838dd68dfb7d670af15a7414fba400a7db91b7a0ac390b6f190daeb462"
]

Verbose output (true):

dash-cli getrawmempool true

Result:

{
  "9bf373838dd68dfb7d670af15a7414fba400a7db91b7a0ac390b6f190daeb462": {
    "fees": {
      "base": 0.00000374,
      "modified": 0.00000374,
      "ancestor": 0.00000374,
      "descendant": 0.00000374
    },
    "size": 373,
    "fee": 0.00000374,
    "modifiedfee": 0.00000374,
    "time": 1610551773,
    "height": 425536,
    "descendantcount": 1,
    "descendantsize": 373,
    "descendantfees": 374,
    "ancestorcount": 1,
    "ancestorsize": 373,
    "ancestorfees": 374,
    "depends": [
    ],
    "spentby": [
    ],
    "instantlock": true
  }
}

See also

  • GetMemPoolInfo: returns information about the node's current transaction memory pool.
  • GetMemPoolEntry: returns mempool data for given transaction (must be in mempool).
  • GetTxOutSetInfo: returns statistics about the confirmed unspent transaction output (UTXO) set. Note that this call may take some time and that it only counts outputs from confirmed transactions---it does not count outputs from the memory pool.

GetMerkleBlocks

Added in Dash Core 0.15.0

The getmerkleblocks RPC returns an array of hex-encoded merkleblocks for blocks starting from which match .

Parameter #1---filter

NameTypePresenceDescription
filterstringRequired
(exactly 1)
The hex encoded bloom filter

Parameter #2---hash

NameTypePresenceDescription
hashstringRequired
(exactly 1)
The block hash

Parameter #3---count

NameTypePresenceDescription
countnumber (int)Optional
Default/max=2000

Result---the list of merkleblocks

NameTypePresenceDescription
resultarrayRequired
(exactly 1)
An array of merkleblocks
ā†’
Merkle Block
string (hex)Optional
(1 or more)
A serialized, hex-encoded merkleblock

Example from Dash Core 0.15.0

dash-cli getmerkleblocks \
	"2303028005802040100040000008008400048141010000f8400420800080025004000004130000000000000001" \
	"00000000007e1432d2af52e8463278bf556b55cf5049262f25634557e2e91202"
	2000

Result (truncated):

[
  "000000202c...aefc440107",
  "0000002058...9a17830103"
]

See also: none

GetSpecialTxes

Added in Dash Core 0.13.1

The getspecialtxes RPC returns an array of special transactions found in the specified block

Parameter #1---Block hash

NameTypePresenceDescription
blockhashstringRequired
(exactly 1)
The block hash.

Parameter #2---Special transaction type

NameTypePresenceDescription
typeintOptional
(0 or 1)
Filter special txes by type, -1 means all types (default: -1)

Parameter #3---Result limit

NameTypePresenceDescription
countintOptional
(0 or 1)
The number of transactions to return (default: 10)

Parameter #4---Results to skip

NameTypePresenceDescription
skipintOptional
(0 or 1)
The number of transactions to skip (default: 0)

Parameter #5---Verbosity

NameTypePresenceDescription
verbosityintOptional
(0 or 1)
0 for hashes, 1 for hex-encoded data, and 2 for JSON object
(default: 0)

Result (if verbosity was 0)---An array of transaction IDs

NameTypePresenceDescription
resultstring (hex): arrayRequired
(exactly 1)
Array of special transaction hashes

Result (if verbosity was 1)---An array of serialized transactions

NameTypePresenceDescription
resultstring (hex): arrayRequired
(exactly 1)
Array of serialized, hex-encoded data for the special transaction(s)

Result (if verbosity was 2)---An array of JSON objects

NameTypePresenceDescription
resultstring (hex): array of ojbectsRequired
(exactly 1)
Array of special transaction objects in the format of the getrawtransaction RPC

Example from Dash Core 0.13.1

List of Special Transactions hashes.

dash-cli -testnet getspecialtxes \
0000003db0006ecaccdf5ae2cfa9d94406ef40ff65b9ec34668b87fca3da9226

Result:

[
  "1572a15f56307e413afe3cb7ea0017a1a3fd6d89c6c5f258cc17b2888a8e7fff",
  "89a6dc42063e4a792ec225db64dd9426742a5d1738e8821625d2ab920a6187b2",
  "fa3b3b0d3522becb02ddd15dd075f3d6ecc6a5a50b43c6c9f6d4703a9a8509d5"
]

List of Provider Registration Special Transactions (type: 1) in serialized, hex-encoded format.

dash-cli -testnet getspecialtxes \
0000003db0006ecaccdf5ae2cfa9d94406ef40ff65b9ec34668b87fca3da9226 1 10 0 1

Result:

[
  "0300010001ea721d7420a9b58025894d08f9fecc73b7b87ed09277fa99dad5aa028ea357e1000000006b48304502210093c409672eed335f80630d7108c108d0b85ebe4d8be0758f8a3745f617c4b57302203175063605552c89f6de7f3dadc1773d5ef773b7cc0ccf98e6c5555ea75ba307012102b21d19fec95d9863c5b12fafeb60530e1cfc51d83f49ea9bca7192abb8b83e46feffffff01c4bb609a010000001976a9142efe9f9d3b36b133364d3cccbd27db75a0fbdcb788ac00000000fd120101000000000031567fbaf591ae9d2d0e9050bebce6a311cfd900616f851a3a630aa65e53f6940000000000000000000000000000ffffad3d1ee74a43c1ad3af209f75deaeb9216fc8339fd48d376f9b007ffa44583c9908f4aaca8dd97990c56043e475723f90940ef5fd7d493152540f25f58fb8c965ee5e1be4f850a661476c1ad3af209f75deaeb9216fc8339fd48d376f9b0e8031976a91454bbd7bd7c21553612d60ab16579e51efbcb135288acc281e8bf5a0dd22dfc9f1edeef9ef248f965a79210d997da37fb3e1dec76d1a4412096809bc005c860a0215cb008e3044b972688443b0b7a31ac5a04b728e63b1b5c5489e33dd666435f93c646523ad8a1d935a58957026749cbd0a9bf7e09a77388",
  "03000100012354b77c0f261f3d5b8424cbe67c2f27130f01c531732a08b8ae3f28aaa1b1fb000000006a473044022058323d3d9114492a7a7d350d5e3127d2dc550563968319987079c98f19ed519202204160cfe81adf1f41301136a3cbe03697baa1b14c3103b66bd839ace503dbf2630121026f83a8dad6b4695b136c399405b31d4031fd6631c469673d71eda479157ef9dcfeffffff0106b8609a010000001976a9142a855dc127bfdd5cc0ab73b71ff126e49aa409c488ac00000000fd1201010000000000b60dcb8bab5aba47435942c36ca4ee74ea5b662f4d7c7b528ce341915b2d5aec0100000000000000000000000000ffffad3d1ee74a428d3433cb6b9a1a29fdf07613172bbfdab744889689e308c9d2d8a3cb35f9d7bb7220b1eca82c952b82111119670dacae18a509628c775287e4e796128cd6379b80dffd7d8d3433cb6b9a1a29fdf07613172bbfdab744889610271976a91454bbd7bd7c21553612d60ab16579e51efbcb135288ac512010a2b992d7d5c1e1f999852855cc55162800025cfdf3b56c74e4734a2d97411f858532607cbd8848452dab1f216650def1d11a5abf3fa464c9ffcc7fec894a012a4b70ee5d3b983b5fe640f04a7f3e4fe67fbb5b7cccb71afa37888ad6cca48e"
]

List of Coinbase Special Transactions (type: 5) in JSON format.

dash-cli -testnet getspecialtxes \
00000000007b0fb99e36713cf08012482478ee496e6dcb4007ad2e806306e62b 5 10 0 2

Result:

[
  {
    "txid": "25632685ed0d7286901a80961c924c1ddd952e764754dbd8b40d0956413c8b56",
    "size": 229,
    "version": 3,
    "type": 5,
    "locktime": 0,
    "vin": [
      {
        "coinbase": "03ae50011a4d696e656420627920416e74506f6f6c2021000b01201da9196f0000000007000000",
        "sequence": 4294967295
      }
    ],
    "vout": [
      {
        "value": 8.10000000,
        "valueSat": 810000000,
        "n": 0,
        "scriptPubKey": {
          "asm": "OP_DUP OP_HASH160 cbd7bfcc50351180132b2c0698cb90ad74c473c7 OP_EQUALVERIFY OP_CHECKSIG",
          "hex": "76a914cbd7bfcc50351180132b2c0698cb90ad74c473c788ac",
          "reqSigs": 1,
          "type": "pubkeyhash",
          "addresses": [
            "yeuGUfPMrbEqAS2Pw1wonYgEPbM4LAA9LK"
          ]
        }
      },
      {
        "value": 8.10000000,
        "valueSat": 810000000,
        "n": 1,
        "scriptPubKey": {
          "asm": "OP_DUP OP_HASH160 88a060bc2dfe05780ae4dcb6c98b12436c35a939 OP_EQUALVERIFY OP_CHECKSIG",
          "hex": "76a91488a060bc2dfe05780ae4dcb6c98b12436c35a93988ac",
          "reqSigs": 1,
          "type": "pubkeyhash",
          "addresses": [
            "yYmrsYP3XYMZr1cGtha3QzmuNB1C7CfyhV"
          ]
        }
      }
    ],
    "extraPayloadSize": 70,
    "extraPayload": "0200ae50010078e5c08b39960887bf95185c381bdb719e60b6925fa12af78a8824fade927387c757acb6bac63da84f9245e20cfd5d830382ac634d434725ca6349ab5db920a3",
    "cbTx": {
      "version": 2,
      "height": 86190,
      "merkleRootMNList": "877392defa24888af72aa15f92b6609e71db1b385c1895bf870896398bc0e578",
      "merkleRootQuorums": "a320b95dab4963ca2547434d63ac8203835dfd0ce245924fa83dc6bab6ac57c7"
    },
    "instantlock": false,
    "chainlock": false
  }
]

See also:

  • GetRawTransaction: gets a hex-encoded serialized transaction or a JSON object describing the transaction. By default, Dash Core only stores complete transaction data for UTXOs and your own transactions, so the RPC may fail on historic transactions unless you use the non-default txindex=1 in your Dash Core startup settings.

GetSpentInfo

šŸ“˜

Requires spentindex Dash Core command-line/configuration-file parameter to be enabled.

Added in Dash Core 0.12.1

The getspentinfo RPC returns the txid and index where an output is spent (requires spentindex to be enabled).

Parameter #1---the TXID of the output

NameTypePresenceDescription
TXIDstring (hex)Required
(exactly 1)
The TXID of the transaction containing the relevant output, encoded as hex in RPC byte order

Parameter #2---the start block height

NameTypePresenceDescription
Indexnumber (int)Required
(exactly 1)
The block height to begin looking in

Result---the TXID and spending input index

NameTypePresenceDescription
resultobject/nullRequired
(exactly 1)
Information about the spent output. If output wasn't found or if an error occurred, this will be JSON null
ā†’
txid
stringRequired
(exactly 1)
The output txid
ā†’
index
numberRequired
(exactly 1)
The spending input index

Example from Dash Core 0.12.2

Get the txid and index where an output is spent:

dash-cli getspentinfo \
  '''
    {
      "txid": "0456aaf51a8df21dd47c2a06ede046a5bf7403bcb95d14d1d71b178c189fb933", \
      "index": 0
    }
  '''

Result:

{
  "txid": "14e874421350840e9d43965967c5a989e7d41ad361ef37484ee67d01d433ecfa",
  "index": 1,
  "height": 7742
}

See also: none

GetTxOut

The gettxout RPC returns details about an unspent transaction output (UTXO).

Parameter #1---the TXID of the output to get

NameTypePresenceDescription
TXIDstring (hex)Required
(exactly 1)
The TXID of the transaction containing the output to get, encoded as hex in RPC byte order

Parameter #2---the output index number (vout) of the output to get

NameTypePresenceDescription
Voutnumber (int)Required
(exactly 1)
The output index number (vout) of the output within the transaction; the first output in a transaction is vout 0

Parameter #3---whether to display unconfirmed outputs from the memory pool

NameTypePresenceDescription
UnconfirmedboolOptional
(0 or 1)
Set to true to display unconfirmed outputs from the memory pool; set to false (the default) to only display outputs from confirmed transactions

Result---a description of the output

NameTypePresenceDescription
resultobject/nullRequired
(exactly 1)
Information about the output. If output wasn't found, if it was spent, or if an error occurred, this will be JSON null
ā†’
bestblock
string (hex)Required
(exactly 1)
The hash of the header of the block on the local best block chain which includes this transaction. The hash will encoded as hex in RPC byte order. If the transaction is not part of a block, the string will be empty
ā†’
confirmations
number (int)Required
(exactly 1)
The number of confirmations received for the transaction containing this output or 0 if the transaction hasn't been confirmed yet
ā†’
value
number (Dash)Required
(exactly 1)
The amount of Dash spent to this output. May be 0
ā†’
scriptPubKey
string : objectOptional
(0 or 1)
An object with information about the pubkey script. This may be null if there was no pubkey script
ā†’ ā†’
asm
stringRequired
(exactly 1)
The pubkey script in decoded form with non-data-pushing opcodes listed
ā†’ ā†’
hex
string (hex)Required
(exactly 1)
The pubkey script encoded as hex
ā†’ ā†’
reqSigs
number (int)Optional
(0 or 1)
The number of signatures required; this is always 1 for P2PK, P2PKH, and P2SH (including P2SH multisig because the redeem script is not available in the pubkey script). It may be greater than 1 for bare multisig. This value will not be returned for nulldata or nonstandard script types (see the type key below)
ā†’ ā†’
type
stringOptional
(0 or 1)
The type of script. This will be one of the following:
ā€¢ pubkey for a P2PK script
ā€¢ pubkeyhash for a P2PKH script
ā€¢ scripthash for a P2SH script
ā€¢ multisig for a bare multisig script
ā€¢ nulldata for nulldata scripts
ā€¢ nonstandard for unknown scripts
ā†’ ā†’
addresses
string : arrayOptional
(0 or 1)
The P2PKH or P2SH addresses used in this transaction, or the computed P2PKH address of any pubkeys in this transaction. This array will not be returned for nulldata or nonstandard script types
ā†’ ā†’ ā†’
Address
stringRequired
(1 or more)
A P2PKH or P2SH address
ā†’
coinbase
boolRequired
(exactly 1)
Set to true if the transaction output belonged to a coinbase transaction; set to false for all other transactions. Coinbase transactions need to have 101 confirmations before their outputs can be spent

Example from Dash Core 0.15.0

Get the UTXO from the following transaction from the first output index ("0"),
searching the memory pool if necessary.

dash-cli -testnet gettxout \
  e0a06b47f0de6f3851a228d5ac377ac38b495adf04298c43e951e679c5b0aa8f \
  0 true

Result:

{
  "bestblock": "000000005651f6d7859793dee07d476a2f2a7338e66bbb41caf4b544c5b0318d",
  "confirmations": 2,
  "value": 25.00000000,
  "scriptPubKey": {
    "asm": "OP_DUP OP_HASH160 b66266c5017a759817f3bb99e8d9124bf5bb2e74 OP_EQUALVERIFY OP_CHECKSIG",
    "hex": "76a914b66266c5017a759817f3bb99e8d9124bf5bb2e7488ac",
    "reqSigs": 1,
    "type": "pubkeyhash",
    "addresses": [
      "ycwoiAibTjpwnoCZSX7S4kiB2H8wULw9qo"
    ]
  },
  "coinbase": false
}

See also

  • GetRawTransaction: gets a hex-encoded serialized transaction or a JSON object describing the transaction. By default, Dash Core only stores complete transaction data for UTXOs and your own transactions, so the RPC may fail on historic transactions unless you use the non-default txindex=1 in your Dash Core startup settings.
  • GetTransaction: gets detailed information about an in-wallet transaction.

GetTxOutProof

The gettxoutproof RPC returns a hex-encoded proof that one or more specified transactions were included in a block.

NOTE: By default this function only works when there is an
unspent output in the UTXO set for this transaction. To make it always work,
you need to maintain a transaction index, using the -txindex command line option, or
specify the block in which the transaction is included in manually (by block header hash).

Parameter #1---the transaction hashes to prove

NameTypePresenceDescription
TXIDsarrayRequired
(exactly 1)
A JSON array of txids to filter
ā†’
txid
stringRequired
(1 or more)
TXIDs of the transactions to generate proof for. All transactions must be in the same block

Parameter #2---the block to look for txids in

NameTypePresenceDescription
Header hashstringOptional
(0 or 1)
If specified, looks for txid in the block with this hash

Result---serialized, hex-encoded data for the proof

NameTypePresenceDescription
resultstringRequired
(exactly 1)
A string that is a serialized, hex-encoded data for the proof

Example from Dash Core 0.12.2

Get the hex-encoded proof that "txid" was included in block 000000012d774f3c7668f32bc448efeb93b317f312dd863679de3a007d47817f:

dash-cli gettxoutproof \
  '''
    [
      "e0a06b47f0de6f3851a228d5ac377ac38b495adf04298c43e951e679c5b0aa8f"
    ]
  ''' \
  '000000012d774f3c7668f32bc448efeb93b317f312dd863679de3a007d47817f'

Result (wrapped):

01000020ed72cc6a7294782a7711d8fa7ef74716ef062dc50bb0820f7eec923801000000\
aa5d17c5128043803b67c7ab03e4d3ffbc9604b54f877f1c5cf9ed3adeaa19b2cd7ed659\
f838011d10a70a480200000002033c89c2baecba9fc983c85dcf365c2d9cc93aca1dee2e\
5ac18124464056542e8faab0c579e651e9438c2904df5a498bc37a37acd528a251386fde\
f0476ba0e00105

See also

  • VerifyTxOutProof: verifies that a proof points to one or more transactions in a block, returning the transactions the proof commits to and throwing an RPC error if the block is not in our best block chain.
  • merkleblock message: A description of the
    format used for the proof.

GetTxOutSetInfo

The gettxoutsetinfo RPC returns statistics about the confirmed unspent transaction output (UTXO) set. Note that this call may take some time and that it only counts outputs from confirmed transactions---it does not count outputs from the memory pool.

Parameters: none

Result---statistics about the UTXO set

NameTypePresenceDescription
resultobjectRequired
(exactly 1)
Information about the UTXO set
ā†’
height
number (int)Required
(exactly 1)
The height of the local best block chain. A new node with only the hardcoded genesis block will have a height of 0
ā†’
bestblock
string (hex)Required
(exactly 1)
The hash of the header of the highest block on the local best block chain, encoded as hex in RPC byte order
ā†’
transactions
number (int)Required
(exactly 1)
The number of transactions with unspent outputs
ā†’
txouts
number (int)Required
(exactly 1)
The number of unspent transaction outputs
ā†’
bogosize
number (int)Required
(exactly 1)
A meaningless metric for UTXO set size
ā†’
hash_serialized_2
string (hex)Required
(exactly 1)
A SHA256(SHA256()) hash of the serialized UTXO set; useful for comparing two nodes to see if they have the same set (they should, if they always used the same serialization format and currently have the same best block). The hash is encoded as hex in RPC byte order
ā†’
disk_size
number (int)Required
(exactly 1)
The estimated size of the chainstate on disk
ā†’
total_amount
number (Dash)Required
(exactly 1)
The total amount of Dash in the UTXO set

Example from Dash Core 0.15.0

dash-cli -testnet gettxoutsetinfo

Result:

{
  "height": 159358,
  "bestblock": "0000000000a705ef74a1fc134ea1eba49af8eead40b3df1fc4fb40f5940a0d60",
  "transactions": 187542,
  "txouts": 366996,
  "bogosize": 28344374,
  "hash_serialized_2": "d7326bdc2d9cb7d91580bfd47d6c2972ab1776c2c33c787873a5fd01986c9377",
  "disk_size": 21513509,
  "total_amount": 7517185.08574437
}

See also

  • GetBlockChainInfo: provides information about the current state of the block chain.
  • GetMemPoolInfo: returns information about the node's current transaction memory pool.

PreciousBlock

Added in Dash Core 0.12.3 / Bitcoin Core 0.14.0

The preciousblock RPC treats a block as if it were received before others with the same work. A later preciousblock call can override the effect of an earlier one. The effects of preciousblock are not retained across restarts.

Parameter #1---the block hash

NameTypePresenceDescription
Header Hashstring (hex)Required
(exactly 1)
The hash of the block to mark as precious

Result---null or error on failure

NameTypePresenceDescription
resultnullRequired
(exactly 1)
JSON null. The JSON-RPC error field will be set only if you entered an invalid block hash

Example from Dash Core 0.12.3

dash-cli preciousblock 00000000034d77e287b63922a94f12e8c4ab9e\
1d8056060fd51f6153ea5dc757

Result (no output from dash-cli because result is set to null).

PruneBlockChain

Added in Dash Core 0.12.3 / Bitcoin Core 0.14.0

The pruneblockchain RPC prunes the blockchain up to a specified height or timestamp. The -prune option needs to be enabled (disabled by default).

Parameter #1---the block height or timestamp

NameTypePresenceDescription
Heightnumber (int)Required
(exactly 1)
The block height to prune up to. May be set to a particular height, or a unix timestamp to prune blocks whose block time is at least 2 hours older than the provided timestamp

Result---the height of the last block pruned

NameTypePresenceDescription
resultnumber (int)Required
(exactly 1)
The height of the last block pruned

Example from Dash Core 0.12.3

dash-cli pruneblockchain 413555

Result:

413555

See also

  • ImportPrunedFunds: imports funds without the need of a rescan. Meant for use with pruned wallets.

SaveMemPool

The savemempool RPC dumps the mempool to disk.

Parameters: none

Example from Dash Core 0.16.0

dash-cli savemempool

Result (no output from dash-cli).

See also: none

VerifyChain

The verifychain RPC verifies each entry in the local block chain database.

Parameter #1---how thoroughly to check each block

NameTypePresenceDescription
Check Levelnumber (int)Optional
(0 or 1)
How thoroughly to check each block, from 0 to 4. Default is the level set with the -checklevel command line argument; if that isn't set, the default is 3. Each higher level includes the tests from the lower levels

Levels are:
0. Read from disk to ensure the files are accessible
1. Ensure each block is valid
2. Make sure undo files can be read from disk and are in a valid format
3. Test each block undo to ensure it results in correct state
4. After undoing blocks, reconnect them to ensure they reconnect correctly

Parameter #2---the number of blocks to check

NameTypePresenceDescription
Number Of Blocksnumber (int)Optional
(0 or 1)
The number of blocks to verify. Set to 0 to check all blocks. Defaults to the value of the -checkblocks command-line argument; if that isn't set, the default is 288

Result---verification results

NameTypePresenceDescription
resultboolRequired
(exactly 1)
Set to true if verified; set to false if verification failed for any reason

Example from Dash Core 0.12.2

Verify the most recent 400 blocks in the most through way:

dash-cli -testnet verifychain 4 400

Result (took < 1 second on a mobile workstation; it would've taken much longer on mainnet):

true

See also

  • GetBlockChainInfo: provides information about the current state of the block chain.
  • GetTxOutSetInfo: returns statistics about the confirmed unspent transaction output (UTXO) set. Note that this call may take some time and that it only counts outputs from confirmed transactions---it does not count outputs from the memory pool.

VerifyTxOutProof

The verifytxoutproof RPC verifies that a proof points to one or more transactions in a block, returning the transactions the proof commits to and throwing an RPC error if the block is not in our best block chain.

Parameter #1---The hex-encoded proof generated by gettxoutproof

NameTypePresenceDescription
proofstringRequiredA hex-encoded proof

Result---txid(s) which the proof commits to

NameTypePresenceDescription
resultstringRequired
(exactly 1)
The txid(s) which the proof commits to, or empty array if the proof cannot be validated

Example from Dash Core 0.12.2

Verify a proof:

dash-cli verifytxoutproof \
01000020ed72cc6a7294782a7711d8fa7ef74716ef062dc50bb0820f7eec923801000000\
aa5d17c5128043803b67c7ab03e4d3ffbc9604b54f877f1c5cf9ed3adeaa19b2cd7ed659\
f838011d10a70a480200000002033c89c2baecba9fc983c85dcf365c2d9cc93aca1dee2e\
5ac18124464056542e8faab0c579e651e9438c2904df5a498bc37a37acd528a251386fde\
f0476ba0e00105

Result:

[
"e0a06b47f0de6f3851a228d5ac377ac38b495adf04298c43e951e679c5b0aa8f"
]

See also

  • GetTxOutProof: returns a hex-encoded proof that one or more specified transactions were included in a block.
  • merkleblock message: A description of the format used for the proof.

Whatā€™s Next