<p>When you lock coins in CLTV you still have to provide an address in the output. In that field, you can just include the address that your wallet controls. When you spend those coins, all you need to do is include the <code>nlocktime</code> which is higher than that specified when locking using the CLTV opcode. You need not do a second stage transaction to send the bitcoins to an address controlled by your wallet.</p>

CC BY-SA 4.0
2020-01-10T18:47:45.633Z
Thanks @ugam-kamat. Using bitcore-lib, I'm unable to attach an address to the CLTV output but I'm going to open a separate question for that issue.
Ali
CC BY-SA 4.0
2020-01-10T04:45:37.840Z
2020-01-10T04:45:37.840Z
Ugam Kamat
<p>For my scenarios, I want freeze some funds from my wallet for some given time/block and then make that amount spendable in a single transaction.</p>

<p>As I understand so far, I can do it using 2 transactions with CheckLockTimeVerify (CLTV) op_code as follows:</p>

<ol>
<li>Create a transaction with an output that has the CLTV op_code to freeze some funds from the input(s).</li>
<li>Then create another transaction which uses the above output as the input. The output of this transaction will transfer the funds back to my wallet. The nLockTime of this transaction will be set to the expire time of the previous transaction.</li>
</ol>

<p>But is there a way to do the same as above in a single transaction? As in create a transaction whose output has CLTV op_code but is a pubkeyhash back to my wallet. This way the frozen coins become spendable without having to create another transaction?</p>

<checklocktimeverify>
Using CLTV can I freeze some funds from a wallet, and make them available, in a single transaction?
Ali
# Using CLTV can I freeze some funds from a wallet, and make them available, in a single transaction?

(Asked by: username_0 on 2020-01-09)

For my scenarios, I want freeze some funds from my wallet for some given time/block and then make that amount spendable in a single transaction.

As I understand so far, I can do it using 2 transactions with CheckLockTimeVerify (CLTV) op\_code as follows:

1. Create a transaction with an output that has the CLTV op\_code to freeze some funds from the input(s).
2. Then create another transaction which uses the above output as the input. The output of this transaction will transfer the funds back to my wallet. The nLockTime of this transaction will be set to the expire time of the previous transaction.

But is there a way to do the same as above in a single transaction? As in create a transaction whose output has CLTV op\_code but is a pubkeyhash back to my wallet. This way the frozen coins become spendable without having to create another transaction?

**Tags:** checklocktimeverify


---

## 1 answers

### Answer by username_1 on 2020-01-10. Score: 1 | Accepted answer

When you lock coins in CLTV you still have to provide an address in the output. In that field, you can just include the address that your wallet controls. When you spend those coins, all you need to do is include the `nlocktime` which is higher than that specified when locking using the CLTV opcode. You need not do a second stage transaction to send the bitcoins to an address controlled by your wallet.

> **Comments:**
> **username_0**: Thanks @ugam-kamat. Using bitcore-lib, I'm unable to attach an address to the CLTV output but I'm going to open a separate question for that issue.  

---

