mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
Dev Docs: Further correct LockUnspent RPC docs
This commit is contained in:
parent
32b98e2a2c
commit
f4f23d9680
1 changed files with 43 additions and 5 deletions
|
@ -18,10 +18,10 @@ The `lockunspent` RPC {{summary_lockUnspent}}
|
|||
*Parameter #1---whether to lock or unlock the outputs*
|
||||
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "Lock Or Unlock"
|
||||
- n: "Unlock"
|
||||
t: "bool"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "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, all outputs will be unlocked (even if this is set to `false`)"
|
||||
d: "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"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
|
@ -56,7 +56,7 @@ The `lockunspent` RPC {{summary_lockUnspent}}
|
|||
- n: "`result`"
|
||||
t: "bool"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "Set to `true` if the outputs were successfully locked or unlocked"
|
||||
d: "Set to `true` if the outputs were successfully locked or unlocked. If the outputs were already locked or unlocked, it will also return `true`"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
|
@ -65,7 +65,7 @@ The `lockunspent` RPC {{summary_lockUnspent}}
|
|||
Lock two outputs:
|
||||
|
||||
{% highlight bash %}
|
||||
bitcoin-cli -testnet lockunspent true '''
|
||||
bitcoin-cli -testnet lockunspent false '''
|
||||
[
|
||||
{
|
||||
"txid": "5a7d24cd665108c66b2d56146f244932edae4e2376b561b3d396d5ae017b9589",
|
||||
|
@ -85,10 +85,31 @@ Result:
|
|||
true
|
||||
{% endhighlight %}
|
||||
|
||||
Verify the outputs have been locked:
|
||||
|
||||
{% highlight bash %}
|
||||
bitcoin-cli -testnet listlockunspent
|
||||
{% endhighlight %}
|
||||
|
||||
Result
|
||||
|
||||
{% highlight json %}
|
||||
[
|
||||
{
|
||||
"txid": "5a7d24cd665108c66b2d56146f244932edae4e2376b561b3d396d5ae017b9589",
|
||||
"vout": 0
|
||||
},
|
||||
{
|
||||
"txid": "6c5edd41a33f9839257358ba6ddece67df9db7f09c0db6bbea00d0372e8fe5cd",
|
||||
"vout": 0
|
||||
}
|
||||
]
|
||||
{% endhighlight %}
|
||||
|
||||
Unlock one of the above outputs:
|
||||
|
||||
{% highlight bash %}
|
||||
bitcoin-cli -testnet lockunspent false '''
|
||||
bitcoin-cli -testnet lockunspent true '''
|
||||
[
|
||||
{
|
||||
"txid": "5a7d24cd665108c66b2d56146f244932edae4e2376b561b3d396d5ae017b9589",
|
||||
|
@ -104,6 +125,23 @@ Result:
|
|||
true
|
||||
{% endhighlight %}
|
||||
|
||||
Verify the output has been unlocked:
|
||||
|
||||
{% highlight bash %}
|
||||
bitcoin-cli -testnet listlockunspent
|
||||
{% endhighlight %}
|
||||
|
||||
Result:
|
||||
|
||||
{% highlight json %}
|
||||
[
|
||||
{
|
||||
"txid": "6c5edd41a33f9839257358ba6ddece67df9db7f09c0db6bbea00d0372e8fe5cd",
|
||||
"vout": 0
|
||||
}
|
||||
]
|
||||
{% endhighlight %}
|
||||
|
||||
*See also*
|
||||
|
||||
* [ListLockUnspent][rpc listlockunspent]: {{summary_listLockUnspent}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue