mirror of
https://github.com/seigler/dash-docs
synced 2025-07-28 10:16:15 +00:00
Dev Docs: Use Sed To Convert Tables To YAML
Run sed -i -f <this_file.sed> _includes/ref/bitcoin-core/rpcs/rpcs/* _includes/ref/bitcoin-core/rest/requests/get_* _includes/helpers/vars.md ## On lines that start with a pipe: /^|/ { ## Delete all table header/table body divider lines /|----/d; ## Escape all double quotes s/"/\\"/g; ## Replace lines that look like NTPD headers with a itemplate start block s/^| Name *| Type.*/{% itemplate ntpd1 %}/; ## Delete extraneous whitespace s/ *|/|/g; ## Replace the first pipe with "- name:" plus a start quote s/^| */- n: "/; ## Replace the remaining pipes, starting each one with a newline and two spaces s/| */"\n t: "/; s/| */"\n p: "/; s/| */"\n d: "/; ## Add a close quote and an empty line after the last list item ## built from a single table row, except for the header row. This ## improves readability/maintainability /[^}]$/s/$/"\n/; } ## Replace the old table class with the itemplate close tag s/{:.ntpd}/{% enditemplate %}/
This commit is contained in:
parent
79fd671e90
commit
2c44b59d88
83 changed files with 3067 additions and 1136 deletions
|
@ -21,39 +21,108 @@ GET /block/notxdetails/<hash>.<format>
|
|||
|
||||
*Parameter #1---the header hash of the block to retrieve*
|
||||
|
||||
| Name | Type | Presence | Description
|
||||
|------------------|--------------|-----------------------------|----------------
|
||||
| Header Hash | path (hex) | Required<br>(exactly 1) | The hash of the header of the block to get, encoded as hex in RPC byte order
|
||||
{:.ntpd}
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "Header Hash"
|
||||
t: "path (hex)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The hash of the header of the block to get, encoded as hex in RPC byte order"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Parameter #2---the output format*
|
||||
|
||||
| Name | Type | Presence | Description
|
||||
|------------------|--------------|-----------------------------|----------------
|
||||
| Format | suffix | Required<br>(exactly 1) | Set to `.json` for decoded block contents in JSON, or `.bin` or `hex` for a serialized block in binary or hex
|
||||
{:.ntpd}
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "Format"
|
||||
t: "suffix"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "Set to `.json` for decoded block contents in JSON, or `.bin` or `hex` for a serialized block in binary or hex"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Response as JSON*
|
||||
|
||||
| Name | Type | Presence | Description
|
||||
|--------------------------|-------------------|-----------------------------|----------------
|
||||
| Result | object | Required<br>(exactly 1) | An object containing the requested block
|
||||
| →<br>`hash` | string (hex) | Required<br>(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
|
||||
| →<br>`confirmations` | number (int) | Required<br>(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
|
||||
| →<br>`size` | number (int) | Required<br>(exactly 1) | The size of this block in serialized block format, counted in bytes
|
||||
| →<br>`height` | number (int) | Required<br>(exactly 1) | The height of this block on its block chain
|
||||
| →<br>`version` | number (int) | Required<br>(exactly 1) | This block's version number. See [block version numbers][section block versions]
|
||||
| →<br>`merkleroot` | string (hex) | Required<br>(exactly 1) | The merkle root for this block, encoded as hex in RPC byte order
|
||||
| →<br>`tx` | array | Required<br>(exactly 1) | An array containing all transactions in this block. The transactions appear in the array in the same order they appear in the serialized block
|
||||
| → →<br>TXID | string (hex) | Required<br>(1 or more) | The TXID of a transaction in this block, encoded as hex in RPC byte order
|
||||
| →<br>`time` | number (int) | Required<br>(exactly 1) | The value of the *time* field in the block header, indicating approximately when the block was created
|
||||
| →<br>`nonce` | number (int) | Required<br>(exactly 1) | The nonce which was successful at turning this particular block into one that could be added to the best block chain
|
||||
| →<br>`bits` | string (hex) | Required<br>(exactly 1) | The value of the *nBits* field in the block header, indicating the target threshold this block's header had to pass
|
||||
| →<br>`difficulty` | number (real) | Required<br>(exactly 1) | The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0
|
||||
| →<br>`chainwork` | string (hex) | Required<br>(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
|
||||
| →<br>`previousblockhash` | string (hex) | Required<br>(exactly 1) | The hash of the header of the previous block, encoded as hex in RPC byte order
|
||||
| →<br>`nextblockhash` | string (hex) | Optional<br>(0 or 1) | The hash of the next block on the best block chain, if known, encoded as hex in RPC byte order
|
||||
{:.ntpd}
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "Result"
|
||||
t: "object"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "An object containing the requested block"
|
||||
|
||||
- n: "→<br>`hash`"
|
||||
t: "string (hex)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "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"
|
||||
|
||||
- n: "→<br>`confirmations`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "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"
|
||||
|
||||
- n: "→<br>`size`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The size of this block in serialized block format, counted in bytes"
|
||||
|
||||
- n: "→<br>`height`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The height of this block on its block chain"
|
||||
|
||||
- n: "→<br>`version`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "This block's version number. See [block version numbers][section block versions]"
|
||||
|
||||
- n: "→<br>`merkleroot`"
|
||||
t: "string (hex)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The merkle root for this block, encoded as hex in RPC byte order"
|
||||
|
||||
- n: "→<br>`tx`"
|
||||
t: "array"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "An array containing all transactions in this block. The transactions appear in the array in the same order they appear in the serialized block"
|
||||
|
||||
- n: "→ →<br>TXID"
|
||||
t: "string (hex)"
|
||||
p: "Required<br>(1 or more)"
|
||||
d: "The TXID of a transaction in this block, encoded as hex in RPC byte order"
|
||||
|
||||
- n: "→<br>`time`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The value of the *time* field in the block header, indicating approximately when the block was created"
|
||||
|
||||
- n: "→<br>`nonce`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The nonce which was successful at turning this particular block into one that could be added to the best block chain"
|
||||
|
||||
- n: "→<br>`bits`"
|
||||
t: "string (hex)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The value of the *nBits* field in the block header, indicating the target threshold this block's header had to pass"
|
||||
|
||||
- n: "→<br>`difficulty`"
|
||||
t: "number (real)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0"
|
||||
|
||||
- n: "→<br>`chainwork`"
|
||||
t: "string (hex)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The estimated number of block header hashes miners had to check from the genesis block to this block, encoded as big-endian hex"
|
||||
|
||||
- n: "→<br>`previousblockhash`"
|
||||
t: "string (hex)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The hash of the header of the previous block, encoded as hex in RPC byte order"
|
||||
|
||||
- n: "→<br>`nextblockhash`"
|
||||
t: "string (hex)"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "The hash of the next block on the best block chain, if known, encoded as hex in RPC byte order"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Examples from Bitcoin Core 0.10.0*
|
||||
|
||||
|
|
|
@ -21,43 +21,112 @@ GET /block/<hash>.<format>
|
|||
|
||||
*Parameter #1---the header hash of the block to retrieve*
|
||||
|
||||
| Name | Type | Presence | Description
|
||||
|------------------|--------------|-----------------------------|----------------
|
||||
| Header Hash | path (hex) | Required<br>(exactly 1) | The hash of the header of the block to get, encoded as hex in RPC byte order
|
||||
{:.ntpd}
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "Header Hash"
|
||||
t: "path (hex)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The hash of the header of the block to get, encoded as hex in RPC byte order"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Parameter #2---the output format*
|
||||
|
||||
| Name | Type | Presence | Description
|
||||
|------------------|--------------|-----------------------------|----------------
|
||||
| Format | suffix | Required<br>(exactly 1) | Set to `.json` for decoded block contents in JSON, or `.bin` or `hex` for a serialized block in binary or hex
|
||||
{:.ntpd}
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "Format"
|
||||
t: "suffix"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "Set to `.json` for decoded block contents in JSON, or `.bin` or `hex` for a serialized block in binary or hex"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Response as JSON*
|
||||
|
||||
{% assign DEPTH="→ →" %}
|
||||
{% include helpers/vars.md %}
|
||||
|
||||
| Name | Type | Presence | Description
|
||||
|--------------------------|-------------------|-----------------------------|----------------
|
||||
| Result | object | Required<br>(exactly 1) | An object containing the requested block
|
||||
| →<br>`hash` | string (hex) | Required<br>(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
|
||||
| →<br>`confirmations` | number (int) | Required<br>(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
|
||||
| →<br>`size` | number (int) | Required<br>(exactly 1) | The size of this block in serialized block format, counted in bytes
|
||||
| →<br>`height` | number (int) | Required<br>(exactly 1) | The height of this block on its block chain
|
||||
| →<br>`version` | number (int) | Required<br>(exactly 1) | This block's version number. See [block version numbers][section block versions]
|
||||
| →<br>`merkleroot` | string (hex) | Required<br>(exactly 1) | The merkle root for this block, encoded as hex in RPC byte order
|
||||
| →<br>`tx` | array | Required<br>(exactly 1) | An array containing all transactions in this block. The transactions appear in the array in the same order they appear in the serialized block
|
||||
| → →<br>Transaction | object | Required<br>(1 or more) | An object describing a particular transaction within this block
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "Result"
|
||||
t: "object"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "An object containing the requested block"
|
||||
|
||||
- n: "→<br>`hash`"
|
||||
t: "string (hex)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "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"
|
||||
|
||||
- n: "→<br>`confirmations`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "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"
|
||||
|
||||
- n: "→<br>`size`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The size of this block in serialized block format, counted in bytes"
|
||||
|
||||
- n: "→<br>`height`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The height of this block on its block chain"
|
||||
|
||||
- n: "→<br>`version`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "This block's version number. See [block version numbers][section block versions]"
|
||||
|
||||
- n: "→<br>`merkleroot`"
|
||||
t: "string (hex)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The merkle root for this block, encoded as hex in RPC byte order"
|
||||
|
||||
- n: "→<br>`tx`"
|
||||
t: "array"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "An array containing all transactions in this block. The transactions appear in the array in the same order they appear in the serialized block"
|
||||
|
||||
- n: "→ →<br>Transaction"
|
||||
t: "object"
|
||||
p: "Required<br>(1 or more)"
|
||||
d: "An object describing a particular transaction within this block"
|
||||
|
||||
{{INCLUDE_DECODE_RAW_TRANSACTION}}
|
||||
| →<br>`time` | number (int) | Required<br>(exactly 1) | The value of the *time* field in the block header, indicating approximately when the block was created
|
||||
| →<br>`nonce` | number (int) | Required<br>(exactly 1) | The nonce which was successful at turning this particular block into one that could be added to the best block chain
|
||||
| →<br>`bits` | string (hex) | Required<br>(exactly 1) | The value of the *nBits* field in the block header, indicating the target threshold this block's header had to pass
|
||||
| →<br>`difficulty` | number (real) | Required<br>(exactly 1) | The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0
|
||||
| →<br>`chainwork` | string (hex) | Required<br>(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
|
||||
| →<br>`previousblockhash` | string (hex) | Required<br>(exactly 1) | The hash of the header of the previous block, encoded as hex in RPC byte order
|
||||
| →<br>`nextblockhash` | string (hex) | Optional<br>(0 or 1) | The hash of the next block on the best block chain, if known, encoded as hex in RPC byte order
|
||||
{:.ntpd}
|
||||
- n: "→<br>`time`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The value of the *time* field in the block header, indicating approximately when the block was created"
|
||||
|
||||
- n: "→<br>`nonce`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The nonce which was successful at turning this particular block into one that could be added to the best block chain"
|
||||
|
||||
- n: "→<br>`bits`"
|
||||
t: "string (hex)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The value of the *nBits* field in the block header, indicating the target threshold this block's header had to pass"
|
||||
|
||||
- n: "→<br>`difficulty`"
|
||||
t: "number (real)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0"
|
||||
|
||||
- n: "→<br>`chainwork`"
|
||||
t: "string (hex)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The estimated number of block header hashes miners had to check from the genesis block to this block, encoded as big-endian hex"
|
||||
|
||||
- n: "→<br>`previousblockhash`"
|
||||
t: "string (hex)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The hash of the header of the previous block, encoded as hex in RPC byte order"
|
||||
|
||||
- n: "→<br>`nextblockhash`"
|
||||
t: "string (hex)"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "The hash of the next block on the best block chain, if known, encoded as hex in RPC byte order"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Examples from Bitcoin Core 0.10.0*
|
||||
|
||||
|
|
|
@ -23,32 +23,57 @@ GET /tx/<txid>.<format>
|
|||
|
||||
*Parameter #1---the TXID of the transaction to retrieve*
|
||||
|
||||
| Name | Type | Presence | Description
|
||||
|------------------|--------------|-----------------------------|----------------
|
||||
| TXID | path (hex) | Required<br>(exactly 1) | The TXID of the transaction to get, encoded as hex in RPC byte order
|
||||
{:.ntpd}
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "TXID"
|
||||
t: "path (hex)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The TXID of the transaction to get, encoded as hex in RPC byte order"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Parameter #2---the output format*
|
||||
|
||||
| Name | Type | Presence | Description
|
||||
|------------------|--------------|-----------------------------|----------------
|
||||
| Format | suffix | Required<br>(exactly 1) | Set to `.json` for decoded transaction contents in JSON, or `.bin` or `hex` for a serialized transaction in binary or hex
|
||||
{:.ntpd}
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "Format"
|
||||
t: "suffix"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "Set to `.json` for decoded transaction contents in JSON, or `.bin` or `hex` for a serialized transaction in binary or hex"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Response as JSON*
|
||||
|
||||
{% assign DEPTH="" %}
|
||||
{% include helpers/vars.md %}
|
||||
|
||||
| Name | Type | Presence | Description
|
||||
|----------------------|-----------------|-----------------------------|----------------
|
||||
| Result | object | Required<br>(exactly 1) | An object describing the request transaction
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "Result"
|
||||
t: "object"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "An object describing the request transaction"
|
||||
|
||||
{{INCLUDE_DECODE_RAW_TRANSACTION}}
|
||||
| →<br>`blockhash` | string (hex) | Optional<br>(0 or 1) | If the transaction has been included in a block on the local best block chain, this is the hash of that block encoded as hex in RPC byte order
|
||||
| →<br>`confirmations` | number (int) | Required<br>(exactly 1) | If the transaction has been included in a block on the local best block chain, this is how many confirmations it has. Otherwise, this is `0`
|
||||
| →<br>`time` | number (int) | Optional<br>(0 or 1) | If the transaction has been included in a block on the local best block chain, this is the block header time of that block (may be in the future)
|
||||
| →<br>`blocktime` | number (int) | Optional<br>(0 or 1) | This field is currently identical to the time field described above
|
||||
{:.ntpd}
|
||||
- n: "→<br>`blockhash`"
|
||||
t: "string (hex)"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "If the transaction has been included in a block on the local best block chain, this is the hash of that block encoded as hex in RPC byte order"
|
||||
|
||||
- n: "→<br>`confirmations`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "If the transaction has been included in a block on the local best block chain, this is how many confirmations it has. Otherwise, this is `0`"
|
||||
|
||||
- n: "→<br>`time`"
|
||||
t: "number (int)"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "If the transaction has been included in a block on the local best block chain, this is the block header time of that block (may be in the future)"
|
||||
|
||||
- n: "→<br>`blocktime`"
|
||||
t: "number (int)"
|
||||
p: "Optional<br>(0 or 1)"
|
||||
d: "This field is currently identical to the time field described above"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Examples from Bitcoin Core 0.10.0*
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue