<p>The format you have shown is not a valid descriptor format - it is not described in either the descriptor documentation nor the BIP, so JoinMarket is producing incompatible descriptors.</p>
<p>Strictly speaking, with just descriptors as specified in the documentation and the BIPs, it is currently not possible to create a descriptor with a timelock. However Bitcoin Core has added Miniscript watchonly support for the upcoming 24.0 release. While this is <a href="https://bitcoin.sipa.be/miniscript/" rel="nofollow noreferrer">documented</a>, it does not have a BIP yet.</p>
<p>It is possible to use Miniscript to make a descriptor that produces a logically identical script. However it may not actually match what JoinMarket produces, so use at your own risk. The descriptor would look something like:</p>
<pre><code>wsh(and_v(v:pk([00000000/84h/1h/0h/2]tpubDECM3jqdpSiGU2mKmo6xXxxXwFcmz6fX9EHMV3zbTY236jYYK9tM57cRFWaHqNjLbqAy52P6wkyo9wCAnr4P7Q1hGGFnrW98LPLajXEZPez/35),after(1669852800))
</code></pre>
<p>which would produce a witness script hash address that has a witness script of the form</p>
<pre><code>&lt;pubkey&gt; OP_CHECKSIGVERIFY 1669852800 OP_CHECKLOCKTIMEVERIFY
</code></pre>

CC BY-SA 4.0
2022-10-12T02:57:47.493Z
Could it be that one is about timelocked transactions (nlocktime field) and the other about scripts with op_cltv?
Pieter Wuille
CC BY-SA 4.0
2022-10-12T06:25:36.000Z
There is BIP proposal for fidelity bonds by Chris Belcher - https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-May/020389.html.

JM uses

    <timelock> OP_CHECKLOCKTIMEVERIFY OP_DROP <derived_key> OP_CHECKSIG

not

    <derived_key> OP_CHECKSIGVERIFY <timelock> OP_CHECKLOCKTIMEVERIFY

See https://gist.github.com/chris-belcher/7257763cedcc014de2cd4239857cd36e?permalink_comment_id=4151609#gistcomment-4151609.
Kristaps Kaupe
CC BY-SA 4.0
2022-10-12T14:18:01.847Z
Interesting. It seems like that is incompatible with Miniscript and Bitcoin Core then.
Ava Chow
CC BY-SA 4.0
2022-10-12T02:46:26.587Z
2022-10-12T02:46:26.587Z
Ava Chow
<p>I am attempting to <code>bitcoin-cli getdescriptorinfo &quot;wpkh([00000000/84h/1h/0h/2]tpubDECM3jqdpSiGU2mKmo6xXxxXwFcmz6fX9EHMV3zbTY236jYYK9tM57cRFWaHqNjLbqAy52P6wkyo9wCAnr4P7Q1hGGFnrW98LPLajXEZPez/35:1669852800)&quot;</code> as Join Market expresses this format <code>35:1669852800</code> (address index 35 with a unix timestamp in a bip32 path) for time locked addresses but it does not work with bitcoin-cli.</p>
<p>How would one create a valid output descriptor for a time locked address derived with bip32 (which contains all info to make it solvable in my wallet)?</p>

<bitcoin-cli><locktime><output-script-descriptors>
How to create a valid time locked descriptor?
Fontaine
# How to create a valid time locked descriptor?

(Asked by: username_0 on 2022-10-12)

I am attempting to `bitcoin-cli getdescriptorinfo "wpkh([00000000/84h/1h/0h/2]tpubDECM3jqdpSiGU2mKmo6xXxxXwFcmz6fX9EHMV3zbTY236jYYK9tM57cRFWaHqNjLbqAy52P6wkyo9wCAnr4P7Q1hGGFnrW98LPLajXEZPez/35:1669852800)"` as Join Market expresses this format `35:1669852800` (address index 35 with a unix timestamp in a bip32 path) for time locked addresses but it does not work with bitcoin-cli.

How would one create a valid output descriptor for a time locked address derived with bip32 (which contains all info to make it solvable in my wallet)?

**Tags:** bitcoin-cli, locktime, output-script-descriptors


---

## 1 answers

### Answer by username_1 on 2022-10-12. Score: 2 | Accepted answer

The format you have shown is not a valid descriptor format - it is not described in either the descriptor documentation nor the BIP, so JoinMarket is producing incompatible descriptors.
Strictly speaking, with just descriptors as specified in the documentation and the BIPs, it is currently not possible to create a descriptor with a timelock. However Bitcoin Core has added Miniscript watchonly support for the upcoming 24.0 release. While this is documented, it does not have a BIP yet.
It is possible to use Miniscript to make a descriptor that produces a logically identical script. However it may not actually match what JoinMarket produces, so use at your own risk. The descriptor would look something like:
wsh(and_v(v:pk([00000000/84h/1h/0h/2]tpubDECM3jqdpSiGU2mKmo6xXxxXwFcmz6fX9EHMV3zbTY236jYYK9tM57cRFWaHqNjLbqAy52P6wkyo9wCAnr4P7Q1hGGFnrW98LPLajXEZPez/35),after(1669852800))

which would produce a witness script hash address that has a witness script of the form
 OP_CHECKSIGVERIFY 1669852800 OP_CHECKLOCKTIMEVERIFY

> **Comments:**
> **username_2**: Could it be that one is about timelocked transactions (nlocktime field) and the other about scripts with op_cltv?  
> **username_3**: There is BIP proposal for fidelity bonds by Chris Belcher - https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-May/020389.html.  JM uses      <timelock> OP_CHECKLOCKTIMEVERIFY OP_DROP <derived_key> OP_CHECKSIG  not      <derived_key> OP_CHECKSIGVERIFY <timelock> OP_CHECKLOCKTIMEVERIFY  See https://gist.github.com/chris-belcher/7257763cedcc014de2cd4239857cd36e?permalink_comment_id=4151609#gistcomment-4151609.  
> **username_1**: Interesting. It seems like that is incompatible with Miniscript and Bitcoin Core then.  

---

