<p>If there is a single leaf in the descriptor you should not use brackets for the script path:</p>
<pre><code>tr([0d378869/44'/1'/0'/0/0]035d107216d89a540edacba2bc6719f3a9c6eac538bebac8b305e8cd42c3e466ae,pk(0374d5f29bc6c15066437856c512f7f9e5a14a1eb93cab2776d33b27b4103c62d8))
</code></pre>

CC BY-SA 4.0
2023-03-23T15:41:47.203Z
2023-03-23T15:41:47.203Z
Antoine Poinsot
<p>I need to implement 1 of 2 multisig with P2TR.</p>
<p>My friend's Bitcoin public key is <code>0374d5f29bc6c15066437856c512f7f9e5a14a1eb93cab2776d33b27b4103c62d8</code>.
My own Bitcoin public key is <code>035d107216d89a540edacba2bc6719f3a9c6eac538bebac8b305e8cd42c3e466ae</code>/</p>
<p>I will use my public key as the Key Path and my friend's as script path.</p>
<p>Can anybody tell me how to create a P2TR descriptor?</p>
<p>I got following errors:</p>
<pre><code>./bitcoin-cli -testnet -rpcwallet=w_p2tr getdescriptorinfo &quot;tr([0d378869/44'/1'/0'/0/1]035d107216d89a540edacba2bc6719f3a9c6eac538bebac8b305e8cd42c3e466ae, [(0xC0, [0374d5f29bc6c15066437856c512f7f9e5a14a1eb93cab2776d33b27b4103c62d8, OP_CHECKSIG])]&quot;
error code: -5
error message:
'tr([0d378869/44'/1'/0'/0/1]035d107216d89a540edacba2bc6719f3a9c6eac538bebac8b305e8cd42c3e466ae, [(0xC0, [0374d5f29bc6c15066437856c512f7f9e5a14a1eb93cab2776d33b27b4103c62d8, OP_CHECKSIG])]' is not a valid descriptor function
</code></pre>
<p>AND:</p>
<pre><code>./bitcoin-cli -testnet -rpcwallet=w_p2tr getdescriptorinfo &quot;tr([0d378869/44'/1'/0'/0/0]035d107216d89a540edacba2bc6719f3a9c6eac538bebac8b305e8cd42c3e466ae, { pk(0374d5f29bc6c15066437856c512f7f9e5a14a1eb93cab2776d33b27b4103c62d8) })&quot;
error code: -5
error message:
' { pk(0374d5f29bc6c15066437856c512f7f9e5a14a1eb93cab2776d33b27b4103c62d8) }' is not a valid descriptor function
</code></pre>
<p>BUT I got the descriptor right for key base only:</p>
<pre><code>./bitcoin-cli -testnet -rpcwallet=w_p2tr getdescriptorinfo &quot;tr([0d378869/44'/1'/0'/0/0]035d107216d89a540edacba2bc6719f3a9c6eac538bebac8b305e8cd42c3e466ae)&quot;
{
  &quot;descriptor&quot;: &quot;tr([0d378869/44'/1'/0'/0/0]035d107216d89a540edacba2bc6719f3a9c6eac538bebac8b305e8cd42c3e466ae)#wfd6rw0p&quot;,
  &quot;checksum&quot;: &quot;wfd6rw0p&quot;,
  &quot;isrange&quot;: false,
  &quot;issolvable&quot;: true,
  &quot;hasprivatekeys&quot;: false
}
</code></pre>

<output-script-descriptors><p2tr>
Error creating a Taproot descriptor with a single key as script path
Wei
# Error creating a Taproot descriptor with a single key as script path

(Asked by: username_0 on 2023-03-23)

I need to implement 1 of 2 multisig with P2TR.

My friend's Bitcoin public key is `0374d5f29bc6c15066437856c512f7f9e5a14a1eb93cab2776d33b27b4103c62d8`.
My own Bitcoin public key is `035d107216d89a540edacba2bc6719f3a9c6eac538bebac8b305e8cd42c3e466ae`/

I will use my public key as the Key Path and my friend's as script path.

Can anybody tell me how to create a P2TR descriptor?

I got following errors:

```
./bitcoin-cli -testnet -rpcwallet=w_p2tr getdescriptorinfo "tr([0d378869/44'/1'/0'/0/1]035d107216d89a540edacba2bc6719f3a9c6eac538bebac8b305e8cd42c3e466ae, [(0xC0, [0374d5f29bc6c15066437856c512f7f9e5a14a1eb93cab2776d33b27b4103c62d8, OP_CHECKSIG])]"
error code: -5
error message:
'tr([0d378869/44'/1'/0'/0/1]035d107216d89a540edacba2bc6719f3a9c6eac538bebac8b305e8cd42c3e466ae, [(0xC0, [0374d5f29bc6c15066437856c512f7f9e5a14a1eb93cab2776d33b27b4103c62d8, OP_CHECKSIG])]' is not a valid descriptor function

```

AND:

```
./bitcoin-cli -testnet -rpcwallet=w_p2tr getdescriptorinfo "tr([0d378869/44'/1'/0'/0/0]035d107216d89a540edacba2bc6719f3a9c6eac538bebac8b305e8cd42c3e466ae, { pk(0374d5f29bc6c15066437856c512f7f9e5a14a1eb93cab2776d33b27b4103c62d8) })"
error code: -5
error message:
' { pk(0374d5f29bc6c15066437856c512f7f9e5a14a1eb93cab2776d33b27b4103c62d8) }' is not a valid descriptor function

```

BUT I got the descriptor right for key base only:

```
./bitcoin-cli -testnet -rpcwallet=w_p2tr getdescriptorinfo "tr([0d378869/44'/1'/0'/0/0]035d107216d89a540edacba2bc6719f3a9c6eac538bebac8b305e8cd42c3e466ae)"
{
  "descriptor": "tr([0d378869/44'/1'/0'/0/0]035d107216d89a540edacba2bc6719f3a9c6eac538bebac8b305e8cd42c3e466ae)#wfd6rw0p",
  "checksum": "wfd6rw0p",
  "isrange": false,
  "issolvable": true,
  "hasprivatekeys": false
}

```

**Tags:** output-script-descriptors, p2tr


---

## 1 answers

### Answer by username_1 on 2023-03-23. Score: 3

If there is a single leaf in the descriptor you should not use brackets for the script path:

```
tr([0d378869/44'/1'/0'/0/0]035d107216d89a540edacba2bc6719f3a9c6eac538bebac8b305e8cd42c3e466ae,pk(0374d5f29bc6c15066437856c512f7f9e5a14a1eb93cab2776d33b27b4103c62d8))

```


---

