<p>Your key descriptors describe a p2sh-p2wpkh address. The descriptor can be decoded as:</p>

<pre><code>sh # p2sh script
(
wpkh # p2pkh script
([
7de694b7 # BIP32 root key fingerprint 
/0' # perform one hardened derivation at index 0 on the root key
/0' # perform one hardened derivation at index 0 on the previous derivation's output
/7' # perform one hardened derivation at index 7 on the previous derivation's output
]
032c27921f2d15e7eca768c0e8a8b1aeb863328c74d6c194d41dde2888d4b0e75b # this should be your resulting public key
))
#6z7uwusp # checksum information for the entire key descriptor
</code></pre>

<p>The full key descriptor reference is available <a href="https://github.com/bitcoin/bitcoin/blob/19a354b11f85a3c6c81ff83bf702bf7a40cf5046/doc/descriptors.md" rel="nofollow noreferrer">here</a>.</p>

<p>To go from the public key to the address, you can perform the steps as outlined <a href="https://bitcoincore.org/en/segwit_wallet_dev/#creation-of-p2sh-p2wpkh-address" rel="nofollow noreferrer">here</a>.</p>

CC BY-SA 4.0
2020-04-29T12:51:36.430Z
Ok, I would like to understand how it works: I have a P2SH address and to obtain this UTXO I have provided my compres. public key. The sender of the trans. had a Red.Script and the generated Lock.Script is in the OP_HASH160 Red.Script OP_EQUAL format. So, what I find in the UTXO Redeem Script must be the HASH160 of the compressed key present in the Descriptor. I don't know well the hardened derivation mechanism ... the UTXO are related to 3 different addresses which correspond to 3 different derivations of the same public key (for this reason they have the same fingerprint?), correct?
MaXbeMan
CC BY-SA 4.0
2020-04-29T09:36:05.517Z
2020-04-29T09:36:05.517Z
Raghav Sood
<p>These are my UTXO in Tesnet environment:</p>

<pre><code>  {
    "txid": "93ae7787fe8203e9f13534205ca0310baf8bf5e2b55b2faa1f8b09134f475208",
    "vout": 1,
    "address": "2N4VywDy3DnkCmCM8yvfMSFHiEt2ePxzLXu",
    "label": "",
    "redeemScript": "0014e700e862aa81cba9b43ede7bf446bebe91a5b147",
    "scriptPubKey": "a9147b73e47479d05d755dbaee6bdedf430df05ca34587",
    "amount": 0.01593294,
    "confirmations": 116,
    "spendable": true,
    "solvable": true,
    "desc": "sh(wpkh([7de694b7/0'/0'/8']030268ac0849999b04d572ddcf4202dbc8399e680df2afe4a577c1ed8e048d06f5))#zy9vsk5a",
    "safe": true
  },
  {
    "txid": "aaec2330d2d8a19e036cf2cde6575cfae299e303a4140451f2f88142491c9439",
    "vout": 0,
    "address": "2N7MaihNErbNH8XTkuZWtJYPzMQAWMPVKHd",
    "label": "",
    "redeemScript": "0014778daf651b21684b572644b47d551fce0ff71c74",
    "scriptPubKey": "a9149ac58ff47e27214b158b38da04bc8cbf72def14387",
    "amount": 0.01643138,
    "confirmations": 343,
    "spendable": true,
    "solvable": true,
    "desc": "sh(wpkh([7de694b7/0'/0'/7']032c27921f2d15e7eca768c0e8a8b1aeb863328c74d6c194d41dde2888d4b0e75b))#6z7uwusp",
    "safe": true
  },
  {
    "txid": "dbf77cfb45314d925ae99d40267419ba23d03200ae2ffdd5a54c06661c934242",
    "vout": 1,
    "address": "2NGS7agzTfk9LEKXkm89QvgbCC7rHWHBD4K",
    "label": "",
    "redeemScript": "00141212e2e581101ca9d211cef24ffe04196887aa8f",
    "scriptPubKey": "a914fe5a1ed871c6bd7fa9bb2dffbdcc77da4cd2b40e87",
    "amount": 0.00010000,
    "confirmations": 52732,
    "spendable": true,
    "solvable": true,
    "desc": "sh(wpkh([7de694b7/0'/0'/3']02902a17c3010900ddee53be420c7660f016c2a36cf169b45afc6747ea1a81e3a2))#ckzssh4n",
    "safe": true
  },
</code></pre>

<p>From the documentation found the descriptor field <code>sh (wpkh)</code>describes a P2SH-P2WPKH output with the specified public key. Within wpkh and wsh, only compressed public keys are allowed. 
How can I check the link between this key and the address? Why the fingerprint <code>7de694b7</code> is the same for all keys?
I tried to perform these steps without getting a result:</p>

<ol>
<li><p>SHA256 of the key</p></li>
<li><p>RIPEMD160 of the previous result</p></li>
<li><p>I added the prefix (trying both 0xc4 and 0x6F)</p></li>
<li><p>base58 including checksum</p></li>
</ol>

<utxo><utxo-set><p2wpkh><output-script-descriptors>
How to interpret the Descriptor field?
MaXbeMan
# How to interpret the Descriptor field?

(Asked by: username_0 on 2020-04-29)

These are my UTXO in Tesnet environment:
  {
    "txid": "93ae7787fe8203e9f13534205ca0310baf8bf5e2b55b2faa1f8b09134f475208",
    "vout": 1,
    "address": "2N4VywDy3DnkCmCM8yvfMSFHiEt2ePxzLXu",
    "label": "",
    "redeemScript": "0014e700e862aa81cba9b43ede7bf446bebe91a5b147",
    "scriptPubKey": "a9147b73e47479d05d755dbaee6bdedf430df05ca34587",
    "amount": 0.01593294,
    "confirmations": 116,
    "spendable": true,
    "solvable": true,
    "desc": "sh(wpkh([7de694b7/0'/0'/8']030268ac0849999b04d572ddcf4202dbc8399e680df2afe4a577c1ed8e048d06f5))#zy9vsk5a",
    "safe": true
  },
  {
    "txid": "aaec2330d2d8a19e036cf2cde6575cfae299e303a4140451f2f88142491c9439",
    "vout": 0,
    "address": "2N7MaihNErbNH8XTkuZWtJYPzMQAWMPVKHd",
    "label": "",
    "redeemScript": "0014778daf651b21684b572644b47d551fce0ff71c74",
    "scriptPubKey": "a9149ac58ff47e27214b158b38da04bc8cbf72def14387",
    "amount": 0.01643138,
    "confirmations": 343,
    "spendable": true,
    "solvable": true,
    "desc": "sh(wpkh([7de694b7/0'/0'/7']032c27921f2d15e7eca768c0e8a8b1aeb863328c74d6c194d41dde2888d4b0e75b))#6z7uwusp",
    "safe": true
  },
  {
    "txid": "dbf77cfb45314d925ae99d40267419ba23d03200ae2ffdd5a54c06661c934242",
    "vout": 1,
    "address": "2NGS7agzTfk9LEKXkm89QvgbCC7rHWHBD4K",
    "label": "",
    "redeemScript": "00141212e2e581101ca9d211cef24ffe04196887aa8f",
    "scriptPubKey": "a914fe5a1ed871c6bd7fa9bb2dffbdcc77da4cd2b40e87",
    "amount": 0.00010000,
    "confirmations": 52732,
    "spendable": true,
    "solvable": true,
    "desc": "sh(wpkh([7de694b7/0'/0'/3']02902a17c3010900ddee53be420c7660f016c2a36cf169b45afc6747ea1a81e3a2))#ckzssh4n",
    "safe": true
  },

From the documentation found the descriptor field sh (wpkh)describes a P2SH-P2WPKH output with the specified public key. Within wpkh and wsh, only compressed public keys are allowed. 
How can I check the link between this key and the address? Why the fingerprint 7de694b7 is the same for all keys?
I tried to perform these steps without getting a result:

SHA256 of the key
RIPEMD160 of the previous result
I added the prefix (trying both 0xc4 and 0x6F)
base58 including checksum

**Tags:** utxo, utxo-set, p2wpkh, output-script-descriptors


---

## 1 answers

### Answer by username_1 on 2020-04-29. Score: 0 | Accepted answer

Your key descriptors describe a p2sh-p2wpkh address. The descriptor can be decoded as:
sh # p2sh script
(
wpkh # p2pkh script
([
7de694b7 # BIP32 root key fingerprint 
/0' # perform one hardened derivation at index 0 on the root key
/0' # perform one hardened derivation at index 0 on the previous derivation's output
/7' # perform one hardened derivation at index 7 on the previous derivation's output
]
032c27921f2d15e7eca768c0e8a8b1aeb863328c74d6c194d41dde2888d4b0e75b # this should be your resulting public key
))
#6z7uwusp # checksum information for the entire key descriptor

The full key descriptor reference is available here.
To go from the public key to the address, you can perform the steps as outlined here.

> **Comments:**
> **username_0**: Ok, I would like to understand how it works: I have a P2SH address and to obtain this UTXO I have provided my compres. public key. The sender of the trans. had a Red.Script and the generated Lock.Script is in the OP_HASH160 Red.Script OP_EQUAL format. So, what I find in the UTXO Redeem Script must be the HASH160 of the compressed key present in the Descriptor. I don't know well the hardened derivation mechanism ... the UTXO are related to 3 different addresses which correspond to 3 different derivations of the same public key (for this reason they have the same fingerprint?), correct?  

---

