Utxo

如何解釋描述符欄位?

  • April 29, 2020

這些是我在 Tesnet 環境中的 UTXO:

 {
   "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
 },

從找到的文件中,描述符欄位sh (wpkh)描述了具有指定公鑰的 P2SH-P2WPKH 輸出。在 wpkh 和 wsh 中,只允許壓縮公鑰。如何檢查此密鑰和地址之間的連結?7de694b7為什麼所有按鍵的指紋都一樣?我嘗試執行這些步驟而沒有得到結果:

  1. 密鑰的 SHA256
  2. RIPEMD160 之前的結果
  3. 我添加了前綴(嘗試 0xc4 和 0x6F)
  4. base58 包括校驗和

您的密鑰描述符描述了一個 p2sh-p2wpkh 地址。描述符可以解碼為:

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

完整的鍵描述符參考可在此處獲得。

要從公鑰轉到地址,您可以執行此處概述的步驟。

引用自:https://bitcoin.stackexchange.com/questions/95593