Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(core): v22.1 rpc updates, 1 #478

Merged
merged 6 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/core/api/remote-procedure-call-quick-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core

* [GetBestBlockHash](../api/remote-procedure-calls-blockchain.md#getbestblockhash): returns the header hash of the most recent block on the best block chain.
* [DumpTxOutset](../api/remote-procedure-calls-blockchain.md#dumptxoutset): Write the serialized UTXO set to disk. _New in Dash Core 18.1.0_
* [GetBestChainLock](../api/remote-procedure-calls-blockchain.md#getbestchainlock): returns the block hash of the best chainlock. _New in Dash Core 0.15.0_
* [GetBestChainLock](../api/remote-procedure-calls-blockchain.md#getbestchainlock): returns the block hash of the best chainlock. **Updated in Dash Core 22.1.0**
* [GetBlock](../api/remote-procedure-calls-blockchain.md#getblock): gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block. **_Updated in Dash Core 21.0.0_**
* [GetBlockChainInfo](../api/remote-procedure-calls-blockchain.md#getblockchaininfo): provides information about the current state of the block chain. **_Updated in Dash Core 21.0.0_**
* [GetBlockCount](../api/remote-procedure-calls-blockchain.md#getblockcount): returns the number of blocks in the local best block chain.
Expand Down Expand Up @@ -133,6 +133,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core
* [DecodeScript](../api/remote-procedure-calls-raw-transactions.md#decodescript): decodes a hex-encoded P2SH redeem script. **_Updated in Dash Core 21.0.0_**
* [FinalizePSBT](../api/remote-procedure-calls-raw-transactions.md#finalizepsbt): finalizes the inputs of a PSBT. The PSBT produces a network serialized transaction if the transaction is fully signed. _New in Dash Core 18.0.0_
* [FundRawTransaction](../api/remote-procedure-calls-raw-transactions.md#fundrawtransaction): adds inputs to a transaction until it has enough in value to meet its out value. **_Updated in Dash Core 21.0.0_**
* [GetISLocks](../api/remote-procedure-calls-raw-transactions.md#getislocks): returns the raw InstantSend lock data for each provided transaction ID. **New in Dash Core 22.1.0**
* [GetRawTransaction](../api/remote-procedure-calls-raw-transactions.md#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. **_Updated in Dash Core 21.0.0_**
* [GetRawTransactionMulti](../api/remote-procedure-calls-raw-transactions.md#getrawtransactionmulti): gets hex-encoded serialized transactions or a JSON object describing the multiple transactions. _New in Dash Core 20.1.0_
* [GetTxChainlocks](../api/remote-procedure-calls-raw-transactions.md#gettxchainlocks): returns the block height each transaction was mined at and whether it is ChainLocked or not. _Updated in Dash Core 20.1.0_
Expand Down Expand Up @@ -199,7 +200,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core
* [ListWalletDir](../api/remote-procedure-calls-wallet.md#listwalletdir): returns a list of wallets in the wallet directory. _New in Dash Core 18.0.0_
* [ListWallets](../api/remote-procedure-calls-wallet.md#listwallets): returns a list of currently loaded wallets. _New in Dash Core 0.15.0_
* [LoadWallet](../api/remote-procedure-calls-wallet.md#loadwallet): loads a wallet from a wallet file or directory. _Updated in Dash Core 18.1.0_
* [LockUnspent](../api/remote-procedure-calls-wallet.md#lockunspent): temporarily locks or unlocks specified transaction outputs. A locked transaction output will not be chosen by automatic coin selection when spending dash. Locks are stored in memory only, so nodes start with zero locked outputs and the locked output list is always cleared when a node stops or fails.
* [LockUnspent](../api/remote-procedure-calls-wallet.md#lockunspent): temporarily locks or unlocks specified transaction outputs. A locked transaction output will not be chosen by automatic coin selection when spending dash. Locks are stored in memory only, so nodes start with zero locked outputs and the locked output list is always cleared when a node stops or fails. **Updated in Dash Core 22.1.0**
* [RemovePrunedFunds](../api/remote-procedure-calls-wallet.md#removeprunedfunds): deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. _New in Dash Core 0.12.3_
* [RescanBlockChain](../api/remote-procedure-calls-wallet.md#rescanblockchain): rescans the local blockchain for wallet related transactions. _New in Dash Core 0.16.0_
* [ScanTxOutset](../api/remote-procedure-calls-wallet.md#scantxoutset): scans the unspent transaction output set for entries that match certain output descriptors. _New in Dash Core 18.0.0_
Expand All @@ -221,7 +222,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core
* [WalletLock](../api/remote-procedure-calls-wallet.md#walletlock): removes the wallet encryption key from memory, locking the wallet. After calling this method, you will need to call `walletpassphrase` again before being able to call any methods which require the wallet to be unlocked.
* [WalletPassphrase](../api/remote-procedure-calls-wallet.md#walletpassphrase): stores the wallet decryption key in memory for the indicated number of seconds. Issuing the `walletpassphrase` command while the wallet is already unlocked will set a new unlock time that overrides the old one.
* [WalletPassphraseChange](../api/remote-procedure-calls-wallet.md#walletpassphrasechange): changes the wallet passphrase from 'old passphrase' to 'new passphrase'.
* [WalletProcessPSBT](../api/remote-procedure-calls-wallet.md#walletprocesspsbt): updates a PSBT with input information from a wallet and then allows the signing of inputs. _Updated in Dash Core 18.2.0_
* [WalletProcessPSBT](../api/remote-procedure-calls-wallet.md#walletprocesspsbt): updates a PSBT with input information from a wallet and then allows the signing of inputs. **Updated in Dash Core 22.1.0**
* [WipeWalletTxes](../api/remote-procedure-calls-wallet.md#wipewallettxes): wipes wallet transactions. _New in Dash Core 19.3.0_

## [Wallet RPCs (Deprecated)](../api/remote-procedure-calls-wallet-deprecated.md)
Expand Down
12 changes: 7 additions & 5 deletions docs/core/api/remote-procedure-calls-blockchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ Name | Type | Presence | Description
→<br>`height` | number (int) | Required<br>(exactly 1) | The height of this block on its block chain
→<br>`signature` | string (hex) | Required<br>(exactly 1) | The BLS signature of the ChainLock
→<br>`known_block` | boolean | Required<br>(exactly 1) | True if the block is known by this node
→<br>`hex` | string (hex) | Required<br>(exactly 1) | The serialized, hex-encoded data for the best ChainLock

*Example from Dash Core 0.17.0*
*Example from Dash Core 22.1.0*

``` bash
dash-cli -testnet getbestchainlock
Expand All @@ -98,10 +99,11 @@ Result:

``` json
{
"blockhash": "00000c0e7a866e67444813858b976886d839aff28f56dc178c92ed1390c97f4e",
"height": 405044,
"signature": "960ead08adcc3fcf5e576f9e6ad290251325db900d19d961f5ece398b5389390b8a44e8986199c201ac348a89bc8534a0f7153c61c54157a241c521131025e5054b7c4298065069e478abdaea4d6c861848061e32c0d903ddeb5ee6036e8ddcf",
"known_block": true
"blockhash": "0000013e0738becaef5da03b0352ffa3d50e6dc6591246bca06357b50ee50927",
"height": 1186861,
"signature": "854e63822a53b0e53eb0aaceed554c104172cacb252450d60bfb353eb78ff107e22275236b895ac3a049718c68da840319a0efda8524c0ca39ebead5abe65d1e4b58e55856b25895a1d0bff1eaa483f0cca4b5d015661cf0003bf50a39b6da01",
"known_block": true,
"hex": "2d1c12002709e50eb55763a0bc461259c66d0ed5a3ff52033ba05defcabe38073e010000854e63822a53b0e53eb0aaceed554c104172cacb252450d60bfb353eb78ff107e22275236b895ac3a049718c68da840319a0efda8524c0ca39ebead5abe65d1e4b58e55856b25895a1d0bff1eaa483f0cca4b5d015661cf0003bf50a39b6da01"
}
```

Expand Down
4 changes: 2 additions & 2 deletions docs/core/api/remote-procedure-calls-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Debug category | string | Required<br>(1 or more) | The debug category to activa
| Type | Category |
| - | - |
| Special | • `0` or `none` - Disables all categories <br>• `1` or `all` - Enables all categories <br>• `dash` - Enables/disables all Dash categories |
| Standard | `addrman`, `bench`, `cmpctblock`, `coindb`, `estimatefee`, `http`, `i2p`, `ipc`, `leveldb`, `libevent`, `lock`, `mempool`, `mempoolrej`, `net`, `netconn`, `proxy`, `prune`, `qt`, `rand`, `reindex`, `rpc`, `selectcoins`, `tor`, `validation`, `walletdb`, `zmq`|
| Standard | `addrman`, `bench`, `blockstorage`, `cmpctblock`, `coindb`, `estimatefee`, `http`, `i2p`, `ipc`, `leveldb`, `libevent`, `lock`, `mempool`, `mempoolrej`, `net`, `netconn`, `proxy`, `prune`, `qt`, `rand`, `reindex`, `rpc`, `selectcoins`, `tor`, `validation`, `walletdb`, `zmq`|
| Dash | `chainlocks`, `coinjoin`, `creditpool`, `ehf`, `gobject`, `instantsend`, `llmq`, `llmq-dkg`, `llmq-sigs`, `mnpayments`, `mnsync`, `spork` |

Note: `libevent` logging is configured on startup and cannot be modified by this RPC during runtime.
Expand Down Expand Up @@ -206,7 +206,7 @@ The categories are:
| Type | Category |
| - | - |
| Special | • `0` or `none` - Disables all categories <br>• `1` or `all` - Enables all categories <br>• `dash` - Enables/disables all Dash categories |
| Standard | `addrman`, `bench`, `cmpctblock`, `coindb`, `estimatefee`, `http`, `i2p`, `ipc`, `leveldb`, `libevent`, `lock`, `mempool`, `mempoolrej`, `net`, `netconn`, `proxy`, `prune`, `qt`, `rand`, `reindex`, `rpc`, `selectcoins`, `tor`, `validation`, `walletdb`, `zmq`|
| Standard | `addrman`, `bench`, `blockstorage`, `cmpctblock`, `coindb`, `estimatefee`, `http`, `i2p`, `ipc`, `leveldb`, `libevent`, `lock`, `mempool`, `mempoolrej`, `net`, `netconn`, `proxy`, `prune`, `qt`, `rand`, `reindex`, `rpc`, `selectcoins`, `tor`, `validation`, `walletdb`, `zmq`|
| Dash | `chainlocks`, `coinjoin`, `creditpool`, `ehf`, `gobject`, `instantsend`, `llmq`, `llmq-dkg`, `llmq-sigs`, `mnpayments`, `mnsync`, `spork` |

*Result---a list of the logging categories that are active*
Expand Down
2 changes: 1 addition & 1 deletion docs/core/api/remote-procedure-calls-dash.md
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,7 @@ _Parameter #2---transport protocol options_

| Name | Type | Presence | Description |
| ------------ | ------- | -------------------- | ----------- |
| v2transport | bool | Optional<br>(0 or 1) | Set to `true` to attempt connection using the BIP324 v2 transport protocol. Defaults to `false`. |
| v2transport | bool | Optional<br>(0 or 1) | Set to `true` to attempt connection using the BIP324 v2 transport protocol. Defaults to `true` since Dash Core 22.1. Set by `-v2transport`. |

_Result---connection status_

Expand Down
60 changes: 60 additions & 0 deletions docs/core/api/remote-procedure-calls-raw-transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,66 @@ Result:

_See also: none_

## GetISLocks

Returns the raw InstantSend lock data for each provided transaction ID. Returns `"None"` if there is no known InstantSend lock for a transaction.

_Parameter #1—list of transaction IDs_

| Name | Type | Presence | Description |
| ---- | ---------- | ---------------------- | ----------- |
| txids | array | Required<br>(exactly 1) | An array of up to 100 transaction IDs (strings). Each element must be a valid transaction hash in hexadecimal form. |

_Result—execution result_

The RPC returns an array of the same size as the input array. Each element in the result array is either a JSON object with the following fields or the string `"None"` if no InstantSend lock is known for the corresponding transaction ID.

| Name | Type | Presence | Description |
| ------------------- | --------------- | ----------------------- | ----------- |
| Result | array | Required<br>(exactly 1) | An array of JSON objects with results for each requested TXID |
| → <br>TXID data | object | Required | Data for a requested TXID. One object for each requested TXID |
| → → <br>`txid` | string (hex) | Required<br>(exactly 1) | The transaction ID |
| → → <br>`inputs` | array | Required<br>(exactly 1) | An array of JSON objects describing the transaction inputs in the InstantSend lock |
| → → → <br> `txid` | string (hex) | Required<br>(exactly 1) | The transaction ID of the input |
| → → → <br> `vout` | number (int) | Required<br>(exactly 1) | The output index of the referenced transaction |
| → → <br>`cycleHash` | string (hex) | Required<br>(exactly 1) | The cycle hash associated with this InstantSend lock |
| → → <br>`signature` | string (hex) | Required<br>(exactly 1) | The BLS signature associated with this InstantSend lock |
| → → <br>`hex` | string (hex) | Required<br>(exactly 1) | The serialized, hex-encoded InstantSend lock data for the transaction |

_Example from Dash Core 22.1.0_

Query InstantSend lock information for two transaction IDs:

```bash
dash-cli getislocks '["58cf87162f74e2ae72721184643bc320155ca8ad5068ea005d47cb0c516a0730", "b251095eef8efd3b6840f13b4d8ff714ddff3db5775dc799610989586dc47cca"]'
```

Result:

```json
[
{
"txid": "58cf87162f74e2ae72721184643bc320155ca8ad5068ea005d47cb0c516a0730",
"inputs": [
{
"txid": "29a4f10cf3a9d169eb84579800db8625032cd27f5479ac2b5057de9242411de2",
"vout": 10
},
{
"txid": "c1a525857a91649e8f97ae4a4ad103c6992349b7616d2ab1f9e46278de17d29c",
"vout": 0
}
],
"cycleHash": "000000963cc2a39af8b4ab3f5f8651c5f704d3e5f258758a33f8e86edd6c01f0",
"signature": "a20e74296fcd3fb73f938680bdbfa8fa313b8d8bdf3f76657d7efac568e847f5f73093fe41f4a086a99cebb54b4a077a101b680e4f73055fe3bde78ce620545444a4e5ef22a51bfd29cc456b52d08d04c9e0d60ded435713dcd2df0edfe62f6b",
"hex": "0102e21d414292de57502bac79547fd22c032586db00985784eb69d1a9f30cf1a4290a0000009cd217de7862e4f9b12a6d61b7492399c603d14a4aae978f9e64917a8525a5c10000000030076a510ccb475d00ea6850ada85c1520c33b6484117272aee2742f1687cf58f0016cdd6ee8f8338a7558f2e5d304f7c551865f3fabb4f89aa3c23c96000000a20e74296fcd3fb73f938680bdbfa8fa313b8d8bdf3f76657d7efac568e847f5f73093fe41f4a086a99cebb54b4a077a101b680e4f73055fe3bde78ce620545444a4e5ef22a51bfd29cc456b52d08d04c9e0d60ded435713dcd2df0edfe62f6b"
},
"None"
]
```

_See also: none_

```{eval-rst}
.. _api-rpc-raw-transactions-getrawtransaction:
```
Expand Down
Loading