Skip to content

Commit 2091d0e

Browse files
committed
docs(rpc): add param to lockunspent
Related to dashpay/dash#6530
1 parent 6964787 commit 2091d0e

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

docs/core/api/remote-procedure-call-quick-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core
199199
* [ListWalletDir](../api/remote-procedure-calls-wallet.md#listwalletdir): returns a list of wallets in the wallet directory. _New in Dash Core 18.0.0_
200200
* [ListWallets](../api/remote-procedure-calls-wallet.md#listwallets): returns a list of currently loaded wallets. _New in Dash Core 0.15.0_
201201
* [LoadWallet](../api/remote-procedure-calls-wallet.md#loadwallet): loads a wallet from a wallet file or directory. _Updated in Dash Core 18.1.0_
202-
* [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.
202+
* [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**
203203
* [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_
204204
* [RescanBlockChain](../api/remote-procedure-calls-wallet.md#rescanblockchain): rescans the local blockchain for wallet related transactions. _New in Dash Core 0.16.0_
205205
* [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_

docs/core/api/remote-procedure-calls-wallet.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2481,23 +2481,29 @@ The [`lockunspent` RPC](../api/remote-procedure-calls-wallet.md#lockunspent) tem
24812481

24822482
_Parameter #1---whether to lock or unlock the outputs_
24832483

2484-
| Name | Type | Presence | Description |
2485-
| ------ | ---- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2484+
| Name | Type | Presence | Description |
2485+
| ------ | ---- | ----------------------- | ----------- |
24862486
| Unlock | bool | Required<br>(exactly 1) | Set to `false` to lock the outputs specified in the following parameter. Set to `true` to unlock the outputs specified. If this is the only argument specified and it is set to `true`, all outputs will be unlocked; if it is the only argument and is set to `false`, there will be no change |
24872487

24882488
_Parameter #2---the outputs to lock or unlock_
24892489

2490-
| Name | Type | Presence | Description |
2491-
| ------------- | ------------ | ----------------------- | ---------------------------------------------------------------------------------------------------------------------- |
2490+
| Name | Type | Presence | Description |
2491+
| ------ | ---- | ----------------------- | ----------- |
24922492
| Outputs | array | Optional<br>(0 or 1) | An array of outputs to lock or unlock |
24932493
| →<br>Output | object | Required<br>(1 or more) | An object describing a particular output |
24942494
| → →<br>`txid` | string | Required<br>(exactly 1) | The TXID of the transaction containing the output to lock or unlock, encoded as hex in internal byte order |
24952495
| → →<br>`vout` | number (int) | Required<br>(exactly 1) | The output index number (vout) of the output to lock or unlock. The first output in a transaction has an index of `0` |
24962496

2497+
_Parameter #3---whether to keep the lock in memory only or in the wallet database_
2498+
2499+
| Name | Type | Presence | Description |
2500+
| ------ | ---- | ----------------------- | ----------- |
2501+
| `persistent` | bool | Optional<br>(0 or 1) | Whether to write/erase this lock in the wallet database, or keep the change in memory only. Ignored for unlocking. Defaults to `false`. |
2502+
24972503
_Result---`true` if successful_
24982504

2499-
| Name | Type | Presence | Description |
2500-
| -------- | ---- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
2505+
| Name | Type | Presence | Description |
2506+
| -------- | ---- | ----------------------- | ----------- |
25012507
| `result` | bool | Required<br>(exactly 1) | Set to `true` if the outputs were successfully locked or unlocked. If the outputs were already locked or unlocked, it will also return `true` |
25022508

25032509
_Example from Dash Core 0.12.2_

0 commit comments

Comments
 (0)