lockunspent

Input(s) 2

The lockunspent RPC allows users to temporarily lock or unlock specific transaction outputs. When unlocking, all currently locked transaction outputs are unlocked unless specific outputs are specified. Locked outputs are excluded from automatic coin selection when spending bitcoins, although manually selected coins are automatically unlocked.

How is this used?

The lockunspent RPC is used to control the spending behavior of specific transaction outputs in the Bitcoin Core wallet. It allows users to temporarily prevent locked outputs from being used in automatic coin selection, providing finer control over coin selection and transaction creation. This is particularly useful when building complex transactions or managing multiple outputs within a wallet. By specifying whether locks should be persistent or not, users can ensure that their locking preferences persist across node restarts or failures, providing consistent behavior over time.

Request

method

lockunspent

unlock

Required

transactions

Optional

Inputs(2)

one required input remaining...

unlock (required) - Whether to unlock (true) or lock (false) the specified transactions
transactions The transaction outputs and within each, the txid (string) vout (numeric)

Result