dash-docs/_includes/helpers/vars.md
David A. Harding 9329c69cf8
Dev Docs: Put RPC Tables In Separate CSS Class
Suggested by Saivann: RPC tables with Name/Type/Presence/Description
format are now in .ntpd CSS class so that we can format them specially.

We also change the style of all dev doc tables to replace bold table
headings (thead) with a double-line border-bottom.  This makes the
theads look less like section headings and prevents us from over-using
bold.

Minor: a Makefile warning message has been made more explicit (also
suggested by Saivann) and another Makefile rule was updated to catch
more broken tables.
2014-12-30 16:03:19 -05:00

11 KiB

{% comment %} This file is licensed under the MIT License (MIT) available on http://opensource.org/licenses/MIT. {% endcomment %}

{% capture INCLUDE_F_LIST_TRANSACTIONS %}| {{DEPTH}}
involvesWatchonly | bool | Optional
(0 or 1) | Added in Bitcoin Core 0.10.0

Set to true if the payment involves a watch-only address. Otherwise not returned | {{DEPTH}}
account | string | Required
(exactly 1) | The account which the payment was credited to or debited from. May be an empty string ("") for the default account | {{DEPTH}}
address | string (base58) | Optional
(0 or 1) | The address paid in this payment, which may be someone else's address not belonging to this wallet. May be empty if the address is unknown, such as when paying to a non-standard pubkey script | {{DEPTH}}
category | string | Required
(exactly 1) | Set to one of the following values:
send if sending payment
receive if this wallet received payment in a regular transaction
generate if a matured and spendable coinbase
immature if a coinbase that is not spendable yet
orphan if a coinbase from a block that's not in the local best block chain | {{DEPTH}}
amount | number (bitcoins) | Required
(exactly 1) | A negative bitcoin amount if sending payment; a positive bitcoin amount if receiving payment (including coinbases) | {{DEPTH}}
vout | number (int) | Required
(exactly 1) | Added in Bitcoin Core 0.10.0

For an output, the output index (vout) for this output in this transaction. For an input, the output index for the output being spent in its transaction. Because inputs list the output indexes from previous transactions, more than one entry in the details array may have the same output index | {{DEPTH}}
fee | number (bitcoins) | Optional
(0 or 1) | If sending payment, the fee paid as a negative bitcoins value. May be 0. Not returned if receiving payment{% endcapture %}

{% capture INCLUDE_F_LIST_TRANSACTIONS_F_FULL %}| {{DEPTH}}
confirmations | number (int) | Required
(exactly 1) | The number of confirmations the transaction has received. Will be 0 for unconfirmed and -1 for conflicted | {{DEPTH}}
generated | bool | Optional
(0 or 1) | Set to true if the transaction is a coinbase. Not returned for regular transactions | {{DEPTH}}
blockhash | string (hex) | Optional
(0 or 1) | Only returned for confirmed transactions. The hash of the block on the local best block chain which includes this transaction, encoded as hex in RPC byte order | {{DEPTH}}
blockindex | number (int) | Optional
(0 or 1) | Only returned for confirmed transactions. The block height of the block on the local best block chain which includes this transaction | {{DEPTH}}
blocktime | number (int) | Optional
(0 or 1) | Only returned for confirmed transactions. The block header time (Unix epoch time) of the block on the local best block chain which includes this transaction | {{DEPTH}}
txid | string (hex) | Required
(exactly 1) | The TXID of the transaction, encoded as hex in RPC byte order | {{DEPTH}}
walletconflicts | array | Required
(exactly 1) | An array containing the TXIDs of other transactions that spend the same inputs (UTXOs) as this transaction. Array may be empty | {{DEPTH}}→
TXID | string (hex) | Optional
(0 or more) | The TXID of a conflicting transaction, encoded as hex in RPC byte order | {{DEPTH}}
time | number (int) | Required
(exactly 1) | A Unix epoch time when the transaction was added to the wallet | {{DEPTH}}
timerecived | number (int) | Required
(exactly 1) | A Unix epoch time when the transaction was detected by the local node, or the time of the block on the local best block chain that included the transaction | {{DEPTH}}
comment | string | Optional
(0 or 1) | For transaction originating with this wallet, a locally-stored comment added to the transaction. Only returned if a comment was added | {{DEPTH}}
to | string | Optional
(0 or 1) | For transaction originating with this wallet, a locally-stored comment added to the transaction identifying who the transaction was sent to. Only returned if a comment-to was added{% endcapture %}

{% capture INCLUDE_SPEND_CONFIRMATIONS %}| Name | Type | Presence | Description |--------------------|-----------------|-----------------------------|--------------- | Confirmations | number (int) | Optional
(0 or 1) | The minimum number of confirmations an incoming transaction must have for its outputs to be credited to this account's balance. Outgoing transactions are always counted, as are move transactions made with the move RPC. If an account doesn't have a balance high enough to pay for this transaction, the payment will be rejected. Use 0 to spend unconfirmed incoming payments. Default is 1 {:.ntpd}

Warning icon Warning: if account1 receives an unconfirmed payment and transfers it to account2 with the move RPC, account2 will be able to spend those bitcoins even if this parameter is set to 1 or higher.{% endcapture %}

{% capture INCLUDE_DECODE_RAW_TRANSACTION %}| →
txid | string (hex) | Required
(exactly 1) | The transaction's TXID encoded as hex in RPC byte order | →
version | number (int) | Required
(exactly 1) | The transaction format version number | →
locktime | number (int) | Required
(exactly 1) | The transaction's locktime: either a Unix epoch date or block height; see the [Locktime parsing rules][] | →
vin | array | Required
(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 | object | Required
(1 or more) | An object describing one of this transaction's inputs. May be a regular input or a coinbase | → → →
txid | string | Optional
(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 | object | Optional
(0 or 1) | An object describing the signature script of this input. Not present if this is a coinbase transaction | → → → →
asm | string | Required
(exactly 1) | The signature script in decoded form with non-data-pushing op codes 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 | → → →
sequence | number (int) | Required
(exactly 1) | The input sequence number | →
vout | array | Required
(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 | object | Required
(1 or more) | An object describing one of this transaction's outputs | → → →
value | number (bitcoins) | Required
(exactly 1) | The number of bitcoins paid to this output. May be 0 | → → →
n | number (int) | Required
(exactly 1) | The output index number of this output within this transaction | → → →
scriptPubKey | object | Required
(exactly 1) | An object describing the pubkey script | → → → →
asm | string | Required
(exactly 1) | The pubkey script in decoded form with non-data-pushing op codes 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 | string | Optional
(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 : array | Optional
(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 | string | Required
(1 or more) | A P2PKH or P2SH address{% endcapture %}

{% assign INCLUDE_WALLET_UNLOCKED="If the wallet has been encrypted either through the GUI or with the encryptwallet RPC, it must first be unlocked with the walletpassphrase RPC" %}

{% capture INCLUDE_CONFIRMATIONS_PARAMETER %}| Name | Type | Presence | Description |--------------------|-----------------|-----------------------------|---------------- | Confirmations | number (int) | Optional
(0 or 1) | The minimum number of confirmations an externally-generated transaction must have before it is counted towards the balance. Transactions generated by this node are counted immediately. Typically, externally-generated transactions are payments to this wallet and transactions generated by this node are payments to other wallets. Use 0 to count unconfirmed transactions. Default is 1 {:.ntpd}{% endcapture %}

{% capture INCLUDE_INCLUDE_WATCH_ONLY_PARAMETER %}| Name | Type | Presence | Description |--------------------|-----------------|-----------------------------|---------------- | Include Watch-Only | bool | Optional
(0 or 1) | Added in Bitcoin Core 0.10.0

If set to true, include watch-only addresses in details and calculations as if they were regular addresses belonging to the wallet. If set to false (the default), treat watch-only addresses as if they didn't belong to this wallet {:.ntpd}{% endcapture %}

{% assign WARNING="Warning icon Warning:" %}