lockunspent

Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.

If no transaction outputs are specified when unlocking then all current locked transaction outputs are unlocked.

A locked transaction output will not be chosen by automatic coin selection, when spending bitcoins.

Manually selected coins are automatically unlocked.

Locks are stored in memory only, unless persistent=true, in which case they will be written to the wallet database and loaded on node start. Unwritten (persistent=false) locks are always cleared (by virtue of process exit) when a node stops or fails. Unlocking will clear both persistent and not.

Also see the listunspent call

Argument #1-unlock

Type: boolean, Required

Description: Whether to unlock (true) or lock (false) the specified transactions

Argument #2-transactions

Type: json array, Optional
Default=[]

Description: The transaction outputs and within each, the txid (string) vout (numeric).

     [
       {                   (json object)
         "txid": "hex",    (string, required) The transaction id
         "vout": n,        (numeric, required) The output number
       },
       ...
     ]

Argument #3-persistent

Type: boolean, Optional
Default=false

Description: Whether to write/erase this lock in the wallet database, or keep the change in memory only. Ignored for unlocking.

Result

Type: boolean

Description: Whether the command was successful or not