1

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:

  1. SHA256 of the key

  2. RIPEMD160 of the previous result

  3. I added the prefix (trying both 0xc4 and 0x6F)

  4. base58 including checksum

1 Answer 1

0

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.

1
  • 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
    Apr 29, 2020 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.