We put our best effort into covering all topics related to Dimecoin. Each section will cover a different category. Not all documentation may be 100% accurate, if you spot an error, please report it or submit a PR request on GitHub.
REMINDER: This documentation is always evolving. If you have not been here for a while, perhaps check again. Things may have been added or updated since your last visit!
Requests#
GET Block#
The GET block
operation gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.
Request
GET /block/<hash>.<format>
Parameter #1—the header hash of the block to retrieve
Name |
Type |
Presence |
Description |
---|---|---|---|
Header Hash |
path (hex) |
Required |
The hash of the header of the block to get, encoded as hex in RPC byte order |
Parameter #2—the output format
Name |
Type |
Presence |
Description |
---|---|---|---|
Format |
suffix |
Required |
Set to |
Response as JSON
Name |
Type |
Presence |
Description |
---|---|---|---|
Result |
object |
Required |
An object containing the requested block |
→ |
string (hex) |
Required |
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 |
→ |
number (int) |
Required |
The number of confirmations the transactions in this block have, starting at 1 when this block is at the tip of the best blockchain. This score will be -1 if the the block is not part of the best blockchain |
→ |
number (int) |
Required |
The size of this block in serialized block format, counted in bytes |
→ |
number (int) |
Required |
The height of this block on its blockchain |
→ |
number (int) |
Required |
This block’s version number. |
→ |
number (int) |
Required |
This block’s version number formatted in hexadecimal. |
→ |
string (hex) |
Required |
The merkle root for this block, encoded as hex in RPC byte order |
→ |
array |
Required |
An array containing all transactions in this block. The transactions appear in the array in the same order they appear in the serialized block |
→ → |
object |
Required |
An object describing a particular transaction within this block |
→ → → |
string (hex) |
Required |
The transaction’s TXID encoded as hex in RPC byte order |
→ → → |
number (int) |
Required |
The serialized transaction size |
→ → → |
number (int) |
Required |
The transaction format version number |
→ → → |
number (int) |
Required |
Added in Dimecoin Core 0.13.0.0 |
→ → → |
number (int) |
Required |
The transaction’s locktime: either a Unix epoch date or block height; see the locktime parsing rules |
→ → → |
array |
Required |
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 |
→ → → → |
object |
Required |
An object describing one of this transaction’s inputs. May be a regular input or a coinbase |
→ → → → → |
string |
Optional |
The TXID of the outpoint being spent, encoded as hex in RPC byte order. Not present if this is a coinbase transaction |
→ → → → → |
number (int) |
Optional |
The output index number (vout) of the outpoint being spent. The first output in a transaction has an index of |
→ → → → → |
object |
Optional |
An object describing the signature script of this input. Not present if this is a coinbase transaction |
→ → → → → → |
string |
Required |
The signature script in decoded form with non-data-pushing opcodes listed |
→ → → → → → |
string (hex) |
Required |
The signature script encoded as hex |
→ → → → → |
string (hex) |
Optional |
The coinbase (similar to the hex field of a scriptSig) encoded as hex. Only present if this is a coinbase transaction |
→ → → → → |
number (DIME) |
Optional |
The number of DIME paid to this output. May be |
→ → → → → |
number (mDIME) |
Optional |
The number of mDIME paid to this output. May be |
→ → → → → → |
string : array |
Optional |
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 |
→ → → → → → → |
string |
Required |
A P2PKH or P2SH address |
→ → → → → |
number (int) |
Required |
The input sequence number |
→ → → |
array |
Required |
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 |
→ → → → |
object |
Required |
An object describing one of this transaction’s outputs |
→ → → → → |
number (DIME) |
Required |
The number of DIME paid to this output. May be |
→ → → → → |
number (mDIME) |
Required |
The number of mDIME paid to this output. May be |
→ → → → → |
number (int) |
Required |
The output index number of this output within this transaction |
→ → → → → |
object |
Required |
An object describing the pubkey script |
→ → → → → → |
string |
Required |
The pubkey script in decoded form with non-data-pushing opcodes listed |
→ → → → → → |
string (hex) |
Required |
The pubkey script encoded as hex |
→ → → → → → |
number (int) |
Optional |
The number of signatures required; this is always |
→ → → → → → |
string |
Optional |
The type of script. This will be one of the following: |
→ → → → → → |
string : array |
Optional |
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 |
→ → → → → → → |
string |
Required |
A P2PKH or P2SH address |
→ → → |
number (int) |
Optional |
Added in Dimecoin Core 0.13.0.0 |
→ → → |
string (hex) |
Optional |
Added in Dimecoin Core 0.13.0.0 |
→ |
number (int) |
Required |
The value of the time field in the block header, indicating approximately when the block was created |
→ |
number (int) |
Required |
The median time of the 11 blocks before the most recent block on the blockchain. Used for validating transaction locktime under BIP113 |
→ |
number (int) |
Required |
The nonce which was successful at turning this particular block into one that could be added to the best blockchain |
→ |
string (hex) |
Required |
The value of the nBits field in the block header, indicating the target threshold this block’s header had to pass |
→ |
number (real) |
Required |
The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0 |
→ |
string (hex) |
Required |
The estimated number of block header hashes miners had to check from the genesis block to this block, encoded as big-endian hex |
→ |
string (hex) |
Required |
The hash of the header of the previous block, encoded as hex in RPC byte order |
→ |
string (hex) |
Optional |
The hash of the next block on the best blockchain, if known, encoded as hex in RPC byte order |
Examples from Dimecoin Core 2.3.0.0
Request a block in hex-encoded serialized block format:
curl http://localhost:11931/rest/block/0000000000ccbf46cf6b78827ac1019f82598be839bce08bff00d188e75fb451.hex
Result (wrapped):
0000002097e8135d73afa52145f6d0b4d0f957030cd598837ddc6750271fb109\
000000008478305a7abf2f7cb21a889fb68d53c3e51685349e18e1b104b5956c\
100bfea2c72d285a84030a1cd0041ed701010000000100000000000000000000\
00000000000000000000000000000000000000000000ffffffff13037a94000e\
2f5032506f6f6c2d74444153482fffffffff06a1f9ef04000000001976a91414\
e3832cd7192ffb358a31d842636c4db8dfb1ac88ac6c357f3c000000001976a9\
149262f2289e1f021dca954d8cf07a7ad72c2cc24d88ac31f49e010000000019\
76a914d93f7ffa324b77d361e89a3c9c8df46ccdb4b39288ac40230e43000000\
001976a914c4541983721b26ada79770bf22de4885e19f566188ac0200000000\
0000004341047559d13c3f81b1fadbd8dd03e4b5a1c73b05e2b980e00d467aa9\
440b29c7de23664dde6428d75cafed22ae4f0d302e26c5c5a5dd4d3e1b796d72\
81bdc9430f35ac00000000000000002a6a28c855abe6461b1003ea36feb88a3b\
d50c5696e5784d11f8cd5e892978685de1d6000000000100000000000000
Get the same block in JSON:
curl http://localhost:11931/rest/block/0000000000ccbf46cf6b78827ac1019f82598be839bce08bff00d188e75fb451.json
Result (whitespace added):
{
"hash":"0000000000ccbf46cf6b78827ac1019f82598be839bce08bff00d188e75fb451",
"confirmations":20,
"size":414,
"height":38010,
"version":536870912,
"merkleroot":"a2fe0b106c95b504b1e1189e348516e5c3538db69f881ab27c2fbf7a5a307884",
"tx":[
{
"txid":"a2fe0b106c95b504b1e1189e348516e5c3538db69f881ab27c2fbf7a5a307884",
"size":333,
"version":1,
"locktime":0,
"vin":[
{
"coinbase":"037a94000e2f5032506f6f6c2d74444153482f",
"sequence":4294967295
}
],
"vout":[
{
"value":0.82835,
"valueSat":82835,
"n":0,
"scriptPubKey":{
"asm":"OP_DUP OP_HASH160 14e3832cd7192ffb358a31d842636c4db8dfb1ac OP_EQUALVERIFY OP_CHECKSIG",
"hex":"76a91414e3832cd7192ffb358a31d842636c4db8dfb1ac88ac",
"reqSigs":1,
"type":"pubkeyhash",
"addresses":[
"yNDtusuhm6otr3eeGh3SqdpNczV4aZSx1b"
]
}
},
{
"value":10.14969,
"valueSat":1014969,
"n":1,
"scriptPubKey":{
"asm":"OP_DUP OP_HASH160 9262f2289e1f021dca954d8cf07a7ad72c2cc24d OP_EQUALVERIFY OP_CHECKSIG",
"hex":"76a9149262f2289e1f021dca954d8cf07a7ad72c2cc24d88ac",
"reqSigs":1,
"type":"pubkeyhash",
"addresses":[
"yZfU36R8dhdnFaK3AwfnubrLXAG2G1WiVn"
]
}
},
{
"value":0.27194,
"valueSat":27194,
"n":2,
"scriptPubKey":{
"asm":"OP_DUP OP_HASH160 d93f7ffa324b77d361e89a3c9c8df46ccdb4b392 OP_EQUALVERIFY OP_CHECKSIG",
"hex":"76a914d93f7ffa324b77d361e89a3c9c8df46ccdb4b39288ac",
"reqSigs":1,
"type":"pubkeyhash",
"addresses":[
"yg89Yt5Tjzs9nRpX3wJCuvr7KuQvgkvmeC"
]
}
},
{
"value":11.25000,
"valueSat":1125000,
"n":3,
"scriptPubKey":{
"asm":"OP_DUP OP_HASH160 c4541983721b26ada79770bf22de4885e19f5661 OP_EQUALVERIFY OP_CHECKSIG",
"hex":"76a914c4541983721b26ada79770bf22de4885e19f566188ac",
"reqSigs":1,
"type":"pubkeyhash",
"addresses":[
"yeDY39aiqbBHbJft5F6rokR23EaZca6UTU"
]
}
},
{
"value":0.00002,
"valueSat":2,
"n":4,
"scriptPubKey":{
"asm":"047559d13c3f81b1fadbd8dd03e4b5a1c73b05e2b980e00d467aa9440b29c7de23664dde6428d75cafed22ae4f0d302e26c5c5a5dd4d3e1b796d7281bdc9430f35 OP_CHECKSIG",
"hex":"41047559d13c3f81b1fadbd8dd03e4b5a1c73b05e2b980e00d467aa9440b29c7de23664dde6428d75cafed22ae4f0d302e26c5c5a5dd4d3e1b796d7281bdc9430f35ac",
"reqSigs":1,
"type":"pubkey",
"addresses":[
"yb21342iADyqAotjwcn4imqjvAcdYhnzeH"
]
}
},
{
"value":0.00000,
"valueSat":0,
"n":5,
"scriptPubKey":{
"asm":"OP_RETURN c855abe6461b1003ea36feb88a3bd50c5696e5784d11f8cd5e892978685de1d60000000001000000",
"hex":"6a28c855abe6461b1003ea36feb88a3bd50c5696e5784d11f8cd5e892978685de1d60000000001000000",
"type":"nulldata"
}
}
]
}
],
"time":1512582599,
"mediantime":1512582025,
"nonce":3609068752,
"bits":"1c0a0384",
"difficulty":25.56450187425715,
"chainwork":"00000000000000000000000000000000000000000000000000092fc476457b68",
"previousblockhash":"0000000009b11f275067dc7d8398d50c0357f9d0b4d0f64521a5af735d13e897",
"nextblockhash":"0000000000a9baff28a79db2a50e13af8f313138f4568339f58d73eda14a4d51"
}
See also
GET Block/NoTxDetails gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block. The JSON object includes TXIDs for transactions within the block rather than the complete transactions GET block returns.
GetBestBlockHash RPC: returns the header hash of the most recent block on the best blockchain.
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.
GetBlockHash RPC: returns the header hash of a block at the given height in the local best blockchain.
GET Block/NoTxDetails#
The GET block/notxdetails
operation gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block. The JSON object includes TXIDs for transactions within the block rather than the complete transactions GET block returns.
Request
GET /block/notxdetails/<hash>.<format>
Parameter #1—the header hash of the block to retrieve
Name |
Type |
Presence |
Description |
---|---|---|---|
Header Hash |
path (hex) |
Required |
The hash of the header of the block to get, encoded as hex in RPC byte order |
Parameter #2—the output format
Name |
Type |
Presence |
Description |
---|---|---|---|
Format |
suffix |
Required |
Set to |
Response as JSON
Name |
Type |
Presence |
Description |
---|---|---|---|
Result |
object |
Required |
An object containing the requested block |
→ |
string (hex) |
Required |
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 |
→ |
number (int) |
Required |
The number of confirmations the transactions in this block have, starting at 1 when this block is at the tip of the best blockchain. This score will be -1 if the the block is not part of the best blockchain |
→ |
number (int) |
Required |
The size of this block in serialized block format, counted in bytes |
→ |
number (int) |
Required |
The height of this block on its blockchain |
→ |
number (int) |
Required |
This block’s version number. |
→ |
number (int) |
Required |
This block’s version number formatted in hexadecimal. See [BIP9 assignments] |
→ |
string (hex) |
Required |
The merkle root for this block, encoded as hex in RPC byte order |
→ |
array |
Required |
An array containing all transactions in this block. The transactions appear in the array in the same order they appear in the serialized block |
→ → |
string (hex) |
Required |
The TXID of a transaction in this block, encoded as hex in RPC byte order |
→ |
number (int) |
Required |
The value of the time field in the block header, indicating approximately when the block was created |
→ |
number (int) |
Required |
The median time of the 11 blocks before the most recent block on the blockchain. Used for validating transaction locktime under BIP113 |
→ |
number (int) |
Required |
The nonce which was successful at turning this particular block into one that could be added to the best blockchain |
→ |
string (hex) |
Required |
The value of the nBits field in the block header, indicating the target threshold this block’s header had to pass |
→ |
number (real) |
Required |
The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0 |
→ |
string (hex) |
Required |
The estimated number of block header hashes miners had to check from the genesis block to this block, encoded as big-endian hex |
→ |
string (hex) |
Required |
The hash of the header of the previous block, encoded as hex in RPC byte order |
→ |
string (hex) |
Optional |
The hash of the next block on the best blockchain, if known, encoded as hex in RPC byte order |
Examples from Dimecoin Core 2.3.0.0
Request a block in hex-encoded serialized block format:
curl http://localhost:11931/rest/block/notxdetails/0000000000ccbf46cf6b78827ac1019f82598be839bce08bff00d188e75fb451.hex
Result (wrapped):
0000002097e8135d73afa52145f6d0b4d0f957030cd598837ddc6750271fb109\
000000008478305a7abf2f7cb21a889fb68d53c3e51685349e18e1b104b5956c\
100bfea2c72d285a84030a1cd0041ed701010000000100000000000000000000\
00000000000000000000000000000000000000000000ffffffff13037a94000e\
2f5032506f6f6c2d74444153482fffffffff06a1f9ef04000000001976a91414\
e3832cd7192ffb358a31d842636c4db8dfb1ac88ac6c357f3c000000001976a9\
149262f2289e1f021dca954d8cf07a7ad72c2cc24d88ac31f49e010000000019\
76a914d93f7ffa324b77d361e89a3c9c8df46ccdb4b39288ac40230e43000000\
001976a914c4541983721b26ada79770bf22de4885e19f566188ac0200000000\
0000004341047559d13c3f81b1fadbd8dd03e4b5a1c73b05e2b980e00d467aa9\
440b29c7de23664dde6428d75cafed22ae4f0d302e26c5c5a5dd4d3e1b796d72\
81bdc9430f35ac00000000000000002a6a28c855abe6461b1003ea36feb88a3b\
d50c5696e5784d11f8cd5e892978685de1d6000000000100000000000000
Get the same block in JSON:
curl http://localhost:11931/rest/block/notxdetails/0000000000ccbf46cf6b78827ac1019f82598be839bce08bff00d188e75fb451.json
Result (whitespace added):
{
"hash":"0000000000ccbf46cf6b78827ac1019f82598be839bce08bff00d188e75fb451",
"confirmations":55,
"size":414,
"height":38010,
"version":536870912,
"merkleroot":"a2fe0b106c95b504b1e1189e348516e5c3538db69f881ab27c2fbf7a5a307884",
"tx":[
"a2fe0b106c95b504b1e1189e348516e5c3538db69f881ab27c2fbf7a5a307884"
],
"time":1512582599,
"mediantime":1512582025,
"nonce":3609068752,
"bits":"1c0a0384",
"difficulty":25.56450187425715,
"chainwork":"00000000000000000000000000000000000000000000000000092fc476457b68",
"previousblockhash":"0000000009b11f275067dc7d8398d50c0357f9d0b4d0f64521a5af735d13e897",
"nextblockhash":"0000000000a9baff28a79db2a50e13af8f313138f4568339f58d73eda14a4d51"
}
See also
GET Block: gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block.
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.
GetBlockHash RPC: returns the header hash of a block at the given height in the local best blockchain.
GetBestBlockHash RPC: returns the header hash of the most recent block on the best blockchain.
GET ChainInfo#
The GET chaininfo
operation returns information about the current state of the blockchain. Supports only json
as output format.
Request
GET /chaininfo.json
Parameters: none
Response as JSON
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
Information about the current state of the local blockchain |
→ |
string |
Required |
The name of the blockchain. One of |
→ |
number (int) |
Required |
The number of validated blocks in the local best blockchain. For a new node with just the hardcoded genesis block, this will be 0 |
→ |
number (int) |
Required |
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 |
→ |
string (hex) |
Required |
The hash of the header of the highest validated block in the best blockchain, encoded as hex in RPC byte order. This is identical to the string returned by the |
→ |
number (real) |
Required |
The difficulty of the highest-height block in the best blockchain |
→ |
number (int) |
Required |
The median time of the 11 blocks before the most recent block on the blockchain. Used for validating transaction locktime under BIP113 |
→ |
number (real) |
Required (exactly 1) |
Estimate of what percentage of the blockchain 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 |
→ |
string (hex) |
Required |
The estimated number of block header hashes checked from the genesis block to this block, encoded as big-endian hex |
→ |
bool |
Required |
Indicates if the blocks are subject to pruning |
→ |
number (int) |
Optional |
The lowest-height complete block stored if pruning is activated not applicable to dimecoin post block 5000000 |
→ |
array |
Required |
An array of objects each describing a current or previous soft fork |
→ → |
object |
Required |
A specific softfork |
→ → → |
string |
Required |
The name of the softfork |
→ → → |
numeric |
Required |
The block version used for the softfork |
→ → → |
string : object |
Optional |
The progress toward enforcing the softfork rules for new-version blocks |
→ → → → |
bool |
Required |
Indicates if the threshold was reached |
→ → → → |
numeric |
Optional |
Number of blocks that support the softfork |
→ → → → |
numeric |
Optional |
Number of blocks that are required to reach the threshold |
→ → → → |
numeric |
Optional |
The maximum size of examined window of recent blocks |
→ → → |
object |
Optional |
The progress toward enforcing the softfork rules for new-version blocks |
→ → → → |
bool |
Optional |
Indicates if the threshold was reached |
→ → → → |
numeric |
Optional |
Number of blocks that support the softfork |
→ → → → |
numeric |
Optional |
Number of blocks that are required to reach the threshold |
→ → → → |
numeric |
Optional |
The maximum size of examined window of recent blocks |
→ |
object |
Required |
The status of BIP9 softforks in progress |
→ → |
string : object |
Required |
A specific BIP9 softfork |
→ → → |
string |
Required |
Set to one of the following reasons: |
Examples from Dimecoin Core 2.3.0.0
Get blockchain info in JSON:
curl http://localhost:11931/rest/chaininfo.json
Result (whitespace added):
{
"chain":"test",
"blocks":38066,
"headers":38066,
"bestblockhash":"0000000006c6f812d4721c09b3a3ce6547d2291ff822ee39597515f75822ed3e",
"difficulty":18.8278810867833,
"mediantime":1512591324,
"verificationprogress":0.9999996159024219,
"chainwork":"00000000000000000000000000000000000000000000000000093549c2729cb1",
"pruned":false,
"softforks":[
{
"id":"bip34",
"version":2,
"enforce":{
"status":true,
"found":100,
"required":51,
"window":100
},
"reject":{
"status":true,
"found":100,
"required":75,
"window":100
}
},
{
"id":"bip66",
"version":3,
"enforce":{
"status":true,
"found":100,
"required":51,
"window":100
},
"reject":{
"status":true,
"found":100,
"required":75,
"window":100
}
},
{
"id":"bip65",
"version":4,
"enforce":{
"status":true,
"found":100,
"required":51,
"window":100
},
"reject":{
"status":true,
"found":100,
"required":75,
"window":100
}
}
],
"bip9_softforks":[
{
"id":"csv",
"status":"active"
}
]
}
See also
GetBlockChainInfo RPC: provides information about the current state of the blockchain.
GET GetUtxos#
The GET getutxos
operation returns an UTXO set given a set of outpoints.
Request
GET /getutxos/<checkmempool>/<txid>-<n>/<txid>-<n>/.../<txid>-<n>.<bin|hex|json>
Parameter #1—Include memory pool transactions
Name |
Type |
Presence |
Description |
---|---|---|---|
Check mempool |
string |
Optional |
Set to |
Parameter #2—List of Outpoints
Name |
Type |
Presence |
Description |
---|---|---|---|
Outpoint |
vector |
Required |
The list of outpoints to be queried. Each outpoint is the TXID of the transaction, encoded as hex in RPC byte order with an additional |
Parameter #3—the output format
Name |
Type |
Presence |
Description |
---|---|---|---|
Format |
suffix |
Required |
Set to |
Response as JSON
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
The requested UTXO set |
→→ |
number (int) |
Required |
The height of the chain at the moment the result was calculated |
→ |
number (int) |
Required |
The block hash of the top of the chain at the moment the result was calculated |
→ |
number (int) |
Required |
Whether each requested output was found in the UTXO set or not. A |
→ |
array |
Required |
An array of objects each describing an outpoint that is unspent |
→→ |
object |
Optional |
A UTXO match based on the query |
→→→ |
number (int) |
Required |
The version number of the transaction the UTXO was found in |
→ |
number (int) |
Required (exactly 1) |
The height of the block containing the defining transaction, or 0x7FFFFFFF if the tx is in the mempool |
→ → → |
number (int) |
Required |
The value of the transaction |
→ → → |
object |
Required |
An object describing the pubkey script |
→ → → → |
string |
Required |
The pubkey script in decoded form with non-data-pushing opcodes listed |
→ → → → |
string (hex) |
Required |
The pubkey script encoded as hex |
→ → → → |
number (int) |
Optional |
The number of signatures required; this is always |
→ → → → |
string |
Optional |
The type of script. This will be one of the following: |
→ → → → |
string : array |
Optional |
Array of 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 |
→ → → → → |
string |
Required |
A P2PKH or P2SH address |
Examples from Dimecoin Core 2.3.0.0
Request the UTXO set:
curl http://localhost:11931/rest/getutxos/checkmempool/7b6caf68c33794b0bda65e63691739919f13156b57c7ec20a0b4de1f33c580bd-0.hex
Result (wrapped):
c39400005ac8db505390f3c77635132117a7fdf07b2eb45c3d9fe38535b77b05\
0000000001010101000000c394000050ae3b16000000001976a9146f4def95a3\
15e83bef5e1197ace4aa7ec55f2ecc88ac
Same request in JSON:
curl http://localhost:11931/rest/getutxos/checkmempool/7b6caf68c33794b0bda65e63691739919f13156b57c7ec20a0b4de1f33c580bd-0.json
Result (whitespace added):
{
"chainHeight":38083,
"chaintipHash":"00000000057bb73585e39f3d5cb42e7bf0fda71721133576c7f3905350dbc85a",
"bitmap":"1",
"utxos":[
{
"txvers":1,
"height":38083,
"value":3.73010000,
"scriptPubKey":{
"asm":"OP_DUP OP_HASH160 6f4def95a315e83bef5e1197ace4aa7ec55f2ecc OP_EQUALVERIFY OP_CHECKSIG",
"hex":"76a9146f4def95a315e83bef5e1197ace4aa7ec55f2ecc88ac",
"reqSigs":1,
"type":"pubkeyhash",
"addresses":[
"7yWTyDaMb1KZSRYwrq2DDW3Q4rKYuuPutDS"
]
}
}
]
}
See also
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.
GET Headers#
The GET headers
operation returns a specified amount of block headers in upward direction.
Request
GET /headers/<count>/<hash>.<format>
Parameter #1—the amount of block headers to retrieve
Name |
Type |
Presence |
Description |
---|---|---|---|
Amount |
number (int) |
Required |
The amount of block headers in upward direction to return (including the start header hash) |
Parameter #2—the header hash of the block to retrieve
Name |
Type |
Presence |
Description |
---|---|---|---|
Header Hash |
path (hex) |
Required |
The hash of the header of the block to get, encoded as hex in RPC byte order |
Parameter #3—the output format
Name |
Type |
Presence |
Description |
---|---|---|---|
Format |
suffix |
Required |
Set to |
Response as JSON
Name |
Type |
Presence |
Description |
---|---|---|---|
Result |
array |
Required |
An array containing the requested block headers |
→ |
object |
Required |
An object containing a block header. The amount of the objects is the same as the amount provided in parameter #1 |
→→ |
string (hex) |
Required |
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 #2 |
→→ |
number (int) |
Required |
The number of confirmations the transactions in this block have, starting at 1 when this block is at the tip of the best blockchain. This score will be -1 if the the block is not part of the best blockchain |
→→ |
number (int) |
Required |
The height of this block on its blockchain |
→→ |
number (int) |
Required |
This block’s version number. |
→→ |
string (hex) |
Required |
The merkle root for this block, encoded as hex in RPC byte order |
→→ |
number (int) |
Required |
The value of the time field in the block header, indicating approximately when the block was created |
→→ |
number (int) |
Required |
The median time of the 11 blocks before the most recent block on the blockchain. Used for validating transaction locktime under BIP113 |
→→ |
number (int) |
Required |
The nonce which was successful at turning this particular block into one that could be added to the best blockchain |
→→ |
string (hex) |
Required |
The value of the nBits field in the block header, indicating the target threshold this block’s header had to pass |
→→ |
number (real) |
Required |
The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0 |
→→ |
string (hex) |
Required |
The estimated number of block header hashes miners had to check from the genesis block to this block, encoded as big-endian hex |
→→ |
string (hex) |
Required |
The hash of the header of the previous block, encoded as hex in RPC byte order |
→→ |
string (hex) |
Optional |
The hash of the next block on the best blockchain, if known, encoded as hex in RPC byte order |
Examples from Dimecoin Core 2.3.0.0
Request 2 block headers in hex-encoded serialized block format:
curl http://localhost:11931/rest/headers/2/0000000000ccbf46cf6b78827ac1019f82598be839bce08bff00d188e75fb451.hex
Result (wrapped):
0000002097e8135d73afa52145f6d0b4d0f957030cd598837ddc6750271fb109\
000000008478305a7abf2f7cb21a889fb68d53c3e51685349e18e1b104b5956c\
100bfea2c72d285a84030a1cd0041ed70000002051b45fe788d100ff8be0bc39\
e88b59829f01c17a82786bcf46bfcc000000000004dc24bddd15f790efcd7af3\
8d03f805cc1c74516888ccec8874db2ac8beb043092e285a999f091c5d6ec419
Get the same block headers in JSON:
curl http://localhost:11931/rest/headers/2/0000000000ccbf46cf6b78827ac1019f82598be839bce08bff00d188e75fb451.json
Result (whitespace added):
[
{
"hash":"0000000000ccbf46cf6b78827ac1019f82598be839bce08bff00d188e75fb451",
"confirmations":80,
"height":38010,
"version":536870912,
"merkleroot":"a2fe0b106c95b504b1e1189e348516e5c3538db69f881ab27c2fbf7a5a307884",
"time":1512582599,
"mediantime":1512582025,
"nonce":3609068752,
"bits":"1c0a0384",
"difficulty":25.56450187425715,
"chainwork":"00000000000000000000000000000000000000000000000000092fc476457b68",
"previousblockhash":"0000000009b11f275067dc7d8398d50c0357f9d0b4d0f64521a5af735d13e897",
"nextblockhash":"0000000000a9baff28a79db2a50e13af8f313138f4568339f58d73eda14a4d51"
},
{
"hash":"0000000000a9baff28a79db2a50e13af8f313138f4568339f58d73eda14a4d51",
"confirmations":79,
"height":38011,
"version":536870912,
"merkleroot":"43b0bec82adb7488eccc886851741ccc05f8038df37acdef90f715ddbd24dc04",
"time":1512582665,
"mediantime":1512582146,
"nonce":432303709,
"bits":"1c099f99",
"difficulty":26.60134045579303,
"chainwork":"00000000000000000000000000000000000000000000000000092fdf1051882b",
"previousblockhash":"0000000000ccbf46cf6b78827ac1019f82598be839bce08bff00d188e75fb451",
"nextblockhash":"0000000008de9da638149042323fc05ded619a922ff1fac6e66f66fc773bd716"
}
]
See also
GET Block/NoTxDetails gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block. The JSON object includes TXIDs for transactions within the block rather than the complete transactions GET block returns.
GetBlockHash RPC: returns the header hash of a block at the given height in the local best blockchain.
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.
GET MemPool/Contents#
The GET mempool/contents
operation returns all transaction in the memory pool with detailed information. Supports only json
as output format.
Request
GET /mempool/contents.json
Parameters: none
Result as JSON
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
A object containing transactions currently in the memory pool. May be empty |
→ |
string : object |
Optional |
The TXID of a transaction in the memory pool, encoded as hex in RPC byte order |
→ → |
number (int) |
Required |
The size of the serialized transaction in bytes |
→ → |
number (dimecoins) |
Required |
The transaction fee paid by the transaction in decimal dimecoins |
→ → |
number (dimecoins) |
Required |
The transaction fee with fee deltas used for mining priority in decimal dimecoins |
→ → |
number (int) |
Required |
The time the transaction entered the memory pool, Unix epoch time format |
→ → |
number (int) |
Required |
The block height when the transaction entered the memory pool |
→ → |
number (int) |
Required |
The priority of the transaction when it first entered the memory pool |
→ → |
number (int) |
Required |
The current priority of the transaction |
→ → |
number (int) |
Required |
The number of in-mempool descendant transactions (including this one) |
→ → |
number (int) |
Required |
The size of in-mempool descendants (including this one) |
→ → |
number (int) |
Required |
The modified fees (see |
→ → |
array |
Required |
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 |
→ → → |
string |
Optional (0 or more) |
The TXIDs of any unconfirmed transactions this transaction depends upon, encoded as hex in RPC byte order |
Examples from Dimecoin Core 2.3.0.0
Get all transactions in the memory pool in JSON:
curl http://localhost:11931/rest/mempool/contents.json
Result (whitespace added):
{
"b06edec446fbcc0fc04a6e2774a843823f5238c2e15de40e61767a44f6788d32":{
"size":225,
"fee":0.00010000,
"modifiedfee":0.00010000,
"time":1512596309,
"height":38094,
"startingpriority":1934576927.410256,
"currentpriority":1934576927.410256,
"descendantcount":1,
"descendantsize":225,
"descendantfees":10000,
"depends":[
]
}
}
See also
GET MemPool/Info: returns information about the node’s current transaction memory pool.
GetMemPoolInfo RPC: returns information about the node’s current transaction memory pool.
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.
GET MemPool/Info#
The GET mempool/info
operation returns information about the node’s current transaction memory pool. Supports only json
as output format.
Request
GET /mempool/info.json
Parameters: none
Result as JSON
Name |
Type |
Presence |
Description |
---|---|---|---|
|
object |
Required |
A object containing information about the memory pool |
→ |
number (int) |
Required |
The number of transactions currently in the memory pool |
→ |
number (int) |
Required |
The total number of bytes in the transactions in the memory pool |
→ |
number (int) |
Required |
Total memory usage for the mempool in bytes |
→ |
number (int) |
Required |
Maximum memory usage for the mempool in bytes |
→ |
number (int) |
Required |
The lowest fee per kilobyte paid by any transaction in the memory pool |
Examples from Dimecoin Core 2.3.0.0
Get memory pool info in JSON:
curl http://localhost:11931/rest/mempool/info.json
Result (whitespace added):
{
"size":1,
"bytes":1256,
"usage":3376,
"maxmempool":300000000,
"mempoolminfee":0.00000000
}
See also
GET MemPool/Contents: returns all transaction in the memory pool with detailed information.
GetMemPoolInfo RPC: returns information about the node’s current transaction memory pool.
GET Tx#
The GET tx
operation gets a hex-encoded serialized transaction or a JSON object describing the transaction. By default, Dimecoin Core only stores complete transaction data for UTXOs and your own transactions, so this method may fail on historic transactions unless you use the non-default txindex=1
in your Dimecoin Core startup settings.
Note
If you begin using txindex=1
after downloading the blockchain, you must rebuild your indexes by starting Dimecoin Core with the option -reindex
. This may take several hours to complete, during which time your node will not process new blocks or transactions. This reindex only needs to be done once.
Request
GET /tx/<txid>.<format>
Parameter #1—the TXID of the transaction to retrieve
Name |
Type |
Presence |
Description |
---|---|---|---|
TXID |
path (hex) |
Required |
The TXID of the transaction to get, encoded as hex in RPC byte order |
Parameter #2—the output format
Name |
Type |
Presence |
Description |
---|---|---|---|
Format |
suffix |
Required |
Set to |
Response as JSON
Name |
Type |
Presence |
Description |
---|---|---|---|
Result |
object |
Required |
An object describing the request transaction |
→ |
string (hex) |
Required |
The transaction’s TXID encoded as hex in RPC byte order |
→ |
number (int) |
Required |
The serialized transaction size |
→ |
number (int) |
Required |
The transaction format version number |
→ |
number (int) |
Required |
Added in Dimecoin Core 0.13.0.0 |
→ |
number (int) |
Required |
The transaction’s locktime: either a Unix epoch date or block height; see the locktime parsing rules |
→ |
array |
Required |
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 |
→ → |
object |
Required |
An object describing one of this transaction’s inputs. May be a regular input or a coinbase |
→ → → |
string |
Optional |
The TXID of the outpoint being spent, encoded as hex in RPC byte order. Not present if this is a coinbase transaction |
→ → → |
number (int) |
Optional |
The output index number (vout) of the outpoint being spent. The first output in a transaction has an index of |
→ → → |
object |
Optional |
An object describing the signature script of this input. Not present if this is a coinbase transaction |
→ → → → |
string |
Required |
The signature script in decoded form with non-data-pushing opcodes listed |
→ → → → |
string (hex) |
Required |
The signature script encoded as hex |
→ → → |
string (hex) |
Optional |
The coinbase (similar to the hex field of a scriptSig) encoded as hex. Only present if this is a coinbase transaction |
→ → → |
number (DIME) |
Optional |
The number of DIME paid to this output. May be |
→ → → |
number (mDIME) |
Optional |
The number of mDIME paid to this output. May be |
→ → → → |
string : array |
Optional |
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 |
→ → → → → |
string |
Required |
A P2PKH or P2SH address |
→ → → |
number (int) |
Required |
The input sequence number |
→ |
array |
Required |
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 |
→ → |
object |
Required |
An object describing one of this transaction’s outputs |
→ → → |
number (DIME) |
Required |
The number of DIME paid to this output. May be |
→ → → |
number (mDIME) |
Required |
The number of mDIME paid to this output. May be |
→ → → |
number (int) |
Required |
The output index number of this output within this transaction |
→ → → |
object |
Required |
An object describing the pubkey script |
→ → → → |
string |
Required |
The pubkey script in decoded form with non-data-pushing opcodes listed |
→ → → → |
string (hex) |
Required |
The pubkey script encoded as hex |
→ → → → |
number (int) |
Optional |
The number of signatures required; this is always |
→ → → → |
string |
Optional |
The type of script. This will be one of the following: |
→ → → → |
string : array |
Optional |
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 |
→ → → → → |
string |
Required |
A P2PKH or P2SH address |
→ |
number (int) |
Optional |
Added in Dimecoin Core 0.13.0.0 |
→ |
string (hex) |
Optional |
Added in Dimecoin Core 0.13.0.0 |
→ |
string (hex) |
Optional |
If the transaction has been included in a block on the local best blockchain, this is the hash of that block encoded as hex in RPC byte order |
→ |
number (int) |
Required |
The height of this block on its blockchain |
→ |
number (int) |
Required |
If the transaction has been included in a block on the local best blockchain, this is how many confirmations it has. Otherwise, this is |
→ |
number (int) |
Optional |
If the transaction has been included in a block on the local best blockchain, this is the block header time of that block (may be in the future) |
→ |
number (int) |
Optional |
This field is currently identical to the time field described above |
Examples from Dimecoin Core 2.3.0.0
Request a transaction in hex-encoded serialized transaction format:
curl http://localhost:11931/rest/tx/b06edec446fbcc0fc04a6e2774a843823f5238c2e15de40e61767a44f6788d32.hex
Result (wrapped):
0100000001c91d4bb14e061f8f6b775ca8e62ec8a66739b375f169bce1964cee\
a2368197e5000000006a473044022050644e406be3e463d94868c617309dc021\
174551dbb340665f48119e110a72b2022022f3cc93deeb4c44ce70bebe8e7f0f\
69c462f120eb64b47eeb77f0a62e9bd361012102f542dde7c155717ac8df05d0\
fc8f65e2ecc078ecad42b23462f27832b441ffa5feffffff0200e1f505000000\
001976a91443d11ad5889532f22f069b18b24489b1f94f253188ac7dbafa0800\
0000001976a914bb900427682b8f7cae6779fb955a610ff71d68c888acce940000
Get the same transaction in JSON:
curl http://localhost:11931/rest/tx/b06edec446fbcc0fc04a6e2774a843823f5238c2e15de40e61767a44f6788d32.json
Result (whitespace added):
{
"txid":"b06edec446fbcc0fc04a6e2774a843823f5238c2e15de40e61767a44f6788d32",
"size":225,
"version":1,
"locktime":38094,
"vin":[
{
"txid":"e5978136a2ee4c96e1bc69f175b33967a6c82ee6a85c776b8f1f064eb14b1dc9",
"vout":0,
"scriptSig":{
"asm":"3044022050644e406be3e463d94868c617309dc021174551dbb340665f48119e110a72b2022022f3cc93deeb4c44ce70bebe8e7f0f69c462f120eb64b47eeb77f0a62e9bd361[ALL] 02f542dde7c155717ac8df05d0fc8f65e2ecc078ecad42b23462f27832b441ffa5",
"hex":"473044022050644e406be3e463d94868c617309dc021174551dbb340665f48119e110a72b2022022f3cc93deeb4c44ce70bebe8e7f0f69c462f120eb64b47eeb77f0a62e9bd361012102f542dde7c155717ac8df05d0fc8f65e2ecc078ecad42b23462f27832b441ffa5"
},
"sequence":4294967294
}
],
"vout":[
{
"value":1.00000,
"valueSat":100000,
"n":0,
"scriptPubKey":{
"asm":"OP_DUP OP_HASH160 43d11ad5889532f22f069b18b24489b1f94f2531 OP_EQUALVERIFY OP_CHECKSIG",
"hex":"76a91443d11ad5889532f22f069b18b24489b1f94f253188ac",
"reqSigs":1,
"type":"pubkeyhash",
"addresses":[
"ySW2cuvm2wJ4EU5KzX4waYfFPV3xQni6Nm"
]
}
},
{
"value":1.50649,
"valueSat":150649,
"n":1,
"scriptPubKey":{
"asm":"OP_DUP OP_HASH160 bb900427682b8f7cae6779fb955a610ff71d68c8 OP_EQUALVERIFY OP_CHECKSIG",
"hex":"76a914bb900427682b8f7cae6779fb955a610ff71d68c888ac",
"reqSigs":1,
"type":"pubkeyhash",
"addresses":[
"ydRBjVr78ejCqXuGs2wbtYoFpGbDkqV8V4"
]
}
}
],
"blockhash":"0000000003b6a57e3614176e5b93caf9498009853e06d16028ebffeb361afda5",
"height":38095,
"confirmations":9,
"time":1512596315,
"blocktime":1512596315
}
See also
GetRawTransaction RPC: gets a hex-encoded serialized transaction or a JSON object describing the transaction. By default, Dimecoin 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 Dimecoin Core startup settings.GetTransaction RPC: gets detailed information about an in-wallet transaction.