<p>To do this you’ll need to first make sure the PSBT has the necessary information required by the descriptor to potentially sign the transaction. Do this by using Bitcoin Core's command-line tools (bitcoin-cli)</p>
<p>[Note: The descriptor in Bitcoin specifies how the keys in a wallet are structured and provides the script needed to control the coins. Examples of descriptors include pkh, wpkh, and sh(wpkh). Each descriptor requires certain data to sign a transaction, such as public keys and redeem scripts].</p>
<ul>
<li><p>First you need to decode the PSBT to discover what information the PSBT currently has, such as inputs, outputs, signatures or scripts.</p>
<ul>
<li>Use the code:
 bitcoin-cli decodepsbt &quot;your_psbt_here&quot;  </li>
</ul>
</li>
<li><p>Use the getdescriptorinfo command to get more information about your descriptor, particularly to understand what scriptPubKey and the redeem scripts it generates:</p>
<ul>
<li>use the code code: 
bitcoin-cli getdescriptorinfo &quot;your_descriptor_here&quot; </li>
</ul>
</li>
<li><p>Next you’ll have to check the PSBT Inputs Against the Descriptor Outputs: For each input in the PSBT, check that the scriptPubKey and redeemScript match those expected by the descriptor. You would compare the hash of these scripts or the addresses derived from them, to make sure they align with what the descriptor can produce and sign for.</p>
</li>
<li><p>You need to fill in the missing data in PSBT, If the PSBT is missing any necessary information that the descriptor can provide (like redeemScripts or witnessScripts), you can use the utxoupdatepsbt command. This command tries to add missing information to the PSBT using the UTXO set known to the node:</p>
<ul>
<li>use the code:
 bitcoin-cli utxoupdatepsbt &quot;your_psbt_here </li>
</ul>
</li>
<li><p>Validate Solvability: After ensuring all necessary information is present in the PSBT and matches with the descriptor capabilities, you can consider the PSBT as solvable by the descriptor. Each input should have corresponding necessary data to allow for signing.</p>
</li>
<li><p>You can now try to sign the PSBT using walletprocesspsbt (if your wallet supports the descriptor) in order to verify if it can actually produce valid signatures:</p>
<ul>
<li>use the code: 
bitcoin-cli walletprocesspsbt &quot;your_psbt_here&quot;</li>
</ul>
</li>
</ul>
<p>  If the above command successfully signs the PSBT, it confirms the PSBT is solvable by the descriptor.</p>

CC BY-SA 4.0
2024-04-15T10:31:30.283Z
2024-04-15T10:31:30.283Z
Jake Stanton
<p>As the title suggests I would like to check whether a specific PSBT is associated with a specific descriptor, either manually or using bitcoin-cli or bdk-cli.</p>
<p>I'm more concerned about static validation, not whether or not the inputs can be signed by the individual keys.</p>
<p>Is there a way to do this?</p>

<bip174-psbt><output-script-descriptors>
How can I verify that a PSBT is solvable by a specific descriptor?
max
# How can I verify that a PSBT is solvable by a specific descriptor?

(Asked by: username_0 on 2024-04-14)

As the title suggests I would like to check whether a specific PSBT is associated with a specific descriptor, either manually or using bitcoin-cli or bdk-cli.

I'm more concerned about static validation, not whether or not the inputs can be signed by the individual keys.

Is there a way to do this?

**Tags:** bip174-psbt, output-script-descriptors


---

## 1 answers

### Answer by username_1 on 2024-04-15. Score: 1 | Accepted answer

To do this you’ll need to first make sure the PSBT has the necessary information required by the descriptor to potentially sign the transaction. Do this by using Bitcoin Core's command-line tools (bitcoin-cli)

[Note: The descriptor in Bitcoin specifies how the keys in a wallet are structured and provides the script needed to control the coins. Examples of descriptors include pkh, wpkh, and sh(wpkh). Each descriptor requires certain data to sign a transaction, such as public keys and redeem scripts].

* First you need to decode the PSBT to discover what information the PSBT currently has, such as inputs, outputs, signatures or scripts.

  + Use the code:
     bitcoin-cli decodepsbt "your\_psbt\_here"
* Use the getdescriptorinfo command to get more information about your descriptor, particularly to understand what scriptPubKey and the redeem scripts it generates:

  + use the code code: 
    bitcoin-cli getdescriptorinfo "your\_descriptor\_here"
* Next you’ll have to check the PSBT Inputs Against the Descriptor Outputs: For each input in the PSBT, check that the scriptPubKey and redeemScript match those expected by the descriptor. You would compare the hash of these scripts or the addresses derived from them, to make sure they align with what the descriptor can produce and sign for.
* You need to fill in the missing data in PSBT, If the PSBT is missing any necessary information that the descriptor can provide (like redeemScripts or witnessScripts), you can use the utxoupdatepsbt command. This command tries to add missing information to the PSBT using the UTXO set known to the node:

  + use the code:
     bitcoin-cli utxoupdatepsbt "your\_psbt\_here
* Validate Solvability: After ensuring all necessary information is present in the PSBT and matches with the descriptor capabilities, you can consider the PSBT as solvable by the descriptor. Each input should have corresponding necessary data to allow for signing.
* You can now try to sign the PSBT using walletprocesspsbt (if your wallet supports the descriptor) in order to verify if it can actually produce valid signatures:

  + use the code: 
    bitcoin-cli walletprocesspsbt "your\_psbt\_here"

  If the above command successfully signs the PSBT, it confirms the PSBT is solvable by the descriptor.


---

